From fef9ddbee66b85be90af0457204d181839a1b993 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 1 Mar 2009 19:24:17 -0500 Subject: [PATCH 1/1] http://se.aminet.net/pub/X11/ftp.x.org/contrib/applications/xlockmore-4.13.tar.gz -rw-r--r-- 1 zblaxell zblaxell 1347361 Mar 8 1999 xlockmore-4.13.tar.gz 378fcfd32157ef9c43c64dba7e735e7760a53785 xlockmore-4.13.tar.gz --- Imakefile | 64 + Makefile.in | 116 + README | 786 +++ bitmaps/bad.xbm | 9 + bitmaps/bat-0.xbm | 174 + bitmaps/bat-1.xbm | 174 + bitmaps/bat-2.xbm | 174 + bitmaps/bat-3.xbm | 174 + bitmaps/bat-4.xbm | 174 + bitmaps/bounce-0.xbm | 46 + bitmaps/bounce-1.xbm | 46 + bitmaps/bounce-2.xbm | 46 + bitmaps/bounce-3.xbm | 46 + bitmaps/bounce-mask.xbm | 46 + bitmaps/cooperat.xbm | 9 + bitmaps/cross_weave.xbm | 6 + bitmaps/defect.xbm | 9 + bitmaps/dimple1.xbm | 6 + bitmaps/dimple3.xbm | 6 + bitmaps/donkey.xbm | 9 + bitmaps/elephant.xbm | 8 + bitmaps/fish-0.xbm | 8 + bitmaps/fish-1.xbm | 8 + bitmaps/fish-2.xbm | 8 + bitmaps/fish-3.xbm | 8 + bitmaps/fish-4.xbm | 8 + bitmaps/fish-5.xbm | 8 + bitmaps/fish-6.xbm | 8 + bitmaps/fish-7.xbm | 8 + bitmaps/flipped_gray.xbm | 4 + bitmaps/good.xbm | 9 + bitmaps/gray1.xbm | 4 + bitmaps/gray3.xbm | 4 + bitmaps/hlines2.xbm | 4 + bitmaps/l-bob.xbm | 364 ++ bitmaps/l-bsd.xbm | 52 + bitmaps/l-dec.xbm | 27 + bitmaps/l-hp.xbm | 20 + bitmaps/l-ibm.xbm | 32 + bitmaps/l-linux.xbm | 205 + bitmaps/l-linux1.xbm | 46 + bitmaps/l-mot.xbm | 67 + bitmaps/l-sco.xbm | 20 + bitmaps/l-sgi.xbm | 46 + bitmaps/l-sun.xbm | 46 + bitmaps/l-x11.xbm | 46 + bitmaps/l-xlock.xbm | 55 + bitmaps/light_gray.xbm | 4 + bitmaps/m-bob.xbm | 43 + bitmaps/m-bsd.xbm | 39 + bitmaps/m-dec.xbm | 27 + bitmaps/m-ghost.xbm | 41 + bitmaps/m-grelb.xbm | 25 + bitmaps/m-hp.xbm | 20 + bitmaps/m-ibm.xbm | 32 + bitmaps/m-linux.xbm | 53 + bitmaps/m-linux1.xbm | 46 + bitmaps/m-mot.xbm | 67 + bitmaps/m-sco.xbm | 20 + bitmaps/m-sgi.xbm | 46 + bitmaps/m-sun.xbm | 46 + bitmaps/m-x11.xbm | 14 + bitmaps/m-xlock.xbm | 17 + bitmaps/mailempty.xbm | 27 + bitmaps/mailfull.xbm | 27 + bitmaps/nose-faced.xbm | 5 + bitmaps/nose-facef.xbm | 15 + bitmaps/nose-facel.xbm | 15 + bitmaps/nose-facer.xbm | 15 + bitmaps/nose-hat.xbm | 8 + bitmaps/nose-hatd.xbm | 20 + bitmaps/nose-shoef.xbm | 14 + bitmaps/nose-shoel.xbm | 10 + bitmaps/nose-shoer.xbm | 10 + bitmaps/nose-stepl.xbm | 16 + bitmaps/nose-stepr.xbm | 16 + bitmaps/root_weave.xbm | 4 + bitmaps/rot00.xbm | 13 + bitmaps/rot01.xbm | 13 + bitmaps/rot02.xbm | 13 + bitmaps/rot03.xbm | 13 + bitmaps/rot04.xbm | 13 + bitmaps/rot05.xbm | 13 + bitmaps/rot06.xbm | 13 + bitmaps/rot07.xbm | 13 + bitmaps/rot08.xbm | 13 + bitmaps/rot09.xbm | 13 + bitmaps/rot10.xbm | 13 + bitmaps/rot11.xbm | 13 + bitmaps/rot12.xbm | 13 + bitmaps/rot13.xbm | 13 + bitmaps/rot14.xbm | 13 + bitmaps/rot15.xbm | 13 + bitmaps/s-bsd.xbm | 21 + bitmaps/s-dec.xbm | 10 + bitmaps/s-grelb.xbm | 17 + bitmaps/s-hp.xbm | 9 + bitmaps/s-ibm.xbm | 11 + bitmaps/s-linux.xbm | 31 + bitmaps/s-linux1.xbm | 13 + bitmaps/s-mot.xbm | 12 + bitmaps/s-sco.xbm | 20 + bitmaps/s-sgi.xbm | 14 + bitmaps/s-sun.xbm | 13 + bitmaps/s-x11.xbm | 6 + bitmaps/shark-0.xbm | 8 + bitmaps/shark-1.xbm | 8 + bitmaps/shark-2.xbm | 8 + bitmaps/shark-3.xbm | 8 + bitmaps/shark-4.xbm | 8 + bitmaps/shark-5.xbm | 8 + bitmaps/shark-6.xbm | 8 + bitmaps/shark-7.xbm | 8 + bitmaps/sickle.xbm | 9 + bitmaps/stipple.xbm | 4 + bitmaps/t-smilie.xbm | 4 + bitmaps/t-x11.xbm | 5 + bitmaps/terra-00.xbm | 48 + bitmaps/terra-01.xbm | 48 + bitmaps/terra-02.xbm | 48 + bitmaps/terra-03.xbm | 48 + bitmaps/terra-04.xbm | 48 + bitmaps/terra-05.xbm | 48 + bitmaps/terra-06.xbm | 48 + bitmaps/terra-07.xbm | 48 + bitmaps/terra-08.xbm | 48 + bitmaps/terra-09.xbm | 48 + bitmaps/terra-10.xbm | 48 + bitmaps/terra-11.xbm | 48 + bitmaps/terra-12.xbm | 48 + bitmaps/terra-13.xbm | 48 + bitmaps/terra-14.xbm | 48 + bitmaps/terra-15.xbm | 48 + bitmaps/terra-16.xbm | 48 + bitmaps/terra-17.xbm | 48 + bitmaps/terra-18.xbm | 48 + bitmaps/terra-19.xbm | 48 + bitmaps/terra-20.xbm | 48 + bitmaps/terra-21.xbm | 48 + bitmaps/terra-22.xbm | 48 + bitmaps/terra-23.xbm | 48 + bitmaps/terra-24.xbm | 48 + bitmaps/terra-25.xbm | 48 + bitmaps/terra-26.xbm | 48 + bitmaps/terra-27.xbm | 48 + bitmaps/terra-28.xbm | 48 + bitmaps/terra-29.xbm | 48 + bitmaps/trek-0.xbm | 267 + bitmaps/trek-1.xbm | 177 + bitmaps/trek-2.xbm | 249 + bitmaps/vlines2.xbm | 4 + bitmaps/vlines3.xbm | 4 + config.guess | 693 +++ config.h.in | 310 ++ config.sub | 927 ++++ configure | 7937 ++++++++++++++++++++++++++++++ configure.in | 3685 ++++++++++++++ configure.tcl | 430 ++ docs/3d.howto | 43 + docs/HACKERS.GUIDE | 576 +++ docs/HACKERS.GUIDE.fr | 286 ++ docs/Purify | 46 + docs/Purify.solaris | 617 +++ docs/Purify.sunos | 133 + docs/Revisions | 1745 +++++++ docs/TODO | 280 ++ docs/cell_automata | 161 + docs/xlock.hlp | 1783 +++++++ docs/xlock.html | 1415 ++++++ etc/README.etc | 48 + etc/chkmbox/Mail.xpm | 88 + etc/chkmbox/Makefile | 21 + etc/chkmbox/NoMail.xpm | 88 + etc/chkmbox/chkmbox.c | 63 + etc/chkmbox/chkmbox.cfg | 7 + etc/chkmbox/imapsocket.c | 553 +++ etc/chkmbox/imapsocket.h | 48 + etc/descrip.mms | 334 ++ etc/dtprofile | 255 + etc/dtscreen.dt | 925 ++++ etc/fortune.dat | 4052 +++++++++++++++ etc/genlauncher/README | 18 + etc/genlauncher/etc.xlock.tcl | 647 +++ etc/genlauncher/lex.yy.c | 1619 ++++++ etc/genlauncher/lmode.h | 375 ++ etc/genlauncher/make.launcher | 43 + etc/genlauncher/xalock.modes.tpl | 12 + etc/genlauncher/xlockgen.lex | 63 + etc/genlauncher/xmlock.modes.tpl | 21 + etc/gif/README | 2 + etc/gif/deflag.gif | Bin 0 -> 95 bytes etc/gif/frflag.gif | Bin 0 -> 124 bytes etc/gif/nlflag.gif | Bin 0 -> 95 bytes etc/gif/ukflag.gif | Bin 0 -> 182 bytes etc/glider.3dlife | 8 + etc/glider.hlife | 7 + etc/glider.life | 4 + etc/play.sh | 2 + etc/rplay.conf | 4 + etc/rplay.hosts | 1 + etc/rplay.servers | 1 + etc/showmodes.sh | 29 + etc/system.fvwm2rc.xlock | 396 ++ etc/system.fvwmrc.xlock | 421 ++ etc/system.mwmrc.xlock | 453 ++ etc/system.olwmrc.xlock | 347 ++ etc/system.wmrc.xlock | 350 ++ etc/vtswitch.c | 122 + etc/xlock.java | 28 + etc/xlock.sh | 10 + etc/xlock.staff | 4 + etc/xlock.tcl | 742 +++ etc/xlockFrame.java | 287 ++ etc/xlockhexlife.pl | 81 + etc/xlocklife.pl | 81 + etc/xlockranddur.pl | 6 + etc/xlockrandimage.pl | 28 + etc/xlocksat.pl | 6 + etc/xtermlock.sh | 11 + etc/xwinlock.sh | 19 + iconfig.h | 503 ++ install-sh | 250 + make.com | 491 ++ mkinstalldirs | 30 + modes/Imakefile | 318 ++ modes/Makefile.in | 1214 +++++ modes/Makefile.inxs | 1721 +++++++ modes/ant.c | 1157 +++++ modes/ball.c | 511 ++ modes/bat.c | 580 +++ modes/blank.c | 97 + modes/blot.c | 202 + modes/bomb.c | 417 ++ modes/bouboule.c | 850 ++++ modes/bounce.c | 598 +++ modes/braid.c | 445 ++ modes/bubble.c | 286 ++ modes/bug.c | 954 ++++ modes/cartoon.c | 408 ++ modes/clock.c | 460 ++ modes/coral.c | 332 ++ modes/crystal.c | 1274 +++++ modes/daisy.c | 313 ++ modes/dclock.c | 667 +++ modes/decay.c | 254 + modes/deco.c | 186 + modes/demon.c | 903 ++++ modes/dilemma.c | 936 ++++ modes/discrete.c | 411 ++ modes/drift.c | 648 +++ modes/eyes.c | 1045 ++++ modes/fadeplot.c | 208 + modes/flag.c | 585 +++ modes/flame.c | 348 ++ modes/flow.c | 590 +++ modes/forest.c | 221 + modes/galaxy.c | 491 ++ modes/glx/Imakefile | 59 + modes/glx/Makefile.in | 417 ++ modes/glx/atlantis.c | 444 ++ modes/glx/atlantis.h | 109 + modes/glx/b_draw.c | 260 + modes/glx/b_lockglue.c | 180 + modes/glx/b_sphere.c | 231 + modes/glx/bubble3d.c | 264 + modes/glx/bubble3d.h | 82 + modes/glx/buildlwo.c | 100 + modes/glx/buildlwo.h | 24 + modes/glx/cage.c | 452 ++ modes/glx/dolphin.c | 2069 ++++++++ modes/glx/e_textures.h | 1478 ++++++ modes/glx/gears.c | 518 ++ modes/glx/i_evert.h | 8 + modes/glx/i_figure8.cc | 34 + modes/glx/i_figure8.h | 14 + modes/glx/i_figureeight.cc | 34 + modes/glx/i_figureeight.h | 14 + modes/glx/i_linkage.cc | 115 + modes/glx/i_linkage.h | 22 + modes/glx/i_sphere.cc | 155 + modes/glx/i_sphere.h | 8 + modes/glx/i_spline.cc | 308 ++ modes/glx/i_spline.h | 17 + modes/glx/i_threejet.cc | 140 + modes/glx/i_threejet.h | 46 + modes/glx/i_threejetvec.cc | 104 + modes/glx/i_threejetvec.h | 25 + modes/glx/i_twojet.cc | 58 + modes/glx/i_twojet.h | 89 + modes/glx/i_twojetvec.cc | 96 + modes/glx/i_twojetvec.h | 24 + modes/glx/invert.c | 185 + modes/glx/lament.c | 2503 ++++++++++ modes/glx/moebius.c | 709 +++ modes/glx/morph3d.c | 891 ++++ modes/glx/pipeobjs.c | 3267 ++++++++++++ modes/glx/pipes.c | 1037 ++++ modes/glx/rubik.c | 1861 +++++++ modes/glx/s1_1.c | 1057 ++++ modes/glx/s1_2.c | 1057 ++++ modes/glx/s1_3.c | 1057 ++++ modes/glx/s1_4.c | 1057 ++++ modes/glx/s1_5.c | 1057 ++++ modes/glx/s1_6.c | 1057 ++++ modes/glx/s1_b.c | 537 ++ modes/glx/shark.c | 1403 ++++++ modes/glx/sproingies.c | 827 ++++ modes/glx/sproingiewrap.c | 247 + modes/glx/stairs.c | 487 ++ modes/glx/superquadrics.c | 781 +++ modes/glx/swim.c | 233 + modes/glx/text3d.cc | 956 ++++ modes/glx/text3d.h | 41 + modes/glx/whale.c | 1894 +++++++ modes/goop.c | 591 +++ modes/grav.c | 341 ++ modes/helix.c | 373 ++ modes/hop.c | 552 +++ modes/hyper.c | 1184 +++++ modes/ico.c | 928 ++++ modes/ifs.c | 485 ++ modes/image.c | 252 + modes/julia.c | 395 ++ modes/kaleid.c | 1278 +++++ modes/kumppa.c | 742 +++ modes/laser.c | 340 ++ modes/life.c | 2860 +++++++++++ modes/life1d.c | 850 ++++ modes/life3d.c | 2319 +++++++++ modes/lightning.c | 608 +++ modes/lisa.c | 517 ++ modes/lissie.c | 309 ++ modes/loop.c | 1428 ++++++ modes/lyapunov.c | 402 ++ modes/mandelbrot.c | 575 +++ modes/marquee.c | 516 ++ modes/maze.c | 890 ++++ modes/mountain.c | 280 ++ modes/munch.c | 264 + modes/nose.c | 782 +++ modes/pacman.c | 749 +++ modes/penrose.c | 1302 +++++ modes/petal.c | 358 ++ modes/puzzle.c | 624 +++ modes/pyro.c | 607 +++ modes/qix.c | 397 ++ modes/random.c | 933 ++++ modes/roll.c | 312 ++ modes/rotor.c | 369 ++ modes/shape.c | 416 ++ modes/sierpinski.c | 205 + modes/slip.c | 327 ++ modes/sphere.c | 293 ++ modes/spiral.c | 316 ++ modes/spline.c | 429 ++ modes/star.c | 738 +++ modes/starfish.c | 625 +++ modes/strange.c | 419 ++ modes/swarm.c | 353 ++ modes/swirl.c | 1480 ++++++ modes/tetris.c | 932 ++++ modes/thornbird.c | 213 + modes/triangle.c | 368 ++ modes/tube.c | 354 ++ modes/turtle.c | 407 ++ modes/vines.c | 183 + modes/voters.c | 809 +++ modes/wator.c | 979 ++++ modes/wire.c | 975 ++++ modes/world.c | 286 ++ modes/worm.c | 456 ++ modes/xjack.c | 449 ++ pixmaps/bat-0.xpm | 178 + pixmaps/bat-1.xpm | 178 + pixmaps/bat-2.xpm | 178 + pixmaps/bat-3.xpm | 165 + pixmaps/bat-4.xpm | 165 + pixmaps/cal_hob.xpm | 159 + pixmaps/calvin.xpm | 387 ++ pixmaps/calvin2.xpm | 218 + pixmaps/calvin3.xpm | 297 ++ pixmaps/calvin4.xpm | 178 + pixmaps/calvinf.xpm | 156 + pixmaps/dragon.xpm | 448 ++ pixmaps/garfield.xpm | 186 + pixmaps/gravity.xpm | 254 + pixmaps/hobbes.xpm | 279 ++ pixmaps/l-linux.xpm | 332 ++ pixmaps/l-xlock.xpm | 59 + pixmaps/lament.xpm | 791 +++ pixmaps/m-axp.xpm | 56 + pixmaps/m-blank.xpm | 56 + pixmaps/m-bsd.xpm | 62 + pixmaps/m-dec.xpm | 57 + pixmaps/m-hp.xpm | 56 + pixmaps/m-ibm.xpm | 56 + pixmaps/m-linux.xpm | 181 + pixmaps/m-linux1.xpm | 58 + pixmaps/m-sco.xpm | 58 + pixmaps/m-sgi.xpm | 56 + pixmaps/m-sol.xpm | 56 + pixmaps/m-sun.xpm | 56 + pixmaps/m-x11.xpm | 56 + pixmaps/m-xlock.xpm | 34 + pixmaps/marino2.xpm | 327 ++ raster/scream.ras | Bin 0 -> 14810 bytes sounds/complete.au | Bin 0 -> 6355 bytes sounds/identify-please.au | Bin 0 -> 8300 bytes sounds/not-programmed.au | Bin 0 -> 22537 bytes sounds/thank-you.au | Bin 0 -> 15047 bytes xalock/Imakefile | 37 + xalock/Makefile.in | 193 + xalock/modes.h | 129 + xalock/multireq.c | 215 + xalock/multireq.h | 24 + xalock/xalock.c | 387 ++ xalock/xalock.h | 5 + xglock/Makefile.in | 151 + xglock/README.xglock | 18 + xglock/lmode.h | 514 ++ xglock/xglock.c | 1800 +++++++ xlock/Imakefile | 51 + xlock/Makefile.in | 290 ++ xlock/Makefile.inxs | 314 ++ xlock/XLock.ad | 660 +++ xlock/automata.c | 64 + xlock/automata.h | 13 + xlock/color.c | 1158 +++++ xlock/color.h | 212 + xlock/erase.c | 604 +++ xlock/iostuff.c | 827 ++++ xlock/iostuff.h | 58 + xlock/logout.c | 524 ++ xlock/memcheck.c | 487 ++ xlock/mode.c | 1154 +++++ xlock/mode.h | 1453 ++++++ xlock/passwd.c | 1881 +++++++ xlock/passwd.h | 2 + xlock/random.c | 45 + xlock/random.h | 59 + xlock/ras.c | 221 + xlock/ras.h | 27 + xlock/resource.c | 2049 ++++++++ xlock/sound.c | 125 + xlock/spline.c | 336 ++ xlock/spline.h | 50 + xlock/util.c | 176 + xlock/util.h | 6 + xlock/version.h | 1 + xlock/vis.c | 496 ++ xlock/vis.h | 33 + xlock/vms_amd.c | 727 +++ xlock/vms_amd.h | 390 ++ xlock/vroot.h | 130 + xlock/vtlock.c | 172 + xlock/vtlock_proc.c | 445 ++ xlock/xbm.c | 138 + xlock/xlock.c | 3419 +++++++++++++ xlock/xlock.h | 530 ++ xlock/xlock.man | 1849 +++++++ xmlock/Imakefile | 38 + xmlock/Makefile.in | 191 + xmlock/XmLock.ad | 16 + xmlock/modes.h | 138 + xmlock/option.c | 218 + xmlock/xmlock.c | 388 ++ xscreensaver/Makefile.in | 76 + xscreensaver/README | 47 + xscreensaver/configure.in | 1403 ++++++ 469 files changed, 164218 insertions(+) create mode 100644 Imakefile create mode 100644 Makefile.in create mode 100644 README create mode 100644 bitmaps/bad.xbm create mode 100644 bitmaps/bat-0.xbm create mode 100644 bitmaps/bat-1.xbm create mode 100644 bitmaps/bat-2.xbm create mode 100644 bitmaps/bat-3.xbm create mode 100644 bitmaps/bat-4.xbm create mode 100644 bitmaps/bounce-0.xbm create mode 100644 bitmaps/bounce-1.xbm create mode 100644 bitmaps/bounce-2.xbm create mode 100644 bitmaps/bounce-3.xbm create mode 100644 bitmaps/bounce-mask.xbm create mode 100644 bitmaps/cooperat.xbm create mode 100644 bitmaps/cross_weave.xbm create mode 100644 bitmaps/defect.xbm create mode 100644 bitmaps/dimple1.xbm create mode 100644 bitmaps/dimple3.xbm create mode 100644 bitmaps/donkey.xbm create mode 100644 bitmaps/elephant.xbm create mode 100644 bitmaps/fish-0.xbm create mode 100644 bitmaps/fish-1.xbm create mode 100644 bitmaps/fish-2.xbm create mode 100644 bitmaps/fish-3.xbm create mode 100644 bitmaps/fish-4.xbm create mode 100644 bitmaps/fish-5.xbm create mode 100644 bitmaps/fish-6.xbm create mode 100644 bitmaps/fish-7.xbm create mode 100644 bitmaps/flipped_gray.xbm create mode 100644 bitmaps/good.xbm create mode 100644 bitmaps/gray1.xbm create mode 100644 bitmaps/gray3.xbm create mode 100644 bitmaps/hlines2.xbm create mode 100644 bitmaps/l-bob.xbm create mode 100644 bitmaps/l-bsd.xbm create mode 100644 bitmaps/l-dec.xbm create mode 100644 bitmaps/l-hp.xbm create mode 100644 bitmaps/l-ibm.xbm create mode 100644 bitmaps/l-linux.xbm create mode 100644 bitmaps/l-linux1.xbm create mode 100644 bitmaps/l-mot.xbm create mode 100644 bitmaps/l-sco.xbm create mode 100644 bitmaps/l-sgi.xbm create mode 100644 bitmaps/l-sun.xbm create mode 100644 bitmaps/l-x11.xbm create mode 100644 bitmaps/l-xlock.xbm create mode 100644 bitmaps/light_gray.xbm create mode 100644 bitmaps/m-bob.xbm create mode 100644 bitmaps/m-bsd.xbm create mode 100644 bitmaps/m-dec.xbm create mode 100644 bitmaps/m-ghost.xbm create mode 100644 bitmaps/m-grelb.xbm create mode 100644 bitmaps/m-hp.xbm create mode 100644 bitmaps/m-ibm.xbm create mode 100644 bitmaps/m-linux.xbm create mode 100644 bitmaps/m-linux1.xbm create mode 100644 bitmaps/m-mot.xbm create mode 100644 bitmaps/m-sco.xbm create mode 100644 bitmaps/m-sgi.xbm create mode 100644 bitmaps/m-sun.xbm create mode 100644 bitmaps/m-x11.xbm create mode 100644 bitmaps/m-xlock.xbm create mode 100644 bitmaps/mailempty.xbm create mode 100644 bitmaps/mailfull.xbm create mode 100644 bitmaps/nose-faced.xbm create mode 100644 bitmaps/nose-facef.xbm create mode 100644 bitmaps/nose-facel.xbm create mode 100644 bitmaps/nose-facer.xbm create mode 100644 bitmaps/nose-hat.xbm create mode 100644 bitmaps/nose-hatd.xbm create mode 100644 bitmaps/nose-shoef.xbm create mode 100644 bitmaps/nose-shoel.xbm create mode 100644 bitmaps/nose-shoer.xbm create mode 100644 bitmaps/nose-stepl.xbm create mode 100644 bitmaps/nose-stepr.xbm create mode 100644 bitmaps/root_weave.xbm create mode 100644 bitmaps/rot00.xbm create mode 100644 bitmaps/rot01.xbm create mode 100644 bitmaps/rot02.xbm create mode 100644 bitmaps/rot03.xbm create mode 100644 bitmaps/rot04.xbm create mode 100644 bitmaps/rot05.xbm create mode 100644 bitmaps/rot06.xbm create mode 100644 bitmaps/rot07.xbm create mode 100644 bitmaps/rot08.xbm create mode 100644 bitmaps/rot09.xbm create mode 100644 bitmaps/rot10.xbm create mode 100644 bitmaps/rot11.xbm create mode 100644 bitmaps/rot12.xbm create mode 100644 bitmaps/rot13.xbm create mode 100644 bitmaps/rot14.xbm create mode 100644 bitmaps/rot15.xbm create mode 100644 bitmaps/s-bsd.xbm create mode 100644 bitmaps/s-dec.xbm create mode 100644 bitmaps/s-grelb.xbm create mode 100644 bitmaps/s-hp.xbm create mode 100644 bitmaps/s-ibm.xbm create mode 100644 bitmaps/s-linux.xbm create mode 100644 bitmaps/s-linux1.xbm create mode 100644 bitmaps/s-mot.xbm create mode 100644 bitmaps/s-sco.xbm create mode 100644 bitmaps/s-sgi.xbm create mode 100644 bitmaps/s-sun.xbm create mode 100644 bitmaps/s-x11.xbm create mode 100644 bitmaps/shark-0.xbm create mode 100644 bitmaps/shark-1.xbm create mode 100644 bitmaps/shark-2.xbm create mode 100644 bitmaps/shark-3.xbm create mode 100644 bitmaps/shark-4.xbm create mode 100644 bitmaps/shark-5.xbm create mode 100644 bitmaps/shark-6.xbm create mode 100644 bitmaps/shark-7.xbm create mode 100644 bitmaps/sickle.xbm create mode 100644 bitmaps/stipple.xbm create mode 100644 bitmaps/t-smilie.xbm create mode 100644 bitmaps/t-x11.xbm create mode 100644 bitmaps/terra-00.xbm create mode 100644 bitmaps/terra-01.xbm create mode 100644 bitmaps/terra-02.xbm create mode 100644 bitmaps/terra-03.xbm create mode 100644 bitmaps/terra-04.xbm create mode 100644 bitmaps/terra-05.xbm create mode 100644 bitmaps/terra-06.xbm create mode 100644 bitmaps/terra-07.xbm create mode 100644 bitmaps/terra-08.xbm create mode 100644 bitmaps/terra-09.xbm create mode 100644 bitmaps/terra-10.xbm create mode 100644 bitmaps/terra-11.xbm create mode 100644 bitmaps/terra-12.xbm create mode 100644 bitmaps/terra-13.xbm create mode 100644 bitmaps/terra-14.xbm create mode 100644 bitmaps/terra-15.xbm create mode 100644 bitmaps/terra-16.xbm create mode 100644 bitmaps/terra-17.xbm create mode 100644 bitmaps/terra-18.xbm create mode 100644 bitmaps/terra-19.xbm create mode 100644 bitmaps/terra-20.xbm create mode 100644 bitmaps/terra-21.xbm create mode 100644 bitmaps/terra-22.xbm create mode 100644 bitmaps/terra-23.xbm create mode 100644 bitmaps/terra-24.xbm create mode 100644 bitmaps/terra-25.xbm create mode 100644 bitmaps/terra-26.xbm create mode 100644 bitmaps/terra-27.xbm create mode 100644 bitmaps/terra-28.xbm create mode 100644 bitmaps/terra-29.xbm create mode 100644 bitmaps/trek-0.xbm create mode 100644 bitmaps/trek-1.xbm create mode 100644 bitmaps/trek-2.xbm create mode 100644 bitmaps/vlines2.xbm create mode 100644 bitmaps/vlines3.xbm create mode 100755 config.guess create mode 100644 config.h.in create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.in create mode 100755 configure.tcl create mode 100644 docs/3d.howto create mode 100644 docs/HACKERS.GUIDE create mode 100644 docs/HACKERS.GUIDE.fr create mode 100644 docs/Purify create mode 100644 docs/Purify.solaris create mode 100644 docs/Purify.sunos create mode 100644 docs/Revisions create mode 100644 docs/TODO create mode 100644 docs/cell_automata create mode 100644 docs/xlock.hlp create mode 100644 docs/xlock.html create mode 100644 etc/README.etc create mode 100644 etc/chkmbox/Mail.xpm create mode 100644 etc/chkmbox/Makefile create mode 100644 etc/chkmbox/NoMail.xpm create mode 100644 etc/chkmbox/chkmbox.c create mode 100644 etc/chkmbox/chkmbox.cfg create mode 100644 etc/chkmbox/imapsocket.c create mode 100644 etc/chkmbox/imapsocket.h create mode 100644 etc/descrip.mms create mode 100644 etc/dtprofile create mode 100644 etc/dtscreen.dt create mode 100644 etc/fortune.dat create mode 100644 etc/genlauncher/README create mode 100755 etc/genlauncher/etc.xlock.tcl create mode 100644 etc/genlauncher/lex.yy.c create mode 100644 etc/genlauncher/lmode.h create mode 100755 etc/genlauncher/make.launcher create mode 100644 etc/genlauncher/xalock.modes.tpl create mode 100644 etc/genlauncher/xlockgen.lex create mode 100644 etc/genlauncher/xmlock.modes.tpl create mode 100644 etc/gif/README create mode 100644 etc/gif/deflag.gif create mode 100644 etc/gif/frflag.gif create mode 100644 etc/gif/nlflag.gif create mode 100644 etc/gif/ukflag.gif create mode 100644 etc/glider.3dlife create mode 100644 etc/glider.hlife create mode 100644 etc/glider.life create mode 100755 etc/play.sh create mode 100644 etc/rplay.conf create mode 100644 etc/rplay.hosts create mode 100644 etc/rplay.servers create mode 100755 etc/showmodes.sh create mode 100644 etc/system.fvwm2rc.xlock create mode 100644 etc/system.fvwmrc.xlock create mode 100644 etc/system.mwmrc.xlock create mode 100644 etc/system.olwmrc.xlock create mode 100644 etc/system.wmrc.xlock create mode 100644 etc/vtswitch.c create mode 100644 etc/xlock.java create mode 100755 etc/xlock.sh create mode 100644 etc/xlock.staff create mode 100755 etc/xlock.tcl create mode 100644 etc/xlockFrame.java create mode 100755 etc/xlockhexlife.pl create mode 100755 etc/xlocklife.pl create mode 100755 etc/xlockranddur.pl create mode 100755 etc/xlockrandimage.pl create mode 100755 etc/xlocksat.pl create mode 100755 etc/xtermlock.sh create mode 100755 etc/xwinlock.sh create mode 100644 iconfig.h create mode 100755 install-sh create mode 100644 make.com create mode 100755 mkinstalldirs create mode 100644 modes/Imakefile create mode 100644 modes/Makefile.in create mode 100644 modes/Makefile.inxs create mode 100644 modes/ant.c create mode 100644 modes/ball.c create mode 100644 modes/bat.c create mode 100644 modes/blank.c create mode 100644 modes/blot.c create mode 100644 modes/bomb.c create mode 100644 modes/bouboule.c create mode 100644 modes/bounce.c create mode 100644 modes/braid.c create mode 100644 modes/bubble.c create mode 100644 modes/bug.c create mode 100644 modes/cartoon.c create mode 100644 modes/clock.c create mode 100644 modes/coral.c create mode 100644 modes/crystal.c create mode 100644 modes/daisy.c create mode 100644 modes/dclock.c create mode 100644 modes/decay.c create mode 100644 modes/deco.c create mode 100644 modes/demon.c create mode 100644 modes/dilemma.c create mode 100644 modes/discrete.c create mode 100644 modes/drift.c create mode 100644 modes/eyes.c create mode 100644 modes/fadeplot.c create mode 100644 modes/flag.c create mode 100644 modes/flame.c create mode 100644 modes/flow.c create mode 100644 modes/forest.c create mode 100644 modes/galaxy.c create mode 100644 modes/glx/Imakefile create mode 100644 modes/glx/Makefile.in create mode 100644 modes/glx/atlantis.c create mode 100644 modes/glx/atlantis.h create mode 100644 modes/glx/b_draw.c create mode 100644 modes/glx/b_lockglue.c create mode 100644 modes/glx/b_sphere.c create mode 100644 modes/glx/bubble3d.c create mode 100644 modes/glx/bubble3d.h create mode 100644 modes/glx/buildlwo.c create mode 100644 modes/glx/buildlwo.h create mode 100644 modes/glx/cage.c create mode 100644 modes/glx/dolphin.c create mode 100644 modes/glx/e_textures.h create mode 100644 modes/glx/gears.c create mode 100644 modes/glx/i_evert.h create mode 100644 modes/glx/i_figure8.cc create mode 100644 modes/glx/i_figure8.h create mode 100644 modes/glx/i_figureeight.cc create mode 100644 modes/glx/i_figureeight.h create mode 100644 modes/glx/i_linkage.cc create mode 100644 modes/glx/i_linkage.h create mode 100644 modes/glx/i_sphere.cc create mode 100644 modes/glx/i_sphere.h create mode 100644 modes/glx/i_spline.cc create mode 100644 modes/glx/i_spline.h create mode 100644 modes/glx/i_threejet.cc create mode 100644 modes/glx/i_threejet.h create mode 100644 modes/glx/i_threejetvec.cc create mode 100644 modes/glx/i_threejetvec.h create mode 100644 modes/glx/i_twojet.cc create mode 100644 modes/glx/i_twojet.h create mode 100644 modes/glx/i_twojetvec.cc create mode 100644 modes/glx/i_twojetvec.h create mode 100644 modes/glx/invert.c create mode 100644 modes/glx/lament.c create mode 100644 modes/glx/moebius.c create mode 100644 modes/glx/morph3d.c create mode 100644 modes/glx/pipeobjs.c create mode 100644 modes/glx/pipes.c create mode 100644 modes/glx/rubik.c create mode 100644 modes/glx/s1_1.c create mode 100644 modes/glx/s1_2.c create mode 100644 modes/glx/s1_3.c create mode 100644 modes/glx/s1_4.c create mode 100644 modes/glx/s1_5.c create mode 100644 modes/glx/s1_6.c create mode 100644 modes/glx/s1_b.c create mode 100644 modes/glx/shark.c create mode 100644 modes/glx/sproingies.c create mode 100644 modes/glx/sproingiewrap.c create mode 100644 modes/glx/stairs.c create mode 100644 modes/glx/superquadrics.c create mode 100644 modes/glx/swim.c create mode 100644 modes/glx/text3d.cc create mode 100644 modes/glx/text3d.h create mode 100644 modes/glx/whale.c create mode 100644 modes/goop.c create mode 100644 modes/grav.c create mode 100644 modes/helix.c create mode 100644 modes/hop.c create mode 100644 modes/hyper.c create mode 100644 modes/ico.c create mode 100644 modes/ifs.c create mode 100644 modes/image.c create mode 100644 modes/julia.c create mode 100644 modes/kaleid.c create mode 100644 modes/kumppa.c create mode 100644 modes/laser.c create mode 100644 modes/life.c create mode 100644 modes/life1d.c create mode 100644 modes/life3d.c create mode 100644 modes/lightning.c create mode 100644 modes/lisa.c create mode 100644 modes/lissie.c create mode 100644 modes/loop.c create mode 100644 modes/lyapunov.c create mode 100644 modes/mandelbrot.c create mode 100644 modes/marquee.c create mode 100644 modes/maze.c create mode 100644 modes/mountain.c create mode 100644 modes/munch.c create mode 100644 modes/nose.c create mode 100644 modes/pacman.c create mode 100644 modes/penrose.c create mode 100644 modes/petal.c create mode 100644 modes/puzzle.c create mode 100644 modes/pyro.c create mode 100644 modes/qix.c create mode 100644 modes/random.c create mode 100644 modes/roll.c create mode 100644 modes/rotor.c create mode 100644 modes/shape.c create mode 100644 modes/sierpinski.c create mode 100644 modes/slip.c create mode 100644 modes/sphere.c create mode 100644 modes/spiral.c create mode 100644 modes/spline.c create mode 100644 modes/star.c create mode 100644 modes/starfish.c create mode 100644 modes/strange.c create mode 100644 modes/swarm.c create mode 100644 modes/swirl.c create mode 100644 modes/tetris.c create mode 100644 modes/thornbird.c create mode 100644 modes/triangle.c create mode 100644 modes/tube.c create mode 100644 modes/turtle.c create mode 100644 modes/vines.c create mode 100644 modes/voters.c create mode 100644 modes/wator.c create mode 100644 modes/wire.c create mode 100644 modes/world.c create mode 100644 modes/worm.c create mode 100644 modes/xjack.c create mode 100644 pixmaps/bat-0.xpm create mode 100644 pixmaps/bat-1.xpm create mode 100644 pixmaps/bat-2.xpm create mode 100644 pixmaps/bat-3.xpm create mode 100644 pixmaps/bat-4.xpm create mode 100644 pixmaps/cal_hob.xpm create mode 100644 pixmaps/calvin.xpm create mode 100644 pixmaps/calvin2.xpm create mode 100644 pixmaps/calvin3.xpm create mode 100644 pixmaps/calvin4.xpm create mode 100644 pixmaps/calvinf.xpm create mode 100644 pixmaps/dragon.xpm create mode 100644 pixmaps/garfield.xpm create mode 100644 pixmaps/gravity.xpm create mode 100644 pixmaps/hobbes.xpm create mode 100644 pixmaps/l-linux.xpm create mode 100644 pixmaps/l-xlock.xpm create mode 100644 pixmaps/lament.xpm create mode 100644 pixmaps/m-axp.xpm create mode 100644 pixmaps/m-blank.xpm create mode 100644 pixmaps/m-bsd.xpm create mode 100644 pixmaps/m-dec.xpm create mode 100644 pixmaps/m-hp.xpm create mode 100644 pixmaps/m-ibm.xpm create mode 100644 pixmaps/m-linux.xpm create mode 100644 pixmaps/m-linux1.xpm create mode 100644 pixmaps/m-sco.xpm create mode 100644 pixmaps/m-sgi.xpm create mode 100644 pixmaps/m-sol.xpm create mode 100644 pixmaps/m-sun.xpm create mode 100644 pixmaps/m-x11.xpm create mode 100644 pixmaps/m-xlock.xpm create mode 100644 pixmaps/marino2.xpm create mode 100644 raster/scream.ras create mode 100644 sounds/complete.au create mode 100644 sounds/identify-please.au create mode 100644 sounds/not-programmed.au create mode 100644 sounds/thank-you.au create mode 100644 xalock/Imakefile create mode 100644 xalock/Makefile.in create mode 100644 xalock/modes.h create mode 100644 xalock/multireq.c create mode 100644 xalock/multireq.h create mode 100644 xalock/xalock.c create mode 100644 xalock/xalock.h create mode 100644 xglock/Makefile.in create mode 100644 xglock/README.xglock create mode 100644 xglock/lmode.h create mode 100644 xglock/xglock.c create mode 100644 xlock/Imakefile create mode 100644 xlock/Makefile.in create mode 100644 xlock/Makefile.inxs create mode 100644 xlock/XLock.ad create mode 100644 xlock/automata.c create mode 100644 xlock/automata.h create mode 100644 xlock/color.c create mode 100644 xlock/color.h create mode 100644 xlock/erase.c create mode 100644 xlock/iostuff.c create mode 100644 xlock/iostuff.h create mode 100644 xlock/logout.c create mode 100644 xlock/memcheck.c create mode 100644 xlock/mode.c create mode 100644 xlock/mode.h create mode 100644 xlock/passwd.c create mode 100644 xlock/passwd.h create mode 100644 xlock/random.c create mode 100644 xlock/random.h create mode 100644 xlock/ras.c create mode 100644 xlock/ras.h create mode 100644 xlock/resource.c create mode 100644 xlock/sound.c create mode 100644 xlock/spline.c create mode 100644 xlock/spline.h create mode 100644 xlock/util.c create mode 100644 xlock/util.h create mode 100644 xlock/version.h create mode 100644 xlock/vis.c create mode 100644 xlock/vis.h create mode 100644 xlock/vms_amd.c create mode 100644 xlock/vms_amd.h create mode 100644 xlock/vroot.h create mode 100644 xlock/vtlock.c create mode 100644 xlock/vtlock_proc.c create mode 100644 xlock/xbm.c create mode 100644 xlock/xlock.c create mode 100644 xlock/xlock.h create mode 100644 xlock/xlock.man create mode 100644 xmlock/Imakefile create mode 100644 xmlock/Makefile.in create mode 100644 xmlock/XmLock.ad create mode 100644 xmlock/modes.h create mode 100644 xmlock/option.c create mode 100644 xmlock/xmlock.c create mode 100644 xscreensaver/Makefile.in create mode 100644 xscreensaver/README create mode 100644 xscreensaver/configure.in diff --git a/Imakefile b/Imakefile new file mode 100644 index 00000000..ccef27e3 --- /dev/null +++ b/Imakefile @@ -0,0 +1,64 @@ +#ifndef XCOMM +#define XCOMM /**/# +#endif +XCOMM @(#)Imakefile 4.13 99/03/08 xlockmore +XCOMM Many "ideas" taken from xscreensaver-1.34 by Jamie Zawinski. +XCOMM + +VER = xlockmore +DISTVER = xlockmore-4.13 + +SUBDIRS = xlock modes/glx modes xmlock +XCOMM Do not build by default, since it usually does not work +XCOMM xalock + +MAKE_SUBDIR = for dir in $(SUBDIRS) ; do ( cd $$dir ; $(MAKE) $@ \ +CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)" \ +BINDIR="$(BINDIR)" XAPPLOADDIR="$(XAPPLOADDIR)") ; done + +SUB_MAKEFILES = xlock/Makefile modes/glx/Makefile modes/Makefile xmlock/Makefile xalock/Makefile + +all:: + @echo "" ; \ + echo " ==========================================================" ; \ + echo "" ; \ + echo " Did you read and edit iconfig.h? " ; \ + echo " Otherwise it will assume a minimum configuration." ; \ + echo " Run \"make depend\" if you can not find \"eyes.xbm\"." ; \ + echo "" ; \ + echo " ==========================================================" ; \ + echo "" + + +all:: $(SUB_MAKEFILES) + @$(MAKE_SUBDIR) + +install:: all + @$(MAKE_SUBDIR) + +clean:: + @$(MAKE_SUBDIR) + +depend:: + @$(MAKE_SUBDIR) + +distclean : clean + @$(MAKE_SUBDIR) + -rm -f Makefile config.status config.cache config.log config.h + +Makefiles:: $(SUB_MAKEFILES) + +xlock/Makefile : Imakefile iconfig.h + cd xlock ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/xlock + +modes/glx/Makefile : modes/glx/Imakefile iconfig.h + cd modes/glx ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/modes/glx + +modes/Makefile : modes/Imakefile iconfig.h + cd modes ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/modes + +xmlock/Makefile : xmlock/Imakefile iconfig.h + cd xmlock ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/xmlock + +xalock/Makefile : xalock/Imakefile iconfig.h + cd xalock ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/xalock diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..51bc7866 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,116 @@ +############################################################ +# +# $Id : Makefile.in 4.13 1999/03/08 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +SUBDIRS = xlock modes/glx modes xmlock xglock +# Do not build by default, since it usually does not work +# xalock + +MAKE_SUBDIR = for dir in $(SUBDIRS) ; do ( cd $$dir ; $(MAKE) $@ ) ; done +# convenient not to use configure just to clean +MAKEIN_SUBDIR = for dir in $(SUBDIRS) ; do ( cd $$dir ; $(MAKE) -f Makefile.in $@ ) ; done + +all : + @$(MAKE_SUBDIR) + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ + +TAR = tar +RM = rm -f + +VER = xlockmore +DISTVER = xlockmore-4.13 + +install : + @$(MAKE_SUBDIR) + +install-program : + @$(MAKE_SUBDIR) + +install-man : + @$(MAKE_SUBDIR) + +install-ad : + @$(MAKE_SUBDIR) + +uninstall : + @$(MAKE_SUBDIR) + +uninstall-program : + @$(MAKE_SUBDIR) + +uninstall-man : + @$(MAKE_SUBDIR) + +depend : + @$(MAKE_SUBDIR) + +distdepend : + @$(MAKE_SUBDIR) + +lint : + @$(MAKE_SUBDIR) + +xrdb : + @$(MAKE_SUBDIR) + +man : + @$(MAKE_SUBDIR) + +html : + @$(MAKE_SUBDIR) + +hlp : + @$(MAKE_SUBDIR) + +clean : + $(RM) core *~ *% *.bak *.orig *.rej make.log MakeOut + @$(MAKE_SUBDIR) + +distclean : + $(RM) core *~ *% *.bak *.orig *.rej make.log MakeOut + $(RM) Makefile config.status config.cache config.log config.h + @$(MAKEIN_SUBDIR) + +Makefile : Makefile.in config.status + $(SHELL) config.status +config.status : configure + $(SHELL) config.status --recheck +#configure : configure.in +# enable this rule if you want autoconf to be executed automatically when +# configure.in is changed. This is commented out, since patching might give +# configure.in a newer timestamp than configure and not everybody has autoconf +# cd $(srcdir); autoconf + +clean.all : distclean + +tar : distclean + cd .. ; $(TAR) cvf $(VER).tar $(VER)/* + +compress : tar + cd .. ; compress -f $(VER).tar + +gzip : tar + cd .. ; gzip -best -f $(VER).tar + +dist : gzip + +tgz : tar + cd .. ; gzip -best -c $(VER).tar > `echo $(VER) | cut -c1-8`.tgz ; \ +$(RM) $(VER).tar + +read : + more README diff --git a/README b/README new file mode 100644 index 00000000..cdb69f4e --- /dev/null +++ b/README @@ -0,0 +1,786 @@ +xlockmore-4.13: the maintained version of xlock +see docs/Revisions for more version stuff +see docs/TODO for stuff to do :) + +I have significantly less time to maintain this but I try. +If someone has some free time and wants to take over... let me know. +(Help is always appreciated too ;) ). + +Primary site: ftp://ftp.tux.org/pub/people/david-bagley/xlockmore +Secondary site: ftp://ftp.x.org/contrib/applications +Web page: http://www.tux.org/~bagleyd/xlockmore.html +Maintainer: David A. Bagley + +Majordomos: Mail to majordomo@tux.org with just +subscribe [choice] [your-email-address] + in the body. + choice brief description + ------ ----------------- + xlock-beta Xlock beta and production announcements + xlock-alpha Xlock alpha ("daily") release announcements + xlock Xlock/Xlockmore development discussion + If there is trailing signature junk, just put "end" as the last line to + be read. If you need help just put "help" in the body. + +SECURITY WARNING: +----------------- +xlock using the MesaGL Libraries (<= 2.6) setuid root has a known method for +users to obtain root privledges! + +Please send all bug reports to bagleyd@bigfoot.com . +Alpha versions may be available through web page or primary ftp site. +Adapted from Patrick J. Naughton's original xlock, with lots of help + from others. + + +How to build? +------------- + An ANSI C compiler is required for build. + motif (and editres) are used to build xmlock and are not used in xlock. + athena and sxlib are used to build xalock and are not used in xlock. + + Check below to see if your machine is one mentioned that causes + problems, otherwise it should be easy. Just to be safe after installing + test it with something like: `/usr/local/bin/xlock -debug -verbose` + + If you installed this before you may want to back up your XLock.ad file + if you made changes, since `make install` will overwrite this. + + There are 3 ways to build: + + configure: + `configure --help` to see options. + + configure ; make ; make install + + For Linux and others you may want something like: + configure --prefix=/usr/X11R6 ; make ; make install + that way it will install it in /usr/X11R6 not /usr/local + For Suns you may want: + configure --prefix=/usr/openwin ; make ; make install + + imake: + Sometimes this is not setup correctly by the distributer ... i.e. not + my fault. You may want to do these quick edits to the iconfig.h so you + have more capabilities: + + Do you have XPM? If so, uncomment "#define XpmLibrary". + Do you have OpenGL or MesaGL? If so, uncomment "#define GLLibrary". + Do you have CDE? If so, uncomment "#define DtSaverLibrary". + Do you have RPLAY? If so, uncomment "#define RplayLibrary". + Do you have NAS? If so, uncomment "#define NasLibrary". + Do you have Motif? If so, uncomment "#define XmLibrary". + + Examine iconfig.h for other optional capabilities. + + xmkmf ; make Makefiles ; make depend ; make ; make install + or + xmkmf -a ; make ; make install + + make.com: + See VMS below. + + +Note to binary redistributers: +----------------------------- + Probably should not distribute with any library requirements + (except possibly XPM, unless you statically link them in + and with USE_BOMB since it might not run right if you do not know + if your users will use xdm or not. For example: + configure --without-xpm --without-opengl --without-mesagl + --without-dtsaver --without-rplay --without-nas --disable-bomb; make + You may want to distribute it with the xlock/XLock.ad file with "XLock." + instances replaced with "*". On Sun's, I need it to override the system + XLock.ad file. + Please let me know if there are other concerns. + + +Likely Problems +--------------- + Make sure you use the new XLock.ad resource file (or at least remove the + old one) otherwise several modes will not be set up nicely. This is + usually put as a file in $HOME/XLock and/or + $WHEREVER_X11_IS_LOADED/lib/X11/app-defaults/XLock . + + "Key: " this usually means you should get your administrator to setuid + xlock to root or at least setgid xlock to shadow. If you do not have + a friendly administrator it is asking for a key (password) that it will + save encrypted your $HOME/.xlockrc file. + + AIX (IBM RS6000) + AIX's "make": + AIX's "make" can not handle "+=" so if you use the iconfig.h, you + have to group all your DEFINES into one long line and use "=" + instead. GNU's "make" solves this problem. + AIX 3.1 and less: + it SHOULD compile automatically with -DLESS_THAN_AIX3_2 using the + iconfig.h, since the passwd struct is not available. + AIX 3.2 and greater: + one must have setuid xlock to root if you want to use it + without being root. + su - root + chown root xlock + chmod u+s xlock + chmod og+rx xlock + AFS users: + See iconfig.h, grep on "AFS". + Some machines have an alternate password shadowing method, if someone + figures it out mail me the patch. + AIX with DCE you will need "-ls" among the XLOCKLIBS. + + Alpha-OSF/1 (Digital Equipment Corp) + + Enhanced security: + Compile with -DOSF1_ENH_SEC see iconfig.h + chown auth.auth xlock + chmod 2755 xlock + Unfortunately the following is reportedly broken since xlockmore-2.10 + and needs a patch, I heard it produces the following at runtime. +Unaligned access pid=1767 va=140489e24 pc=3ff807d9978 ra=3ff807d9880 +type=ldq +Segmentation fault (core dumped) + + Apollo (HP) + Shift-Control-Break is caught. See HP. + + CDE (DT) Common Desktop Environment. + Go to the CDE DT CONFIG SECTION of the + iconfig.h and uncomment (should be autodetected if you use configure) +XCOMM #define DtSaverLibrary + Here's what it does: + The DT screensaver is part of the dtwm window manager and what it does + is create a full-screen-sized window for each screen of your display. + This is different from other screen savers which use virtual roots. + + What the DTSAVER option does is basically call a DT routine that + returns the id's of the windows it creates for the screensaver. Then + xlockmore will use these windows to display its stuff. + + DT has a program where you can select your screensaver modes (or + screen saver programs), ala xmlock, and set your screensaver settings. + It also creates a small window where if you select a particular mode + it will run the screen saver and display it on that small window. + + Here's how to set it up on your home directory. + cp etc/dtprofile $HOME/.dtprofile + This uses a ksh syntax. If your shell is csh or other change it + accordingly. + cp etc/dtscreen.dt $HOME/.dt/types + The actions points to /usr/remote so you may want to change this. + After this you need to completely logout from your CDE session and log + back in so it will read the .dtprofile. (If you just modify the actions + in dtscreen.dt you don't need to log out; you can simply restart your + dtwm.) + Here's how to set it up on your system. + edit /usr/dt/bin/Xsession DTSCREENSAVERLIST to contain the + DTSCREENSAVERLIST stuff in etc/dtprofile + cp etc/dtscreen.dt /usr/dt/appconfig/types/C/dtscreen.dt + + The disadvantage to the above is some features of xlock are abscent, + in particular, the logout lab feature. This version of xlock does not + hava a drop in replacement for the Screen Style Manager. Here is a + work around on Solaris in 3 patches: + 1. Take out Screen option. + 2. Put in /usr/local/bin/xlock as the default locker. + 3. Turn off the default DT locking mechanism. +*** /usr/dt/app-defaults/C/Dtstyle.orig Fri Apr 12 11:53:00 1996 +--- /usr/dt/app-defaults/C/Dtstyle Thu Jul 24 09:47:34 1997 +*************** +*** 24,30 **** + !# Do not translate the following + !### + !# componentList specifies the buttons that appear in the Style Manager. +! Dtstyle*componentList: Color Font Backdrop Keyboard Mouse Beep Screen Dtwm Startup + + !# The Style Manager may be oriented vertically by commenting out this line + Dtstyle*mainRC.orientation: HORIZONTAL +--- 24,31 ---- + !# Do not translate the following + !### + !# componentList specifies the buttons that appear in the Style Manager. +! !#Dtstyle*componentList: Color Font Backdrop Keyboard Mouse Beep Screen Dtwm Startup +! Dtstyle*componentList: Color Font Backdrop Keyboard Mouse Beep Dtwm Startup + + !# The Style Manager may be oriented vertically by commenting out this line + Dtstyle*mainRC.orientation: HORIZONTAL +*** /usr/dt/appconfig/types/C/dt.dt.orig Fri Apr 12 11:53:28 1996 +--- /usr/dt/appconfig/types/C/dt.dt Thu Jul 24 11:32:21 1997 +*************** +*** 226,235 **** + ACTION LockDisplay + { + LABEL LockDisplay +! TYPE TT_MSG +! TT_CLASS TT_REQUEST +! TT_SCOPE TT_SESSION +! TT_OPERATION Display_Lock + DESCRIPTION The LockDisplay action locks the workstation. \ + You must know the user's or root password to \ + unlock the workstation. +--- 226,239 ---- + ACTION LockDisplay + { + LABEL LockDisplay +! # TYPE TT_MSG +! # TT_CLASS TT_REQUEST +! # TT_SCOPE TT_SESSION +! # TT_OPERATION Display_Lock +! TYPE COMMAND +! ARG_COUNT 0 +! WINDOW_TYPE NO_STDIO +! EXEC_STRING /usr/local/bin/xlock + DESCRIPTION The LockDisplay action locks the workstation. \ + You must know the user's or root password to \ + unlock the workstation. +*** /usr/dt/config/C/sys.resources.orig Fri Apr 12 11:53:15 1996 +--- /usr/dt/config/C/sys.resources Thu Jul 24 11:33:57 1997 +*************** +*** 82,88 **** + + + dtsession*saverTimeout: 10 +! dtsession*lockTimeout: 30 + dtsession*cycleTimeout: 3 + dtsession*saverList: StartDtscreenBlank + +--- 82,89 ---- + + + dtsession*saverTimeout: 10 +! !#dtsession*lockTimeout: 30 +! dtsession*lockTimeout: 0 + dtsession*cycleTimeout: 3 + dtsession*saverList: StartDtscreenBlank + + + DCE authentication (tested only on HP's) + See iconfig.h (xmkmf) or modes/Makefile.in (configure). + + Digital Unix + Reported that 3.2D (8bpp) password screen color map gets messed up + sometimes when in random mode as it switches from one mode to another. + + ESIX + Similar to Solaris2.x. You will need a -DSVR4 to compile. + chmod 440 /etc/shadow + if you get libX11.so.xxx not found + link with the static versions of the X libraries + chmod 2755 xlock + + FreeBSD + One may have to setuid xlock to root (are there any objections?). + Also see "XFree86" if applicable. + + HP + Shift-Control-Break is caught. This uses a library Xhp11 that may + not exist on some systems. Comment out + XHPDisableReset(dsp); + and + XHPEnableReset(dsp); + in "xlock.c" if you do not have this library. + May have to setuid xlock to root. + The optimizer may break in xlock/ . + HP's "make": + HP's "make" can not handle "+=" so if you use the iconfig.h, you + have to group all your DEFINES into one long line and use "=" + instead. GNU's "make" solves this problem. + HP-UX with Secured Passwords: + Compile with -DHPUX_SECURE_PASSWD and setuid xlock to root. + HP-UX with Passwd Etc: + Compile with -DHP_PASSWDETC . + Link with -lrgy -lnck -lndbm . + Calls to XSetScreenSaver when using CDE (i.e. not called with -dtsaver) + is not supported. This can cause a disruption in the rpc ttdbserver + system resulting in the CDE lock and exit buttons to fail, 5 to 50% + of the time. I am told this will not be fixed by HP, only documented. + The only supported method of doing this stuff is via dtstyle. + + IRIX (SGI) + OpenGL works but may be a little flaky. + + KERBEROS + See iconfig.h (xmkmf) or modes/Makefile.in (configure). + + Linux (Intel 80386, 80486, & Pentium) + If you are using elf _or_ shadow passwords: + xlock should compile with -DHAVE_SHADOW + this is already forced if you have elf so do not worry, it should + work even if you do not have shadow passwording. + If you are _not_ using elf and are using shadow passwords: + (this old version of shadowing has a _MAJOR_ known security flaw) + link with -lshadow -lgdbm + Next if using shadow passwords: + chown root.root xlock (or root.shadow if it exists) + chmod 4755 xlock + (chmod 2755 xlock may be better if shadow has group read for root group) + Also check that the following was done: + Your /usr/X11R6/lib/X11/config/linux.cf should have +#define HasShadowPasswd YES + This would let the iconfig.h work automatically for compile/link. + chown root.root /etc/shadow (or root.shadow if it exists) + chmod 400 /etc/shadow + (chmod 440 /etc/shadow may be better). + So far, Slackware (a major Linux distribution) does NOT come with shadow + passwords standard. If you want to install shadow passwords (be + careful, it can be tricky) it's on sunsite.unc.edu in + /pub/Linux/system/Admin . + Also see "XFree86" if applicable. + + Linux (Alpha) + Change the order of XLIB and XPMLIB in the iconfig.h so the XPMLIB + comes first. Intel stuff above probably applies as well. + + MesaGL and OpenGL + I assume the Mesa 3-D Graphics Library for the Imakefile. See below + on availability. Follow its instructions and then go to MesaGL + section of the iconfig.h and uncomment +XCOMM #define GLLibrary + MesaGL and sometimes OpenGL are autodetected if you use configure. + + Rplay + Audio package. See below on availability. Follow its instructions and + then go to iconfig.h and uncomment (should be autodetected if you use + configure) +XCOMM #define RplayLibrary + See config directory for example. (Note: The example files are + concerned with getting it working ... not security). + + Solaris2.x (Sun SPARC) + You could use MesaGL or OpenGL. I found a developers version of OpenGL at + http://www.sun.com/solaris/opengl/ + Solaris2.6 may not work with rplay. configure --without-rplay + If you get something like: +xlock.c:1584: `sigset_t' undeclared (first use this function) + try removing -I/usr/include from the Makefiles or get rid of -Xc + in the xlock/Makefile. If someone figures out a way around this + in the code let me know. + To get xlock working with Sun's GL libraries and includes + If you get "macro `glNormal3f' used with just one arg" ... you need + -DSUN_OGL_NO_VERTEX_MACROS + If using Imakefile, see iconfig.h . + After a make, use on a display that supports GLX `xdpyinfo | grep GLX` + Imake will compile with the -DHAVE_SHADOW switch. + With GNU's gcc, get rid of the "-ansi" during compilation, also + one may want to get rid of the -xF references in + /usr/openwin/lib/config/sun.cf and Imake.tmpl if you get a + cc: language F not recognized + Solaris2.x NIS+ or not using NIS (/etc/passwd): + If you use netgroup make sure there is a return at the end of file. + + SunOS4.1.x (Sun Sparc & 680x0) + bubble may crash the xnews server if patch 100444-76 OpenWindows V3.0 + Server patch is installed. To test this + `strings /usr/openwin/bin/xnews | grep Patch` + It would then show Patch #3000-124 if 10044-76 is installed. + Put in a link from /usr/include/X11 to your ${OPENWINHOME}/include/X11 + to use the xmkmf or use the configure file provided. + gcc -Wall gives a lot of silly warnings, its safe to disregard them. + + Ultrix (DEC) + I heard that the logout button just kills xlock. + USE_XLOCKRC feature unimplemented, but may not be hard to do. + xlock must be either setuid root or setgid authread to validate the + password on an Ultrix system. + + VMS (DEC) + You may want to set a few things like vroot, bomb, and sound (see audio + below) at the top of the file. + All you should need to do to build the executable is: + $ @make + To run xlock a symbol needs to be defined, for example: + XLOCK:==$H268SYSEXE:XLOCK + where H268SYSEXE is a logical name pointing to the directory where + XLOCK.EXE resides. The '$' after == means this is a foreign command + and VMS makes the command line available to the program. + If the link bombs out I recommend trying it again like the following: + $ @make clean + $ @make + -allowroot only works if you have SYSPRV enabled which is a bit limiting. + Unless one uses the privileged install by a system manager. To do + this, the following command needs to be executed at system startup + (i.e. included in systartup_vms.com): + INSTALL ADD {dev}:[{dir}]XLOCK.EXE/PRIV=(SYSPRV) + where {dev}:[{dir}] is the full path of the executable. + The XLock file normally in /usr/lib/X11/app-defaults needs to be in the + directory DECW$SYSTEM_DEFAULTS on VMS systems and be called + 'DECW$XLOCK.DAT'. + USE_XLOCKRC, USE_AUTO_LOGOUT, USE_BUTTON_LOGOUT, & USE_MULTIPLE_ROOT + features are not implemented. + To use audio: + Set "sound" to be 1 in the make.com file. Only available on the Alpha. + To get it work on a VAX some editing of the make.com is needed + (scan for USE_VMSPLAY) + The default sound files are hard coded to be in the current directory + see line 128 or so of the resource.c file but can be overruled from + the command line or the resourcefile decw$xlock.dat. + Sounds did not work for me on the VAX. + It should work OK on an AXP. (Due to a bug in the SO driver on some + models running VMS7.0, sounds are only available on the headset). + To use new event loop: + For VMS7.0 and higher : new event loop is used by default. + You do not need to install extra software. + For VMS6.2 or lower : + You need some UNIX utilities installed (XVMSUTILS). See where to get + it below. + Look at the make.com and xvmsutil stuff. + + XFree86 + Control-Alt-Backspace will defeat locking mechanism and return your + console back unless you put "DontZap" in your XF86Config file. + (In X11R5, that would be a "dontzap" in your Xconfig file). + Control-Alt-F1 (among others) will defeat locking mechanism with + virtual terminals. This is not too good, right? If you are using + Linux, try vlock on tsx-11.mit.edu in /pub/linux/sources/usr.bin . + The current XFree86 (as far as I know) does not have a server + extension for catching or disabling VT switching. + Here is a work around, put this line in /etc/profile: + alias x='(startx >/dev/null &);clear;logout' + then use 'x' instead of 'startx' (with no other active VT's). + + XPM + Full color pixmap package. See below on availability. Follow its + instructions and then go to iconfig.h and uncomment (should be + autodetected if you use configure) +XCOMM #define XpmLibrary + + X-Terminal + (My heart bleeds for you.) + To get xlock to run, run with -remote option or set XLock.remote on + in XLock.ad . You might have to use -allowaccess as well. + + tvtwm + One used to get following error when running xlock (+nolock) with + tvtwm. + X Error of failed request: BadWindow (invalid Window parameter) + What happens is that RootWindow(dsp, screen) fails when tvtwm is + running. There is a kludge fix, but multiscreens will not work + right with tvtwm and xlock. (grep on TVTWM in xlock.c). + Another option, don't compile with -DUSE_VROOT . If you debug it + mail ME -OR- both the author of tvtwm and ME the patch. + StickyAbove problems: + Windows in a tvtwm that have "StickyAbove" set to true are still + visible when xlock (+inroot) is running. If this bothers you, + don't compile with -DUSE_VROOT . Is it possible to have xlock + set "StickyAbove" to true as well? + + fvwm + -install does not install colormaps. fvwm will not allow an + application to install its own colormap. You could always edit the + source if you have it, (fvwm-1.24r)colormaps.c, where it says + if(ReInstall) + { + XInstallColormap(dpy,last_cmap); + } + make sure this does not happen. + + swirl (and tube) mode + Use with -install to see colormap change. + See "fvwm" if applicable. + "swirl" cycles its colors, except black and white. + This is easily seen when on a color monitor one enters: + ./xlock -mode swirl -inwindow -install + now move the mouse in the window. + If you find this annoying compile swirl.c with -DFORCEFIXEDCOLORS. + I hear it LOCKS UP on i386BsdArchitecture and tvtwm. + With twm (and fvwm see above) the colormap does not change. + + SafeWord + Edit config.h.in ... uncomment SAFEWORD line near bottom. + In modes/Makefile.in make sure SAFEWORD is linked in, comment out + similar link that does not contain safeword libraries. + Put the cust*.h files in the main xlock directory. + Use `configure; make`. + Get back to me if it works or does not work. + + Dynamic Linking + Hacked in but not currently working. + How to use elf on the sun with gcc and Gnu's make + Put this in iconfig.h +#define Modules + xmkmf -a + Edit Makefile(s) + edit out all "-z text -M mapfile" + edit out change "ccs" to "local" so that the "make" path is to + Gnu's "make". + make + make install + Also added some stuff to configure but it is working less then xmkmf. + This patch was originally written for Linux. Not all distributions + have "dlfcn.h" which is needed. It may work better on Linux. + xlock core dumps right away... gdb gives + Program received signal SIGSEGV, Segmentation fault. + 0x40002d2b in _dl_debug_state () + + +Personal Use +------------ + You may want to compile with USE_XLOCKRC . xlock will then prompt + you the first time you use it for a password. It is then encrypted + and stored in your $HOME/.xlockrc file. This is also good for + users who have an unrecognized shadow password environment. See + iconfig.h file (xmkmf) or `configure --help` for an example. + Please note that it may be rude to use xlock in a lab environment. + +Lab Environment +--------------- + The auto logout feature, when enabled, will log out a user after + 30 minutes (by default). The timeout can be changed or disabled + with a command-line option (or x resource -- this is allowed because + the logout button can always be used; see below). The time + remaining before auto-logout is displayed on the password entry + screen. + + The logout button, when enabled, is a button that appears on the + password entry screen after 5 minutes (configurable at + compile-time) that, when clicked, logs out the user. The rationale + for this thing is that in a lab environment, we wanted a way for + users to be able to reliably lock their display for short periods + of time, but still be allowed to have the display locked for longer + than that if the lab isn't busy. If the lab IS busy, and there is + a need for workstations, the logout button can be used to logout + someone who's been gone for more than 5 minutes. + + Of course, the auto-logout and the logout button are + enabled/disabled by compile-time defines. All these are OFF by + default. One can also force use these features with a local policy + of exemptions (e.g. username or group). See the iconfig.h file or + `configure --help` for an example. Edit your /etc/xlock.staff + file to reflect your policy. If using xdm, you may just want to use + -DCLOSEDOWN_LOGOUT (or -DSESSION_LOGOUT <- old way) in conjuction + with -DUSE_AUTO_LOGOUT or -DUSE_BUTTON_LOGOUT. That way all + backgrounded processes owned by a user do not have to be killed. + + Don't PANIC, the auto-logout and the logout button will not run if + you are root. Otherwise, it will kill all of root's processes, not + a good idea. As long as you do not lock the screen (using -nolock, + -inwindow, or -inroot) the policy of xlock users does not go into + effect. + + +xlock still does not work: :-( +------------------------------- + If all that does not work you may need to adjust xlock.h, passwd.c + xlock.c, and resource.c since these files are highly implementation + dependent. If you have to make this kind of change to get it working, + let me know. + + You can try compiling with -g and running it with -debug and your + favorite debugger, so xlock will run in a more friendly way (i.e. it + does not lock the screen). There are also may be compile time switches + that could be turned on with -DDEBUG depending on what is not working + correctly. + + Here is a simple recipe: + Make sure the 12th line in the iconfig.h is a comment + (This is because the debug library for xpm is not usually installed) +XCOMM #define XpmLibrary + xmkmf + edit Makefile on the line with CC = gcc or or CC = cc change to + CC = gcc -g -DDEBUG + make depend + make + gdb xlock (xdb or dbx xlock may work too.) + run -debug + where + print + (you may have to use "up" to take you to xlockmore code)> + Mail me the results. + + If xlock crashes for you when in random mode... try this and mail + me the results. (If it runs for a long time partial result will do + (gut the middle part)). + xlock -mode random -modelist all +install -debug -verbose + -modelist all: all modes except blank + -debug: so it does not lock the screen. + -verbose: for maximum verbosity. + +install: so it does not keep changing the colormap + + +Other things to try: (if you got it working :-) ) +------------------------------------------------- + + Check out etc directory for menus and other goodies. + + If you like to check out what xlock looks like on multiscreens and you + do not have them... but do have Linux and Xnest ... try: + Xnest -scrns 3 :1 & + xterm -display :1.0 + And run xlock from the created xterm. (For some reason I have to do + it as root). + If you are using MesaGL, it must be compiled without SHM extension do + to a bug in Xnest (even in XFree3.3 == X11R6.3) or you will get + "BadDrawable (invalid Pixmap or Window parameter)". + + You may want to change the 1st line of XLock.ad "random" to "blank", + "life", or whatever your favorite is and copy it to + /usr/lib/X11/app-defaults or $HOME (or wherever your application + defaults files are) and rename to XLock . + + You may want some of the modes never to come up in random. This is + already hard coded for the blank mode. See xlock man page on "modelist". + In mode.c you can hard code others by just putting the stuff that you do + not like in the LockProcs to the end of the static array and in + random.c increase NUMSPECIAL by the number of new screens that you do + not want displayed. + + You may want to move xlock into /usr/bin/X11 (or wherever your X + binaries are). You may also want to move xlock.man to + /usr/man/man1/xlock.1 . + + If you want to remove some unwanted modes just edit "mode.h" and + "mode.c" grep the for the unwanted modes. You might want to edit + the man page and your favorite make file as well. + + I am very interested in cellular automata. I am always looking to + improve ant, life, life3d, and life1d. If anyone knows any new + collections (I have lifep.zip (May 94) and xlife 3.0) let me know. If + you would like further information let me know. There are several + run-time options to check out, see docs/cell_automata. + + Still like xscreensaver better? (Obscenities omitted ;) ) Try + setting your apps-defaults file for xscreensaver like: +*programs: xlock -nolock +grabmouse -mode random + + If you want to hack a new mode check out docs/HACKERS.GUIDE. Then + when working, just mail it to me, grep on "Maintainer" for the + address. + + +Other related stuff (all not maintained by me): +-------------------------------------------------------------------- + NAME + LOCATION (last seen at) + DESCRIPTION + ============= + audio/VMS + http://axp616.gsi.de:8080/www/vms/mzsw.html + fortune + ftp://igor.girton.cam.ac.uk/pub/funny/cookie.tgz + ftp://ftp.uu.net/systems/unix/BSD/games/fortune + ftp://ftp.sterling.com/usenet/alt.sources/index (grep for cookie) + Please note that my format is slightly different. The number at the + top of the file should match `grep -c "^%%$" fortune.dat` + imake + ftp://hpux.csc.liv.ac.uk/hpux/X11/Core/imake-5.06/imake-5.06-ss-9.03.tar.gz + I had to worry about FIXUP_CPP_WHITESPACE. + Lesstif + ftp://ftp.hungry.com/pub/hungry/lesstif/lesstif-current.tar.gz + Lesstif Library (just like Motif) + Man2HTML + ftp://sunsite.unc.edu/pub/Linux/system/Manual-pagers/vh-man2html-1.4.tar.gz + MesaGL + ftp://iris.ssec.wisc.edu/pub/Mesa + Mesa 3-D Graphics Library (like GL) Mesa-2.3 or greater required. + Mesa-2.2 and below has some memory leaks. + NAS (audio package) + ftp://ftp.x.org/contrib/audio/nas + rplay (audio package) + ftp://ftp.x.org/contrib/audio/rplay + sx + Use with Athena. + ftp://sunsite.unc.edu/pub/Linux/X11/devel/librairies/clibs/libsx.tar.gz + UNIX/VMS + Unix-like routines XVMSUTILS can be found at + http://axp616.gsi.de:8080/www/vms/mzsw.html + xautolock (runs xlock after a idle time) + ftp://ftp.x.org/contrib/applications + ftp://sunsite.unc.edu/pub/Linux/X11/screensavers + (I use openwin and I put this in my $HOME/.openwin-init) + toolwait /usr/local/bin/xautolock -time 5 -locker "xlock -lockdelay 30" + XPM + ftp://ftp.x.org/contrib/libraries + color pixmaps + XPM/VMS + use the one above or xlock may bomb out, + compile with cc/standard=vaxc/define=(need_strcasecmp,need_strdup) + except when using XVMSUTILS. + xscreensaver + ftp://ftp.x.org/contrib/applications + http://www.jwz.org/xscreensaver + + +Operation: (Blurb taken from Darren Senn's xlock) +------------------------------------------------- + + Under X, run xlock. The screen will clear, and some pretty animated + picture (exactly which depends on which module is active) will appear + on the screen. If you hit a key, then the screen will clear, and + (unless you've changed the application defaults file that I packaged + with this) you'll get a black screen with some graphics in the top + center. These graphics consist of a reduced size image of the module + you were viewing, the name of the user who executed xlock, and + password prompt field, and some short instructions. + + At this point, you can either click on the graphic to return to xlock, + or you can type a password. If the password is verifiable as the + root password, or the password of the user listed above, then xlock + will terminate. THIS IS THE ONLY WAY TO STOP XLOCK WITHOUT SHUTTING + DOWN THE X SERVER. That's what makes it a lock. + + +Resources: (Also taken from Darren Senn's xlock) +------------------------------------------------ + + There are two sets of resources for XLock. The first set are (what I + call) global XLock resources, while the second set consists of + module-specific resources. + + The global resources are: + XLock.mode: This sets the module. + XLock.font: This is the font used on the password entry screen. + XLock.background: The background color for the password entry screen. + XLock.foreground: The foreground color for the password entry screen. + XLock.username: The label for the field indicating the user name. + XLock.password: The label for the password prompt. + XLock.info: The "short instructions" to print. + XLock.validate: A message to display while checking the password + XLock.invalid: A message to display if the password is incorrect + XLock.nice: How much XLock should nice itself. + XLock.timeout: How long to wait idle at the password prompt. + XLock.timeelapsed: Message to see how long lock running (yes or no) + XLock.mono: Monochrome mode (yes or no) + XLock.nolock: disable the lock mechanism (yes or no) + XLock.remote: allow remote locking (meaningless under linux) + XLock.allowroot: allow the root password to unlock (yes or no) + XLock.enablesaver: allow the system screensaver to work (yes or no) + XLock.allowaccess: allow other clients to connect while active + XLock.echokeys: Echo "?" for each password keypress (yes or no) + XLock.usefirst: Ignore the first character typed (yes or no) + XLock.verbose: Verbose mode. (yes or no) + XLock.inwindow: allow the xlock to run in a window (yes or no) + XLock.inroot: allow the xlock to run in the root window (yes or no) + XLock.grabmouse: Grab the keyboard and mouse (yes or no) + + XLock has a number of modules which it can display. (See the man page + for a complete list). It turns out that each module is characterized + by a number of initializations, separated by a number of "draws". + Each module has the following resources defined: + + XLock..delay: How long to wait between draws (usec) + XLock..batchcount: May mean various things (see man page). + XLock..cycles: Controls the timeout of screen (see man page). + XLock..size: Controls size of objects on screen (see man page). + XLock..saturation: Saturation (as in HSV) of colors to use. + + +Acknowledgments: +---------------- + + I did not write the original algorithms in any of the lock screens + (except wator, bug, life1d, demon, ant, daisy, and voters), although I + did convert many of the new ones to run with xlock. I tried to follow + the original style of Patrick Naughton. Updates are made at + ftp.x.org in directory /contrib/applications. Many of the additions + were "borrowed" from xscreensaver (Jamie Zawinski ). + Some of the others were "borrowed" from old demos from Sun. Many more + are contributions. + + I will consider putting new ones in if (1) they are more or less public + domain (i.e. BSD, sorry no GNU copyrights), (2) they are neat (I am + biased towards mathematically based programs (especially the Computer + Recreations of Scientific American)), and (3) I have the time. + + Also many thanks to the people that helped me countless times with + xlock mentioned in "Revisions", especially Jouk Jansen, Tom Schmidt, + David Hansen, Ed Mackey, Marcelo Vianna, Ron Hitchens, and Heath Kehoe. + diff --git a/bitmaps/bad.xbm b/bitmaps/bad.xbm new file mode 100644 index 00000000..a778f5e0 --- /dev/null +++ b/bitmaps/bad.xbm @@ -0,0 +1,9 @@ +#define bad_width 21 +#define bad_height 21 +static unsigned char bad_bits[] = { + 0x80, 0x1f, 0x00, 0x60, 0x60, 0x00, 0x10, 0x80, 0x00, 0x08, 0x00, 0x01, + 0x04, 0x00, 0x02, 0x82, 0x10, 0x04, 0x42, 0x29, 0x04, 0x81, 0x10, 0x08, + 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, + 0xe1, 0x7f, 0x08, 0xe2, 0x7f, 0x04, 0x02, 0x00, 0x04, 0x04, 0x00, 0x02, + 0x08, 0x00, 0x01, 0x10, 0x80, 0x00, 0x60, 0x60, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x00, 0x00}; diff --git a/bitmaps/bat-0.xbm b/bitmaps/bat-0.xbm new file mode 100644 index 00000000..f73886e7 --- /dev/null +++ b/bitmaps/bat-0.xbm @@ -0,0 +1,174 @@ +#define bat0_width 147 +#define bat0_height 108 +static unsigned char bat0_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x11, 0x7e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x03, 0xfd, 0x7f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xb6, + 0xcf, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x76, 0xa7, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0xc6, 0xb7, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0xdd, 0x86, 0x61, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0xf8, 0x7f, 0x8c, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x70, 0xfe, + 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x01, 0x06, 0xf0, 0xfe, 0x0c, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, + 0x60, 0x0e, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x70, 0x0e, 0x18, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x80, 0x06, 0x60, 0x06, 0x90, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xe0, 0x07, 0x70, 0x07, 0x30, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x60, 0x0e, 0x30, 0x05, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x20, 0x00, 0x30, + 0x05, 0x30, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x30, 0x05, 0x30, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, + 0x00, 0x30, 0x05, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x30, 0x07, 0x10, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x30, 0x00, 0xb0, 0x02, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x10, 0x00, 0xb0, 0x02, + 0x0e, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x10, 0x00, 0xb8, 0x02, 0x0f, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, + 0x98, 0x02, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x98, 0x03, 0x06, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x30, 0x00, 0x98, 0x03, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x98, 0x01, 0x04, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x20, 0x00, 0x98, 0x01, 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x20, 0x00, 0x98, + 0x01, 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0xc8, 0x01, 0x0c, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, + 0x00, 0xc0, 0x00, 0x0c, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0x00, 0x00, 0x00, 0x04, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc6, 0xdf, 0x00, 0x00, 0x00, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0xf8, 0x00, 0x00, 0x00, + 0x06, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x76, 0xe0, 0x01, 0x00, 0x00, 0x06, 0xa0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0xc0, 0x01, + 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x80, 0x03, 0x00, 0x00, 0x02, 0xa0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, + 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x07, 0x00, 0x00, 0x03, + 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x80, 0x01, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, + 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xa0, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xbc, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, + 0x00, 0xf8, 0x7f, 0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x00, 0x00, 0x38, 0xe8, 0x43, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x00, 0x00, 0x00, 0x00, + 0xac, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x04, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x80, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x80, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, + 0x00, 0x00, 0x00, 0x8f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bat-1.xbm b/bitmaps/bat-1.xbm new file mode 100644 index 00000000..5c421d1d --- /dev/null +++ b/bitmaps/bat-1.xbm @@ -0,0 +1,174 @@ +#define bat1_width 147 +#define bat1_height 108 +static unsigned char bat1_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0a, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7c, 0xce, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xdf, + 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0xc3, 0xff, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, + 0x80, 0x81, 0xbf, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x80, 0x18, 0xcf, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x90, 0x09, 0x07, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x1c, 0x83, 0x1f, + 0xe2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x06, 0xfe, 0x03, 0x03, 0x0e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x03, + 0xa0, 0xff, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, 0x00, 0x90, 0x7d, 0x00, 0x80, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0xc0, 0x00, 0x90, 0x0d, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x88, 0x05, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x88, 0x85, 0x07, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xc8, + 0x62, 0x1c, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x84, 0x12, 0x30, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x32, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0xa4, 0x03, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xe4, 0x01, 0x80, 0x01, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x7c, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x54, 0x01, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x04, 0x00, 0xd2, 0x00, + 0x00, 0x06, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, + 0x07, 0xf0, 0x03, 0x06, 0x00, 0xda, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x1c, 0xbc, 0x2f, 0x02, 0x00, + 0x68, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x8c, + 0x00, 0x00, 0x70, 0x0c, 0x18, 0x02, 0x00, 0x6d, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0xc0, 0x06, 0x10, + 0x03, 0x00, 0x65, 0x00, 0x00, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x0e, 0x00, 0x80, 0x03, 0x30, 0x02, 0x00, 0x35, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x30, 0x00, 0x80, + 0x03, 0x20, 0x03, 0x80, 0x32, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0x03, 0x80, 0x3a, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x03, 0x60, 0x01, 0x80, 0x1b, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x60, 0x01, + 0x80, 0x19, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x80, 0x19, 0x00, 0x80, 0x03, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x01, 0xc0, 0x0c, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x0c, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0xf8, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x0c, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x1f, + 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, + 0x04, 0x00, 0xe0, 0x00, 0x00, 0xe0, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x06, 0x00, 0x80, 0x03, 0x00, + 0x18, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x03, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x60, 0x00, 0x00, 0xf0, 0x67, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x00, + 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x0c, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x33, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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/bitmaps/bat-2.xbm b/bitmaps/bat-2.xbm new file mode 100644 index 00000000..c1ff4b42 --- /dev/null +++ b/bitmaps/bat-2.xbm @@ -0,0 +1,174 @@ +#define bat2_width 147 +#define bat2_height 108 +static unsigned char bat2_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfc, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0xf6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xc3, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, + 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x8e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x58, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x81, + 0x01, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x20, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x02, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x38, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x00, 0xe0, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, + 0x01, 0x00, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x0f, 0x60, 0xf2, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0xfc, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xff, + 0xdf, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xc0, 0x8f, 0xff, + 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf7, 0x0f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x23, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x73, 0x38, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0xb3, 0x0f, 0x06, 0xd0, 0xaf, 0xa0, 0x0d, 0x00, 0x0e, 0x1a, 0x02, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x80, 0xc3, 0x2d, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x03, 0x1b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x80, 0xff, 0x7c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x1b, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xc0, 0x7c, 0xfc, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0xc0, 0x70, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xc0, 0x30, + 0x1c, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x00, 0x00, 0xc0, 0x30, 0x1c, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0xfc, 0x31, 0x14, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xfe, 0x33, 0x1c, 0x00, 0x1c, + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x83, 0x37, 0x0c, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x81, 0x2f, 0x0c, + 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x01, 0x2a, 0x0e, 0x00, 0x30, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7e, 0x80, 0x01, + 0x20, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0xfe, 0x83, 0x01, 0x28, 0x0c, 0x00, 0x30, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, + 0x8f, 0x01, 0x28, 0x0e, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xb8, 0x01, 0x38, 0x0e, 0x00, + 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x00, 0xf0, 0x01, 0x18, 0x0e, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x30, + 0x06, 0x00, 0xfe, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x80, 0x01, 0x18, 0x06, 0xc0, 0x3f, 0xfe, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x80, + 0x01, 0x18, 0x06, 0xc0, 0x01, 0xc0, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x03, 0x18, 0x0e, 0x80, 0x00, + 0x00, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x03, 0x18, 0x06, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x06, + 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x30, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x0c, 0x06, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x07, 0x00, 0x00, 0x00, + 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x0c, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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/bitmaps/bat-3.xbm b/bitmaps/bat-3.xbm new file mode 100644 index 00000000..bfe7265e --- /dev/null +++ b/bitmaps/bat-3.xbm @@ -0,0 +1,174 @@ +#define bat3_width 147 +#define bat3_height 108 +static unsigned char bat3_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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x66, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x87, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x27, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x34, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xdc, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x34, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x9c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x64, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x14, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x70, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x81, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x00, 0x80, 0x00, 0x00, + 0x80, 0x00, 0x89, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x03, 0x70, 0x01, 0x00, 0x40, 0x00, 0x09, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0xc0, + 0x01, 0x00, 0x20, 0x80, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x1c, 0x80, 0x01, 0x00, 0x18, 0x80, 0x10, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x70, 0x00, 0x01, 0x02, 0x0c, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x03, 0x03, 0x02, + 0x40, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x80, 0x03, 0xe2, 0x03, 0x01, 0x00, 0x40, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0xf3, + 0xc0, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x40, 0x00, 0x00, 0xf0, 0xff, 0x60, 0x00, 0xa0, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0xf8, 0xbf, 0x19, 0x00, 0x20, 0x00, 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x70, 0x0c, 0x8f, 0x05, 0x00, 0x90, + 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0xfc, 0x6f, 0x9a, 0x01, 0x00, 0x10, 0x00, 0x08, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x6c, 0x93, 0x01, + 0x00, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x06, 0xf8, 0xc7, 0x00, 0x00, 0x08, 0x00, 0x40, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0xf8, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0xf0, 0x9e, 0x1f, 0x00, 0x44, 0x00, + 0x00, 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe0, + 0x06, 0x50, 0x1e, 0x38, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xf8, 0x07, 0x50, 0x0a, 0x60, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x4c, 0x07, 0x50, 0x0a, 0xc0, 0x00, 0x41, 0x00, 0x00, 0xfc, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x79, 0x00, 0x04, 0x0e, 0x50, 0x0a, + 0x80, 0x00, 0x00, 0x00, 0x80, 0x17, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xff, 0x01, 0x06, 0x00, 0x58, 0x0a, 0x80, 0x81, 0x40, 0x00, 0xe0, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x03, 0x06, 0x00, + 0x50, 0x0a, 0x00, 0x81, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x06, 0x03, 0x00, 0x70, 0x0a, 0x00, 0x43, 0x00, + 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x03, 0x00, 0x28, 0x0a, 0x00, 0x23, 0x20, 0x80, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x38, 0x0e, 0x00, + 0x23, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x01, 0x00, 0x28, 0x06, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x38, + 0x06, 0x00, 0x03, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x38, 0x06, 0x00, 0x03, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, + 0x00, 0x38, 0x06, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x38, 0x06, 0x00, 0x01, + 0x10, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x18, 0x07, 0x80, 0xff, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x07, + 0x00, 0xc3, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x03, 0x00, 0x00, 0xd1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x18, 0x03, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x03, 0x00, 0x00, 0x66, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x18, 0x03, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x03, 0x00, + 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x08, 0x03, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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/bitmaps/bat-4.xbm b/bitmaps/bat-4.xbm new file mode 100644 index 00000000..f8de0331 --- /dev/null +++ b/bitmaps/bat-4.xbm @@ -0,0 +1,174 @@ +#define bat4_width 147 +#define bat4_height 108 +static unsigned char bat4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc1, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x31, + 0x8c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x98, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x0c, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x9c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x83, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x83, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, + 0xc1, 0xc4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x41, 0x84, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x83, 0x80, 0x06, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x80, 0x04, 0x36, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x41, 0x80, 0x04, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x80, + 0x05, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x05, 0x90, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x30, 0x00, 0x08, 0x10, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x00, 0x00, 0x30, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x10, 0x00, 0x00, 0x20, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, + 0x60, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x40, 0x00, 0x1e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0c, + 0x00, 0x00, 0xc0, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x0c, 0x00, 0x00, 0x80, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x0c, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x18, 0x00, 0x00, 0xc0, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0xff, 0x07, 0x00, 0x18, 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x1e, 0x00, 0x10, 0x00, + 0x00, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x00, 0x70, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x30, 0xc0, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0xa0, 0x01, 0x10, 0x02, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x20, 0x00, 0x01, 0x19, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x00, 0x81, + 0x0b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0xc2, 0x0d, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xc0, + 0x00, 0xf2, 0x06, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0xe1, 0x7f, 0x03, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xb3, 0xff, 0x01, 0xe0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x3e, 0xff, 0x38, + 0xfd, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x6c, 0x87, 0xff, 0x0f, 0x3e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, + 0x97, 0x83, 0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0xbb, 0x80, 0x03, 0x70, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0xc0, 0x99, 0xe7, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0xf0, 0x7f, 0x00, 0x00, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x18, 0xe0, 0x1c, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, 0xa0, 0x1c, + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x0c, 0xe0, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, + 0xc0, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1f, 0xc0, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0x1f, 0xc0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0xc0, 0x14, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x30, 0xc0, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0xc0, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x14, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0xc0, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xc0, 0x1c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x80, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x80, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x80, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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/bitmaps/bounce-0.xbm b/bitmaps/bounce-0.xbm new file mode 100644 index 00000000..b20b4042 --- /dev/null +++ b/bitmaps/bounce-0.xbm @@ -0,0 +1,46 @@ +#define bounce0_width 64 +#define bounce0_height 64 +static unsigned char bounce0_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 0x1e, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0x7f, 0xfe, 0x31, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x7f, + 0xfe, 0xcf, 0x00, 0x00, 0x00, 0x80, 0xfc, 0x7f, 0xfe, 0x3f, 0x01, 0x00, + 0x00, 0x60, 0xff, 0x3f, 0xfc, 0xff, 0x06, 0x00, 0x00, 0x90, 0xff, 0x1f, + 0xf8, 0xff, 0x09, 0x00, 0x00, 0xc8, 0xff, 0x07, 0xe0, 0xff, 0x13, 0x00, + 0x00, 0xe4, 0xff, 0x03, 0xc0, 0xff, 0x27, 0x00, 0x00, 0xf2, 0xff, 0x01, + 0x80, 0xff, 0x4f, 0x00, 0x00, 0xe1, 0x7f, 0x00, 0x00, 0xfe, 0x87, 0x00, + 0x80, 0xc0, 0x1f, 0x00, 0x00, 0xf8, 0x03, 0x01, 0x40, 0x80, 0x01, 0x00, + 0x00, 0x80, 0x01, 0x02, 0x40, 0x00, 0x78, 0x00, 0x00, 0x1e, 0x00, 0x02, + 0x20, 0x80, 0x7f, 0x00, 0x00, 0xfe, 0x01, 0x04, 0x10, 0xc0, 0xff, 0x00, + 0x00, 0xff, 0x03, 0x08, 0x10, 0xe0, 0xff, 0x00, 0x00, 0xff, 0x07, 0x08, + 0x08, 0xe0, 0xff, 0x00, 0x00, 0xff, 0x07, 0x10, 0x08, 0xf0, 0xff, 0x01, + 0x80, 0xff, 0x0f, 0x10, 0x04, 0xf0, 0xff, 0x01, 0x80, 0xff, 0x0f, 0x20, + 0x04, 0xf8, 0xff, 0x03, 0xc0, 0xff, 0x1f, 0x20, 0x04, 0xf8, 0xff, 0x03, + 0xc0, 0xff, 0x1f, 0x20, 0x02, 0xfc, 0xff, 0xf9, 0x9f, 0xff, 0x3f, 0x40, + 0x02, 0xfc, 0xff, 0xfc, 0x3f, 0xff, 0x3f, 0x40, 0xfa, 0xfc, 0xff, 0xfe, + 0x7f, 0xff, 0x3f, 0x5f, 0xfa, 0xfc, 0x7f, 0xfe, 0x7f, 0xfe, 0x3f, 0x5f, + 0xfd, 0xfd, 0x7f, 0xff, 0xff, 0xfe, 0xbf, 0xbf, 0xfd, 0xf9, 0x3f, 0xff, + 0xff, 0xfc, 0x9f, 0xbf, 0xfd, 0xf9, 0xbf, 0xff, 0xff, 0xfd, 0x9f, 0xbf, + 0xfd, 0xfb, 0x9f, 0xff, 0xff, 0xf9, 0xdf, 0xbf, 0xfd, 0xfb, 0x9f, 0xff, + 0xff, 0xf9, 0xdf, 0xbf, 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, + 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0x03, 0xc0, 0xff, + 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xbf, + 0xfd, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xbf, 0xfa, 0x03, 0x80, 0xff, + 0xff, 0x01, 0xc0, 0x5f, 0xfa, 0x03, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x5f, + 0xfa, 0x03, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x5f, 0xfa, 0x03, 0x00, 0xfe, + 0x7f, 0x00, 0xc0, 0x5f, 0xf4, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0x2f, + 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, 0xf4, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x2f, 0xe8, 0x01, 0x00, 0xfc, 0x3f, 0x00, 0x80, 0x17, + 0xe8, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0x17, 0xd0, 0x00, 0x00, 0xff, + 0xff, 0x00, 0x00, 0x0b, 0x10, 0x3e, 0x80, 0xff, 0xff, 0x01, 0x7c, 0x08, + 0x20, 0xff, 0x81, 0xff, 0xff, 0x81, 0xff, 0x04, 0x40, 0xff, 0xcf, 0xff, + 0xff, 0xf3, 0xff, 0x02, 0x40, 0xfe, 0xcf, 0xff, 0xff, 0xf3, 0x7f, 0x02, + 0x80, 0xfe, 0x9f, 0xff, 0xff, 0xf9, 0x7f, 0x01, 0x00, 0xfd, 0x3f, 0xff, + 0xff, 0xfc, 0xbf, 0x00, 0x00, 0xfa, 0x7f, 0xfe, 0x7f, 0xfe, 0x5f, 0x00, + 0x00, 0xf4, 0x7f, 0xfe, 0x7f, 0xfe, 0x2f, 0x00, 0x00, 0xc8, 0xff, 0xfc, + 0x3f, 0xff, 0x13, 0x00, 0x00, 0x90, 0xff, 0x01, 0x80, 0xff, 0x09, 0x00, + 0x00, 0x60, 0xff, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00, 0x80, 0xfc, 0x00, + 0x00, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0xce, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-1.xbm b/bitmaps/bounce-1.xbm new file mode 100644 index 00000000..1a0ff300 --- /dev/null +++ b/bitmaps/bounce-1.xbm @@ -0,0 +1,46 @@ +#define bounce1_width 64 +#define bounce1_height 64 +static unsigned char bounce1_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0x1f, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0xff, 0x7f, 0x30, 0x00, 0x00, 0x00, 0x00, 0xf3, 0xff, + 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xfc, 0xff, 0x7f, 0x00, 0x01, 0x00, + 0x00, 0x60, 0xfe, 0xff, 0x7f, 0x00, 0x06, 0x00, 0x00, 0x10, 0xfe, 0xff, + 0x7f, 0x00, 0x08, 0x00, 0x00, 0xc8, 0xfc, 0xff, 0x1f, 0x00, 0x10, 0x00, + 0x00, 0xf4, 0x81, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0xfa, 0x01, 0x00, + 0xf0, 0x01, 0x40, 0x00, 0x00, 0xfd, 0x01, 0x00, 0xff, 0x07, 0x80, 0x00, + 0x80, 0xfe, 0x01, 0x00, 0xff, 0x1f, 0x20, 0x01, 0x40, 0xfe, 0x01, 0x00, + 0xff, 0x7f, 0x70, 0x02, 0x40, 0xff, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x02, + 0xa0, 0xff, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x05, 0xd0, 0xff, 0x00, 0x00, + 0xff, 0xff, 0xfd, 0x0b, 0xd0, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x0b, + 0xe8, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x17, 0xe8, 0x7f, 0x00, 0x00, + 0xff, 0xff, 0xfb, 0x17, 0xf4, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x2f, + 0xf4, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0xf3, 0x2f, 0xf4, 0x67, 0x00, 0xe0, + 0xf0, 0xff, 0xf3, 0x2f, 0xe2, 0xf1, 0x01, 0xfc, 0xc7, 0xff, 0xe0, 0x5f, + 0x82, 0xf8, 0x03, 0xff, 0x1f, 0x1f, 0xe0, 0x5f, 0x02, 0xfe, 0xc7, 0xff, + 0x7f, 0x06, 0xc0, 0x5f, 0x02, 0xff, 0xcf, 0xff, 0xff, 0x00, 0x80, 0x5f, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbf, 0x01, 0xff, 0xcf, 0xff, + 0xff, 0x01, 0x00, 0xbf, 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbe, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbc, 0x01, 0xff, 0xcf, 0xff, + 0xff, 0x01, 0x00, 0x80, 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0x80, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbc, 0x01, 0xff, 0xcf, 0xff, + 0xff, 0x01, 0x00, 0xbe, 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbf, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbf, 0x02, 0xff, 0xcf, 0xff, + 0xff, 0x00, 0x80, 0x5f, 0x02, 0xfe, 0xc7, 0xff, 0x7f, 0x06, 0xc0, 0x5f, + 0x82, 0xf8, 0x03, 0xff, 0x1f, 0x1f, 0xe0, 0x5f, 0xe2, 0xf1, 0x01, 0xfc, + 0xc7, 0xff, 0xe0, 0x5f, 0xf4, 0x67, 0x00, 0xe0, 0xf0, 0xff, 0xf3, 0x2f, + 0xf4, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0xf3, 0x2f, 0xf4, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0xfb, 0x2f, 0xe8, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x17, + 0xe8, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x17, 0xd0, 0x7f, 0x00, 0x00, + 0xff, 0xff, 0xf9, 0x0b, 0xd0, 0xff, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x0b, + 0xa0, 0xff, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x05, 0x40, 0xff, 0x00, 0x00, + 0xff, 0xff, 0xf8, 0x02, 0x40, 0xfe, 0x01, 0x00, 0xff, 0x7f, 0x70, 0x02, + 0x80, 0xfe, 0x01, 0x00, 0xff, 0x1f, 0x20, 0x01, 0x00, 0xfd, 0x01, 0x00, + 0xff, 0x07, 0x80, 0x00, 0x00, 0xfa, 0x01, 0x00, 0xf0, 0x01, 0x40, 0x00, + 0x00, 0xf4, 0x81, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0xc8, 0xfc, 0xff, + 0x1f, 0x00, 0x10, 0x00, 0x00, 0x10, 0xfe, 0xff, 0x7f, 0x00, 0x08, 0x00, + 0x00, 0x60, 0xfe, 0xff, 0x7f, 0x00, 0x06, 0x00, 0x00, 0x80, 0xfc, 0xff, + 0x7f, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x7f, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0xff, 0x7f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, + 0x1f, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-2.xbm b/bitmaps/bounce-2.xbm new file mode 100644 index 00000000..9af0c72b --- /dev/null +++ b/bitmaps/bounce-2.xbm @@ -0,0 +1,46 @@ +#define bounce2_width 64 +#define bounce2_height 64 +static unsigned char bounce2_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, + 0x00, 0xce, 0x00, 0x00, 0x00, 0x80, 0xfc, 0x00, 0x00, 0x3f, 0x01, 0x00, + 0x00, 0x60, 0xff, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00, 0x90, 0xff, 0x01, + 0x80, 0xff, 0x09, 0x00, 0x00, 0xc8, 0xff, 0xfc, 0x3f, 0xff, 0x13, 0x00, + 0x00, 0xf4, 0x7f, 0xfe, 0x7f, 0xfe, 0x2f, 0x00, 0x00, 0xfa, 0x7f, 0xfe, + 0x7f, 0xfe, 0x5f, 0x00, 0x00, 0xfd, 0x3f, 0xff, 0xff, 0xfc, 0xbf, 0x00, + 0x80, 0xfe, 0x9f, 0xff, 0xff, 0xf9, 0x7f, 0x01, 0x40, 0xfe, 0xcf, 0xff, + 0xff, 0xf3, 0x7f, 0x02, 0x40, 0xff, 0xcf, 0xff, 0xff, 0xf3, 0xff, 0x02, + 0x20, 0xff, 0x81, 0xff, 0xff, 0x81, 0xff, 0x04, 0x10, 0x3e, 0x80, 0xff, + 0xff, 0x01, 0x7c, 0x08, 0xd0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x0b, + 0xe8, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0x17, 0xe8, 0x01, 0x00, 0xfc, + 0x3f, 0x00, 0x80, 0x17, 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, + 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, 0xf4, 0x01, 0x00, 0xfe, + 0x7f, 0x00, 0x80, 0x2f, 0xfa, 0x03, 0x00, 0xfe, 0x7f, 0x00, 0xc0, 0x5f, + 0xfa, 0x03, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x5f, 0xfa, 0x03, 0x00, 0xff, + 0xff, 0x00, 0xc0, 0x5f, 0xfa, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0x5f, + 0xfd, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xbf, 0xfd, 0x03, 0x80, 0xff, + 0xff, 0x01, 0xc0, 0xbf, 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, + 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0x03, 0xc0, 0xff, + 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0xfb, 0x9f, 0xff, 0xff, 0xf9, 0xdf, 0xbf, + 0xfd, 0xfb, 0x9f, 0xff, 0xff, 0xf9, 0xdf, 0xbf, 0xfd, 0xf9, 0xbf, 0xff, + 0xff, 0xfd, 0x9f, 0xbf, 0xfd, 0xf9, 0x3f, 0xff, 0xff, 0xfc, 0x9f, 0xbf, + 0xfd, 0xfd, 0x7f, 0xff, 0xff, 0xfe, 0xbf, 0xbf, 0xfa, 0xfc, 0x7f, 0xfe, + 0x7f, 0xfe, 0x3f, 0x5f, 0xfa, 0xfc, 0xff, 0xfe, 0x7f, 0xff, 0x3f, 0x5f, + 0x02, 0xfc, 0xff, 0xfc, 0x3f, 0xff, 0x3f, 0x40, 0x02, 0xfc, 0xff, 0xf9, + 0x9f, 0xff, 0x3f, 0x40, 0x04, 0xf8, 0xff, 0x03, 0xc0, 0xff, 0x1f, 0x20, + 0x04, 0xf8, 0xff, 0x03, 0xc0, 0xff, 0x1f, 0x20, 0x04, 0xf0, 0xff, 0x01, + 0x80, 0xff, 0x0f, 0x20, 0x08, 0xf0, 0xff, 0x01, 0x80, 0xff, 0x0f, 0x10, + 0x08, 0xe0, 0xff, 0x00, 0x00, 0xff, 0x07, 0x10, 0x10, 0xe0, 0xff, 0x00, + 0x00, 0xff, 0x07, 0x08, 0x10, 0xc0, 0xff, 0x00, 0x00, 0xff, 0x03, 0x08, + 0x20, 0x80, 0x7f, 0x00, 0x00, 0xfe, 0x01, 0x04, 0x40, 0x00, 0x78, 0x00, + 0x00, 0x1e, 0x00, 0x02, 0x40, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x02, + 0x80, 0xc0, 0x1f, 0x00, 0x00, 0xf8, 0x03, 0x01, 0x00, 0xe1, 0x7f, 0x00, + 0x00, 0xfe, 0x87, 0x00, 0x00, 0xf2, 0xff, 0x01, 0x80, 0xff, 0x4f, 0x00, + 0x00, 0xe4, 0xff, 0x03, 0xc0, 0xff, 0x27, 0x00, 0x00, 0xc8, 0xff, 0x07, + 0xe0, 0xff, 0x13, 0x00, 0x00, 0x90, 0xff, 0x1f, 0xf8, 0xff, 0x09, 0x00, + 0x00, 0x60, 0xff, 0x3f, 0xfc, 0xff, 0x06, 0x00, 0x00, 0x80, 0xfc, 0x7f, + 0xfe, 0x3f, 0x01, 0x00, 0x00, 0x00, 0xf3, 0x7f, 0xfe, 0xcf, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0x7f, 0xfe, 0x31, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, + 0x1e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-3.xbm b/bitmaps/bounce-3.xbm new file mode 100644 index 00000000..59c0c7a7 --- /dev/null +++ b/bitmaps/bounce-3.xbm @@ -0,0 +1,46 @@ +#define bounce3_width 64 +#define bounce3_height 64 +static unsigned char bounce3_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0x1f, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0xfe, 0xff, 0x31, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, + 0xff, 0xcf, 0x00, 0x00, 0x00, 0x80, 0x00, 0xfe, 0xff, 0x3f, 0x01, 0x00, + 0x00, 0x60, 0x00, 0xfe, 0xff, 0x7f, 0x06, 0x00, 0x00, 0x10, 0x00, 0xfe, + 0xff, 0x7f, 0x08, 0x00, 0x00, 0x08, 0x00, 0xf8, 0xff, 0x3f, 0x13, 0x00, + 0x00, 0x04, 0x00, 0xc0, 0xff, 0x81, 0x2f, 0x00, 0x00, 0x02, 0x80, 0x0f, + 0x00, 0x80, 0x5f, 0x00, 0x00, 0x01, 0xe0, 0xff, 0x00, 0x80, 0xbf, 0x00, + 0x80, 0x04, 0xf8, 0xff, 0x00, 0x80, 0x7f, 0x01, 0x40, 0x0e, 0xfe, 0xff, + 0x00, 0x80, 0x7f, 0x02, 0x40, 0x1f, 0xff, 0xff, 0x00, 0x00, 0xff, 0x02, + 0xa0, 0xbf, 0xff, 0xff, 0x00, 0x00, 0xff, 0x05, 0xd0, 0xbf, 0xff, 0xff, + 0x00, 0x00, 0xff, 0x0b, 0xd0, 0x9f, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x0b, + 0xe8, 0x9f, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x17, 0xe8, 0xdf, 0xff, 0xff, + 0x00, 0x00, 0xfe, 0x17, 0xf4, 0xdf, 0xff, 0xff, 0x00, 0x00, 0xf8, 0x2f, + 0xf4, 0xcf, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0x2f, 0xf4, 0xcf, 0xff, 0x0f, + 0x07, 0x00, 0xe6, 0x2f, 0xfa, 0x07, 0xff, 0xe3, 0x3f, 0x80, 0x8f, 0x47, + 0xfa, 0x07, 0xf8, 0xf8, 0xff, 0xc0, 0x1f, 0x41, 0xfa, 0x03, 0x60, 0xfe, + 0xff, 0xe3, 0x7f, 0x40, 0xfa, 0x01, 0x00, 0xff, 0xff, 0xf3, 0xff, 0x40, + 0xfd, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0xfd, 0x00, 0x80, 0xff, + 0xff, 0xf3, 0xff, 0x80, 0x7d, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, + 0x3d, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0x01, 0x00, 0x80, 0xff, + 0xff, 0xf3, 0xff, 0x80, 0x01, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, + 0x3d, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0x7d, 0x00, 0x80, 0xff, + 0xff, 0xf3, 0xff, 0x80, 0xfd, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, + 0xfd, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0xfa, 0x01, 0x00, 0xff, + 0xff, 0xf3, 0xff, 0x40, 0xfa, 0x03, 0x60, 0xfe, 0xff, 0xe3, 0x7f, 0x40, + 0xfa, 0x07, 0xf8, 0xf8, 0xff, 0xc0, 0x1f, 0x41, 0xfa, 0x07, 0xff, 0xe3, + 0x3f, 0x80, 0x8f, 0x47, 0xf4, 0xcf, 0xff, 0x0f, 0x07, 0x00, 0xe6, 0x2f, + 0xf4, 0xcf, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0x2f, 0xf4, 0xdf, 0xff, 0xff, + 0x00, 0x00, 0xf8, 0x2f, 0xe8, 0xdf, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x17, + 0xe8, 0x9f, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x17, 0xd0, 0x9f, 0xff, 0xff, + 0x00, 0x00, 0xfe, 0x0b, 0xd0, 0xbf, 0xff, 0xff, 0x00, 0x00, 0xff, 0x0b, + 0xa0, 0xbf, 0xff, 0xff, 0x00, 0x00, 0xff, 0x05, 0x40, 0x1f, 0xff, 0xff, + 0x00, 0x00, 0xff, 0x02, 0x40, 0x0e, 0xfe, 0xff, 0x00, 0x80, 0x7f, 0x02, + 0x80, 0x04, 0xf8, 0xff, 0x00, 0x80, 0x7f, 0x01, 0x00, 0x01, 0xe0, 0xff, + 0x00, 0x80, 0xbf, 0x00, 0x00, 0x02, 0x80, 0x0f, 0x00, 0x80, 0x5f, 0x00, + 0x00, 0x04, 0x00, 0xc0, 0xff, 0x81, 0x2f, 0x00, 0x00, 0x08, 0x00, 0xf8, + 0xff, 0x3f, 0x13, 0x00, 0x00, 0x10, 0x00, 0xfe, 0xff, 0x7f, 0x08, 0x00, + 0x00, 0x60, 0x00, 0xfe, 0xff, 0x7f, 0x06, 0x00, 0x00, 0x80, 0x00, 0xfe, + 0xff, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xcf, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0xfe, 0xff, 0x31, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, + 0x1f, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-mask.xbm b/bitmaps/bounce-mask.xbm new file mode 100644 index 00000000..73996f0a --- /dev/null +++ b/bitmaps/bounce-mask.xbm @@ -0,0 +1,46 @@ +#define bouncemask_width 64 +#define bouncemask_height 64 +static unsigned char bouncemask_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0xff, 0xff, + 0xff, 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, + 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x80, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/cooperat.xbm b/bitmaps/cooperat.xbm new file mode 100644 index 00000000..6f15e159 --- /dev/null +++ b/bitmaps/cooperat.xbm @@ -0,0 +1,9 @@ +#define cooperat_width 21 +#define cooperat_height 21 +static unsigned char cooperat_bits[] = { + 0x80, 0x1f, 0x00, 0x60, 0x60, 0x00, 0x10, 0x80, 0x00, 0x08, 0x00, 0x01, + 0x04, 0x00, 0x02, 0xc2, 0x30, 0x04, 0xc2, 0x30, 0x04, 0x01, 0x00, 0x08, + 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x21, 0x40, 0x08, 0x21, 0x40, 0x08, + 0x41, 0x20, 0x08, 0x82, 0x10, 0x04, 0x02, 0x0f, 0x04, 0x04, 0x00, 0x02, + 0x08, 0x00, 0x01, 0x10, 0x80, 0x00, 0x60, 0x60, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x00, 0x00}; diff --git a/bitmaps/cross_weave.xbm b/bitmaps/cross_weave.xbm new file mode 100644 index 00000000..45ffbb48 --- /dev/null +++ b/bitmaps/cross_weave.xbm @@ -0,0 +1,6 @@ +#define cross_weave_width 16 +#define cross_weave_height 16 +static unsigned char cross_weave_bits[] = { + 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x22, 0x22, 0x55, 0x55, 0x88, 0x88, + 0x55, 0x55, 0x22, 0x22, 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x22, 0x22, + 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x22, 0x22}; diff --git a/bitmaps/defect.xbm b/bitmaps/defect.xbm new file mode 100644 index 00000000..3456772d --- /dev/null +++ b/bitmaps/defect.xbm @@ -0,0 +1,9 @@ +#define defect_width 21 +#define defect_height 21 +static unsigned char defect_bits[] = { + 0x80, 0x1f, 0x00, 0x60, 0x60, 0x00, 0x10, 0x80, 0x00, 0x08, 0x00, 0x01, + 0x04, 0x00, 0x02, 0x82, 0x10, 0x04, 0x42, 0x29, 0x04, 0x81, 0x10, 0x08, + 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, + 0xe1, 0x7f, 0x08, 0xe2, 0x7f, 0x04, 0x02, 0x00, 0x04, 0x04, 0x00, 0x02, + 0x08, 0x00, 0x01, 0x10, 0x80, 0x00, 0x60, 0x60, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x00, 0x00}; diff --git a/bitmaps/dimple1.xbm b/bitmaps/dimple1.xbm new file mode 100644 index 00000000..c1a36e5c --- /dev/null +++ b/bitmaps/dimple1.xbm @@ -0,0 +1,6 @@ +#define dimple1_width 16 +#define dimple1_height 16 +static unsigned char dimple1_bits[] = { + 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00}; diff --git a/bitmaps/dimple3.xbm b/bitmaps/dimple3.xbm new file mode 100644 index 00000000..25eb294b --- /dev/null +++ b/bitmaps/dimple3.xbm @@ -0,0 +1,6 @@ +#define dimple3_width 16 +#define dimple3_height 16 +static unsigned char dimple3_bits[] = { + 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/donkey.xbm b/bitmaps/donkey.xbm new file mode 100644 index 00000000..d2d40a6f --- /dev/null +++ b/bitmaps/donkey.xbm @@ -0,0 +1,9 @@ +#define donkey_width 21 +#define donkey_height 21 +static unsigned char donkey_bits[] = { + 0x44, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x6c, 0x00, 0x00, + 0x28, 0x00, 0x00, 0x38, 0x00, 0x00, 0x74, 0x00, 0x00, 0xfe, 0x00, 0x00, + 0xef, 0xff, 0x00, 0xc2, 0xff, 0x01, 0xc0, 0xff, 0x01, 0x80, 0xff, 0x02, + 0x80, 0xff, 0x02, 0x80, 0xa2, 0x04, 0x80, 0x42, 0x05, 0x80, 0x42, 0x01, + 0x80, 0xa2, 0x00, 0x80, 0xa2, 0x00, 0x80, 0xa2, 0x00, 0x80, 0x20, 0x00, + 0x00, 0x00, 0x00}; diff --git a/bitmaps/elephant.xbm b/bitmaps/elephant.xbm new file mode 100644 index 00000000..8f93397e --- /dev/null +++ b/bitmaps/elephant.xbm @@ -0,0 +1,8 @@ +#define elephant_width 20 +#define elephant_height 20 +static unsigned char elephant_bits[] = { + 0xc0,0x07,0x00,0xc0,0x19,0x00,0xe0,0x76,0x00,0xe0,0xf6,0x00,0xf0,0xf7,0x01, + 0xf8,0xf7,0x03,0xd8,0xf7,0x07,0xfa,0xf7,0x07,0x7d,0xfb,0x07,0xfb,0xfc,0x0f, + 0xfe,0xff,0x0f,0xfc,0xff,0x0f,0xfe,0xff,0x0f,0xf6,0xff,0x0f,0xf2,0xff,0x06, + 0x72,0xe3,0x06,0x73,0xe3,0x06,0x71,0xe3,0x06,0x71,0xe3,0x06,0x70,0xe0,0x00 + }; diff --git a/bitmaps/fish-0.xbm b/bitmaps/fish-0.xbm new file mode 100644 index 00000000..a2bc1ed4 --- /dev/null +++ b/bitmaps/fish-0.xbm @@ -0,0 +1,8 @@ +#define fish0_width 20 +#define fish0_height 20 +static unsigned char fish0_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0xc0, 0x3f, 0x00, 0x40, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x38, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-1.xbm b/bitmaps/fish-1.xbm new file mode 100644 index 00000000..82f18180 --- /dev/null +++ b/bitmaps/fish-1.xbm @@ -0,0 +1,8 @@ +#define fish1_width 20 +#define fish1_height 20 +static unsigned char fish1_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, + 0x80, 0x1f, 0x00, 0xc0, 0x7f, 0x00, 0xe0, 0x7f, 0x00, 0xb8, 0x1f, 0x00, + 0x10, 0x06, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-2.xbm b/bitmaps/fish-2.xbm new file mode 100644 index 00000000..766845f3 --- /dev/null +++ b/bitmaps/fish-2.xbm @@ -0,0 +1,8 @@ +#define fish2_width 20 +#define fish2_height 20 +static unsigned char fish2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x2f, 0x00, 0xc0, 0x3f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-3.xbm b/bitmaps/fish-3.xbm new file mode 100644 index 00000000..15f1f00e --- /dev/null +++ b/bitmaps/fish-3.xbm @@ -0,0 +1,8 @@ +#define fish3_width 20 +#define fish3_height 20 +static unsigned char fish3_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x86, 0x00, + 0x80, 0xdf, 0x01, 0xe0, 0x7f, 0x00, 0xe0, 0x3f, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-4.xbm b/bitmaps/fish-4.xbm new file mode 100644 index 00000000..80405d87 --- /dev/null +++ b/bitmaps/fish-4.xbm @@ -0,0 +1,8 @@ +#define fish4_width 20 +#define fish4_height 20 +static unsigned char fish4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x2f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x01, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-5.xbm b/bitmaps/fish-5.xbm new file mode 100644 index 00000000..580a2656 --- /dev/null +++ b/bitmaps/fish-5.xbm @@ -0,0 +1,8 @@ +#define fish5_width 20 +#define fish5_height 20 +static unsigned char fish5_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x10, 0x06, 0x00, + 0xb8, 0x1f, 0x00, 0xe0, 0x7f, 0x00, 0xc0, 0x7f, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-6.xbm b/bitmaps/fish-6.xbm new file mode 100644 index 00000000..27057fcf --- /dev/null +++ b/bitmaps/fish-6.xbm @@ -0,0 +1,8 @@ +#define fish6_width 20 +#define fish6_height 20 +static unsigned char fish6_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x38, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x40, 0x0f, 0x00, 0xc0, 0x3f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-7.xbm b/bitmaps/fish-7.xbm new file mode 100644 index 00000000..38671d06 --- /dev/null +++ b/bitmaps/fish-7.xbm @@ -0,0 +1,8 @@ +#define fish7_width 20 +#define fish7_height 20 +static unsigned char fish7_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, + 0x80, 0x1f, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x7f, 0x00, 0x80, 0xdf, 0x01, + 0x00, 0x86, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/flipped_gray.xbm b/bitmaps/flipped_gray.xbm new file mode 100644 index 00000000..b24f5db0 --- /dev/null +++ b/bitmaps/flipped_gray.xbm @@ -0,0 +1,4 @@ +#define flipped_gray_width 4 +#define flipped_gray_height 2 +static unsigned char flipped_gray_bits[] = { + 0x07, 0x0d}; diff --git a/bitmaps/good.xbm b/bitmaps/good.xbm new file mode 100644 index 00000000..60dabc5d --- /dev/null +++ b/bitmaps/good.xbm @@ -0,0 +1,9 @@ +#define good_width 21 +#define good_height 21 +static unsigned char good_bits[] = { + 0x80, 0x1f, 0x00, 0x60, 0x60, 0x00, 0x10, 0x80, 0x00, 0x08, 0x00, 0x01, + 0x04, 0x00, 0x02, 0xc2, 0x30, 0x04, 0xc2, 0x30, 0x04, 0x01, 0x00, 0x08, + 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x21, 0x40, 0x08, 0x21, 0x40, 0x08, + 0x41, 0x20, 0x08, 0x82, 0x10, 0x04, 0x02, 0x0f, 0x04, 0x04, 0x00, 0x02, + 0x08, 0x00, 0x01, 0x10, 0x80, 0x00, 0x60, 0x60, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x00, 0x00}; diff --git a/bitmaps/gray1.xbm b/bitmaps/gray1.xbm new file mode 100644 index 00000000..186ea223 --- /dev/null +++ b/bitmaps/gray1.xbm @@ -0,0 +1,4 @@ +#define gray1_width 2 +#define gray1_height 2 +static unsigned char gray1_bits[] = { + 0x01, 0x02}; diff --git a/bitmaps/gray3.xbm b/bitmaps/gray3.xbm new file mode 100644 index 00000000..0356c8da --- /dev/null +++ b/bitmaps/gray3.xbm @@ -0,0 +1,4 @@ +#define gray3_width 4 +#define gray3_height 4 +static unsigned char gray3_bits[] = { + 0x01, 0x00, 0x04, 0x00}; diff --git a/bitmaps/hlines2.xbm b/bitmaps/hlines2.xbm new file mode 100644 index 00000000..6b7e18e7 --- /dev/null +++ b/bitmaps/hlines2.xbm @@ -0,0 +1,4 @@ +#define hlines2_width 1 +#define hlines2_height 2 +static unsigned char hlines2_bits[] = { + 0x01, 0x00}; diff --git a/bitmaps/l-bob.xbm b/bitmaps/l-bob.xbm new file mode 100644 index 00000000..ceea6daf --- /dev/null +++ b/bitmaps/l-bob.xbm @@ -0,0 +1,364 @@ +#define image_width 172 +#define image_height 246 +static unsigned char image_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xa0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xdf,0xff,0xf3,0xff,0x1f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0xff,0xff,0xdf,0xff,0xff,0x9f,0xff,0xe3,0xff,0x3f,0x00, + 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x9f,0xff, + 0xff,0x3f,0xff,0xc7,0xff,0x3f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0x1f,0xf2,0x7f,0x7f,0xfe,0xc3,0xff,0x7f,0x00,0x00, + 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x3f,0xc0,0x7f, + 0x7e,0xfc,0xc1,0xff,0xff,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xe0, + 0xff,0xff,0xff,0xcf,0x7f,0x00,0xff,0x7c,0xfc,0xc1,0xff,0xff,0x01,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x0f,0xff,0x00,0xff,0x78, + 0xf0,0xc1,0xff,0xff,0x03,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xfc,0x1f,0xfe,0x00,0xff,0x30,0xe0,0x81,0xff,0xff,0x03,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0xfc,0xff,0x7f,0x38,0x1f,0xfc,0x01,0xfe,0x01,0xe0, + 0x83,0xff,0xf9,0x07,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xff,0xff,0x3f, + 0x38,0x1e,0xf8,0x01,0xfc,0x01,0xe0,0x87,0xff,0xfb,0x07,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x80,0xff,0xff,0x7f,0x00,0x3c,0xf0,0x01,0xf8,0x01,0xe0,0x8f, + 0xff,0xf3,0x07,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xc0,0xff,0xff,0x7f,0x00, + 0x3c,0xf0,0x03,0xf8,0x01,0xc0,0xff,0xff,0xf3,0x0f,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0xc0,0xff,0xff,0xff,0x00,0x7c,0xe0,0x03,0xf0,0x01,0xc0,0xff,0xff, + 0xf3,0x3f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x81,0x7f, + 0xe0,0x03,0xf0,0x03,0xc0,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0x83,0xff,0xe0,0x03,0xe0,0x03,0xc0,0xff,0xff,0xff, + 0xff,0x01,0x00,0x00,0xf0,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x97,0xff,0xc0, + 0x07,0xe0,0x03,0x80,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf0,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xc1,0x07,0xc0,0x07,0x80,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0xf0,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xc1,0x07, + 0xc0,0x03,0x80,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xf0,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0x83,0x0f,0xc0,0x07,0xc0,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0xf0,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xc7,0x0f,0xc0, + 0x1f,0xe0,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0xf0,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xcf,0x1f,0xc0,0x7f,0xfc,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0xf0,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xc0,0x7f, + 0xfe,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xf0,0x00,0x00,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xc3,0x7f,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0x00, + 0xf0,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc7,0x7f,0xfe, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0xf0,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xf0, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0xf0,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,0xff,0x0f,0xff,0xff,0x1f,0x00,0xf0,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfe,0xff,0xff, + 0x07,0xff,0xff,0x1f,0x00,0xf0,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0xff,0xff,0xbf,0x00,0xff,0xff,0x1f,0x00,0xf0,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0x0f,0x00, + 0xff,0xff,0x1f,0x00,0xf0,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0xfe,0xff,0x3f,0x00,0xf0,0x00,0x00,0xe0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xfe, + 0xff,0x3f,0x00,0xf0,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0xfe,0xff,0x3f,0x00,0xf0,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xfc,0xff, + 0x3f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0x00,0x00,0xfc,0xff,0x3f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff, + 0x7f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xf8,0xff,0x3f, + 0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x03,0xf0,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x00,0x00,0x00,0x00,0xf8,0xff,0x3f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x03, + 0xe0,0xff,0xff,0xe7,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xf8,0xff,0x7f,0x00, + 0xf0,0x00,0x00,0xf0,0xff,0xff,0x01,0x00,0x00,0x80,0xc3,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0xf8,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x7f,0x00,0xf0, + 0x00,0x00,0xf8,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0xf8,0x07,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x7f,0x00,0xf0,0x00, + 0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x7f,0x00,0xf0,0x00,0x00, + 0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8, + 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f, + 0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00, + 0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x7f,0x00,0xf0, + 0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xc0,0xff,0x7f,0x00,0xf0,0x00, + 0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x70,0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xc0,0xff,0x7f,0x00,0xf0,0x00,0x00, + 0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0xc1,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xc1,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xc1, + 0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf8,0xc1,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xc1,0xff, + 0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf8,0xc1,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xc1,0xff,0x7f, + 0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xc1,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xc1,0xff,0x7f,0x00, + 0xf0,0x00,0x00,0xf0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xc1,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xc1,0xff,0x7f,0x00,0xf0, + 0x00,0x00,0xf0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xc3,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0x03,0x40,0x91, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x00,0xe0,0xc3,0xff,0x7f,0x00,0xf0,0x00, + 0x00,0xf0,0xff,0xff,0x03,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xf0,0xff,0x0f, + 0xe0,0xc3,0xff,0x7f,0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0xc3,0xff,0xff,0x0f, + 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xf3,0xc3,0xff,0x7f,0x00,0xf0,0x00,0x00, + 0xfc,0xff,0xff,0xe3,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xf7, + 0x83,0xff,0xff,0x00,0xf0,0x00,0x00,0xfc,0xff,0xff,0xf3,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x83,0xff,0xff,0x00,0xf0,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x03, + 0xff,0xff,0x00,0xf0,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0x07,0xff,0xff,0x00,0xf0,0x00,0x00,0xfc,0xff, + 0xff,0xff,0x01,0xfc,0xff,0x01,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x07,0xff, + 0xff,0x00,0xf0,0x00,0x00,0xfc,0xff,0xff,0x5f,0x00,0xf8,0xff,0x03,0x00,0x00, + 0xc0,0xff,0x3f,0x00,0xff,0x0f,0xff,0xff,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff, + 0x1f,0x00,0xe0,0xff,0x07,0x00,0x00,0xe0,0xff,0x03,0x00,0xfc,0x0f,0xfe,0x7f, + 0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x1f,0x00,0xc0,0xff,0x0f,0x00,0x00,0xf0, + 0xff,0x00,0x00,0xf0,0x0f,0xfe,0x7f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0x1f, + 0xf0,0xff,0xff,0x1f,0x00,0x00,0xf8,0xff,0x23,0x00,0xe0,0x1f,0xfe,0x3f,0x00, + 0xf0,0x00,0x00,0xf8,0xff,0xff,0x1f,0xfe,0xff,0xff,0x3f,0x00,0x00,0xfc,0xff, + 0xff,0x07,0xe0,0x1f,0xfe,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0xfe,0xff,0xff,0x3f,0xc0,0x1f,0xfe,0x3f,0x00,0xf0, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0xff, + 0x7f,0xc0,0x1f,0xfe,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x3f,0xfe,0xff,0xff, + 0xff,0xff,0x01,0x80,0xff,0xff,0xff,0xff,0x81,0x1f,0xfc,0x3f,0x00,0xf0,0x00, + 0x00,0xf8,0xff,0x3f,0xfc,0xff,0xff,0xff,0xff,0x01,0xc0,0xff,0xff,0xff,0xff, + 0x83,0x1f,0xfc,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x1f,0xf8,0xff,0xff,0xff, + 0xff,0x01,0xe0,0xff,0xff,0xff,0xff,0x83,0x1f,0xfc,0x3f,0x00,0xf0,0x00,0x00, + 0xf8,0xff,0x1f,0xf8,0xf7,0xff,0xf9,0xff,0x01,0xe0,0xff,0xff,0xff,0xfb,0x03, + 0x1f,0xfc,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x0f,0xf8,0xc1,0xff,0xe0,0xff, + 0x03,0xf0,0xff,0x83,0xff,0xe1,0x07,0x1e,0xfe,0x3f,0x00,0xf0,0x00,0x00,0xf8, + 0xff,0x0f,0xf8,0xc1,0xff,0xe0,0xff,0x03,0xf0,0xff,0x83,0xff,0xe1,0x07,0x1e, + 0xfe,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x0f,0xf8,0xc0,0xff,0xe0,0xff,0x03, + 0xe0,0xff,0x81,0xff,0xe1,0x07,0x1f,0xfe,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff, + 0x0f,0xf8,0xc0,0xff,0xe0,0xff,0x03,0xc0,0xff,0x80,0xff,0xe1,0x03,0x1e,0xfe, + 0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x1f,0x70,0xc0,0x7f,0xf0,0xff,0x03,0x00, + 0x00,0x80,0xff,0xe1,0x01,0x1e,0xfe,0x3f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x1f, + 0x20,0x00,0x07,0xf8,0xff,0x03,0x00,0x00,0xf8,0xff,0xc0,0x00,0x1e,0xfe,0x1f, + 0x00,0xf0,0x00,0x00,0xf8,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff,0x03,0x00,0x00, + 0xfe,0x07,0x00,0x00,0x1e,0xfe,0x1f,0x00,0xf0,0x00,0x00,0xf8,0xff,0x0f,0x00, + 0x00,0x80,0xff,0xfc,0x03,0x00,0x00,0xfe,0x03,0x00,0x00,0x1e,0xfe,0x1f,0x00, + 0xf0,0x00,0x00,0xf8,0xbf,0x0f,0x00,0x00,0xe0,0xff,0xfc,0x03,0x00,0x00,0xfe, + 0x03,0x00,0x00,0x08,0xfe,0x1f,0x00,0xf0,0x00,0x00,0xf0,0xbf,0x0f,0x00,0x00, + 0xf8,0x7f,0xfc,0x03,0x00,0x00,0xfc,0x0f,0x00,0x00,0x00,0xfe,0x1f,0x00,0xf0, + 0x00,0x00,0xf0,0x3f,0x0f,0x00,0xfc,0xff,0x3f,0xf8,0x03,0x00,0x00,0xf8,0xff, + 0x00,0x00,0x00,0xfe,0x0f,0x00,0xf0,0x00,0x00,0xf0,0x3f,0x0e,0x00,0xfc,0xff, + 0x0f,0xf8,0x01,0x00,0x00,0xf0,0xff,0x01,0x00,0x00,0xfe,0x1f,0x00,0xf0,0x00, + 0x00,0xf0,0x3f,0x0f,0x00,0xfc,0xff,0x07,0xf8,0x01,0x00,0x00,0xc0,0xff,0x01, + 0x00,0x00,0xfe,0x0f,0x00,0xf0,0x00,0x00,0xf0,0x7f,0x06,0x00,0xfc,0xff,0x01, + 0xf8,0x01,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x0f,0x00,0xf0,0x00,0x00, + 0xf0,0x7f,0x06,0x00,0xe0,0x3f,0x00,0xf8,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0x0f,0x00,0xf0,0x00,0x00,0xf0,0x7f,0x06,0x00,0x00,0x07,0x00,0xf8, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,0x00,0xf0,0x00,0x00,0xe0, + 0x7f,0x00,0x00,0x00,0x00,0x00,0xf8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0x07,0x00,0xf0,0x00,0x00,0xe0,0x7f,0x00,0x00,0x00,0x00,0x00,0xf8,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,0x00,0xf0,0x00,0x00,0xf0,0x7f, + 0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0x07,0x00,0xf0,0x00,0x00,0xe0,0x7f,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0xf0,0x00,0x00,0xe0,0x7f,0x1c, + 0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f, + 0x00,0xf0,0x00,0x00,0xe0,0x7f,0x3c,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x9e,0x0f,0x00,0xf0,0x00,0x00,0xe0,0xff,0x3c,0x00, + 0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9e,0x0f,0x00, + 0xf0,0x00,0x00,0xc0,0xfd,0x7c,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x9e,0x0f,0x00,0xf0,0x00,0x00,0x80,0xfd,0x7c,0x00,0x00, + 0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x07,0x00,0xf0, + 0x00,0x00,0x00,0xfc,0x7c,0x00,0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x9f,0x07,0x00,0xf0,0x00,0x00,0x00,0xfc,0xfc,0x00,0x00,0x00, + 0x80,0x3f,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0xf0,0x00, + 0x00,0x80,0xff,0xfc,0x00,0x00,0x00,0xe0,0x3f,0x00,0x38,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0x03,0x00,0xf0,0x00,0x00,0x80,0xff,0xf8,0x01,0x00,0x00,0xf0, + 0x3f,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,0x00,0xf0,0x00,0x00, + 0x00,0xff,0xf8,0x03,0x00,0x00,0xf8,0x3f,0x00,0x20,0x00,0x1e,0x00,0x00,0x00, + 0x04,0xef,0x01,0x00,0xf0,0x00,0x00,0x00,0xff,0xf8,0x03,0x00,0x00,0xff,0x1f, + 0x00,0x20,0xc0,0x7f,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, + 0x7c,0xf8,0x07,0x00,0x80,0xff,0x1f,0x00,0x00,0xe0,0xff,0x01,0x00,0x00,0x0f, + 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0x07,0x00,0xe0,0xff,0x1f,0x00, + 0x00,0xe0,0xff,0x03,0x00,0xc0,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0xf8,0x07,0x00,0xf0,0xff,0x1f,0x00,0x00,0xf0,0xff,0x07,0x00,0xc0,0x1f,0x00, + 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0xf8,0xfe,0x1f,0x00,0x00, + 0xfc,0xf3,0x0f,0x00,0xf0,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8, + 0x0f,0x00,0x7c,0xfc,0x3f,0x00,0x80,0xff,0xe1,0x3f,0x00,0xf8,0x0f,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0x1f,0x00,0x3e,0xfc,0xbf,0x00,0xe0,0xff, + 0xc0,0x3f,0x00,0xfe,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0x1f, + 0x00,0x1f,0xfc,0xff,0x03,0xf0,0x7f,0x80,0x7f,0x80,0xff,0x0f,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0xf8,0x1f,0x80,0x0f,0xfe,0xff,0x07,0xfe,0x3f,0x00, + 0x7f,0xf8,0xff,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0x7f,0xe0, + 0x07,0xff,0xff,0xff,0xff,0x1f,0x00,0xff,0xf9,0xff,0x0f,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0xf8,0xff,0xf0,0x83,0xff,0xff,0xff,0xff,0x03,0x00,0xfe, + 0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x83, + 0xff,0xff,0xff,0xff,0x00,0x00,0xfe,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0xfc,0xff, + 0xff,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xe0,0xff, + 0xff,0xff,0x3f,0x00,0x00,0xf8,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0xfc,0xff,0x7f,0xe0,0xff,0xff,0xff,0x1f,0x00,0x00,0xf8,0xff,0xff, + 0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xff,0x3f,0xf0,0xff,0xff, + 0xff,0x0f,0x00,0x00,0xf0,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, + 0x00,0xfe,0xff,0x1f,0xfc,0xff,0xff,0xff,0x07,0x00,0x00,0xf8,0xff,0xff,0x0f, + 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xff,0x07,0xff,0xff,0xff,0xff, + 0x03,0x00,0xf0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0xfc,0xff,0x83,0xff,0xff,0xff,0xff,0x01,0x00,0xff,0xff,0x1f,0xff,0x1f,0x00, + 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xff,0x81,0xff,0xff,0xff,0xff,0x00, + 0xe0,0xff,0xff,0x07,0xf8,0x1f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xfc, + 0xff,0x01,0xff,0xff,0xff,0x3f,0x80,0xff,0xff,0xff,0x01,0xf8,0x3f,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0xfc,0xff,0x01,0xfe,0xff,0xff,0x1f,0xc0,0xff, + 0xff,0xff,0x00,0xf8,0x1f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0xff, + 0x01,0xf8,0xff,0xff,0x1f,0xf8,0xff,0xff,0x7f,0x00,0xf8,0x1f,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0xf8,0xff,0x01,0xf8,0x8f,0xfc,0xff,0xff,0xff,0xff, + 0x3f,0x00,0xfc,0x1f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf8,0xff,0x01, + 0xf8,0x0f,0xe0,0xff,0xff,0x07,0xf8,0x0f,0x00,0xfc,0x1f,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0xf8,0xe7,0x03,0xf8,0x0f,0x00,0x04,0x00,0x00,0xf8,0x0f, + 0x00,0xfc,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf0,0xef,0x03,0xfc, + 0x0f,0x00,0x00,0x00,0x00,0xfe,0x07,0x00,0xfc,0x0f,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0xf0,0xef,0x07,0xfc,0x1f,0x00,0x00,0x00,0x00,0xff,0x03,0x00, + 0xfc,0x0f,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf0,0xc7,0x07,0xf8,0x3f, + 0x00,0x00,0x00,0x00,0xff,0x01,0x00,0xfe,0x07,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0xe0,0xc7,0x07,0xf8,0xff,0x01,0x00,0x00,0x00,0xff,0x00,0x00,0xfe, + 0x07,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xe0,0xc7,0x07,0xf0,0xff,0x0f, + 0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, + 0x00,0xe0,0xc7,0x07,0xf0,0xff,0x1f,0x00,0x00,0x80,0xff,0x00,0x00,0xff,0x03, + 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xc0,0xcf,0x07,0xf0,0xff,0x3f,0x00, + 0x00,0xc0,0x7f,0x00,0x00,0xff,0x03,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0xc0,0xdf,0x07,0xe0,0xff,0x3f,0x00,0x00,0xe0,0x07,0x00,0x80,0xff,0x01,0x00, + 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x80,0x9f,0x0f,0xe0,0xff,0x7f,0x00,0x00, + 0xc6,0x00,0x00,0x80,0xff,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x80, + 0xbf,0x0f,0xe0,0xff,0x7f,0x00,0xfc,0x0f,0x00,0x00,0x80,0xff,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xff,0x0f,0xc0,0xff,0xff,0xff,0xff,0x0f, + 0x00,0x00,0xc0,0xff,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xff, + 0x0f,0x80,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xc0,0x7f,0x00,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f,0x80,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0xc0,0x7f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f, + 0x80,0xff,0xff,0xf0,0x3f,0x00,0x00,0x00,0xe0,0x7f,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0xc0,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0xe0,0x3f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0xe0, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0x00,0xf8,0x3c,0xf0,0xff,0x7f,0x00,0x00,0x10,0x00,0x00,0xf0, + 0x1f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xf8,0x3c,0xf0,0xff, + 0xff,0x00,0xf0,0x7f,0x00,0x00,0xf8,0x1f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0x00,0xf0,0x18,0xfc,0xff,0xff,0x07,0xfe,0xff,0x00,0x00,0xf8,0x1f, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xe0,0x10,0xfe,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0xf8,0x0f,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, + 0x00,0x00,0xe0,0x00,0xff,0xcf,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x0f,0x00, + 0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x40,0xc0,0xff,0x87,0xff,0xff, + 0xff,0xff,0x01,0x00,0xfc,0x07,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0x83,0xff,0xff,0xff,0xff,0x00,0x00,0xfc,0x03,0x00,0x00, + 0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x81,0xff,0xff,0xff, + 0x7f,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0x81,0xff,0xff,0xff,0x1f,0x00,0x00,0xfe,0x01,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xc1,0xff,0xcf,0xff,0x0f, + 0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xf0,0xff,0x03,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xf0,0xff,0x00,0x00,0x00,0x00, + 0xc0,0xff,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0x7f,0xf0,0x3f,0x00,0x00,0x00,0x00,0xc0,0xff,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x3f,0xf0,0x3f,0x00,0x00,0x00,0x00,0xc0, + 0x7f,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0xc0,0x00,0x00,0x00,0xff,0x3f, + 0xfc,0x1f,0x00,0x00,0x00,0x00,0xe0,0x3f,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0xf0,0x03,0x03,0xc0,0xff,0x1f,0xfc,0x0f,0x00,0x00,0x00,0x00,0xf0,0x1f, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0xfc,0x83,0x07,0xe0,0xff,0x3f,0xfc, + 0x07,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0xfe,0x87,0x07,0xf0,0xff,0x3f,0xfe,0x07,0x00,0x00,0x00,0x00,0xfc,0x0f,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0xfe,0xc3,0x0f,0xf8,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x80,0xff, + 0xc3,0x1f,0xfc,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0xf0,0x00,0x80,0xff,0xe3,0x1f,0xfe,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xe0,0xff,0xf1, + 0x3f,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x80,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0xf0,0x00,0xe0,0x1f,0xfc,0xff,0xff,0x3f,0xfc,0xff,0x03,0x00,0x00, + 0x00,0xe0,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xe0,0x1f,0xfc,0xff, + 0xff,0x3f,0xfc,0xff,0x03,0x00,0x00,0x00,0xe0,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0xe0,0x0f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0x03,0x00,0x00,0x00, + 0xf0,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xc0,0x01,0xfe,0xff,0xff, + 0x1f,0xf8,0xff,0x07,0x00,0x00,0x00,0xfc,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0xfe,0xff,0xff,0x0f,0xf8,0xff,0x0f,0x00,0x00,0x80,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xfe,0xff,0xff,0x07, + 0xf0,0xff,0xff,0x0f,0x08,0xfc,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x0f,0x1c,0xfc,0xff,0xff,0x07,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x80,0xff,0x1f,0xf8,0xff,0xff,0x03,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0xff,0x3f,0xf8,0xff,0xff,0x01,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xff,0x3f,0xf0,0xff,0xff,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xff, + 0x7f,0xf0,0xff,0xff,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0xff,0xff,0xe0,0xff,0x7f,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xff,0xff, + 0xe0,0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0x00,0xfe,0xff,0xc0,0xff,0x3f,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xfc,0xff,0xc1, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0x00,0xfc,0xff,0xc1,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xfc,0xff,0xc1,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0xfc,0xff,0xc1,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xf8,0xff,0xc3,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x00,0xf8,0xff,0xc3,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xf0,0xff,0xc3,0xff,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0xf0,0xff,0xc7,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xe0,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0xe0,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xc0,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x80, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0xfe, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0x00,0x00,0xfc,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0xf8,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0x00,0x00,0xe0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/bitmaps/l-bsd.xbm b/bitmaps/l-bsd.xbm new file mode 100644 index 00000000..33e4f04e --- /dev/null +++ b/bitmaps/l-bsd.xbm @@ -0,0 +1,52 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x50, 0x3c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xee, + 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x81, 0x0f, 0x70, 0x00, 0x00, + 0x00, 0x00, 0xa8, 0x00, 0x0a, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x38, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x38, 0x90, 0x01, 0x00, + 0x00, 0x00, 0x30, 0x07, 0x50, 0xdc, 0x01, 0x00, 0x00, 0x00, 0x90, 0x08, + 0xc0, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x90, 0xc8, 0x01, 0xd0, 0x00, 0x00, + 0x00, 0x00, 0x48, 0x24, 0x02, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x25, + 0x02, 0x34, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x82, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xc4, 0x73, 0xc2, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x53, + 0xa2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x81, 0xf1, 0x82, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0xf3, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0xe0, + 0xa0, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x41, 0x00, 0x90, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x96, 0x08, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x24, 0x0f, + 0x70, 0x00, 0x00, 0x00, 0xc0, 0x18, 0xc8, 0x80, 0x58, 0x00, 0x00, 0x00, + 0xc0, 0x11, 0x90, 0x73, 0x34, 0x00, 0x00, 0x00, 0x80, 0x13, 0x60, 0x0f, + 0x1a, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x80, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x38, 0x3c, 0x00, 0xd1, 0x06, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0x0e, 0x01, + 0x05, 0x00, 0x00, 0x00, 0xf0, 0xf3, 0x13, 0x01, 0x07, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0xa9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x43, 0x80, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x2c, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa4, 0x3e, + 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd2, 0xa1, 0x0e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x59, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xff, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0xc0, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xc1, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7b, 0xdc, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x08, 0xf6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x30, 0x99, + 0x04, 0x57, 0x0f, 0x00, 0x00, 0x00, 0xd0, 0x28, 0x04, 0xfc, 0x17, 0x00, + 0x00, 0x00, 0xc8, 0x5e, 0x08, 0x00, 0xfc, 0x00, 0x00, 0xc0, 0xb7, 0x27, + 0x08, 0x00, 0xb0, 0x01, 0x00, 0x30, 0xf4, 0x19, 0x18, 0x00, 0xc0, 0x02, + 0x00, 0x08, 0x5c, 0x0a, 0x1c, 0x00, 0xb4, 0x03, 0x00, 0x04, 0x04, 0x03, + 0x0b, 0x80, 0xdb, 0x00, 0x00, 0x04, 0x06, 0xd1, 0x07, 0x80, 0x34, 0x00, + 0x00, 0xf8, 0x01, 0xe2, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x00, 0x06, 0x1f, + 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All Rights Reserved. Reproduced with permission. + */ diff --git a/bitmaps/l-dec.xbm b/bitmaps/l-dec.xbm new file mode 100644 index 00000000..d7378894 --- /dev/null +++ b/bitmaps/l-dec.xbm @@ -0,0 +1,27 @@ +#define image_width 82 +#define image_height 26 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0xef, 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, + 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, + 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0xff, + 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0xff, 0xf7, + 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xec, 0x79, 0xff, 0xf7, 0xbc, + 0xff, 0xfb, 0xbf, 0xe7, 0x01, 0xfe, 0xec, 0x79, 0xff, 0xf7, 0xbc, 0xc7, + 0xfb, 0xbf, 0xe7, 0x01, 0xfe, 0xec, 0x79, 0xff, 0xf7, 0xbc, 0xc7, 0xfb, + 0xbf, 0xe7, 0x01, 0xfe, 0xec, 0x7f, 0xff, 0xf7, 0xbf, 0xc7, 0xfb, 0xbf, + 0xe7, 0x01, 0x0e, 0xec, 0x79, 0x0f, 0xf6, 0xbc, 0x83, 0x3b, 0xb8, 0xe7, + 0x01, 0x06, 0xec, 0x79, 0x07, 0xf6, 0xbc, 0x83, 0x1b, 0xb0, 0xe7, 0x01, + 0x46, 0xec, 0x79, 0x23, 0xf6, 0xbc, 0xc7, 0xfb, 0xb1, 0xe7, 0x01, 0xe6, + 0xec, 0x79, 0x73, 0xf6, 0xbc, 0xc7, 0x3b, 0xb0, 0xe7, 0x01, 0xe6, 0xec, + 0x79, 0x73, 0xf6, 0xbc, 0xc7, 0x1b, 0xb0, 0xe7, 0x01, 0xe6, 0xec, 0x79, + 0x73, 0xf6, 0xbc, 0xc7, 0x9b, 0xb1, 0xe7, 0x01, 0x46, 0xec, 0x79, 0x23, + 0xf6, 0xbc, 0xc7, 0x9b, 0xb1, 0xe7, 0x01, 0x06, 0xec, 0x79, 0x07, 0xf6, + 0xbc, 0x87, 0x1b, 0xb0, 0xe7, 0x01, 0x1e, 0xec, 0x79, 0x0f, 0xf6, 0xbc, + 0x8f, 0x3b, 0xb0, 0xe7, 0x01, 0xfe, 0xef, 0x7f, 0x7f, 0xf6, 0xbf, 0xff, + 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0x23, 0xf6, 0xbf, 0xff, 0xfb, + 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0x07, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, + 0xff, 0x01, 0xfe, 0xef, 0x7f, 0x9f, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, + 0x01, 0xfe, 0xef, 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, + 0xfe, 0xef, 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/l-hp.xbm b/bitmaps/l-hp.xbm new file mode 100644 index 00000000..1be38008 --- /dev/null +++ b/bitmaps/l-hp.xbm @@ -0,0 +1,20 @@ +#define image_width 46 +#define image_height 34 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xff, 0x79, 0xfe, 0xff, 0xc1, + 0xf8, 0xff, 0x39, 0xfe, 0xff, 0xc7, 0xfc, 0xff, 0x3d, 0xfc, 0xff, 0xcf, + 0xfc, 0xff, 0x3c, 0xe0, 0xff, 0xcf, 0xfe, 0x7f, 0x1c, 0x80, 0xff, 0xdf, + 0xfe, 0x3f, 0x1c, 0x00, 0xff, 0xdf, 0xfe, 0x1f, 0x1e, 0x00, 0xfe, 0xdf, + 0xfe, 0x0f, 0x1e, 0x00, 0xfc, 0xdf, 0xfe, 0x07, 0x0e, 0x00, 0xf8, 0xdf, + 0xfe, 0x07, 0x0f, 0x00, 0xf8, 0xdf, 0xfe, 0x03, 0x7f, 0xfc, 0xf1, 0xdf, + 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, + 0xfe, 0x81, 0xf7, 0xde, 0xe3, 0xdf, 0xfe, 0x81, 0x77, 0xde, 0xe1, 0xdf, + 0xfe, 0x81, 0x73, 0xce, 0xe1, 0xdf, 0xfe, 0xc1, 0x7b, 0xee, 0xe1, 0xdf, + 0xfe, 0xc1, 0x7b, 0xef, 0xe1, 0xdf, 0xfe, 0xc1, 0x3b, 0xe7, 0xe0, 0xdf, + 0xfe, 0xc3, 0x39, 0xff, 0xf0, 0xdf, 0xfe, 0xe3, 0xbd, 0xff, 0xf0, 0xdf, + 0xfe, 0xe3, 0xbd, 0x7f, 0xf0, 0xdf, 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, + 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, 0xfe, 0x0f, 0xc0, 0x03, 0xfc, 0xdf, + 0xfe, 0x1f, 0xc0, 0x03, 0xfe, 0xdf, 0xfe, 0x3f, 0xc0, 0x01, 0xff, 0xdf, + 0xfe, 0x7f, 0xc0, 0x81, 0xff, 0xdf, 0xfc, 0xff, 0xe1, 0xe1, 0xff, 0xcf, + 0xfc, 0xff, 0xe7, 0xfc, 0xff, 0xcf, 0xf8, 0xff, 0xe7, 0xfc, 0xff, 0xc7, + 0xe0, 0xff, 0xf3, 0xfc, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0}; diff --git a/bitmaps/l-ibm.xbm b/bitmaps/l-ibm.xbm new file mode 100644 index 00000000..203c6ded --- /dev/null +++ b/bitmaps/l-ibm.xbm @@ -0,0 +1,32 @@ +#define image_width 78 +#define image_height 34 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xf8, 0xff, + 0x3f, 0xf0, 0xff, 0x00, 0xff, 0xcf, 0xfc, 0xff, 0xf8, 0xff, 0x7f, 0xf0, + 0xff, 0x00, 0xff, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xfc, 0xff, 0xf8, 0xff, 0xff, 0xf1, 0xff, 0xc1, 0xff, 0xcf, 0xfc, 0xff, + 0xf8, 0xff, 0xff, 0xf1, 0xff, 0xc1, 0xff, 0xcf, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0xff, 0xe3, + 0xff, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0xff, 0xe3, 0xff, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x0f, 0x80, 0xff, + 0xff, 0x00, 0xff, 0xf7, 0xff, 0xc0, 0xc0, 0x0f, 0x80, 0xff, 0x7f, 0x00, + 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xc0, 0x0f, 0x80, 0xff, 0x7f, 0x00, 0xbf, 0xff, 0xfd, 0xc0, 0xc0, 0x0f, + 0x80, 0xff, 0x7f, 0x00, 0xbf, 0xff, 0xfd, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0x3f, 0x7f, + 0xfc, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0x3f, 0x7f, 0xfc, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xf8, 0xff, + 0xff, 0xf1, 0x3f, 0x3e, 0xfc, 0xcf, 0xfc, 0xff, 0xf8, 0xff, 0xff, 0xf1, + 0x3f, 0x3e, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xfc, 0xff, 0xf8, 0xff, 0x7f, 0xf0, 0x3f, 0x1c, 0xfc, 0xcf, 0xfc, 0xff, + 0xf8, 0xff, 0x3f, 0xf0, 0x3f, 0x1c, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0}; diff --git a/bitmaps/l-linux.xbm b/bitmaps/l-linux.xbm new file mode 100644 index 00000000..7ceeaf90 --- /dev/null +++ b/bitmaps/l-linux.xbm @@ -0,0 +1,205 @@ +#define image_width 128 +#define image_height 151 +static unsigned char image_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x05, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x06, 0xf8, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, + 0x00, 0x09, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x02, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x50, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x14, 0x00, + 0xe8, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x03, 0x2e, 0x00, 0x5c, 0x07, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x5f, 0x00, 0xf7, 0x0b, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0x7d, 0x00, + 0xfe, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x83, 0x7f, 0x80, 0xff, 0x0b, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xf1, 0x80, 0x0f, 0x1f, 0x00, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xe0, 0x80, + 0x87, 0x1e, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xc7, 0xc8, 0x81, 0x87, 0x1c, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xd0, 0x80, 0x03, 0x3c, 0x00, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xd0, 0x81, + 0x03, 0x3c, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xc7, 0xc0, 0x00, 0x03, 0x3c, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0, 0x2a, 0x03, 0x3c, 0x00, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0x41, 0xff, + 0x01, 0x3c, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x87, 0xa1, 0x2b, 0x0f, 0x1e, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xeb, 0xfe, 0x9f, 0x0f, 0x00, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf7, 0xfb, + 0x76, 0x0d, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x07, 0xba, 0xdf, 0xff, 0x07, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xea, 0xfd, 0xdb, 0x1e, 0x00, 0xfc, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x7d, 0x6f, + 0xff, 0x1b, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x87, 0xd6, 0xfd, 0x6d, 0x1b, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x47, 0xfb, 0xef, 0xf7, 0x15, 0x00, 0xfc, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x47, 0x6d, 0xff, + 0x3e, 0x1d, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x87, 0xde, 0xbb, 0xcf, 0x16, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfa, 0xef, 0xb3, 0x0b, 0x04, 0xf8, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xd8, 0xbe, + 0xe8, 0x05, 0x08, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x87, 0xf2, 0x37, 0x55, 0x1d, 0x54, 0xf0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x01, 0x40, 0x7d, 0x3f, 0x28, 0xe0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xd7, 0xbf, + 0x8b, 0x3f, 0xa8, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x8f, 0x57, 0x65, 0xf5, 0x77, 0x50, 0xc0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x4e, 0x5b, 0x75, 0x5f, 0x40, 0xc0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0x3f, 0x2a, + 0xfd, 0x7f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x83, 0x77, 0x89, 0xee, 0xff, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xdf, 0xf5, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0x7f, 0xff, + 0xfe, 0xff, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xc0, 0xff, 0xfd, 0xff, 0xff, 0x01, 0x00, 0xfe, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc0, 0xdf, 0xb7, 0xff, 0xff, 0x03, 0x00, + 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xfe, + 0xff, 0xff, 0x03, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x3f, 0xf0, 0xff, 0xfb, 0xff, 0xff, 0x07, 0x00, 0xf8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x07, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xe0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, + 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, + 0xff, 0xff, 0x0f, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x1f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, + 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, + 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x80, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, + 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x07, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, + 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x7f, 0x80, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0xff, 0x3f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0x80, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x1f, 0x80, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x07, 0xc0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xc0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xc0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xc3, 0xc0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xe3, 0xc3, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x5f, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xf7, 0x8f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x36, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xbb, 0x1d, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0xf7, 0x37, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, + 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xda, 0x5e, 0xf8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xbf, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f, 0xbd, 0xfb, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2d, 0x00, 0x80, 0xfb, 0xff, + 0xff, 0xff, 0xeb, 0xbf, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, + 0x00, 0x80, 0xfe, 0xff, 0xff, 0x7f, 0xfd, 0xf5, 0x81, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xbf, 0x15, 0x00, 0xc0, 0xf7, 0xff, 0xff, 0x5f, 0xb7, 0xde, + 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x6f, 0x00, 0xe0, 0xfe, 0xff, + 0xff, 0xaf, 0xfd, 0xff, 0x07, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x3d, + 0x00, 0xb0, 0xf7, 0xff, 0xff, 0x6a, 0xd7, 0xb6, 0x05, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x57, 0x01, 0xd4, 0xfd, 0xff, 0x6f, 0xb5, 0xbf, 0xff, + 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xbb, 0x4a, 0x75, 0xff, 0xff, + 0xf3, 0xef, 0xf5, 0xb6, 0x06, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, + 0xaa, 0xda, 0xf7, 0xff, 0x5f, 0x7d, 0xef, 0xff, 0x1f, 0xc0, 0xff, 0xff, + 0xff, 0xff, 0x7f, 0xbf, 0xaa, 0xf6, 0xfd, 0xff, 0xf5, 0xdf, 0x7f, 0xb7, + 0x2d, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xd5, 0x55, 0xbb, 0xde, 0xff, + 0xdd, 0xf6, 0xd5, 0xfb, 0x3f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xbf, 0xbe, + 0xfe, 0xee, 0xf7, 0xff, 0xf7, 0x7b, 0x7f, 0x6f, 0x5b, 0x00, 0xfe, 0xff, + 0xff, 0xff, 0x7f, 0xd5, 0xab, 0xfd, 0xbd, 0xff, 0x7b, 0xef, 0xfd, 0xdf, + 0xbf, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xfd, 0xda, 0xb7, 0xef, 0xff, + 0xad, 0xbf, 0x57, 0xfb, 0xf6, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xbf, 0xaa, + 0xf7, 0xfe, 0xfd, 0xfe, 0xfb, 0xf5, 0xff, 0xb7, 0x7f, 0x01, 0xfe, 0xff, + 0xff, 0xff, 0x3f, 0xfd, 0x5e, 0xb7, 0xb7, 0xfb, 0x6d, 0x5f, 0xbd, 0xee, + 0xeb, 0x02, 0xfe, 0xff, 0xff, 0xff, 0x5f, 0xab, 0xfb, 0xfd, 0xde, 0xff, + 0xf7, 0xff, 0xef, 0xbd, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfd, + 0xef, 0xdf, 0xbd, 0xed, 0xdb, 0xea, 0xfb, 0xfb, 0xbb, 0xc5, 0xff, 0xff, + 0xff, 0xff, 0x83, 0xb6, 0x7d, 0xf7, 0xf7, 0xff, 0xb5, 0xbf, 0x5e, 0xaf, + 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfb, 0xdf, 0xdf, 0xfe, 0xad, + 0xfb, 0xee, 0xf7, 0xff, 0xde, 0xea, 0xff, 0xff, 0xff, 0xff, 0x40, 0xad, + 0xfb, 0xfa, 0xd7, 0xfe, 0xd7, 0xbb, 0xde, 0xf6, 0xfb, 0xff, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0xfd, 0xee, 0xbf, 0xfd, 0xb7, 0xfb, 0xff, 0xfb, 0xbf, + 0xbf, 0xd6, 0xff, 0xff, 0xff, 0x1f, 0xc0, 0xee, 0xbf, 0xf7, 0x77, 0xdf, + 0x55, 0xdb, 0x5f, 0xed, 0xd6, 0xaf, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xbb, + 0xf6, 0x5e, 0xdf, 0xf6, 0xfb, 0xfe, 0xf6, 0xff, 0xff, 0xb5, 0xff, 0xff, + 0xff, 0x03, 0x40, 0xf5, 0xbf, 0xfb, 0xfb, 0xdf, 0xed, 0xab, 0xdf, 0x55, + 0x5b, 0x1f, 0xff, 0xff, 0xff, 0x00, 0x80, 0xde, 0xfa, 0x5e, 0x6f, 0xf5, + 0xb7, 0xff, 0xf6, 0xfe, 0xff, 0x6b, 0xfc, 0xff, 0x1f, 0x00, 0x40, 0xf7, + 0xd7, 0xf7, 0xfb, 0xff, 0xdb, 0xed, 0xff, 0xbb, 0xed, 0x36, 0xe0, 0x7f, + 0x00, 0x00, 0x80, 0x7a, 0x7f, 0xdd, 0xae, 0xfe, 0xed, 0xde, 0xb6, 0xff, + 0x77, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xdd, 0xed, 0xfb, 0xdf, 0xff, + 0x57, 0xbb, 0xfb, 0xdb, 0xde, 0xab, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, + 0xf7, 0xdf, 0xea, 0xff, 0xbb, 0xed, 0xae, 0xbe, 0x7f, 0x5d, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xba, 0xbf, 0x76, 0xfb, 0xff, 0x4b, 0xb5, 0xf5, 0xf7, + 0xf6, 0x57, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6d, 0xdb, 0xaf, 0xfc, 0xff, + 0xa7, 0xaa, 0x56, 0xdd, 0x5f, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, + 0xf7, 0x5a, 0xff, 0xff, 0x1f, 0xa9, 0x5a, 0xf5, 0xf6, 0x2b, 0x00, 0x00, + 0x00, 0x00, 0xa0, 0x5a, 0x5d, 0x95, 0xff, 0xff, 0xff, 0xa7, 0x52, 0xab, + 0x5d, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x80, 0x6a, 0xd7, 0xca, 0xff, 0xff, + 0xff, 0x1f, 0xa4, 0x54, 0xab, 0x09, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xaa, + 0xba, 0xf2, 0xff, 0xff, 0xff, 0xff, 0x41, 0xaa, 0x5a, 0x25, 0xf8, 0xff, + 0xff, 0xff, 0x0f, 0xd5, 0x4a, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xa4, + 0x4a, 0x02, 0xfc, 0xff, 0xff, 0xff, 0x4f, 0xa4, 0x2a, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x11, 0x29, 0x91, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x52, + 0x95, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x44, 0xc4, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x90, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0x12, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x08, 0x91, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff}; diff --git a/bitmaps/l-linux1.xbm b/bitmaps/l-linux1.xbm new file mode 100644 index 00000000..4d155e53 --- /dev/null +++ b/bitmaps/l-linux1.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, + 0x20, 0x00, 0x00, 0xc2, 0x12, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, + 0x46, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x61, 0x04, 0x20, 0x80, 0x00, + 0x02, 0x08, 0x20, 0x20, 0x2c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x30, + 0x88, 0xf0, 0x7f, 0x08, 0x21, 0x84, 0x10, 0x12, 0x58, 0x22, 0x40, 0x21, + 0x84, 0x10, 0x42, 0x18, 0x10, 0x28, 0x40, 0x84, 0x10, 0x42, 0x08, 0x09, + 0x30, 0x61, 0xe0, 0x10, 0x42, 0x08, 0x21, 0x0c, 0x60, 0xc4, 0x30, 0x42, + 0x08, 0x21, 0x84, 0x04, 0xe0, 0xd2, 0x50, 0x29, 0xa5, 0x94, 0x52, 0x06, + 0x40, 0xa5, 0x90, 0x52, 0x4a, 0x29, 0xa5, 0x02, 0xc0, 0xca, 0x38, 0xa5, + 0x94, 0x52, 0x4a, 0x03, 0x80, 0xb5, 0xf8, 0xff, 0xfb, 0xef, 0xff, 0x3f, + 0x80, 0xdb, 0x28, 0x0c, 0x8d, 0x38, 0x0c, 0x21, 0x00, 0x77, 0x78, 0x1e, + 0xcb, 0x69, 0x9e, 0x31, 0x00, 0x6f, 0x78, 0x16, 0xce, 0x79, 0x9e, 0x19, + 0x00, 0x7a, 0x6c, 0x1e, 0xc6, 0x38, 0x9b, 0x0c, 0x00, 0x7e, 0x3c, 0x1e, + 0xe6, 0x3c, 0x1f, 0x04, 0x00, 0x7c, 0x3c, 0x8e, 0xe4, 0x3c, 0x1f, 0x06, + 0x00, 0x2c, 0x3c, 0x8f, 0xe4, 0x1c, 0x1f, 0x03, 0x00, 0x38, 0x3c, 0xcf, + 0x64, 0x9c, 0x0f, 0x01, 0x00, 0x38, 0x1e, 0xc7, 0x70, 0x9e, 0x07, 0x01, + 0x00, 0x30, 0x1e, 0xc7, 0x71, 0x9e, 0x27, 0x01, 0x00, 0x30, 0x9e, 0xe7, + 0x71, 0x8e, 0x33, 0x01, 0x00, 0x10, 0x9e, 0xe7, 0x79, 0xc0, 0x31, 0x03, + 0x00, 0x10, 0x0e, 0xc3, 0xf9, 0xe0, 0x10, 0x02, 0xff, 0x1f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1f, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x01, 0x13, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xf1, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x0c, 0xfe, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x06, 0x7e, 0xf8, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/l-mot.xbm b/bitmaps/l-mot.xbm new file mode 100644 index 00000000..db0e78df --- /dev/null +++ b/bitmaps/l-mot.xbm @@ -0,0 +1,67 @@ +#define image_width 76 +#define image_height 76 +static unsigned char image_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, + 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0xfc, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, + 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x01, 0x1e, + 0x00, 0x00, 0x00, 0xe0, 0x01, 0x0c, 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, + 0x00, 0x70, 0x00, 0x0c, 0x00, 0x80, 0x01, 0x70, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x0c, 0x00, 0x80, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1e, + 0x00, 0x80, 0x03, 0xc0, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x80, + 0x03, 0x80, 0x03, 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0xc0, 0x03, 0x00, + 0x03, 0x00, 0x00, 0x07, 0x00, 0x1e, 0x00, 0xc0, 0x07, 0x00, 0x07, 0x00, + 0x80, 0x03, 0x00, 0x3f, 0x00, 0xc0, 0x07, 0x00, 0x0e, 0x00, 0x80, 0x01, + 0x00, 0x3f, 0x00, 0xe0, 0x07, 0x00, 0x0c, 0x00, 0xc0, 0x01, 0x00, 0x3f, + 0x00, 0xe0, 0x0f, 0x00, 0x18, 0x00, 0xc0, 0x00, 0x80, 0x7f, 0x00, 0xe0, + 0x0f, 0x00, 0x38, 0x00, 0xe0, 0x00, 0x80, 0x7f, 0x00, 0xf0, 0x0f, 0x00, + 0x30, 0x00, 0x60, 0x00, 0x80, 0x7f, 0x00, 0xf0, 0x1f, 0x00, 0x70, 0x00, + 0x70, 0x00, 0xc0, 0xff, 0x00, 0xf0, 0x1f, 0x00, 0x60, 0x00, 0x30, 0x00, + 0xc0, 0xff, 0x00, 0xf0, 0x1f, 0x00, 0x60, 0x00, 0x30, 0x00, 0xc0, 0xff, + 0x00, 0xf8, 0x3f, 0x00, 0xe0, 0x00, 0x38, 0x00, 0xc0, 0xff, 0x01, 0xf8, + 0x3f, 0x00, 0xc0, 0x00, 0x18, 0x00, 0xe0, 0xff, 0x01, 0xf8, 0x3f, 0x00, + 0xc0, 0x00, 0x18, 0x00, 0xe0, 0xff, 0x01, 0xfc, 0x7f, 0x00, 0xc0, 0x01, + 0x18, 0x00, 0xe0, 0xff, 0x03, 0xfc, 0x7f, 0x00, 0x80, 0x01, 0x1c, 0x00, + 0xf0, 0xff, 0x03, 0xfc, 0x7f, 0x00, 0x80, 0x01, 0x0c, 0x00, 0xf0, 0xff, + 0x03, 0xfc, 0x7f, 0x00, 0x80, 0x01, 0x0c, 0x00, 0xf0, 0xff, 0x03, 0xfe, + 0xff, 0x00, 0x80, 0x01, 0x0c, 0x00, 0xf8, 0xff, 0x07, 0xfe, 0xff, 0x00, + 0x80, 0x01, 0x0c, 0x00, 0xf8, 0xff, 0x07, 0xfe, 0xff, 0x00, 0x80, 0x03, + 0x0c, 0x00, 0xf8, 0xff, 0x07, 0xff, 0xff, 0x01, 0x00, 0x03, 0x0c, 0x00, + 0xf8, 0xff, 0x0f, 0xff, 0xff, 0x01, 0x00, 0x03, 0x0c, 0x00, 0xfc, 0xc1, + 0x0f, 0x1f, 0xf8, 0x01, 0x00, 0x03, 0x0c, 0x00, 0x7c, 0x00, 0x8f, 0x0f, + 0xe0, 0x03, 0x00, 0x03, 0x0c, 0x00, 0x3c, 0x00, 0x9e, 0x07, 0xc0, 0x03, + 0x00, 0x03, 0x0c, 0x00, 0x1e, 0x00, 0x9c, 0x03, 0x80, 0x03, 0x80, 0x01, + 0x0c, 0x00, 0x0e, 0x00, 0x9c, 0x01, 0x80, 0x07, 0x80, 0x01, 0x0c, 0x00, + 0x0e, 0x00, 0xf8, 0x01, 0x00, 0x07, 0x80, 0x01, 0x1c, 0x00, 0x06, 0x00, + 0xf0, 0x00, 0x00, 0x07, 0x80, 0x01, 0x18, 0x00, 0x07, 0x00, 0x70, 0x00, + 0x00, 0x06, 0x80, 0x01, 0x18, 0x00, 0x07, 0x00, 0x60, 0x00, 0x00, 0x0e, + 0xc0, 0x01, 0x18, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0c, 0xc0, 0x00, + 0x38, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x30, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xc0, 0x00, 0x30, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x18, 0xe0, 0x00, 0x70, 0xc0, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x60, 0x00, 0x60, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x70, 0x00, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, + 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x00, 0xc0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, + 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, + 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xfc, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 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}; diff --git a/bitmaps/l-sco.xbm b/bitmaps/l-sco.xbm new file mode 100644 index 00000000..e0c439d6 --- /dev/null +++ b/bitmaps/l-sco.xbm @@ -0,0 +1,20 @@ +#define image_width 76 +#define image_height 25 +static char image_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x07,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x3f,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x07,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0x1f,0xf0,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,0xf0,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0xff, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,0x00,0xf0,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x78,0x00,0xf0, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0xf0,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x07,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; diff --git a/bitmaps/l-sgi.xbm b/bitmaps/l-sgi.xbm new file mode 100644 index 00000000..5f4c5e4e --- /dev/null +++ b/bitmaps/l-sgi.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, + 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, + 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x01, 0x00, + 0x00, 0x80, 0xff, 0x7c, 0x7c, 0xfe, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x7c, 0x7c, 0xf0, 0x3f, 0x00, + 0x00, 0xfc, 0x07, 0x7c, 0x7c, 0xc0, 0x7f, 0x00, 0x00, 0xff, 0x01, 0x7c, + 0x7c, 0x00, 0xff, 0x01, 0x00, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x01, + 0x80, 0x3f, 0x00, 0x7c, 0x7c, 0x00, 0xf8, 0x03, 0x00, 0xff, 0x00, 0x7c, + 0x7c, 0x00, 0xfe, 0x01, 0x00, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x01, + 0x00, 0xfc, 0x0f, 0x7c, 0x7c, 0xe0, 0x7f, 0x00, 0x40, 0xf0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x1f, 0x04, 0xf0, 0xe1, 0xff, 0x7c, 0x7c, 0xfe, 0x0f, 0x1f, + 0xf8, 0x87, 0xff, 0x73, 0x9c, 0xff, 0xc3, 0x3f, 0xf8, 0x0f, 0xfe, 0x4f, + 0xe4, 0xff, 0xe0, 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x7f, + 0xfc, 0xff, 0xe0, 0xff, 0xff, 0x0f, 0xfe, 0x7f, 0xfc, 0xff, 0x83, 0xff, + 0xff, 0x83, 0xff, 0x7f, 0xfc, 0xff, 0x07, 0xff, 0xff, 0xc1, 0xff, 0x7f, + 0x7c, 0xfe, 0x1f, 0xfc, 0x7f, 0xf0, 0xff, 0x7c, 0x7c, 0xf8, 0x7f, 0xf2, + 0x9f, 0xfc, 0x3f, 0x7c, 0x7c, 0xe0, 0xff, 0xcd, 0x67, 0xfe, 0x0f, 0x7c, + 0x7c, 0xc0, 0xff, 0x33, 0x99, 0xff, 0x07, 0x7c, 0x7c, 0x00, 0xff, 0x0f, + 0xe0, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xfc, 0x3f, 0xf8, 0x7f, 0x00, 0x7c, + 0x7c, 0x00, 0xf2, 0x7f, 0xfc, 0x9f, 0x00, 0x7c, 0x7c, 0x80, 0xcf, 0x7f, + 0xfd, 0xe7, 0x03, 0x7c, 0x7c, 0xe0, 0xbf, 0x7f, 0xfd, 0xf9, 0x0f, 0x7c, + 0x7c, 0xf8, 0x7f, 0x7e, 0xfd, 0xfc, 0x3f, 0x7c, 0x7c, 0xfe, 0x0f, 0x7c, + 0x7d, 0xe0, 0xff, 0x7c, 0xfc, 0xff, 0x83, 0x7d, 0x7d, 0x83, 0xff, 0x7f, + 0xfc, 0xff, 0xe0, 0x7d, 0x7d, 0x0f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x7d, + 0x7c, 0x3f, 0xf8, 0x7f, 0xfc, 0x0f, 0xfe, 0x7d, 0x7c, 0xff, 0xe0, 0x7f, + 0xfc, 0x03, 0xff, 0x7d, 0x7c, 0xff, 0x81, 0x7f, 0xf8, 0xc0, 0xff, 0x7d, + 0x7c, 0xff, 0x07, 0x3e, 0x30, 0xf0, 0xff, 0x7c, 0x7c, 0xfe, 0x1f, 0x18, + 0x00, 0xfc, 0x3f, 0x7c, 0x7c, 0xf8, 0x7f, 0x00, 0x00, 0xff, 0x0f, 0x7c, + 0x7c, 0xe0, 0xff, 0x01, 0x80, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x03, + 0x80, 0xff, 0x00, 0x7c, 0x7c, 0x00, 0xfe, 0x03, 0xc0, 0x3f, 0x00, 0x7c, + 0x7c, 0x00, 0xf8, 0x07, 0xc0, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x07, + 0x80, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xff, 0x03, 0x80, 0xff, 0x07, 0x7c, + 0x7c, 0xc0, 0xff, 0x03, 0x00, 0xfe, 0x1f, 0x7c, 0x7c, 0xf0, 0xff, 0x00, + 0x00, 0xf8, 0x7f, 0x7c, 0x7c, 0xfc, 0x3f, 0x00, 0x00, 0xe0, 0xff, 0x7d, + 0x7c, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x7f, 0xfc, 0xff, 0x03, 0x00, + 0x00, 0x00, 0xfe, 0x7f, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, + 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/l-sun.xbm b/bitmaps/l-sun.xbm new file mode 100644 index 00000000..681167f1 --- /dev/null +++ b/bitmaps/l-sun.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfe, + 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0xfd, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xfd, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, + 0xf7, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf4, 0xf7, 0xef, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xee, 0xef, 0xdf, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xdf, + 0xbf, 0xff, 0x00, 0x00, 0x00, 0x80, 0xbf, 0xbf, 0x7f, 0xff, 0x00, 0x00, + 0x00, 0x80, 0x7f, 0x7f, 0xff, 0x7e, 0x03, 0x00, 0x00, 0x60, 0xff, 0xfe, + 0xfe, 0xbd, 0x07, 0x00, 0x00, 0xf0, 0xfe, 0xfd, 0xfd, 0xdb, 0x0f, 0x00, + 0x00, 0xf8, 0xfd, 0xfb, 0xfb, 0xe7, 0x1f, 0x00, 0x00, 0xfc, 0xfb, 0xf7, + 0xf7, 0xf7, 0x2f, 0x00, 0x00, 0xfe, 0xf5, 0xef, 0xef, 0xfb, 0x77, 0x00, + 0x00, 0xff, 0xee, 0xdf, 0xcf, 0xfd, 0xfb, 0x00, 0x80, 0x7f, 0xdf, 0xbf, + 0x9f, 0xfe, 0xfd, 0x01, 0xc0, 0xbf, 0xbf, 0xff, 0x1f, 0xff, 0xfe, 0x00, + 0xe0, 0xdf, 0x1f, 0xff, 0x9f, 0x7f, 0x7f, 0x00, 0xf0, 0xef, 0x0f, 0xfe, + 0xcf, 0xbf, 0x3f, 0x07, 0xf8, 0xf7, 0xe7, 0xfc, 0xef, 0xdf, 0xdf, 0x1f, + 0xfc, 0xfb, 0xfb, 0xfb, 0xf7, 0xef, 0xef, 0x3f, 0xfe, 0xfd, 0xfd, 0xe7, + 0xf9, 0xf7, 0xf7, 0x7f, 0xfe, 0xfe, 0xfe, 0x07, 0xf8, 0xfb, 0xfb, 0x7f, + 0x7f, 0x7f, 0xff, 0x0f, 0xfc, 0xfd, 0xfd, 0xff, 0xbf, 0xbf, 0xff, 0x0f, + 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xdf, 0xdf, 0x0f, 0xfc, 0x7f, 0xff, 0xfe, + 0xff, 0xef, 0xef, 0x0f, 0xfc, 0xbf, 0x7f, 0xff, 0xfe, 0xf7, 0xf7, 0x07, + 0xf8, 0xdf, 0xbf, 0x7f, 0xfe, 0xfb, 0xfb, 0xe7, 0xf9, 0xef, 0xdf, 0x7f, + 0xfc, 0xfd, 0xfd, 0xfb, 0xf7, 0xf7, 0xef, 0x3f, 0x70, 0xfe, 0xfe, 0xfd, + 0xcf, 0xf9, 0xf7, 0x1f, 0x00, 0x7f, 0xff, 0xfc, 0x1f, 0xfc, 0xfb, 0x0f, + 0x80, 0xbf, 0x7f, 0xfe, 0x3f, 0xfe, 0xfd, 0x07, 0xc0, 0xdf, 0x3f, 0xfe, + 0x7f, 0xff, 0xfe, 0x03, 0x80, 0xef, 0x5f, 0x7e, 0xff, 0x7e, 0xff, 0x01, + 0x00, 0xf7, 0xef, 0xfc, 0xfe, 0xbd, 0xff, 0x00, 0x00, 0xfa, 0xf7, 0xfd, + 0xfd, 0xdb, 0x7f, 0x00, 0x00, 0xfc, 0xfb, 0xfb, 0xfb, 0xe7, 0x3f, 0x00, + 0x00, 0xf8, 0xf9, 0xf7, 0xf7, 0xef, 0x1f, 0x00, 0x00, 0xf0, 0xee, 0xef, + 0xef, 0xdf, 0x0f, 0x00, 0x00, 0x60, 0xdf, 0xdf, 0xdf, 0xbf, 0x07, 0x00, + 0x00, 0x80, 0xbf, 0xbf, 0xbf, 0x7f, 0x03, 0x00, 0x00, 0x80, 0x7f, 0x7f, + 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0xfe, 0xfe, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0xfd, 0xfd, 0x7d, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfb, + 0xfb, 0x3b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf7, 0xf7, 0x17, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xef, 0xef, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xdf, + 0xdf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/l-x11.xbm b/bitmaps/l-x11.xbm new file mode 100644 index 00000000..96e306f7 --- /dev/null +++ b/bitmaps/l-x11.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7c, + 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xf8, 0xff, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x0f, + 0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xc0, 0xff, 0x3f, 0x00, + 0x00, 0x00, 0xc0, 0x07, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0x03, + 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xff, 0xff, 0x00, + 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x00, + 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xfc, 0xff, 0x03, + 0x00, 0x00, 0x3e, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, + 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0x0f, + 0x00, 0xc0, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xc0, 0x07, 0x00, + 0x00, 0xc0, 0xff, 0x3f, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x80, 0xff, 0x7f, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0xf8, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x3e, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xcf, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xcf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, + 0xe7, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xf3, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7e, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xcf, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xc3, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc1, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x80, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0x00, 0x7c, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, + 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xfe, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x1f, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x80, 0x0f, 0x00, + 0xf8, 0xff, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0xf0, 0xff, 0x0f, 0x00, + 0x00, 0xe0, 0x03, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0xe0, 0x03, 0x00, + 0xe0, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xc0, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x7c, 0x00, 0x00, + 0x80, 0xff, 0x7f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, + 0x00, 0x3e, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x1f, 0x00, 0x00, + 0x00, 0xfc, 0xff, 0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, + 0xc0, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0xe0, 0x03, 0x00, 0x00, + 0x00, 0xf0, 0xff, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, + 0xf0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0xff, 0x3f, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, + 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff}; diff --git a/bitmaps/l-xlock.xbm b/bitmaps/l-xlock.xbm new file mode 100644 index 00000000..696a608f --- /dev/null +++ b/bitmaps/l-xlock.xbm @@ -0,0 +1,55 @@ +#define image_width 100 +#define image_height 48 +static unsigned char image_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, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf0, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, + 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, + 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, + 0x00, 0x00, 0x3e, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0xfc, + 0xff, 0x1f, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, + 0xf8, 0xff, 0x3f, 0x00, 0xc0, 0x07, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, + 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xfe, 0xff, 0x1f, + 0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xfe, 0xff, + 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0xf8, 0x00, 0x00, 0x00, 0xff, + 0xe1, 0x3f, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x7c, 0x00, 0x00, 0x00, + 0xff, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x3e, 0x00, 0x00, + 0x00, 0x7f, 0x80, 0x3f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x1f, 0x00, + 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x8f, 0x0f, + 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xc7, + 0x07, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xe3, 0x03, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xe0, + 0xff, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, + 0xc0, 0xff, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, + 0x00, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, + 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x07, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0x03, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x80, 0x8f, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xc7, 0xff, 0x3f, 0x00, 0x00, 0xf0, + 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xe0, 0xe3, 0xff, 0x7f, 0x00, 0x00, + 0xf0, 0x3f, 0x3f, 0xff, 0x03, 0x00, 0x00, 0xf0, 0xe1, 0xff, 0xff, 0x00, + 0x00, 0xf0, 0x3f, 0x3f, 0xff, 0x03, 0x00, 0x00, 0xf8, 0xc0, 0xff, 0xff, + 0x01, 0x00, 0xf0, 0x3c, 0x00, 0xcf, 0x03, 0x00, 0x00, 0x7c, 0x80, 0xff, + 0xff, 0x03, 0x00, 0xf0, 0x3c, 0x00, 0xcf, 0x03, 0x00, 0x00, 0x3e, 0x00, + 0xff, 0xff, 0x07, 0x00, 0xf0, 0x3c, 0x3f, 0xcf, 0x03, 0x00, 0x00, 0x1f, + 0x00, 0xfe, 0xff, 0x0f, 0x00, 0xf0, 0x3c, 0x3f, 0xcf, 0x03, 0x00, 0x80, + 0x0f, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0xf0, 0x3c, 0x00, 0xcf, 0x03, 0x00, + 0xc0, 0x07, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf0, 0x3c, 0x00, 0xcf, 0x03, + 0x00, 0xe0, 0x03, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0x3c, 0x3f, 0xcf, + 0x03, 0x00, 0xf0, 0x01, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xf0, 0x3c, 0x3f, + 0xcf, 0x03, 0x00, 0xf8, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0xf0, 0x3c, + 0x00, 0xcf, 0x03, 0x00, 0x7c, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0xf0, + 0x3c, 0x00, 0xcf, 0x03, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, + 0xf0, 0x3c, 0x3f, 0xcf, 0x03, 0x00, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0x0f, 0xf0, 0x3c, 0x3f, 0xcf, 0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xfc, + 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xc0, 0x07, 0x00, 0x00, 0x00, + 0xf8, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xe0, 0x03, 0x00, 0x00, + 0x00, 0xf0, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0xff, 0x03, 0xf0, 0x01, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xff, 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, 0x00}; diff --git a/bitmaps/light_gray.xbm b/bitmaps/light_gray.xbm new file mode 100644 index 00000000..ed1e0beb --- /dev/null +++ b/bitmaps/light_gray.xbm @@ -0,0 +1,4 @@ +#define light_gray_width 4 +#define light_gray_height 2 +static unsigned char light_gray_bits[] = { + 0x08, 0x02}; diff --git a/bitmaps/m-bob.xbm b/bitmaps/m-bob.xbm new file mode 100644 index 00000000..f6ba484e --- /dev/null +++ b/bitmaps/m-bob.xbm @@ -0,0 +1,43 @@ +#define image_width 61 +#define image_height 75 +static unsigned char image_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/bitmaps/m-bsd.xbm b/bitmaps/m-bsd.xbm new file mode 100644 index 00000000..8cb527fa --- /dev/null +++ b/bitmaps/m-bsd.xbm @@ -0,0 +1,39 @@ +#define image_width 50 +#define image_height 50 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe3, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x06, 0x14, 0x00, + 0x00, 0x00, 0x80, 0x06, 0x1c, 0x3c, 0x00, 0x00, 0x00, 0x80, 0x03, 0x38, + 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x70, 0x2c, 0x00, 0x00, 0x00, 0x00, + 0x19, 0xe0, 0x27, 0x00, 0x00, 0x00, 0x00, 0x25, 0x03, 0x30, 0x00, 0x00, + 0x00, 0x80, 0xa4, 0x04, 0x18, 0x00, 0x00, 0x00, 0x80, 0xbe, 0x04, 0x07, + 0x00, 0x00, 0x00, 0x40, 0x9a, 0x45, 0x01, 0x00, 0x00, 0x00, 0x20, 0x5e, + 0x85, 0x00, 0x00, 0x00, 0x00, 0x20, 0xcc, 0x87, 0x00, 0x00, 0x00, 0x80, + 0x20, 0xc4, 0xc3, 0x00, 0x00, 0x00, 0x80, 0x23, 0x84, 0x81, 0x00, 0x00, + 0x00, 0x00, 0x43, 0x3d, 0x60, 0x00, 0x00, 0x00, 0x20, 0x86, 0x02, 0x70, + 0x00, 0x00, 0x00, 0xe0, 0x06, 0x8d, 0x39, 0x00, 0x00, 0x00, 0xc0, 0x06, + 0x7a, 0x1c, 0x00, 0x00, 0x00, 0x88, 0x07, 0x06, 0x0e, 0x00, 0x00, 0x00, + 0x18, 0xcf, 0xfa, 0x06, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x03, 0x06, 0x00, + 0x00, 0x00, 0xc0, 0x38, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x03, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x50, 0x34, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x30, 0x7d, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0xa0, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc5, 0x05, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe8, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x10, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0e, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, + 0xc8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x74, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x53, 0x88, 0xdf, 0x01, 0x00, 0x00, 0x80, 0x25, 0x09, 0xf0, 0x07, + 0x00, 0x00, 0x70, 0x9d, 0x18, 0x00, 0x0e, 0x00, 0x00, 0x4c, 0x4f, 0x18, + 0x00, 0x0c, 0x00, 0x00, 0x82, 0x3c, 0x0c, 0x80, 0x0e, 0x00, 0x00, 0x41, + 0x48, 0x03, 0xc0, 0x07, 0x00, 0x00, 0x3e, 0xc0, 0x01, 0x60, 0x01, 0x00, + 0x00, 0xc0, 0x3f, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00}; + +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All Rights Reserved. Used by permission. + */ diff --git a/bitmaps/m-dec.xbm b/bitmaps/m-dec.xbm new file mode 100644 index 00000000..d7378894 --- /dev/null +++ b/bitmaps/m-dec.xbm @@ -0,0 +1,27 @@ +#define image_width 82 +#define image_height 26 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0xef, 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, + 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, + 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0xff, + 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0xff, 0xf7, + 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xec, 0x79, 0xff, 0xf7, 0xbc, + 0xff, 0xfb, 0xbf, 0xe7, 0x01, 0xfe, 0xec, 0x79, 0xff, 0xf7, 0xbc, 0xc7, + 0xfb, 0xbf, 0xe7, 0x01, 0xfe, 0xec, 0x79, 0xff, 0xf7, 0xbc, 0xc7, 0xfb, + 0xbf, 0xe7, 0x01, 0xfe, 0xec, 0x7f, 0xff, 0xf7, 0xbf, 0xc7, 0xfb, 0xbf, + 0xe7, 0x01, 0x0e, 0xec, 0x79, 0x0f, 0xf6, 0xbc, 0x83, 0x3b, 0xb8, 0xe7, + 0x01, 0x06, 0xec, 0x79, 0x07, 0xf6, 0xbc, 0x83, 0x1b, 0xb0, 0xe7, 0x01, + 0x46, 0xec, 0x79, 0x23, 0xf6, 0xbc, 0xc7, 0xfb, 0xb1, 0xe7, 0x01, 0xe6, + 0xec, 0x79, 0x73, 0xf6, 0xbc, 0xc7, 0x3b, 0xb0, 0xe7, 0x01, 0xe6, 0xec, + 0x79, 0x73, 0xf6, 0xbc, 0xc7, 0x1b, 0xb0, 0xe7, 0x01, 0xe6, 0xec, 0x79, + 0x73, 0xf6, 0xbc, 0xc7, 0x9b, 0xb1, 0xe7, 0x01, 0x46, 0xec, 0x79, 0x23, + 0xf6, 0xbc, 0xc7, 0x9b, 0xb1, 0xe7, 0x01, 0x06, 0xec, 0x79, 0x07, 0xf6, + 0xbc, 0x87, 0x1b, 0xb0, 0xe7, 0x01, 0x1e, 0xec, 0x79, 0x0f, 0xf6, 0xbc, + 0x8f, 0x3b, 0xb0, 0xe7, 0x01, 0xfe, 0xef, 0x7f, 0x7f, 0xf6, 0xbf, 0xff, + 0xfb, 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0x23, 0xf6, 0xbf, 0xff, 0xfb, + 0xbf, 0xff, 0x01, 0xfe, 0xef, 0x7f, 0x07, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, + 0xff, 0x01, 0xfe, 0xef, 0x7f, 0x9f, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, + 0x01, 0xfe, 0xef, 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, + 0xfe, 0xef, 0x7f, 0xff, 0xf7, 0xbf, 0xff, 0xfb, 0xbf, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/m-ghost.xbm b/bitmaps/m-ghost.xbm new file mode 100644 index 00000000..fa40be13 --- /dev/null +++ b/bitmaps/m-ghost.xbm @@ -0,0 +1,41 @@ +#define image_width 58 +#define image_height 57 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0x07, 0xff, + 0xff, 0xc1, 0x07, 0x00, 0x00, 0xff, 0x03, 0xfe, 0xff, 0x80, 0x1f, 0x00, + 0x80, 0xff, 0x01, 0xfc, 0x7f, 0x00, 0x1f, 0x00, 0x80, 0xff, 0x01, 0xfc, + 0x7f, 0x00, 0x3f, 0x00, 0xc0, 0xff, 0x80, 0xf9, 0x3f, 0x40, 0x3e, 0x00, + 0xe0, 0x7f, 0xc0, 0xfb, 0x1f, 0xf0, 0x7e, 0x00, 0xf0, 0x7f, 0xf0, 0xf3, + 0x1f, 0xf8, 0x7c, 0x00, 0xf0, 0x3f, 0xf8, 0xf7, 0x0f, 0xfc, 0x7d, 0x00, + 0xf8, 0x3f, 0xfc, 0xf3, 0x0f, 0xfe, 0x7c, 0x00, 0xf8, 0x3f, 0xfe, 0xfb, + 0x0f, 0xff, 0xfe, 0x00, 0xf8, 0x3f, 0xfe, 0xfb, 0x0f, 0xff, 0xfe, 0x00, + 0xfc, 0x3f, 0xfe, 0xf9, 0x0f, 0x7f, 0xfe, 0x00, 0xfc, 0x7f, 0xff, 0xf9, + 0x9f, 0x7f, 0xfe, 0x00, 0xfe, 0x7f, 0xfe, 0xfc, 0x9f, 0x3f, 0xff, 0x01, + 0xfe, 0xff, 0xfc, 0xfe, 0x3f, 0x9f, 0xff, 0x01, 0xfe, 0xff, 0x39, 0xff, + 0x7f, 0xc0, 0xff, 0x01, 0xff, 0xff, 0x87, 0xff, 0xff, 0xe1, 0xff, 0x01, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0x3f, 0xde, + 0xf3, 0xff, 0xff, 0x03, 0xff, 0xff, 0x07, 0xde, 0x83, 0xff, 0xff, 0x03, + 0xff, 0xff, 0x03, 0xde, 0x03, 0xf8, 0xff, 0x03, 0xff, 0xff, 0x01, 0xde, + 0x03, 0xe0, 0xff, 0x03, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, + 0xff, 0x3f, 0x80, 0xff, 0x1f, 0x80, 0xff, 0x03, 0xff, 0x1f, 0xf0, 0xff, + 0xff, 0x03, 0xff, 0x03, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x0f, 0xfe, 0x03, + 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xff, 0xfd, 0xf7, 0xef, 0xef, 0xef, 0xdf, 0x03, + 0x7f, 0xf8, 0xe1, 0xc7, 0xc7, 0xcf, 0x8f, 0x03, 0x3e, 0xf0, 0xc0, 0xc3, + 0x83, 0x87, 0x07, 0x03, 0x1c, 0x60, 0x80, 0x01, 0x00, 0x03, 0x03, 0x00}; diff --git a/bitmaps/m-grelb.xbm b/bitmaps/m-grelb.xbm new file mode 100644 index 00000000..acadb2d8 --- /dev/null +++ b/bitmaps/m-grelb.xbm @@ -0,0 +1,25 @@ +#define image_width 40 +#define image_height 44 +static unsigned char image_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, 0x80, 0x1f, 0x00, 0xf0, 0x03, 0x40, 0x30, 0x00, 0x18, 0x04, 0x00, + 0x20, 0xff, 0x09, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0xff, + 0x3f, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, + 0x80, 0xff, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0xff, 0x03, 0xc0, 0x1f, + 0xff, 0xf1, 0x07, 0xc0, 0x0f, 0xfe, 0xe0, 0x07, 0xc0, 0x0f, 0xfe, 0xe0, + 0x07, 0xc0, 0x1f, 0xff, 0xf1, 0x07, 0xc0, 0xff, 0xff, 0xff, 0x07, 0x80, + 0xff, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, + 0xff, 0x01, 0x00, 0xfe, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xff, 0x3f, 0x00, + 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00, + 0xc7, 0x01, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, + 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, + 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x82, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, + 0x00, 0xfe, 0x83, 0xff, 0x00, 0x00, 0xff, 0xc7, 0xff, 0x01, 0x00, 0xfe, + 0x83, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00}; +/* + * "Life. Don't talk to me about life" -Marvin the Paranoid Android + */ diff --git a/bitmaps/m-hp.xbm b/bitmaps/m-hp.xbm new file mode 100644 index 00000000..1be38008 --- /dev/null +++ b/bitmaps/m-hp.xbm @@ -0,0 +1,20 @@ +#define image_width 46 +#define image_height 34 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xff, 0x79, 0xfe, 0xff, 0xc1, + 0xf8, 0xff, 0x39, 0xfe, 0xff, 0xc7, 0xfc, 0xff, 0x3d, 0xfc, 0xff, 0xcf, + 0xfc, 0xff, 0x3c, 0xe0, 0xff, 0xcf, 0xfe, 0x7f, 0x1c, 0x80, 0xff, 0xdf, + 0xfe, 0x3f, 0x1c, 0x00, 0xff, 0xdf, 0xfe, 0x1f, 0x1e, 0x00, 0xfe, 0xdf, + 0xfe, 0x0f, 0x1e, 0x00, 0xfc, 0xdf, 0xfe, 0x07, 0x0e, 0x00, 0xf8, 0xdf, + 0xfe, 0x07, 0x0f, 0x00, 0xf8, 0xdf, 0xfe, 0x03, 0x7f, 0xfc, 0xf1, 0xdf, + 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, + 0xfe, 0x81, 0xf7, 0xde, 0xe3, 0xdf, 0xfe, 0x81, 0x77, 0xde, 0xe1, 0xdf, + 0xfe, 0x81, 0x73, 0xce, 0xe1, 0xdf, 0xfe, 0xc1, 0x7b, 0xee, 0xe1, 0xdf, + 0xfe, 0xc1, 0x7b, 0xef, 0xe1, 0xdf, 0xfe, 0xc1, 0x3b, 0xe7, 0xe0, 0xdf, + 0xfe, 0xc3, 0x39, 0xff, 0xf0, 0xdf, 0xfe, 0xe3, 0xbd, 0xff, 0xf0, 0xdf, + 0xfe, 0xe3, 0xbd, 0x7f, 0xf0, 0xdf, 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, + 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, 0xfe, 0x0f, 0xc0, 0x03, 0xfc, 0xdf, + 0xfe, 0x1f, 0xc0, 0x03, 0xfe, 0xdf, 0xfe, 0x3f, 0xc0, 0x01, 0xff, 0xdf, + 0xfe, 0x7f, 0xc0, 0x81, 0xff, 0xdf, 0xfc, 0xff, 0xe1, 0xe1, 0xff, 0xcf, + 0xfc, 0xff, 0xe7, 0xfc, 0xff, 0xcf, 0xf8, 0xff, 0xe7, 0xfc, 0xff, 0xc7, + 0xe0, 0xff, 0xf3, 0xfc, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0}; diff --git a/bitmaps/m-ibm.xbm b/bitmaps/m-ibm.xbm new file mode 100644 index 00000000..203c6ded --- /dev/null +++ b/bitmaps/m-ibm.xbm @@ -0,0 +1,32 @@ +#define image_width 78 +#define image_height 34 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xf8, 0xff, + 0x3f, 0xf0, 0xff, 0x00, 0xff, 0xcf, 0xfc, 0xff, 0xf8, 0xff, 0x7f, 0xf0, + 0xff, 0x00, 0xff, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xfc, 0xff, 0xf8, 0xff, 0xff, 0xf1, 0xff, 0xc1, 0xff, 0xcf, 0xfc, 0xff, + 0xf8, 0xff, 0xff, 0xf1, 0xff, 0xc1, 0xff, 0xcf, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0xff, 0xe3, + 0xff, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0xff, 0xe3, 0xff, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x0f, 0x80, 0xff, + 0xff, 0x00, 0xff, 0xf7, 0xff, 0xc0, 0xc0, 0x0f, 0x80, 0xff, 0x7f, 0x00, + 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xc0, 0x0f, 0x80, 0xff, 0x7f, 0x00, 0xbf, 0xff, 0xfd, 0xc0, 0xc0, 0x0f, + 0x80, 0xff, 0x7f, 0x00, 0xbf, 0xff, 0xfd, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0x3f, 0x7f, + 0xfc, 0xc0, 0xc0, 0x0f, 0x80, 0x1f, 0xf8, 0x01, 0x3f, 0x7f, 0xfc, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xf8, 0xff, + 0xff, 0xf1, 0x3f, 0x3e, 0xfc, 0xcf, 0xfc, 0xff, 0xf8, 0xff, 0xff, 0xf1, + 0x3f, 0x3e, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xfc, 0xff, 0xf8, 0xff, 0x7f, 0xf0, 0x3f, 0x1c, 0xfc, 0xcf, 0xfc, 0xff, + 0xf8, 0xff, 0x3f, 0xf0, 0x3f, 0x1c, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0}; diff --git a/bitmaps/m-linux.xbm b/bitmaps/m-linux.xbm new file mode 100644 index 00000000..db3befec --- /dev/null +++ b/bitmaps/m-linux.xbm @@ -0,0 +1,53 @@ +#define image_width 64 +#define image_height 75 +static unsigned char image_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, + 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, + 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xff, + 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x04, 0x1c, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0x07, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x0f, + 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x9f, 0x08, 0x63, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xbf, 0x1c, 0x61, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x08, + 0x61, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf9, 0x61, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0x3f, 0x69, 0x37, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, + 0x3d, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xba, 0x6f, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0x3f, 0xf7, 0x5b, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x7d, + 0x6b, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0x1c, 0xc0, 0xff, 0xff, + 0xff, 0xff, 0x3f, 0x01, 0x77, 0x80, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xd7, + 0xf9, 0x80, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x27, 0xfe, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x1f, 0xdf, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, + 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0x03, 0xfc, 0xff, + 0xff, 0xff, 0xc7, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xe3, 0xff, + 0xff, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0x03, 0xf0, 0xff, + 0xff, 0xff, 0xe1, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xff, 0xf0, 0xff, + 0xff, 0x07, 0xe0, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0x0f, 0xc0, 0xff, + 0xff, 0x7f, 0xf0, 0xff, 0xff, 0x0f, 0x80, 0xff, 0xff, 0x3f, 0xf8, 0xff, + 0xff, 0x1f, 0x80, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0xff, + 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xff, 0x1f, 0xfc, 0xff, + 0xff, 0x3f, 0x00, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0xfe, + 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0x0f, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0xfe, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, + 0xff, 0x07, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0x07, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0xfc, 0xff, 0x83, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, + 0xff, 0x81, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0x81, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0xfc, 0xff, 0x81, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, + 0xff, 0x89, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0xbf, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0xfc, 0xff, 0x77, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0xfe, + 0xff, 0xdd, 0xfc, 0xff, 0xff, 0xf7, 0x00, 0xff, 0xff, 0xfe, 0xf9, 0xff, + 0xff, 0x5f, 0x00, 0xff, 0x7f, 0x6b, 0xf1, 0xff, 0xff, 0x77, 0x80, 0xfd, + 0x5f, 0xff, 0xe3, 0xff, 0xff, 0x6f, 0xc1, 0xff, 0xed, 0xb5, 0x82, 0xff, + 0xff, 0xbf, 0xea, 0xfe, 0xbd, 0xff, 0x07, 0xff, 0xff, 0x6f, 0x5b, 0xff, + 0xf7, 0xde, 0x0b, 0xfe, 0xff, 0xe7, 0xf5, 0xfb, 0xbf, 0xb7, 0x0e, 0xfe, + 0xff, 0x57, 0xbf, 0xfd, 0x6b, 0xfb, 0x1b, 0xfe, 0xff, 0xef, 0xed, 0xee, + 0xfd, 0x5f, 0xbf, 0xff, 0xff, 0xb1, 0xfb, 0xbd, 0xb7, 0xfd, 0xab, 0xff, + 0xff, 0xd0, 0xef, 0xf7, 0xed, 0xaf, 0xfe, 0xff, 0x7f, 0x60, 0xbf, 0xff, + 0xbb, 0xfb, 0x5b, 0xff, 0x1f, 0xf0, 0xfb, 0xad, 0xfd, 0xbe, 0x7f, 0xfe, + 0x07, 0x50, 0x6f, 0xff, 0xd7, 0xf7, 0xaa, 0x00, 0x00, 0xf0, 0xdd, 0xf7, + 0x6b, 0xdd, 0x7f, 0x00, 0x00, 0xd0, 0xff, 0xfc, 0xa9, 0x76, 0xaf, 0x00, + 0x00, 0xa8, 0x56, 0xff, 0x5f, 0xa9, 0x35, 0x00, 0x00, 0x60, 0xab, 0xff, + 0xff, 0xa5, 0x16, 0xfc, 0xff, 0x93, 0xca, 0xff, 0xff, 0x9f, 0x48, 0xff, + 0xff, 0x47, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; diff --git a/bitmaps/m-linux1.xbm b/bitmaps/m-linux1.xbm new file mode 100644 index 00000000..4d155e53 --- /dev/null +++ b/bitmaps/m-linux1.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, + 0x20, 0x00, 0x00, 0xc2, 0x12, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, + 0x46, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x61, 0x04, 0x20, 0x80, 0x00, + 0x02, 0x08, 0x20, 0x20, 0x2c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x30, + 0x88, 0xf0, 0x7f, 0x08, 0x21, 0x84, 0x10, 0x12, 0x58, 0x22, 0x40, 0x21, + 0x84, 0x10, 0x42, 0x18, 0x10, 0x28, 0x40, 0x84, 0x10, 0x42, 0x08, 0x09, + 0x30, 0x61, 0xe0, 0x10, 0x42, 0x08, 0x21, 0x0c, 0x60, 0xc4, 0x30, 0x42, + 0x08, 0x21, 0x84, 0x04, 0xe0, 0xd2, 0x50, 0x29, 0xa5, 0x94, 0x52, 0x06, + 0x40, 0xa5, 0x90, 0x52, 0x4a, 0x29, 0xa5, 0x02, 0xc0, 0xca, 0x38, 0xa5, + 0x94, 0x52, 0x4a, 0x03, 0x80, 0xb5, 0xf8, 0xff, 0xfb, 0xef, 0xff, 0x3f, + 0x80, 0xdb, 0x28, 0x0c, 0x8d, 0x38, 0x0c, 0x21, 0x00, 0x77, 0x78, 0x1e, + 0xcb, 0x69, 0x9e, 0x31, 0x00, 0x6f, 0x78, 0x16, 0xce, 0x79, 0x9e, 0x19, + 0x00, 0x7a, 0x6c, 0x1e, 0xc6, 0x38, 0x9b, 0x0c, 0x00, 0x7e, 0x3c, 0x1e, + 0xe6, 0x3c, 0x1f, 0x04, 0x00, 0x7c, 0x3c, 0x8e, 0xe4, 0x3c, 0x1f, 0x06, + 0x00, 0x2c, 0x3c, 0x8f, 0xe4, 0x1c, 0x1f, 0x03, 0x00, 0x38, 0x3c, 0xcf, + 0x64, 0x9c, 0x0f, 0x01, 0x00, 0x38, 0x1e, 0xc7, 0x70, 0x9e, 0x07, 0x01, + 0x00, 0x30, 0x1e, 0xc7, 0x71, 0x9e, 0x27, 0x01, 0x00, 0x30, 0x9e, 0xe7, + 0x71, 0x8e, 0x33, 0x01, 0x00, 0x10, 0x9e, 0xe7, 0x79, 0xc0, 0x31, 0x03, + 0x00, 0x10, 0x0e, 0xc3, 0xf9, 0xe0, 0x10, 0x02, 0xff, 0x1f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1f, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x01, 0x13, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xf1, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x0c, 0xfe, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x06, 0x7e, 0xf8, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/m-mot.xbm b/bitmaps/m-mot.xbm new file mode 100644 index 00000000..db0e78df --- /dev/null +++ b/bitmaps/m-mot.xbm @@ -0,0 +1,67 @@ +#define image_width 76 +#define image_height 76 +static unsigned char image_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, + 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0xfc, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, + 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x01, 0x1e, + 0x00, 0x00, 0x00, 0xe0, 0x01, 0x0c, 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, + 0x00, 0x70, 0x00, 0x0c, 0x00, 0x80, 0x01, 0x70, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x0c, 0x00, 0x80, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1e, + 0x00, 0x80, 0x03, 0xc0, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x80, + 0x03, 0x80, 0x03, 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0xc0, 0x03, 0x00, + 0x03, 0x00, 0x00, 0x07, 0x00, 0x1e, 0x00, 0xc0, 0x07, 0x00, 0x07, 0x00, + 0x80, 0x03, 0x00, 0x3f, 0x00, 0xc0, 0x07, 0x00, 0x0e, 0x00, 0x80, 0x01, + 0x00, 0x3f, 0x00, 0xe0, 0x07, 0x00, 0x0c, 0x00, 0xc0, 0x01, 0x00, 0x3f, + 0x00, 0xe0, 0x0f, 0x00, 0x18, 0x00, 0xc0, 0x00, 0x80, 0x7f, 0x00, 0xe0, + 0x0f, 0x00, 0x38, 0x00, 0xe0, 0x00, 0x80, 0x7f, 0x00, 0xf0, 0x0f, 0x00, + 0x30, 0x00, 0x60, 0x00, 0x80, 0x7f, 0x00, 0xf0, 0x1f, 0x00, 0x70, 0x00, + 0x70, 0x00, 0xc0, 0xff, 0x00, 0xf0, 0x1f, 0x00, 0x60, 0x00, 0x30, 0x00, + 0xc0, 0xff, 0x00, 0xf0, 0x1f, 0x00, 0x60, 0x00, 0x30, 0x00, 0xc0, 0xff, + 0x00, 0xf8, 0x3f, 0x00, 0xe0, 0x00, 0x38, 0x00, 0xc0, 0xff, 0x01, 0xf8, + 0x3f, 0x00, 0xc0, 0x00, 0x18, 0x00, 0xe0, 0xff, 0x01, 0xf8, 0x3f, 0x00, + 0xc0, 0x00, 0x18, 0x00, 0xe0, 0xff, 0x01, 0xfc, 0x7f, 0x00, 0xc0, 0x01, + 0x18, 0x00, 0xe0, 0xff, 0x03, 0xfc, 0x7f, 0x00, 0x80, 0x01, 0x1c, 0x00, + 0xf0, 0xff, 0x03, 0xfc, 0x7f, 0x00, 0x80, 0x01, 0x0c, 0x00, 0xf0, 0xff, + 0x03, 0xfc, 0x7f, 0x00, 0x80, 0x01, 0x0c, 0x00, 0xf0, 0xff, 0x03, 0xfe, + 0xff, 0x00, 0x80, 0x01, 0x0c, 0x00, 0xf8, 0xff, 0x07, 0xfe, 0xff, 0x00, + 0x80, 0x01, 0x0c, 0x00, 0xf8, 0xff, 0x07, 0xfe, 0xff, 0x00, 0x80, 0x03, + 0x0c, 0x00, 0xf8, 0xff, 0x07, 0xff, 0xff, 0x01, 0x00, 0x03, 0x0c, 0x00, + 0xf8, 0xff, 0x0f, 0xff, 0xff, 0x01, 0x00, 0x03, 0x0c, 0x00, 0xfc, 0xc1, + 0x0f, 0x1f, 0xf8, 0x01, 0x00, 0x03, 0x0c, 0x00, 0x7c, 0x00, 0x8f, 0x0f, + 0xe0, 0x03, 0x00, 0x03, 0x0c, 0x00, 0x3c, 0x00, 0x9e, 0x07, 0xc0, 0x03, + 0x00, 0x03, 0x0c, 0x00, 0x1e, 0x00, 0x9c, 0x03, 0x80, 0x03, 0x80, 0x01, + 0x0c, 0x00, 0x0e, 0x00, 0x9c, 0x01, 0x80, 0x07, 0x80, 0x01, 0x0c, 0x00, + 0x0e, 0x00, 0xf8, 0x01, 0x00, 0x07, 0x80, 0x01, 0x1c, 0x00, 0x06, 0x00, + 0xf0, 0x00, 0x00, 0x07, 0x80, 0x01, 0x18, 0x00, 0x07, 0x00, 0x70, 0x00, + 0x00, 0x06, 0x80, 0x01, 0x18, 0x00, 0x07, 0x00, 0x60, 0x00, 0x00, 0x0e, + 0xc0, 0x01, 0x18, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x0c, 0xc0, 0x00, + 0x38, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x30, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xc0, 0x00, 0x30, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x18, 0xe0, 0x00, 0x70, 0xc0, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x60, 0x00, 0x60, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x70, 0x00, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, + 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x00, 0xc0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, + 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, + 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xfc, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 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}; diff --git a/bitmaps/m-sco.xbm b/bitmaps/m-sco.xbm new file mode 100644 index 00000000..e0c439d6 --- /dev/null +++ b/bitmaps/m-sco.xbm @@ -0,0 +1,20 @@ +#define image_width 76 +#define image_height 25 +static char image_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x07,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x3f,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x07,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0x1f,0xf0,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,0xf0,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0xff, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,0x00,0xf0,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x78,0x00,0xf0, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0xf0,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x07,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; diff --git a/bitmaps/m-sgi.xbm b/bitmaps/m-sgi.xbm new file mode 100644 index 00000000..5f4c5e4e --- /dev/null +++ b/bitmaps/m-sgi.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, + 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, + 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x01, 0x00, + 0x00, 0x80, 0xff, 0x7c, 0x7c, 0xfe, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x7c, 0x7c, 0xf0, 0x3f, 0x00, + 0x00, 0xfc, 0x07, 0x7c, 0x7c, 0xc0, 0x7f, 0x00, 0x00, 0xff, 0x01, 0x7c, + 0x7c, 0x00, 0xff, 0x01, 0x00, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x01, + 0x80, 0x3f, 0x00, 0x7c, 0x7c, 0x00, 0xf8, 0x03, 0x00, 0xff, 0x00, 0x7c, + 0x7c, 0x00, 0xfe, 0x01, 0x00, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x01, + 0x00, 0xfc, 0x0f, 0x7c, 0x7c, 0xe0, 0x7f, 0x00, 0x40, 0xf0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x1f, 0x04, 0xf0, 0xe1, 0xff, 0x7c, 0x7c, 0xfe, 0x0f, 0x1f, + 0xf8, 0x87, 0xff, 0x73, 0x9c, 0xff, 0xc3, 0x3f, 0xf8, 0x0f, 0xfe, 0x4f, + 0xe4, 0xff, 0xe0, 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x7f, + 0xfc, 0xff, 0xe0, 0xff, 0xff, 0x0f, 0xfe, 0x7f, 0xfc, 0xff, 0x83, 0xff, + 0xff, 0x83, 0xff, 0x7f, 0xfc, 0xff, 0x07, 0xff, 0xff, 0xc1, 0xff, 0x7f, + 0x7c, 0xfe, 0x1f, 0xfc, 0x7f, 0xf0, 0xff, 0x7c, 0x7c, 0xf8, 0x7f, 0xf2, + 0x9f, 0xfc, 0x3f, 0x7c, 0x7c, 0xe0, 0xff, 0xcd, 0x67, 0xfe, 0x0f, 0x7c, + 0x7c, 0xc0, 0xff, 0x33, 0x99, 0xff, 0x07, 0x7c, 0x7c, 0x00, 0xff, 0x0f, + 0xe0, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xfc, 0x3f, 0xf8, 0x7f, 0x00, 0x7c, + 0x7c, 0x00, 0xf2, 0x7f, 0xfc, 0x9f, 0x00, 0x7c, 0x7c, 0x80, 0xcf, 0x7f, + 0xfd, 0xe7, 0x03, 0x7c, 0x7c, 0xe0, 0xbf, 0x7f, 0xfd, 0xf9, 0x0f, 0x7c, + 0x7c, 0xf8, 0x7f, 0x7e, 0xfd, 0xfc, 0x3f, 0x7c, 0x7c, 0xfe, 0x0f, 0x7c, + 0x7d, 0xe0, 0xff, 0x7c, 0xfc, 0xff, 0x83, 0x7d, 0x7d, 0x83, 0xff, 0x7f, + 0xfc, 0xff, 0xe0, 0x7d, 0x7d, 0x0f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x7d, + 0x7c, 0x3f, 0xf8, 0x7f, 0xfc, 0x0f, 0xfe, 0x7d, 0x7c, 0xff, 0xe0, 0x7f, + 0xfc, 0x03, 0xff, 0x7d, 0x7c, 0xff, 0x81, 0x7f, 0xf8, 0xc0, 0xff, 0x7d, + 0x7c, 0xff, 0x07, 0x3e, 0x30, 0xf0, 0xff, 0x7c, 0x7c, 0xfe, 0x1f, 0x18, + 0x00, 0xfc, 0x3f, 0x7c, 0x7c, 0xf8, 0x7f, 0x00, 0x00, 0xff, 0x0f, 0x7c, + 0x7c, 0xe0, 0xff, 0x01, 0x80, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x03, + 0x80, 0xff, 0x00, 0x7c, 0x7c, 0x00, 0xfe, 0x03, 0xc0, 0x3f, 0x00, 0x7c, + 0x7c, 0x00, 0xf8, 0x07, 0xc0, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x07, + 0x80, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xff, 0x03, 0x80, 0xff, 0x07, 0x7c, + 0x7c, 0xc0, 0xff, 0x03, 0x00, 0xfe, 0x1f, 0x7c, 0x7c, 0xf0, 0xff, 0x00, + 0x00, 0xf8, 0x7f, 0x7c, 0x7c, 0xfc, 0x3f, 0x00, 0x00, 0xe0, 0xff, 0x7d, + 0x7c, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x7f, 0xfc, 0xff, 0x03, 0x00, + 0x00, 0x00, 0xfe, 0x7f, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, + 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/m-sun.xbm b/bitmaps/m-sun.xbm new file mode 100644 index 00000000..681167f1 --- /dev/null +++ b/bitmaps/m-sun.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfe, + 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0xfd, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xfd, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, + 0xf7, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf4, 0xf7, 0xef, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xee, 0xef, 0xdf, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xdf, + 0xbf, 0xff, 0x00, 0x00, 0x00, 0x80, 0xbf, 0xbf, 0x7f, 0xff, 0x00, 0x00, + 0x00, 0x80, 0x7f, 0x7f, 0xff, 0x7e, 0x03, 0x00, 0x00, 0x60, 0xff, 0xfe, + 0xfe, 0xbd, 0x07, 0x00, 0x00, 0xf0, 0xfe, 0xfd, 0xfd, 0xdb, 0x0f, 0x00, + 0x00, 0xf8, 0xfd, 0xfb, 0xfb, 0xe7, 0x1f, 0x00, 0x00, 0xfc, 0xfb, 0xf7, + 0xf7, 0xf7, 0x2f, 0x00, 0x00, 0xfe, 0xf5, 0xef, 0xef, 0xfb, 0x77, 0x00, + 0x00, 0xff, 0xee, 0xdf, 0xcf, 0xfd, 0xfb, 0x00, 0x80, 0x7f, 0xdf, 0xbf, + 0x9f, 0xfe, 0xfd, 0x01, 0xc0, 0xbf, 0xbf, 0xff, 0x1f, 0xff, 0xfe, 0x00, + 0xe0, 0xdf, 0x1f, 0xff, 0x9f, 0x7f, 0x7f, 0x00, 0xf0, 0xef, 0x0f, 0xfe, + 0xcf, 0xbf, 0x3f, 0x07, 0xf8, 0xf7, 0xe7, 0xfc, 0xef, 0xdf, 0xdf, 0x1f, + 0xfc, 0xfb, 0xfb, 0xfb, 0xf7, 0xef, 0xef, 0x3f, 0xfe, 0xfd, 0xfd, 0xe7, + 0xf9, 0xf7, 0xf7, 0x7f, 0xfe, 0xfe, 0xfe, 0x07, 0xf8, 0xfb, 0xfb, 0x7f, + 0x7f, 0x7f, 0xff, 0x0f, 0xfc, 0xfd, 0xfd, 0xff, 0xbf, 0xbf, 0xff, 0x0f, + 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xdf, 0xdf, 0x0f, 0xfc, 0x7f, 0xff, 0xfe, + 0xff, 0xef, 0xef, 0x0f, 0xfc, 0xbf, 0x7f, 0xff, 0xfe, 0xf7, 0xf7, 0x07, + 0xf8, 0xdf, 0xbf, 0x7f, 0xfe, 0xfb, 0xfb, 0xe7, 0xf9, 0xef, 0xdf, 0x7f, + 0xfc, 0xfd, 0xfd, 0xfb, 0xf7, 0xf7, 0xef, 0x3f, 0x70, 0xfe, 0xfe, 0xfd, + 0xcf, 0xf9, 0xf7, 0x1f, 0x00, 0x7f, 0xff, 0xfc, 0x1f, 0xfc, 0xfb, 0x0f, + 0x80, 0xbf, 0x7f, 0xfe, 0x3f, 0xfe, 0xfd, 0x07, 0xc0, 0xdf, 0x3f, 0xfe, + 0x7f, 0xff, 0xfe, 0x03, 0x80, 0xef, 0x5f, 0x7e, 0xff, 0x7e, 0xff, 0x01, + 0x00, 0xf7, 0xef, 0xfc, 0xfe, 0xbd, 0xff, 0x00, 0x00, 0xfa, 0xf7, 0xfd, + 0xfd, 0xdb, 0x7f, 0x00, 0x00, 0xfc, 0xfb, 0xfb, 0xfb, 0xe7, 0x3f, 0x00, + 0x00, 0xf8, 0xf9, 0xf7, 0xf7, 0xef, 0x1f, 0x00, 0x00, 0xf0, 0xee, 0xef, + 0xef, 0xdf, 0x0f, 0x00, 0x00, 0x60, 0xdf, 0xdf, 0xdf, 0xbf, 0x07, 0x00, + 0x00, 0x80, 0xbf, 0xbf, 0xbf, 0x7f, 0x03, 0x00, 0x00, 0x80, 0x7f, 0x7f, + 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0xfe, 0xfe, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0xfd, 0xfd, 0x7d, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfb, + 0xfb, 0x3b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf7, 0xf7, 0x17, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xef, 0xef, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xdf, + 0xdf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/m-x11.xbm b/bitmaps/m-x11.xbm new file mode 100644 index 00000000..b7256723 --- /dev/null +++ b/bitmaps/m-x11.xbm @@ -0,0 +1,14 @@ +#define image_width 32 +#define image_height 32 +static unsigned char image_bits[] = { + 0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x00, 0xc0, 0xfc, 0x03, 0x00, 0x60, + 0xf8, 0x07, 0x00, 0x30, 0xf8, 0x07, 0x00, 0x18, 0xf0, 0x0f, 0x00, 0x0c, + 0xe0, 0x1f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x03, + 0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00, + 0x00, 0xfe, 0x31, 0x00, 0x00, 0xfc, 0x33, 0x00, 0x00, 0xf8, 0x1b, 0x00, + 0x00, 0xf0, 0x0d, 0x00, 0x00, 0xf0, 0x0e, 0x00, 0x00, 0x60, 0x1f, 0x00, + 0x00, 0xb0, 0x3f, 0x00, 0x00, 0x98, 0x7f, 0x00, 0x00, 0x98, 0x7f, 0x00, + 0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x03, 0xfc, 0x03, + 0x80, 0x01, 0xfc, 0x03, 0xc0, 0x00, 0xf8, 0x07, 0xc0, 0x00, 0xf0, 0x0f, + 0x60, 0x00, 0xe0, 0x1f, 0x30, 0x00, 0xe0, 0x1f, 0x18, 0x00, 0xc0, 0x3f, + 0x0c, 0x00, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff}; diff --git a/bitmaps/m-xlock.xbm b/bitmaps/m-xlock.xbm new file mode 100644 index 00000000..3da61526 --- /dev/null +++ b/bitmaps/m-xlock.xbm @@ -0,0 +1,17 @@ +#define image_width 50 +#define image_height 24 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x38, 0x00, + 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x07, 0x80, 0x0f, 0x00, 0xe0, + 0x7f, 0x80, 0x03, 0xe0, 0x3f, 0x00, 0xc0, 0xff, 0xc0, 0x01, 0xe0, 0x3f, + 0x00, 0x80, 0xff, 0xe1, 0x00, 0xf0, 0x78, 0x00, 0x00, 0xff, 0x73, 0x00, + 0x70, 0x70, 0x00, 0x00, 0xfe, 0x3b, 0x00, 0x70, 0x70, 0x00, 0x00, 0xfc, + 0x1d, 0x00, 0x70, 0x70, 0x00, 0x00, 0xf8, 0x1e, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x70, 0x3f, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xb8, 0x7f, 0x00, 0xfc, + 0xff, 0x01, 0x00, 0xdc, 0xff, 0x00, 0x7c, 0xf7, 0x01, 0x00, 0x8e, 0xff, + 0x01, 0x6c, 0xb0, 0x01, 0x00, 0x07, 0xff, 0x03, 0x6c, 0xb7, 0x01, 0x80, + 0x03, 0xfe, 0x07, 0x6c, 0xb0, 0x01, 0xc0, 0x01, 0xfc, 0x0f, 0x6c, 0xb7, + 0x01, 0xe0, 0x00, 0xf8, 0x1f, 0x6c, 0xb0, 0x01, 0x70, 0x00, 0xf0, 0x3f, + 0x6c, 0xb7, 0x01, 0x38, 0x00, 0xe0, 0x7f, 0xfc, 0xff, 0x01, 0x1c, 0x00, + 0xc0, 0xff, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/mailempty.xbm b/bitmaps/mailempty.xbm new file mode 100644 index 00000000..06425253 --- /dev/null +++ b/bitmaps/mailempty.xbm @@ -0,0 +1,27 @@ +#define mailempty_width 48 +#define mailempty_height 48 +static unsigned char mailempty_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, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x80, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0x7a, 0xe0, 0x57, 0x55, 0x55, 0x55, 0x7d, + 0xf0, 0xaf, 0xaa, 0xaa, 0xaa, 0x7e, 0xf8, 0x57, 0x55, 0x55, 0x55, 0x7f, + 0xfc, 0xaf, 0xaa, 0xaa, 0xaa, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xab, 0xaa, 0xaa, 0xea, 0x7f, + 0xfe, 0x55, 0x55, 0x55, 0xf5, 0x6f, 0xfe, 0xaa, 0xaa, 0xaa, 0xea, 0x67, + 0x7e, 0x55, 0x55, 0x55, 0xf5, 0x63, 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, + 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, + 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, + 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0xfe, 0xff, 0xff, 0xff, 0x7f, + 0x06, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x86, 0xaf, 0xaa, 0xaa, 0xea, 0x7a, + 0xc6, 0x57, 0x55, 0x55, 0x75, 0x7d, 0xe6, 0xaf, 0xaa, 0xaa, 0xea, 0x7e, + 0xf6, 0x57, 0x55, 0x55, 0x75, 0x7f, 0xfe, 0xaf, 0xaa, 0xaa, 0xea, 0x7f, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xfe, 0xab, 0xaa, 0xaa, 0xea, 0x7f, 0xfe, 0x55, 0x55, 0x55, 0xf5, 0x6f, + 0xfe, 0xaa, 0xaa, 0xaa, 0xea, 0x67, 0x7e, 0x55, 0x55, 0x55, 0xf5, 0x63, + 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, + 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/mailfull.xbm b/bitmaps/mailfull.xbm new file mode 100644 index 00000000..cc2f6f8b --- /dev/null +++ b/bitmaps/mailfull.xbm @@ -0,0 +1,27 @@ +#define mailfull_width 48 +#define mailfull_height 48 +static unsigned char mailfull_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x07, + 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x04, 0x40, 0x00, 0x00, 0x00, 0xd0, 0x05, + 0x40, 0x00, 0x00, 0x00, 0x57, 0x7d, 0x40, 0x1e, 0x00, 0x00, 0x55, 0x7d, + 0x40, 0x00, 0x00, 0x00, 0xd5, 0x7d, 0x60, 0x02, 0x00, 0x00, 0x17, 0x7c, + 0x70, 0x00, 0x7e, 0x00, 0x10, 0x7c, 0x78, 0x00, 0x00, 0x00, 0x10, 0x7e, + 0x7c, 0x00, 0x1e, 0x00, 0x10, 0x7f, 0x7e, 0x00, 0x00, 0x00, 0x90, 0x7f, + 0x7e, 0x00, 0x3e, 0x07, 0xd0, 0x7f, 0x7e, 0x00, 0x00, 0x00, 0xf0, 0x7f, + 0x7e, 0x00, 0x00, 0x00, 0xf0, 0x6f, 0x7e, 0x00, 0x00, 0x00, 0xf0, 0x67, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x63, 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, + 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, + 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, + 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, 0x06, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0x86, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc6, 0xaf, 0xaa, 0xaa, 0xea, 0x7a, + 0xe6, 0x57, 0x55, 0x55, 0x75, 0x7d, 0xf6, 0xaf, 0xaa, 0xaa, 0xea, 0x7e, + 0xfe, 0x57, 0x55, 0x55, 0x75, 0x7f, 0xfe, 0xaf, 0xaa, 0xaa, 0xea, 0x7f, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, + 0xfe, 0xab, 0xaa, 0xaa, 0xea, 0x7f, 0xfe, 0x55, 0x55, 0x55, 0xf5, 0x6f, + 0xfe, 0xaa, 0xaa, 0xaa, 0xea, 0x67, 0x7e, 0x55, 0x55, 0x55, 0xf5, 0x63, + 0xbe, 0xaa, 0xaa, 0xaa, 0xea, 0x61, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x60, + 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x60, 0x06, 0x06, 0x00, 0x00, 0x60, 0x60, + 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0xee, 0x9c, 0x37, 0x60, 0x00, + 0x06, 0xfe, 0x36, 0x33, 0x60, 0x00, 0x06, 0xd6, 0x3e, 0x33, 0x60, 0x00, + 0x06, 0xc6, 0xb6, 0xf7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/nose-faced.xbm b/bitmaps/nose-faced.xbm new file mode 100644 index 00000000..fe57c029 --- /dev/null +++ b/bitmaps/nose-faced.xbm @@ -0,0 +1,5 @@ +#define nose_face_down_width 18 +#define nose_face_down_height 7 +static unsigned char nose_face_down_bits[] = { + 0xff,0xff,0x03,0xff,0xff,0x03,0xfe,0xff,0x01,0xfe,0xff,0x01,0xfc,0xff,0x00, + 0xf8,0x7f,0x00,0xe0,0x1f,0x00}; diff --git a/bitmaps/nose-facef.xbm b/bitmaps/nose-facef.xbm new file mode 100644 index 00000000..6044d949 --- /dev/null +++ b/bitmaps/nose-facef.xbm @@ -0,0 +1,15 @@ +#define nose_face_front_width 41 +#define nose_face_front_height 28 +static unsigned char nose_face_front_bits[] = { + 0x00,0x00,0xff,0x01,0x00,0x00,0x00,0xc0,0xff,0x07,0x00,0x00,0x00,0xe0,0xff, + 0x0f,0x00,0x00,0xe0,0xf7,0xff,0xdf,0x0f,0x00,0xe0,0xf7,0xff,0xdf,0x0f,0x00, + 0xf0,0xfb,0xff,0xbf,0x1f,0x00,0xf8,0xfb,0xff,0xbf,0x3f,0x00,0xf8,0xfd,0xff, + 0x7f,0x3f,0x00,0xfc,0xfd,0xff,0x7f,0x7f,0x00,0xfc,0xfe,0xff,0xff,0x7e,0x00, + 0xfe,0xfe,0xff,0xff,0xfe,0x00,0xfe,0xfe,0xff,0xff,0xfe,0x00,0xfe,0xfe,0xff, + 0xff,0xfe,0x00,0xff,0xfe,0xff,0xff,0xfe,0x01,0xff,0xfe,0xff,0xff,0xfe,0x01, + 0xff,0xfe,0xff,0xff,0xfe,0x01,0xff,0xfd,0xff,0x7f,0xff,0x01,0xff,0xfd,0xff, + 0x7f,0xff,0x01,0xff,0xfb,0xff,0xbf,0xff,0x01,0xff,0xfb,0xff,0xbf,0xff,0x01, + 0xff,0xf7,0xff,0xdf,0xff,0x01,0xfe,0xef,0xff,0xef,0xff,0x00,0xfe,0x9f,0xff, + 0xf3,0xff,0x00,0xfe,0x7f,0xfe,0xfc,0xff,0x00,0xfc,0xff,0x01,0xff,0x7f,0x00, + 0xfc,0xff,0xff,0xff,0x7f,0x00,0xf8,0xff,0xff,0xff,0x3f,0x00,0xf0,0xff,0xff, + 0xff,0x1f,0x00}; diff --git a/bitmaps/nose-facel.xbm b/bitmaps/nose-facel.xbm new file mode 100644 index 00000000..46633ace --- /dev/null +++ b/bitmaps/nose-facel.xbm @@ -0,0 +1,15 @@ +#define nose_face_left_width 50 +#define nose_face_left_height 25 +static unsigned char nose_face_left_bits[] = { + 0x00,0x7e,0xff,0xff,0xff,0x1f,0x00,0xc0,0xff,0xfc,0xff,0xff,0x3f,0x00,0xe0, + 0xff,0xfb,0xff,0xff,0x3f,0x00,0xf0,0xff,0xf7,0xff,0xff,0x7f,0x00,0xf8,0xff, + 0xef,0xff,0xff,0x7f,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0xff,0xff,0xff,0xff, + 0xff,0xff,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfe,0xff,0xff,0xff,0xff,0xff,0x03,0xfe, + 0xff,0xdf,0xff,0xff,0xff,0x03,0xfc,0xff,0xdf,0xff,0xff,0xff,0x01,0xf8,0xff, + 0xef,0xff,0xff,0xff,0x01,0xf0,0xff,0xf7,0xff,0xff,0xff,0x01,0xe0,0xff,0xfb, + 0xff,0xff,0xff,0x00,0xc0,0xff,0xfc,0xff,0xff,0xff,0x00,0x00,0x7f,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0xff,0xff,0xff,0x3f,0x00}; diff --git a/bitmaps/nose-facer.xbm b/bitmaps/nose-facer.xbm new file mode 100644 index 00000000..e7dba812 --- /dev/null +++ b/bitmaps/nose-facer.xbm @@ -0,0 +1,15 @@ +#define nose_face_right_width 50 +#define nose_face_right_height 25 +static unsigned char nose_face_right_bits[] = { + 0xe0,0xff,0xff,0xff,0xfb,0x01,0x00,0xf0,0xff,0xff,0xff,0xfc,0x0f,0x00,0xf0, + 0xff,0xff,0x7f,0xff,0x1f,0x00,0xf8,0xff,0xff,0xbf,0xff,0x3f,0x00,0xf8,0xff, + 0xff,0xdf,0xff,0x7f,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0x01,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0xfe,0xff,0xff,0xff, + 0xff,0xff,0x03,0xfe,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xff, + 0xff,0xff,0xef,0xff,0xff,0x01,0xfe,0xff,0xff,0xef,0xff,0xff,0x00,0xfe,0xff, + 0xff,0xdf,0xff,0x7f,0x00,0xfe,0xff,0xff,0xbf,0xff,0x3f,0x00,0xfc,0xff,0xff, + 0x7f,0xff,0x1f,0x00,0xfc,0xff,0xff,0xff,0xfc,0x0f,0x00,0xf8,0xff,0xff,0xff, + 0xfb,0x03,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00}; diff --git a/bitmaps/nose-hat.xbm b/bitmaps/nose-hat.xbm new file mode 100644 index 00000000..b03e41e3 --- /dev/null +++ b/bitmaps/nose-hat.xbm @@ -0,0 +1,8 @@ +#define nose_hat_width 43 +#define nose_hat_height 10 +static unsigned char nose_hat_bits[] = { + 0x00,0xf8,0xff,0xff,0x00,0x00,0x00,0xf8,0xff,0xff,0x00,0x00,0x00,0xf8,0xff, + 0xff,0x00,0x00,0x00,0xf8,0xff,0xff,0x00,0x00,0x00,0xf8,0xff,0xff,0x00,0x00, + 0x00,0xf8,0xff,0xff,0x00,0x00,0xff,0x0f,0x00,0x80,0xff,0x07,0xff,0xff,0xff, + 0xff,0xff,0x07,0xff,0xff,0xff,0xff,0xff,0x07,0xff,0xff,0xff,0xff,0xff,0x07 + }; diff --git a/bitmaps/nose-hatd.xbm b/bitmaps/nose-hatd.xbm new file mode 100644 index 00000000..8f27cee6 --- /dev/null +++ b/bitmaps/nose-hatd.xbm @@ -0,0 +1,20 @@ +#define nose_hat_down_width 49 +#define nose_hat_down_height 28 +static unsigned char nose_hat_down_bits[] = { + 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0xe0, + 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, + 0x00, 0xf8, 0xff, 0x1f, 0xf0, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xe7, 0xcf, + 0xff, 0x7f, 0x00, 0xfc, 0xff, 0xfb, 0xbf, 0xff, 0x7f, 0x00, 0xfe, 0xff, + 0xfd, 0x7f, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xfd, 0x7f, 0xff, 0xff, 0x00, + 0xff, 0xff, 0xf9, 0x3f, 0xff, 0xff, 0x01, 0xff, 0xff, 0xe5, 0x4f, 0xff, + 0xff, 0x01, 0xff, 0xff, 0x1d, 0x70, 0xff, 0xff, 0x01, 0xff, 0xff, 0xfd, + 0x7f, 0xff, 0xff, 0x01, 0xfd, 0xff, 0xfb, 0xbf, 0xff, 0x7f, 0x01, 0xfb, + 0xff, 0xe7, 0xcf, 0xff, 0xbf, 0x01, 0xf6, 0xff, 0x1f, 0xf0, 0xff, 0xdf, + 0x00, 0xec, 0xff, 0xff, 0xff, 0xff, 0x6f, 0x00, 0xdc, 0xff, 0xff, 0xff, + 0xff, 0x77, 0x00, 0xb8, 0xff, 0xff, 0xff, 0xff, 0x3b, 0x00, 0x70, 0xfe, + 0xff, 0xff, 0xff, 0x1c, 0x00, 0xe0, 0xf1, 0xff, 0xff, 0x1f, 0x0f, 0x00, + 0x80, 0x0f, 0xff, 0xff, 0xe1, 0x03, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, + 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x03, 0x00, 0x00}; diff --git a/bitmaps/nose-shoef.xbm b/bitmaps/nose-shoef.xbm new file mode 100644 index 00000000..1b3bbe3e --- /dev/null +++ b/bitmaps/nose-shoef.xbm @@ -0,0 +1,14 @@ +#define nose_shoe_front_width 61 +#define nose_shoe_front_height 20 +static unsigned char nose_shoe_front_bits[] = { + 0x00,0x00,0xf0,0x01,0xf0,0x01,0x00,0x00,0x00,0x00,0xf8,0x03,0xf8,0x03,0x00, + 0x00,0x00,0x00,0xfc,0x0f,0xfe,0x07,0x00,0x00,0x00,0x00,0xfc,0x1f,0xff,0x07, + 0x00,0x00,0xf0,0x0f,0xfe,0xbf,0xff,0x0f,0xfe,0x01,0xfc,0x1f,0xff,0xbf,0xff, + 0x1f,0xff,0x07,0xfc,0x3f,0xff,0xbf,0xff,0x9f,0xff,0x07,0xfe,0x3f,0xff,0xbf, + 0xff,0x9f,0xff,0x0f,0xfe,0xff,0xfc,0xbf,0xff,0xe7,0xff,0x0f,0xff,0xff,0xf9, + 0xbf,0xff,0xf3,0xff,0x1f,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,0x1f,0xff,0xff, + 0xff,0x1f,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,0x0f,0xfe,0xff,0xff,0x1f,0xf7, + 0xff,0xff,0x0f,0xfe,0xff,0xff,0x1d,0xf7,0xff,0xff,0x0f,0xfe,0xff,0xff,0x1d, + 0xcf,0xff,0xff,0x0f,0xfe,0xff,0x7f,0x1e,0x3f,0xff,0xff,0x1f,0xff,0xff,0x9f, + 0x1f,0xfe,0xff,0xff,0x1f,0xff,0xff,0xff,0x0f,0xfc,0xff,0xff,0x1f,0xff,0xff, + 0xff,0x07,0xf8,0xff,0xff,0x1f,0xff,0xff,0xff,0x03}; diff --git a/bitmaps/nose-shoel.xbm b/bitmaps/nose-shoel.xbm new file mode 100644 index 00000000..072ee66a --- /dev/null +++ b/bitmaps/nose-shoel.xbm @@ -0,0 +1,10 @@ +#define nose_shoe_left_width 39 +#define nose_shoe_left_height 19 +static unsigned char nose_shoe_left_bits[] = { + 0x00,0x00,0x00,0xf8,0x0f,0x00,0xff,0x00,0xfc,0x1f,0xc0,0xff,0x03,0xff,0x1f, + 0xf0,0xff,0x0f,0xff,0x3f,0xf8,0xff,0x9f,0xff,0x3f,0xfc,0xfc,0xbf,0xff,0x3f, + 0x3e,0xff,0x3f,0xff,0x3f,0xbe,0xff,0x7f,0xff,0x3f,0xdf,0xff,0xff,0xfe,0x3f, + 0xdf,0xff,0xff,0xfe,0x3f,0xdf,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,0xff,0xff,0x7f,0xfe,0xff,0xff,0xff,0x7f, + 0xfc,0xff,0xff,0xff,0x3f,0xf8,0xff,0xff,0xff,0x3f,0xf0,0xff,0xff,0xff,0x1f, + 0xc0,0xff,0xff,0xff,0x0f}; diff --git a/bitmaps/nose-shoer.xbm b/bitmaps/nose-shoer.xbm new file mode 100644 index 00000000..e3754744 --- /dev/null +++ b/bitmaps/nose-shoer.xbm @@ -0,0 +1,10 @@ +#define nose_shoe_right_width 39 +#define nose_shoe_right_height 19 +static unsigned char nose_shoe_right_bits[] = { + 0xf8,0x0f,0x00,0x00,0x00,0xfc,0x1f,0x80,0x7f,0x00,0xfc,0x7f,0xe0,0xff,0x01, + 0xfe,0x7f,0xf8,0xff,0x07,0xfe,0xff,0xfc,0xff,0x0f,0xfe,0xff,0xfe,0x9f,0x1f, + 0xfe,0x7f,0xfe,0x7f,0x3e,0xfe,0x7f,0xff,0xff,0x3e,0xfe,0xbf,0xff,0xff,0x7d, + 0xfe,0xbf,0xff,0xff,0x7d,0xfe,0xff,0xff,0xff,0x7d,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0x3f, + 0xfe,0xff,0xff,0xff,0x1f,0xfe,0xff,0xff,0xff,0x0f,0xfc,0xff,0xff,0xff,0x07, + 0xf8,0xff,0xff,0xff,0x01}; diff --git a/bitmaps/nose-stepl.xbm b/bitmaps/nose-stepl.xbm new file mode 100644 index 00000000..cf6c9028 --- /dev/null +++ b/bitmaps/nose-stepl.xbm @@ -0,0 +1,16 @@ +#define nose_step_left_width 62 +#define nose_step_left_height 23 +static unsigned char nose_step_left_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0x0f,0xc0,0x0f,0x00,0x00,0x00,0x00,0xfc,0x1f,0xf0,0x3f,0xe0,0x03,0x00, + 0x00,0xfe,0x3f,0xf8,0x7f,0xf0,0x07,0x80,0x0f,0xff,0x3f,0xfc,0xff,0xf0,0x0f, + 0xe0,0x3f,0xff,0x3f,0xfe,0xff,0xf9,0x1f,0xf0,0x7f,0xff,0x1f,0x9f,0xff,0xfb, + 0x3f,0xfc,0x7f,0xff,0x1f,0xef,0xff,0xfb,0x7f,0x7e,0xfe,0xfe,0x0f,0xf7,0xff, + 0xfb,0x7f,0xbf,0xff,0xf9,0x0f,0xf7,0xff,0xf7,0x7f,0xdf,0xff,0xff,0x07,0xf7, + 0xff,0xf7,0x3f,0xdf,0xff,0xff,0x03,0xff,0xff,0xef,0x3f,0xdf,0xff,0xff,0x03, + 0xff,0xff,0xff,0x1f,0xdf,0xff,0xff,0x01,0xfe,0xff,0xff,0x1f,0xff,0xff,0xff, + 0x00,0xfe,0xff,0xff,0x1f,0xff,0xff,0xff,0x00,0xfc,0xff,0xff,0x1f,0xfe,0xff, + 0x7f,0x00,0xf8,0xff,0xff,0x1f,0xfe,0xff,0x7f,0x00,0xf0,0xff,0xff,0x0f,0xfc, + 0xff,0x3f,0x00,0xc0,0xff,0xff,0x07,0xf8,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0x07,0x00}; diff --git a/bitmaps/nose-stepr.xbm b/bitmaps/nose-stepr.xbm new file mode 100644 index 00000000..98c838dc --- /dev/null +++ b/bitmaps/nose-stepr.xbm @@ -0,0 +1,16 @@ +#define nose_step_right_width 62 +#define nose_step_right_height 23 +static unsigned char nose_step_right_bits[] = { + 0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0xfc,0x00,0xff,0x1f,0x00,0x00,0xf0, + 0x01,0xff,0x03,0xff,0x3f,0x7c,0x00,0xf8,0x83,0xff,0x07,0xff,0x3f,0xff,0x01, + 0xfc,0xc3,0xff,0x0f,0xfe,0xbf,0xff,0x03,0xfe,0xe7,0xff,0x1f,0xfe,0xbf,0xff, + 0x0f,0xff,0xf7,0x7f,0x3e,0xfc,0xdf,0x9f,0x9f,0xff,0xf7,0xff,0x3d,0xfc,0xe7, + 0x7f,0xbf,0xff,0xf7,0xff,0x3b,0xf8,0xff,0xff,0xbe,0xff,0xfb,0xff,0x3b,0xf0, + 0xff,0xff,0x3e,0xff,0xfb,0xff,0x3b,0xf0,0xff,0xff,0x3e,0xff,0xfd,0xff,0x3f, + 0xe0,0xff,0xff,0x3e,0xfe,0xff,0xff,0x3f,0xc0,0xff,0xff,0x3f,0xfe,0xff,0xff, + 0x1f,0xc0,0xff,0xff,0x3f,0xfe,0xff,0xff,0x1f,0x80,0xff,0xff,0x1f,0xfe,0xff, + 0xff,0x0f,0x80,0xff,0xff,0x1f,0xfe,0xff,0xff,0x07,0x00,0xff,0xff,0x0f,0xfc, + 0xff,0xff,0x03,0x00,0xfe,0xff,0x07,0xf8,0xff,0xff,0x00,0x00,0xf8,0xff,0x01, + 0x00,0x00,0x00,0x00}; diff --git a/bitmaps/root_weave.xbm b/bitmaps/root_weave.xbm new file mode 100644 index 00000000..6e72323b --- /dev/null +++ b/bitmaps/root_weave.xbm @@ -0,0 +1,4 @@ +#define root_weave_width 4 +#define root_weave_height 4 +static unsigned char root_weave_bits[] = { + 0x07, 0x0d, 0x0b, 0x0e}; diff --git a/bitmaps/rot00.xbm b/bitmaps/rot00.xbm new file mode 100644 index 00000000..db6ed835 --- /dev/null +++ b/bitmaps/rot00.xbm @@ -0,0 +1,13 @@ +#define rot00_width 30 +#define rot00_height 30 +static unsigned char rot00_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0x07, + 0x5c, 0x55, 0x55, 0x0f, 0xae, 0xaa, 0xaa, 0x1e, 0x56, 0x55, 0x55, 0x1f, + 0xae, 0xaa, 0xaa, 0x1f, 0xd6, 0xff, 0xff, 0x1f, 0xae, 0xff, 0xbf, 0x1f, + 0xd6, 0xff, 0xdf, 0x1f, 0xae, 0xff, 0xaf, 0x1f, 0xd6, 0xff, 0xd7, 0x1f, + 0xae, 0xff, 0xab, 0x1f, 0xd6, 0xff, 0xd5, 0x1f, 0xae, 0xff, 0xaa, 0x1f, + 0xd6, 0x7f, 0xd5, 0x1f, 0xae, 0xbf, 0xaa, 0x1f, 0xd6, 0x5f, 0xd5, 0x1f, + 0xae, 0xaf, 0xaa, 0x1f, 0xd6, 0x57, 0xd5, 0x1f, 0xae, 0xab, 0xaa, 0x1f, + 0xd6, 0x55, 0xd5, 0x1f, 0xae, 0xaa, 0xaa, 0x1f, 0xd6, 0xff, 0xff, 0x1f, + 0xee, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x0f, + 0xf8, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot01.xbm b/bitmaps/rot01.xbm new file mode 100644 index 00000000..3042081d --- /dev/null +++ b/bitmaps/rot01.xbm @@ -0,0 +1,13 @@ +#define rot01_width 30 +#define rot01_height 30 +static unsigned char rot01_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0x07, + 0x55, 0x55, 0x55, 0x0f, 0xaa, 0xaa, 0xaa, 0x1e, 0x55, 0x55, 0x55, 0x1f, + 0xaa, 0xaa, 0xaa, 0x1f, 0x55, 0x55, 0xd5, 0x1f, 0xaa, 0xaa, 0xea, 0x1f, + 0x55, 0x55, 0xf5, 0x1f, 0xaa, 0xaa, 0xfa, 0x1f, 0x55, 0x55, 0xfd, 0x1f, + 0xaa, 0xaa, 0xfe, 0x1f, 0x55, 0x55, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x0f, + 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot02.xbm b/bitmaps/rot02.xbm new file mode 100644 index 00000000..2959a289 --- /dev/null +++ b/bitmaps/rot02.xbm @@ -0,0 +1,13 @@ +#define rot02_width 30 +#define rot02_height 30 +static unsigned char rot02_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0x07, + 0x5c, 0x55, 0x55, 0x0f, 0xae, 0xaa, 0xaa, 0x1e, 0x56, 0x55, 0x55, 0x1f, + 0xae, 0xaa, 0xaa, 0x1f, 0x56, 0x55, 0xd5, 0x1f, 0xae, 0xaa, 0xea, 0x1f, + 0x56, 0x55, 0xf5, 0x1f, 0xae, 0xaa, 0xfa, 0x1f, 0x56, 0x55, 0xfd, 0x1f, + 0xae, 0xaa, 0xfe, 0x1f, 0x56, 0x55, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f}; diff --git a/bitmaps/rot03.xbm b/bitmaps/rot03.xbm new file mode 100644 index 00000000..677aa380 --- /dev/null +++ b/bitmaps/rot03.xbm @@ -0,0 +1,13 @@ +#define rot03_width 30 +#define rot03_height 30 +static unsigned char rot03_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0x07, + 0x55, 0x55, 0x55, 0x0f, 0xaa, 0xaa, 0xaa, 0x1e, 0x55, 0x55, 0x55, 0x1f, + 0xaa, 0xaa, 0xaa, 0x1f, 0x55, 0x55, 0xd5, 0x1f, 0xaa, 0xaa, 0xea, 0x1f, + 0x55, 0x55, 0xf5, 0x1f, 0xaa, 0xaa, 0xfa, 0x1f, 0x55, 0x55, 0xfd, 0x1f, + 0xaa, 0xaa, 0xfe, 0x1f, 0x55, 0x55, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xbf, 0xff, 0x1f, 0xff, 0xdf, 0xff, 0x1f, + 0xff, 0xaf, 0xff, 0x1f, 0xff, 0xd7, 0xff, 0x1f, 0xff, 0xab, 0xff, 0x1f, + 0xff, 0xd5, 0xff, 0x1f, 0xff, 0xaa, 0xff, 0x1f, 0x7f, 0xd5, 0xff, 0x1f, + 0xbf, 0xaa, 0xff, 0x1f, 0x5f, 0xd5, 0xff, 0x1f, 0xaf, 0xaa, 0xff, 0x1f, + 0x57, 0xd5, 0xff, 0x1f, 0xab, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f}; diff --git a/bitmaps/rot04.xbm b/bitmaps/rot04.xbm new file mode 100644 index 00000000..3df3292f --- /dev/null +++ b/bitmaps/rot04.xbm @@ -0,0 +1,13 @@ +#define rot04_width 30 +#define rot04_height 30 +static unsigned char rot04_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x3f, + 0x5c, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, + 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, + 0x56, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, + 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xea, 0xff, 0x3f, 0x56, 0xf5, 0xff, 0x3f, + 0xae, 0xfa, 0xff, 0x3f, 0x56, 0xfd, 0xff, 0x3f, 0xae, 0xfe, 0xff, 0x3f, + 0x56, 0xff, 0xff, 0x3f, 0xae, 0xff, 0xff, 0x3f, 0xd6, 0xff, 0xff, 0x3f, + 0xee, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, + 0xf8, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot05.xbm b/bitmaps/rot05.xbm new file mode 100644 index 00000000..268552ec --- /dev/null +++ b/bitmaps/rot05.xbm @@ -0,0 +1,13 @@ +#define rot05_width 30 +#define rot05_height 30 +static unsigned char rot05_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, + 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, + 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, + 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot06.xbm b/bitmaps/rot06.xbm new file mode 100644 index 00000000..c5bd3f38 --- /dev/null +++ b/bitmaps/rot06.xbm @@ -0,0 +1,13 @@ +#define rot06_width 30 +#define rot06_height 30 +static unsigned char rot06_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x3f, + 0x5c, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, + 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, + 0x56, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, + 0xae, 0xaa, 0xaa, 0x2a, 0x56, 0x55, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, + 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, + 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f}; diff --git a/bitmaps/rot07.xbm b/bitmaps/rot07.xbm new file mode 100644 index 00000000..5afbffe2 --- /dev/null +++ b/bitmaps/rot07.xbm @@ -0,0 +1,13 @@ +#define rot07_width 30 +#define rot07_height 30 +static unsigned char rot07_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, + 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, + 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, + 0xaa, 0xaa, 0xaa, 0x2a, 0x55, 0x55, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xbf, 0xff, 0x3f, 0xff, 0xdf, 0xff, 0x3f, + 0xff, 0xaf, 0xff, 0x3f, 0xff, 0xd7, 0xff, 0x3f, 0xff, 0xab, 0xff, 0x3f, + 0xff, 0xd5, 0xff, 0x3f, 0xff, 0xaa, 0xff, 0x3f, 0x7f, 0xd5, 0xff, 0x3f, + 0xbf, 0xaa, 0xff, 0x3f, 0x5f, 0xd5, 0xff, 0x3f, 0xaf, 0xaa, 0xff, 0x3f, + 0x57, 0xd5, 0xff, 0x3f, 0xab, 0xaa, 0xff, 0x3f, 0x55, 0xd5, 0xff, 0x3f}; diff --git a/bitmaps/rot08.xbm b/bitmaps/rot08.xbm new file mode 100644 index 00000000..a838cc85 --- /dev/null +++ b/bitmaps/rot08.xbm @@ -0,0 +1,13 @@ +#define rot08_width 30 +#define rot08_height 30 +static unsigned char rot08_bits[] = { + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xea, 0xff, 0x1f, 0x56, 0xf5, 0xff, 0x1f, + 0xae, 0xfa, 0xff, 0x1f, 0x56, 0xfd, 0xff, 0x1f, 0xae, 0xfe, 0xff, 0x1f, + 0x56, 0xff, 0xff, 0x1f, 0xae, 0xff, 0xff, 0x1f, 0xd6, 0xff, 0xff, 0x1f, + 0xee, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x0f, + 0xf8, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot09.xbm b/bitmaps/rot09.xbm new file mode 100644 index 00000000..eb102ebe --- /dev/null +++ b/bitmaps/rot09.xbm @@ -0,0 +1,13 @@ +#define rot09_width 30 +#define rot09_height 30 +static unsigned char rot09_bits[] = { + 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, + 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, + 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x0f, + 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot10.xbm b/bitmaps/rot10.xbm new file mode 100644 index 00000000..50b9d565 --- /dev/null +++ b/bitmaps/rot10.xbm @@ -0,0 +1,13 @@ +#define rot10_width 30 +#define rot10_height 30 +static unsigned char rot10_bits[] = { + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, + 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, + 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x1f, 0x56, 0xd5, 0xff, 0x1f}; diff --git a/bitmaps/rot11.xbm b/bitmaps/rot11.xbm new file mode 100644 index 00000000..20e9eaad --- /dev/null +++ b/bitmaps/rot11.xbm @@ -0,0 +1,13 @@ +#define rot11_width 30 +#define rot11_height 30 +static unsigned char rot11_bits[] = { + 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, + 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, + 0xaa, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x1f, 0xff, 0xbf, 0xff, 0x1f, 0xff, 0xdf, 0xff, 0x1f, + 0xff, 0xaf, 0xff, 0x1f, 0xff, 0xd7, 0xff, 0x1f, 0xff, 0xab, 0xff, 0x1f, + 0xff, 0xd5, 0xff, 0x1f, 0xff, 0xaa, 0xff, 0x1f, 0x7f, 0xd5, 0xff, 0x1f, + 0xbf, 0xaa, 0xff, 0x1f, 0x5f, 0xd5, 0xff, 0x1f, 0xaf, 0xaa, 0xff, 0x1f, + 0x57, 0xd5, 0xff, 0x1f, 0xab, 0xaa, 0xff, 0x1f, 0x55, 0xd5, 0xff, 0x1f}; diff --git a/bitmaps/rot12.xbm b/bitmaps/rot12.xbm new file mode 100644 index 00000000..d7511cdc --- /dev/null +++ b/bitmaps/rot12.xbm @@ -0,0 +1,13 @@ +#define rot12_width 30 +#define rot12_height 30 +static unsigned char rot12_bits[] = { + 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x2f, + 0x56, 0xd5, 0xff, 0x17, 0xae, 0xaa, 0xff, 0x2b, 0x56, 0xd5, 0xff, 0x15, + 0xae, 0xaa, 0xff, 0x2a, 0x56, 0xd5, 0x7f, 0x15, 0xae, 0xaa, 0xbf, 0x2a, + 0x56, 0xd5, 0x5f, 0x15, 0xae, 0xaa, 0xaf, 0x2a, 0x56, 0xd5, 0x57, 0x15, + 0xae, 0xaa, 0xab, 0x2a, 0x56, 0xd5, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xea, 0xff, 0x3f, 0x56, 0xf5, 0xff, 0x3f, + 0xae, 0xfa, 0xff, 0x3f, 0x56, 0xfd, 0xff, 0x3f, 0xae, 0xfe, 0xff, 0x3f, + 0x56, 0xff, 0xff, 0x3f, 0xae, 0xff, 0xff, 0x3f, 0xd6, 0xff, 0xff, 0x3f, + 0xee, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, + 0xf8, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot13.xbm b/bitmaps/rot13.xbm new file mode 100644 index 00000000..a5c8c2ec --- /dev/null +++ b/bitmaps/rot13.xbm @@ -0,0 +1,13 @@ +#define rot13_width 30 +#define rot13_height 30 +static unsigned char rot13_bits[] = { + 0xaa, 0xaa, 0xff, 0x3f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x2f, + 0x55, 0xd5, 0xff, 0x17, 0xaa, 0xaa, 0xff, 0x2b, 0x55, 0xd5, 0xff, 0x15, + 0xaa, 0xaa, 0xff, 0x2a, 0x55, 0xd5, 0x7f, 0x15, 0xaa, 0xaa, 0xbf, 0x2a, + 0x55, 0xd5, 0x5f, 0x15, 0xaa, 0xaa, 0xaf, 0x2a, 0x55, 0xd5, 0x57, 0x15, + 0xaa, 0xaa, 0xab, 0x2a, 0x55, 0xd5, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/rot14.xbm b/bitmaps/rot14.xbm new file mode 100644 index 00000000..a812ee2f --- /dev/null +++ b/bitmaps/rot14.xbm @@ -0,0 +1,13 @@ +#define rot14_width 30 +#define rot14_height 30 +static unsigned char rot14_bits[] = { + 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x1f, 0xae, 0xaa, 0xff, 0x2f, + 0x56, 0xd5, 0xff, 0x17, 0xae, 0xaa, 0xff, 0x2b, 0x56, 0xd5, 0xff, 0x15, + 0xae, 0xaa, 0xff, 0x2a, 0x56, 0xd5, 0x7f, 0x15, 0xae, 0xaa, 0xbf, 0x2a, + 0x56, 0xd5, 0x5f, 0x15, 0xae, 0xaa, 0xaf, 0x2a, 0x56, 0xd5, 0x57, 0x15, + 0xae, 0xaa, 0xab, 0x2a, 0x56, 0xd5, 0x55, 0x15, 0xae, 0xaa, 0xaa, 0x2a, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, + 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, + 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, + 0x56, 0xd5, 0xff, 0x3f, 0xae, 0xaa, 0xff, 0x3f, 0x56, 0xd5, 0xff, 0x3f}; diff --git a/bitmaps/rot15.xbm b/bitmaps/rot15.xbm new file mode 100644 index 00000000..04a95815 --- /dev/null +++ b/bitmaps/rot15.xbm @@ -0,0 +1,13 @@ +#define rot15_width 30 +#define rot15_height 30 +static unsigned char rot15_bits[] = { + 0xaa, 0xaa, 0xff, 0x3f, 0x55, 0xd5, 0xff, 0x1f, 0xaa, 0xaa, 0xff, 0x2f, + 0x55, 0xd5, 0xff, 0x17, 0xaa, 0xaa, 0xff, 0x2b, 0x55, 0xd5, 0xff, 0x15, + 0xaa, 0xaa, 0xff, 0x2a, 0x55, 0xd5, 0x7f, 0x15, 0xaa, 0xaa, 0xbf, 0x2a, + 0x55, 0xd5, 0x5f, 0x15, 0xaa, 0xaa, 0xaf, 0x2a, 0x55, 0xd5, 0x57, 0x15, + 0xaa, 0xaa, 0xab, 0x2a, 0x55, 0xd5, 0x55, 0x15, 0xaa, 0xaa, 0xaa, 0x2a, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xbf, 0xff, 0x3f, 0xff, 0xdf, 0xff, 0x3f, + 0xff, 0xaf, 0xff, 0x3f, 0xff, 0xd7, 0xff, 0x3f, 0xff, 0xab, 0xff, 0x3f, + 0xff, 0xd5, 0xff, 0x3f, 0xff, 0xaa, 0xff, 0x3f, 0x7f, 0xd5, 0xff, 0x3f, + 0xbf, 0xaa, 0xff, 0x3f, 0x5f, 0xd5, 0xff, 0x3f, 0xaf, 0xaa, 0xff, 0x3f, + 0x57, 0xd5, 0xff, 0x3f, 0xab, 0xaa, 0xff, 0x3f, 0x55, 0xd5, 0xff, 0x3f}; diff --git a/bitmaps/s-bsd.xbm b/bitmaps/s-bsd.xbm new file mode 100644 index 00000000..2220bdd5 --- /dev/null +++ b/bitmaps/s-bsd.xbm @@ -0,0 +1,21 @@ +#define image_width 29 +#define image_height 35 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x07, 0x40, 0x00, 0x00, 0xfb, 0xc1, 0x00, 0x00, 0xfd, 0xc3, 0x00, + 0x00, 0xf6, 0xcf, 0x01, 0x00, 0x6a, 0xef, 0x01, 0x00, 0xb2, 0xfe, 0x00, + 0x00, 0x33, 0x7f, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x80, 0xf7, 0x0f, 0x00, + 0x98, 0xe7, 0x0f, 0x00, 0x90, 0xfd, 0x0f, 0x00, 0x36, 0xbb, 0x0f, 0x00, + 0x3c, 0xc7, 0x07, 0x00, 0x39, 0xfc, 0x03, 0x00, 0x3f, 0xfc, 0x00, 0x00, + 0xc0, 0x59, 0x01, 0x00, 0xc0, 0xfb, 0x01, 0x00, 0xc0, 0xf7, 0x01, 0x00, + 0x80, 0xcd, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, + 0x00, 0xfa, 0x01, 0x00, 0x00, 0x86, 0x01, 0x00, 0x00, 0xbe, 0x07, 0x00, + 0x00, 0x7c, 0x1f, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xef, 0xc3, 0x0f, + 0xc0, 0xef, 0x03, 0x1c, 0xf0, 0xf7, 0x03, 0x18, 0xf0, 0xfd, 0x01, 0x0b, + 0xe0, 0xfe, 0x80, 0x07, 0x00, 0x38, 0x00, 0x00}; + +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All rights reserved. Reproduced with permission. + */ diff --git a/bitmaps/s-dec.xbm b/bitmaps/s-dec.xbm new file mode 100644 index 00000000..8dcf7f7f --- /dev/null +++ b/bitmaps/s-dec.xbm @@ -0,0 +1,10 @@ +#define image_width 41 +#define image_height 13 +static unsigned char image_bits[] = { + 0xdf, 0xfb, 0xbd, 0xef, 0xfb, 0x00, 0xdf, 0xfb, 0xbd, 0xef, 0xfb, 0x00, + 0xd7, 0xfa, 0xb5, 0xef, 0xdb, 0x00, 0xd7, 0xfb, 0xbd, 0xed, 0xdb, 0x00, + 0xd1, 0x1a, 0xb5, 0x28, 0xda, 0x00, 0xd5, 0x0a, 0xb5, 0xed, 0xda, 0x00, + 0xd5, 0x6a, 0xb5, 0x2d, 0xda, 0x00, 0xd5, 0x0a, 0xb5, 0xad, 0xda, 0x00, + 0xd3, 0x3a, 0xb5, 0x29, 0xda, 0x00, 0xdf, 0x0b, 0xbd, 0xef, 0xfb, 0x00, + 0xdf, 0xbb, 0xbd, 0xef, 0xfb, 0x00, 0xdf, 0xfb, 0xbd, 0xef, 0xfb, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/s-grelb.xbm b/bitmaps/s-grelb.xbm new file mode 100644 index 00000000..31202f68 --- /dev/null +++ b/bitmaps/s-grelb.xbm @@ -0,0 +1,17 @@ +#define image_width 30 +#define image_height 33 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0x20, 0xe4, 0x27, 0x04, + 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x01, + 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xe7, 0xe7, 0x07, + 0xe0, 0xc3, 0xc3, 0x07, 0xe0, 0xe7, 0xe7, 0x07, 0xe0, 0xff, 0xff, 0x07, + 0xc0, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x01, 0x00, 0xff, 0xff, 0x00, + 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x70, 0x0e, 0x00, + 0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, + 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x20, 0x04, 0x00, + 0x00, 0x3f, 0xfc, 0x00, 0x80, 0x7f, 0xfe, 0x01, 0x00, 0x3f, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +/* + * "Life. Don't talk to me about life" -Marvin the Paranoid Android + */ diff --git a/bitmaps/s-hp.xbm b/bitmaps/s-hp.xbm new file mode 100644 index 00000000..6e90251a --- /dev/null +++ b/bitmaps/s-hp.xbm @@ -0,0 +1,9 @@ +#define image_width 17 +#define image_height 23 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0xbe, 0xfe, 0x00, 0xbe, 0xfc, 0x00, 0xbf, 0xf8, 0x01, + 0x9f, 0xf0, 0x01, 0xcf, 0xe0, 0x01, 0x4f, 0xe0, 0x01, 0x4f, 0xe0, 0x01, + 0xcf, 0xec, 0x01, 0xe7, 0xce, 0x01, 0xe7, 0xca, 0x01, 0xa7, 0xca, 0x01, + 0xa7, 0xca, 0x01, 0xa7, 0xca, 0x01, 0xaf, 0xee, 0x01, 0x0f, 0xe6, 0x01, + 0x0f, 0xe2, 0x01, 0x0f, 0xe2, 0x01, 0x1f, 0xf3, 0x01, 0x3f, 0xf9, 0x01, + 0x7e, 0xfd, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/s-ibm.xbm b/bitmaps/s-ibm.xbm new file mode 100644 index 00000000..4a9873d1 --- /dev/null +++ b/bitmaps/s-ibm.xbm @@ -0,0 +1,11 @@ +#define image_width 39 +#define image_height 17 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfc, 0xc7, 0x0f, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfe, 0xfc, 0xdf, 0x9f, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x70, 0x1c, 0x9f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, + 0xf0, 0x0f, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x0f, + 0xf7, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x1c, 0x67, 0x0e, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfc, 0xdf, 0x67, 0x3e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfe, 0xfc, 0xcf, 0x07, 0x3e, 0x00, 0x00, 0x00, 0x00, + 0x00}; diff --git a/bitmaps/s-linux.xbm b/bitmaps/s-linux.xbm new file mode 100644 index 00000000..f3604eef --- /dev/null +++ b/bitmaps/s-linux.xbm @@ -0,0 +1,31 @@ +#define image_width 32 +#define image_height 37 +static unsigned char image_bits[] = { + 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x0f, 0xe0, 0xff, + 0xff, 0x07, 0xc0, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x07, 0xc0, 0xff, + 0xff, 0x37, 0xc7, 0xff, 0xff, 0x07, 0x89, 0xff, 0xff, 0x07, 0x89, 0xff, + 0xff, 0xd7, 0x87, 0xff, 0xff, 0x77, 0x8f, 0xff, 0xff, 0xe7, 0x85, 0xff, + 0xff, 0x57, 0x2d, 0xff, 0xff, 0xb7, 0x0e, 0xff, 0xff, 0xf3, 0x1f, 0xfe, + 0xff, 0xf9, 0x1f, 0xfe, 0xff, 0xf9, 0x3f, 0xfc, 0xff, 0xfc, 0x3f, 0xf8, + 0x7f, 0xfc, 0x7f, 0xf0, 0x7f, 0xfc, 0x7f, 0xf0, 0x7f, 0xfe, 0x7f, 0xf0, + 0x3f, 0xfe, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xe0, 0x1f, 0xff, 0xff, 0xe0, + 0x1f, 0xff, 0xff, 0xe0, 0x9f, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xe0, + 0xef, 0xfc, 0xbf, 0xf0, 0xbf, 0xf9, 0xff, 0xf0, 0xf7, 0xf3, 0xbf, 0xdd, + 0xdd, 0xe2, 0xff, 0xfe, 0x7f, 0xf7, 0x9f, 0xdb, 0xdb, 0xfb, 0x8f, 0xff, + 0xfd, 0xee, 0xc3, 0xbb, 0xab, 0x07, 0x80, 0xee, 0xa7, 0x0a, 0x80, 0xf5, + 0x7f, 0xf2, 0x3f, 0xf9}; + +/* Linux Penguin from logo.gif and logo.txt /usr/src/linux/Documentation +This is the full-colour version of the currenly unofficial Linux logo +("currently unofficial" just means that there has been no paperwork and +that I haven't really announced it yet). It was created by Larry Ewing, +and is freely usable as long as you acknowledge Larry as the original +artist. + +Note that there are black-and-white versions of this available that +scale down to smaller sizes and are better for letterheads or whatever +you want to use it for: for the full range of logos take a look at +Larry's web-page: + + http://www.isc.tamu.edu/~lewing/linux/ + */ diff --git a/bitmaps/s-linux1.xbm b/bitmaps/s-linux1.xbm new file mode 100644 index 00000000..3d543c15 --- /dev/null +++ b/bitmaps/s-linux1.xbm @@ -0,0 +1,13 @@ +#define image_width 29 +#define image_height 29 +static unsigned char image_bits[] = { + 0xff, 0xff, 0xff, 0x1f, 0x03, 0x00, 0x00, 0x18, 0x12, 0x10, 0x10, 0x08, + 0xfe, 0x89, 0x88, 0x0c, 0x04, 0x11, 0x11, 0x05, 0x9c, 0xab, 0xaa, 0x06, + 0x98, 0xff, 0xff, 0x0f, 0x98, 0x68, 0xad, 0x0b, 0x90, 0x4d, 0x2d, 0x09, + 0x90, 0x4d, 0x6d, 0x0c, 0x90, 0x0d, 0x6d, 0x04, 0x90, 0x2d, 0x6d, 0x0c, + 0x90, 0x2d, 0x21, 0x09, 0x90, 0x68, 0xa1, 0x0b, 0x9f, 0xff, 0xff, 0x1f, + 0x9f, 0xef, 0xff, 0x1f, 0x98, 0xef, 0x3f, 0x00, 0x08, 0xe0, 0x1f, 0x00, + 0xf8, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, + 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, + 0x00, 0xe0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00}; diff --git a/bitmaps/s-mot.xbm b/bitmaps/s-mot.xbm new file mode 100644 index 00000000..11e43e76 --- /dev/null +++ b/bitmaps/s-mot.xbm @@ -0,0 +1,12 @@ +#define image_width 25 +#define image_height 25 +static unsigned char image_bits[] = { + 0x1f, 0x00, 0xf0, 0x01, 0x0f, 0xfe, 0xe0, 0x01, 0x87, 0x01, 0xc3, 0x01, + 0x63, 0x00, 0x8c, 0x01, 0x31, 0x01, 0x19, 0x01, 0x18, 0x01, 0x31, 0x00, + 0x08, 0x83, 0x23, 0x00, 0x84, 0x83, 0x43, 0x00, 0x84, 0x83, 0x43, 0x00, + 0x82, 0xc7, 0x83, 0x00, 0xc2, 0xc7, 0x87, 0x00, 0xc2, 0xc7, 0x87, 0x00, + 0xc2, 0xef, 0x8f, 0x00, 0xc2, 0xee, 0x8e, 0x00, 0x62, 0x28, 0x88, 0x00, + 0x22, 0x30, 0x88, 0x00, 0x24, 0x10, 0x58, 0x00, 0x14, 0x00, 0x50, 0x00, + 0x18, 0x00, 0x30, 0x00, 0x18, 0x00, 0x30, 0x00, 0x31, 0x00, 0x18, 0x01, + 0x63, 0x00, 0x8c, 0x01, 0x87, 0x01, 0xc3, 0x01, 0x0f, 0xfe, 0xe0, 0x01, + 0x1f, 0x00, 0xf0, 0x01}; diff --git a/bitmaps/s-sco.xbm b/bitmaps/s-sco.xbm new file mode 100644 index 00000000..e0c439d6 --- /dev/null +++ b/bitmaps/s-sco.xbm @@ -0,0 +1,20 @@ +#define image_width 76 +#define image_height 25 +static char image_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x07,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x3f,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x07,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0x1f,0xf0,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,0xf0,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0xff, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,0x00,0xf0,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x78,0x00,0xf0, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0xf0,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x07,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; diff --git a/bitmaps/s-sgi.xbm b/bitmaps/s-sgi.xbm new file mode 100644 index 00000000..f9b8cd21 --- /dev/null +++ b/bitmaps/s-sgi.xbm @@ -0,0 +1,14 @@ +#define image_width 32 +#define image_height 32 +static unsigned char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0xf0, 0x1e, 0x00, + 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xff, 0xfe, 0x01, 0x80, 0xe7, 0xce, 0x03, + 0xe0, 0xe3, 0x8e, 0x0f, 0xf0, 0xe0, 0x0e, 0x1e, 0xf0, 0xe0, 0x0e, 0x1e, + 0xe0, 0xe3, 0x8e, 0x0f, 0x9c, 0xef, 0xee, 0x73, 0x3c, 0x1e, 0xf0, 0x78, + 0xfe, 0xf8, 0x3f, 0xfe, 0xfe, 0xf3, 0x9f, 0xff, 0xce, 0xcf, 0xe7, 0xe7, + 0x8e, 0x1f, 0xf0, 0xe3, 0x0e, 0x7e, 0xfc, 0xe0, 0x8e, 0xf9, 0x3e, 0xe3, + 0xce, 0xe3, 0x8e, 0xe7, 0xfe, 0xe1, 0x0e, 0xff, 0x7e, 0xec, 0x6e, 0xfc, + 0x1e, 0xef, 0xee, 0xf1, 0xc4, 0xef, 0xee, 0x47, 0xf0, 0xe3, 0x8e, 0x1f, + 0xf0, 0xe0, 0x0e, 0x1e, 0xf8, 0xe0, 0x0e, 0x3e, 0xf0, 0xe3, 0x8e, 0x1f, + 0xc0, 0xef, 0xee, 0x07, 0x00, 0xff, 0xfe, 0x01, 0x00, 0xfc, 0x7e, 0x00, + 0x00, 0xf0, 0x1e, 0x00, 0x00, 0x40, 0x04, 0x00}; diff --git a/bitmaps/s-sun.xbm b/bitmaps/s-sun.xbm new file mode 100644 index 00000000..2b0a2958 --- /dev/null +++ b/bitmaps/s-sun.xbm @@ -0,0 +1,13 @@ +#define image_width 29 +#define image_height 29 +static unsigned char image_bits[] = { + 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x74, 0x07, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0xdd, 0x1d, 0x00, + 0x80, 0xbb, 0x3b, 0x00, 0x40, 0x77, 0x57, 0x00, 0xe0, 0xee, 0xee, 0x00, + 0x70, 0xdd, 0x75, 0x01, 0xb8, 0xbb, 0xb9, 0x03, 0xdc, 0xf1, 0xdd, 0x01, + 0xee, 0xee, 0xee, 0x0e, 0x77, 0x1f, 0x77, 0x1f, 0xbb, 0x1b, 0xbb, 0x1b, + 0xdf, 0x1d, 0xdf, 0x1d, 0xee, 0xee, 0xee, 0x0e, 0x70, 0xf7, 0x71, 0x07, + 0xb8, 0xb3, 0xbb, 0x03, 0xd0, 0x75, 0xd7, 0x01, 0xe0, 0xee, 0xee, 0x00, + 0x40, 0xdd, 0x5d, 0x00, 0x80, 0xbb, 0x3b, 0x00, 0x00, 0x77, 0x17, 0x00, + 0x00, 0xee, 0x0e, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x00, 0xb8, 0x01, 0x00, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00}; diff --git a/bitmaps/s-x11.xbm b/bitmaps/s-x11.xbm new file mode 100644 index 00000000..7669c09d --- /dev/null +++ b/bitmaps/s-x11.xbm @@ -0,0 +1,6 @@ +#define image_width 16 +#define image_height 16 +static unsigned char image_bits[] = { + 0x0f, 0x80, 0x1e, 0x80, 0x3c, 0x40, 0x78, 0x20, 0x78, 0x10, 0xf0, 0x08, + 0xe0, 0x09, 0xc0, 0x05, 0xc0, 0x02, 0x40, 0x07, 0x20, 0x0f, 0x20, 0x1e, + 0x10, 0x1e, 0x08, 0x3c, 0x04, 0x78, 0x02, 0xf0}; diff --git a/bitmaps/shark-0.xbm b/bitmaps/shark-0.xbm new file mode 100644 index 00000000..fbfe999e --- /dev/null +++ b/bitmaps/shark-0.xbm @@ -0,0 +1,8 @@ +#define shark0_width 20 +#define shark0_height 20 +static unsigned char shark0_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, + 0xc0, 0x3f, 0x00, 0x40, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x26, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x38, 0x00}; diff --git a/bitmaps/shark-1.xbm b/bitmaps/shark-1.xbm new file mode 100644 index 00000000..d4d60271 --- /dev/null +++ b/bitmaps/shark-1.xbm @@ -0,0 +1,8 @@ +#define shark1_width 20 +#define shark1_height 20 +static unsigned char shark1_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x18, 0x00, + 0xc0, 0xff, 0x01, 0xfc, 0xff, 0x07, 0xfe, 0xff, 0x07, 0xc3, 0xff, 0x01, + 0x01, 0x18, 0x00, 0x07, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-2.xbm b/bitmaps/shark-2.xbm new file mode 100644 index 00000000..6ab9dac9 --- /dev/null +++ b/bitmaps/shark-2.xbm @@ -0,0 +1,8 @@ +#define shark2_width 20 +#define shark2_height 20 +static unsigned char shark2_bits[] = { + 0xc0, 0x01, 0x00, 0x60, 0x03, 0x00, 0x40, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x2f, 0x00, 0xc0, 0x3f, 0x00, + 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-3.xbm b/bitmaps/shark-3.xbm new file mode 100644 index 00000000..b1db4dcd --- /dev/null +++ b/bitmaps/shark-3.xbm @@ -0,0 +1,8 @@ +#define shark3_width 20 +#define shark3_height 20 +static unsigned char shark3_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x0e, 0x80, 0x01, 0x08, + 0xf8, 0x3f, 0x0c, 0xfe, 0xff, 0x07, 0xfe, 0xff, 0x03, 0xf8, 0x3f, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-4.xbm b/bitmaps/shark-4.xbm new file mode 100644 index 00000000..ec181a0f --- /dev/null +++ b/bitmaps/shark-4.xbm @@ -0,0 +1,8 @@ +#define shark4_width 20 +#define shark4_height 20 +static unsigned char shark4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, + 0xc0, 0x3f, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x40, 0x06, 0x00, 0x60, 0x03, 0x00, 0xc0, 0x01, 0x00}; diff --git a/bitmaps/shark-5.xbm b/bitmaps/shark-5.xbm new file mode 100644 index 00000000..a31ab234 --- /dev/null +++ b/bitmaps/shark-5.xbm @@ -0,0 +1,8 @@ +#define shark5_width 20 +#define shark5_height 20 +static unsigned char shark5_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x08, 0x00, 0x01, 0x18, 0x00, + 0xc3, 0xff, 0x01, 0xfe, 0xff, 0x07, 0xfc, 0xff, 0x07, 0xc0, 0xff, 0x01, + 0x00, 0x18, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-6.xbm b/bitmaps/shark-6.xbm new file mode 100644 index 00000000..09e01829 --- /dev/null +++ b/bitmaps/shark-6.xbm @@ -0,0 +1,8 @@ +#define shark6_width 20 +#define shark6_height 20 +static unsigned char shark6_bits[] = { + 0x00, 0x38, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x26, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x40, 0x0f, 0x00, 0xc0, 0x3f, 0x00, + 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-7.xbm b/bitmaps/shark-7.xbm new file mode 100644 index 00000000..b7c6821e --- /dev/null +++ b/bitmaps/shark-7.xbm @@ -0,0 +1,8 @@ +#define shark7_width 20 +#define shark7_height 20 +static unsigned char shark7_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x01, 0x00, + 0xf8, 0x3f, 0x00, 0xfe, 0xff, 0x03, 0xfe, 0xff, 0x07, 0xf8, 0x3f, 0x0c, + 0x80, 0x01, 0x08, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/sickle.xbm b/bitmaps/sickle.xbm new file mode 100644 index 00000000..91d7b4b1 --- /dev/null +++ b/bitmaps/sickle.xbm @@ -0,0 +1,9 @@ +#define sickle_width 21 +#define sickle_height 21 +static unsigned char sickle_bits[] = { + 0x00, 0x1e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, + 0xc0, 0x81, 0x01, 0xe0, 0x00, 0x03, 0xf0, 0x00, 0x03, 0xb8, 0x01, 0x07, + 0x10, 0x03, 0x07, 0x00, 0x06, 0x07, 0x00, 0x0c, 0x07, 0x00, 0x18, 0x07, + 0x00, 0x30, 0x07, 0x30, 0xe0, 0x03, 0x78, 0xc0, 0x03, 0xcc, 0xc0, 0x01, + 0x86, 0xe3, 0x03, 0x07, 0x7f, 0x06, 0x07, 0x3c, 0x0c, 0x03, 0x00, 0x08, + 0x00, 0x00, 0x00}; diff --git a/bitmaps/stipple.xbm b/bitmaps/stipple.xbm new file mode 100644 index 00000000..2e5b9411 --- /dev/null +++ b/bitmaps/stipple.xbm @@ -0,0 +1,4 @@ +#define stipple_width 16 +#define stipple_height 4 +static unsigned char stipple_bits[] = { + 0x55, 0x55, 0xee, 0xee, 0x55, 0x55, 0xba, 0xbb}; diff --git a/bitmaps/t-smilie.xbm b/bitmaps/t-smilie.xbm new file mode 100644 index 00000000..7b8bd526 --- /dev/null +++ b/bitmaps/t-smilie.xbm @@ -0,0 +1,4 @@ +#define image_width 8 +#define image_height 8 +static unsigned char image_bits[] = { + 0x3c, 0x7e, 0xdb, 0xff, 0xdb, 0xe7, 0x7e, 0x3c}; diff --git a/bitmaps/t-x11.xbm b/bitmaps/t-x11.xbm new file mode 100644 index 00000000..ef9bfdaa --- /dev/null +++ b/bitmaps/t-x11.xbm @@ -0,0 +1,5 @@ +#define image_width 11 +#define image_height 11 +static unsigned char image_bits[] = { + 0x0f, 0x04, 0x0f, 0x02, 0x1e, 0x01, 0x3c, 0x01, 0xb8, 0x00, 0x58, 0x00, + 0xe8, 0x00, 0xe4, 0x01, 0xc4, 0x03, 0xc2, 0x03, 0x81, 0x07 }; diff --git a/bitmaps/terra-00.xbm b/bitmaps/terra-00.xbm new file mode 100644 index 00000000..f27dc9f7 --- /dev/null +++ b/bitmaps/terra-00.xbm @@ -0,0 +1,48 @@ +#define terra00_width 64 +#define terra00_height 64 +#define terra00_x_hot 32 +#define terra00_y_hot 32 +static unsigned char terra00_bits[] = { +0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x01, 0xf8, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x20, 0x00, 0xdc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0xdc, 0xff, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0xd8, 0xff, 0x03, 0x00, +0x00, 0xe0, 0x00, 0xe0, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x78, 0x00, 0x00, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x1c, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x0e, 0x00, 0x80, 0xf7, 0xff, 0x7f, 0x00, 0x00, 0x03, 0x00, 0xf0, +0x21, 0xff, 0xff, 0x00, 0x80, 0x00, 0x00, 0xf0, 0x80, 0xfb, 0xff, 0x01, +0x00, 0x00, 0x00, 0x60, 0x00, 0xf2, 0xff, 0x01, 0x40, 0x00, 0x00, 0xa0, +0x1f, 0x80, 0xff, 0x03, 0x20, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0xff, 0x07, +0x00, 0x00, 0x00, 0xf0, 0xff, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0xf8, +0xff, 0xff, 0xdf, 0x0f, 0x08, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x3e, 0x1f, +0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7d, 0x18, 0x00, 0x00, 0x00, 0xff, +0xff, 0xff, 0xf9, 0x19, 0x04, 0x00, 0x80, 0xff, 0xff, 0xff, 0xfb, 0x31, +0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf7, 0x21, 0x00, 0x00, 0x00, 0xff, +0xff, 0xff, 0xe7, 0x21, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xef, 0x00, +0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x40, 0x04, 0x00, 0x80, 0xff, +0xff, 0xff, 0x1f, 0x40, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, +0x1e, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x1e, 0x00, 0x00, 0xfc, +0xf8, 0xff, 0xff, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, +0x7e, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x7f, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x3f, 0x00, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, +0xff, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xff, 0x0f, 0x00, 0x00, +0xc0, 0xff, 0x0f, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, +0xfe, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0xfe, 0x1f, 0x00, 0x00, +0x80, 0xff, 0x0f, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, +0xfc, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x8f, 0x00, 0xfc, 0x0f, 0x00, 0x00, +0x80, 0xff, 0xcf, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x67, 0x00, +0xf0, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x63, 0x00, 0xf0, 0x0f, 0x00, 0x00, +0x80, 0xff, 0x21, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x21, 0x00, +0xe0, 0x07, 0x00, 0x00, 0x00, 0xff, 0x11, 0x00, 0xe0, 0x03, 0x00, 0x00, +0x00, 0x7f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, +0xc0, 0x03, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, +0x00, 0x1e, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-01.xbm b/bitmaps/terra-01.xbm new file mode 100644 index 00000000..d6b309fc --- /dev/null +++ b/bitmaps/terra-01.xbm @@ -0,0 +1,48 @@ +#define terra01_width 64 +#define terra01_height 64 +#define terra01_x_hot 32 +#define terra01_y_hot 32 +static unsigned char terra01_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3e, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x07, 0xe0, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x86, 0x01, 0x60, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, +0xe0, 0xfe, 0x00, 0x00, 0x00, 0x40, 0x03, 0x00, 0xc6, 0xfc, 0x03, 0x00, +0x00, 0xe0, 0x03, 0x00, 0xce, 0xff, 0x07, 0x00, 0x00, 0xf8, 0x02, 0x00, +0xf0, 0xff, 0x1f, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, +0x00, 0x3c, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x0f, 0x00, 0x00, +0x3e, 0xf4, 0xff, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1e, 0xa0, 0xff, 0x01, +0x80, 0x01, 0x00, 0x00, 0x1c, 0x48, 0xff, 0x01, 0xc0, 0x00, 0x00, 0x00, +0xf0, 0x03, 0xf0, 0x03, 0x60, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xf0, 0x07, +0x20, 0x00, 0x00, 0x00, 0xfe, 0x9f, 0xfd, 0x07, 0x30, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0x0f, 0x38, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x19, +0x38, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xdf, 0x13, 0x38, 0x00, 0x00, 0xc0, +0xff, 0xff, 0xbf, 0x0f, 0x24, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x0f, +0x40, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x0f, 0x02, 0x00, 0x00, 0xc0, +0xff, 0xff, 0xff, 0x0e, 0x02, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x0e, +0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x07, 0x20, 0x00, 0x00, 0xc0, +0xff, 0xff, 0xff, 0x03, 0xf0, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x0f, +0xfc, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0x01, 0x00, 0x00, +0x7e, 0xfe, 0xff, 0x0f, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, +0xf8, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 0xfc, 0x0f, 0x00, 0x00, +0x00, 0xf0, 0xff, 0x07, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, +0xfc, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x01, 0xfc, 0xff, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x01, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x01, +0xf8, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff, 0x01, 0xf8, 0xff, 0x07, 0x00, +0x00, 0xc0, 0xff, 0x01, 0xf0, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0x01, +0xf0, 0xff, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x01, 0xf0, 0xff, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x04, 0xe0, 0xff, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x04, +0xc0, 0xff, 0x03, 0x00, 0x00, 0xe0, 0x7f, 0x02, 0x80, 0xff, 0x01, 0x00, +0x00, 0xe0, 0x3f, 0x02, 0x80, 0xff, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x01, +0x80, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x01, 0x00, 0x7f, 0x00, 0x00, +0x00, 0xe0, 0x0f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, +0x00, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x3e, 0x00, 0x00, +0x00, 0xc0, 0x01, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xfe, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-02.xbm b/bitmaps/terra-02.xbm new file mode 100644 index 00000000..339f5c29 --- /dev/null +++ b/bitmaps/terra-02.xbm @@ -0,0 +1,48 @@ +#define terra02_width 64 +#define terra02_height 64 +#define terra02_x_hot 32 +#define terra02_y_hot 32 +static unsigned char terra02_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3c, 0x80, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x08, 0x0c, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, +0x00, 0xf7, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x00, 0x60, 0xe4, 0x03, 0x00, +0x00, 0xe0, 0x3f, 0x00, 0xa0, 0xfe, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, +0x00, 0xff, 0x1f, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xff, 0x3f, 0x00, +0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x7f, 0x00, 0x00, +0xc0, 0x07, 0xff, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0x03, 0xff, 0x01, +0x80, 0x0f, 0x00, 0x00, 0x80, 0x03, 0xf4, 0x01, 0xc0, 0x07, 0x00, 0x00, +0x00, 0x7d, 0xc0, 0x03, 0xe0, 0x03, 0x00, 0x00, 0x80, 0xff, 0x80, 0x07, +0xe0, 0x01, 0x00, 0x00, 0x80, 0xff, 0xfb, 0x07, 0x30, 0x00, 0x00, 0x00, +0xc0, 0xff, 0xff, 0x0f, 0x18, 0x01, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1e, +0x08, 0x01, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x00, +0xf0, 0xff, 0xff, 0x1f, 0x04, 0x01, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, +0x14, 0x02, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x37, 0x0c, 0x00, 0x00, 0x00, +0xf0, 0xff, 0xff, 0x37, 0x18, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x2f, +0x18, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x10, 0x03, 0x00, 0x00, +0xf0, 0xff, 0xff, 0x1f, 0x90, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x3f, +0xc0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x80, 0x7f, 0x00, 0x00, +0x80, 0x9f, 0xff, 0x3f, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x3f, +0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0xc0, 0xff, 0x03, 0x00, +0x00, 0x00, 0xfc, 0x3f, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x1f, +0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xe0, 0xff, 0xff, 0x00, +0x00, 0x00, 0xf8, 0x1f, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x0f, +0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x0f, 0xc0, 0xff, 0xff, 0x01, +0x00, 0x00, 0xf8, 0x0f, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x0f, +0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0xff, 0xff, 0x00, +0x00, 0x00, 0xfc, 0x2f, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x07, +0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x13, 0x00, 0xfc, 0x7f, 0x00, +0x00, 0x00, 0xf8, 0x01, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0x09, +0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0xf8, 0x0f, 0x00, +0x00, 0x00, 0xfc, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x7c, 0x00, +0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xf0, 0x07, 0x00, +0x00, 0x00, 0x1c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x90, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-03.xbm b/bitmaps/terra-03.xbm new file mode 100644 index 00000000..310ae6ab --- /dev/null +++ b/bitmaps/terra-03.xbm @@ -0,0 +1,48 @@ +#define terra03_width 64 +#define terra03_height 64 +#define terra03_x_hot 32 +#define terra03_y_hot 32 +static unsigned char terra03_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe3, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf3, 0x00, 0x0e, 0x00, 0x00, +0x00, 0x00, 0x2e, 0x70, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, +0x00, 0xd8, 0x00, 0x00, 0x00, 0xc0, 0xf3, 0x01, 0x00, 0xa2, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x01, 0x00, 0xec, 0x07, 0x00, 0x00, 0xf8, 0x3f, 0x01, +0x00, 0xf0, 0x1f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xf0, 0x3f, 0x00, +0x00, 0xfe, 0x0f, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xff, 0x03, 0x00, +0x00, 0x78, 0xf8, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x78, 0xe8, 0x01, +0xc0, 0xff, 0x00, 0x00, 0x00, 0x30, 0xe8, 0x01, 0xc0, 0x7f, 0x00, 0x00, +0x00, 0xe0, 0x07, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x06, +0xe0, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 0xe0, 0x08, 0x00, 0x00, +0x00, 0xf0, 0xff, 0x0f, 0x70, 0x08, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, +0x30, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x30, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x1f, 0x30, 0x11, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, +0xb0, 0x40, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0xf0, 0x00, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x3f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, +0x80, 0x01, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x61, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x7f, 0x00, 0xf1, 0x03, 0x00, 0x00, 0xf0, 0xff, 0x7f, +0x00, 0xfa, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0xf8, 0x0f, 0x00, +0x00, 0xc0, 0xe7, 0xff, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xff, +0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0xfc, 0xff, 0x00, +0x00, 0x00, 0x80, 0xff, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x80, 0x7f, +0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x80, 0x7f, 0x00, 0xfe, 0xff, 0x7f, +0x00, 0x00, 0x00, 0x7f, 0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, +0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x00, 0xf8, 0xff, 0xff, +0x00, 0x00, 0x00, 0x3f, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x3f, +0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0xf0, 0xff, 0x3f, +0x00, 0x00, 0x80, 0x3f, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x3f, +0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x80, 0xff, 0x3f, +0x00, 0x00, 0x80, 0x0f, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0x80, 0x0f, +0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xff, 0x03, +0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x80, 0x03, +0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xff, 0x00, +0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xe0, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x30, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-04.xbm b/bitmaps/terra-04.xbm new file mode 100644 index 00000000..7adeff83 --- /dev/null +++ b/bitmaps/terra-04.xbm @@ -0,0 +1,48 @@ +#define terra04_width 64 +#define terra04_height 64 +#define terra04_x_hot 32 +#define terra04_y_hot 32 +static unsigned char terra04_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x8f, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x9d, 0x07, 0x08, 0x00, 0x00, +0x00, 0x00, 0x3e, 0x81, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0b, +0x00, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x9f, 0x0f, 0x00, 0x90, 0x02, 0x00, +0x00, 0xe0, 0xdf, 0x1f, 0x00, 0x70, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x31, +0x00, 0x80, 0x1f, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x3f, 0x00, +0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0x7f, 0x00, +0x00, 0x80, 0xf3, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xc3, 0x01, +0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x02, 0x01, 0x80, 0xff, 0x07, 0x00, +0x00, 0x00, 0x38, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x7e, 0x00, +0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x07, 0xc0, 0x07, 0x01, 0x00, +0x00, 0x00, 0xfe, 0x0f, 0xc0, 0x03, 0x01, 0x00, 0x00, 0x00, 0xff, 0x1f, +0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x80, 0x01, 0x00, 0x00, +0x00, 0x00, 0xff, 0x1f, 0x80, 0x11, 0x02, 0x00, 0x00, 0x00, 0xff, 0x3f, +0x80, 0x1b, 0x18, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x80, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xff, 0x3f, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, +0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x10, 0x08, 0x00, +0x00, 0x00, 0xfe, 0x7f, 0x00, 0x20, 0xfe, 0x01, 0x00, 0x00, 0xfc, 0x7f, +0x00, 0x40, 0xff, 0x03, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xff, 0x07, +0x00, 0x00, 0xf8, 0xfe, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, +0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x80, 0xff, 0x7f, +0x00, 0x00, 0x00, 0xf8, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, +0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x80, 0xff, 0xff, +0x3f, 0x00, 0x00, 0xf0, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, +0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x70, 0x00, 0x00, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x70, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x70, +0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x78, 0x00, 0x00, 0xfc, 0xff, +0x1f, 0x00, 0x00, 0x78, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x38, +0x00, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xe0, 0xff, +0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x1c, +0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xe0, 0xff, +0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x0c, +0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xe0, 0x3f, +0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x80, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x70, 0x1e, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-05.xbm b/bitmaps/terra-05.xbm new file mode 100644 index 00000000..8805cdc5 --- /dev/null +++ b/bitmaps/terra-05.xbm @@ -0,0 +1,48 @@ +#define terra05_width 64 +#define terra05_height 64 +#define terra05_x_hot 32 +#define terra05_y_hot 32 +static unsigned char terra05_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, +0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x67, 0x3c, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x00, 0x0c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x78, +0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0xff, 0xf8, 0x00, 0x40, 0x02, 0x00, +0x00, 0xc0, 0xff, 0xfd, 0x01, 0x80, 0x06, 0x00, 0x00, 0xe0, 0xff, 0x7f, +0x02, 0x00, 0x1e, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x3c, 0x00, +0x00, 0xf8, 0xff, 0x2f, 0x00, 0x00, 0x70, 0x00, 0x00, 0xf8, 0xff, 0x07, +0x00, 0x00, 0xdc, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x38, 0x01, +0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x30, 0x01, 0x00, 0xfe, 0xff, 0x00, +0x00, 0x00, 0xc0, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x03, +0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x7c, 0x20, 0x00, +0x00, 0x00, 0xe0, 0x0f, 0x00, 0x3c, 0x20, 0x00, 0x00, 0x00, 0xe0, 0x1f, +0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x38, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x1f, 0x00, 0x38, 0xc2, 0x00, 0x00, 0x00, 0xe0, 0x3f, +0x00, 0x38, 0x03, 0x06, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0xf0, 0x01, 0x00, +0x00, 0x00, 0xe0, 0x3f, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0xe0, 0x7f, +0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x04, 0x02, +0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x88, 0x7f, 0x00, 0x00, 0x80, 0x7f, +0x00, 0x00, 0xd0, 0xff, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, +0x03, 0x00, 0x00, 0xef, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0xe0, +0x00, 0x00, 0xc0, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0xff, +0x1f, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0xc0, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x0f, 0x00, 0x80, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x80, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, +0xff, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x40, +0x00, 0x00, 0x80, 0xff, 0xff, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, +0xff, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x20, +0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf8, +0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, +0x1f, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x08, +0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x19, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-06.xbm b/bitmaps/terra-06.xbm new file mode 100644 index 00000000..b9d09926 --- /dev/null +++ b/bitmaps/terra-06.xbm @@ -0,0 +1,48 @@ +#define terra06_width 64 +#define terra06_height 64 +#define terra06_x_hot 32 +#define terra06_y_hot 32 +static unsigned char terra06_bits[] = { +0x00, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x9f, 0xf3, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x07, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc3, +0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc7, 0x0f, 0x00, 0x02, 0x00, +0x00, 0x80, 0xff, 0xdf, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x80, 0xff, 0xff, +0x07, 0x00, 0x18, 0x00, 0x00, 0x80, 0xff, 0xff, 0x07, 0x00, 0x30, 0x00, +0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x40, 0x00, 0x00, 0xe0, 0xff, 0xff, +0x00, 0x00, 0xe0, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0x00, +0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf0, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x03, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x07, +0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc0, 0x1f, 0x08, +0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x1e, +0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x07, 0x00, +0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x87, 0x20, 0x00, 0x00, 0x00, 0x3e, +0x00, 0x00, 0xcf, 0x00, 0x03, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, +0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x7c, +0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x81, +0x01, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xc2, 0x3f, 0x00, 0x00, 0x78, +0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xe0, +0xff, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x80, +0x00, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, +0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-07.xbm b/bitmaps/terra-07.xbm new file mode 100644 index 00000000..8e45e846 --- /dev/null +++ b/bitmaps/terra-07.xbm @@ -0,0 +1,48 @@ +#define terra07_width 64 +#define terra07_height 64 +#define terra07_x_hot 32 +#define terra07_y_hot 32 +static unsigned char terra07_bits[] = { +0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, +0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xcc, 0x03, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x3f, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x1f, +0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x7c, 0x00, 0x02, 0x00, +0x00, 0x00, 0xfc, 0xff, 0xfd, 0x01, 0x08, 0x00, 0x00, 0x00, 0xfc, 0xff, +0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x7f, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, +0x1f, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x01, +0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x04, +0x00, 0x00, 0xfe, 0xbf, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, +0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0xf8, 0x01, 0x02, 0x00, 0x00, 0x18, +0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xe0, 0x01, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xe0, 0x21, 0x08, 0x00, 0x00, 0x30, +0x00, 0x00, 0xe0, 0x33, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x80, 0x3f, +0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x60, +0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, +0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, 0xe1, 0x0f, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0xfa, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x3f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfc, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-08.xbm b/bitmaps/terra-08.xbm new file mode 100644 index 00000000..a1550473 --- /dev/null +++ b/bitmaps/terra-08.xbm @@ -0,0 +1,48 @@ +#define terra08_width 64 +#define terra08_height 64 +#define terra08_x_hot 32 +#define terra08_y_hot 32 +static unsigned char terra08_bits[] = { +0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, +0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x33, 0x06, 0x00, 0x00, +0x00, 0x00, 0xfc, 0xff, 0x61, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe2, 0xff, +0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xc7, 0x03, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x2f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7e, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-09.xbm b/bitmaps/terra-09.xbm new file mode 100644 index 00000000..01486ec1 --- /dev/null +++ b/bitmaps/terra-09.xbm @@ -0,0 +1,48 @@ +#define terra09_width 64 +#define terra09_height 64 +#define terra09_x_hot 32 +#define terra09_y_hot 32 +static unsigned char terra09_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x9f, 0x0c, 0x00, 0x00, +0x00, 0x00, 0xf8, 0xff, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x88, 0xff, +0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x1e, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +0xff, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x7f, 0x01, 0x00, +0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x40, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x86, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x7e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-10.xbm b/bitmaps/terra-10.xbm new file mode 100644 index 00000000..7578bdf6 --- /dev/null +++ b/bitmaps/terra-10.xbm @@ -0,0 +1,48 @@ +#define terra10_width 64 +#define terra10_height 64 +#define terra10_x_hot 32 +#define terra10_y_hot 32 +static unsigned char terra10_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xbf, 0x01, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xff, 0xff, 0x04, 0x00, 0x00, +0x00, 0x00, 0xc6, 0xff, 0x7f, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x60, 0xf8, +0x7f, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x73, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x0f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x10, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-11.xbm b/bitmaps/terra-11.xbm new file mode 100644 index 00000000..52681d21 --- /dev/null +++ b/bitmaps/terra-11.xbm @@ -0,0 +1,48 @@ +#define terra11_width 64 +#define terra11_height 64 +#define terra11_x_hot 32 +#define terra11_y_hot 32 +static unsigned char terra11_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0xff, 0x0b, 0x00, 0x00, +0x00, 0x00, 0x0e, 0xff, 0xff, 0x33, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc3, +0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xdf, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfd, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x40, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x11, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x13, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, +0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x10, 0x00, 0x00, +0x00, 0x00, 0x60, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, +0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-12.xbm b/bitmaps/terra-12.xbm new file mode 100644 index 00000000..844e2fa3 --- /dev/null +++ b/bitmaps/terra-12.xbm @@ -0,0 +1,48 @@ +#define terra12_width 64 +#define terra12_height 64 +#define terra12_x_hot 32 +#define terra12_y_hot 32 +static unsigned char terra12_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfb, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x3e, 0xf8, 0xff, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x06, 0x38, +0xfc, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf8, 0x7f, 0x03, 0x00, +0x00, 0x20, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, +0xc0, 0xff, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, +0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x40, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0c, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, +0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x01, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, +0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-13.xbm b/bitmaps/terra-13.xbm new file mode 100644 index 00000000..bbc96e17 --- /dev/null +++ b/bitmaps/terra-13.xbm @@ -0,0 +1,48 @@ +#define terra13_width 64 +#define terra13_height 64 +#define terra13_x_hot 32 +#define terra13_y_hot 32 +static unsigned char terra13_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xc1, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, +0xe1, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x80, 0xff, 0x03, 0x00, +0x00, 0x60, 0x02, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, +0x00, 0xfc, 0x1f, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, +0x00, 0x06, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0xc0, 0x01, 0x00, 0x00, +0x00, 0x80, 0xff, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x11, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x23, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1c, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-14.xbm b/bitmaps/terra-14.xbm new file mode 100644 index 00000000..9a33968f --- /dev/null +++ b/bitmaps/terra-14.xbm @@ -0,0 +1,48 @@ +#define terra14_width 64 +#define terra14_height 64 +#define terra14_x_hot 32 +#define terra14_y_hot 32 +static unsigned char terra14_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, +0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x0f, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, +0x1c, 0xfe, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x00, 0x00, 0xfc, 0x03, 0x00, +0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf8, 0x01, 0x00, +0x00, 0xc0, 0x1f, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, +0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x07, 0x00, 0x00, +0x00, 0x00, 0xff, 0x00, 0x80, 0x13, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x40, 0x05, 0x00, 0x00, +0x00, 0x00, 0xf8, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, +0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x30, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x07, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x70, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x10, 0x1e, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-15.xbm b/bitmaps/terra-15.xbm new file mode 100644 index 00000000..ecccd46a --- /dev/null +++ b/bitmaps/terra-15.xbm @@ -0,0 +1,48 @@ +#define terra15_width 64 +#define terra15_height 64 +#define terra15_x_hot 32 +#define terra15_y_hot 32 +static unsigned char terra15_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xf9, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x7f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x04, +0xc0, 0xf8, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x06, 0x00, 0xe0, 0x03, 0x00, +0x00, 0xe0, 0x0f, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, +0x00, 0x00, 0x1e, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, +0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3f, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, +0x80, 0x8b, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xc0, 0x41, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x03, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0e, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x16, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x27, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-16.xbm b/bitmaps/terra-16.xbm new file mode 100644 index 00000000..0bfbbb64 --- /dev/null +++ b/bitmaps/terra-16.xbm @@ -0,0 +1,48 @@ +#define terra16_width 64 +#define terra16_height 64 +#define terra16_x_hot 32 +#define terra16_y_hot 32 +static unsigned char terra16_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, +0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xef, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0x83, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x61, +0x00, 0xe6, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x30, 0x00, 0x00, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0xf8, 0x7f, 0x00, +0x00, 0x00, 0x18, 0x00, 0x00, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0x30, 0x00, +0x00, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xff, 0x01, 0x00, +0x00, 0x00, 0xc0, 0x00, 0x80, 0xbf, 0x10, 0x00, 0x00, 0x00, 0x80, 0x01, +0x80, 0x9f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x0f, 0x06, 0x00, +0x00, 0x00, 0x00, 0x02, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, +0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x08, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x68, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x8f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x04, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0c, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xfe, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x18, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-17.xbm b/bitmaps/terra-17.xbm new file mode 100644 index 00000000..8f28b27b --- /dev/null +++ b/bitmaps/terra-17.xbm @@ -0,0 +1,48 @@ +#define terra17_width 64 +#define terra17_height 64 +#define terra17_x_hot 32 +#define terra17_y_hot 32 +static unsigned char terra17_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x6f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0x1f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, +0x06, 0x90, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x03, 0x10, 0x02, 0x00, +0x00, 0xe0, 0xff, 0x07, 0x01, 0x00, 0x04, 0x00, 0x00, 0xf8, 0xff, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1b, 0x02, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x81, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x41, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x20, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x26, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0xe0, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x87, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xc0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-18.xbm b/bitmaps/terra-18.xbm new file mode 100644 index 00000000..bc619898 --- /dev/null +++ b/bitmaps/terra-18.xbm @@ -0,0 +1,48 @@ +#define terra18_width 64 +#define terra18_height 64 +#define terra18_x_hot 32 +#define terra18_y_hot 32 +static unsigned char terra18_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0e, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, +0x30, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0x30, 0x00, 0x00, 0x00, +0x00, 0xe0, 0xff, 0xff, 0x10, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xbf, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x41, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x1f, 0x61, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x1f, 0x11, +0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x70, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x38, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x3c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x38, 0x30, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x22, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x86, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, +0x00, 0xcc, 0x09, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xf0, +0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x40, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x8f, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xdf, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, +0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xf8, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc0, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-19.xbm b/bitmaps/terra-19.xbm new file mode 100644 index 00000000..4b45fb60 --- /dev/null +++ b/bitmaps/terra-19.xbm @@ -0,0 +1,48 @@ +#define terra19_width 64 +#define terra19_height 64 +#define terra19_x_hot 32 +#define terra19_y_hot 32 +static unsigned char terra19_bits[] = { +0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, +0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x67, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0x07, 0x81, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x83, 0x01, 0x00, 0x00, +0x00, 0xe0, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0x07, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, +0x08, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0xff, 0x63, 0x08, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, +0x06, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0xe8, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc4, 0xe7, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc4, 0xe3, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xe1, 0x07, 0x04, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x0e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf1, 0x08, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf1, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x73, 0x02, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, +0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, +0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, +0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-20.xbm b/bitmaps/terra-20.xbm new file mode 100644 index 00000000..4c34ba9d --- /dev/null +++ b/bitmaps/terra-20.xbm @@ -0,0 +1,48 @@ +#define terra20_width 64 +#define terra20_height 64 +#define terra20_x_hot 32 +#define terra20_y_hot 32 +static unsigned char terra20_bits[] = { +0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0x3f, 0x08, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x1f, 0x08, 0x02, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +0x0f, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x0d, 0x00, 0x00, 0x00, +0x80, 0xff, 0xff, 0xff, 0x08, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, +0x88, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, +0xe0, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, +0x01, 0x00, 0x00, 0x00, 0xd8, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +0x38, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x38, 0xfe, 0xff, 0x1f, +0x01, 0x00, 0x00, 0x00, 0x3c, 0xfe, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, +0x1c, 0x7c, 0xf8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x3c, 0xf8, 0x01, +0x01, 0x00, 0x00, 0x00, 0x06, 0x0c, 0xe0, 0x03, 0x01, 0x00, 0x00, 0x00, +0x02, 0x0c, 0xe0, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x03, +0x04, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x03, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x20, 0x40, +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x7c, +0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x3c, 0xc0, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x38, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0x02, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1b, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xff, 0x3f, 0x00, 0x00, 0x08, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x83, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-21.xbm b/bitmaps/terra-21.xbm new file mode 100644 index 00000000..40673878 --- /dev/null +++ b/bitmaps/terra-21.xbm @@ -0,0 +1,48 @@ +#define terra21_width 64 +#define terra21_height 64 +#define terra21_x_hot 32 +#define terra21_y_hot 32 +static unsigned char terra21_bits[] = { +0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, +0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0x21, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x61, 0x00, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +0xff, 0x21, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x9f, 0x21, 0x00, 0x00, +0xc0, 0xff, 0xff, 0xff, 0x1f, 0x21, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, +0x1f, 0x30, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, +0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, +0xf8, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xe8, 0xe3, 0xff, 0xff, +0x0f, 0x00, 0x00, 0x00, 0xfc, 0xc1, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, +0xf4, 0x81, 0x0f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x76, 0x80, 0x07, 0xfe, +0x00, 0x00, 0x00, 0x00, 0x36, 0x80, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, +0x1e, 0x80, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x01, 0xe0, +0x00, 0x00, 0x00, 0x00, 0x1e, 0x80, 0x01, 0x40, 0x00, 0x03, 0x00, 0x00, +0x1f, 0x00, 0x02, 0x08, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x10, +0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x16, 0x38, 0x00, 0x00, 0x00, +0x0f, 0x00, 0x00, 0x2c, 0x1c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, +0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x30, 0x1e, 0x20, 0x00, 0x00, +0x03, 0x00, 0x00, 0x70, 0xdc, 0xa0, 0x01, 0x00, 0x03, 0x00, 0x00, 0x60, +0x00, 0x80, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x06, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, +0x00, 0x7e, 0x06, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0xff, 0x06, 0x00, +0x24, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0x00, 0x24, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x0f, 0x00, 0x28, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, +0x08, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x08, 0x00, 0x00, 0x00, +0xf8, 0xff, 0x0f, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x90, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-22.xbm b/bitmaps/terra-22.xbm new file mode 100644 index 00000000..fabfb41f --- /dev/null +++ b/bitmaps/terra-22.xbm @@ -0,0 +1,48 @@ +#define terra22_width 64 +#define terra22_height 64 +#define terra22_x_hot 32 +#define terra22_y_hot 32 +static unsigned char terra22_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, +0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x8f, 0x01, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0x7f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xff, +0xff, 0x3f, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x13, 0x02, 0x00, +0x80, 0xff, 0xff, 0xff, 0xff, 0x23, 0x02, 0x00, 0x00, 0xfe, 0xff, 0xff, +0xff, 0x27, 0x03, 0x00, 0x20, 0xfe, 0xff, 0xff, 0xff, 0x87, 0x00, 0x00, +0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xf7, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x00, 0xf8, 0xe7, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, +0xb8, 0x0f, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0xb8, 0x3f, 0xfc, 0xff, +0xff, 0x03, 0x00, 0x00, 0xbc, 0x3f, 0xf0, 0xc7, 0xbf, 0x00, 0x00, 0x00, +0xbc, 0x1f, 0xf0, 0x83, 0x9f, 0x00, 0x00, 0x00, 0xbe, 0x0f, 0xf0, 0x81, +0x3f, 0x00, 0x00, 0x00, 0xbe, 0x03, 0xf0, 0x00, 0x7e, 0x00, 0x00, 0x00, +0xfe, 0x00, 0x60, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x7e, 0x00, 0x60, 0x00, +0x70, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x60, 0x00, 0x20, 0xc0, 0x00, 0x00, +0xff, 0x01, 0x80, 0x00, 0x02, 0xc0, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, +0x04, 0x88, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x09, 0x0c, 0x00, 0x00, +0xff, 0x00, 0x00, 0x00, 0x0a, 0x0e, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +0x8c, 0x0f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1c, 0x0f, 0x08, 0x00, +0x1f, 0x00, 0x00, 0x00, 0x38, 0x27, 0x78, 0x00, 0x1f, 0x00, 0x00, 0x00, +0x10, 0x20, 0xe0, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, +0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x3e, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x02, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x3e, 0x03, 0x00, 0x00, +0x00, 0x80, 0x4f, 0x00, 0x3e, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, +0x3c, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x3c, 0x02, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x00, 0x38, 0x02, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, +0x38, 0x02, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x30, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, +0x60, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x40, 0x00, 0x00, 0x00, +0x00, 0x1e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-23.xbm b/bitmaps/terra-23.xbm new file mode 100644 index 00000000..ab8c6c7c --- /dev/null +++ b/bitmaps/terra-23.xbm @@ -0,0 +1,48 @@ +#define terra23_width 64 +#define terra23_height 64 +#define terra23_x_hot 32 +#define terra23_y_hot 32 +static unsigned char terra23_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, +0xdf, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, +0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, +0xff, 0xff, 0x01, 0x00, 0x00, 0xfa, 0xff, 0xff, 0xff, 0xbf, 0x01, 0x00, +0x40, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x40, 0xe0, 0xff, 0xff, +0xff, 0x7f, 0x30, 0x00, 0x20, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00, +0xe0, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x7f, 0xfe, 0xff, +0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, +0xf8, 0xfb, 0x84, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xfb, 0x0f, 0xff, +0xff, 0x7f, 0x00, 0x00, 0xfc, 0xfb, 0x07, 0xfc, 0xf3, 0x2f, 0x00, 0x00, +0xfc, 0xf3, 0x03, 0xfc, 0xe1, 0x27, 0x00, 0x00, 0xfe, 0xf3, 0x01, 0x7c, +0xc0, 0x0f, 0x04, 0x00, 0xfe, 0x73, 0x00, 0x38, 0x00, 0x1f, 0x04, 0x00, +0xfe, 0x1f, 0x00, 0x38, 0x00, 0x1f, 0x08, 0x00, 0xfe, 0x07, 0x00, 0x38, +0x00, 0x1c, 0x10, 0x00, 0xfe, 0x7f, 0x00, 0x10, 0x00, 0x08, 0x10, 0x00, +0xff, 0x3f, 0x00, 0x40, 0x00, 0x01, 0x10, 0x00, 0xff, 0x3f, 0x00, 0x00, +0x00, 0x02, 0x02, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0x02, 0x03, 0x00, +0xfe, 0x0f, 0x00, 0x00, 0x00, 0x87, 0x03, 0x00, 0xfe, 0x07, 0x00, 0x00, +0x00, 0xc7, 0x13, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, +0xfe, 0x03, 0x00, 0x00, 0x00, 0xcc, 0x09, 0x07, 0xfc, 0x01, 0x00, 0x00, +0x00, 0x0c, 0x08, 0x0e, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0c, 0xfc, 0x03, 0x00, 0x00, +0x00, 0x00, 0x10, 0x10, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xf8, 0x63, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x05, 0xf8, 0x33, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, +0xf8, 0x21, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xf0, 0x21, 0x00, 0x00, +0x00, 0x00, 0xff, 0x07, 0xf0, 0x23, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, +0xe0, 0x23, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0xe0, 0x03, 0x00, 0x00, +0x00, 0xc0, 0xff, 0x07, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, +0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, 0x80, 0x03, 0x00, 0x00, +0x00, 0xc0, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-24.xbm b/bitmaps/terra-24.xbm new file mode 100644 index 00000000..3de2659d --- /dev/null +++ b/bitmaps/terra-24.xbm @@ -0,0 +1,48 @@ +#define terra24_width 64 +#define terra24_height 64 +#define terra24_x_hot 32 +#define terra24_y_hot 32 +static unsigned char terra24_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, +0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xe8, 0xff, 0xff, +0xff, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, +0x00, 0xd4, 0xff, 0xff, 0xff, 0xff, 0x87, 0x00, 0xc0, 0x01, 0xff, 0xff, +0xff, 0xff, 0xa7, 0x00, 0xe0, 0x01, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x00, +0xe0, 0xdf, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0xdf, 0xff, +0xff, 0xff, 0x1f, 0x00, 0xf8, 0xbf, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x00, +0xf8, 0x3f, 0xbf, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0xf8, 0x7f, 0xff, 0xc1, +0xff, 0xff, 0x0f, 0x00, 0xfc, 0x7f, 0xff, 0x01, 0xff, 0xfc, 0x01, 0x00, +0xfc, 0x7f, 0xfe, 0x00, 0x7e, 0xf8, 0x05, 0x00, 0xfe, 0x7f, 0x7e, 0x00, +0x3e, 0xf0, 0x03, 0x00, 0xfe, 0xff, 0x1e, 0x00, 0x1e, 0xc0, 0x03, 0x00, +0xfe, 0xff, 0x03, 0x00, 0x0c, 0xc0, 0x07, 0x00, 0xfe, 0xff, 0x01, 0x00, +0x0c, 0x00, 0x07, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x0c, 0x00, 0x02, 0x00, +0xff, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x00, 0x02, 0xff, 0xff, 0x07, 0x00, +0x00, 0x80, 0x40, 0x02, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x20, 0x60, 0x00, +0xf0, 0xff, 0x03, 0x00, 0x00, 0x40, 0x61, 0x00, 0xf0, 0xff, 0x01, 0x00, +0x00, 0x80, 0x71, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x80, 0x71, 0x00, +0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x33, 0x30, 0xf0, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x02, 0x20, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x20, 0x62, 0xe0, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x7f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xff, 0x08, 0x00, +0x00, 0x00, 0x00, 0x0e, 0xc0, 0x7f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x1f, +0xc0, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x1f, 0xc0, 0x3f, 0x0c, 0x00, +0x00, 0x00, 0xe0, 0x1f, 0x80, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0xf0, 0x1f, +0x00, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x3f, 0x00, 0x00, +0x00, 0x00, 0xf8, 0x0f, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, +0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x1c, 0x00, 0x00, +0x00, 0x00, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-25.xbm b/bitmaps/terra-25.xbm new file mode 100644 index 00000000..a966acb1 --- /dev/null +++ b/bitmaps/terra-25.xbm @@ -0,0 +1,48 @@ +#define terra25_width 64 +#define terra25_height 64 +#define terra25_x_hot 32 +#define terra25_y_hot 32 +static unsigned char terra25_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x80, 0xf4, 0xff, 0xff, 0xff, 0x03, 0x00, +0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x4c, 0xff, 0xff, +0xff, 0xff, 0x3f, 0x00, 0x00, 0x06, 0xfd, 0xff, 0xff, 0xff, 0x7f, 0x00, +0x00, 0x03, 0xfd, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x0f, 0xe0, 0xff, +0xff, 0xff, 0x7f, 0x02, 0x80, 0x0f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x02, +0xc0, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xf3, +0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xf7, 0xc7, 0xff, 0xff, 0xff, 0x01, +0xf0, 0xff, 0xef, 0x2f, 0xf8, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xef, 0xff, +0xf0, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xcf, 0x7f, 0xc0, 0x3f, 0x3f, 0x00, +0xf8, 0xff, 0xcf, 0x7f, 0x80, 0x1f, 0x3e, 0x00, 0xfc, 0xff, 0x9f, 0x1f, +0x80, 0x0f, 0x7c, 0x00, 0xfc, 0xff, 0x9f, 0x07, 0x80, 0x07, 0x78, 0x00, +0xfc, 0xff, 0xff, 0x01, 0x00, 0x07, 0x78, 0x08, 0xfc, 0xff, 0x7f, 0x00, +0x00, 0x07, 0xe0, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x02, 0x40, 0x10, +0xfc, 0xff, 0xff, 0x03, 0x00, 0x08, 0x10, 0x10, 0xdc, 0xff, 0xff, 0x03, +0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x28, 0x04, +0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x30, 0x06, 0x80, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x30, 0x07, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x20, 0x46, +0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xe0, 0xc6, 0x00, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x40, 0x80, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, +0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xfe, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xfe, 0x1f, 0x06, +0x00, 0x00, 0x00, 0x70, 0x00, 0xfe, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x38, +0x00, 0xfc, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0xfc, 0x07, 0x03, +0x00, 0x00, 0x00, 0x3e, 0x00, 0xf8, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1f, +0x00, 0xf8, 0x07, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x00, 0xf0, 0x07, 0x00, +0x00, 0x00, 0x80, 0x1f, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x80, 0x0f, +0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xc0, 0x03, 0x00, +0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-26.xbm b/bitmaps/terra-26.xbm new file mode 100644 index 00000000..1c0b085c --- /dev/null +++ b/bitmaps/terra-26.xbm @@ -0,0 +1,48 @@ +#define terra26_width 64 +#define terra26_height 64 +#define terra26_x_hot 32 +#define terra26_y_hot 32 +static unsigned char terra26_bits[] = { +0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfe, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x32, 0xff, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x70, 0xf4, 0xff, +0xff, 0xff, 0xff, 0x00, 0x00, 0x38, 0xb1, 0xff, 0xff, 0xff, 0xff, 0x01, +0x00, 0x18, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf8, 0x00, 0xfc, +0xff, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x03, +0x00, 0xfe, 0xfb, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0xff, +0xfe, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0xfd, 0xf1, 0xff, 0xff, 0x07, +0xc0, 0xff, 0xff, 0xf9, 0x0b, 0xfe, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xfb, +0x3f, 0xfc, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xf3, 0x3f, 0xf0, 0xe7, 0x03, +0xe0, 0xff, 0xff, 0xf3, 0x1f, 0xe0, 0xc3, 0x03, 0xf0, 0xff, 0xff, 0xe7, +0x07, 0xe0, 0xc3, 0x03, 0xf0, 0xff, 0xff, 0xef, 0x01, 0xc0, 0x01, 0x07, +0xf0, 0xff, 0xff, 0x5f, 0x00, 0xc0, 0x00, 0x07, 0xf0, 0xff, 0xff, 0x1f, +0x00, 0x80, 0x00, 0x04, 0xf0, 0xff, 0xff, 0xff, 0x01, 0x80, 0x00, 0x04, +0xf0, 0xff, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0xe0, 0xfd, 0xff, 0xff, +0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x21, +0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x22, 0x00, 0xf0, 0xff, 0x3f, +0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf4, +0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x6c, 0x00, 0xe0, 0xff, 0x07, +0x00, 0x00, 0x00, 0x04, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x08, +0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0xc0, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x8f, +0x01, 0x00, 0x00, 0x40, 0x00, 0xc0, 0xff, 0xc7, 0x01, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x20, 0x00, 0x80, 0xff, 0xc1, +0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x18, +0x00, 0x00, 0xff, 0x41, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xff, 0x00, +0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x0c, +0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x78, 0x00, +0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-27.xbm b/bitmaps/terra-27.xbm new file mode 100644 index 00000000..ef89c5d1 --- /dev/null +++ b/bitmaps/terra-27.xbm @@ -0,0 +1,48 @@ +#define terra27_width 64 +#define terra27_height 64 +#define terra27_x_hot 32 +#define terra27_y_hot 32 +static unsigned char terra27_bits[] = { +0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf8, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xfb, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0xdc, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xc7, 0xfe, +0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x83, 0xf6, 0xff, 0xff, 0xff, 0x01, +0x00, 0xc0, 0x41, 0xf0, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x1f, 0x00, +0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x1f, 0x00, 0xff, 0xff, 0xff, 0x07, +0x00, 0xf0, 0x7f, 0xef, 0xff, 0xff, 0xff, 0x07, 0x00, 0xf8, 0xff, 0xff, +0xbf, 0xff, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x7f, 0x7f, 0xfc, 0xff, 0x1f, +0x00, 0xfe, 0xff, 0xff, 0xfe, 0x82, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, +0xfe, 0x0f, 0xff, 0x1f, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x0f, 0x7c, 0x1e, +0x00, 0xff, 0xff, 0xff, 0xf9, 0x07, 0x7c, 0x1c, 0x00, 0xff, 0xff, 0xff, +0xf9, 0x03, 0x38, 0x1c, 0x80, 0xff, 0xff, 0xff, 0xf3, 0x00, 0x38, 0x18, +0x80, 0xff, 0xff, 0xff, 0x37, 0x00, 0x30, 0x30, 0x80, 0xff, 0xff, 0xff, +0x0f, 0x00, 0x30, 0x20, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x20, +0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x40, 0x00, 0x00, 0xbe, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x90, +0x00, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x90, 0x00, 0x00, 0xfc, 0xff, +0x0f, 0x00, 0x00, 0xb0, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xa0, +0x01, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x01, 0x00, 0xf8, 0xff, +0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, +0x03, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, +0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, +0x02, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, +0x43, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, 0x71, 0x00, 0x00, 0x00, +0x04, 0x00, 0xf0, 0xff, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe0, 0x7f, +0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x30, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x7f, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0xc0, 0x3f, +0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-28.xbm b/bitmaps/terra-28.xbm new file mode 100644 index 00000000..2be7270b --- /dev/null +++ b/bitmaps/terra-28.xbm @@ -0,0 +1,48 @@ +#define terra28_width 64 +#define terra28_height 64 +#define terra28_x_hot 32 +#define terra28_y_hot 32 +static unsigned char terra28_bits[] = { +0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, +0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x04, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0x98, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0xe0, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x78, 0xc8, +0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3c, 0xd0, 0xfe, 0xff, 0xff, 0x01, +0x00, 0x00, 0x1c, 0x88, 0xfe, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x03, +0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0x03, 0xe0, 0xff, 0xff, 0x07, +0x00, 0x00, 0xfe, 0xcf, 0xfb, 0xff, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, +0xff, 0xef, 0xff, 0x0f, 0x00, 0xc0, 0xff, 0xff, 0xdf, 0x9f, 0xff, 0x1f, +0x00, 0xc0, 0xff, 0xff, 0xbf, 0xbf, 0xf0, 0x1f, 0x00, 0xe0, 0xff, 0xff, +0x3f, 0xff, 0xe1, 0x1f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0xff, 0xc1, 0x37, +0x00, 0xe0, 0xff, 0xff, 0x7f, 0xfe, 0x81, 0x33, 0x00, 0xf0, 0xff, 0xff, +0xff, 0xfc, 0x80, 0x23, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3d, 0x00, 0x63, +0x00, 0xf0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x43, 0x00, 0xf0, 0xff, 0xff, +0xff, 0x03, 0x00, 0x02, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x02, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x01, 0xc0, 0xe7, 0xff, +0xff, 0x1f, 0x00, 0x00, 0x01, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, +0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x80, 0x01, 0x00, 0x00, 0xff, +0xff, 0x07, 0x00, 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x80, +0x07, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfe, +0xff, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, +0x1f, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xfc, +0xff, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, +0x0e, 0x00, 0x00, 0xfc, 0xff, 0x21, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xfc, +0xff, 0x31, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xfc, 0x7f, 0x18, 0x00, 0x00, +0x1c, 0x00, 0x00, 0xfc, 0x3f, 0x18, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xf8, +0x3f, 0x0c, 0x00, 0x00, 0x18, 0x00, 0x00, 0xf8, 0x3f, 0x0c, 0x00, 0x00, +0x08, 0x00, 0x00, 0xf8, 0x1f, 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0xf0, +0x0f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xe0, +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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-29.xbm b/bitmaps/terra-29.xbm new file mode 100644 index 00000000..ba9bc5cf --- /dev/null +++ b/bitmaps/terra-29.xbm @@ -0,0 +1,48 @@ +#define terra29_width 64 +#define terra29_height 64 +#define terra29_x_hot 32 +#define terra29_y_hot 32 +static unsigned char terra29_bits[] = { +0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xdf, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x08, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xfb, 0xff, 0x00, 0x00, 0x00, 0x40, 0x00, 0x8c, 0xf9, 0xff, 0x03, 0x00, +0x00, 0x20, 0x00, 0xce, 0xff, 0xff, 0x07, 0x00, 0x00, 0x18, 0x00, 0xf8, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x04, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x0f, +0xf9, 0xff, 0xff, 0x00, 0x00, 0x00, 0x80, 0x07, 0xda, 0xff, 0xff, 0x01, +0x00, 0x00, 0x80, 0x03, 0x90, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7d, +0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0x00, 0xf8, 0xff, 0x07, +0x00, 0x00, 0xc0, 0xff, 0xf3, 0xff, 0xff, 0x07, 0x00, 0x00, 0xe0, 0xff, +0xff, 0xff, 0xfd, 0x0f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xf7, 0xf3, 0x1f, +0x00, 0x00, 0xf8, 0xff, 0xff, 0xef, 0x07, 0x1f, 0x00, 0x00, 0xfc, 0xff, +0xff, 0xef, 0x3f, 0x1e, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xdf, 0x3f, 0x1c, +0x00, 0x00, 0xfc, 0xff, 0xff, 0x9f, 0x3f, 0x18, 0x00, 0x00, 0xfc, 0xff, +0xff, 0xbf, 0x1f, 0x18, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x0f, 0x18, +0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x03, 0x10, 0x00, 0x00, 0xfe, 0xff, +0xff, 0xff, 0x00, 0x10, 0x02, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x0f, 0x00, +0x03, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 0x00, 0x03, 0x00, 0xf0, 0xf3, +0xff, 0xff, 0x07, 0x00, 0x07, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, +0x07, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x07, 0x00, 0x00, 0x80, +0xff, 0xff, 0x01, 0x00, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, +0x3f, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, +0xff, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, +0xff, 0x01, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, +0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, +0xfe, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x04, 0x00, 0xfe, 0x00, 0x00, 0x00, +0xff, 0x7f, 0x06, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x07, 0x00, +0xfc, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x03, 0x00, 0xfc, 0x00, 0x00, 0x00, +0xfe, 0x0f, 0x03, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x01, 0x00, +0x78, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x01, 0x00, 0x70, 0x00, 0x00, 0x00, +0xfc, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, +0x60, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, +0x78, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/trek-0.xbm b/bitmaps/trek-0.xbm new file mode 100644 index 00000000..251cb426 --- /dev/null +++ b/bitmaps/trek-0.xbm @@ -0,0 +1,267 @@ +#define trek0_width 241 +#define trek0_height 102 +static unsigned char trek0_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, + 0xe0, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc7, 0xff, 0x85, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x3f, 0x00, 0x29, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0xc1, 0xff, 0x00, 0x00, 0x00, 0xc5, 0x14, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x7b, 0x00, 0x00, 0xff, 0xbf, 0xb2, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x80, + 0x92, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x40, 0x05, 0x78, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x39, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x09, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x5f, 0x33, 0x68, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, + 0xf0, 0x89, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x24, + 0x34, 0x00, 0x00, 0x00, 0x00, 0x78, 0xfe, 0x4f, 0x16, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xd4, 0x12, 0x00, 0x00, 0x00, 0x00, + 0xfa, 0x01, 0xc0, 0xfa, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xe0, 0xff, 0xff, 0xff, 0x01, + 0x40, 0x52, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x22, 0x13, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x01, 0x00, 0x00, 0x10, 0xfb, 0xbf, 0x10, 0x09, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x50, 0x22, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0xfd, 0x0f, + 0x88, 0x04, 0x80, 0xc2, 0x06, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, + 0xe2, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf4, 0x67, 0x78, 0x00, 0x95, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x68, 0x19, 0x1b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x13, 0x70, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x28, 0x0b, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x08, 0x00, + 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xa8, 0x04, 0x24, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1b, 0xf8, 0x6b, 0x07, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x82, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x94, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1d, 0x00, 0x24, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, + 0x28, 0x1b, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0xa8, 0xf0, 0x2b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0x33, 0x56, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x12, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x8d, 0x48, 0x74, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xaa, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x6e, 0x5b, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x94, 0x80, 0x04, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0xa0, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf0, 0xab, 0x43, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0a, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x56, + 0xee, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x4a, 0xc6, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x40, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x2b, 0x71, 0xa7, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0e, 0x25, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x25, 0x11, 0x45, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x25, 0x11, 0x49, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1b, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x22, 0x11, 0x88, 0xfe, 0x87, 0x80, 0xff, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xef, 0x22, + 0x81, 0x0b, 0x3d, 0x78, 0xbf, 0xff, 0xff, 0xff, 0x03, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0xec, 0xef, 0xb9, 0xde, 0x3f, 0xc0, + 0xff, 0xf9, 0xff, 0xfb, 0xff, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x5b, 0x7e, + 0x8f, 0x81, 0x20, 0x00, 0x03, 0xf8, 0xc0, 0x7f, 0x00, 0x80, 0xff, 0x07, + 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0d, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x6f, 0xdb, 0xc7, 0x60, 0x40, 0x40, 0x00, 0x1c, + 0x00, 0x0f, 0x80, 0x7f, 0x00, 0x00, 0xf8, 0x6f, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x32, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9f, 0x7f, + 0x7b, 0x3c, 0x18, 0x20, 0x40, 0x00, 0x60, 0x00, 0xf0, 0x03, 0x80, 0x7f, + 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7e, 0xdf, 0xc7, 0x03, 0x07, 0x10, 0x80, + 0x00, 0x80, 0x03, 0x00, 0x7c, 0x00, 0x80, 0xff, 0xf0, 0x91, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x98, + 0xf9, 0x3c, 0x38, 0xc0, 0x00, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x80, + 0x0f, 0x00, 0xc0, 0x0c, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x81, 0x01, 0x00, 0xe0, 0x73, 0xa4, 0xc7, 0x03, 0x07, 0x30, 0x00, + 0x06, 0x00, 0x01, 0x00, 0x30, 0x00, 0x00, 0xf0, 0x81, 0x3f, 0x04, 0x48, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x02, 0x00, 0xde, + 0x8b, 0x3d, 0x3c, 0xe0, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc0, + 0x01, 0x00, 0x00, 0x7a, 0x00, 0x04, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x0c, 0xc0, 0x07, 0xfc, 0xe1, 0x03, 0x1e, 0x80, + 0x03, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x00, 0xf0, 0x07, 0x00, + 0x02, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x10, + 0xde, 0xb9, 0x07, 0x1e, 0xc0, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x10, 0xf0, 0x0f, 0x04, 0x00, 0x02, 0x2c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0xe7, 0x01, 0x0e, 0x80, 0x07, + 0x00, 0x06, 0x00, 0x20, 0x00, 0x00, 0x88, 0xff, 0xff, 0xff, 0x1f, 0x00, + 0x02, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x13, 0x1f, 0xf0, 0x01, 0x78, 0x00, 0xc0, 0x01, 0x00, 0x10, 0x00, + 0xf8, 0x67, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0xb9, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7c, 0x00, 0x0f, 0x00, + 0x06, 0x00, 0x20, 0x00, 0x00, 0x88, 0xff, 0x07, 0x10, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x02, 0x80, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x73, 0xbf, 0x00, 0xc0, 0x01, 0x00, 0x18, 0x00, 0xe0, + 0x7f, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x9c, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x80, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe1, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x80, 0x00, 0x20, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0xe2, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x80, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0xfc, 0x87, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x40, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x10, 0x00, 0xf8, 0xff, 0x03, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x01, 0x01, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x10, 0xff, 0x07, 0x08, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, + 0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0xff, 0x1f, 0xf2, 0x7f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf9, 0x7f, 0x01, 0x00, 0x10, 0x00, + 0xc0, 0xf7, 0xff, 0xff, 0xdd, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd0, 0x39, 0x80, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xb7, 0xdf, 0x41, 0x92, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xdc, 0xfd, 0xfb, 0xff, + 0xff, 0xff, 0x3e, 0xc0, 0x22, 0x42, 0xd0, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x44, + 0x22, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x01, 0xd0, 0x89, 0x22, 0x75, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x30, 0x12, 0x24, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x98, 0x61, 0x00, 0x00, 0x00, 0x80, 0x00, 0x30, 0x2c, 0xa4, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x01, 0x00, 0x00, + 0x80, 0x00, 0x30, 0x50, 0xa5, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x04, 0x00, 0x00, 0x80, 0x00, 0x18, 0x80, 0x4d, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0x60, 0x00, 0x0c, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x41, 0x00, 0x00, 0x20, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x86, 0xf1, 0xff, 0xff, + 0x17, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x08, 0xf2, 0xff, 0x3f, 0x6c, 0x0e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x04, + 0x00, 0x20, 0x8c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0xd0, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x88, 0x60, 0x0b, 0x18, 0x10, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0xf0, 0x03, 0x06, + 0xac, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x41, 0x0a, 0x3d, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x00, + 0x91, 0x00, 0x05, 0x71, 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, 0x03, 0x00, 0x61, 0xa1, 0x84, 0x41, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x0c, 0x80, 0x80, 0x5a, 0xcc, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x80, 0x40, 0x20, 0x32, + 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0xe0, 0x40, 0x40, 0x2c, 0x0d, 0x70, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x43, 0x20, + 0xd2, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x3c, 0x20, 0x4a, 0x01, 0xc0, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, + 0x20, 0x03, 0x65, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x20, 0xbc, 0x64, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x20, 0xd0, 0x12, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x20, 0x10, 0x09, + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x21, 0x90, 0x04, 0x00, 0x00, 0x05, 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, 0x22, + 0x90, 0x34, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x90, 0x34, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x32, 0x90, 0x34, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x90, 0x34, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x58, 0x7c, 0x0d, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, + 0x23, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x6a, 0x00, 0x40, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x21, 0x92, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x54, 0x02, 0xb0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x47, 0xa8, 0x0d, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x0c, + 0xd6, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x42, 0xf8, 0x22, 0x00, 0x00, 0x00, + 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, 0x4c, 0x11, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x31, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/trek-1.xbm b/bitmaps/trek-1.xbm new file mode 100644 index 00000000..6c812a46 --- /dev/null +++ b/bitmaps/trek-1.xbm @@ -0,0 +1,177 @@ +#define trek1_width 241 +#define trek1_height 67 +static unsigned char trek1_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x2f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xdc, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xc0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x80, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xe0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x56, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0xff, 0xff, + 0x7f, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x40, 0xe0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x00, 0x7e, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x43, 0xc0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x4c, 0x00, 0x00, 0x42, 0x60, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x42, + 0xe0, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0x07, 0x08, 0x00, 0x02, 0x80, 0xf8, 0xff, 0xff, + 0xff, 0x3f, 0x00, 0x80, 0xff, 0xff, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x80, 0x00, + 0x08, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0xc2, 0xc0, 0x1f, 0x00, 0x00, + 0x00, 0x42, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x01, 0x00, 0x00, 0x02, 0x80, 0x00, + 0x00, 0x00, 0x02, 0x00, 0x30, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, + 0x00, 0x01, 0xf0, 0xff, 0xff, 0x7f, 0xff, 0x3f, 0x80, 0x03, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x26, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x80, 0xff, 0x1f, 0x00, 0x02, + 0x80, 0x00, 0xe0, 0xff, 0xdf, 0x81, 0x30, 0x00, 0x00, 0x00, 0x26, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3a, 0x00, 0xfe, 0x3f, 0x1f, 0x08, 0xc0, 0xff, 0x7f, 0x80, 0xf0, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0xfe, 0x07, 0xff, + 0xe0, 0x39, 0x20, 0xf0, 0x81, 0xff, 0x1f, 0x40, 0x06, 0x00, 0x00, 0x00, + 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x44, 0x10, 0xe1, 0xff, + 0xff, 0xff, 0x2f, 0x03, 0x00, 0x00, 0x00, 0x24, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xff, 0xff, 0x3f, 0xd2, 0x09, 0x68, 0xbe, 0x00, 0x00, 0xc0, 0x01, 0x00, + 0x00, 0x00, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfd, 0x3f, 0xfe, 0x24, 0x49, + 0xd4, 0x7f, 0x01, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x24, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x5f, 0x4b, 0xef, 0xf7, 0x03, 0x00, 0x80, + 0x03, 0x00, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x2a, 0x1c, 0x00, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x24, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x8a, 0x06, 0x00, 0x0c, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x58, 0x8b, 0x03, 0x00, 0x10, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf4, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x75, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x38, + 0x00, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x00, 0x00, 0x40, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x24, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x28, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x80, 0x01, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x38, 0x08, 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, 0x1f, 0x06, 0x00, 0x00, 0x18, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, + 0xff, 0x1d, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x17, 0x00, 0x02, 0xe0, 0x3f, 0x00, 0x18, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf4, 0xff, 0xff, 0x07, 0xc0, 0xff, 0x1b, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x01, 0xf8, 0xfe, + 0x9f, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x02, 0x00, 0x01, 0x00, 0x01, 0xe0, 0x7f, 0x04, 0x2f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x60, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x08, 0xfe, 0xff, 0xff, 0xff, 0x0b, 0x00, 0xc0, 0x01, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, + 0x00, 0x01, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x03, 0x00, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xfe, 0xff, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x78, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x12, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xfb, 0x3f, 0x01, 0xff, 0xff, + 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xd0, 0x12, 0xc0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x12, 0x00, 0x01, + 0x80, 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, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00}; diff --git a/bitmaps/trek-2.xbm b/bitmaps/trek-2.xbm new file mode 100644 index 00000000..259ef71d --- /dev/null +++ b/bitmaps/trek-2.xbm @@ -0,0 +1,249 @@ +#define trek2_width 281 +#define trek2_height 82 +static unsigned char trek2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x01, 0x3e, 0x80, 0x40, 0x03, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, + 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x80, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x01, 0x00, + 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x82, 0x80, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0xe1, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x80, 0x43, 0x4a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x81, 0x01, 0xe0, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x82, 0x80, 0x41, 0x12, 0x52, 0x06, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0c, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x22, 0x25, 0x0d, 0x69, 0x81, 0x0f, 0x00, 0x00, 0x00, 0x80, + 0x0f, 0xf0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x74, 0x00, + 0x00, 0x02, 0x02, 0x60, 0x29, 0x89, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, + 0x07, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x30, 0x06, 0x20, + 0x00, 0x04, 0x04, 0x10, 0x23, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x66, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x80, 0x00, 0xc0, 0x18, 0x0d, 0x40, + 0x02, 0x08, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf5, + 0x37, 0x7f, 0x00, 0xe0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x07, 0x08, 0x01, 0x80, 0x51, 0x08, 0x02, 0x40, + 0x00, 0x20, 0x20, 0xb0, 0x00, 0x00, 0x00, 0x08, 0x1b, 0x00, 0x00, 0x00, + 0x40, 0x08, 0x21, 0xb0, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x20, 0x04, 0x00, 0x46, 0x25, 0x08, 0x0b, 0x40, + 0x00, 0x08, 0x00, 0x43, 0x1e, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x91, + 0x31, 0x62, 0x4c, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x00, 0x88, 0x00, 0x8c, 0xd2, 0x14, 0x84, 0x41, 0x00, + 0x00, 0x00, 0x01, 0x30, 0x32, 0x18, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x30, 0x8a, 0xd2, 0x14, 0x02, 0x01, 0x04, + 0x00, 0x80, 0x00, 0x4c, 0xb0, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x00, 0x00, 0x3a, 0x16, 0xd1, 0x14, 0x06, 0x40, 0x00, + 0x00, 0x02, 0x81, 0x02, 0x26, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x28, 0x1a, 0x82, 0xb0, 0x0c, 0x00, 0x03, 0x00, + 0x20, 0x20, 0x30, 0x01, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x1a, 0x92, 0x30, 0x00, 0x18, 0xf0, 0xdf, + 0x5f, 0x02, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x40, 0x00, 0x04, 0x18, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x22, 0x96, 0x62, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x20, 0x00, 0x32, 0x00, 0x00, 0x20, 0xa5, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x18, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x20, 0x06, 0x16, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x24, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x85, 0x52, 0x03, 0x00, + 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x40, 0x24, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x28, 0xa5, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x08, 0x10, 0x4a, 0x29, 0x14, 0x00, + 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x01, 0x04, 0x00, 0x19, 0x22, 0x00, + 0x00, 0x00, 0x40, 0x00, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x40, 0x10, 0x00, 0x00, 0x03, 0x00, 0x20, 0x85, 0x50, 0x2b, 0x01, + 0x00, 0x00, 0x80, 0x82, 0x08, 0x00, 0x10, 0x20, 0x20, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x13, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xb4, 0xd0, 0x90, + 0x01, 0x00, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x80, 0x00, + 0x00, 0x40, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x21, 0x10, + 0x24, 0x00, 0x00, 0x04, 0x01, 0x08, 0x80, 0xa0, 0x04, 0x00, 0x63, 0x00, + 0x00, 0xe0, 0x3d, 0x00, 0x10, 0x04, 0x00, 0x00, 0x24, 0x06, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x94, 0x92, 0x00, + 0x02, 0x09, 0x48, 0x40, 0x28, 0x44, 0x40, 0x00, 0x09, 0x80, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x80, 0x00, 0x01, 0x20, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0xad, 0x14, 0x00, + 0x40, 0x40, 0x26, 0x08, 0x85, 0x02, 0x20, 0x06, 0x10, 0x00, 0x61, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x03, 0x00, 0x40, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x02, 0x02, 0x42, 0x09, 0x40, + 0x00, 0x04, 0x00, 0x82, 0x08, 0x10, 0x12, 0x14, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, 0x00, 0x80, 0x04, 0x40, 0x4a, + 0x00, 0x0c, 0x00, 0x00, 0x80, 0x00, 0x04, 0x04, 0x00, 0x82, 0x02, 0x00, + 0x00, 0x40, 0x00, 0x41, 0x88, 0x02, 0x80, 0x08, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80, 0x80, 0x60, 0x20, + 0x04, 0x00, 0x00, 0xe0, 0x03, 0x10, 0x20, 0x08, 0x0c, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x84, 0x10, 0x06, 0x22, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x02, 0x01, 0x20, 0x04, + 0x00, 0x70, 0x00, 0x00, 0x18, 0x10, 0x01, 0x01, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x41, 0x44, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x04, 0x00, + 0x0c, 0x00, 0x00, 0x18, 0x00, 0x00, 0x02, 0x08, 0x11, 0x00, 0x00, 0x04, + 0x01, 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x18, 0x04, 0x00, 0x08, 0x00, 0x08, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x08, 0x00, 0x0c, 0x00, + 0x00, 0x0c, 0x10, 0x04, 0x00, 0x00, 0x00, 0x02, 0x21, 0x00, 0x00, 0x40, + 0x10, 0x08, 0x02, 0x40, 0x00, 0x08, 0x02, 0x20, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x20, 0x00, 0x18, 0x00, 0x00, + 0x18, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x08, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x22, 0x20, 0x00, 0x00, 0x30, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x09, 0x50, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x80, 0x01, 0x08, 0x00, 0x04, + 0x00, 0x01, 0x00, 0x01, 0x20, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x30, 0x00, 0x20, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x20, 0x00, 0x08, + 0x08, 0x04, 0x00, 0x00, 0x80, 0x40, 0x00, 0x81, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x01, 0x02, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x14, 0x80, 0x00, 0x40, + 0x08, 0x10, 0x00, 0x28, 0x00, 0x02, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x03, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x40, 0x4c, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x82, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0x04, 0x03, 0x80, 0x00, 0x04, 0x00, + 0xc0, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x22, 0x92, 0x00, 0x02, 0x10, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0xc0, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x01, 0x04, 0x08, 0x00, 0x00, + 0x00, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0xc0, 0x80, 0x00, 0x00, 0x08, + 0x00, 0x32, 0x00, 0x00, 0x20, 0x02, 0x01, 0x04, 0x10, 0x26, 0x00, 0x00, + 0x00, 0x08, 0x80, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x32, 0x01, 0x00, 0x04, 0x00, + 0x79, 0x92, 0x00, 0x08, 0x81, 0x06, 0x10, 0x20, 0x08, 0x80, 0x00, 0x00, + 0x00, 0x10, 0x40, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, 0x00, 0x32, 0x23, 0x00, 0x20, 0x00, + 0x01, 0x92, 0x06, 0x00, 0x02, 0x20, 0x40, 0x10, 0x00, 0x02, 0x00, 0x04, + 0x08, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3c, 0x01, 0x00, 0x00, 0x08, 0x00, 0x02, 0x05, 0x00, 0x40, 0x01, + 0x29, 0x0f, 0xc2, 0x00, 0x0c, 0x41, 0x10, 0x00, 0x03, 0x06, 0x06, 0x00, + 0x00, 0x60, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5a, 0x06, 0x00, 0x00, 0x84, 0x00, 0x88, 0x10, 0x00, 0x00, 0x05, + 0x2c, 0xb0, 0x19, 0x08, 0xe0, 0x01, 0x00, 0x04, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc8, 0x03, 0x00, 0x00, 0x84, 0x00, 0x30, 0x00, 0x00, 0x00, 0x80, + 0x14, 0x04, 0x01, 0x80, 0x08, 0x00, 0x04, 0x28, 0x90, 0x20, 0x01, 0x08, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x50, 0x00, 0x04, 0x0c, 0x00, 0x00, 0x30, + 0x98, 0x02, 0x00, 0x40, 0xa0, 0x80, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0xc8, 0x18, 0x00, 0x00, 0x00, 0x22, + 0x20, 0x44, 0x80, 0x01, 0x10, 0x80, 0x80, 0x30, 0x00, 0x00, 0x25, 0x01, + 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x1a, 0x00, 0x00, 0x80, 0x00, + 0x01, 0xa4, 0x00, 0xb0, 0x01, 0x12, 0x00, 0xa0, 0x05, 0x01, 0x0c, 0x00, + 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x18, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x00, 0x10, 0x90, 0x12, 0x80, 0x00, 0x98, 0x02, 0x00, 0x08, 0x00, + 0x01, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x01, 0x00, 0xc0, 0x00, 0x08, + 0x00, 0x40, 0x00, 0x80, 0x40, 0x00, 0x00, 0x02, 0x00, 0x80, 0x80, 0x10, + 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x60, 0x02, 0x10, 0x10, 0x80, 0x02, 0x00, 0x01, 0x00, 0x20, + 0x10, 0x00, 0x00, 0x30, 0x22, 0x03, 0x00, 0x00, 0x00, 0x01, 0x20, 0x20, + 0x00, 0x00, 0x20, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x40, 0x40, 0x80, 0x02, 0x04, 0x00, 0x06, 0x00, 0x00, 0x70, + 0x00, 0x00, 0x00, 0x04, 0x48, 0x18, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x40, 0x00, 0x05, 0x08, 0x02, 0x05, 0x00, 0x00, 0x20, 0x46, + 0x00, 0x00, 0x40, 0x20, 0x04, 0x28, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, + 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x50, 0x60, 0x00, 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4a, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x04, 0x00, 0x04, 0x20, 0x40, 0x00, 0x80, 0x00, 0x00, 0x44, + 0xc0, 0x33, 0x0a, 0x80, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x10, 0x04, 0x00, 0x20, 0x00, 0x03, 0x80, 0x31, 0x08, + 0x00, 0x00, 0x50, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x30, 0x00, 0x06, 0x02, 0x10, 0x04, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x02, 0x00, 0x00, 0x00, 0x40, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0xc0, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, 0x48, 0x00, 0x40, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x08, 0x30, 0x10, 0x88, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x20, 0x02, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x02, 0x01, 0x88, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x02, 0x00, 0x00, 0x04, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x80, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x10, 0x08, 0x00, 0x01, 0x08, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x08, 0x01, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x20, 0x15, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x3d, 0x4c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, + 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/vlines2.xbm b/bitmaps/vlines2.xbm new file mode 100644 index 00000000..dc738647 --- /dev/null +++ b/bitmaps/vlines2.xbm @@ -0,0 +1,4 @@ +#define vlines2_width 2 +#define vlines2_height 1 +static unsigned char vlines2_bits[] = { + 0x01}; diff --git a/bitmaps/vlines3.xbm b/bitmaps/vlines3.xbm new file mode 100644 index 00000000..a9b30731 --- /dev/null +++ b/bitmaps/vlines3.xbm @@ -0,0 +1,4 @@ +#define vlines3_width 3 +#define vlines3_height 1 +static unsigned char vlines3_bits[] = { + 0x02}; 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.in b/config.h.in new file mode 100644 index 00000000..eadf7847 --- /dev/null +++ b/config.h.in @@ -0,0 +1,310 @@ +/*- + * config.h.in --- xlockmore + * + * 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. + * + * At the bottom, there are a few things commented out that are not + * automatically detected (past "NOT AUTOMATICALLY DETECTED YET"). + * + */ + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to empty if the keyword does not work. */ +#undef inline + +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* 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 your declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if gettimeofday requires two arguments. */ +#undef GETTIMEOFDAY_TWO_ARGS + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define if you have the gethostname function. */ +#undef HAVE_GETHOSTNAME + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the seteuid function. */ +#undef HAVE_SETEUID + +/* Define if you have the setreuid function. */ +#undef HAVE_SETREUID + +/* Define one of these if they exist, usleep prefered. */ +#undef HAVE_USLEEP +#undef HAVE_NANOSLEEP + +/* If left undefined will default to internal Random Number Generator */ +#undef SRAND +#undef LRAND +#undef MAXRAND + +/* Enable use of matherr function */ +#undef USE_MATHERR + +/* Define if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the shadow passwords (or elf). */ +#undef HAVE_SHADOW + +/* Define if you have the sigset_t structure. */ +#undef HAVE_STRUCT_SIGSET_T + +/* Various system defines. */ +#undef SYSV +#undef SVR4 +#undef linux +#undef SOLARIS2 +#undef LESS_THAN_SOLARIS2_5 +#undef SUNOS4 +#undef _POSIX_SOURCE +#undef _BSD_SOURCE +#undef _GNU_SOURCE +#undef AIXV3 +#undef LESS_THAN_AIX3_2 +#undef SUN_OGL_NO_VERTEX_MACROS + +/* Define this if your version of OpenGL has the glBindTexture() routine. + This is the case for OpenGL 1.1, but not for OpenGL 1.0. + */ +#undef HAVE_GLBINDTEXTURE + +/* Define if you have XPM (look for it under a X11 dir). */ +#undef USE_XPM + +/* Define if you have XPM (when its not under a X11 dir, not the norm). */ +#undef USE_XPMINC + +/* Define if you have c++ */ +#undef HAVE_CXX + +/* Define if you have FreeType (libttf.a) */ +#undef HAVE_TTF + +/* Define if you have GLTT (libgltt.a) */ +#undef HAVE_GLTT + +/* Define if you have XMU (Editres). */ +#undef USE_XMU + +/* Define if you have GL (MesaGL). */ +#undef USE_GL + +/* Define if you have DtSaver. */ +#undef USE_DTSAVER + +/* Define if you have DPMS (Display Power Management Signaling). */ +#undef USE_DPMS + +/* Define one of these for sounds. */ +#undef USE_RPLAY +#undef USE_NAS +#undef USE_VMSPLAY +#undef DEF_PLAY + +/* Allows xlock to run in root window (some window managers have problems) */ +#undef USE_VROOT + +/* Users can not turn off allowroot */ +#undef ALWAYS_ALLOW_ROOT + +/* Paranoid administrator option (a check is also done to see if you have it) */ +#undef USE_SYSLOG + +/* Multiple users ... security? */ +#undef USE_MULTIPLE_USER + +/* Multiple root users ... security? */ +#undef USE_MULTIPLE_ROOT + +/* Allow a window to be placed over xlock */ +#undef USE_WINDOW_VISIBILITY + +/* Some machines may still need this (fd_set errors may be a sign) */ +#undef USE_OLD_EVENT_LOOP + +/* This patches up old __VMS_VER < 70000000 */ +#undef USE_VMSUTILS + +/* For personal use you may want to consider: */ +/* Unfriendly paranoid admininistrator or unknown shadow passwd algorithm */ +#undef USE_XLOCKRC + +/* For labs you may want to consider: */ + +/* Enable auto-logout code, minutes until auto-logout */ +#undef USE_AUTO_LOGOUT + +/* Set default for auto-logout code, hard limit is USE_AUTO_LOGOUT */ +#undef DEF_AUTO_LOGOUT + +/* Enable logout button, minutes until button appears */ +#undef USE_BUTTON_LOGOUT + +/* Set default for logout button code, hard limit is USE_LOGOUT_BUTTON */ +#undef DEF_BUTTON_LOGOUT + +/* Enable automatic logout mode (does not come up in random mode) */ +#undef USE_BOMB + +/* Enable unstable modes */ +#undef USE_UNSTABLE + +/* Define one of these with USE_AUTO_LOGOUT, USE_LOGOUT_BUTTON, and/or + USE_BOMB, if using xdm */ +#undef CLOSEDOWN_LOGOUT +#undef SESSION_LOGOUT + +/* File of staff who are exempt */ +#undef STAFF_FILE + +/* Netgroup that is exempt */ +#undef STAFF_NETGROUP + +/* Digital Unix Enhanced Security */ +#undef OSF1_ENH_SEC + +/* Kerberos 4 */ +#undef HAVE_KRB4 + +/* Kerberos 5 */ +#undef HAVE_KRB5 + +/* DCE Passwording */ +#undef DCE_PASSWD + +/* Define to use and link against PAM */ +#undef PAM + +/* AIX AFS Passwording */ +#undef AFS + +/* SUNOS Adjunct Passwording */ +#undef SUNOS_ADJUNCT_PASSWD + +/* USE Xmb function series */ +#undef USE_MB + +/* XResource customization, drawback -display option may not work */ +#undef CUSTOMIZATION + +/* reporting language customization */ +#undef NL +#undef FR +#undef DE + +/* enabling original mail icon xpm patch */ +#undef ORIGINAL_XPM_PATCH + +/* Virtual Terminal Lock for XFree86 users */ +#undef USE_VTLOCK + +/* Gtk Fontsel Widget */ +#undef HAVE_GTK_FONTSEL_WIDGET + +/* The FOLLOWING are NOT AUTOMATICALLY DETECTED YET */ + +/* Force NON-MESA GL using MESA includes, uncomment next line */ +/* #define OPENGL_MESA_INCLUDES */ + +/* EXTRA SOUND STUFF if you do not have RPLAY or NAS */ +/* SUNOS 4.1.3 */ +/* #define DEF_PLAY "/usr/demo/SOUND/play /usr/local/share/sounds/xlock/" */ +/* IRIX 5.3 */ +/* #define DEF_PLAY "/usr/sbin/sfplay /usr/local/share/sounds/xlock/" */ +/* Digital Unix with Multimedia Services installed */ +/* #define DEF_PLAY "/usr/bin/mme/decsound -play + /usr/local/share/sounds/xlock/" */ +/* LINUX and others (see config directory) */ +/* #define DEF_PLAY "/usr/local/bin/play.sh /usr/local/share/sounds/xlock/" */ + +/* EXTRA SYSLOG STUFF if you want to override defaults for SYSLOG */ +/* You may want to set all -DSYSLOG_* to LOG_WARNING to maximize messages */ +/* #define SYSLOG_FACILITY LOG_AUTH */ +/* #define SYSLOG_WARNING LOG_WARNING */ +/* #define SYSLOG_NOTICE LOG_NOTICE */ +/* #define SYSLOG_INFO LOG_INFO */ + +/* #define SAFEWORD */ +/* #define FX */ + +/* Full screen colormaps are not allowed on compliant window managers + like FVWM, TVWM, SCWM, and DEC WINDOWS and tricks xlock, this fix does + not work on TrueColor + */ +/* #define COMPLIANT_COLORMAP */ + +/* Gtk Fontsel Widget */ +#undef HAVE_GTK_FONTSEL_WIDGET + +/* Gtk Fontsel Widget */ +#undef HAVE_GTK_FONTSEL_WIDGET 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..af10abfd --- /dev/null +++ b/configure @@ -0,0 +1,7937 @@ +#! /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 + --with-purify configure to postprocess with purify" +ac_help="$ac_help + --with-x use the X Window System" +ac_help="$ac_help + --with-includes=DIR search include DIR for optional packages below" +ac_help="$ac_help + --with-libraries=DIR search library DIR for optional packages below" +ac_help="$ac_help + --without-motif disable Motif (for xmlock)" +ac_help="$ac_help + --without-athena disable Athena (for xalock)" +ac_help="$ac_help + --without-sx disable sx (for xalock)" +ac_help="$ac_help + --without-editres disable debugger (for x?lock)" +ac_help="$ac_help + --without-xpm enable color pixmap XPM mode(s)" +ac_help="$ac_help + --without-gltt disable GL True text library" +ac_help="$ac_help + --without-ttf enable color pixmap TTF mode(s)" +ac_help="$ac_help + --without-opengl disable 3D OpenGL (for GL modes)" +ac_help="$ac_help + --without-mesagl disable 3D MesaGL (for GL modes)" +ac_help="$ac_help + --without-dtsaver disable -dtsaver option" +ac_help="$ac_help + --without-dpms disable DPMS" +ac_help="$ac_help + --without-rplay disable RPLAY sounds" +ac_help="$ac_help + --without-nas disable NAS sounds" +ac_help="$ac_help + --without-crypt disable CRYPT" +ac_help="$ac_help + --without-gtk disable GTK (no xglock build)" +ac_help="$ac_help + --with-gtk-prefix=DIR Prefix where GTK is installed (optional)" +ac_help="$ac_help + --with-gtk-exec-prefix=DIR + Exec prefix where GTK is installed (optional)" +ac_help="$ac_help + --disable-gtktest Do not try to compile and run a test GTK program" +ac_help="$ac_help + --without-gtkfontsel disable gtkfontsel widget (for xglock)" +ac_help="$ac_help + --enable-bitmapdir=DIR set directory for bitmaps, default is ./bitmaps" +ac_help="$ac_help + --enable-bitmaptype=name + set name for bitmap type" +ac_help="$ac_help + --enable-pixmapdir=DIR set directory for pixmaps, default is ./pixmaps" +ac_help="$ac_help + --enable-pixmaptype=name + set name for pixmap type" +ac_help="$ac_help + --enable-mapdir=DIR set directory for bitmaps and pixmaps" +ac_help="$ac_help + --enable-maptype=name set name for bitmap and pixmap type" +ac_help="$ac_help + --enable-def-play=program + set def-play to program that plays sounds" +ac_help="$ac_help + --disable-vroot disables xlock from being able to run in root window + (some window managers have problems)" +ac_help="$ac_help + --disable-allow-root allows users to turn off allowroot (default is to + always allow root to be able to unlock xlock)" +ac_help="$ac_help + --enable-vtlock allows to turn on VT switch lock (default is to be + able to switch to another VT)" +ac_help="$ac_help + --enable-syslog enable syslog logging" +ac_help="$ac_help + --enable-multiple-user enable multiple users" +ac_help="$ac_help + --enable-multiple-root enable multiple root users" +ac_help="$ac_help + --enable-window-visibility + allow a window to be displayed over xlock" +ac_help="$ac_help + --enable-old-event-loop some machines may still need this + (fd_set errors may be a sign)" +ac_help="$ac_help + --enable-xlockrc for unknown shadow passwd algorithm" +ac_help="$ac_help + --enable-auto-logout=time + enable auto-logout code for lab use (time in minutes)" +ac_help="$ac_help + --enable-default-auto-logout=time + set default-auto-logout (time in minutes)" +ac_help="$ac_help + --enable-button-logout=time + enable button logout for lab use (time in minutes)" +ac_help="$ac_help + --enable-default-button-logout=time + set default-button-logout (time in minutes)" +ac_help="$ac_help + --disable-bomb disable automatic logout mode" +ac_help="$ac_help + --enable-unstable enables starfish and bubble3d GL mode" +ac_help="$ac_help + --enable-closedown-logout + define this one or next, with enable-auto-logout," +ac_help="$ac_help + --enable-session-logout enable-button-logout, and/or enable-bomb, for xdm" +ac_help="$ac_help + --enable-staff-file=filename + set file of staff who are exempt from auto-logout" +ac_help="$ac_help + --enable-staff-netgroup=netgroup + set netgroup of staff who are exempt from auto-logout" +ac_help="$ac_help + --enable-kerberos4 enable Kerberos 4" +ac_help="$ac_help + --enable-kerberos5 enable Kerberos 5" +ac_help="$ac_help + --enable-dce-passwd enable DCE passwording" +ac_help="$ac_help + --enable-pam enable PAM" +ac_help="$ac_help + --enable-afs enable AIX AFS" +ac_help="$ac_help + --enable-sunos-adjunct-passwd + enable SUNOS Adjunct passwording" +ac_help="$ac_help + --enable-use-mb enable Xmb function series (new)" +ac_help="$ac_help + --enable-customization enable customization of XResource" +ac_help="$ac_help + --enable-modules enable modules (new and experimental)" +ac_help="$ac_help + --enable-check enable check (new and experimental)" +ac_help="$ac_help + --with-lang=lang use a foreign language (nl/fr/de)" +ac_help="$ac_help + --enable-orig-xpm-patch use the original pixmap patch for mail icon + (have colormap problems in 8 bits depth visuals)" +ac_help="$ac_help + --disable-setuid disables setuid installation if automatically chosen" + +# 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=config.h.in + +# 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:691: 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 + +canonical=$host + +# 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:716: 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:745: 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:793: 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:827: 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:832: 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:856: 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 + +for ac_prog in $CCC g++ c++ CC cxx cc++ xlC $CC +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:888: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ +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:922: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:953: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cxx_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_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +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 + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:993: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:998: checking whether we are using GNU C++" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gxx'+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_gxx=yes +else + ac_cv_prog_gxx=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + +if test $ac_cv_prog_gxx = yes; then + GXX=yes + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:1022: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes +else + ac_cv_prog_cxx_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + elif test $ac_cv_prog_cxx_g = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-O2" + fi +else + GXX= + test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" +fi + +if test "${CXX}" = "xlC" ; then + CXXFLAGS="${CXXFLAGS} -+" +fi + +cat >> confdefs.h <<\EOF +#define HAVE_CXX 1 +EOF + +CCC= + +PACKAGE=xlockmore + +cat >> confdefs.h <> confdefs.h <&6 + PURIFY="purify" +else + PURIFY= +fi + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1090: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1111: 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:1132: \"$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:1149: \"$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 + +echo $ac_n "checking for AIX""... $ac_c" 1>&6 +echo "configure:1172: checking for AIX" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +# 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:1206: 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:1256: 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 + +ac_link_test="-L" +# test test +echo $ac_n "checking test -h""... $ac_c" 1>&6 +echo "configure:1285: checking test -h" >&5 +if (test \! -h /) >/dev/null 2>/dev/null ; then + ac_link_test="-h" + echo "$ac_t""$ac_link_test" 1>&6 +else + echo "$ac_t""$ac_link_test" 1>&6 +fi + + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1295: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + +for ac_hdr in fcntl.h limits.h sys/select.h sys/time.h syslog.h unistd.h memory.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1319: 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:1329: \"$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 + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1357: 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:1411: \"$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 ANSI C header files""... $ac_c" 1>&6 +echo "configure:1432: 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:1445: \"$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:1512: \"$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 for mode_t""... $ac_c" 1>&6 +echo "configure:1536: 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 uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:1569: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:1603: 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 for size_t""... $ac_c" 1>&6 +echo "configure:1636: 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 whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1669: 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:1683: \"$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 whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:1704: checking whether struct tm is in sys/time.h or time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm=sys/time.h +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + + +for ac_func in gethostname select strdup +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1741: 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:1769: \"$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 + + +echo $ac_n "checking for vfork""... $ac_c" 1>&6 +echo "configure:1795: checking for vfork" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vfork'+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 vfork(); + +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_vfork) || defined (__stub___vfork) +choke me +#else +vfork(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_vfork=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vfork=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_VFORK 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for seteuid""... $ac_c" 1>&6 +echo "configure:1846: checking for seteuid" >&5 +if eval "test \"`echo '$''{'ac_cv_func_seteuid'+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 seteuid(); + +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_seteuid) || defined (__stub___seteuid) +choke me +#else +seteuid(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_seteuid=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_seteuid=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'seteuid`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_SETEUID 1 +EOF + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for setreuid""... $ac_c" 1>&6 +echo "configure:1895: checking for setreuid" >&5 +if eval "test \"`echo '$''{'ac_cv_func_setreuid'+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 setreuid(); + +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_setreuid) || defined (__stub___setreuid) +choke me +#else +setreuid(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_setreuid=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_setreuid=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'setreuid`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_SETREUID 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + + + +# Configure paths for GTK+ +# Owen Taylor 97-11-3 + + + +# 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:1959: 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:2026: \"$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:2208: 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:2273: 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:2314: 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:2362: 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:2390: \"$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:2411: 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:2460: 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:2488: \"$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:2509: 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:2552: 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:2580: \"$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:2601: 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:2644: 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:2672: \"$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:2693: 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:2745: 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 + +if test "$no_x" = yes; then + XLIBS=NONE +else + if test -n "${x_includes}"; then + XLOCKINC="-I${x_includes} ${XLOCKINC}" + XMLOCKINC="-I${x_includes} ${XMLOCKINC}" + XALOCKINC="-I${x_includes} ${XALOCKINC}" + fi + XLIBS="${x_libraries}" + if test -n "${x_libraries}"; then + XLOCK_LDFLAGS="/usr/lib:${x_libraries}" + XMLOCK_LDFLAGS="/usr/lib:${x_libraries}" + XALOCK_LDFLAGS="/usr/lib:${x_libraries}" + XLOCKLIBPATHS="-L${x_libraries} ${XLOCKLIBPATHS}" + XMLOCKLIBPATHS="-L${x_libraries} ${XMLOCKLIBPATHS}" + XALOCKLIBPATHS="-L${x_libraries} ${XALOCKLIBPATHS}" + fi + XLOCKLIBS="${X_PRE_LIBS} ${X_EXTRA_LIBS} ${XLOCKLIBS}" + XMLOCKLIBS="-lXt ${XMLOCKLIBS}" +# if you need regex and regcmp +# XMLOCKLIBS="-lXt ${XMLOCKLIBS} -lgen" + XALOCKLIBS="-lXt ${XALOCKLIBS}" +fi + +# Try and find the app-defaults directory. + + + + + + + + + echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6 +echo "configure:2822: 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 \ + /lib/X11/app-defaults \ + /lib/app-defaults \ + /lib/X11R6.3/app-defaults \ + /lib/X11R6.3/X11/app-defaults \ + /lib/X11R6.2/app-defaults \ + /lib/X11R6.2/X11/app-defaults \ + /lib/X11R6.1/app-defaults \ + /lib/X11R6.1/X11/app-defaults \ + /lib/X11R6/app-defaults \ + /lib/X11R6/X11/app-defaults \ + /lib/X11R5/app-defaults \ + /lib/X11R5/X11/app-defaults \ + /lib/X11R4/app-defaults \ + /lib/X11R4/X11/app-defaults \ + ; \ + do + found="" + if test -d "${prefix}$ac_dir"; then + ac_x_app_defaults=\\\$\\\{prefix\\\}$ac_dir + found="1" + break + fi + done + if test -z "$found"; then + for ac_dir in \ + /usr/X11/lib/app-defaults \ + /usr/X11R6.3/lib/app-defaults \ + /usr/X11R6.3/lib/X11/app-defaults \ + /usr/X11R6.2/lib/app-defaults \ + /usr/X11R6.2/lib/X11/app-defaults \ + /usr/X11R6.1/lib/app-defaults \ + /usr/X11R6.1/lib/X11/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.3/app-defaults \ + /usr/lib/X11R6.2/app-defaults \ + /usr/lib/X11R6.1/app-defaults \ + /usr/lib/X11R6/app-defaults \ + /usr/lib/X11R5/app-defaults \ + /usr/lib/X11R4/app-defaults \ + \ + /usr/local/X11/lib/app-defaults \ + /usr/remote/X11/lib/app-defaults \ + /usr/local/X11R6.3/lib/app-defaults \ + /usr/local/X11R6.3/lib/X11/app-defaults \ + /usr/local/X11R6.2/lib/app-defaults \ + /usr/local/X11R6.2/lib/X11/app-defaults \ + /usr/local/X11R6.1/lib/app-defaults \ + /usr/local/X11R6.1/lib/X11/app-defaults \ + /usr/local/X11R6/lib/app-defaults \ + /usr/local/X11R6/lib/X11/app-defaults \ + /usr/local/X11R5/lib/app-defaults \ + /usr/local/X11R5/lib/X11/app-defaults \ + /usr/local/X11R4/lib/app-defaults \ + /usr/local/X11R4/lib/X11/app-defaults \ + \ + /usr/local/lib/X11/app-defaults \ + /usr/remote/lib/X11/app-defaults \ + /usr/local/lib/X11R6.3/app-defaults \ + /usr/local/lib/X11R6.3/X11/app-defaults \ + /usr/local/lib/X11R6.2/app-defaults \ + /usr/local/lib/X11R6.2/X11/app-defaults \ + /usr/local/lib/X11R6.1/app-defaults \ + /usr/local/lib/X11R6.1/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/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/local/lib/app-defaults \ + /usr/remote/lib/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.3/lib/app-defaults \ + /X11R6.2/lib/app-defaults \ + /X11R6.1/lib/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 + fi + + 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 + +# Check whether --with-includes or --without-includes was given. +if test "${with_includes+set}" = set; then + withval="$with_includes" + : +fi + +case "x$withval" in +x/*|x.*) + extra_include=$withval + echo "$ac_t""adding $extra_include to include search path for following packages" 1>&6 + if test ! -d $extra_include; then + echo "$ac_t""Warning: Directory $extra_include does not exist" 1>&6 + fi + ;; +*) + extra_include="" + ;; +esac + +# Check whether --with-libraries or --without-libraries was given. +if test "${with_libraries+set}" = set; then + withval="$with_libraries" + : +fi + +case "x$withval" in +x/*|x.*) + extra_lib=$withval + echo "$ac_t""adding $extra_lib to library search path for following packages" 1>&6 + if test ! -d $extra_lib; then + echo "$ac_t""Warning: Directory $extra_lib does not exist" 1>&6 + fi + ;; +*) + extra_lib="" + ;; +esac + + + + + + +motif_includes=NONE +motif_libraries=NONE + +echo $ac_n "checking for Motif""... $ac_c" 1>&6 +echo "configure:3015: checking for Motif" >&5 +# Check whether --with-motif or --without-motif was given. +if test "${with_motif+set}" = set; then + withval="$with_motif" + : +fi + +if test "x$with_motif" = xno; then + no_motif=yes +else + if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then + no_motif= + else +if eval "test \"`echo '$''{'ac_cv_path_motif'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_motif=yes +test -z "$motif_direct_test_library" && motif_direct_test_library=Xm +test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton +test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h + for ac_dir in \ + /usr/include/Motif1.2 \ + /usr/Motif1.2/include \ + \ + /usr/motif/include \ + \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$motif_direct_test_include"; then + no_motif= ac_motif_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$motif_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \ + /usr/lib/Motif1.2 \ + /usr/Motif1.2/lib \ + \ + /usr/motif/lib \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then + no_motif= ac_motif_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_motif" = yes; then + ac_cv_path_motif="no_motif=yes" +else + ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries" +fi +fi + fi + eval "$ac_cv_path_motif" +fi # with_motif != no + +if test "$no_motif" = yes; then + echo "$ac_t""no" 1>&6 + XMLOCK="" + INSTALL_XMLOCK="" + UNINSTALL_XMLOCK="" +else + XMLOCKLIBS="-lXm ${XMLOCKLIBS}" + XMLOCK="xmlock" + INSTALL_XMLOCK="install_xmlock" + UNINSTALL_XMLOCK="uninstall_xmlock" + test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes + test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries + ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries" + echo "$ac_t""libraries $motif_libraries, headers $motif_includes" 1>&6 +fi + + +if test "x$motif_libraries" != x && test "x$motif_libraries" != xNONE ; then + XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$motif_libraries" + XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$motif_libraries" +fi +if test "x$motif_includes" != x && test "x$motif_includes" != xNONE ; then + XMLOCKINC="${XMLOCKINC} -I$motif_includes" +fi + + + + + + +athena_includes=NONE +athena_libraries=NONE + +echo $ac_n "checking for Athena""... $ac_c" 1>&6 +echo "configure:3208: checking for Athena" >&5 +# Check whether --with-athena or --without-athena was given. +if test "${with_athena+set}" = set; then + withval="$with_athena" + : +fi + +if test "x$with_athena" = xno; then + no_athena=yes +else + if test "x$athena_includes" != xNONE && test "x$athena_libraries" != xNONE; then + no_athena= + else +if eval "test \"`echo '$''{'ac_cv_path_athena'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_athena=yes +test -z "$athena_direct_test_library" && athena_direct_test_library=Xaw +test -z "$athena_direct_test_function" && athena_direct_test_function=XawInitializeWidgetSet +test -z "$athena_direct_test_include" && athena_direct_test_include=X11/Xaw/XawInit.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$athena_direct_test_include"; then + no_athena= ac_athena_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$athena_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_athena_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${athena_direct_test_library}.$ac_extension; then + no_athena= ac_athena_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_athena" = yes; then + ac_cv_path_athena="no_athena=yes" +else + ac_cv_path_athena="no_athena= ac_athena_includes=$ac_athena_includes ac_athena_libraries=$ac_athena_libraries" +fi +fi + fi + eval "$ac_cv_path_athena" +fi # with_athena != no + +if test "$no_athena" = yes; then + echo "$ac_t""no" 1>&6 + XALOCK="" + INSTALL_XALOCK="" + UNINSTALL_XALOCK="" +else + XALOCKLIBS="-lXaw ${XALOCKLIBS}" + XALOCK="xalock" + INSTALL_XALOCK="install_xalock" + UNINSTALL_XALOCK="uninstall_xalock" + test "x$athena_includes" = xNONE && athena_includes=$ac_athena_includes + test "x$athena_libraries" = xNONE && athena_libraries=$ac_athena_libraries + ac_cv_path_athena="no_athena= ac_athena_includes=$athena_includes ac_athena_libraries=$athena_libraries" + echo "$ac_t""libraries $athena_libraries, headers $athena_includes" 1>&6 +fi + + +if test "x$athena_libraries" != x && test "x$athena_libraries" != xNONE ; then + XALOCK_LDFLAGS="${XALOCK_LDFLAGS}:$athena_libraries" + XALOCKLIBPATHS="${XALOCKLIBPATHS} -L$athena_libraries" +fi +if test "x$athena_includes" != x && test "x$athena_includes" != xNONE ; then + XALOCKINC="${XALOCKINC} -I$athena_includes" +fi + + + + + + +sx_includes=NONE +sx_libraries=NONE + +echo $ac_n "checking for sx""... $ac_c" 1>&6 +echo "configure:3398: checking for sx" >&5 +# Check whether --with-sx or --without-sx was given. +if test "${with_sx+set}" = set; then + withval="$with_sx" + : +fi + +if test "x$with_sx" = xno; then + no_sx=yes +else + if test "x$sx_includes" != xNONE && test "x$sx_libraries" != xNONE; then + no_sx= + else +if eval "test \"`echo '$''{'ac_cv_path_sx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_sx=yes +test -z "$sx_direct_test_library" && sx_direct_test_library=sx +test -z "$sx_direct_test_function" && sx_direct_test_function=OpenWindow +test -z "$sx_direct_test_include" && sx_direct_test_include=X11/libsx.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$sx_direct_test_include"; then + no_sx= ac_sx_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$sx_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_sx_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${sx_direct_test_library}.$ac_extension; then + no_sx= ac_sx_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_sx" = yes; then + ac_cv_path_sx="no_sx=yes" +else + ac_cv_path_sx="no_sx= ac_sx_includes=$ac_sx_includes ac_sx_libraries=$ac_sx_libraries" +fi +fi + fi + eval "$ac_cv_path_sx" +fi # with_sx != no + +if test "$no_sx" = yes; then + echo "$ac_t""no" 1>&6 + XALOCK="" + INSTALL_XALOCK="" + UNINSTALL_XALOCK="" +else + XALOCKLIBS="-lsx ${XALOCKLIBS}" + XALOCK="xalock" + INSTALL_XALOCK="install_xalock" + UNINSTALL_XALOCK="uninstall_xalock" + test "x$sx_includes" = xNONE && sx_includes=$ac_sx_includes + test "x$sx_libraries" = xNONE && sx_libraries=$ac_sx_libraries + ac_cv_path_sx="no_sx= ac_sx_includes=$sx_includes ac_sx_libraries=$sx_libraries" + echo "$ac_t""libraries $sx_libraries, headers $sx_includes" 1>&6 +fi + + +if test "x$sx_libraries" != x && test "x$sx_libraries" != xNONE ; then + XALOCK_LDFLAGS="$sx_libraries:${XALOCK_LDFLAGS}" + XALOCKLIBPATHS="-L$sx_libraries ${XALOCKLIBPATHS}" +fi +if test "x$sx_includes" != x && test "x$sx_includes" != xNONE ; then + XALOCKINC="${XALOCKINC} -I$sx_includes" +fi + + + + + + +editres_includes=NONE +editres_libraries=NONE + +echo $ac_n "checking for Editres""... $ac_c" 1>&6 +echo "configure:3579: checking for Editres" >&5 +# Check whether --with-editres or --without-editres was given. +if test "${with_editres+set}" = set; then + withval="$with_editres" + : +fi + +if test "x$with_editres" = xno; then + no_editres=yes +else + if test "x$editres_includes" != xNONE && test "x$editres_libraries" != xNONE; then + no_editres= + else +if eval "test \"`echo '$''{'ac_cv_path_editres'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_editres=yes +test -z "$editres_direct_test_library" && editres_direct_test_library=Xmu +test -z "$editres_direct_test_function" && editres_direct_test_function=_XEditResCheckMessages +test -z "$editres_direct_test_include" && editres_direct_test_include=X11/Xmu/Editres.h + for ac_dir in \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$editres_direct_test_include"; then + no_editres= ac_editres_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$editres_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_editres_includes" | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${editres_direct_test_library}.$ac_extension; then + no_editres= ac_editres_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_editres" = yes; then + ac_cv_path_editres="no_editres=yes" +else + ac_cv_path_editres="no_editres= ac_editres_includes=$ac_editres_includes ac_editres_libraries=$ac_editres_libraries" +fi +fi + fi + eval "$ac_cv_path_editres" +fi # with_editres != no + +if test "$no_editres" = yes; then + echo "$ac_t""no" 1>&6 +else + cat >> confdefs.h <<\EOF +#define USE_XMU 1 +EOF + + XMLOCKLIBS="-lXmu ${XMLOCKLIBS}" + XALOCKLIBS="-lXmu ${XALOCKLIBS}" + test "x$editres_includes" = xNONE && editres_includes=$ac_editres_includes + test "x$editres_libraries" = xNONE && editres_libraries=$ac_editres_libraries + ac_cv_path_editres="no_editres= ac_editres_includes=$editres_includes ac_editres_libraries=$editres_libraries" + echo "$ac_t""libraries $editres_libraries, headers $editres_includes" 1>&6 +fi + + +if test "x$editres_libraries" != x && test "x$editres_libraries" != xNONE ; then + XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$editres_libraries" + XALOCK_LDFLAGS="${XALOCK_LDFLAGS}:$editres_libraries" + XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$editres_libraries" + XALOCKLIBPATHS="${XALOCKLIBPATHS} -L$editres_libraries" +fi +if test "x$editres_includes" != x && test "x$editres_includes" != xNONE ; then + XMLOCKINC="${XMLOCKINC} -I$editres_includes" + XALOCKINC="${XALOCKINC} -I$editres_includes" +fi + +xpm=no + + + + + +xpm_includes=NONE +xpm_libraries=NONE + +echo $ac_n "checking for XPM""... $ac_c" 1>&6 +echo "configure:3770: checking for XPM" >&5 +# Check whether --with-xpm or --without-xpm was given. +if test "${with_xpm+set}" = set; then + withval="$with_xpm" + : +fi + +if test "x$with_xpm" = xno; then + no_xpm=yes +else + if test "x$xpm_includes" != xNONE && test "x$xpm_libraries" != xNONE; then + no_xpm= + else +if eval "test \"`echo '$''{'ac_cv_path_xpm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_xpm=yes +test -z "$xpm_direct_test_library" && xpm_direct_test_library=Xpm +test -z "$xpm_direct_test_function" && xpm_direct_test_function=XpmCreateImageFromData +test -z "$xpm_direct_test_include" && xpm_direct_test_include=xpm.h + for ac_dir in \ + /usr/X11R6.3/include/X11 \ + /usr/X11R6.2/include/X11 \ + /usr/X11R6.1/include/X11 \ + /usr/X11R6/include/X11 \ + /usr/X11R5/include/X11 \ + /usr/X11R4/include/X11 \ + /usr/X11/include/X11 \ + \ + /usr/include/X11/X11 \ + /usr/include/X11R6.3/X11 \ + /usr/include/X11R6.2/X11 \ + /usr/include/X11R6.1/X11 \ + /usr/include/X11R6/X11 \ + /usr/include/X11R5/X11 \ + /usr/include/X11R4/X11 \ + \ + /usr/local/X11/include/X11 \ + /usr/local/X11R6.3/include/X11 \ + /usr/local/X11R6.2/include/X11 \ + /usr/local/X11R6.1/include/X11 \ + /usr/local/X11R6/include/X11 \ + /usr/local/X11R5/include/X11 \ + /usr/local/X11R4/include/X11 \ + \ + /usr/local/include/X11/X11 \ + /usr/local/include/X11R6.3/X11 \ + /usr/local/include/X11R6.2/X11 \ + /usr/local/include/X11R6.1/X11 \ + /usr/local/include/X11R6/X11 \ + /usr/local/include/X11R5/X11 \ + /usr/local/include/X11R4/X11 \ + \ + /usr/X386/include/X11 \ + /usr/x386/include/X11 \ + /usr/XFree86/include/X11/X11 \ + \ + /usr/local/include/X11 \ + /usr/remote/include/X11 \ + /usr/include/X11 \ + /usr/unsupported/include/X11 \ + /usr/athena/include/X11 \ + /usr/local/x11r5/include/X11 \ + /usr/lpp/Xamples/include/X11 \ + \ + /usr/openwin/include/X11 \ + /usr/openwin/share/include/X11 \ + /usr/openwin/include \ + \ + /usr/include/Vk \ + $extra_include \ + $extra_include/X11 \ + ; \ + do + if test -r "$ac_dir/$xpm_direct_test_include"; then + no_xpm= ac_xpm_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$xpm_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_xpm_includes" | sed s%/X11$%% | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /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/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${xpm_direct_test_library}.$ac_extension; then + no_xpm= ac_xpm_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_xpm" = yes; then + ac_cv_path_xpm="no_xpm=yes" +else + ac_cv_path_xpm="no_xpm= ac_xpm_includes=$ac_xpm_includes ac_xpm_libraries=$ac_xpm_libraries" +fi +fi + fi + eval "$ac_cv_path_xpm" +fi # with_xpm != no + +if test "$no_xpm" = yes; then + echo "$ac_t""no" 1>&6 + XPM="#" +else + xpm=yes + cat >> confdefs.h <<\EOF +#define USE_XPMINC 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lXpm" + XMLOCKLIBS="-lXpm ${XMLOCKLIBS}" + test "x$xpm_includes" = xNONE && xpm_includes=$ac_xpm_includes + test "x$xpm_libraries" = xNONE && xpm_libraries=$ac_xpm_libraries + ac_cv_path_xpm="no_xpm= ac_xpm_includes=$xpm_includes ac_xpm_libraries=$xpm_libraries" + echo "$ac_t""libraries $xpm_libraries, headers $xpm_includes" 1>&6 + XPM="" +fi + + +if test "x$xpm_libraries" != x && test "x$xpm_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$xpm_libraries" + XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$xpm_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$xpm_libraries" + XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$xpm_libraries" +fi +if test "x$xpm_includes" != x && test "x$xpm_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$xpm_includes" +fi + +gltt=no + + + + + +gltt_includes=NONE +gltt_libraries=NONE + +echo $ac_n "checking for GLTT""... $ac_c" 1>&6 +echo "configure:3964: checking for GLTT" >&5 +# Check whether --with-gltt or --without-gltt was given. +if test "${with_gltt+set}" = set; then + withval="$with_gltt" + : +fi + +if test "x$with_gltt" = xno; then + no_gltt=yes +else + if test "x$gltt_includes" != xNONE && test "x$gltt_libraries" != xNONE; then + no_gltt= + else +if eval "test \"`echo '$''{'ac_cv_path_gltt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_gltt=yes +test -z "$gltt_direct_test_library" && gltt_direct_test_library=gltt +# test -z "$gltt_direct_test_function" && gltt_direct_test_function=glttCreateImageFromData +test -z "$gltt_direct_test_include" && gltt_direct_test_include=FTFace.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + /usr/openwin/include \ + \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$gltt_direct_test_include"; then + no_gltt= ac_gltt_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$gltt_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_gltt_includes" | sed s%/X11$%% | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /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/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${gltt_direct_test_library}.$ac_extension; then + no_gltt= ac_gltt_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_gltt" = yes; then + ac_cv_path_gltt="no_gltt=yes" +else + ac_cv_path_gltt="no_gltt= ac_gltt_includes=$ac_gltt_includes ac_gltt_libraries=$ac_gltt_libraries" +fi +fi + fi + eval "$ac_cv_path_gltt" +fi # with_gltt != no + +if test "$no_gltt" = yes; then + echo "$ac_t""no" 1>&6 + GLTT="#" +else + gltt=yes + cat >> confdefs.h <<\EOF +#define HAVE_GLTT 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lgltt" + test "x$gltt_includes" = xNONE && gltt_includes=$ac_gltt_includes + test "x$gltt_libraries" = xNONE && gltt_libraries=$ac_gltt_libraries + ac_cv_path_gltt="no_gltt= ac_gltt_includes=$gltt_includes ac_gltt_libraries=$gltt_libraries" + echo "$ac_t""libraries $gltt_libraries, headers $gltt_includes" 1>&6 + GLTT="" +fi + + +if test "x$gltt_libraries" != x && test "x$gltt_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$gltt_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$gltt_libraries" +fi +if test "x$gltt_includes" != x && test "x$gltt_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$gltt_includes" +fi + +ttf=no + + + + + +ttf_includes=NONE +ttf_libraries=NONE + +echo $ac_n "checking for TTF""... $ac_c" 1>&6 +echo "configure:4153: checking for TTF" >&5 +# Check whether --with-ttf or --without-ttf was given. +if test "${with_ttf+set}" = set; then + withval="$with_ttf" + : +fi + +if test "x$with_ttf" = xno; then + no_ttf=yes +else + if test "x$ttf_includes" != xNONE && test "x$ttf_libraries" != xNONE; then + no_ttf= + else +if eval "test \"`echo '$''{'ac_cv_path_ttf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_ttf=yes +test -z "$ttf_direct_test_library" && ttf_direct_test_library=ttf +test -z "$ttf_direct_test_function" && ttf_direct_test_function=TT_Init_FreeType +test -z "$ttf_direct_test_include" && ttf_direct_test_include=freetype.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include/X11 \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + /usr/openwin/include \ + \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$ttf_direct_test_include"; then + no_ttf= ac_ttf_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$ttf_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_ttf_includes" | sed s%/X11$%% | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /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/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${ttf_direct_test_library}.$ac_extension; then + no_ttf= ac_ttf_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_ttf" = yes; then + ac_cv_path_ttf="no_ttf=yes" +else + ac_cv_path_ttf="no_ttf= ac_ttf_includes=$ac_ttf_includes ac_ttf_libraries=$ac_ttf_libraries" +fi +fi + fi + eval "$ac_cv_path_ttf" +fi # with_ttf != no + +if test "$no_ttf" = yes; then + echo "$ac_t""no" 1>&6 + TTF="#" +else + ttf=yes + cat >> confdefs.h <<\EOF +#define HAVE_TTF 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lttf" + test "x$ttf_includes" = xNONE && ttf_includes=$ac_ttf_includes + test "x$ttf_libraries" = xNONE && ttf_libraries=$ac_ttf_libraries + ac_cv_path_ttf="no_ttf= ac_ttf_includes=$ttf_includes ac_ttf_libraries=$ttf_libraries" + echo "$ac_t""libraries $ttf_libraries, headers $ttf_includes" 1>&6 + TTF="" +fi + + +if test "x$ttf_libraries" != x && test "x$ttf_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$ttf_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$ttf_libraries" +fi +if test "x$ttf_includes" != x && test "x$ttf_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$ttf_includes" +fi + +gl=no + + + + + +opengl_includes=NONE +opengl_libraries=NONE + +echo $ac_n "checking for OpenGL""... $ac_c" 1>&6 +echo "configure:4342: checking for OpenGL" >&5 +# Check whether --with-opengl or --without-opengl was given. +if test "${with_opengl+set}" = set; then + withval="$with_opengl" + : +fi + +if test "x$with_opengl" = xno; then + no_opengl=yes +else + if test "x$opengl_includes" != xNONE && test "x$opengl_libraries" != xNONE; then + no_opengl= + else +if eval "test \"`echo '$''{'ac_cv_path_opengl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_opengl=yes +test -z "$opengl_direct_test_library" && opengl_direct_test_library=GL +test -z "$opengl_direct_test_library" && opengl_direct_test_library=GLU +test -z "$opengl_direct_test_function" && opengl_direct_test_function=glXCreateContext +test -z "$opengl_direct_test_include" && opengl_direct_test_include=GL/gl.h + for ac_dir in \ + /usr/include \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do +# Make sure this is not MesaGL + if test -r "$ac_dir/$opengl_direct_test_include" && test ! -r "$ac_dir/GL/xmesa.h"; then + no_opengl= ac_opengl_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$opengl_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_opengl_includes" | sed s/include/lib/` \ + \ + /usr/lib \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do +# Make sure its not a symbolic link to MesaGL library + + if test -r $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! $ac_link_test $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! -r $ac_dir/libMesa${opengl_direct_test_library}.$ac_extension; then + no_opengl= ac_opengl_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_opengl" = yes; then + ac_cv_path_opengl="no_opengl=yes" +else + ac_cv_path_opengl="no_opengl= ac_opengl_includes=$ac_opengl_includes ac_opengl_libraries=$ac_opengl_libraries" + +fi +fi + fi + eval "$ac_cv_path_opengl" +fi # with_opengl != no + +if test "$no_opengl" = yes; then + echo "$ac_t""no" 1>&6 +else + gl=yes + cat >> confdefs.h <<\EOF +#define USE_GL 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lGL -lGLU" + test "x$opengl_includes" = xNONE && opengl_includes=$ac_opengl_includes + test "x$opengl_libraries" = xNONE && opengl_libraries=$ac_opengl_libraries + case "${canonical}" in + *-*-solaris2* ) + cat >> confdefs.h <<\EOF +#define SUN_OGL_NO_VERTEX_MACROS 1 +EOF + + if test "x$opengl_includes" = "x/usr/include"; then + opengl_includes="" + fi + ;; + *-*-irix5* | *-*-irix6* ) + XLOCKLIBS="${XLOCKLIBS} -lgl" + ;; + esac + ac_cv_path_opengl="no_opengl= ac_opengl_includes=$opengl_includes ac_opengl_libraries=$opengl_libraries" + echo "$ac_t""libraries $opengl_libraries, headers $opengl_includes" 1>&6 + GL="" +fi + + +if test "x$opengl_libraries" != x && test "x$opengl_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$opengl_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$opengl_libraries" +fi +if test "x$opengl_includes" != x && test "x$opengl_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$opengl_includes" +fi + + + + + + +mesagl_includes=NONE +mesagl_libraries=NONE + +echo $ac_n "checking for MesaGL""... $ac_c" 1>&6 +echo "configure:4462: checking for MesaGL" >&5 +# Check whether --with-mesagl or --without-mesagl was given. +if test "${with_mesagl+set}" = set; then + withval="$with_mesagl" + : +fi + +if test "x$with_mesagl" = xno; then + no_mesagl=yes +else + if test "x$mesagl_includes" != xNONE && test "x$mesagl_libraries" != xNONE; then + no_mesagl= + else +if eval "test \"`echo '$''{'ac_cv_path_mesagl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_mesagl=yes +test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGL +test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGLU +test -z "$mesagl_direct_test_function" && mesagl_direct_test_function=glXCreateContext +test -z "$mesagl_direct_test_include" && mesagl_direct_test_include=GL/gl.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$mesagl_direct_test_include"; then + no_mesagl= ac_mesagl_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$mesagl_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_mesagl_includes" | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${mesagl_direct_test_library}.$ac_extension; then + no_mesagl= ac_mesagl_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_mesagl" = yes; then + ac_cv_path_mesagl="no_mesagl=yes" +else + ac_cv_path_mesagl="no_mesagl= ac_mesagl_includes=$ac_mesagl_includes ac_mesagl_libraries=$ac_mesagl_libraries" +fi +fi + fi + eval "$ac_cv_path_mesagl" +fi # with_mesagl != no + +if test "$no_mesagl" = yes; then + echo "$ac_t""no" 1>&6 + GL="#" +else + if test "$gl" = no; then + gl=yes + cat >> confdefs.h <<\EOF +#define USE_GL 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lMesaGL -lMesaGLU" + test "x$mesagl_includes" = xNONE && mesagl_includes=$ac_mesagl_includes + test "x$mesagl_libraries" = xNONE && mesagl_libraries=$ac_mesagl_libraries + case "${canonical}" in + *-*-solaris2* ) + if test "x$mesagl_includes" = "x/usr/include"; then + mesagl_includes="" + fi + ;; + esac + ac_cv_path_mesagl="no_mesagl= ac_mesagl_includes=$mesagl_includes ac_mesagl_libraries=$mesagl_libraries" + echo "$ac_t""libraries $mesagl_libraries, headers $mesagl_includes" 1>&6 + echo "$ac_t""!!!WARNING!!! Known security hole with MesaGL <= 2.6 if setuid root" 1>&6 + case "${canonical}" in + *-*-linux* ) + # Testing if MesaGL was compiled against VGA + if test -f $mesagl_libraries/libMesaGL.so; then + have_mesagl_svga=`nm $mesagl_libraries/libMesaGL.so | grep SVGAMesa | wc -l` + else + have_mesagl_svga=0 + fi + if eval "test $have_mesagl_svga -ge 1"; then + echo "$ac_t""MesaGL library is linked against SVGA: adding -lvga" 1>&6 + XLOCKLIBS="${XLOCKLIBS} -lvga" + fi + # Testing if MesaGL was compiled against glide + if test -f $mesagl_libraries/libglide.so; then + have_mesagl_glide=`nm $mesagl_libraries/libglide.so | grep grGlideInit | wc -l` + else + have_mesagl_glide=0 + fi + if eval "test $have_mesagl_glide -ge 1"; then + echo "$ac_t""MesaGL library is linked against GLIDE: adding -lglide2x" 1>&6 + XLOCKLIBS="${XLOCKLIBS} -lglide2x" + fi +# Causes major errors for maintainer. xlock refuses to run. +# # Testing if MesaGL was compiled against pthread +# if test -f $mesagl_libraries/libpthread.so; then +# have_mesagl_pthread=`nm $mesagl_libraries/libpthread.so | grep pthread_once | wc -l` +# else +# have_mesagl_pthread=0 +# fi +# if eval "test $have_mesagl_pthread -ge 1"; then +# AC_MSG_RESULT([MesaGL library is linked against GLIDE: adding -lpthread]) +# XLOCKLIBS="${XLOCKLIBS} -lpthread" +# fi + + ;; + esac + GL="" + else + echo "$ac_t""ignored - using OpenGL" 1>&6 + fi + +fi + + +if test "x$mesagl_libraries" != x && test "x$mesagl_libraries" != xNONE ; then + XLOCK_LDFLAGS="$mesagl_libraries:${XLOCK_LDFLAGS}" + XLOCKLIBPATHS="-L$mesagl_libraries ${XLOCKLIBPATHS}" +fi +if test "x$mesagl_includes" != x && test "x$mesagl_includes" != xNONE ; then + XLOCKINC="-I$mesagl_includes ${XLOCKINC}" +fi + +# Test if (Mesa)GL has GL1.1 features +# (Should this test be performed only if (Mesa)GL is used? In that case +# it fails anyway.) +echo $ac_n "checking Checking for GL >=1.1""... $ac_c" 1>&6 +echo "configure:4687: checking Checking for GL >=1.1" >&5 +ac_save_CFLAGS="$CFLAGS" +ac_save_LIBS="$LIBS" +CFLAGS="${CFLAGS} ${XLOCKINC}" +LIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 -lXext -lm" +if eval "test \"`echo '$''{'ac_cv_c_gl1_1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +int main() { + +GLint texture; +glBindTexture(GL_TEXTURE_2D, texture); + +; return 0; } +EOF +if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_c_gl1_1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_gl1_1=no +fi +rm -f conftest* +fi + + cat >> confdefs.h <<\EOF +#define HAVE_GLBINDTEXTURE 1 +EOF + + echo "$ac_t""yes" 1>&6 +CFLAGS="$ac_save_CFLAGS" +LIBS="$ac_save_LIBS" + + + + + + +dtsaver_includes=NONE +dtsaver_libraries=NONE + +echo $ac_n "checking for DtSaver""... $ac_c" 1>&6 +echo "configure:4737: checking for DtSaver" >&5 +# Check whether --with-dtsaver or --without-dtsaver was given. +if test "${with_dtsaver+set}" = set; then + withval="$with_dtsaver" + : +fi + +if test "x$with_dtsaver" = xno; then + no_dtsaver=yes +else + if test "x$dtsaver_includes" != xNONE && test "x$dtsaver_libraries" != xNONE; then + no_dtsaver= + else +if eval "test \"`echo '$''{'ac_cv_path_dtsaver'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_dtsaver=yes +test -z "$dtsaver_direct_test_library" && dtsaver_direct_test_library=DtSvc +test -z "$dtsaver_direct_test_function" && dtsaver_direct_test_function=DtSaverGetWindows +test -z "$dtsaver_direct_test_include" && dtsaver_direct_test_include=Dt/Saver.h + for ac_dir in \ + /usr/dt/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$dtsaver_direct_test_include"; then + no_dtsaver= ac_dtsaver_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$dtsaver_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_dtsaver_includes" | sed s/include/lib/` \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${dtsaver_direct_test_library}.$ac_extension; then + no_dtsaver= ac_dtsaver_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_dtsaver" = yes; then + ac_cv_path_dtsaver="no_dtsaver=yes" +else + ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$ac_dtsaver_includes ac_dtsaver_libraries=$ac_dtsaver_libraries" +fi +fi + fi + eval "$ac_cv_path_dtsaver" +fi # with_dtsaver != no + +if test "$no_dtsaver" = yes; then + echo "$ac_t""no" 1>&6 +else + cat >> confdefs.h <<\EOF +#define USE_DTSAVER 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lDtSvc" + test "x$dtsaver_includes" = xNONE && dtsaver_includes=$ac_dtsaver_includes + test "x$dtsaver_libraries" = xNONE && dtsaver_libraries=$ac_dtsaver_libraries + ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$dtsaver_includes ac_dtsaver_libraries=$dtsaver_libraries" + echo "$ac_t""libraries $dtsaver_libraries, headers $dtsaver_includes" 1>&6 +fi + + +if test "x$dtsaver_libraries" != x && test "x$dtsaver_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dtsaver_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dtsaver_libraries" +fi +if test "x$dtsaver_includes" != x && test "x$dtsaver_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$dtsaver_includes" +fi + + + + + + +dpms_includes=NONE +dpms_libraries=NONE + +echo $ac_n "checking for DPMS""... $ac_c" 1>&6 +echo "configure:4830: checking for DPMS" >&5 +# Check whether --with-dpms or --without-dpms was given. +if test "${with_dpms+set}" = set; then + withval="$with_dpms" + : +fi + +dpmslib=no +if test "x$with_dpms" = xno; then + no_dpms=yes +else + if test "x$dpms_includes" != xNONE && test "x$dpms_libraries" != xNONE; then + no_dpms= + else +if eval "test \"`echo '$''{'ac_cv_path_dpms'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_dpms=yes +test -z "$dpms_direct_test_library" && dpms_direct_test_library=Xdpms +test -z "$dpms_direct_test_function" && dpms_direct_test_function=DPMSSetTimeouts +test -z "$dpms_direct_test_include" && dpms_direct_test_include=X11/extensions/dpms.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/dpms/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$dpms_direct_test_include"; then + no_dpms= ac_dpms_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$dpms_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_dpms_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/dpms/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + /shlib \ + /usr/shlib \ + /usr/shlib/X11 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${dpms_direct_test_library}.$ac_extension; then + no_dpms= ac_dpms_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_dpms" = yes; then + ac_cv_path_dpms="no_dpms=yes" +else + ac_cv_path_dpms="no_dpms= ac_dpms_includes=$ac_dpms_includes ac_dpms_libraries=$ac_dpms_libraries" +fi +fi + fi + eval "$ac_cv_path_dpms" +fi # with_dpms != no + +if test "$no_dpms" = yes; then + echo "$ac_t""no" 1>&6 +else + cat >> confdefs.h <<\EOF +#define USE_DPMS 1 +EOF + + if test "x$ac_dpms_libraries" != xNONE; then + XLOCKLIBS="${XLOCKLIBS} -lXdpms" + fi + test "x$dpms_includes" = xNONE && dpms_includes=$ac_dpms_includes + test "x$dpms_libraries" = xNONE && dpms_libraries=$ac_dpms_libraries + ac_cv_path_dpms="no_dpms= ac_dpms_includes=$dpms_includes ac_dpms_libraries=$dpms_libraries" + echo "$ac_t""libraries $dpms_libraries, headers $dpms_includes" 1>&6 +fi + + +if test "x$dpms_libraries" != x && test "x$dpms_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dpms_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dpms_libraries" +fi +if test "x$dpms_includes" != x && test "x$dpms_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$dpms_includes" +fi + +sound=no + + + + + +rplay_includes=NONE +rplay_libraries=NONE + +echo $ac_n "checking for RPLAY""... $ac_c" 1>&6 +echo "configure:5025: checking for RPLAY" >&5 +# Check whether --with-rplay or --without-rplay was given. +if test "${with_rplay+set}" = set; then + withval="$with_rplay" + : +fi + +if test "x$with_rplay" = xno; then + no_rplay=yes +else + if test "x$rplay_includes" != xNONE && test "x$rplay_libraries" != xNONE; then + no_rplay= + else +if eval "test \"`echo '$''{'ac_cv_path_rplay'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_rplay=yes +test -z "$rplay_direct_test_library" && rplay_direct_test_library=rplay +test -z "$rplay_direct_test_function" && rplay_direct_test_function=rplay_open_default +test -z "$rplay_direct_test_include" && rplay_direct_test_include=rplay.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$rplay_direct_test_include"; then + no_rplay= ac_rplay_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$rplay_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_rplay_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11/lib \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${rplay_direct_test_library}.$ac_extension; then + no_rplay= ac_rplay_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_rplay" = yes; then + ac_cv_path_rplay="no_rplay=yes" +else + ac_cv_path_rplay="no_rplay= ac_rplay_includes=$ac_rplay_includes ac_rplay_libraries=$ac_rplay_libraries" +fi +fi + fi + eval "$ac_cv_path_rplay" +fi # with_rplay != no + +if test "$no_rplay" = yes; then + echo "$ac_t""no" 1>&6 +else + sound=yes + cat >> confdefs.h <<\EOF +#define USE_RPLAY 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lrplay" + test "x$rplay_includes" = xNONE && rplay_includes=$ac_rplay_includes + test "x$rplay_libraries" = xNONE && rplay_libraries=$ac_rplay_libraries + ac_cv_path_rplay="no_rplay= ac_rplay_includes=$rplay_includes ac_rplay_libraries=$rplay_libraries" + echo "$ac_t""libraries $rplay_libraries, headers $rplay_includes" 1>&6 +fi + + +if test "x$rplay_libraries" != x && test "x$rplay_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$rplay_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$rplay_libraries" +fi +if test "x$rplay_includes" != x && test "x$rplay_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$rplay_includes" +fi + + + + + + +nas_includes=NONE +nas_libraries=NONE + +echo $ac_n "checking for NAS""... $ac_c" 1>&6 +echo "configure:5137: checking for NAS" >&5 +# Check whether --with-nas or --without-nas was given. +if test "${with_nas+set}" = set; then + withval="$with_nas" + : +fi + +if test "x$with_nas" = xno; then + no_nas=yes +else + if test "x$nas_includes" != xNONE && test "x$nas_libraries" != xNONE; then + no_nas= + else +if eval "test \"`echo '$''{'ac_cv_path_nas'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_nas=yes +test -z "$nas_direct_test_library" && nas_direct_test_library=audio +test -z "$nas_direct_test_function" && nas_direct_test_function=AuOpenServer +test -z "$nas_direct_test_include" && nas_direct_test_include=audio/audio.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$nas_direct_test_include"; then + no_nas= ac_nas_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$nas_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_nas_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11/lib \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${nas_direct_test_library}.$ac_extension; then + no_nas= ac_nas_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_nas" = yes; then + ac_cv_path_nas="no_nas=yes" +else + ac_cv_path_nas="no_nas= ac_nas_includes=$ac_nas_includes ac_nas_libraries=$ac_nas_libraries" +fi +fi + fi + eval "$ac_cv_path_nas" +fi # with_nas != no + +if test "$no_nas" = yes; then + echo "$ac_t""no" 1>&6 +else + if test "$sound" = no; then + sgi=no + case "${canonical}" in + *-*-irix5* | *-*-irix6* ) + sgi=yes + ;; + esac + if test "$sgi" = yes; then + echo "$ac_t""ignored - problems here with audio and nas" 1>&6 + else + sound=yes + cat >> confdefs.h <<\EOF +#define USE_NAS 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -laudio" + test "x$nas_includes" = xNONE && nas_includes=$ac_nas_includes + test "x$nas_libraries" = xNONE && nas_libraries=$ac_nas_libraries + ac_cv_path_nas="no_nas= ac_nas_includes=$nas_includes ac_nas_libraries=$nas_libraries" + echo "$ac_t""libraries $nas_libraries, headers $nas_includes" 1>&6 + fi + else + echo "$ac_t""ignored - using rplay" 1>&6 + fi +fi + + +if test "x$nas_libraries" != x && test "x$nas_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$nas_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$nas_libraries" +fi +if test "x$nas_includes" != x && test "x$nas_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$nas_includes" +fi + + + + + + +crypt_libraries=NONE + +echo $ac_n "checking for CRYPT""... $ac_c" 1>&6 +echo "configure:5262: checking for CRYPT" >&5 +# Check whether --with-crypt or --without-crypt was given. +if test "${with_crypt+set}" = set; then + withval="$with_crypt" + : +fi + +if test "x$with_crypt" = xno; then + no_crypt=yes +else + if test "x$crypt_libraries" != xNONE; then + no_crypt= + else +if eval "test \"`echo '$''{'ac_cv_path_crypt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of these vars are not set, and there is no cached value. +no_crypt=yes +test -z "$crypt_direct_test_library" && crypt_direct_test_library=crypt + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$crypt_direct_test_library $LIBS" +for ac_dir in \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${crypt_direct_test_library}.$ac_extension; then + no_crypt= ac_crypt_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + +if test "$no_crypt" = yes; then + ac_cv_path_crypt="no_crypt=yes" +else + ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$ac_crypt_libraries" +fi +fi + fi + eval "$ac_cv_path_crypt" +fi # with_crypt != no + +if test "$no_crypt" = yes; then + echo "$ac_t""no" 1>&6 +else + XLOCKLIBS="${XLOCKLIBS} -lcrypt" + test "x$crypt_libraries" = xNONE && crypt_libraries=$ac_crypt_libraries + ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$crypt_libraries" + echo "$ac_t""libraries $crypt_libraries" 1>&6 +fi + + +if test "x$crypt_libraries" != x && test "x$crypt_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$crypt_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$crypt_libraries" +fi + + +XGLOCK="" +XGLOCKDIR="" +INSTALL_XGLOCK="" +UNINSTALL_XGLOCK="" +XGLOCK_MAKEFILE="" +# Check whether --with-gtk or --without-gtk was given. +if test "${with_gtk+set}" = set; then + withval="$with_gtk" + : +fi + +if test "x$with_gtk" != "xno" ; then + # Check whether --with-gtk-prefix or --without-gtk-prefix was given. +if test "${with_gtk_prefix+set}" = set; then + withval="$with_gtk_prefix" + gtk_config_prefix="$withval" +else + gtk_config_prefix="" +fi + +# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. +if test "${with_gtk_exec_prefix+set}" = set; then + withval="$with_gtk_exec_prefix" + gtk_config_exec_prefix="$withval" +else + gtk_config_exec_prefix="" +fi + +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + : +else + enable_gtktest=yes +fi + + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + # Extract the first word of "gtk-config", so it can be a program name with args. +set dummy gtk-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5382: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GTK_CONFIG" in + /*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +GTK_CONFIG="$ac_cv_path_GTK_CONFIG" +if test -n "$GTK_CONFIG"; then + echo "$ac_t""$GTK_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_gtk_version=1.0.4 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:5413: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +EOF +if { (eval echo configure:5502: \"$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* + no_gtk=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes" 1>&6 + have_gtk="yes" + else + echo "$ac_t""no" 1>&6 + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext < +#include + +int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +; return 0; } +EOF +if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + have_gtk="no" + fi + + + rm -f conf.gtktest + +fi + + + + + + +if test "x$have_gtk" = "xyes"; then + + +gtkfontsel_includes=NONE +gtkfontsel_libraries=NONE + +echo $ac_n "checking for GTK FontSelection widget""... $ac_c" 1>&6 +echo "configure:5598: checking for GTK FontSelection widget" >&5 +# Check whether --with-gtkfontsel or --without-gtkfontsel was given. +if test "${with_gtkfontsel+set}" = set; then + withval="$with_gtkfontsel" + : +fi + +if test "x$with_gtkfontsel" = xno; then + no_gtkfontsel=yes +else + if test "x$gtkfontsel_includes" != xNONE && test "x$gtkfontsel_libraries" != xNONE; then + no_gtkfontsel= + else + test -z "$gtkfontsel_direct_test_library" && gtkfontsel_direct_test_library="gtkfontsel" +test -z "$gtkfontsel_direct_test_function" && gtkfontsel_direct_test_function="gtk_font_selection_new" +test -z "$gtkfontsel_direct_test_include" && gtkfontsel_direct_test_include="gtkfontsel.h" + for ac_dir in \ + /usr/include \ + /usr/include/fontsel \ + /usr/include/gtkfontsel \ + /usr/gtk/include \ + /usr/gtk/fontsel \ + /usr/gtk/gtkfontsel \ + /usr/gtk/fontsel/include \ + /usr/gtk/gtkfontsel/include \ + /usr/local/include \ + /usr/local/include/fontsel \ + /usr/local/include/gtkfontsel \ + /usr/local/gtk/include \ + /usr/X11R6.3/include \ + /usr/X11R6.3/include/gtk \ + /usr/X11R6.2/include \ + /usr/X11R6.2/include/gtk \ + /usr/X11R6.1/include \ + /usr/X11R6.1/include/gtk \ + /usr/X11R6/include \ + /usr/X11R6/include/gtk \ + /usr/X11R5/include \ + /usr/X11R5/include/gtk \ + /usr/X11R4/include \ + /usr/X11R4/include/gtk \ + /usr/X11/include \ + /usr/X11/include/gtk \ + /usr/X386/include \ + /usr/X386/include/gtk \ + /usr/x386/include \ + /usr/x386/include/gtk \ + /usr/XFree86/include \ + /usr/XFree86/include/gtk \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.3/include/gtk \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.2/include/gtk \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6.1/include/gtk \ + /usr/local/X11R6/include \ + /usr/local/X11R6/include/gtk \ + /usr/local/X11R5/include \ + /usr/local/X11R5/include/gtk \ + /usr/local/X11R4/include \ + /usr/local/X11R4/include/gtk \ + /usr/local/X11/include \ + /usr/local/X11/include/gtk \ + /usr/local/X386/include \ + /usr/local/X386/include/gtk \ + /usr/local/x386/include \ + /usr/local/x386/include/gtk \ + /usr/local/XFree86/include \ + /usr/local/XFree86/include/gtk \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.3/gtk \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.2/gtk \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6.1/gtk \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R6/gtk \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R5/gtk \ + /usr/local/include/X11R4 \ + /usr/local/include/X11R4/gtk \ + /usr/local/include/X11 \ + /usr/local/include/X11/gtk \ + /usr/local/include/X386 \ + /usr/local/include/X386/gtk \ + /usr/local/include/x386 \ + /usr/local/include/x386/gtk \ + /usr/local/include/XFree86 \ + /usr/local/include/XFree86/gtk \ + /usr/local/dt/include \ + /usr/local/dt/include/gtk \ + /usr/dt/include \ + /usr/dt/include/gtk \ + /usr/unsupported/include \ + /usr/unsupported/include/gtk \ + /usr/athena/include \ + /usr/athena/include/gtk \ + /usr/local/x11r5/include \ + /usr/local/x11r5/include/gtk \ + /usr/lpp/Xamples/include \ + /usr/lpp/Xamples/include/gtk \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$gtkfontsel_direct_test_include"; then + no_gtkfontsel= ac_gtkfontsel_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$gtkfontsel_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_gtkfontsel_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/lib/X11 \ + /usr/lib/X11/gtk \ + /usr/gtk/lib \ + /usr/X11/gtk/lib \ + /usr/local/lib \ + /usr/local/lib/X11 \ + /usr/X11/local/lib \ + /usr/X11/local/lib/X11 \ + /usr/X11/local/X11/lib \ + /usr/local/lib/gtk \ + /usr/local/lib/X11/gtk \ + /usr/X11/local/lib/gtk \ + /usr/X11/local/lib/X11/gtk \ + /usr/X11/local/X11/lib/gtk \ + /usr/local/gtk/lib \ + /usr/local/X11/gtk/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${gtkfontsel_direct_test_library}.$ac_extension; then + no_gtkfontsel= ac_gtkfontsel_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS" + fi +fi # with_gtkfontsel != no + +if test "$no_gtkfontsel" = yes; then + echo "$ac_t""no" 1>&6 +else + XGLOCKLIBS="-lgtkfontsel ${XGLOCKLIBS}" + test "x$gtkfontsel_includes" = xNONE && gtkfontsel_includes=$ac_gtkfontsel_includes + test "x$gtkfontsel_libraries" = xNONE && gtkfontsel_libraries=$ac_gtkfontsel_libraries + echo "$ac_t""libraries $gtkfontsel_libraries, headers $gtkfontsel_includes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_GTK_FONTSEL_WIDGET 1 +EOF + +fi + + + if test "x$gtkfontsel_libraries" != x && test "x$gtkfontsel_libraries" != xNONE ; then + XGLOCK_LDFLAGS="${XGLOCK_LDFLAGS}:$gtkfontsel_libraries" + XGLOCKLIBPATHS="${XGLOCKLIBPATHS} -L$gtkfontsel_libraries" + fi + if test "x$gtkfontsel_includes" != x && test "x$gtkfontsel_includes" != xNONE ; then + XGLOCKINC="${XGLOCKINC} -I$gtkfontsel_includes" + fi + + if test -n "${x_includes}"; then + XGLOCKINC="-I${x_includes} ${XGLOCKINC}" + XGLOCK="xglock" + XGLOCKDIR="xglock" + INSTALL_XGLOCK="install_xglock" + UNINSTALL_XGLOCK="uninstall_xglock" + XGLOCK_MAKEFILE="xglock/Makefile" + fi + if test -n "${x_libraries}"; then + XGLOCK_LDFLAGS="${XGLOCK_LDFLAGS}:/usr/lib:${x_libraries}" + XGLOCKLIBPATHS="${XGLOCKLIBPATHS} -L${x_libraries}" + XGLOCKLIBS="${XGLOCKLIBS} -lXt" + fi +fi + + + +aixv3=no +dirent=yes + +case "${canonical}" in + + *-*-aix* ) + BITMAPTYPE="ibm" + PIXMAPTYPE="ibm" + cat >> confdefs.h <<\EOF +#define AIXV3 1 +EOF + + aixv3=yes + case "${canonical}" in + *-*-aix2* | *-*-aix3.0* | *-*-aix3.1* ) + cat >> confdefs.h <<\EOF +#define LESS_THAN_AIX3_2 1 +EOF + + ;; + esac + ;; + + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* ) + BITMAPTYPE="bsd" + PIXMAPTYPE="bsd" + INSTPGMFLAGS="-s -o root -m 4111" + XLOCKLDFLAGS="-Wl,-R${XLOCK_LDFLAGS}" + XMLOCKLDFLAGS="-Wl,-R${XMLOCK_LDFLAGS}" + XALOCKLDFLAGS="-Wl,-R${XALOCK_LDFLAGS}" + ;; + + *-*-dgux5* ) + BITMAPTYPE="x11" + PIXMAPTYPE="x11" + ;; + + *-*-hpux* ) + if test "${CC}" = "cc" ; then + CFLAGS="${CFLAGS} -O -Aa -z -D_HPUX_SOURCE" + GPROF_CFLAGS="${GPROF_CFLAGS} -Aa -z -D_HPUX_SOURCE" + fi + XLOCKLIBS="-lXhp11 ${XLOCKLIBS}" + cat >> confdefs.h <<\EOF +#define SYSV 1 +EOF + + cat >> confdefs.h <<\EOF +#define SVR4 1 +EOF + + BITMAPTYPE="hp" + PIXMAPTYPE="hp" + ;; + + *-*-irix5* | *-*-irix6* ) + if test "${CC}" = "cc" ; then + CFLAGS="${CFLAGS} -fullwarn" + fi + BITMAPTYPE="sgi" + PIXMAPTYPE="sgi" + ;; + + *-*-linux* ) + ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for elf.h""... $ac_c" 1>&6 +echo "configure:5855: checking for elf.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:5865: \"$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_SHADOW 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + cat >> confdefs.h <<\EOF +#define linux 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _BSD_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _GNU_SOURCE 1 +EOF + + if test -e /etc/shadow ; then + INSTPGMFLAGS="-g shadow -m 2111" + case `ls -l /etc/shadow` in + -???r?????\ *\ shadow\ *\ /etc/shadow) # group shadow can read it + INSTPGMFLAGS="-g shadow -m 2111" + ;; + *) + INSTPGMFLAGS="-o root -m 4111" + ;; + esac + fi + INSTPGMFLAGS="-s $INSTPGMFLAGS" + BITMAPTYPE="linux" + PIXMAPTYPE="linux" + ;; + + *-*-osf* ) + BITMAPTYPE="dec" + PIXMAPTYPE="dec" + echo $ac_n "checking for Digital Unix Enhanced Security""... $ac_c" 1>&6 +echo "configure:5925: checking for Digital Unix Enhanced Security" >&5 + if test -f /usr/sbin/rcmgr && test -f /etc/rc.config ; then + if test X`/usr/sbin/rcmgr get SECURITY` = XENHANCED ; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define OSF1_ENH_SEC 1 +EOF + + + XLOCKLIBS="${XLOCKLIBS} -lsecurity" + INSTPGMFLAGS="-s -g auth -m 2111" + else + echo "$ac_t""no" 1>&6 + fi + fi + ;; + + *-*-sco* ) + BITMAPTYPE="sco" + PIXMAPTYPE="sco" + cat >> confdefs.h <<\EOF +#define HAVE_SHADOW 1 +EOF + + cat >> confdefs.h <<\EOF +#define SYSV 1 +EOF + + ;; + + *-*-solaris2* ) + cat >> confdefs.h <<\EOF +#define SOLARIS2 1 +EOF + + case "${canonical}" in + *-*-solaris2.0* | *-*-solaris2.1* | *-*-solaris2.2* | *-*-solaris2.3* | *-*-solaris2.4* ) + cat >> confdefs.h <<\EOF +#define LESS_THAN_SOLARIS2_5 1 +EOF + + ;; + esac + INSTPGMFLAGS="-s -o root -m 4111" + cat >> confdefs.h <<\EOF +#define HAVE_SHADOW 1 +EOF + + cat >> confdefs.h <<\EOF +#define SYSV 1 +EOF + + cat >> confdefs.h <<\EOF +#define SVR4 1 +EOF + + BITMAPTYPE="sun" + PIXMAPTYPE="sol" + XLOCKLIBS="${XLOCKLIBS} -lposix4" + LIBS="${LIBS} -lsocket -lnsl -lposix4" + XLOCKLDFLAGS="-R${XLOCK_LDFLAGS}" + XMLOCKLDFLAGS="-R${XMLOCK_LDFLAGS}" + XALOCKLDFLAGS="-R${XALOCK_LDFLAGS}" + ;; + + *-*-sunos4* ) + cat >> confdefs.h <<\EOF +#define SUNOS4 1 +EOF + + BITMAPTYPE="sun" + PIXMAPTYPE="sun" + ;; + + *-*-sysv5* ) + BITMAPTYPE="x11" + PIXMAPTYPE="x11" + ;; + + *) + BITMAPTYPE="x11" + PIXMAPTYPE="x11" + ;; +esac + + +if test "$dirent" = yes; then + 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:6017: 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:6030: \"$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:6055: 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:6096: 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 + +fi + +echo $ac_n "checking for usleep""... $ac_c" 1>&6 +echo "configure:6140: checking for usleep" >&5 +if eval "test \"`echo '$''{'ac_cv_func_usleep'+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 usleep(); + +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_usleep) || defined (__stub___usleep) +choke me +#else +usleep(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_usleep=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_usleep=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_USLEEP 1 +EOF + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for nanosleep""... $ac_c" 1>&6 +echo "configure:6189: checking for nanosleep" >&5 +if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+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 nanosleep(); + +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_nanosleep) || defined (__stub___nanosleep) +choke me +#else +nanosleep(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_nanosleep=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_nanosleep=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NANOSLEEP 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + + +echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6 +echo "configure:6243: 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; struct timezone tzp; + gettimeofday(&tv, &tzp); +; return 0; } +EOF +if { (eval echo configure:6257: \"$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* + cat > conftest.$ac_ext < +#include +int main() { +struct timeval tv; gettimeofday(&tv); +; return 0; } +EOF +if { (eval echo configure:6273: \"$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* + 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 = 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 +elif test $ac_gettimeofday_args = 1 ; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY 1 +EOF + + echo "$ac_t""one argument" 1>&6 +else + echo "$ac_t""unknown" 1>&6 +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:6310: 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:6352: checking for srand48" >&5 +if eval "test \"`echo '$''{'ac_cv_func_srand48'+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 srand48(); + +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_srand48) || defined (__stub___srand48) +choke me +#else +srand48(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_srand48=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_srand48=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'srand48`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define SRAND srand48 +EOF + cat >> confdefs.h <<\EOF +#define LRAND lrand48 +EOF + + cat >> confdefs.h <<\EOF +#define MAXRAND 2147483648.0 +EOF + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for srandom""... $ac_c" 1>&6 +echo "configure:6408: checking for srandom" >&5 +if eval "test \"`echo '$''{'ac_cv_func_srandom'+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 srandom(); + +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_srandom) || defined (__stub___srandom) +choke me +#else +srandom(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_srandom=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_srandom=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define SRAND srandom +EOF + cat >> confdefs.h <<\EOF +#define LRAND random +EOF + + cat >> confdefs.h <<\EOF +#define MAXRAND 2147483648.0 +EOF + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for srand""... $ac_c" 1>&6 +echo "configure:6464: checking for srand" >&5 +if eval "test \"`echo '$''{'ac_cv_func_srand'+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 srand(); + +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_srand) || defined (__stub___srand) +choke me +#else +srand(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_srand=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_srand=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'srand`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define SRAND srand +EOF + cat >> confdefs.h <<\EOF +#define LRAND rand +EOF + srand=yes +else + echo "$ac_t""no" 1>&6 +fi + +fi + +fi + + +if test "$srand" = yes; then + if test "$aixv3" = yes; then + cat >> confdefs.h <<\EOF +#define MAXRAND 2147483648.0 +EOF + + else + cat >> confdefs.h <<\EOF +#define MAXRAND 32768.0 +EOF + + fi +fi + +echo $ac_n "checking matherr support""... $ac_c" 1>&6 +echo "configure:6537: checking matherr support" >&5 +if eval "test \"`echo '$''{'ac_cv_c_matherr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +int main() { + +struct exception x; +x.type = DOMAIN; +x.type = SING; + +; return 0; } +EOF +if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_matherr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_matherr=no +fi +rm -f conftest* +fi + +if test x"$ac_cv_c_matherr" = xyes; then + cat >> confdefs.h <<\EOF +#define USE_MATHERR 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking struct sigset_t""... $ac_c" 1>&6 +echo "configure:6578: checking struct sigset_t" >&5 +if eval "test \"`echo '$''{'ac_cv_c_sigset_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +int main() { + +typedef struct {unsigned long __sigbits[4];} sigset_t; +sigset_t sigmask; + +; return 0; } +EOF +if { (eval echo configure:6595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_sigset_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_sigset_t=no +fi +rm -f conftest* +fi + +if test x"$ac_cv_c_sigset_t" = xyes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_SIGSET_T 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Check whether --enable-bitmapdir or --disable-bitmapdir was given. +if test "${enable_bitmapdir+set}" = set; then + enableval="$enable_bitmapdir" + bitmap_dir=$enableval +else + bitmap_dir=no +fi + +case "x$bitmap_dir" in +x/*|x.*) + echo "$ac_t""setting BITMAPDIR = $enableval" 1>&6 + BITMAPDIR=$enableval + if test ! -d $bitmap_dir; then + echo "$ac_t""Warning: Directory $enableval does not exist" 1>&6 + fi + ;; +*) + BITMAPDIR='$(top_srcdir)/bitmaps' + bitmap_dir='$top_srcdir/bitmaps' + ;; +esac + +# Check whether --enable-bitmaptype or --disable-bitmaptype was given. +if test "${enable_bitmaptype+set}" = set; then + enableval="$enable_bitmaptype" + bitmap_type=$enableval +else + bitmap_type=no +fi + +case "x$bitmap_type" in +xyes*|xno*) + ;; +*) + echo "$ac_t""setting BITMAPTYPE = $enableval" 1>&6 + BITMAPTYPE=$enableval + if test ! -f $bitmap_dir/l-$BITMAPTYPE.xbm; then + echo "$ac_t""Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist" 1>&6 + fi + ;; +esac + +# Check whether --enable-pixmapdir or --disable-pixmapdir was given. +if test "${enable_pixmapdir+set}" = set; then + enableval="$enable_pixmapdir" + pixmap_dir=$enableval +else + pixmap_dir=no +fi + +case "x$pixmap_dir" in +x/*|x.*) + echo "$ac_t""setting PIXMAPDIR = $enableval" 1>&6 + PIXMAPDIR=$enableval + if test ! -d $pixmap_dir; then + echo "$ac_t""Warning: Directory $enableval does not exist" 1>&6 + fi + ;; +*) + PIXMAPDIR='$(top_srcdir)/pixmaps' + pixmap_dir='$top_srcdir/pixmaps' + ;; +esac + +# Check whether --enable-pixmaptype or --disable-pixmaptype was given. +if test "${enable_pixmaptype+set}" = set; then + enableval="$enable_pixmaptype" + pixmap_type=$enableval +else + pixmap_type=no +fi + +case "x$pixmap_type" in +xyes*|xno*) + ;; +*) + echo "$ac_t""setting PIXMAPTYPE = $enableval" 1>&6 + PIXMAPTYPE=$enableval + if test ! -f $pixmap_dir/m-$PIXMAPTYPE.xpm; then + echo "$ac_t""Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist" 1>&6 + fi + ;; +esac + +# Check whether --enable-mapdir or --disable-mapdir was given. +if test "${enable_mapdir+set}" = set; then + enableval="$enable_mapdir" + map_dir=$enableval +else + map_dir=no +fi + +case "x$map_dir" in +x/*|x.*) + echo "$ac_t""setting BITMAPDIR = $enableval" 1>&6 + BITMAPDIR=$enableval + echo "$ac_t""setting PIXMAPDIR = $enableval" 1>&6 + PIXMAPDIR=$enableval + if test ! -d $map_dir; then + echo "$ac_t""Warning: Directory $enableval does not exist" 1>&6 + fi + ;; +*) + BITMAPDIR='$(top_srcdir)/bitmaps' + bitmap_dir='$top_srcdir/bitmaps' + PIXMAPDIR='$(top_srcdir)/pixmaps' + pixmap_dir='$top_srcdir/pixmaps' + ;; +esac + +# Check whether --enable-maptype or --disable-maptype was given. +if test "${enable_maptype+set}" = set; then + enableval="$enable_maptype" + map_type=$enableval +else + map_type=no +fi + +case "x$map_type" in +xyes*|xno*) + ;; +*) + echo "$ac_t""setting BITMAPTYPE = $enableval" 1>&6 + BITMAPTYPE=$enableval + if test ! -f $map_dir/l-$BITMAPTYPE.xbm; then + echo "$ac_t""Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist" 1>&6 + fi + echo "$ac_t""setting PIXMAPTYPE = $enableval" 1>&6 + PIXMAPTYPE=$enableval + if test ! -f $map_dir/m-$PIXMAPTYPE.xpm; then + echo "$ac_t""Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist" 1>&6 + fi + ;; +esac + +if test "$sound" = no; then + # Check whether --enable-def_play or --disable-def_play was given. +if test "${enable_def_play+set}" = set; then + enableval="$enable_def_play" + def_play=$enableval +else + def_play=no +fi + + if test "$def_play" != no; then + echo "$ac_t""defining option DEF_PLAY = "$enableval"" 1>&6 + cat >> confdefs.h <&6 + cat >> confdefs.h <<\EOF +#define USE_VROOT 1 +EOF + +fi + +# Check whether --enable-allow-root or --disable-allow-root was given. +if test "${enable_allow_root+set}" = set; then + enableval="$enable_allow_root" + allow_root=$enableval +else + allow_root=yes +fi + +if test "$allow_root" = yes; then + echo "$ac_t""defining option ALWAYS_ALLOW_ROOT" 1>&6 + cat >> confdefs.h <<\EOF +#define ALWAYS_ALLOW_ROOT 1 +EOF + +fi + +case ${canonical} in + *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* ) + # Check whether --enable-vtlock or --disable-vtlock was given. +if test "${enable_vtlock+set}" = set; then + enableval="$enable_vtlock" + vtlock=$enableval +else + vtlock=no +fi + + if test "$vtlock" = yes; then + echo "$ac_t""defining option USE_VTLOCK" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_VTLOCK 1 +EOF + + fi + ;; + *) + ;; +esac + +# Check whether --enable-syslog or --disable-syslog was given. +if test "${enable_syslog+set}" = set; then + enableval="$enable_syslog" + use_syslog=$enableval +else + use_syslog=no +fi + +if test "$use_syslog" = yes; then + echo "$ac_t""defining option USE_SYSLOG" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_SYSLOG 1 +EOF + +fi + +# Check whether --enable-multiple-user or --disable-multiple-user was given. +if test "${enable_multiple_user+set}" = set; then + enableval="$enable_multiple_user" + use_multiple_user=$enableval +else + use_multiple_user=no +fi + +if test "$use_multiple_user" = yes; then + echo "$ac_t""defining option USE_MULTIPLE_USER" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_MULTIPLE_USER 1 +EOF + +fi + +# Check whether --enable-multiple-root or --disable-multiple-root was given. +if test "${enable_multiple_root+set}" = set; then + enableval="$enable_multiple_root" + use_multiple_root=$enableval +else + use_multiple_root=no +fi + +if test "$use_multiple_root" = yes; then + echo "$ac_t""defining option USE_MULTIPLE_ROOT" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_MULTIPLE_ROOT 1 +EOF + +fi + +# Check whether --enable-window-visibility or --disable-window-visibility was given. +if test "${enable_window_visibility+set}" = set; then + enableval="$enable_window_visibility" + use_window_visiblity=$enableval +else + use_window_visibility=no +fi + +if test "$use_window_visibility" = yes; then + echo "$ac_t""defining option USE_WINDOW_VISIBILITY" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_WINDOW_VISIBLITY 1 +EOF + +fi + +# Check whether --enable-old-event-loop or --disable-old-event-loop was given. +if test "${enable_old_event_loop+set}" = set; then + enableval="$enable_old_event_loop" + use_old_event_loop=$enableval +else + use_old_event_loop=no +fi + +if test "$use_old_event_loop" = yes; then + echo "$ac_t""defining option USE_OLD_EVENT_LOOP" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_OLD_EVENT_LOOP 1 +EOF + +fi + + +# Check whether --enable-xlockrc or --disable-xlockrc was given. +if test "${enable_xlockrc+set}" = set; then + enableval="$enable_xlockrc" + use_xlockrc=$enableval +else + use_xlockrc=no +fi + +if test "$use_xlockrc" = yes; then + echo "$ac_t""defining option USE_XLOCKRC" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_XLOCKRC 1 +EOF + +fi + +# Check whether --enable-auto-logout or --disable-auto-logout was given. +if test "${enable_auto_logout+set}" = set; then + enableval="$enable_auto_logout" + use_auto_logout=$enableval +else + use_auto_logout=no +fi + +case "x$use_auto_logout" in +x|xyes*) + echo "$ac_t""defining option USE_AUTO_LOGOUT = 240 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_AUTO_LOGOUT 240 +EOF + + ;; +x[0-9]*) + echo "$ac_t""defining option USE_AUTO_LOGOUT = $enableval minutes" 1>&6 + cat >> confdefs.h <&6 + echo "$ac_t""defining option USE_AUTO_LOGOUT = 240 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_AUTO_LOGOUT 240 +EOF + + ;; +esac + +# Check whether --enable-default-auto-logout or --disable-default-auto-logout was given. +if test "${enable_default_auto_logout+set}" = set; then + enableval="$enable_default_auto_logout" + def_auto_logout=$enableval +else + def_auto_logout=no +fi + +case "x$def_auto_logout" in +x|xyes*) + echo "$ac_t""defining option DEF_AUTO_LOGOUT = 120 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define DEF_AUTO_LOGOUT "120" +EOF + + ;; +x[0-9]*) + echo "$ac_t""defining option DEF_AUTO_LOGOUT = $enableval minutes" 1>&6 + cat >> confdefs.h <&6 + echo "$ac_t""defining option DEF_AUTO_LOGOUT = 120 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define DEF_AUTO_LOGOUT "120" +EOF + + ;; +esac + +# Check whether --enable-button-logout or --disable-button-logout was given. +if test "${enable_button_logout+set}" = set; then + enableval="$enable_button_logout" + use_button_logout=$enableval +else + use_button_logout=no +fi + +case "x$use_button_logout" in +x|xyes*) + echo "$ac_t""defining option USE_BUTTON_LOGOUT = 10 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_BUTTON_LOGOUT 10 +EOF + + ;; +x[0-9]*) + echo "$ac_t""defining option USE_BUTTON_LOGOUT = $enableval minutes" 1>&6 + cat >> confdefs.h <&6 + echo "$ac_t""defining option USE_BUTTON_LOGOUT = 10 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_BUTTON_LOGOUT 10 +EOF + + ;; +esac + +# Check whether --enable-default-button-logout or --disable-default-button-logout was given. +if test "${enable_default_button_logout+set}" = set; then + enableval="$enable_default_button_logout" + def_button_logout=$enableval +else + def_button_logout=no +fi + +case "x$def_button_logout" in +x|xyes*) + echo "$ac_t""defining option DEF_BUTTON_LOGOUT = 5 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define DEF_BUTTON_LOGOUT "5" +EOF + + ;; +x[0-9]*) + echo "$ac_t""defining option DEF_BUTTON_LOGOUT = $enableval minutes" 1>&6 + cat >> confdefs.h <&6 + echo "$ac_t""defining option DEF_BUTTON_LOGOUT = 5 minutes" 1>&6 + cat >> confdefs.h <<\EOF +#define DEF_BUTTON_LOGOUT "5" +EOF + + ;; +esac + +# Check whether --enable-bomb or --disable-bomb was given. +if test "${enable_bomb+set}" = set; then + enableval="$enable_bomb" + use_bomb=$enableval +else + use_bomb=yes +fi + +if test "$use_bomb" = yes; then + echo "$ac_t""defining option USE_BOMB" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_BOMB 1 +EOF + + BOMB="" +else + BOMB="#" +fi + +# Check whether --enable-unstable or --disable-unstable was given. +if test "${enable_unstable+set}" = set; then + enableval="$enable_unstable" + use_unstable=$enableval +else + use_unstable=no +fi + +if test "$use_unstable" = yes; then + echo "$ac_t""defining option USE_UNSTABLE" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_UNSTABLE 1 +EOF + + UNSTABLE="" +else + UNSTABLE="#" +fi + +# Check whether --enable-closedown-logout or --disable-closedown-logout was given. +if test "${enable_closedown_logout+set}" = set; then + enableval="$enable_closedown_logout" + closedown_logout=$enableval +else + closedown_logout=no +fi + +if test "$closedown_logout" = yes; then + echo "$ac_t""defining option CLOSEDOWN_LOGOUT" 1>&6 + cat >> confdefs.h <<\EOF +#define CLOSEDOWN_LOGOUT 1 +EOF + +fi + +# Check whether --enable-session-logout or --disable-session-logout was given. +if test "${enable_session_logout+set}" = set; then + enableval="$enable_session_logout" + session_logout=$enableval +else + session_logout=no +fi + +if test "$session_logout" = yes; then + echo "$ac_t""defining option SESSION_LOGOUT" 1>&6 + cat >> confdefs.h <<\EOF +#define SESSION_LOGOUT 1 +EOF + +fi + +# Check whether --enable-staff-file or --disable-staff-file was given. +if test "${enable_staff_file+set}" = set; then + enableval="$enable_staff_file" + use_staff_file=$enableval +else + use_staff_file=no +fi + +case "x$use_staff_file" in +x|xyes*) + echo "$ac_t""defining option STAFF_FILE = "/usr/remote/etc/xlock.staff"" 1>&6 + cat >> confdefs.h <&6 + fi + ;; +x/*) + echo "$ac_t""defining option STAFF_FILE = "$enableval"" 1>&6 + cat >> confdefs.h <&6 + fi + ;; +esac + +# Check whether --enable-staff-netgroup or --disable-staff-netgroup was given. +if test "${enable_staff_netgroup+set}" = set; then + enableval="$enable_staff_netgroup" + use_staff_netgroup=$enableval +else + use_staff_netgroup=no +fi + +if test "$use_staff_netgroup" != no; then + echo "$ac_t""defining option STAFF_NETGROUP = "$enableval"" 1>&6 + cat >> confdefs.h <&6 + cat >> confdefs.h <<\EOF +#define HAVE_KRB4 1 +EOF + + XLOCKINC="${XLOCKINC} -I/usr/athena/include" + XLOCKLIBS="${XLOCKLIBS} -L/usr/athena/lib -lkrb -ldes" +fi + +# Check whether --enable-kerberos5 or --disable-kerberos5 was given. +if test "${enable_kerberos5+set}" = set; then + enableval="$enable_kerberos5" + kerberos5=$enableval +else + kerberos5=no +fi + +if test "$kerberos5" = yes; then + echo "$ac_t""defining option HAVE_KRB5" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_KRB5 1 +EOF + + XLOCKINC="${XLOCKINC} -I/usr/local/include" + XLOCKLIBS="${XLOCKLIBS} -L/usr/local/lib -lkrb5 -lcrypto -lcom_err" +fi + +# Check whether --enable-dce_passwd or --disable-dce_passwd was given. +if test "${enable_dce_passwd+set}" = set; then + enableval="$enable_dce_passwd" + dce_passwd=$enableval +else + dce_passwd=no +fi + +if test "$dce_passwd" = yes; then + echo "$ac_t""defining option DCE_PASSWD" 1>&6 + cat >> confdefs.h <<\EOF +#define DCE_PASSWD 1 +EOF + + XLOCKINC="${XLOCKINC} -I/usr/include/reentrant" + XLOCKLIBS="${XLOCKLIBS} -ldce -lc_r" +fi + +# Check whether --enable-pam or --disable-pam was given. +if test "${enable_pam+set}" = set; then + enableval="$enable_pam" + pam=$enableval +else + pam=no +fi + +if test "$pam" = yes; then + echo "$ac_t""defining option PAM" 1>&6 + cat >> confdefs.h <<\EOF +#define PAM 1 +EOF + + XLOCKLIBS="${XLOCKLIBS} -lpam -ldl" +fi + +# Check whether --enable-afs or --disable-afs was given. +if test "${enable_afs+set}" = set; then + enableval="$enable_afs" + afs=$enableval +else + afs=no +fi + +if test "$afs" = yes; then + echo "$ac_t""defining option AFS" 1>&6 + cat >> confdefs.h <<\EOF +#define AFS 1 +EOF + + XLOCKINC="${XLOCKINC} -I/usr/afsws/include" + case "${canonical}" in + *-*-solaris2.* ) + XLOCKLIBS="${XLOCKLIBS} -lucb -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth.krb -lprot -lubik -lauth.krb -lrxkad -lsys -ldes -lrx -llwp -lcom_err -lcmd /usr/afsws/lib/afs/util.a -laudit -lsys" + ;; + * ) + XLOCKLIBS="${XLOCKLIBS} -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth -lubik -lprot -lrxkad -lrx -llwp -lauth -lsys -ldes -lcmd -lcom_err /usr/afsws/lib/afs/util.a -laudit" + ;; + esac +fi + +# Check whether --enable-sunos_adjunct_passwd or --disable-sunos_adjunct_passwd was given. +if test "${enable_sunos_adjunct_passwd+set}" = set; then + enableval="$enable_sunos_adjunct_passwd" + sunos_adjunct_passwd=$enableval +else + sunos_adjunct_passwd=no +fi + +if test "$sunos_adjunct_passwd" = yes; then + echo "$ac_t""defining option SUNOS_ADJUNCT_PASSWD" 1>&6 + cat >> confdefs.h <<\EOF +#define SUNOS_ADJUNCT_PASSWD 1 +EOF + +fi + +# Check whether --enable-use_mb or --disable-use_mb was given. +if test "${enable_use_mb+set}" = set; then + enableval="$enable_use_mb" + use_mb=$enableval +else + use_mb=no +fi + +if test "$use_mb" = yes; then + echo "$ac_t""defining option USE_MB" 1>&6 + cat >> confdefs.h <<\EOF +#define USE_MB 1 +EOF + +fi + +# Check whether --enable-customization or --disable-customization was given. +if test "${enable_customization+set}" = set; then + enableval="$enable_customization" + customization=$enableval +else + customization=no +fi + +if test "$customization" = yes; then + echo "$ac_t""defining option CUSTOMIZATION" 1>&6 + cat >> confdefs.h <<\EOF +#define CUSTOMIZATION 1 +EOF + +fi + +# Check whether --enable-modules or --disable-modules was given. +if test "${enable_modules+set}" = set; then + enableval="$enable_modules" + modules=$enableval +else + modules=no +fi + +if test "$modules" = yes; then + echo "$ac_t""enabling xlk modules" 1>&6 + MODULES="" +else + MODULES="#" +fi + +# Check whether --enable-check or --disable-check was given. +if test "${enable_check+set}" = set; then + enableval="$enable_check" + check=$enableval +else + check=no +fi + +if test "$check" = yes; then + echo "$ac_t""enabling memory debug checking" 1>&6 + CHECK="" +else + CHECK="#" +fi + +# Check whether --with-lang or --without-lang was given. +if test "${with_lang+set}" = set; then + withval="$with_lang" + lang=$withval +else + lang=none +fi + +case "$lang" in + nl|NL|Nl) + echo "$ac_t""enabling some reporting in Dutch" 1>&6 + cat >> confdefs.h <<\EOF +#define NL 1 +EOF + + ;; + fr|FR|Fr) + echo "$ac_t""enabling some reporting in French" 1>&6 + cat >> confdefs.h <<\EOF +#define FR 1 +EOF + + ;; + de|DE|De) + echo "$ac_t""enabling some reporting in German" 1>&6 + cat >> confdefs.h <<\EOF +#define DE 1 +EOF + + ;; + none) + echo "$ac_t""using default language (English)" 1>&6 + ;; + *) + echo "$ac_t""unknown language $lang. using default language (English)" 1>&6 + ;; +esac + +# Check whether --enable-orig_xpm_patch or --disable-orig_xpm_patch was given. +if test "${enable_orig_xpm_patch+set}" = set; then + enableval="$enable_orig_xpm_patch" + orig_xpm_patch=$enableval +else + orig_xpm_patch=no +fi + +if test "$orig_xpm_patch" = "yes"; then + echo "$ac_t""enabling original mail icon xpm patch" 1>&6 + cat >> confdefs.h <<\EOF +#define ORIGINAL_XPM_PATCH 1 +EOF + +fi + +if test "x$INSTPGMFLAGS" != x; then +# Check whether --enable-setuid or --disable-setuid was given. +if test "${enable_setuid+set}" = set; then + enableval="$enable_setuid" + setuid=$enableval +else + setuid=yes +fi + +case "x$setuid" in +xno*) + case ${canonical} in + *-*-linux*) + if test "$vtlock" = "yes"; then + INSTPGMFLAGS="-s -o root -g bin -m 4111" + echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock" 1>&6 + echo "experimental: Big buffer overrun security risk" + else + INSTPGMFLAGS="" + echo "$ac_t""no setuid/setgid install" 1>&6 + fi + ;; + *) + INSTPGMFLAGS="" + echo "$ac_t""no setuid/setgid install" 1>&6 + ;; + esac + ;; +x|xyes*) + case ${canonical} in + *-*-linux*) + if test "$vtlock" = "yes"; then + INSTPGMFLAGS="-s -o root -g bin -m 4111" + echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock" 1>&6 + else + echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS"" 1>&6 + fi + ;; + *) + echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS"" 1>&6 + ;; + esac + ;; +x*) + INSTPGMFLAGS=$enableval + echo "$ac_t""defining install options (setuid/setgid) = "$enableval"" 1>&6 + ;; +esac +else + echo "$ac_t""no setuid/setgid install" 1>&6 +fi + +DEPEND=makedepend +DEPEND_FLAGS= +DEPEND_DEFINES= + +XLOCKLIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 -lXext -lm" +XMLOCKLIBS="${XMLOCKLIBPATHS} ${XMLOCKLIBS} -lX11" +XALOCKLIBS="${XALOCKLIBPATHS} ${XALOCKLIBS} -lX11" +XGLOCKLIBS="${XGLOCKLIBPATHS} ${XGLOCKLIBS} ${GTK_LIBS}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +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 + xlock/Makefile + modes/Makefile + modes/glx/Makefile + xmlock/Makefile + xalock/Makefile + xglock/Makefile + 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%@CXX@%$CXX%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@LN_S@%$LN_S%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%@GTK_CONFIG@%$GTK_CONFIG%g +s%@GTK_CFLAGS@%$GTK_CFLAGS%g +s%@GTK_LIBS@%$GTK_LIBS%g +s%@OSF1_ENH_SEC@%$OSF1_ENH_SEC%g +s%@XLOCKLDFLAGS@%$XLOCKLDFLAGS%g +s%@XMLOCKLDFLAGS@%$XMLOCKLDFLAGS%g +s%@XALOCKLDFLAGS@%$XALOCKLDFLAGS%g +s%@XGLOCKLDFLAGS@%$XGLOCKLDFLAGS%g +s%@INSTPGMFLAGS@%$INSTPGMFLAGS%g +s%@XLOCKINC@%$XLOCKINC%g +s%@XMLOCKINC@%$XMLOCKINC%g +s%@XALOCKINC@%$XALOCKINC%g +s%@XGLOCKINC@%$XGLOCKINC%g +s%@XLIBS@%$XLIBS%g +s%@BITMAPTYPE@%$BITMAPTYPE%g +s%@PIXMAPTYPE@%$PIXMAPTYPE%g +s%@BITMAPDIR@%$BITMAPDIR%g +s%@PIXMAPDIR@%$PIXMAPDIR%g +s%@XLOCKLIBS@%$XLOCKLIBS%g +s%@XMLOCKLIBS@%$XMLOCKLIBS%g +s%@XALOCKLIBS@%$XALOCKLIBS%g +s%@XGLOCKLIBS@%$XGLOCKLIBS%g +s%@XMLOCK@%$XMLOCK%g +s%@XALOCK@%$XALOCK%g +s%@XGLOCK@%$XGLOCK%g +s%@XGLOCKDIR@%$XGLOCKDIR%g +s%@INSTALL_XMLOCK@%$INSTALL_XMLOCK%g +s%@INSTALL_XALOCK@%$INSTALL_XALOCK%g +s%@INSTALL_XGLOCK@%$INSTALL_XGLOCK%g +s%@UNINSTALL_XMLOCK@%$UNINSTALL_XMLOCK%g +s%@UNINSTALL_XALOCK@%$UNINSTALL_XALOCK%g +s%@UNINSTALL_XGLOCK@%$UNINSTALL_XGLOCK%g +s%@APPDEFAULTS@%$APPDEFAULTS%g +s%@LINT@%$LINT%g +s%@CHECK@%$CHECK%g +s%@PURIFY@%$PURIFY%g +s%@XPM@%$XPM%g +s%@GL@%$GL%g +s%@GLTT@%$GLTT%g +s%@BOMB@%$BOMB%g +s%@UNSTABLE@%$UNSTABLE%g +s%@DEPEND@%$DEPEND%g +s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g +s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g +s%@CCC@%$CCC%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..4cd78e33 --- /dev/null +++ b/configure.in @@ -0,0 +1,3685 @@ +dnl Process this file with autoconf to produce a configure script. +dnl configure.in for xlockmore. Various things were taken from xscreensaver's +dnl configure.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +dnl + +AC_INIT(config.h.in) +AC_CONFIG_HEADER(config.h) +AC_CANONICAL_HOST +canonical=$host + +AC_PROG_CC +dnl Check if C++ compiler is present. If not set CXX to the C-compiler used +dnl for the other compilations. Check for g++ before c++ so that Purify works. +AC_CHECK_PROGS(CXX, $CCC g++ c++ CC cxx cc++ xlC $CC, gcc) +AC_PROG_CXX +if test "${CXX}" = "xlC" ; then + CXXFLAGS="${CXXFLAGS} -+" +fi + +dnl These 2 assume for now c++ exists.... +AC_DEFINE(HAVE_CXX) +CCC= + +PACKAGE=xlockmore +AC_SUBST(PACKAGE) +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") +VERSION=4.13 +AC_SUBST(VERSION) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION") + +dnl Checks for programs. +dnl AC_ARG_WITH(gcc, +dnl[ --without-gcc use CC to compile]) + +dnl test -n "$CC" && cc_specified=yes +dnl case ${with_gcc} in +dnl yes ) CC=gcc ;; +dnl dnl yes ) CC=g++ ;; +dnl no ) CC=cc ;; +dnl * ) AC_PROG_CC;; +dnl * ) AC_PROG_CXX ;; +dnl esac + +dnl This creates a lot of noise. +dnl if test "${CC}" = "gcc" ; then +dnl CFLAGS="${CFLAGS} -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes" +dnl -Waggregate-return +dnl fi + +opt_purify=no +AC_ARG_WITH(purify, [ --with-purify configure to postprocess with purify], opt_purify=$withval) +if test "$opt_purify" = yes; then + AC_MSG_RESULT([enabling purify]) + PURIFY="purify" +else + PURIFY= +fi + +AC_PROG_LN_S +AC_PROG_CPP +AC_AIX +AC_PROG_INSTALL +AC_PROG_MAKE_SET +ac_link_test="-L" +# test test +AC_MSG_CHECKING([test -h]) +if (test \! -h /) >/dev/null 2>/dev/null ; then + ac_link_test="-h" + AC_MSG_RESULT($ac_link_test) +else + AC_MSG_RESULT($ac_link_test) +fi + +dnl Optional features. +dnl add copious amounts of debugging with gcc + +dnl Checks for header files. +dnl AC_HEADER_STDC /* If its not ansi, its not going to go */ +AC_ISC_POSIX +dnl AC_HEADER_SYS_WAIT +dnl AC_CHECK_HEADERS(poll.h sys/poll.h) +AC_CHECK_HEADERS(fcntl.h limits.h sys/select.h sys/time.h syslog.h unistd.h memory.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +dnl AC_HEADER_SYS_WAIT +AC_TYPE_MODE_T +AC_TYPE_UID_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM + +dnl Checks for library functions. +dnl AC_TYPE_GETGROUPS +dnl AC_TYPE_SIGNAL +dnl AC_CHECK_FUNCS(poll) +dnl AC_CHECK_FUNCS(signal) +AC_CHECK_FUNCS(gethostname select strdup) + +AC_CHECK_FUNC(vfork, AC_DEFINE(HAVE_VFORK)) +AC_CHECK_FUNC(seteuid, AC_DEFINE(HAVE_SETEUID), +AC_CHECK_FUNC(setreuid, AC_DEFINE(HAVE_SETREUID))) + + +# Configure paths for GTK+ +# Owen Taylor 97-11-3 + +dnl AC_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(AC_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=DIR Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=DIR + Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + +dnl X Window System files. +AC_PATH_XTRA +if test "$no_x" = yes; then + XLIBS=NONE +else + if test -n "${x_includes}"; then + XLOCKINC="-I${x_includes} ${XLOCKINC}" + XMLOCKINC="-I${x_includes} ${XMLOCKINC}" + XALOCKINC="-I${x_includes} ${XALOCKINC}" + fi + XLIBS="${x_libraries}" + if test -n "${x_libraries}"; then + XLOCK_LDFLAGS="/usr/lib:${x_libraries}" + XMLOCK_LDFLAGS="/usr/lib:${x_libraries}" + XALOCK_LDFLAGS="/usr/lib:${x_libraries}" + XLOCKLIBPATHS="-L${x_libraries} ${XLOCKLIBPATHS}" + XMLOCKLIBPATHS="-L${x_libraries} ${XMLOCKLIBPATHS}" + XALOCKLIBPATHS="-L${x_libraries} ${XALOCKLIBPATHS}" + fi + XLOCKLIBS="${X_PRE_LIBS} ${X_EXTRA_LIBS} ${XLOCKLIBS}" + XMLOCKLIBS="-lXt ${XMLOCKLIBS}" +# if you need regex and regcmp +# XMLOCKLIBS="-lXt ${XMLOCKLIBS} -lgen" + XALOCKLIBS="-lXt ${XALOCKLIBS}" +dnl AC_DEFINE(X11) /* If there is no X, its not going to go */ +fi + +# Try and find the app-defaults directory. +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 \ + /lib/X11/app-defaults \ + /lib/app-defaults \ + /lib/X11R6.3/app-defaults \ + /lib/X11R6.3/X11/app-defaults \ + /lib/X11R6.2/app-defaults \ + /lib/X11R6.2/X11/app-defaults \ + /lib/X11R6.1/app-defaults \ + /lib/X11R6.1/X11/app-defaults \ + /lib/X11R6/app-defaults \ + /lib/X11R6/X11/app-defaults \ + /lib/X11R5/app-defaults \ + /lib/X11R5/X11/app-defaults \ + /lib/X11R4/app-defaults \ + /lib/X11R4/X11/app-defaults \ + ; \ + do + found="" + if test -d "${prefix}$ac_dir"; then + ac_x_app_defaults=\\\$\\\{prefix\\\}$ac_dir + found="1" + break + fi + done + if test -z "$found"; then + for ac_dir in \ + /usr/X11/lib/app-defaults \ + /usr/X11R6.3/lib/app-defaults \ + /usr/X11R6.3/lib/X11/app-defaults \ + /usr/X11R6.2/lib/app-defaults \ + /usr/X11R6.2/lib/X11/app-defaults \ + /usr/X11R6.1/lib/app-defaults \ + /usr/X11R6.1/lib/X11/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.3/app-defaults \ + /usr/lib/X11R6.2/app-defaults \ + /usr/lib/X11R6.1/app-defaults \ + /usr/lib/X11R6/app-defaults \ + /usr/lib/X11R5/app-defaults \ + /usr/lib/X11R4/app-defaults \ + \ + /usr/local/X11/lib/app-defaults \ + /usr/remote/X11/lib/app-defaults \ + /usr/local/X11R6.3/lib/app-defaults \ + /usr/local/X11R6.3/lib/X11/app-defaults \ + /usr/local/X11R6.2/lib/app-defaults \ + /usr/local/X11R6.2/lib/X11/app-defaults \ + /usr/local/X11R6.1/lib/app-defaults \ + /usr/local/X11R6.1/lib/X11/app-defaults \ + /usr/local/X11R6/lib/app-defaults \ + /usr/local/X11R6/lib/X11/app-defaults \ + /usr/local/X11R5/lib/app-defaults \ + /usr/local/X11R5/lib/X11/app-defaults \ + /usr/local/X11R4/lib/app-defaults \ + /usr/local/X11R4/lib/X11/app-defaults \ + \ + /usr/local/lib/X11/app-defaults \ + /usr/remote/lib/X11/app-defaults \ + /usr/local/lib/X11R6.3/app-defaults \ + /usr/local/lib/X11R6.3/X11/app-defaults \ + /usr/local/lib/X11R6.2/app-defaults \ + /usr/local/lib/X11R6.2/X11/app-defaults \ + /usr/local/lib/X11R6.1/app-defaults \ + /usr/local/lib/X11R6.1/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/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/local/lib/app-defaults \ + /usr/remote/lib/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.3/lib/app-defaults \ + /X11R6.2/lib/app-defaults \ + /X11R6.1/lib/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 + fi +]) + + +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 + +AC_ARG_WITH(includes, [ --with-includes=DIR search include DIR for optional packages below]) +case "x$withval" in +x/*|x.*) + extra_include=$withval + AC_MSG_RESULT([adding $extra_include to include search path for following packages]) + if test ! -d $extra_include; then + AC_MSG_RESULT([Warning: Directory $extra_include does not exist]) + fi + ;; +*) + extra_include="" + ;; +esac + +AC_ARG_WITH(libraries, [ --with-libraries=DIR search library DIR for optional packages below]) +case "x$withval" in +x/*|x.*) + extra_lib=$withval + AC_MSG_RESULT([adding $extra_lib to library search path for following packages]) + if test ! -d $extra_lib; then + AC_MSG_RESULT([Warning: Directory $extra_lib does not exist]) + fi + ;; +*) + extra_lib="" + ;; +esac + +dnl Xm MOTIF Motif motif + +AC_DEFUN(AC_PATH_MOTIF_DIRECT, +[test -z "$motif_direct_test_library" && motif_direct_test_library=Xm +test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton +test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h + for ac_dir in \ + /usr/include/Motif1.2 \ + /usr/Motif1.2/include \ + \ + /usr/motif/include \ + \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$motif_direct_test_include"; then + no_motif= ac_motif_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$motif_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \ + /usr/lib/Motif1.2 \ + /usr/Motif1.2/lib \ + \ + /usr/motif/lib \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then + no_motif= ac_motif_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_MOTIF, +[AC_REQUIRE_CPP()dnl + +motif_includes=NONE +motif_libraries=NONE + +AC_MSG_CHECKING(for Motif) +AC_ARG_WITH(motif, [ --without-motif disable Motif (for xmlock)]) +if test "x$with_motif" = xno; then + no_motif=yes +else + if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then + no_motif= + else +AC_CACHE_VAL(ac_cv_path_motif, +[# One or both of these vars are not set, and there is no cached value. +no_motif=yes +AC_PATH_MOTIF_DIRECT + +if test "$no_motif" = yes; then + ac_cv_path_motif="no_motif=yes" +else + ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries" +fi])dnl + fi + eval "$ac_cv_path_motif" +fi # with_motif != no + +if test "$no_motif" = yes; then + AC_MSG_RESULT(no) + XMLOCK="" + INSTALL_XMLOCK="" + UNINSTALL_XMLOCK="" +else + XMLOCKLIBS="-lXm ${XMLOCKLIBS}" + XMLOCK="xmlock" + INSTALL_XMLOCK="install_xmlock" + UNINSTALL_XMLOCK="uninstall_xmlock" + test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes + test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries + ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries" + AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes]) +fi +]) + +AC_PATH_MOTIF + +if test "x$motif_libraries" != x && test "x$motif_libraries" != xNONE ; then + XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$motif_libraries" + XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$motif_libraries" +fi +if test "x$motif_includes" != x && test "x$motif_includes" != xNONE ; then + XMLOCKINC="${XMLOCKINC} -I$motif_includes" +fi + +dnl Xaw ATHENA Athena athena + +AC_DEFUN(AC_PATH_ATHENA_DIRECT, +[test -z "$athena_direct_test_library" && athena_direct_test_library=Xaw +test -z "$athena_direct_test_function" && athena_direct_test_function=XawInitializeWidgetSet +test -z "$athena_direct_test_include" && athena_direct_test_include=X11/Xaw/XawInit.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$athena_direct_test_include"; then + no_athena= ac_athena_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$athena_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_athena_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${athena_direct_test_library}.$ac_extension; then + no_athena= ac_athena_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_ATHENA, +[AC_REQUIRE_CPP()dnl + +athena_includes=NONE +athena_libraries=NONE + +AC_MSG_CHECKING(for Athena) +AC_ARG_WITH(athena, [ --without-athena disable Athena (for xalock)]) +if test "x$with_athena" = xno; then + no_athena=yes +else + if test "x$athena_includes" != xNONE && test "x$athena_libraries" != xNONE; then + no_athena= + else +AC_CACHE_VAL(ac_cv_path_athena, +[# One or both of these vars are not set, and there is no cached value. +no_athena=yes +AC_PATH_ATHENA_DIRECT + +if test "$no_athena" = yes; then + ac_cv_path_athena="no_athena=yes" +else + ac_cv_path_athena="no_athena= ac_athena_includes=$ac_athena_includes ac_athena_libraries=$ac_athena_libraries" +fi])dnl + fi + eval "$ac_cv_path_athena" +fi # with_athena != no + +if test "$no_athena" = yes; then + AC_MSG_RESULT(no) + XALOCK="" + INSTALL_XALOCK="" + UNINSTALL_XALOCK="" +else + XALOCKLIBS="-lXaw ${XALOCKLIBS}" + XALOCK="xalock" + INSTALL_XALOCK="install_xalock" + UNINSTALL_XALOCK="uninstall_xalock" + test "x$athena_includes" = xNONE && athena_includes=$ac_athena_includes + test "x$athena_libraries" = xNONE && athena_libraries=$ac_athena_libraries + ac_cv_path_athena="no_athena= ac_athena_includes=$athena_includes ac_athena_libraries=$athena_libraries" + AC_MSG_RESULT([libraries $athena_libraries, headers $athena_includes]) +fi +]) + +AC_PATH_ATHENA + +if test "x$athena_libraries" != x && test "x$athena_libraries" != xNONE ; then + XALOCK_LDFLAGS="${XALOCK_LDFLAGS}:$athena_libraries" + XALOCKLIBPATHS="${XALOCKLIBPATHS} -L$athena_libraries" +fi +if test "x$athena_includes" != x && test "x$athena_includes" != xNONE ; then + XALOCKINC="${XALOCKINC} -I$athena_includes" +fi + +dnl sx + +AC_DEFUN(AC_PATH_SX_DIRECT, +[test -z "$sx_direct_test_library" && sx_direct_test_library=sx +test -z "$sx_direct_test_function" && sx_direct_test_function=OpenWindow +test -z "$sx_direct_test_include" && sx_direct_test_include=X11/libsx.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$sx_direct_test_include"; then + no_sx= ac_sx_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$sx_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_sx_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${sx_direct_test_library}.$ac_extension; then + no_sx= ac_sx_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_SX, +[AC_REQUIRE_CPP()dnl + +sx_includes=NONE +sx_libraries=NONE + +AC_MSG_CHECKING(for sx) +AC_ARG_WITH(sx, [ --without-sx disable sx (for xalock)]) +if test "x$with_sx" = xno; then + no_sx=yes +else + if test "x$sx_includes" != xNONE && test "x$sx_libraries" != xNONE; then + no_sx= + else +AC_CACHE_VAL(ac_cv_path_sx, +[# One or both of these vars are not set, and there is no cached value. +no_sx=yes +AC_PATH_SX_DIRECT + +if test "$no_sx" = yes; then + ac_cv_path_sx="no_sx=yes" +else + ac_cv_path_sx="no_sx= ac_sx_includes=$ac_sx_includes ac_sx_libraries=$ac_sx_libraries" +fi])dnl + fi + eval "$ac_cv_path_sx" +fi # with_sx != no + +if test "$no_sx" = yes; then + AC_MSG_RESULT(no) + XALOCK="" + INSTALL_XALOCK="" + UNINSTALL_XALOCK="" +else + XALOCKLIBS="-lsx ${XALOCKLIBS}" + XALOCK="xalock" + INSTALL_XALOCK="install_xalock" + UNINSTALL_XALOCK="uninstall_xalock" + test "x$sx_includes" = xNONE && sx_includes=$ac_sx_includes + test "x$sx_libraries" = xNONE && sx_libraries=$ac_sx_libraries + ac_cv_path_sx="no_sx= ac_sx_includes=$sx_includes ac_sx_libraries=$sx_libraries" + AC_MSG_RESULT([libraries $sx_libraries, headers $sx_includes]) +fi +]) + +AC_PATH_SX + +if test "x$sx_libraries" != x && test "x$sx_libraries" != xNONE ; then +dnl In front because we do not want to pick up the internal Solaris lib + XALOCK_LDFLAGS="$sx_libraries:${XALOCK_LDFLAGS}" + XALOCKLIBPATHS="-L$sx_libraries ${XALOCKLIBPATHS}" +fi +if test "x$sx_includes" != x && test "x$sx_includes" != xNONE ; then + XALOCKINC="${XALOCKINC} -I$sx_includes" +fi + +dnl Xmu EDITRES Editres editres + +AC_DEFUN(AC_PATH_EDITRES_DIRECT, +[test -z "$editres_direct_test_library" && editres_direct_test_library=Xmu +test -z "$editres_direct_test_function" && editres_direct_test_function=_XEditResCheckMessages +test -z "$editres_direct_test_include" && editres_direct_test_include=X11/Xmu/Editres.h + for ac_dir in \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$editres_direct_test_include"; then + no_editres= ac_editres_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$editres_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_editres_includes" | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${editres_direct_test_library}.$ac_extension; then + no_editres= ac_editres_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_EDITRES, +[AC_REQUIRE_CPP()dnl + +editres_includes=NONE +editres_libraries=NONE + +AC_MSG_CHECKING(for Editres) +AC_ARG_WITH(editres, [ --without-editres disable debugger (for x?lock)]) +if test "x$with_editres" = xno; then + no_editres=yes +else + if test "x$editres_includes" != xNONE && test "x$editres_libraries" != xNONE; then + no_editres= + else +AC_CACHE_VAL(ac_cv_path_editres, +[# One or both of these vars are not set, and there is no cached value. +no_editres=yes +AC_PATH_EDITRES_DIRECT + +if test "$no_editres" = yes; then + ac_cv_path_editres="no_editres=yes" +else + ac_cv_path_editres="no_editres= ac_editres_includes=$ac_editres_includes ac_editres_libraries=$ac_editres_libraries" +fi])dnl + fi + eval "$ac_cv_path_editres" +fi # with_editres != no + +if test "$no_editres" = yes; then + AC_MSG_RESULT(no) +else + AC_DEFINE(USE_XMU) + XMLOCKLIBS="-lXmu ${XMLOCKLIBS}" + XALOCKLIBS="-lXmu ${XALOCKLIBS}" + test "x$editres_includes" = xNONE && editres_includes=$ac_editres_includes + test "x$editres_libraries" = xNONE && editres_libraries=$ac_editres_libraries + ac_cv_path_editres="no_editres= ac_editres_includes=$editres_includes ac_editres_libraries=$editres_libraries" + AC_MSG_RESULT([libraries $editres_libraries, headers $editres_includes]) +fi +]) + +AC_PATH_EDITRES + +if test "x$editres_libraries" != x && test "x$editres_libraries" != xNONE ; then + XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$editres_libraries" + XALOCK_LDFLAGS="${XALOCK_LDFLAGS}:$editres_libraries" + XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$editres_libraries" + XALOCKLIBPATHS="${XALOCKLIBPATHS} -L$editres_libraries" +fi +if test "x$editres_includes" != x && test "x$editres_includes" != xNONE ; then + XMLOCKINC="${XMLOCKINC} -I$editres_includes" + XALOCKINC="${XALOCKINC} -I$editres_includes" +fi + +xpm=no +dnl Xpm XPM xpm + +AC_DEFUN(AC_PATH_XPM_DIRECT, +[test -z "$xpm_direct_test_library" && xpm_direct_test_library=Xpm +test -z "$xpm_direct_test_function" && xpm_direct_test_function=XpmCreateImageFromData +test -z "$xpm_direct_test_include" && xpm_direct_test_include=xpm.h + for ac_dir in \ + /usr/X11R6.3/include/X11 \ + /usr/X11R6.2/include/X11 \ + /usr/X11R6.1/include/X11 \ + /usr/X11R6/include/X11 \ + /usr/X11R5/include/X11 \ + /usr/X11R4/include/X11 \ + /usr/X11/include/X11 \ + \ + /usr/include/X11/X11 \ + /usr/include/X11R6.3/X11 \ + /usr/include/X11R6.2/X11 \ + /usr/include/X11R6.1/X11 \ + /usr/include/X11R6/X11 \ + /usr/include/X11R5/X11 \ + /usr/include/X11R4/X11 \ + \ + /usr/local/X11/include/X11 \ + /usr/local/X11R6.3/include/X11 \ + /usr/local/X11R6.2/include/X11 \ + /usr/local/X11R6.1/include/X11 \ + /usr/local/X11R6/include/X11 \ + /usr/local/X11R5/include/X11 \ + /usr/local/X11R4/include/X11 \ + \ + /usr/local/include/X11/X11 \ + /usr/local/include/X11R6.3/X11 \ + /usr/local/include/X11R6.2/X11 \ + /usr/local/include/X11R6.1/X11 \ + /usr/local/include/X11R6/X11 \ + /usr/local/include/X11R5/X11 \ + /usr/local/include/X11R4/X11 \ + \ + /usr/X386/include/X11 \ + /usr/x386/include/X11 \ + /usr/XFree86/include/X11/X11 \ + \ + /usr/local/include/X11 \ + /usr/remote/include/X11 \ + /usr/include/X11 \ + /usr/unsupported/include/X11 \ + /usr/athena/include/X11 \ + /usr/local/x11r5/include/X11 \ + /usr/lpp/Xamples/include/X11 \ + \ + /usr/openwin/include/X11 \ + /usr/openwin/share/include/X11 \ + /usr/openwin/include \ + \ + /usr/include/Vk \ + $extra_include \ + $extra_include/X11 \ + ; \ + do + if test -r "$ac_dir/$xpm_direct_test_include"; then + no_xpm= ac_xpm_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$xpm_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_xpm_includes" | sed s%/X11$%% | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /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/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${xpm_direct_test_library}.$ac_extension; then + no_xpm= ac_xpm_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_XPM, +[AC_REQUIRE_CPP()dnl + +xpm_includes=NONE +xpm_libraries=NONE + +AC_MSG_CHECKING(for XPM) +AC_ARG_WITH(xpm, [ --without-xpm enable color pixmap XPM mode(s)]) +if test "x$with_xpm" = xno; then + no_xpm=yes +else + if test "x$xpm_includes" != xNONE && test "x$xpm_libraries" != xNONE; then + no_xpm= + else +AC_CACHE_VAL(ac_cv_path_xpm, +[# One or both of these vars are not set, and there is no cached value. +no_xpm=yes +AC_PATH_XPM_DIRECT + +if test "$no_xpm" = yes; then + ac_cv_path_xpm="no_xpm=yes" +else + ac_cv_path_xpm="no_xpm= ac_xpm_includes=$ac_xpm_includes ac_xpm_libraries=$ac_xpm_libraries" +fi])dnl + fi + eval "$ac_cv_path_xpm" +fi # with_xpm != no + +if test "$no_xpm" = yes; then + AC_MSG_RESULT(no) + XPM="#" +else + xpm=yes + AC_DEFINE(USE_XPMINC) + XLOCKLIBS="${XLOCKLIBS} -lXpm" + XMLOCKLIBS="-lXpm ${XMLOCKLIBS}" + test "x$xpm_includes" = xNONE && xpm_includes=$ac_xpm_includes + test "x$xpm_libraries" = xNONE && xpm_libraries=$ac_xpm_libraries + ac_cv_path_xpm="no_xpm= ac_xpm_includes=$xpm_includes ac_xpm_libraries=$xpm_libraries" + AC_MSG_RESULT([libraries $xpm_libraries, headers $xpm_includes]) + XPM="" +fi +]) + +AC_PATH_XPM + +if test "x$xpm_libraries" != x && test "x$xpm_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$xpm_libraries" + XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$xpm_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$xpm_libraries" + XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$xpm_libraries" +fi +if test "x$xpm_includes" != x && test "x$xpm_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$xpm_includes" +fi + +gltt=no +dnl gltt GLTT + +AC_DEFUN(AC_PATH_GLTT_DIRECT, +[test -z "$gltt_direct_test_library" && gltt_direct_test_library=gltt +# test -z "$gltt_direct_test_function" && gltt_direct_test_function=glttCreateImageFromData +test -z "$gltt_direct_test_include" && gltt_direct_test_include=FTFace.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + /usr/openwin/include \ + \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$gltt_direct_test_include"; then + no_gltt= ac_gltt_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$gltt_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_gltt_includes" | sed s%/X11$%% | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /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/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${gltt_direct_test_library}.$ac_extension; then + no_gltt= ac_gltt_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_GLTT, +[AC_REQUIRE_CPP()dnl + +gltt_includes=NONE +gltt_libraries=NONE + +AC_MSG_CHECKING(for GLTT) +AC_ARG_WITH(gltt, [ --without-gltt disable GL True text library]) +if test "x$with_gltt" = xno; then + no_gltt=yes +else + if test "x$gltt_includes" != xNONE && test "x$gltt_libraries" != xNONE; then + no_gltt= + else +AC_CACHE_VAL(ac_cv_path_gltt, +[# One or both of these vars are not set, and there is no cached value. +no_gltt=yes +AC_PATH_GLTT_DIRECT + +if test "$no_gltt" = yes; then + ac_cv_path_gltt="no_gltt=yes" +else + ac_cv_path_gltt="no_gltt= ac_gltt_includes=$ac_gltt_includes ac_gltt_libraries=$ac_gltt_libraries" +fi])dnl + fi + eval "$ac_cv_path_gltt" +fi # with_gltt != no + +if test "$no_gltt" = yes; then + AC_MSG_RESULT(no) + GLTT="#" +else + gltt=yes + AC_DEFINE(HAVE_GLTT) + XLOCKLIBS="${XLOCKLIBS} -lgltt" + test "x$gltt_includes" = xNONE && gltt_includes=$ac_gltt_includes + test "x$gltt_libraries" = xNONE && gltt_libraries=$ac_gltt_libraries + ac_cv_path_gltt="no_gltt= ac_gltt_includes=$gltt_includes ac_gltt_libraries=$gltt_libraries" + AC_MSG_RESULT([libraries $gltt_libraries, headers $gltt_includes]) + GLTT="" +fi +]) + +AC_PATH_GLTT + +if test "x$gltt_libraries" != x && test "x$gltt_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$gltt_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$gltt_libraries" +fi +if test "x$gltt_includes" != x && test "x$gltt_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$gltt_includes" +fi + +ttf=no +dnl ttf TTF + +AC_DEFUN(AC_PATH_TTF_DIRECT, +[test -z "$ttf_direct_test_library" && ttf_direct_test_library=ttf +test -z "$ttf_direct_test_function" && ttf_direct_test_function=TT_Init_FreeType +test -z "$ttf_direct_test_include" && ttf_direct_test_include=freetype.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include/X11 \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + /usr/openwin/include \ + \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$ttf_direct_test_include"; then + no_ttf= ac_ttf_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$ttf_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_ttf_includes" | sed s%/X11$%% | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /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/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /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/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${ttf_direct_test_library}.$ac_extension; then + no_ttf= ac_ttf_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_TTF, +[AC_REQUIRE_CPP()dnl + +ttf_includes=NONE +ttf_libraries=NONE + +AC_MSG_CHECKING(for TTF) +AC_ARG_WITH(ttf, [ --without-ttf enable color pixmap TTF mode(s)]) +if test "x$with_ttf" = xno; then + no_ttf=yes +else + if test "x$ttf_includes" != xNONE && test "x$ttf_libraries" != xNONE; then + no_ttf= + else +AC_CACHE_VAL(ac_cv_path_ttf, +[# One or both of these vars are not set, and there is no cached value. +no_ttf=yes +AC_PATH_TTF_DIRECT + +if test "$no_ttf" = yes; then + ac_cv_path_ttf="no_ttf=yes" +else + ac_cv_path_ttf="no_ttf= ac_ttf_includes=$ac_ttf_includes ac_ttf_libraries=$ac_ttf_libraries" +fi])dnl + fi + eval "$ac_cv_path_ttf" +fi # with_ttf != no + +if test "$no_ttf" = yes; then + AC_MSG_RESULT(no) + TTF="#" +else + ttf=yes + AC_DEFINE(HAVE_TTF) + XLOCKLIBS="${XLOCKLIBS} -lttf" + test "x$ttf_includes" = xNONE && ttf_includes=$ac_ttf_includes + test "x$ttf_libraries" = xNONE && ttf_libraries=$ac_ttf_libraries + ac_cv_path_ttf="no_ttf= ac_ttf_includes=$ttf_includes ac_ttf_libraries=$ttf_libraries" + AC_MSG_RESULT([libraries $ttf_libraries, headers $ttf_includes]) + TTF="" +fi +]) + +AC_PATH_TTF + +if test "x$ttf_libraries" != x && test "x$ttf_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$ttf_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$ttf_libraries" +fi +if test "x$ttf_includes" != x && test "x$ttf_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$ttf_includes" +fi + +gl=no +dnl OpenGL opengl + +dnl test -z "$opengl_direct_test_library" && opengl_direct_test_library=opengl +AC_DEFUN(AC_PATH_OPENGL_DIRECT, +[test -z "$opengl_direct_test_library" && opengl_direct_test_library=GL +test -z "$opengl_direct_test_library" && opengl_direct_test_library=GLU +test -z "$opengl_direct_test_function" && opengl_direct_test_function=glXCreateContext +test -z "$opengl_direct_test_include" && opengl_direct_test_include=GL/gl.h + for ac_dir in \ + /usr/include \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do +# Make sure this is not MesaGL + if test -r "$ac_dir/$opengl_direct_test_include" && test ! -r "$ac_dir/GL/xmesa.h"; then + no_opengl= ac_opengl_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$opengl_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_opengl_includes" | sed s/include/lib/` \ + \ + /usr/lib \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do +# Make sure its not a symbolic link to MesaGL library + + if test -r $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! $ac_link_test $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! -r $ac_dir/libMesa${opengl_direct_test_library}.$ac_extension; then + no_opengl= ac_opengl_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_OPENGL, +[AC_REQUIRE_CPP()dnl + +opengl_includes=NONE +opengl_libraries=NONE + +AC_MSG_CHECKING(for OpenGL) +AC_ARG_WITH(opengl, [ --without-opengl disable 3D OpenGL (for GL modes)]) +if test "x$with_opengl" = xno; then + no_opengl=yes +else + if test "x$opengl_includes" != xNONE && test "x$opengl_libraries" != xNONE; then + no_opengl= + else +AC_CACHE_VAL(ac_cv_path_opengl, +[# One or both of these vars are not set, and there is no cached value. +no_opengl=yes +AC_PATH_OPENGL_DIRECT + +if test "$no_opengl" = yes; then + ac_cv_path_opengl="no_opengl=yes" +else + ac_cv_path_opengl="no_opengl= ac_opengl_includes=$ac_opengl_includes ac_opengl_libraries=$ac_opengl_libraries" + +fi])dnl + fi + eval "$ac_cv_path_opengl" +fi # with_opengl != no + +if test "$no_opengl" = yes; then + AC_MSG_RESULT(no) +else + gl=yes + AC_DEFINE(USE_GL) + XLOCKLIBS="${XLOCKLIBS} -lGL -lGLU" + test "x$opengl_includes" = xNONE && opengl_includes=$ac_opengl_includes + test "x$opengl_libraries" = xNONE && opengl_libraries=$ac_opengl_libraries + case "${canonical}" in + *-*-solaris2* ) + AC_DEFINE(SUN_OGL_NO_VERTEX_MACROS) + if test "x$opengl_includes" = "x/usr/include"; then + opengl_includes="" + fi + ;; + *-*-irix5* | *-*-irix6* ) + XLOCKLIBS="${XLOCKLIBS} -lgl" + ;; + esac + ac_cv_path_opengl="no_opengl= ac_opengl_includes=$opengl_includes ac_opengl_libraries=$opengl_libraries" + AC_MSG_RESULT([libraries $opengl_libraries, headers $opengl_includes]) + GL="" +fi +]) + +AC_PATH_OPENGL + +if test "x$opengl_libraries" != x && test "x$opengl_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$opengl_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$opengl_libraries" +fi +if test "x$opengl_includes" != x && test "x$opengl_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$opengl_includes" +fi + +dnl MesaGL mesagl + +dnl test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGLU +AC_DEFUN(AC_PATH_MESAGL_DIRECT, +[test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGL +test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGLU +test -z "$mesagl_direct_test_function" && mesagl_direct_test_function=glXCreateContext +test -z "$mesagl_direct_test_include" && mesagl_direct_test_include=GL/gl.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$mesagl_direct_test_include"; then + no_mesagl= ac_mesagl_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$mesagl_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_mesagl_includes" | sed s/include/lib/` \ + \ + /usr/X11/lib \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/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 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${mesagl_direct_test_library}.$ac_extension; then + no_mesagl= ac_mesagl_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_MESAGL, +[AC_REQUIRE_CPP()dnl + +mesagl_includes=NONE +mesagl_libraries=NONE + +AC_MSG_CHECKING(for MesaGL) +AC_ARG_WITH(mesagl, [ --without-mesagl disable 3D MesaGL (for GL modes)]) +if test "x$with_mesagl" = xno; then + no_mesagl=yes +else + if test "x$mesagl_includes" != xNONE && test "x$mesagl_libraries" != xNONE; then + no_mesagl= + else +AC_CACHE_VAL(ac_cv_path_mesagl, +[# One or both of these vars are not set, and there is no cached value. +no_mesagl=yes +AC_PATH_MESAGL_DIRECT + +if test "$no_mesagl" = yes; then + ac_cv_path_mesagl="no_mesagl=yes" +else + ac_cv_path_mesagl="no_mesagl= ac_mesagl_includes=$ac_mesagl_includes ac_mesagl_libraries=$ac_mesagl_libraries" +fi])dnl + fi + eval "$ac_cv_path_mesagl" +fi # with_mesagl != no + +if test "$no_mesagl" = yes; then + AC_MSG_RESULT(no) + GL="#" +else + if test "$gl" = no; then + gl=yes + AC_DEFINE(USE_GL) + XLOCKLIBS="${XLOCKLIBS} -lMesaGL -lMesaGLU" + test "x$mesagl_includes" = xNONE && mesagl_includes=$ac_mesagl_includes + test "x$mesagl_libraries" = xNONE && mesagl_libraries=$ac_mesagl_libraries + case "${canonical}" in + *-*-solaris2* ) + if test "x$mesagl_includes" = "x/usr/include"; then + mesagl_includes="" + fi + ;; + esac + ac_cv_path_mesagl="no_mesagl= ac_mesagl_includes=$mesagl_includes ac_mesagl_libraries=$mesagl_libraries" + AC_MSG_RESULT([libraries $mesagl_libraries, headers $mesagl_includes]) + AC_MSG_RESULT(!!!WARNING!!! Known security hole with MesaGL <= 2.6 if setuid root) + case "${canonical}" in + *-*-linux* ) + # Testing if MesaGL was compiled against VGA + if test -f $mesagl_libraries/libMesaGL.so; then + have_mesagl_svga=`nm $mesagl_libraries/libMesaGL.so | grep SVGAMesa | wc -l` + else + have_mesagl_svga=0 + fi + if eval "test $have_mesagl_svga -ge 1"; then + AC_MSG_RESULT([MesaGL library is linked against SVGA: adding -lvga]) + XLOCKLIBS="${XLOCKLIBS} -lvga" + fi + # Testing if MesaGL was compiled against glide + if test -f $mesagl_libraries/libglide.so; then + have_mesagl_glide=`nm $mesagl_libraries/libglide.so | grep grGlideInit | wc -l` + else + have_mesagl_glide=0 + fi + if eval "test $have_mesagl_glide -ge 1"; then + AC_MSG_RESULT([MesaGL library is linked against GLIDE: adding -lglide2x]) + XLOCKLIBS="${XLOCKLIBS} -lglide2x" + fi +# Causes major errors for maintainer. xlock refuses to run. +# # Testing if MesaGL was compiled against pthread +# if test -f $mesagl_libraries/libpthread.so; then +# have_mesagl_pthread=`nm $mesagl_libraries/libpthread.so | grep pthread_once | wc -l` +# else +# have_mesagl_pthread=0 +# fi +# if eval "test $have_mesagl_pthread -ge 1"; then +# AC_MSG_RESULT([MesaGL library is linked against GLIDE: adding -lpthread]) +# XLOCKLIBS="${XLOCKLIBS} -lpthread" +# fi + + ;; + esac + GL="" + else + AC_MSG_RESULT(ignored - using OpenGL) + fi + +fi +]) + +AC_PATH_MESAGL + +if test "x$mesagl_libraries" != x && test "x$mesagl_libraries" != xNONE ; then + XLOCK_LDFLAGS="$mesagl_libraries:${XLOCK_LDFLAGS}" + XLOCKLIBPATHS="-L$mesagl_libraries ${XLOCKLIBPATHS}" +fi +if test "x$mesagl_includes" != x && test "x$mesagl_includes" != xNONE ; then + XLOCKINC="-I$mesagl_includes ${XLOCKINC}" +fi + +# Test if (Mesa)GL has GL1.1 features +# (Should this test be performed only if (Mesa)GL is used? In that case +# it fails anyway.) +AC_MSG_CHECKING([Checking for GL >=1.1]) +ac_save_CFLAGS="$CFLAGS" +ac_save_LIBS="$LIBS" +CFLAGS="${CFLAGS} ${XLOCKINC}" +LIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 -lXext -lm" +AC_CACHE_VAL(ac_cv_c_gl1_1,[ +AC_TRY_LINK([#define _XOPEN_SOURCE 1 +#include ], [ +GLint texture; +glBindTexture(GL_TEXTURE_2D, texture); +], ac_cv_c_gl1_1=yes, ac_cv_c_gl1_1=no)]) +dnl This does not seem to work on Sun's OpenGL +dnl if test x"$ac_cv_c_gl1_1" = xyes; then + AC_DEFINE(HAVE_GLBINDTEXTURE) + AC_MSG_RESULT(yes) +dnl else +dnl AC_MSG_RESULT(no) +dnl fi +CFLAGS="$ac_save_CFLAGS" +LIBS="$ac_save_LIBS" + +dnl DTSAVER DtSaver dtsaver DtSvc + +AC_DEFUN(AC_PATH_DTSAVER_DIRECT, +[test -z "$dtsaver_direct_test_library" && dtsaver_direct_test_library=DtSvc +test -z "$dtsaver_direct_test_function" && dtsaver_direct_test_function=DtSaverGetWindows +test -z "$dtsaver_direct_test_include" && dtsaver_direct_test_include=Dt/Saver.h + for ac_dir in \ + /usr/dt/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$dtsaver_direct_test_include"; then + no_dtsaver= ac_dtsaver_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$dtsaver_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_dtsaver_includes" | sed s/include/lib/` \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${dtsaver_direct_test_library}.$ac_extension; then + no_dtsaver= ac_dtsaver_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_DTSAVER, +[AC_REQUIRE_CPP()dnl + +dtsaver_includes=NONE +dtsaver_libraries=NONE + +AC_MSG_CHECKING(for DtSaver) +AC_ARG_WITH(dtsaver, [ --without-dtsaver disable -dtsaver option]) +if test "x$with_dtsaver" = xno; then + no_dtsaver=yes +else + if test "x$dtsaver_includes" != xNONE && test "x$dtsaver_libraries" != xNONE; then + no_dtsaver= + else +AC_CACHE_VAL(ac_cv_path_dtsaver, +[# One or both of these vars are not set, and there is no cached value. +no_dtsaver=yes +AC_PATH_DTSAVER_DIRECT + +if test "$no_dtsaver" = yes; then + ac_cv_path_dtsaver="no_dtsaver=yes" +else + ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$ac_dtsaver_includes ac_dtsaver_libraries=$ac_dtsaver_libraries" +fi])dnl + fi + eval "$ac_cv_path_dtsaver" +fi # with_dtsaver != no + +if test "$no_dtsaver" = yes; then + AC_MSG_RESULT(no) +else + AC_DEFINE(USE_DTSAVER) + XLOCKLIBS="${XLOCKLIBS} -lDtSvc" + test "x$dtsaver_includes" = xNONE && dtsaver_includes=$ac_dtsaver_includes + test "x$dtsaver_libraries" = xNONE && dtsaver_libraries=$ac_dtsaver_libraries + ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$dtsaver_includes ac_dtsaver_libraries=$dtsaver_libraries" + AC_MSG_RESULT([libraries $dtsaver_libraries, headers $dtsaver_includes]) +fi +]) + +AC_PATH_DTSAVER + +if test "x$dtsaver_libraries" != x && test "x$dtsaver_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dtsaver_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dtsaver_libraries" +fi +if test "x$dtsaver_includes" != x && test "x$dtsaver_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$dtsaver_includes" +fi + +dnl Xdpms DPMS + +AC_DEFUN(AC_PATH_DPMS_DIRECT, +[test -z "$dpms_direct_test_library" && dpms_direct_test_library=Xdpms +test -z "$dpms_direct_test_function" && dpms_direct_test_function=DPMSSetTimeouts +test -z "$dpms_direct_test_include" && dpms_direct_test_include=X11/extensions/dpms.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11R6.3 \ + /usr/include/X11R6.2 \ + /usr/include/X11R6.1 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X11/include \ + /usr/include/X11 \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/dt/include \ + \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + /usr/unsupported/include \ + /usr/dpms/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$dpms_direct_test_include"; then + no_dpms= ac_dpms_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$dpms_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_dpms_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11R6.3 \ + /usr/lib/X11R6.2 \ + /usr/lib/X11R6.1 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11R6.3/lib \ + /usr/local/X11R6.2/lib \ + /usr/local/X11R6.1/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11R6.3 \ + /usr/local/lib/X11R6.2 \ + /usr/local/lib/X11R6.1 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X11/lib \ + /usr/lib/X11 \ + /usr/local/X11/lib \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + /usr/unsupported/lib \ + /usr/dpms/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + /shlib \ + /usr/shlib \ + /usr/shlib/X11 \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${dpms_direct_test_library}.$ac_extension; then + no_dpms= ac_dpms_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_DPMS, +[AC_REQUIRE_CPP()dnl + +dpms_includes=NONE +dpms_libraries=NONE + +AC_MSG_CHECKING(for DPMS) +AC_ARG_WITH(dpms, [ --without-dpms disable DPMS]) +dpmslib=no +if test "x$with_dpms" = xno; then + no_dpms=yes +else + if test "x$dpms_includes" != xNONE && test "x$dpms_libraries" != xNONE; then + no_dpms= + else +AC_CACHE_VAL(ac_cv_path_dpms, +[# One or both of these vars are not set, and there is no cached value. +no_dpms=yes +AC_PATH_DPMS_DIRECT + +if test "$no_dpms" = yes; then + ac_cv_path_dpms="no_dpms=yes" +else + ac_cv_path_dpms="no_dpms= ac_dpms_includes=$ac_dpms_includes ac_dpms_libraries=$ac_dpms_libraries" +fi])dnl + fi + eval "$ac_cv_path_dpms" +fi # with_dpms != no + +if test "$no_dpms" = yes; then + AC_MSG_RESULT(no) +else + AC_DEFINE(USE_DPMS) +dnl test needed for Digital Unix machines + if test "x$ac_dpms_libraries" != xNONE; then + XLOCKLIBS="${XLOCKLIBS} -lXdpms" + fi + test "x$dpms_includes" = xNONE && dpms_includes=$ac_dpms_includes + test "x$dpms_libraries" = xNONE && dpms_libraries=$ac_dpms_libraries + ac_cv_path_dpms="no_dpms= ac_dpms_includes=$dpms_includes ac_dpms_libraries=$dpms_libraries" + AC_MSG_RESULT([libraries $dpms_libraries, headers $dpms_includes]) +fi +]) + +AC_PATH_DPMS + +if test "x$dpms_libraries" != x && test "x$dpms_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dpms_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dpms_libraries" +fi +if test "x$dpms_includes" != x && test "x$dpms_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$dpms_includes" +fi + +sound=no +dnl RPLAY RPlay rplay + +AC_DEFUN(AC_PATH_RPLAY_DIRECT, +[test -z "$rplay_direct_test_library" && rplay_direct_test_library=rplay +test -z "$rplay_direct_test_function" && rplay_direct_test_function=rplay_open_default +test -z "$rplay_direct_test_include" && rplay_direct_test_include=rplay.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$rplay_direct_test_include"; then + no_rplay= ac_rplay_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$rplay_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_rplay_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11/lib \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${rplay_direct_test_library}.$ac_extension; then + no_rplay= ac_rplay_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_RPLAY, +[AC_REQUIRE_CPP()dnl + +rplay_includes=NONE +rplay_libraries=NONE + +AC_MSG_CHECKING(for RPLAY) +AC_ARG_WITH(rplay, [ --without-rplay disable RPLAY sounds]) +if test "x$with_rplay" = xno; then + no_rplay=yes +else + if test "x$rplay_includes" != xNONE && test "x$rplay_libraries" != xNONE; then + no_rplay= + else +AC_CACHE_VAL(ac_cv_path_rplay, +[# One or both of these vars are not set, and there is no cached value. +no_rplay=yes +AC_PATH_RPLAY_DIRECT + +if test "$no_rplay" = yes; then + ac_cv_path_rplay="no_rplay=yes" +else + ac_cv_path_rplay="no_rplay= ac_rplay_includes=$ac_rplay_includes ac_rplay_libraries=$ac_rplay_libraries" +fi])dnl + fi + eval "$ac_cv_path_rplay" +fi # with_rplay != no + +if test "$no_rplay" = yes; then + AC_MSG_RESULT(no) +else +dnl solaris26=no +dnl case "${canonical}" in +dnl *-*-solaris2.6 ) +dnl solaris26=yes +dnl ;; +dnl esac +dnl if test "$CC" = gcc && test "$solaris26" = yes; then +dnl AC_MSG_RESULT(ignored - problems here with gcc and solaris2.6) +dnl else + sound=yes + AC_DEFINE(USE_RPLAY) + XLOCKLIBS="${XLOCKLIBS} -lrplay" + test "x$rplay_includes" = xNONE && rplay_includes=$ac_rplay_includes + test "x$rplay_libraries" = xNONE && rplay_libraries=$ac_rplay_libraries + ac_cv_path_rplay="no_rplay= ac_rplay_includes=$rplay_includes ac_rplay_libraries=$rplay_libraries" + AC_MSG_RESULT([libraries $rplay_libraries, headers $rplay_includes]) +dnl fi +fi +]) + +AC_PATH_RPLAY + +if test "x$rplay_libraries" != x && test "x$rplay_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$rplay_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$rplay_libraries" +fi +if test "x$rplay_includes" != x && test "x$rplay_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$rplay_includes" +fi + +dnl NAS audio + +AC_DEFUN(AC_PATH_NAS_DIRECT, +[test -z "$nas_direct_test_library" && nas_direct_test_library=audio +test -z "$nas_direct_test_function" && nas_direct_test_function=AuOpenServer +test -z "$nas_direct_test_include" && nas_direct_test_include=audio/audio.h + for ac_dir in \ + /usr/X11R6.3/include \ + /usr/X11R6.2/include \ + /usr/X11R6.1/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + /usr/local/include \ + /usr/remote/include \ + /usr/include \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$nas_direct_test_include"; then + no_nas= ac_nas_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$nas_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_nas_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11/lib \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${nas_direct_test_library}.$ac_extension; then + no_nas= ac_nas_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_NAS, +[AC_REQUIRE_CPP()dnl + +nas_includes=NONE +nas_libraries=NONE + +AC_MSG_CHECKING(for NAS) +AC_ARG_WITH(nas, [ --without-nas disable NAS sounds]) +if test "x$with_nas" = xno; then + no_nas=yes +else + if test "x$nas_includes" != xNONE && test "x$nas_libraries" != xNONE; then + no_nas= + else +AC_CACHE_VAL(ac_cv_path_nas, +[# One or both of these vars are not set, and there is no cached value. +no_nas=yes +AC_PATH_NAS_DIRECT + +if test "$no_nas" = yes; then + ac_cv_path_nas="no_nas=yes" +else + ac_cv_path_nas="no_nas= ac_nas_includes=$ac_nas_includes ac_nas_libraries=$ac_nas_libraries" +fi])dnl + fi + eval "$ac_cv_path_nas" +fi # with_nas != no + +if test "$no_nas" = yes; then + AC_MSG_RESULT(no) +else + if test "$sound" = no; then + sgi=no + case "${canonical}" in + *-*-irix5* | *-*-irix6* ) + sgi=yes + ;; + esac + if test "$sgi" = yes; then + AC_MSG_RESULT(ignored - problems here with audio and nas) + else + sound=yes + AC_DEFINE(USE_NAS) + XLOCKLIBS="${XLOCKLIBS} -laudio" +dnl XLOCKLIBS="${XLOCKLIBS} -lnas" + test "x$nas_includes" = xNONE && nas_includes=$ac_nas_includes + test "x$nas_libraries" = xNONE && nas_libraries=$ac_nas_libraries + ac_cv_path_nas="no_nas= ac_nas_includes=$nas_includes ac_nas_libraries=$nas_libraries" + AC_MSG_RESULT([libraries $nas_libraries, headers $nas_includes]) + fi + else + AC_MSG_RESULT(ignored - using rplay) + fi +fi +]) + +AC_PATH_NAS + +if test "x$nas_libraries" != x && test "x$nas_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$nas_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$nas_libraries" +fi +if test "x$nas_includes" != x && test "x$nas_includes" != xNONE ; then + XLOCKINC="${XLOCKINC} -I$nas_includes" +fi + +dnl crypt CRYPT + +AC_DEFUN(AC_PATH_CRYPT_DIRECT, +[test -z "$crypt_direct_test_library" && crypt_direct_test_library=crypt + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$crypt_direct_test_library $LIBS" +for ac_dir in \ + /usr/lib \ + /usr/local/lib \ + /usr/remote/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${crypt_direct_test_library}.$ac_extension; then + no_crypt= ac_crypt_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) +AC_DEFUN(AC_PATH_CRYPT, +[AC_REQUIRE_CPP()dnl + +crypt_libraries=NONE + +AC_MSG_CHECKING(for CRYPT) +AC_ARG_WITH(crypt, [ --without-crypt disable CRYPT]) +if test "x$with_crypt" = xno; then + no_crypt=yes +else + if test "x$crypt_libraries" != xNONE; then + no_crypt= + else +AC_CACHE_VAL(ac_cv_path_crypt, +[# One or both of these vars are not set, and there is no cached value. +no_crypt=yes +AC_PATH_CRYPT_DIRECT + +if test "$no_crypt" = yes; then + ac_cv_path_crypt="no_crypt=yes" +else + ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$ac_crypt_libraries" +fi])dnl + fi + eval "$ac_cv_path_crypt" +fi # with_crypt != no + +if test "$no_crypt" = yes; then + AC_MSG_RESULT(no) +else + XLOCKLIBS="${XLOCKLIBS} -lcrypt" + test "x$crypt_libraries" = xNONE && crypt_libraries=$ac_crypt_libraries + ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$crypt_libraries" + AC_MSG_RESULT([libraries $crypt_libraries]) +fi +]) + +AC_PATH_CRYPT + +if test "x$crypt_libraries" != x && test "x$crypt_libraries" != xNONE ; then + XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$crypt_libraries" + XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$crypt_libraries" +fi + + +XGLOCK="" +XGLOCKDIR="" +INSTALL_XGLOCK="" +UNINSTALL_XGLOCK="" +XGLOCK_MAKEFILE="" +AC_ARG_WITH(gtk, [ --without-gtk disable GTK (no xglock build)],) +if test "x$with_gtk" != "xno" ; then + AC_PATH_GTK(1.0.4, + have_gtk="yes", + have_gtk="no") +fi + +dnl GtkFontSel gtk font selection widget + +AC_DEFUN(AC_PATH_GTKFONTSEL_DIRECT, +[test -z "$gtkfontsel_direct_test_library" && gtkfontsel_direct_test_library="gtkfontsel" +test -z "$gtkfontsel_direct_test_function" && gtkfontsel_direct_test_function="gtk_font_selection_new" +test -z "$gtkfontsel_direct_test_include" && gtkfontsel_direct_test_include="gtkfontsel.h" + for ac_dir in \ + /usr/include \ + /usr/include/fontsel \ + /usr/include/gtkfontsel \ + /usr/gtk/include \ + /usr/gtk/fontsel \ + /usr/gtk/gtkfontsel \ + /usr/gtk/fontsel/include \ + /usr/gtk/gtkfontsel/include \ + /usr/local/include \ + /usr/local/include/fontsel \ + /usr/local/include/gtkfontsel \ + /usr/local/gtk/include \ + /usr/X11R6.3/include \ + /usr/X11R6.3/include/gtk \ + /usr/X11R6.2/include \ + /usr/X11R6.2/include/gtk \ + /usr/X11R6.1/include \ + /usr/X11R6.1/include/gtk \ + /usr/X11R6/include \ + /usr/X11R6/include/gtk \ + /usr/X11R5/include \ + /usr/X11R5/include/gtk \ + /usr/X11R4/include \ + /usr/X11R4/include/gtk \ + /usr/X11/include \ + /usr/X11/include/gtk \ + /usr/X386/include \ + /usr/X386/include/gtk \ + /usr/x386/include \ + /usr/x386/include/gtk \ + /usr/XFree86/include \ + /usr/XFree86/include/gtk \ + /usr/local/X11R6.3/include \ + /usr/local/X11R6.3/include/gtk \ + /usr/local/X11R6.2/include \ + /usr/local/X11R6.2/include/gtk \ + /usr/local/X11R6.1/include \ + /usr/local/X11R6.1/include/gtk \ + /usr/local/X11R6/include \ + /usr/local/X11R6/include/gtk \ + /usr/local/X11R5/include \ + /usr/local/X11R5/include/gtk \ + /usr/local/X11R4/include \ + /usr/local/X11R4/include/gtk \ + /usr/local/X11/include \ + /usr/local/X11/include/gtk \ + /usr/local/X386/include \ + /usr/local/X386/include/gtk \ + /usr/local/x386/include \ + /usr/local/x386/include/gtk \ + /usr/local/XFree86/include \ + /usr/local/XFree86/include/gtk \ + /usr/local/include/X11R6.3 \ + /usr/local/include/X11R6.3/gtk \ + /usr/local/include/X11R6.2 \ + /usr/local/include/X11R6.2/gtk \ + /usr/local/include/X11R6.1 \ + /usr/local/include/X11R6.1/gtk \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R6/gtk \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R5/gtk \ + /usr/local/include/X11R4 \ + /usr/local/include/X11R4/gtk \ + /usr/local/include/X11 \ + /usr/local/include/X11/gtk \ + /usr/local/include/X386 \ + /usr/local/include/X386/gtk \ + /usr/local/include/x386 \ + /usr/local/include/x386/gtk \ + /usr/local/include/XFree86 \ + /usr/local/include/XFree86/gtk \ + /usr/local/dt/include \ + /usr/local/dt/include/gtk \ + /usr/dt/include \ + /usr/dt/include/gtk \ + /usr/unsupported/include \ + /usr/unsupported/include/gtk \ + /usr/athena/include \ + /usr/athena/include/gtk \ + /usr/local/x11r5/include \ + /usr/local/x11r5/include/gtk \ + /usr/lpp/Xamples/include \ + /usr/lpp/Xamples/include/gtk \ + $extra_include \ + ; \ + do + if test -r "$ac_dir/$gtkfontsel_direct_test_include"; then + no_gtkfontsel= ac_gtkfontsel_includes=$ac_dir + break + fi + done + +# Check for the libraries. +# See if we find them without any special options. +# Do not add to $LIBS permanently. +ac_save_LIBS="$LIBS" +LIBS="-l$gtkfontsel_direct_test_library $LIBS" +# First see if replacing the include by lib works. +for ac_dir in `echo "$ac_gtkfontsel_includes" | sed s/include/lib/` \ + \ + /usr/X11R6.3/lib \ + /usr/X11R6.2/lib \ + /usr/X11R6.1/lib \ + /usr/X11R6/lib \ + /usr/lib/X11 \ + /usr/lib/X11/gtk \ + /usr/gtk/lib \ + /usr/X11/gtk/lib \ + /usr/local/lib \ + /usr/local/lib/X11 \ + /usr/X11/local/lib \ + /usr/X11/local/lib/X11 \ + /usr/X11/local/X11/lib \ + /usr/local/lib/gtk \ + /usr/local/lib/X11/gtk \ + /usr/X11/local/lib/gtk \ + /usr/X11/local/lib/X11/gtk \ + /usr/X11/local/X11/lib/gtk \ + /usr/local/gtk/lib \ + /usr/local/X11/gtk/lib \ + $extra_lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${gtkfontsel_direct_test_library}.$ac_extension; then + no_gtkfontsel= ac_gtkfontsel_libraries=$ac_dir + break 2 + fi + done +done +LIBS="$ac_save_LIBS"]) + +AC_DEFUN(AC_PATH_GTKFONTSEL, +[AC_REQUIRE_CPP()dnl + +gtkfontsel_includes=NONE +gtkfontsel_libraries=NONE + +AC_MSG_CHECKING(for GTK FontSelection widget) +AC_ARG_WITH(gtkfontsel, [ --without-gtkfontsel disable gtkfontsel widget (for xglock)]) +if test "x$with_gtkfontsel" = xno; then + no_gtkfontsel=yes +else + if test "x$gtkfontsel_includes" != xNONE && test "x$gtkfontsel_libraries" != xNONE; then + no_gtkfontsel= + else + AC_PATH_GTKFONTSEL_DIRECT + fi +fi # with_gtkfontsel != no + +if test "$no_gtkfontsel" = yes; then + AC_MSG_RESULT(no) +else + XGLOCKLIBS="-lgtkfontsel ${XGLOCKLIBS}" + test "x$gtkfontsel_includes" = xNONE && gtkfontsel_includes=$ac_gtkfontsel_includes + test "x$gtkfontsel_libraries" = xNONE && gtkfontsel_libraries=$ac_gtkfontsel_libraries + AC_MSG_RESULT([libraries $gtkfontsel_libraries, headers $gtkfontsel_includes]) + AC_DEFINE(HAVE_GTK_FONTSEL_WIDGET) +fi +]) + +if test "x$have_gtk" = "xyes"; then + + AC_PATH_GTKFONTSEL + + if test "x$gtkfontsel_libraries" != x && test "x$gtkfontsel_libraries" != xNONE ; then + XGLOCK_LDFLAGS="${XGLOCK_LDFLAGS}:$gtkfontsel_libraries" + XGLOCKLIBPATHS="${XGLOCKLIBPATHS} -L$gtkfontsel_libraries" + fi + if test "x$gtkfontsel_includes" != x && test "x$gtkfontsel_includes" != xNONE ; then + XGLOCKINC="${XGLOCKINC} -I$gtkfontsel_includes" + fi + + if test -n "${x_includes}"; then + XGLOCKINC="-I${x_includes} ${XGLOCKINC}" + XGLOCK="xglock" + XGLOCKDIR="xglock" + INSTALL_XGLOCK="install_xglock" + UNINSTALL_XGLOCK="uninstall_xglock" + XGLOCK_MAKEFILE="xglock/Makefile" + fi + if test -n "${x_libraries}"; then + XGLOCK_LDFLAGS="${XGLOCK_LDFLAGS}:/usr/lib:${x_libraries}" + XGLOCKLIBPATHS="${XGLOCKLIBPATHS} -L${x_libraries}" + XGLOCKLIBS="${XGLOCKLIBS} -lXt" + fi +fi + +dnl Should have a tester for XHPUX Xhp + +dnl Now we handle the various system dependant problems +dnl that are not addressed in the X header files, or things dealing +dnl with utility quirks on some systems. + +aixv3=no +dirent=yes + +case "${canonical}" in + + *-*-aix* ) + BITMAPTYPE="ibm" + PIXMAPTYPE="ibm" + AC_DEFINE(AIXV3) + aixv3=yes + case "${canonical}" in + *-*-aix2* | *-*-aix3.0* | *-*-aix3.1* ) + AC_DEFINE(LESS_THAN_AIX3_2) + ;; + esac + ;; + + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* ) + BITMAPTYPE="bsd" + PIXMAPTYPE="bsd" + INSTPGMFLAGS="-s -o root -m 4111" + XLOCKLDFLAGS="-Wl,-R${XLOCK_LDFLAGS}" + XMLOCKLDFLAGS="-Wl,-R${XMLOCK_LDFLAGS}" + XALOCKLDFLAGS="-Wl,-R${XALOCK_LDFLAGS}" + ;; + + *-*-dgux5* ) + BITMAPTYPE="x11" + PIXMAPTYPE="x11" + ;; + + *-*-hpux* ) + if test "${CC}" = "cc" ; then + CFLAGS="${CFLAGS} -O -Aa -z -D_HPUX_SOURCE" + GPROF_CFLAGS="${GPROF_CFLAGS} -Aa -z -D_HPUX_SOURCE" + fi +dnl LDFLAGS=-Wl,-B,immediate + XLOCKLIBS="-lXhp11 ${XLOCKLIBS}" + AC_DEFINE(SYSV) + AC_DEFINE(SVR4) + BITMAPTYPE="hp" + PIXMAPTYPE="hp" + ;; + + *-*-irix5* | *-*-irix6* ) + if test "${CC}" = "cc" ; then + CFLAGS="${CFLAGS} -fullwarn" + fi + BITMAPTYPE="sgi" + PIXMAPTYPE="sgi" + ;; + + *-*-linux* ) + AC_CHECK_HEADER(elf.h, AC_DEFINE(HAVE_SHADOW)) +dnl CFLAGS="${CFLAGS} -ansi -pedantic" + AC_DEFINE(linux) +dnl AC_DEFINE(__i386__) + AC_DEFINE(_POSIX_SOURCE) + AC_DEFINE(_BSD_SOURCE) + AC_DEFINE(_GNU_SOURCE) +dnl AC_DEFINE(DX_LOCALE) + if test -e /etc/shadow ; then + INSTPGMFLAGS="-g shadow -m 2111" + case `ls -l /etc/shadow` in + -???r?????\ *\ shadow\ *\ /etc/shadow) # group shadow can read it + INSTPGMFLAGS="-g shadow -m 2111" + ;; + *) + INSTPGMFLAGS="-o root -m 4111" + ;; + esac + fi + INSTPGMFLAGS="-s $INSTPGMFLAGS" + BITMAPTYPE="linux" + PIXMAPTYPE="linux" +dnl if Shadow and not elf +dnl XLOCKLIBS="${XLOCKLIBS} -lgdbm" + ;; + + *-*-osf* ) + BITMAPTYPE="dec" + PIXMAPTYPE="dec" + AC_MSG_CHECKING(for Digital Unix Enhanced Security) + if test -f /usr/sbin/rcmgr && test -f /etc/rc.config ; then + if test X`/usr/sbin/rcmgr get SECURITY` = XENHANCED ; then + AC_MSG_RESULT(yes) + AC_DEFINE(OSF1_ENH_SEC) + AC_SUBST(OSF1_ENH_SEC) + XLOCKLIBS="${XLOCKLIBS} -lsecurity" + INSTPGMFLAGS="-s -g auth -m 2111" + else + AC_MSG_RESULT(no) + fi + fi + ;; + + *-*-sco* ) + BITMAPTYPE="sco" + PIXMAPTYPE="sco" + AC_DEFINE(HAVE_SHADOW) + AC_DEFINE(SYSV) + ;; + + *-*-solaris2* ) + AC_DEFINE(SOLARIS2) + case "${canonical}" in + *-*-solaris2.0* | *-*-solaris2.1* | *-*-solaris2.2* | *-*-solaris2.3* | *-*-solaris2.4* ) + AC_DEFINE(LESS_THAN_SOLARIS2_5) + ;; + esac + INSTPGMFLAGS="-s -o root -m 4111" + AC_DEFINE(HAVE_SHADOW) + AC_DEFINE(SYSV) + AC_DEFINE(SVR4) + BITMAPTYPE="sun" + PIXMAPTYPE="sol" +dnl XLOCKLIBS="${XLOCKLIBS} -lsocket -lnsl -lposix4" + XLOCKLIBS="${XLOCKLIBS} -lposix4" + LIBS="${LIBS} -lsocket -lnsl -lposix4" + XLOCKLDFLAGS="-R${XLOCK_LDFLAGS}" + XMLOCKLDFLAGS="-R${XMLOCK_LDFLAGS}" + XALOCKLDFLAGS="-R${XALOCK_LDFLAGS}" + ;; + + *-*-sunos4* ) + AC_DEFINE(SUNOS4) + BITMAPTYPE="sun" + PIXMAPTYPE="sun" + ;; + + *-*-sysv5* ) + BITMAPTYPE="x11" + PIXMAPTYPE="x11" + ;; + + *) + BITMAPTYPE="x11" + PIXMAPTYPE="x11" + ;; +esac + + +if test "$dirent" = yes; then + AC_HEADER_DIRENT +fi + +dnl Rather have a usleep +AC_CHECK_FUNC(usleep, AC_DEFINE(HAVE_USLEEP), +AC_CHECK_FUNC(nanosleep, AC_DEFINE(HAVE_NANOSLEEP))) + +dnl AC_CHECK_FUNCS(gettimeofday) +AC_MSG_CHECKING(how to call gettimeofday) +AC_CACHE_VAL(ac_cv_gettimeofday_args, + [AC_TRY_COMPILE([#include +#include ], + [struct timeval tv; struct timezone tzp; + gettimeofday(&tv, &tzp);], + [ac_gettimeofday_args=2], + [AC_TRY_COMPILE([#include +#include ], + [struct timeval tv; gettimeofday(&tv);], + [ac_gettimeofday_args=1], + [ac_gettimeofday_args=0])]) + ac_cv_gettimeofday_args=$ac_gettimeofday_args]) +ac_gettimeofday_args=$ac_cv_gettimeofday_args +if test $ac_gettimeofday_args = 2 ; then + AC_DEFINE(HAVE_GETTIMEOFDAY) + AC_DEFINE(GETTIMEOFDAY_TWO_ARGS) + AC_MSG_RESULT(two arguments) +elif test $ac_gettimeofday_args = 1 ; then + AC_DEFINE(HAVE_GETTIMEOFDAY) + AC_MSG_RESULT(one argument) +else + AC_MSG_RESULT(unknown) +fi + +AC_C_INLINE + +srand=no +AC_CHECK_FUNC(srand48, AC_DEFINE(SRAND,srand48) AC_DEFINE(LRAND,lrand48) + AC_DEFINE(MAXRAND,2147483648.0), +[AC_CHECK_FUNC(srandom, AC_DEFINE(SRAND,srandom) AC_DEFINE(LRAND,random) + AC_DEFINE(MAXRAND,2147483648.0), +AC_CHECK_FUNC(srand, AC_DEFINE(SRAND,srand) AC_DEFINE(LRAND,rand) srand=yes))]) + +if test "$srand" = yes; then + if test "$aixv3" = yes; then + AC_DEFINE(MAXRAND,2147483648.0) + else + AC_DEFINE(MAXRAND,32768.0) + fi +fi + +AC_MSG_CHECKING([matherr support]) +AC_CACHE_VAL(ac_cv_c_matherr,[ +AC_TRY_COMPILE([#define _XOPEN_SOURCE 1 +#include ], [ +struct exception x; +x.type = DOMAIN; +x.type = SING; +], ac_cv_c_matherr=yes, ac_cv_c_matherr=no)]) +if test x"$ac_cv_c_matherr" = xyes; then + AC_DEFINE(USE_MATHERR) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +dnl Problems here if -I/usr/include used with gcc on Solaris +AC_MSG_CHECKING([struct sigset_t]) +AC_CACHE_VAL(ac_cv_c_sigset_t,[ +AC_TRY_COMPILE([/*#define _XOPEN_SOURCE 1*/ +#include ], [ +typedef struct {unsigned long __sigbits[4];} sigset_t; +sigset_t sigmask; +], ac_cv_c_sigset_t=yes, ac_cv_c_sigset_t=no)]) +if test x"$ac_cv_c_sigset_t" = xyes; then + AC_DEFINE(HAVE_STRUCT_SIGSET_T) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +AC_ARG_ENABLE(bitmapdir, [ --enable-bitmapdir=DIR set directory for bitmaps, default is ./bitmaps],bitmap_dir=$enableval,bitmap_dir=no) +case "x$bitmap_dir" in +x/*|x.*) + AC_MSG_RESULT([setting BITMAPDIR = $enableval]) + BITMAPDIR=$enableval + if test ! -d $bitmap_dir; then + AC_MSG_RESULT([Warning: Directory $enableval does not exist]) + fi + ;; +*) + BITMAPDIR='$(top_srcdir)/bitmaps' + bitmap_dir='$top_srcdir/bitmaps' + ;; +esac + +AC_ARG_ENABLE(bitmaptype, [ --enable-bitmaptype=name + set name for bitmap type],bitmap_type=$enableval,bitmap_type=no) +case "x$bitmap_type" in +xyes*|xno*) + ;; +*) + AC_MSG_RESULT([setting BITMAPTYPE = $enableval]) + BITMAPTYPE=$enableval + if test ! -f $bitmap_dir/l-$BITMAPTYPE.xbm; then + AC_MSG_RESULT([Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist]) + fi + ;; +esac + +AC_ARG_ENABLE(pixmapdir, [ --enable-pixmapdir=DIR set directory for pixmaps, default is ./pixmaps],pixmap_dir=$enableval,pixmap_dir=no) +case "x$pixmap_dir" in +x/*|x.*) + AC_MSG_RESULT([setting PIXMAPDIR = $enableval]) + PIXMAPDIR=$enableval + if test ! -d $pixmap_dir; then + AC_MSG_RESULT([Warning: Directory $enableval does not exist]) + fi + ;; +*) + PIXMAPDIR='$(top_srcdir)/pixmaps' + pixmap_dir='$top_srcdir/pixmaps' + ;; +esac + +AC_ARG_ENABLE(pixmaptype, [ --enable-pixmaptype=name + set name for pixmap type],pixmap_type=$enableval,pixmap_type=no) +case "x$pixmap_type" in +xyes*|xno*) + ;; +*) + AC_MSG_RESULT([setting PIXMAPTYPE = $enableval]) + PIXMAPTYPE=$enableval + if test ! -f $pixmap_dir/m-$PIXMAPTYPE.xpm; then + AC_MSG_RESULT([Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist]) + fi + ;; +esac + +AC_ARG_ENABLE(mapdir, [ --enable-mapdir=DIR set directory for bitmaps and pixmaps],map_dir=$enableval,map_dir=no) +case "x$map_dir" in +x/*|x.*) + AC_MSG_RESULT([setting BITMAPDIR = $enableval]) + BITMAPDIR=$enableval + AC_MSG_RESULT([setting PIXMAPDIR = $enableval]) + PIXMAPDIR=$enableval + if test ! -d $map_dir; then + AC_MSG_RESULT([Warning: Directory $enableval does not exist]) + fi + ;; +*) + BITMAPDIR='$(top_srcdir)/bitmaps' + bitmap_dir='$top_srcdir/bitmaps' + PIXMAPDIR='$(top_srcdir)/pixmaps' + pixmap_dir='$top_srcdir/pixmaps' + ;; +esac + +AC_ARG_ENABLE(maptype, [ --enable-maptype=name set name for bitmap and pixmap type],map_type=$enableval,map_type=no) +case "x$map_type" in +xyes*|xno*) + ;; +*) + AC_MSG_RESULT([setting BITMAPTYPE = $enableval]) + BITMAPTYPE=$enableval + if test ! -f $map_dir/l-$BITMAPTYPE.xbm; then + AC_MSG_RESULT([Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist]) + fi + AC_MSG_RESULT([setting PIXMAPTYPE = $enableval]) + PIXMAPTYPE=$enableval + if test ! -f $map_dir/m-$PIXMAPTYPE.xpm; then + AC_MSG_RESULT([Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist]) + fi + ;; +esac + +if test "$sound" = no; then + AC_ARG_ENABLE(def_play, [ --enable-def-play=program + set def-play to program that plays sounds],def_play=$enableval,def_play=no) + if test "$def_play" != no; then + AC_MSG_RESULT([defining option DEF_PLAY = "$enableval"]) + AC_DEFINE_UNQUOTED(DEF_PLAY,"$enableval") + fi +fi + +AC_ARG_ENABLE(vroot, [ --disable-vroot disables xlock from being able to run in root window + (some window managers have problems)],use_vroot=$enableval,use_vroot=yes) +if test "$use_vroot" = yes; then + AC_MSG_RESULT([defining option USE_VROOT]) + AC_DEFINE(USE_VROOT) +fi + +AC_ARG_ENABLE(allow-root, [ --disable-allow-root allows users to turn off allowroot (default is to + always allow root to be able to unlock xlock)],allow_root=$enableval,allow_root=yes) +if test "$allow_root" = yes; then + AC_MSG_RESULT([defining option ALWAYS_ALLOW_ROOT]) + AC_DEFINE(ALWAYS_ALLOW_ROOT) +fi + +case ${canonical} in + *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* ) + AC_ARG_ENABLE(vtlock, [ --enable-vtlock allows to turn on VT switch lock (default is to be + able to switch to another VT)],vtlock=$enableval,vtlock=no) + if test "$vtlock" = yes; then + AC_MSG_RESULT([defining option USE_VTLOCK]) + AC_DEFINE(USE_VTLOCK) + fi + ;; + *) + ;; +esac + +AC_ARG_ENABLE(syslog, [ --enable-syslog enable syslog logging],use_syslog=$enableval,use_syslog=no) +if test "$use_syslog" = yes; then + AC_MSG_RESULT([defining option USE_SYSLOG]) + AC_DEFINE(USE_SYSLOG) +fi + +AC_ARG_ENABLE(multiple-user, [ --enable-multiple-user enable multiple users],use_multiple_user=$enableval,use_multiple_user=no) +if test "$use_multiple_user" = yes; then + AC_MSG_RESULT([defining option USE_MULTIPLE_USER]) + AC_DEFINE(USE_MULTIPLE_USER) +fi + +AC_ARG_ENABLE(multiple-root, [ --enable-multiple-root enable multiple root users],use_multiple_root=$enableval,use_multiple_root=no) +if test "$use_multiple_root" = yes; then + AC_MSG_RESULT([defining option USE_MULTIPLE_ROOT]) + AC_DEFINE(USE_MULTIPLE_ROOT) +fi + +AC_ARG_ENABLE(window-visibility, [ --enable-window-visibility + allow a window to be displayed over xlock],use_window_visiblity=$enableval,use_window_visibility=no) +if test "$use_window_visibility" = yes; then + AC_MSG_RESULT([defining option USE_WINDOW_VISIBILITY]) + AC_DEFINE(USE_WINDOW_VISIBLITY) +fi + +AC_ARG_ENABLE(old-event-loop, [ --enable-old-event-loop some machines may still need this + (fd_set errors may be a sign)],use_old_event_loop=$enableval,use_old_event_loop=no) +if test "$use_old_event_loop" = yes; then + AC_MSG_RESULT([defining option USE_OLD_EVENT_LOOP]) + AC_DEFINE(USE_OLD_EVENT_LOOP) +fi + +dnl AC_ARG_ENABLE(vmsutils, [ --enable-vmsutils patches up old __VMS_VER < 70000000],use_vmsutils=$enableval,use_vmsutils=no) +dnl if test "$use_vmsutils" = yes; then +dnl AC_MSG_RESULT([defining option USE_VMSUTILS]) +dnl AC_DEFINE(USE_VMSUTILS) +dnl fi + +AC_ARG_ENABLE(xlockrc, [ --enable-xlockrc for unknown shadow passwd algorithm],use_xlockrc=$enableval,use_xlockrc=no) +if test "$use_xlockrc" = yes; then + AC_MSG_RESULT([defining option USE_XLOCKRC]) + AC_DEFINE(USE_XLOCKRC) +fi + +AC_ARG_ENABLE(auto-logout, [ --enable-auto-logout=time + enable auto-logout code for lab use (time in minutes)],use_auto_logout=$enableval,use_auto_logout=no) +case "x$use_auto_logout" in +x|xyes*) + AC_MSG_RESULT([defining option USE_AUTO_LOGOUT = 240 minutes]) + AC_DEFINE(USE_AUTO_LOGOUT,240) + ;; +x[[0-9]]*) + AC_MSG_RESULT([defining option USE_AUTO_LOGOUT = $enableval minutes]) + AC_DEFINE_UNQUOTED(USE_AUTO_LOGOUT,$enableval) + ;; +xno*) + ;; +*) + AC_MSG_RESULT([Warning: Illegal time value "$use_auto_logout" given]) + AC_MSG_RESULT([defining option USE_AUTO_LOGOUT = 240 minutes]) + AC_DEFINE(USE_AUTO_LOGOUT,240) + ;; +esac + +AC_ARG_ENABLE(default-auto-logout, [ --enable-default-auto-logout=time + set default-auto-logout (time in minutes)], + def_auto_logout=$enableval, + def_auto_logout=no) +case "x$def_auto_logout" in +x|xyes*) + AC_MSG_RESULT([defining option DEF_AUTO_LOGOUT = 120 minutes]) + AC_DEFINE(DEF_AUTO_LOGOUT,"120") + ;; +x[[0-9]]*) + AC_MSG_RESULT([defining option DEF_AUTO_LOGOUT = $enableval minutes]) + AC_DEFINE_UNQUOTED(DEF_AUTO_LOGOUT,"$enableval") + ;; +xno*) + ;; +*) + AC_MSG_RESULT([Warning: Illegal time value "$def_auto_logout" given]) + AC_MSG_RESULT([defining option DEF_AUTO_LOGOUT = 120 minutes]) + AC_DEFINE(DEF_AUTO_LOGOUT,"120") + ;; +esac + +AC_ARG_ENABLE(button-logout, [ --enable-button-logout=time + enable button logout for lab use (time in minutes)], + use_button_logout=$enableval, + use_button_logout=no) +case "x$use_button_logout" in +x|xyes*) + AC_MSG_RESULT([defining option USE_BUTTON_LOGOUT = 10 minutes]) + AC_DEFINE(USE_BUTTON_LOGOUT,10) + ;; +x[[0-9]]*) + AC_MSG_RESULT([defining option USE_BUTTON_LOGOUT = $enableval minutes]) + AC_DEFINE_UNQUOTED(USE_BUTTON_LOGOUT,$enableval) + ;; +xno*) + ;; +*) + AC_MSG_RESULT([Warning: Illegal time value "$use_button_logout" given]) + AC_MSG_RESULT([defining option USE_BUTTON_LOGOUT = 10 minutes]) + AC_DEFINE(USE_BUTTON_LOGOUT,10) + ;; +esac + +AC_ARG_ENABLE(default-button-logout, [ --enable-default-button-logout=time + set default-button-logout (time in minutes)], + def_button_logout=$enableval, + def_button_logout=no) +case "x$def_button_logout" in +x|xyes*) + AC_MSG_RESULT([defining option DEF_BUTTON_LOGOUT = 5 minutes]) + AC_DEFINE(DEF_BUTTON_LOGOUT,"5") + ;; +x[[0-9]]*) + AC_MSG_RESULT([defining option DEF_BUTTON_LOGOUT = $enableval minutes]) + AC_DEFINE_UNQUOTED(DEF_BUTTON_LOGOUT,"$enableval") + ;; +xno*) + ;; +*) + AC_MSG_RESULT([Warning: Illegal time value "$def_button_logout" given]) + AC_MSG_RESULT([defining option DEF_BUTTON_LOGOUT = 5 minutes]) + AC_DEFINE(DEF_BUTTON_LOGOUT,"5") + ;; +esac + +AC_ARG_ENABLE(bomb, [ --disable-bomb disable automatic logout mode], + use_bomb=$enableval, + use_bomb=yes) +if test "$use_bomb" = yes; then + AC_MSG_RESULT([defining option USE_BOMB]) + AC_DEFINE(USE_BOMB) + BOMB="" +else + BOMB="#" +fi + +AC_ARG_ENABLE(unstable, [ --enable-unstable enables starfish and bubble3d GL mode], + use_unstable=$enableval, + use_unstable=no) +if test "$use_unstable" = yes; then + AC_MSG_RESULT([defining option USE_UNSTABLE]) + AC_DEFINE(USE_UNSTABLE) + UNSTABLE="" +else + UNSTABLE="#" +fi + +AC_ARG_ENABLE(closedown-logout, [ --enable-closedown-logout + define this one or next, with enable-auto-logout,], + closedown_logout=$enableval, + closedown_logout=no) +if test "$closedown_logout" = yes; then + AC_MSG_RESULT([defining option CLOSEDOWN_LOGOUT]) + AC_DEFINE(CLOSEDOWN_LOGOUT) +fi + +AC_ARG_ENABLE(session-logout, [ --enable-session-logout enable-button-logout, and/or enable-bomb, for xdm], + session_logout=$enableval, + session_logout=no) +if test "$session_logout" = yes; then + AC_MSG_RESULT([defining option SESSION_LOGOUT]) + AC_DEFINE(SESSION_LOGOUT) +fi + +AC_ARG_ENABLE(staff-file, [ --enable-staff-file=filename + set file of staff who are exempt from auto-logout], + use_staff_file=$enableval, + use_staff_file=no) +case "x$use_staff_file" in +x|xyes*) + AC_MSG_RESULT([defining option STAFF_FILE = "/usr/remote/etc/xlock.staff"]) + AC_DEFINE_UNQUOTED(STAFF_FILE,"/usr/remote/etc/xlock.staff") + if test ! -f /usr/remote/etc/xlock.staff; then + AC_MSG_RESULT([Warning: File /usr/remote/etc/xlock.staff does not exist]) + fi + ;; +x/*) + AC_MSG_RESULT([defining option STAFF_FILE = "$enableval"]) + AC_DEFINE_UNQUOTED(STAFF_FILE,"$enableval") + if test ! -f $use_staff_file; then + AC_MSG_RESULT([Warning: File $enableval does not exist]) + fi + ;; +esac + +AC_ARG_ENABLE(staff-netgroup, [ --enable-staff-netgroup=netgroup + set netgroup of staff who are exempt from auto-logout],use_staff_netgroup=$enableval,use_staff_netgroup=no) +if test "$use_staff_netgroup" != no; then + AC_MSG_RESULT([defining option STAFF_NETGROUP = "$enableval"]) + AC_DEFINE_UNQUOTED(STAFF_NETGROUP,"$enableval") +fi + +AC_ARG_ENABLE(kerberos4, [ --enable-kerberos4 enable Kerberos 4],kerberos4=$enableval,kerberos4=no) +if test "$kerberos4" = yes; then + AC_MSG_RESULT([defining option HAVE_KRB4]) + AC_DEFINE(HAVE_KRB4) + XLOCKINC="${XLOCKINC} -I/usr/athena/include" + XLOCKLIBS="${XLOCKLIBS} -L/usr/athena/lib -lkrb -ldes" +fi + +AC_ARG_ENABLE(kerberos5, [ --enable-kerberos5 enable Kerberos 5],kerberos5=$enableval,kerberos5=no) +if test "$kerberos5" = yes; then + AC_MSG_RESULT([defining option HAVE_KRB5]) + AC_DEFINE(HAVE_KRB5) + XLOCKINC="${XLOCKINC} -I/usr/local/include" + XLOCKLIBS="${XLOCKLIBS} -L/usr/local/lib -lkrb5 -lcrypto -lcom_err" +fi + +AC_ARG_ENABLE(dce_passwd, [ --enable-dce-passwd enable DCE passwording],dce_passwd=$enableval,dce_passwd=no) +if test "$dce_passwd" = yes; then + AC_MSG_RESULT([defining option DCE_PASSWD]) + AC_DEFINE(DCE_PASSWD) + XLOCKINC="${XLOCKINC} -I/usr/include/reentrant" + XLOCKLIBS="${XLOCKLIBS} -ldce -lc_r" +fi + +AC_ARG_ENABLE(pam, [ --enable-pam enable PAM], pam=$enableval,pam=no) +if test "$pam" = yes; then + AC_MSG_RESULT([defining option PAM]) + AC_DEFINE(PAM) + XLOCKLIBS="${XLOCKLIBS} -lpam -ldl" +fi + +AC_ARG_ENABLE(afs, [ --enable-afs enable AIX AFS],afs=$enableval,afs=no) +if test "$afs" = yes; then + AC_MSG_RESULT([defining option AFS]) + AC_DEFINE(AFS) + XLOCKINC="${XLOCKINC} -I/usr/afsws/include" + case "${canonical}" in + *-*-solaris2.* ) + XLOCKLIBS="${XLOCKLIBS} -lucb -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth.krb -lprot -lubik -lauth.krb -lrxkad -lsys -ldes -lrx -llwp -lcom_err -lcmd /usr/afsws/lib/afs/util.a -laudit -lsys" + ;; + * ) + XLOCKLIBS="${XLOCKLIBS} -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth -lubik -lprot -lrxkad -lrx -llwp -lauth -lsys -ldes -lcmd -lcom_err /usr/afsws/lib/afs/util.a -laudit" + ;; + esac +fi + +AC_ARG_ENABLE(sunos_adjunct_passwd, [ --enable-sunos-adjunct-passwd + enable SUNOS Adjunct passwording],sunos_adjunct_passwd=$enableval,sunos_adjunct_passwd=no) +if test "$sunos_adjunct_passwd" = yes; then + AC_MSG_RESULT([defining option SUNOS_ADJUNCT_PASSWD]) + AC_DEFINE(SUNOS_ADJUNCT_PASSWD) +fi + +AC_ARG_ENABLE(use_mb, [ --enable-use-mb enable Xmb function series (new)],use_mb=$enableval,use_mb=no) +if test "$use_mb" = yes; then + AC_MSG_RESULT([defining option USE_MB]) + AC_DEFINE(USE_MB) +fi + +AC_ARG_ENABLE(customization, [ --enable-customization enable customization of XResource],customization=$enableval,customization=no) +if test "$customization" = yes; then + AC_MSG_RESULT([defining option CUSTOMIZATION]) + AC_DEFINE(CUSTOMIZATION) +fi + +AC_ARG_ENABLE(modules, [ --enable-modules enable modules (new and experimental)],modules=$enableval,modules=no) +if test "$modules" = yes; then + AC_MSG_RESULT([enabling xlk modules]) + MODULES="" +else + MODULES="#" +fi + +AC_ARG_ENABLE(check, [ --enable-check enable check (new and experimental)],check=$enableval,check=no) +if test "$check" = yes; then + AC_MSG_RESULT([enabling memory debug checking]) + CHECK="" +else + CHECK="#" +fi + +AC_ARG_WITH(lang, [ --with-lang=lang use a foreign language (nl/fr/de)],lang=$withval,lang=none) +case "$lang" in + nl|NL|Nl) + AC_MSG_RESULT([enabling some reporting in Dutch]) + AC_DEFINE(NL) + ;; + fr|FR|Fr) + AC_MSG_RESULT([enabling some reporting in French]) + AC_DEFINE(FR) + ;; + de|DE|De) + AC_MSG_RESULT([enabling some reporting in German]) + AC_DEFINE(DE) + ;; + none) + AC_MSG_RESULT([using default language (English)]) + ;; + *) + AC_MSG_RESULT([unknown language $lang. using default language (English)]) + ;; +esac + +AC_ARG_ENABLE(orig_xpm_patch, [ --enable-orig-xpm-patch use the original pixmap patch for mail icon + (have colormap problems in 8 bits depth visuals)], + orig_xpm_patch=$enableval, + orig_xpm_patch=no) +if test "$orig_xpm_patch" = "yes"; then + AC_MSG_RESULT([enabling original mail icon xpm patch]) + AC_DEFINE(ORIGINAL_XPM_PATCH) +fi + +if test "x$INSTPGMFLAGS" != x; then +AC_ARG_ENABLE(setuid, [ --disable-setuid disables setuid installation if automatically chosen],setuid=$enableval,setuid=yes) +case "x$setuid" in +xno*) + case ${canonical} in + *-*-linux*) + if test "$vtlock" = "yes"; then + INSTPGMFLAGS="-s -o root -g bin -m 4111" + AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock]) + echo "experimental: Big buffer overrun security risk" + else + INSTPGMFLAGS="" + AC_MSG_RESULT([no setuid/setgid install]) + fi + ;; + *) + INSTPGMFLAGS="" + AC_MSG_RESULT([no setuid/setgid install]) + ;; + esac + ;; +x|xyes*) + case ${canonical} in + *-*-linux*) + if test "$vtlock" = "yes"; then + INSTPGMFLAGS="-s -o root -g bin -m 4111" + AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock]) + else + AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS"]) + fi + ;; + *) + AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS"]) + ;; + esac + ;; +x*) + INSTPGMFLAGS=$enableval + AC_MSG_RESULT([defining install options (setuid/setgid) = "$enableval"]) + ;; +esac +else + AC_MSG_RESULT([no setuid/setgid install]) +fi + +DEPEND=makedepend +DEPEND_FLAGS= +DEPEND_DEFINES= + +XLOCKLIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 -lXext -lm" +XMLOCKLIBS="${XMLOCKLIBPATHS} ${XMLOCKLIBS} -lX11" +XALOCKLIBS="${XALOCKLIBPATHS} ${XALOCKLIBS} -lX11" +XGLOCKLIBS="${XGLOCKLIBPATHS} ${XGLOCKLIBS} ${GTK_LIBS}" +AC_SUBST(XLOCKLDFLAGS) +AC_SUBST(XMLOCKLDFLAGS) +AC_SUBST(XALOCKLDFLAGS) +AC_SUBST(XGLOCKLDFLAGS) +AC_SUBST(INSTPGMFLAGS) +AC_SUBST(GTK_CFLAGS) +AC_SUBST(XLOCKINC) +AC_SUBST(XMLOCKINC) +AC_SUBST(XALOCKINC) +AC_SUBST(XGLOCKINC) +AC_SUBST(GTK_LIBS) +AC_SUBST(XLIBS) +AC_SUBST(BITMAPTYPE) +AC_SUBST(PIXMAPTYPE) +AC_SUBST(BITMAPDIR) +AC_SUBST(PIXMAPDIR) +AC_SUBST(XLOCKLIBS) +AC_SUBST(XMLOCKLIBS) +AC_SUBST(XALOCKLIBS) +AC_SUBST(XGLOCKLIBS) +AC_SUBST(XMLOCK) +AC_SUBST(XALOCK) +AC_SUBST(XGLOCK) +AC_SUBST(XGLOCKDIR) +AC_SUBST(INSTALL_XMLOCK) +AC_SUBST(INSTALL_XALOCK) +AC_SUBST(INSTALL_XGLOCK) +AC_SUBST(UNINSTALL_XMLOCK) +AC_SUBST(UNINSTALL_XALOCK) +AC_SUBST(UNINSTALL_XGLOCK) +AC_SUBST(APPDEFAULTS) +AC_SUBST(LINT) +AC_SUBST(CHECK) +AC_SUBST(PURIFY) +AC_SUBST(XPM) +AC_SUBST(GL) +AC_SUBST(GLTT) +AC_SUBST(BOMB) +AC_SUBST(UNSTABLE) +AC_SUBST(DEPEND) +AC_SUBST(DEPEND_FLAGS) +AC_SUBST(DEPEND_DEFINES) +AC_SUBST(CXX) +AC_SUBST(CCC) + +AC_CONFIG_HEADER(config.h) +AC_OUTPUT(Makefile + xlock/Makefile + modes/Makefile + modes/glx/Makefile + xmlock/Makefile + xalock/Makefile + xglock/Makefile + ) diff --git a/configure.tcl b/configure.tcl new file mode 100755 index 00000000..9d267387 --- /dev/null +++ b/configure.tcl @@ -0,0 +1,430 @@ +#!/usr/X11/bin/wish -f +#charles vidal 1998 +# Thu Jul 30 06:21:57 MET DST 1998 +#Projet Wizard in french Assistant +#http://www.chez.com/vidalc/assist/ +# + +set nbtotalecran 4 + +# titre de l'assistant +set titleassist "Wizard configure" + +# nombre total d'ecran +#set nbtotalecran 6 + +# Declaration des variables globales +set nbwidget 0 + +# numero de l'ecran courant +set nb_ecran 0 + +set lang " " + + +proc read_pipe { command } { +set data "" +set fileid [open |$command r] +if { $fileid != "" } { + set data [read $fileid] + close $fileid + } + return $data +} + +proc action { } { +global bitmapdir +global pixmapdir +global incdir +global libdir +global soundprog +global wgcc +global wmotif +global weditres +global wpurify +global wxpm +global wopengl +global wmesagl +global wdtsaver +global wdpms +global esyslog +global emulroot +global emuluser +global eunstable +global nb_ecran +global nbtotalecran +global lang +if { $nb_ecran == [expr $nbtotalecran -1 ]} { + set commandline "./configure" + append commandline $wgcc $wpurify $wmotif $weditres $wxpm $wopengl $wmesagl $wdtsaver $esyslog $emuluser $emulroot $eunstable + if {$bitmapdir!=""} { append commandline " --enable-bitmapdir=$bitmapdir" } + if {$pixmapdir!=""} { append commandline " --enable-pixmapdir=$pixmapdir" } + if {$incdir!=""} {append commandline " --x-includes=$incdir" } + if {$libdir!=""} {append commandline " --x-libraries=$libdir" } + if {$soundprog!=""} {append commandline " --enable-def-play=$soundprog" } + append commandline " $lang" + if { [getyesno "Do you really want to launch configure"] == "yes" } { + puts $commandline + wm withdraw . + toplevel .config + frame .config.f + frame .config.f2 + button .config.f2.make -text "Make" -command { set commandline "make" + .config.f configure -cursor watch + .config.f2 configure -cursor watch + .config.f2.exit configure -cursor watch + .config.f.t configure -cursor watch + .config.f.t insert insert "Please wait..." + update + set toto [read_pipe $commandline] + .config.f configure -cursor arrow + .config.f.t configure -cursor xterm + .config.f.t insert insert $toto + .config.f2 configure -cursor arrow + .config.f2.exit configure -cursor arrow + } + button .config.f2.install -text "Make Install" -command { set commandline "make install" + .config.f configure -cursor watch + .config.f2 configure -cursor watch + .config.f2.exit configure -cursor watch + .config.f.t configure -cursor watch + .config.f.t insert insert "Please wait..." + update + set toto [read_pipe $commandline] + .config.f configure -cursor arrow + .config.f.t configure -cursor xterm + .config.f.t insert insert $toto + .config.f2 configure -cursor arrow + .config.f2.exit configure -cursor arrow + } + button .config.f2.exit -text "Exit" -command exit + scrollbar .config.f.s -orient vertical -command {.config.f.t yview} + pack .config.f -side left -expand yes -fill y + pack .config.f.s -side right -fill y + text .config.f.t -yscrollcommand {.config.f.s set} -wrap word -width 50 -height 10 \ + -setgrid 1 + pack .config.f.t + pack .config.f.t -expand yes -side right -fill both + pack .config.f -side top -expand yes -fill both + pack .config.f2 -side bottom + # pack .config.f2.make .config.f2.install .config.f2.exit -side left + pack .config.f2.exit + .config.f configure -cursor watch + .config.f2 configure -cursor watch + .config.f2.exit configure -cursor watch + .config.f.t configure -cursor watch + .config.f.t insert insert "Please wait..." + update + set toto [read_pipe $commandline] + .config.f configure -cursor arrow + .config.f.t configure -cursor xterm + .config.f.t insert insert $toto + .config.f2 configure -cursor arrow + .config.f2.exit configure -cursor arrow + } + } else exit +} +# +# get a dialog yes ok +# +proc getyesno { text } { +return [ tk_messageBox -parent . -title {Launch Configure} -type yesno\ + -icon warning \ + -message $text ] +} + +proc OutputEcran { n } { +global nomuser +global nomreel +global homedir + switch $n { + } +} + +proc InputEcran { n } { +global nomuser +global homedir + switch $n { + } +} +# titre de l'assistant +set titleassist "Assistant xxxx" + +set tmpfnt "" + +global tmpfnt + +# nombre total d'ecran +#set nbtotalecran 6 + +# Declaration des variables globales +set nbwidget 0 + +# numero de l'ecran courant +set nb_ecran 0 + + +proc openfont { var } { +upvar $var toto +global tmpfnt + toplevel .font + set Fnt .font + wm title $Fnt "Font Options" + label $Fnt.label -text "ABCDEFGH\nIJKabedfg\nhijkmnopq" + + frame $Fnt.frame -borderwidth 10 + frame $Fnt.frame2 -borderwidth 10 + set w $Fnt.frame + label $w.msg0 -text "Font Options" + pack $w.msg0 -side top + eval exec "xlsfonts \> /tmp/xlsfont.tmp" + set f [open "/tmp/xlsfont.tmp"] + listbox $Fnt.frame.names -yscrollcommand ".font.frame.scroll set" \ + -xscrollcommand "$Fnt.scroll2 set" -setgrid 1 \ + -exportselection false + bind $Fnt.frame.names { + .font.test configure -font [.font.frame.names get [.font.frame.names curselection]] + set tmpfnt [.font.frame.names get [.font.frame.names curselection]] + } + scrollbar $Fnt.frame.scroll -orient vertical -command ".font.frame.names +yview" \ + -relief sunken -borderwidth 2 + scrollbar $Fnt.scroll2 -orient horizontal -command "$Fnt.frame.names xview" \ + -relief sunken -borderwidth 2 + while {[gets $f line] >= 0} { + $Fnt.frame.names insert end $line + } + close $f + + eval exec "/bin/rm -f /tmp/xlsfont.tmp" + pack $Fnt.frame.names -side left -expand y -fill both + pack $Fnt.frame.scroll -side right -fill both + pack $Fnt.frame -fill x + pack $Fnt.scroll2 -fill both + label $Fnt.test -text "ABCDEFGHIJKabedfghijkmnopq12345" + pack $Fnt.test + + button $Fnt.frame2.cancel -text Cancel -command "destroy $Fnt" + button $Fnt.frame2.ok -text OK -command "set $var $tmpfnt; destroy $Fnt" + pack $Fnt.frame2.ok $Fnt.frame2.cancel -side left -fill both + pack $Fnt.frame2 -fill both +} +proc opencolorsel {titre var wf } { +upvar $var toto +set toto [tk_chooseColor -title $titre] + $wf.label configure -foreground $toto +} +proc openfilesel { var } { +upvar $var toto +set toto [ tk_getOpenFile -parent .] +} + +proc OutputEcran { n } { +global nomuser +global nomreel +global homedir + switch $n { + } +} + +proc InputEcran { n } { +global nomuser +global homedir + switch $n { + } +} + +# Callback pour revenir a l'ecran precedent +proc prec_ecran { } { +global nbtotalecran +global nb_ecran +set tmp [expr $nb_ecran - 1] +if { $tmp > -1} { + OutputEcran $nb_ecran + pack forget .f$nb_ecran + set nb_ecran [expr $nb_ecran - 1] + InputEcran $nb_ecran + pack .f$nb_ecran + } +if { $nb_ecran != [expr $nbtotalecran - 1 ]} { + .f.b3 configure -text "Cancel" + } +} + +# Callback pour aller a l'ecran suivant +proc next_ecran { } { +global nb_ecran +global nbtotalecran +if { $nb_ecran == [expr $nbtotalecran - 1 ]} { + .f.b3 configure -text "Finish" + } +if { $nb_ecran != [expr $nbtotalecran - 1 ]} { + .f.b3 configure -text "Cancel" + } +set tmp [expr $nb_ecran + 1] +if { $tmp < $nbtotalecran} { + OutputEcran $nb_ecran + pack forget .f$nb_ecran + set nb_ecran [expr $nb_ecran + 1] + InputEcran $nb_ecran + pack .f$nb_ecran + } +} + +# Creation du label titre et du texte explicatif +# Argument n:numero de l'ecran title:titre desc description + +proc creationscreennb { n title desc icon} { +set currentarg 0 +frame .f$n -height 10 -width 10 +image create bitmap image$n -file bitmaps/$icon +label .f$n.lt$n -text $title -font -Adobe-Courier-Bold-R-Normal-*-140-* +label .f$n.li$n -image image$n +pack .f$n.lt$n .f$n.li$n +frame .f$n.fdesc +message .f$n.mesg -text $desc -width 25c +pack .f$n.mesg -fill x +pack .f$n.fdesc +} + +# Creation de deux label + entry avec variable texte +# Argument n:numero de l'ecran label1:label devant texte vtext1:variable text +# De meme pour les xxxx2 + +proc creationentry { n nbf text variable value} { + frame .f$n.fr$nbf + label .f$n.fr$nbf.lab1 -text $text + entry .f$n.fr$nbf.e1 -textvariable $variable + .f$n.fr$nbf.e1 insert 0 $value + pack .f$n.fr$nbf + pack .f$n.fr$nbf.e1 -side right + pack .f$n.fr$nbf.lab1 -side left +} + +proc mkecran { n args } { + global nbwidget + set nbf 0 + set w .f$n + foreach i $args { + switch -regexp [lindex $i 0] { + LIST { listbox $w.list$nbwidget + pack $w.list$nbwidget + } + ENTRY { + creationentry $n $nbwidget [lindex $i 1] [lindex $i 2] [lindex $i 3] + } + LABEL { label $w.label$nbwidget -text [lindex $i 1] + pack $w.label$nbwidget + } + CHECK { checkbutton $w.check$nbwidget -text [lindex $i 1] -variable [lindex $i 2] -onvalue [lindex $i 3] \ +-offvalue [lindex $i 4] + pack $w.check$nbwidget + } + RADIO { + frame $w.fr$nbwidget + image create photo [lindex $i 4] -file [lindex $i 5] + label $w.fr$nbwidget.labrad -image [lindex $i 4] + radiobutton $w.fr$nbwidget.radio$nbwidget -text [lindex $i 1] -variable [lindex $i 2] -value [lindex $i 3] + pack $w.fr$nbwidget.labrad $w.fr$nbwidget.radio$nbwidget -side left + pack $w.fr$nbwidget + } + BUTTON { button $w.button$nbwidget -text [lindex $i 1] + pack $w.button$nbwidget + } + SCALE { scale $w.scale$nbwidget -from [lindex $i 1] -to [lindex $i 2] -orient +horizontal + pack $w.scale$nbwidget + } + FILE { + frame $w.frame$nbwidget + set wf $w.frame$nbwidget + label $wf.label -text [lindex $i 1] + entry $wf.entry -textvariable [lindex $i 2 ] + $wf.entry insert 0 [lindex $i 3] + button $wf.button -text "File" -command +"openfilesel [lindex $i 2]" + pack $wf + pack $wf.label $wf.entry $wf.button +-side left + } + COLOR { + frame $w.frame$nbwidget + set wf $w.frame$nbwidget + if { [lindex $i 4] !="" } then { label $wf.label -text [lindex $i 1] -foreground [lindex +$i 4] + } else { label $wf.label -text [lindex $i 1] } + entry $wf.entry -textvariable [lindex $i 2 ] + $wf.entry insert 0 [lindex $i 4] + button $wf.button -text "Color" -command "opencolorsel [lindex $i 3] [lindex $i +2] $wf" + pack $wf + pack $wf.label $wf.entry $wf.button -side left + } + FONT { + frame $w.frame$nbwidget + set wf $w.frame$nbwidget + label $wf.label -text [lindex $i 1] + entry $wf.entry -textvariable [lindex $i 2 ] + $wf.entry insert 0 [lindex $i 3] + button $wf.button -text "Font" -command +"openfont [lindex $i 2] " + pack $wf + pack $wf.label $wf.entry $wf.button +-side left + } + } + set nbwidget [expr $nbwidget + 1] + } +} +# +# +# --with-lang=lang use a foreign language (de/fr/nl) +creationscreennb 0 "wizard configure xlockmore" "This should help you to +build xlockmore" m-xlock.xbm +mkecran 0 \ +{CHECK "without gcc " wgcc " --without-gcc" "" }\ +{CHECK "with-purify " wpurify " --with-purify" "" }\ +{CHECK "without motif " wmotif " --without-motif" ""}\ +{CHECK "without editres" weditres " --without-editres" ""}\ +{CHECK "without xpm " wxpm " --without-xpm" ""}\ +{CHECK "without opengl " wopengl " --without-opengl" "" }\ +{CHECK "without mesagl " wmesagl " --without-mesagl" "" }\ +{CHECK "without dtsaver" wdtsaver " --without-dtsaver" "" }\ +{CHECK "without dpms " wdpms " --without-dpms" "" }\ + { } +creationscreennb 1 "Wizard configure image path" "please enter the image path" m-xlock.xbm +mkecran 1 \ +{ENTRY "Bitmap dir" bitmapdir }\ +{ENTRY "Pixmaps dir" pixmapdir }\ +{ENTRY "sound player program" soundprog }\ +{CHECK "enable syslog logging " esyslog " --enable-syslog" "" }\ +{CHECK "enable multiple users " emuluser " --enable-multiple-user" "" }\ +{CHECK "enable multiple root users " emulroot " --enable-multiple-root" "" }\ +{CHECK "enable unstable " eunstable " --enable-unstable" "" }\ + { } +creationscreennb 2 "Wizard configure include and library path" "Please enter the path" m-x11.xbm +mkecran 2 \ +{ENTRY "path of X include " incdir }\ +{ENTRY "path of X library " libdir }\ +{ENTRY "user executables in " bindir }\ +{ENTRY "system admin executables in" bindir }\ +{ENTRY "system admin executables in" sbindir }\ +{ENTRY "program executables in " libexecdir }\ +{ENTRY "info documentation in " infodir }\ +{ENTRY "man documentation in " mandir }\ +{ENTRY "find the sources in " srcdir }\ + { } +creationscreennb 3 "Wizard configure language" "Please choice your language " m-xlock.xbm +mkecran 3 \ +{RADIO "Dutch " lang " --with-lang=nl" fdutch etc/gif/nlflag.gif}\ +{RADIO "English " lang " " fenglish etc/gif/ukflag.gif}\ +{RADIO "French " lang " --with-lang=fr" ffrench etc/gif/frflag.gif}\ +{RADIO "German " lang " --with-lang=de" fgerman etc/gif/deflag.gif}\ +{} +frame .f +button .f.b1 -text "Previous" -command "prec_ecran" +button .f.b2 -text "Next" -command "next_ecran" +button .f.b3 -text "Cancel" -command "action" +pack .f.b1 .f.b2 .f.b3 -side left +pack .f -side bottom +pack .f0 diff --git a/docs/3d.howto b/docs/3d.howto new file mode 100644 index 00000000..536fb22f --- /dev/null +++ b/docs/3d.howto @@ -0,0 +1,43 @@ + + Introduction to 3d modes + Henrik Theiling + + +This is a short introduction to how you could try to see the 3d effects +in xlock: + +- You will need glasses with one lens red and the other blue (or green). + The blue (or green) one needs to be in front of the left eye, the red one + in front of the right one. If you have got differently coloured lenses + (like green) you can try to adjust the colours by using the switches + -right3d and -left3d . + + If you do not see any 3d effect, try to change the -delta3d value. + +- Adjust the colour of your screen (or use -right3d/-left3d instead). Most + likely if you use the green colours will be too bright so you can see them + through the red lens, too. + +- Let the program display in blue for the green lens. You should still be + able to see blue through your green lens, but less likely through your + red lens. + +- Try to zoom in from a completely dark screen. + +- Try different 3d modes. Some people see `rock' more easily, others `worm'. + It depends. + +I hope you enjoy it. + +Currently the following modes are implemented for 3d view: + rock, worm, bouboule, pyro. + +BUGS: + Some of the 3d modes are not implemented with real 3d. They try to + use a close approach. + Rock, pyro and bouboule use real 3d calculations. + In the worm mode, worms can not just creep to the bottom or the top. That + means they do not have a real 3d direction but one 2d direction (the same + as in 2d mode) and an additional 1d direction for the z-axis. This could + be fixed. + diff --git a/docs/HACKERS.GUIDE b/docs/HACKERS.GUIDE new file mode 100644 index 00000000..94bc0945 --- /dev/null +++ b/docs/HACKERS.GUIDE @@ -0,0 +1,576 @@ + + + The xlock Hacker's Guide + Ron Hitchens + + +INTRODUCTION + + This document is meant to serve as a guide for those who wish to hack +xlock; to make changes, add new modes, fix bugs, etc. The intent is to +explain non-obvious things about how the various pieces of xlock +are organized, to help the casual hacker avoid common coding mistakes +and to stay away from "off limits" parts of xlock. + + +What Is Xlock? + + Xlock is an application for the X Window system which will cover up +one or more X screens to prevent access. It may be run manually by a +user to lock the display or, more commonly, xlock may be run automatically +by a daemon utility after a period of inactivity. + + Xlock creates a "blanket" window to cover the entire screen, and also +grabs the X server to prevent access by external clients. When the +user presses a key or clicks a mouse button, xlock will prompt for a +password. When the proper password is provided, xlock releases the +server and removes its blanket window. + + While xlock has the display locked, it runs one or more "modes" which +are code modules that draw various things on the xlock window. These +modes act as screen savers. They attempt to provide amusing and/or +entertaining displays, while avoiding static imagery which could lead +to screen phosphor "burn-in". + + The xlock application began life at Sun Microsystems many years +ago. It was written by Patrick J. Naughton and was much simpler then. +That original xlock is almost ubiquitous in the X Windows world. This +distribution, known as xlockmore, is maintained by David Bagley and +is not officially connected with the original xlock, (although it +received Patrick's blessing). Major enhancements have been made to +xlock - many, many new modes have been added and significant structural +changes have been made. This document will attempt to inform you of +how xlock is structured and how the pieces fit together. + + +ORGANIZATION + + Xlock is organized into two basic parts: the "mainline" code, which +handles startup, window creation, passwords, etc, and the modes, +which are self-contained modules that draw things on the window(s) +provided by the mainline code. + + The code which makes up an xlock mode is accessed through a few +well-defined callback functions, or "hooks". The mode should not +concern itself with anything not provided to it via these hooks. +As of the xlockmore-3.8 release, these hooks have been restructured +to provide all the environmental information a mode needs to do its +task. Prior to this, it was necessary for the modes to access global +variables. This is no longer condoned, it is now strongly suggested +that modes only trust the passed-in information. These globals will +probably go away once all the naive modes have been updated. + + +MAINLINE CODE + + The mainline xlock code is concerned with preventing unauthorized +access to the X server and creating the environment in which the modes +run. It also calls the hooks for the current mode in response to +external events and timing intervals. The mainline code keeps track +of the clock and determines when to make calls to a mode. + + < unfinished > + +MODES + + The primary focus of this document is writing and maintaining +modes. The remainder will be concerned with how to write a mode, +how a mode accesses the display, what a mode should not do, etc. + + +HOOKS + + Xlock modes are driven entirely through their externally visible +hook functions. There are currently five hooks defined, with a sixth +reserved for future expansion. The first two, init and callback, are +the same as in older versions of xlock. The release, refresh and +change hooks are new to xlockmore-3.8: + + o init This hook will be called to prepare a mode for running. + The mode should allocate resources, establish its + initial state, etc. This hook may be called + multiple times, and the window and/or screen + values may be different each time. + + o callback This is the main driver hook for a mode. It + is called repeatedly, at a time interval determined + by defaults or command line arguments. A mode sees + each call as one "tick", it may chose to do something + on every tick, or count the calls and only update + the screen periodically. A mode should not spend a + lot of time executing the callback function. If it + has a lot of screen updating to do, it should spread + the work across multiple calls. A mode can depend + on the init hook being called at least once before + the callback hook is called. But it should not depend + on the callback hook ever being called following an init. + + o release This hook will be called when some other mode is + about to be initialized, or when xlock is shutting + down. This hook should free up any long-lived, + dynamically allocated resources the mode has acquired. + This would include memory and X resources, such as + Pixmaps and GCs. + + o refresh This hook is called when the drawing window may have + been damaged. It should take steps to repaint the + window. No information about which part(s) of the + window have been damaged is provided. The mode should + repaint the entire window. If no refresh hook is + provided, the init hook will be called when a refresh + is needed. + + o change This hook is called when the user requests a change. + In the current implementation, this is when the user + clicks the middle mouse button. This hook is currently + only used by the random mode, it means to move on to + the next mode (random mode runs other modes as slaves). + A mode is free to interpret a change request in any + way it likes. The logical thing is to start over, + change colors, etc. + + +Calling Conventions + + The prototype for a mode hook is defined in mode.h, and looks like +this: + + void mode_hook (ModeInfo *mode_info) + + The argument, a pointer to a ModeInfo structure, contains +all the context information a mode needs to run. Writers of new modes +are strongly encouraged to acquire all information they need through +this handle. + + A ModeInfo handle is provided to every hook type. The information +in this structure is current ONLY AT THE TIME THE HOOK IS CALLED. The +structure it points to is volatile and the pointer should not be cached +by the mode. It is also important to note that xlock may be locking +several screens simultaneously. The window information may not be the +same across subsequent calls to the same callback function. Use the +information provided, do not look at globals, and do not stash the pointer. + + +The Init Hook + + A mode's init hook will be called whenever the mainline code wants +to inform a mode it is about to run on a particular window. The mainline +xlock code will only run one mode at a time, but it may be running that +mode on several screens at once. It is therefore possible for the init +hook to be called several times, each with a different window context, +before its callback hook is run. An init hook should not assume the +window provided is the window to be used by the next call to the +callback hook. Depending on the nature of the mode, it may be +necessary to maintain several sets of state information, one for each +screen. + + The number of active screens, and the maximum possible number of +screens are provided in the ModeInfo struct. Modes are encouraged +to look at this information and allocate data structures dynamically. +The number of active screens will not change during an xlock run. +A global symbol, MAXSCREENS, is defined in xlock.h but programmers +are strongly urged not to use this or any other fixed value. If +you use only the information passed to the hooks, your code will +always be correct. + + An init hook should also be prepared to be called at any time. The +mainline xlock code changes window configuration in response to user +input, and may call the init hook in place of a missing refresh hook. +An init hook should therefore not expect to be balanced with a call +to the release hook. The init hook should not allocate resources on +each call, it should track its allocations to make sure they are only +done once. + + Neither should an init hook depend on the callback hook ever being +called. It's possible a call to the init hook may be followed by another +call to the init hook, or a call to the release hook without an intervening +call to the callback hook. + + An init hook may be called twice in a row, and will be if more than +one screen is being locked. To avoid unexpected glitches on-screen, +it is recommended that you do not draw anything to the screen during +the init hook. Save the drawing for the callback hook, with appropriate +status information if an initial screen paint is needed. + + Be careful not to blindly do dynamic allocations in your init hook, +keep track of your allocations and only do the necessary state reset +each time. Track your allocations so they can be undone by the release +hook at a later time. + + The init hook will be called for each screen before the callback +hook is called for any screen. + + +The Callback Hook + + The callback hook is the method by which a mode runs. The mainline +code calls a mode's callback hook periodically, usually on a fixed time +schedule, and checks for user input between each call. + + The time interval between calls to the callback hook is set by a +field in the LockStruct entry for the mode (see mode.h and mode.c). +This value may also be set by the user on the command line, or via +an X resource. The mainline code attempts to keep the time interval +between the *beginning* of each call constant. The time spent executing +the mode's callback hook is subtracted from the interval to keep the +ticks as constant as possible. This is hardly perfect, but an effort +is made to remain as accurate as is possible on a multi-tasking system. + + A mode should therefore not spend a large amount of time executing +in the callback hook. While in the callback, the mainline code cannot +respond to external events from the user. It is preferable for a +callback hook to do a little bit of the work on each call, rather than +a complete update each time. + + A callback should pay attention to the context information passed +to it. On multi-headed displays, the callback may be called successively +for each screen on the display. It may be necessary to maintain +state information which is indexed by the given screen number, rather +than simply using local static variables. + + The screen number is provided by the ModeInfo argument and will +range from 0 to n, where n is the number of active screens minus one. +There will always be a screen 0. A mode wishing to paint the same +imagery one each screen should do the same thing each time the callback +is called, and advance its state when the screen number is 0. However, +the window may not be the same size on every screen. Do not assume it is. + + A call to the callback hook is not guaranteed following an init call +for a given screen, but at least one init call is guaranteed before the +first callback call. If the window size changes, as when the icon +window is presented to prompt for the password, an init call +will be made with the new window information. A mode should +always use the window information passed to it rather than caching +information passed to the init hook, but it can use the information +passed to the init hook to setup its own data structures and rely +on the information matching the next callback call, *for that screen*. + + +The Release Hook + + This hook is new to release 3.8. The release hook will be called by +the mainline code when it is about to call the init hook of another mode, +and your init hook has been called at least once since the last call +to your release hook. + + The release hook should undo any dynamic allocations done by the +init hook, or anything else that needs to be done to make the mode +inactive. Once the release hook returns, the mode is marked as not +initialized. If your mode is never initialized again, no further +calls to any of its hooks will be made. The release hook is where +you must surrender any resources that only your mode knows about. + + The release hook is called ONLY ONCE. It will not be called +for each screen like most of the other hooks. A mode should not +access any of the window information, other that the display handle +and number of active screens. + + Once the release hook has been called the mode is considered +to be inactive, the same as if it had never been run at all. + + < Final call at shutdown?? > + + +The Refresh Hook + + This hook is new to release 3.8. The refresh hook is called when +the mainline suspects the window may have been damaged. + + When running in "inwindow" mode (xlock runs in a plain window, not locking) +this may happen when windows are shuffled by the user. It may also happen +when in normal full-screen mode and some new window appears on the display. +In this case, xlock immediately pushes itself to the top, to cover the +new window. However, the temporary appearance of the new window may +have left a "hole" on the display. The refresh hook should take steps +to repaint the entire display whenever it is called. + + It will also be called when the window is first mapped. However, +a mode should not depend on a refresh call to do its initial screen +paint. When running random mode, other modes will be stopped and started +on the same window, with no intervening refresh call. A mode should +usually do a full paint on the first callback following an init call. +It is a good strategy to have the refresh hook simply set a status flag +(or whatever) to cause the next callback call to do a full repaint. This +would be similar to an init, but internal state would not be reset. + + If no refresh hook is provided for your mode (configured in mode.c), +then your init hook will be called in place of the refresh hook. The +refresh hook is provided so your mode can repair window damage +without losing the internal state of the mode. + + As of this writing, there is a hack in place which will prevent a +second call to the init hook (in place of a refresh) if the callback +hook has not been called since the last init call for that screen. +This causes undesirable behavior in some naive modes. It is expected +this hack will be removed. Modes should be prepared for their init +hooks to be called at any time, even repeatedly. + + +The Change Hook + + This hook is new to release 3.8. It is called when the user requests +a change. This is currently in response to a click on the middle mouse +button. + + In the case of random mode, which runs other modes, it means to +move on to the next mode without waiting for the time to expire. Other +modes are free to interpret this call in way they choose. If no change +hook is provided for a mode, no action will be taken when the middle mouse +button is clicked. + + This hook will be called once for each active screen when a change +request is made. + + +Hook Calling Sequence + + A typical sequence of calls when running on two screens would be: + + init [screen 0] + init [screen 1] + refresh [screen 0] (caused by first mapping the window) + refresh [screen 1] + callback [screen 0] + callback [screen 1] + callback [screen 0] + callback [screen 1] + ... + refresh [screen 0] (caused by window damage) + refresh [screen 1] + callback [screen 0] + callback [screen 1] + ... + init [screen 0] (switch to icon screen) + callback [screen 0] + callback [screen 1] + ... + + +HANDS OFF THOSE GLOBALS + + All the environmental information a mode needs is provided to the +hook functions via the ModeInfo passed as an argument. But prior to +the restructuring done in xlockmore-3.8, much of this information +had to be accessed directly from global variables. Listed here are +the globals which correspond to the information passed in ModeInfo. +You should not access these variables directly (they will go away), +nor should you use these names for local variables. The first column +is the global name, the second column is the macro to use to get +the same information from the ModeInfo argument (see mode.h): + + These variables pertain to the X screen + dsp MI_DISPLAY handle to the X server display. + screen MI_SCREEN Current screen number + Scr MI_PERSCREEN perscreen struct ptr for curr screen + Scr[n].gc MI_GC gc handle for current screen + Scr[n].npixels MI_NPIXELS num available pixels for curr screen + Scr[n].cmap MI_CMAP colormap handle for current screen + Scr[n].pixels MI_PIXELS pixel array for current screen + Scr[n].pixels[i] MI_PIXEL a given pixel in the pixel array + + These variables control execution, set by cmd line or resources + delay MI_DELAY time (microsecs) between callbacks + batchcount MI_BATCHCOUNT batchcount value + cycles MI_CYCLES cycles value + saturation MI_SATURATION colormap saturation value + + These variables are booleans, usually set by cmd line: + mono MI_IS_MONO use only B&W (can be set for color) + inwindow MI_IS_INWINDOW running in regular window + inroot MI_IS_INROOT running in the root window + + The MI_IS_MONO flag will be true if the global "mono" is set +(which can be specified on the command line for color displays) or +if the screen is a monochrome device. It IS possible to have both +color and monochrome screens at the same time. Use the passed-in +information on a screen-by-screen basis, do not assume they are all +the same. + + There are several other global booleans in resource.c. These will +probably be eliminated in future releases. Do not access them directly. +They should not be of interest to a mode anyway, but be careful not to +use those names in your own code. + + +PLUGGING A NEW MODE INTO XLOCK + + The code making up a mode should be self-contained. A mode should +hide all of its internal variables and functions. Only the hook functions +and one configuration variable should be visible outside the module +the mode is defined in. Because there are some many code modules +compiled into xlock, written by many different people, the chance +of naming conflicts is quite high. Keep all your local stuff local. + + The nexus where the mainline xlock code connects to the individual +modes is in the file mode.c. It contains an array of pre-initialized +LockStruct structures named LockProcs. This struct is currently +defined as: + + typedef struct LockStruct_s { + char *cmdline_arg; /* mode name */ + ModeHook *init_hook; /* func to init a mode */ + ModeHook *callback_hook; /* func to run (tick) a mode */ + ModeHook *release_hook; /* func to shutdown a mode */ + ModeHook *refresh_hook; /* tells mode to repaint */ + ModeHook *change_hook; /* user wants mode to change */ + ModeHook *unused_hook; /* for future expansion */ + ModeSpecOpt *msopt; /* this mode's def resources */ + int def_delay; /* default delay for mode */ + int def_batchcount; + int def_cycles; + float def_saturation; + char *desc; /* text description of mode */ + int flags; /* state flags for this mode */ + void *userdata; /* for use by the mode */ + } LockStruct; + + Of these fields, the hooks and msopt are defined in the mode itself. +The hooks are names of functions which are called as previously described. +Init and callback hooks are required, all others are optional. +Any hooks not provided are specified as NULL. The field "msopt" is +a pointer to a ModeSpecOpt struct (xlock.h). Every mode must define +one of these structures and make it globally visible to mode.c. This +structure provides a handle to X resource information that allows +for parsing command line arguments unique to your mode and setting +static variables private to your mode. + << unfinished, see random.c for an example >> + + The remaining fields of the LockStruct struct are defined directly +in the array in mode.c. The fields with the names def_* are the default +values to be used when running this mode, if not overridden by command +line arguments of resources. + + The field def_delay controls how often the callback hook is called +(specified in microseconds). + + The floating point number def_saturation controls the saturation of +the colormap to allocate. This controls how the color ramp is +populated (<>) + + The other two default values, def_batchcount and def_cycles, are +for use by the mode. They can be used to control how many thingys +to draw at once, how often to restart, etc. These values can be +specified at run time which allows the user to affect how a mode runs. + + The text pointers cmdline_arg and desc are used when printing +command line help. They provide the simple name and a more verbose +short description. + + The flags field should always be set to zero, it is used internally +to keep track of state information. + + The last field, userdata, is for use by the mode. The mode may use +this generic pointer for any purpose it likes. The mainline code will +never touch it and it will be available to all subsequent hook calls. +This value will survive init - release - init cycles. + + +GETTING INFORMATION FROM ModeInfo + + The ModeInfo structure is defined in mode.h. It contains several +types of information and is actually made up of several other structs. +This structure is likely to undergo major revision in future releases, +so macros are provided to access all the fields. Use the macros, +things are guaranteed to change. + + Of the fields available in ModeInfo, most are copies of the same +information available in the globals described above. But some are new. +Most notably, the window dimensions and black/white pixel values are +now provided, so there is no need to make direct X library calls to +get this information yourself. + + There is also some provision for a future debugging facility to +fake multiple screens by using multiple regular windows. This +code is not yet implemented. When it is, the number returned by +the MI_SCREEN macro may not correspond to a real X screen. As of +this writing, MI_SCREEN and MI_REAL_SCREEN always contain the same +value. Use MI_SCREEN as an index to track which window you are +drawing to, use MI_REAL_SCREEN when calling X Windows functions +which require actual screen numbers. The MI_SCREENPTR pointer +will always be valid, but identical for all faked screens. + + The ModeInfo structure also provides a pointer to the LockStruct +record that corresponds to the mode. DO NOT MODIFY THIS STRUCTURE. +This is provided so that you can see what your compiled in defaults +where for delay, batchcount, cycles and saturation. You can also +get your own name and description and access the userdata field (it's +ok to modify userdata, do not change anything else, use the macros). + + All fields should be considered read-only, except MI_USERDATA +and MI_PAUSE. MI_USERDATA is not used by the mainline code, you +can use any way you like and its value will be preserved. However, +the MI_PAUSE field is special. MI_PAUSE is examined up upon return +from your callback hook. If it is not zero (it will be set zero +before the call) it is interpreted as a time, in microseconds, to +delay before making the next callback. + + The MI_PAUSE mechanism is somewhat of a hack, and it is expected +to change in future revisions of xlock. Most probably it will be +moved out of the ModeInfo struct and the callback return value will +specify the delay value. This one-time pause mechanism is also +broken for multiple screens. It is only noticed on the highest +numbered screen. Future revisions of xlock will (hopefully) fix this, +but for now you can see how it works by looking at the code for maze +or triangle. + + +EXAMPLE + + <> + + The eyes mode (eyes.c) was written by the same author that did +the majority of the restructuring for the new mode interface. It +should (hopefully) serve as a good example of a properly written +mode. It makes use of the new refresh and release hooks. The +random mode (random.c) will also illustrate the change hook and +private resources. The triangle mode (triangle.c) has also been +updated to use the new scheme. It uses the MI_PAUSE mechanism to +sleep between scenes. + +------------------------ + + The official xlockmore maintainer is David Bagley. He can be +reached at bagleyd@bigfoot.com. The current release of xlockmore +is available by anonymous ftp at ftp.x.org in /contrib/applications. +Alpha versions are available at +ftp://ftp.tux.org/pub/X-Windows/xlockmore/index.html + + The restructuring of the calling mechanism for mode hooks was +done by Ron Hitchens . + +------------------------ + + This document written by Ron Hitchens +It is still very rough and incomplete. What you see here is +basically the first draft, brain-dump version. It needs to be +polished to make it more readable, condensed to make it less +redundant and organized to make it more cogent. But it's a start. +Hopefully, this will eventually be converted to LaTeX. When +I get some time... + + +Last Update: +Mon Mar 18 03:46:16 MST 1996 + + +OK now you got a working mode $file. What auxiliary files are there to change? +$file.c mode.c mode.h You must have changed already +modes/random.c If its a special mode or gl mode +modes/Makefile.in make.com modes/Imakefile Makefiles +modes/glx/Imakefile If it is a gl mode +xlock/XLock.ad Resource file +xlock/xlock.man The manual +xmlock/modes.h Motif launcher file (description) +xalock/modes.h Athena launcher file +etc/xlock.tcl TCL lanuncher file +etc/xlockFrame.java Java lanuncher file +etc/system.fvwm2rc.xlock fvwm2 menu +etc/system.fvwmrc.xlock fvwm menu +etc/system.olwmrc.xlock Openwin menu +etc/system.mwmrc.xlock Motif menu +etc/system.wmrc.xlock GNU WindowMaker menu +etc/dtscreen.dt Screensaver actions for CDE (descr) +etc/dtprofile CDE profile +docs/Revisions Give credit +docs/xlock.html Web reformat of manual (generated) +docs/xlock.hlp VMS reformat of manual (generated) diff --git a/docs/HACKERS.GUIDE.fr b/docs/HACKERS.GUIDE.fr new file mode 100644 index 00000000..8cc42061 --- /dev/null +++ b/docs/HACKERS.GUIDE.fr @@ -0,0 +1,286 @@ +I translate a part of the HACKER.DOC in french +first in text +second in html +bye +-- +charles / \ +vidal / ..|\ + (_\ |_)vidalc@club-internet.fr + / \@' + / \ http://www.chez.com/vidalc + _ / ` | +\\/ \ | _\ + \ /_ || \\ + \____)|_) \_) +----------------------------------------- +LA DOC DU BIDOUILLEUR + +INTRODUCTION +________________________________________________________________________________ + +Ce document est pour tous ceux qui veulent modifier xlock (more), ajouter de +nouveaux modes, debugger , etc.... + +xlock kesako ? + +xlock est une application pour X-windows qui empˆche l'accŠs d'un ou plusieurs +‚crans. Il peut ˆtre envoy‚ manuellement ou plus commun‚ment envoy‚ +automatiquement par un d‚mon aprŠs une p‚riodes d'inactivit‚. +Xlock cr‚‚ une fenˆtre couvrant entiŠrement l'‚cran, et capte tous ‚v‚nements +pr‚venant ainsi l'accŠs ext‚rieur. +Quand une touche est press‚e alors xlock affiche un message mais aussi le mode +dans une icone +(MODE_ICONIQUE) et demande votre mot de passe. +Lorsque l'‚cran est lock‚ ( ferm‚ ), des images, des dessins, ou des animations +sont affich‚es servant de screen-saver ‚vitant la d‚gradation du phosphore. +Xlock fut d‚velopp‚ chez Sun Micro System par Pack J Naughton.David Bagley l'a +repris et maintenu sous le nom de Xlockmore dans lequel d'innombrable mode ont +‚t‚ ajout‚, ainsi que la possibilit‚ d'afficher un mode dans une fenˆtre et +aussi sur la root window. + +________________________________________________________________________________ +ORGANISATION GENERALE + +xlock est organiser en deux partie. + +1. le traitement de la ligne de commande, la cr‚ation de fenˆtre, le mot de +passe, etc ... + +2 les modes: ils peuvent ˆtre coder de tel maniŠre qu'il n'y a pas besoin de +faire appel Â… X pour la taille de la fenˆtre, les couleurs ... +Une API est comprise dans xlock pour avoir tout les renseignements en ce qui +concerne l'‚cran. +C'est dans cette partie que vous allez pouvoir ajouter d'autres modes. + +L'architecture logiciel d'un mode est structur‚ en 4 sortes de fonctions: + +-init: +celle-ci devra ˆtre appelle pour pr‚parer le d‚roulement d'un mode. Le mode +devra initialiser des tables de sinus +par exemple, allouer des ressources, m‚moire entre autre, ‚tablir l'‚tat initial +par des variables etc. ... +Cette fonction peut ˆtre appel‚ plusieurs fois et la fenˆtre ou l'‚cran peuvent avoir des taille diff‚rentes. + +-callback: +C'est la principale fonction, c'est la que est implement‚ le corps du mode. + Elle est appel‚ p‚riodiquement. + Cette fonction ne doit pas occuper beaucoup de temps a s'ex‚cuter. +Cette fonction peut etre appele dans deux contextes diff‚rents: + plein ‚cran ou en version icon. La fonction MI_IS_ICONIC vous dira dans +quelle contexte on se trouve. + +-release: +Ici, cette fonction sera appel‚ si un autre mode est appel‚ ( random , et bouton +droit ), ou si xlock se termine. +Dans cette fonction, il faut d‚sallouer la m‚moire, X ressource, Pixmaps et +graphics context. + +-refresh: + Celle ci est appel‚ lorsque le dessin peut ˆtre abim‚. Le mode doit repeindre +l'ensemble de la fenˆtre. + +-change: ???? + + + +________________________________________________________________________________ +CONVERSION: +Le prototype de ces fonctions est d‚fini dans mode.h et ressemble Â…: + void typefonction _mode( ModeInfo *mode_info) +La structure mode_info est en lecture seule, et contient l'ensemble des +informations sur l'‚cran. +Ne regardez pas les variables globales, n'‚crasez pas ce pointeur. +Au lieu de faire des requetes pour connaÂŒtre le num‚ro de la couleur blanche +etc... , il y a des fonctions propres a xlock: utilisez les. + + + + +________________________________________________________________________________ +L'AJOUT D'UN NOUVEAU MODE: + +Ajoutons un nouveau mode appel‚ fadeplot: +Pour ce faire il faut d'abords ajouter dans mode.h +® extern ModeHook init_fadeplot; +extern ModeHook draw_fadeplot; +extern ModeHook release_fadeplot; +extern ModeHook refresh_fadeplot; ¯ +les fonctions qui vont ˆtre cr‚‚s. + +® extern ModeSpecOpt fadeplot_opts; ¯ +une structure qui ne m'a pas r‚v‚l‚ tous ces secrets. + +mais aussi dans mode.c Â… cot‚ des autres fonctions , dans ce que j'appelle la + tableau des modes: + {"fadeplot", init_fadeplot, draw_fadeplot, release_fadeplot, + refresh_fadeplot, init_fadeplot, NULL, &blank_opts, 17000, 1, 20, 1.0, + "fadeplot", 0, NULL}, + +On passe ensuite Â… l'impl‚mentation des fonctions proprement dit dans un fichier +que l'on appellera fadeplot.c. +Il est ‚vident qu'il faudra modifier le Makefile ( Pour cela je vous laisse +faire :). + +Dans ces fonctions, Â… partir de la structure ModeInfo, on va obtenir des +informations sur l'‚cran qui sont indispensables pour la suite + +MI_WIDTH(mi) et MI_HEIGHT(mi) vont nous donn‚ la taille de l'‚cran. +Display *display = MI_DISPLAY(mi); d‚livre le display +Window window = MI_WINDOW(mi); d‚livre l'identificateur de la fenˆtre +GC gc = MI_GC(mi); donne le graphics context courant +XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + Mettre la couleur du trac‚ en noir +XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + Mettre la couleur du trac‚ en blanc + +MI_IS_ICONIC(mi) permet de savoir si on est pass‚ en phase + password. +NUMCOLORS Donne le nombre de couleur + + +Oubliez pas aprŠs avoir dessin‚ l'ensemble de faire Xflush(display), +ce qui permettra d'afficher r‚ellement votre graphisme sur l'‚cran. +La cr‚ation d'un nouveau mode s'‚ffectue souvent en r‚cup‚rant le squelette +d'un autre et de le modifier Â… sa volont‚. +N'h‚sitez pas a Â… regarder le code des autres modes, c'est souvent tr‚s +instructifs. +Dernierement on peut utiliser la librairie mesa (la libraire GNU OpenGL de +silicon Graphics) dans xlock. +Voila j'espere que vous prendrez plaisir a ajouter des nouveaux modes Â… xlock, + un petit conseil le mainteneur de xlock est un fan de casse tˆte et compagnie. +Bon Xlock. + +Charles VIDAL: vidalc@club-internet.fr +mode flag, fadeplot, circle +createur de xmxlock : GUI launcher de xlockmore. + +------------------------------------------------------ + + + +Xlock french hacker + + +

XLOCK FRENCH HACKER

+
+

INTRODUCTION

+
+Ce document est pour tous ceux qui veulent modifier xlock (more), ajouter de nouveaux modes, debugger , etc.... + +

xlock kesako ?

+ +xlock est une application pour X-windows qui empêche l’accès d’un ou plusieurs écrans. Il peut être envoyé manuellement ou plus communément envoyé automatiquement par un démon après une périodes d’inactivité. + Xlock créé une fenêtre couvrant entièrement l’écran, et capte tous événements prévenant ainsi l’accès extérieur. +Quand une touche est pressée alors xlock affiche un message mais aussi le mode dans une icone (MODE_ICONIQUE) et demande votre mot de passe.

+Lorsque l’écran est locké ( fermé ), des images, des dessins, ou des animations sont affichées servant de screen-saver évitant la dégradation du phosphore. +Xlock fut développé chez Sun Micro System par Pack J Naughton.David Bagley l’a repris et maintenu sous le nom de Xlockmore dans lequel d’innombrable mode ont été ajouté, ainsi que la possibilité d’afficher un mode dans une fenêtre et aussi sur la root window ou d’afficher sequentiellement plusieur mode par l’option random et par l’appuis du bouton du millieu.

+Il existe des terminaux X avec plusieur ecrans gere par un seul terminal, alors le même mode s’affichera sur plusieur ecran. On peut toutefois faire des effets, comme une balle passant de lui a l’autre. + +


+

ORGANISATION GENERALE

+ +xlock est organiser en deux partie.

+ +

    +
  1. le traitement de la ligne de commande, la création de fenêtre(s), le mot de passe, etc ... +
  2. les modes: ils peuvent être coder de tel manière qu’il n’y a pas besoin de faire appel à X pour la taille de la fenêtre, les couleurs ... Une API est comprise dans xlock pour avoir tout les renseignements en ce qui concerne l’écran.C’est dans cette +
+
+L’architecture logiciel d’un mode est structuré en 4 sortes de fonctions: +
    +
  • -init: +celle-ci devra être appelle pour préparer le déroulement dÂ’un mode. Le mode devra initialiser des tables de sinus par exemple, allouer des ressources, mémoire entre autre, établir l’état initial par des variables etc. ... +Cette fonction peut être appelé plusieurs fois et la fenêtre ou l’écran peuvent avoir des taille différentes.

    + +

  • -callback: +CÂ’est la principale fonction, cÂ’est la que est implementé le corps du mode. Elle est appelé périodiquement. Cette fonction ne doit pas occuper beaucoup de temps a sÂ’exécuter surtout si elle a plusieur ecran sÂ’occuper. +Cette fonction peut etre appele dans deux contextes différents: + plein écran ou en version icon. La fonction MI_IS_ICONIC vous dira dans quelle contexte on se trouve. +la fonction init_mode est toujours appelle avant la fonction callback. +On peut choisir de faire quelque chose a chaque appelle, ou de compter le nombre dÂ’appelle, et puis de modifier lÂ’ecran periodiquement.

    + +

  • -release: +Ici, cette fonction sera appelé si un autre mode est appelé ( random , et bouton droit ), ou si xlock se termine. Dans cette fonction, il faut désallouer la mémoire, X ressource, Pixmaps et graphics context. +

    +

  • -refresh: + Celle ci est appelé lorsque le dessin peut être abimé. Le mode doit repeindre lÂ’ensemble de la fenêtre. +Aucun information sur la partie de lÂ’ecran endomage nÂ’est delivre. +

    +

  • -change: Dans la version courante, seule le mode random utilise cette fonctionnalite. Cet fonction est appele lorsque que lÂ’on change de mode par lÂ’appuie du boutton du millieu. Il est laisse a lÂ’imagination de chacun en ce qui conserne +
+ + +
+

CONVENTION:

+Le prototype de ces fonctions est défini dans mode.h et ressemble à:

+

void typefonction _mode( ModeInfo *mode_info)
+La structure mode_info est en lecture seule, et contient l’ensemble des informations sur l’écran. Ne regardez pas les variables globales, n’écrasez pas ce pointeur. Au lieu de faire des requetes pour connaître le numéro de la couleur blanche etc... , il y a des fonctions propres a xlock: utilisez les. Si vous utilisez les informations passe en parametre des fonctions du modes ( voir ci dessus ), votre code sera toujours correcte. +Le temps entre chaque appelle de fonctions est en milliseconde. + +
+

LÂ’AJOUT DÂ’UN NOUVEAU MODE:

+ +Ajoutons un nouveau mode appelé
fadeplot:

+Pour ce faire il faut dÂ’abords ajouter dans mode.h

+« extern ModeHook init_fadeplot;

+extern ModeHook draw_fadeplot;

+extern ModeHook release_fadeplot;

+extern ModeHook refresh_fadeplot; »

+les fonctions qui vont être créés. +

+« extern ModeSpecOpt fadeplot_opts; »

+une structure qui ne m’a pas révélé tous ces secrets.

+ +mais aussi dans mode.c à coté des autres fonctions , dans ce que j’appelle le tableau des modes:

+ {"fadeplot", init_fadeplot, draw_fadeplot, release_fadeplot, + refresh_fadeplot, init_fadeplot, NULL, &blank_opts, 17000, 1, 20, 1.0, + "fadeplot", 0, NULL},

+ +On passe ensuite à l’implémentation des fonctions proprement dit dans un fichier que l’on appellera fadeplot.c.

+Il est évident qu’il faudra modifier le Makefile ( Pour cela je vous laisse faire :).

+Dans ces fonctions, à partir de la structure ModeInfo ( mode.h ) , on va obtenir des informations sur l’écran qui sont indispensables pour la suite.

+ + + +. + + +; + + + + + + +
fonction
MI_WIDTH(mi) et MI_HEIGHT(mi) vont nous donné la taille de l’écran
Display *display = MI_DISPLAY(mi); délivre le display
MI_SCREEN délivre le screen
Window window = MI_WINDOW(mi)délivre l’identificateur de la fenêtre
GC gc = MI_GC(mi); donne le graphics context courant
MI_DELAY donne le delai (microsec.) entre callbacks
MI_CMAP donne la table des couleurs
XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); Mettre la couleur du tracé en noir
XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); Mettre la couleur du tracé en blanc
MI_IS_ICONIC(mi) permet de savoir si on est passé en phase password.
+ + + + + + + +
variable
MI_IS_MONO lÂ’ecran est monochrome
MI_IS_INWINDOW le mode sÂ’affiche dans un fenetre reguliere
MI_IS_INROOT le mode sÂ’affiche sur la root windows
NUMCOLORS Donne le nombre de couleur
+ + +Oubliez pas après avoir dessiné l’ensemble de faire Xflush(display), ce qui permettra d’afficher réellement votre graphisme sur l’écran. +La création d’un nouveau mode s’éffectue souvent en récupérant le squelette d’un autre et de le modifier à sa volonté. +N’hésitez pas a à regarder le code des autres modes, c’est souvent trés instructifs. +


+

Perspective:

+Dernierement on peut utiliser la librairie mesa (la libraire OpenGL de silicon GNU) dans xlock, quelquÂ’un sÂ’est propose de faire le screen-saver tube de Win NT. +Je pense quÂ’il serait interressant de joindre a xlock un langage simple ( genre logo un peu plus evolue). +
+

Reference:

+HACKERS.GUIDE qui se trouve dans le repertoire docs ( jÂ’ai essaye de le traduire :)

+ X_Window programmation avec les Xt-Intrinsics Douglas A YOUNG MASSON PARIS.

+


+Voila j’espere que vous prendrez plaisir a ajouter des nouveaux modes à xlock; c’est une maniere de programmer facilement des graphismes sous X11. Un petit conseil le mainteneur de xlock est un fan de casse tête et compagnie. +Bon Xlock. +

+Charles VIDAL: vidalc@club-internet.fr

+mode flag, fadeplot, bubble

+createur de xmxlock : GUI launcher de xlockmore.

+ + + diff --git a/docs/Purify b/docs/Purify new file mode 100644 index 00000000..d3cc9b8d --- /dev/null +++ b/docs/Purify @@ -0,0 +1,46 @@ +New Purify problems + +Solved? +starfish line 208, 209, 517 4 (65 spline) + make_starfish [starfish.c:208] make_spline [spline.c:69] + make_starfish [starfish.c:209] + init_starfish [starfish.c:517] +kumppa solved? + +Unsolved + draw1_starfish [starfish.c:365] compute_closed_spline [spline.c:260] + ... grow_spline_points [spline.c:97] + +bubble3d create_new_bubbles b_draw 167 + glb_bubble_new [bubble3d.c:103] + glb_draw_init [b_draw.c:53] + +------------------------------------------ + + +Old Purify Problems (problems are now marked in code with "PURIFY") + +--- +Summary of unresolved memory problems with xlockmore-4.03 +cartoon - Possible 29756 byte memory leak from XPutImage +swirl - Possible 256 byte memory leak from XPutImage +life - Possible 132 byte memory leak from XPutImage +There are also some uninitialized memory reads that appear to be internal +to X11. +--- + + +SOLVED since xlockmore-4.08 +resource.c - 1 byte memory leak (Fixed since the Purify reports) + +SOLVED since xlockmore-4.02 +memory leaks: galaxy.c, life3d.c + +MesaGL 2.3 fixes many cumulative leaks and uninitialized memory reads that +existed in MesaGL 2.2. This affected all GL modes. MesaGL 2.3 or newer is +recommended since it fixes these memory leaks and runs faster. Cumulative +means that the memory leaks occur each time the mode is run when in random +mode, which is why after some time it may crash xlock since it runs out of +available memory. + +Thanks to Tom Schmidt for the solaris and sunos purify logs. diff --git a/docs/Purify.solaris b/docs/Purify.solaris new file mode 100644 index 00000000..b9769320 --- /dev/null +++ b/docs/Purify.solaris @@ -0,0 +1,617 @@ +Content-Type: text/plain; charset=us-ascii; name="xlock.plog.sun4os5" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline; filename="xlock.plog.sun4os5" + +**** Purify instrumented xlock/xlock (pid 24202 at Thu Feb 26 08:05:25 1998) + * Purify 4.0.1 Solaris 2, Copyright (C) 1992-1996 Pure Atria Corp. All rights reserved. + * For contact information type: "purify -help" + * For TTY output, use the option "-windows=no" + * Command-line: xlock/xlock -sequential -duration 15 + * Options settings: -chain-length=25 -windows=yes -purify \ + -purify-home=/vol/pure/purify-4.0.1-solaris2 + * Purify checking enabled. + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + GetDatabase [Xrm.c] + XrmGetFileDatabase [Xrm.c] + parsefilepath [resource.c:1092] + getResources [resource.c:1390] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3c109c in the heap. + * Address 0x3c109c is 4 bytes into a malloc'd block at 0x3c1098 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmGetFileDatabase [Xrm.c] + parsefilepath [resource.c:1092] + getResources [resource.c:1390] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + GetDatabase [Xrm.c] + XrmGetFileDatabase [Xrm.c] + parsefilepath [resource.c:1092] + getResources [resource.c:1390] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3c109c in the heap. + * Address 0x3c109c is 4 bytes into a malloc'd block at 0x3c1098 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmGetFileDatabase [Xrm.c] + parsefilepath [resource.c:1092] + getResources [resource.c:1390] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XReply [XlibInt.c] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + * Reading 68 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0aa9 uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + GetDatabase [Xrm.c] + XrmGetStringDatabase [Xrm.c] + getResources [resource.c:1463] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3e4c04 in the heap. + * Address 0x3e4c04 is 4 bytes into a malloc'd block at 0x3e4c00 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmGetStringDatabase [Xrm.c] + getResources [resource.c:1463] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + GetDatabase [Xrm.c] + XrmGetStringDatabase [Xrm.c] + getResources [resource.c:1463] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3e4c04 in the heap. + * Address 0x3e4c04 is 4 bytes into a malloc'd block at 0x3e4c00 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmGetStringDatabase [Xrm.c] + getResources [resource.c:1463] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + XrmCombineDatabase [Xrm.c] + getResources [resource.c:1466] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3e4c04 in the heap. + * Address 0x3e4c04 is 4 bytes into a malloc'd block at 0x3e4c00 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmGetStringDatabase [Xrm.c] + getResources [resource.c:1463] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + XrmCombineDatabase [Xrm.c] + getResources [resource.c:1525] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3c4064 in the heap. + * Address 0x3c4064 is 4 bytes into a malloc'd block at 0x3c4060 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmQPutStringResource [Xrm.c] + XrmParseCommand [ParseCmd.c] + getResources [resource.c:1521] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + XrmDestroyDatabase [Xrm.c] + getResources [resource.c:1598] + main [xlock.c:2086] + _start [crt1.o] + * Reading 4 bytes from 0x3c109c in the heap. + * Address 0x3c109c is 4 bytes into a malloc'd block at 0x3c1098 of 16 bytes. + * This block was allocated from: + malloc [rtlib.o] + NewDatabase [Xrm.c] + XrmGetFileDatabase [Xrm.c] + parsefilepath [resource.c:1092] + getResources [resource.c:1390] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XReply [XlibInt.c] + _XQueryFont [XFont.c] + XLoadQueryFont [XFont.c] + main [xlock.c:2140] + _start [crt1.o] + * Reading 92 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0afb uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XReply [XlibInt.c] + XGrabKeyboard [XGrKeybd.c] + GrabKeyboardAndMouse [xlock.c:518] + main [xlock.c:2501] + _start [crt1.o] + * Reading 428 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0b21 uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XReply [XlibInt.c] + XParseColor [XParseCol.c] + allocPixel [color.c:116] + fixColormap [color.c:182] + init_random [random.c:496] + call_init_hook [mode.c:813] + justDisplay [xlock.c:1681] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 428 bytes from 0x3e0aa8 in the heap (2 bytes at 0x3e0c52 uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read (6059 times): + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XReply [XlibInt.c] + XSync [XSync.c] + runMainLoop [xlock.c:1111] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 476 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0c5d uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + XFlush [XFlush.c] + getPassword [xlock.c:1508] + lockDisplay [xlock.c:1878] + main [xlock.c:2522] + _start [crt1.o] + * Reading 816 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0c81 uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + XFlush [XFlush.c] + draw_ball [ball.c:471] + call_callback_hook [mode.c:842] + draw_random [random.c:536] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 1008 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0df9 uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read (1008 times): + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + PutImageRequest [XPutImage.c] + PutSubImage [XPutImage.c] + XPutImage [XPutImage.c] + draw_point [swirl.c:1128] + draw_swirl [swirl.c:1361] + call_callback_hook [mode.c:842] + draw_random [random.c:536] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 2040 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0b0f uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read (412 times): + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + XDrawPoint [XDrPoint.c] + draw_mandelbrot [mandelbrot.c:420] + call_callback_hook [mode.c:842] + draw_random [random.c:536] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 2048 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0acb uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read (4 times): + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XReply [XlibInt.c] + XParseColor [XParseCol.c] + allocPixel [color.c:116] + fixColormap [color.c:182] + draw_random [random.c:528] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 412 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0c3b uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read: + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + _XFlushGCCache [XCrGC.c] + XDrawPoint [XDrPoint.c] + draw_mandelbrot [mandelbrot.c:419] + call_callback_hook [mode.c:842] + draw_random [random.c:536] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 2044 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0abb uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +UMR: Uninitialized memory read (7 times): + * This is occurring while in: + _libc_write [libc.so.1] + _XFlushInt [XlibInt.c] + XDrawPoint [XDrPoint.c] + draw_mandelbrot [mandelbrot.c:419] + call_callback_hook [mode.c:842] + draw_random [random.c:536] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Reading 2036 bytes from 0x3e0aa8 in the heap (1 byte at 0x3e0abb uninit). + * Address 0x3e0aa8 is at the beginning of a malloc'd block of 2048 bytes. + * This block was allocated from: + malloc [rtlib.o] + XOpenDisplay [XOpenDis.c] + open_display [resource.c:1211] + getResources [resource.c:1457] + main [xlock.c:2086] + _start [crt1.o] + +**** Purify instrumented xlock/xlock (pid 24202) **** +Current file descriptors in use: 9 +FIU: file descriptor 0: +FIU: file descriptor 1: +FIU: file descriptor 2: +FIU: file descriptor 4: "/etc/.name_service_door", O_RDONLY + * File info: ?r--r--r-- 1 root root 0 Nov 10 10:53 + * This file descriptor was allocated from: + _libc_open [libc.so.1] + _nsc_trydoorcall [libc.so.1] + getpwuid_r [libc.so.1] + fullLock [logout.c:467] + getResources [resource.c:1615] + main [xlock.c:2086] + _start [crt1.o] +FIU: file descriptor 5: "/usr/local/xlock.staff", O_RDONLY + * File info: -rw-r--r-- 1 root other 18 Feb 26 08:04 + * File position: 18 + * This file descriptor was allocated from: + _libc_open [libc.so.1] + _endopen [fopen.c] + fopen [libc.so.1] + my_fopen [utils.c:182] + fullLock [logout.c:476] + getResources [resource.c:1615] + main [xlock.c:2086] + _start [crt1.o] +FIU: file descriptor 6: "/dev/udp", O_RDWR + * File info: c--------- 0 root root 0 Feb 26 08:05 + * File position: 0 + * This file descriptor was allocated from: + _libc_open [libc.so.1] + t_open [t_open.c] + clnt_tli_create [clnt_generic.c] + load_dom_binding [yp_bind.c] + check_binding [yp_bind.c] + __yp_dobind [yp_bind.c] + yp_match [yp_match.c] + _nss_nis_ypmatch [nss_nis.so.1] + _nss_nis_lookup [nss_nis.so.1] + getbyname [getspent.c] + nss_search [libc.so.1] + getspnam_r [libc.so.1] + my_passwd_entry [passwd.c:378] + getUserName [passwd.c:502] + initPasswd [passwd.c:1796] + main [xlock.c:2101] + _start [crt1.o] +FIU: file descriptor 7: "/usr/openwin/lib/X11/Xcms.txt", O_RDONLY + * File info: -rw-rw-r-- 1 root bin 2528 Mar 21 1996 + * File position: 2528 + * This file descriptor was allocated from: + _libc_open [libc.so.1] + _endopen [fopen.c] + fopen [libc.so.1] + LoadColornameDB [XcmsColNm.c] + _XcmsLookupColorName [XcmsColNm.c] + _XcmsResolveColorString [XcmsColNm.c] + XParseColor [XParseCol.c] + allocPixel [color.c:116] + fixColormap [color.c:182] + main [xlock.c:2402] + _start [crt1.o] +FIU: file descriptor 26: +FIU: file descriptor 27: + +**** Purify instrumented xlock/xlock (pid 24202) **** +Purify: Searching for all memory leaks... + +Memory leaked: 3618 bytes (0.0225%); potentially leaked: 0 bytes (0%) + +MLK: 1024 bytes leaked at 0x3e85c8 + * This memory was allocated from: + malloc [rtlib.o] + _nss_files_XY_all [nss_files.so.1] + nss_search [libc.so.1] + getspnam_r [libc.so.1] + my_passwd_entry [passwd.c:378] + getUserName [passwd.c:502] + initPasswd [passwd.c:1796] + main [xlock.c:2101] + _start [crt1.o] + +MLK: 1024 bytes leaked at 0x3ed3f0 + * This memory was allocated from: + malloc [rtlib.o] + _nss_files_XY_all [nss_files.so.1] + nss_search [libc.so.1] + getspnam_r [libc.so.1] + my_passwd_entry [passwd.c:378] + getCryptedUserPasswd [passwd.c:724] + initPasswd [passwd.c:1809] + main [xlock.c:2101] + _start [crt1.o] + +MLK: 1024 bytes leaked at 0x404148 + * This memory was allocated from: + malloc [rtlib.o] + _nss_files_XY_all [nss_files.so.1] + nss_search [libc.so.1] + getspnam_r [libc.so.1] + getCryptedRootPasswd [passwd.c:874] + initPasswd [passwd.c:1812] + main [xlock.c:2101] + _start [crt1.o] + +MLK: 528 bytes leaked in 6 blocks + * This memory was allocated from: + malloc [rtlib.o] + calloc [rtlib.o] + XCreateImage [XImUtil.c] + init_flag [flag.c:419] + call_init_hook [mode.c:813] + draw_random [random.c:534] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + _start [crt1.o] + * Block of 88 bytes (6 times); last block at 0x3ee5c0 + +MLK: 16 bytes leaked at 0x3f3d60 + * This memory was allocated from: + malloc [rtlib.o] + _get_iobuf [des_crypt.c] + des_crypt [libcrypt_i.a] + checkPasswd [passwd.c:1103] + getPassword [xlock.c:1580] + lockDisplay [xlock.c:1878] + main [xlock.c:2522] + _start [crt1.o] + +MLK: 1 byte leaked at 0x3bd890 + * This memory was allocated from: + malloc [rtlib.o] + GetResource [resource.c:982] + getResources [resource.c:1431] + main [xlock.c:2086] + _start [crt1.o] + +MLK: 1 byte leaked at 0x400208 + * This memory was allocated from: + malloc [rtlib.o] + GetResource [resource.c:982] + getResources [resource.c:1577] + main [xlock.c:2086] + _start [crt1.o] + +Purify Heap Analysis (combining suppressed and unsuppressed blocks) + Blocks Bytes + Leaked 12 3618 + Potentially Leaked 2 16400 + In-Use 313 16025182 + ---------------------------------------- + Total Allocated 327 16045200 + +**** Purify instrumented xlock/xlock (pid 24202) **** + * Program exited with status code 0. + * 19 access errors, 7504 total occurrences. + * 3618 bytes leaked. + * 0 bytes potentially leaked. + * Basic memory usage (including Purify overhead): + 3258076 code + 520628 data/bss + 25788416 heap (peak use) + 4192 stack + * Shared library memory usage (including Purify overhead): + 75078 libsocket.so.1_pure_p3_c0_401_551 (shared code) + 4096 libsocket.so.1_pure_p3_c0_401_551 (private data) + 617030 libnsl.so.1_pure_p3_c0_401_551 (shared code) + 65176 libnsl.so.1_pure_p3_c0_401_551 (private data) + 7628 libposix4.so.1_pure_p3_c0_401_551 (shared code) + 432 libposix4.so.1_pure_p3_c0_401_551 (private data) + 654898 libX11.so.4_pure_p3_c0_401_551 (shared code) + 14112 libX11.so.4_pure_p3_c0_401_551 (private data) + 97156 libXext.so.0_pure_p3_c0_401_551 (shared code) + 2140 libXext.so.0_pure_p3_c0_401_551 (private data) + 135721 libm.so.1_pure_p3_c0_401_551 (shared code) + 5872 libm.so.1_pure_p3_c0_401_551 (private data) + 802689 libc.so.1_pure_p3_c0_401_551 (shared code) + 34804 libc.so.1_pure_p3_c0_401_551 (private data) + 1200 libdl.so.1_pure_p3_c0_401_551 (shared code) + 0 libdl.so.1_pure_p3_c0_401_551 (private data) + 2729 libinternal_stubs.so.1 (shared code) + 208 libinternal_stubs.so.1 (private data) + 15141 libintl.so.1_pure_p3_c0_401_551 (shared code) + 1304 libintl.so.1_pure_p3_c0_401_551 (private data) + 16092 libmp.so.1_pure_p3_c0_401_551 (shared code) + 828 libmp.so.1_pure_p3_c0_401_551 (private data) + 37917 libw.so.1_pure_p3_c0_401_551 (shared code) + 1628 libw.so.1_pure_p3_c0_401_551 (private data) diff --git a/docs/Purify.sunos b/docs/Purify.sunos new file mode 100644 index 00000000..feea43c7 --- /dev/null +++ b/docs/Purify.sunos @@ -0,0 +1,133 @@ +Content-Type: text/plain; charset=us-ascii; name="xlock.plog.sun4os4" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline; filename="xlock.plog.sun4os4" + +**** Purify instrumented xlock/xlock (pid 25527 at Wed Feb 25 17:02:40 1998) + * Purify 4.0.1 SunOS 4.1, Copyright (C) 1992-1996 Pure Atria Corp. All rights reserved. + * For contact information type: "purify -help" + * For TTY output, use the option "-windows=no" + * Command-line: xlock/xlock -sequential + * Options settings: -chain-length=25 -windows=yes -purify \ + -purify-home=/vol/pure/purify-4.0.1-sunos4 + * Purify checking enabled. + +**** Purify instrumented xlock/xlock (pid 25527) **** +Current file descriptors in use: 7 +FIU: file descriptor 0: +FIU: file descriptor 1: +FIU: file descriptor 2: +FIU: file descriptor 4: "/usr/local/xlock.staff", O_RDONLY + * File info: -rw-r--r-- 1 root staff 15 Apr 18 1997 + * File position: 15 + * This file descriptor was allocated from: + open [rtlib.o] + _endopen [libc.so.1.8] + fopen [libc.so.1.8] + my_fopen [utils.c:182] + fullLock [logout.c:476] + getResources [resource.c:1615] + main [xlock.c:2086] + start [crt0.o] +FIU: file descriptor 5: , O_RDWR + * This file descriptor was allocated from: + socket [rtlib.o] + clntudp_bufcreate [libc.so.1.8] + load_dom_binding [libc.so.1.8] + _yp_dobind_soft [libc.so.1.8] + _yp_dobind [libc.so.1.8] + yp_match [libc.so.1.8] + getnamefromyellow [libc.so.1.8] + matchuid [libc.so.1.8] + getpwuid [libc.so.1.8] + fullLock [logout.c:467] + getResources [resource.c:1615] + main [xlock.c:2086] + start [crt0.o] +FIU: file descriptor 26: +FIU: file descriptor 27: + +**** Purify instrumented xlock/xlock (pid 25527) **** +Purify: Searching for all memory leaks... + +Memory leaked: 442 bytes (0.00378%); potentially leaked: 29756 bytes (0.255%) + +MLK: 440 bytes leaked in 5 blocks + * This memory was allocated from: + malloc [rtlib.o] + calloc [rtlib.o] + XCreateImage [libX11.so.4.3] + init_flag [flag.c:419] + call_init_hook [mode.c:813] + draw_random [random.c:534] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + start [crt0.o] + * Block of 88 bytes (5 times); last block at 0x123b008 + +MLK: 1 byte leaked at 0x39e6e0 + * This memory was allocated from: + malloc [rtlib.o] + GetResource [resource.c:982] + getResources [resource.c:1431] + main [xlock.c:2086] + start [crt0.o] + +MLK: 1 byte leaked at 0x400540 + * This memory was allocated from: + malloc [rtlib.o] + GetResource [resource.c:982] + getResources [resource.c:1577] + main [xlock.c:2086] + start [crt0.o] + +PLK: 29756 bytes potentially leaked at 0x3cc610 + * This memory was allocated from: + malloc [rtlib.o] + _XAllocScratch [libX11.so.4.3] + dX__SendZImage [libX11.so.4.3] + dX__PutImageRequest [libX11.so.4.3] + dX__PutSubImage [libX11.so.4.3] + XPutImage [libX11.so.4.3] + put_cartoon [cartoon.c:232] + draw_cartoon [cartoon.c:374] + call_callback_hook [mode.c:842] + draw_random [random.c:536] + call_callback_hook [mode.c:842] + runMainLoop [xlock.c:1107] + justDisplay [xlock.c:1698] + lockDisplay [xlock.c:1875] + main [xlock.c:2522] + start [crt0.o] + +Purify Heap Analysis (combining suppressed and unsuppressed blocks) + Blocks Bytes + Leaked 8 454 + Potentially Leaked 1 29756 + In-Use 299 11660442 + ---------------------------------------- + Total Allocated 308 11690652 + +**** Purify instrumented xlock/xlock (pid 25527) **** + * Program exited with status code 0. + * 0 access errors, 0 total occurrences. + * 442 bytes leaked. + * 29756 bytes potentially leaked. + * Basic memory usage (including Purify overhead): + 3233296 code + 531096 data/bss + 23630080 heap (peak use) + 2224 stack + * Shared library memory usage (including Purify overhead): + 335872 libX11_pure_p3_c0_401_413V.so.4.3 (shared code) + 40960 libX11_pure_p3_c0_401_413V.so.4.3 (private data) + 688128 libc_pure_p3_c0_401_413V.so.1.8 (shared code) + 16384 libc_pure_p3_c0_401_413V.so.1.8 (private data) + 8192 libdl.so.1.0 (shared code) + 8192 libdl.so.1.0 (private data) + 8192 libinternal_stubs.so.1.0 (shared code) + 8192 libinternal_stubs.so.1.0 (private data) + * Memory mapped usage: + 4096 mmap'd at 0xef298000 diff --git a/docs/Revisions b/docs/Revisions new file mode 100644 index 00000000..9ffa94e9 --- /dev/null +++ b/docs/Revisions @@ -0,0 +1,1745 @@ +xlockmore-4.13 as of 08 March 1999, the maintained version of xlock +Adapted from Patrick J. Naughton's original xlock + +I have significantly less time to maintain this but I try. +If someone has some free time and wants to take over... let me know. +(Help is always appreciated too ;) ). + +Primary site: ftp://ftp.tux.org/pub/tux/bagleyd/xlockmore +Secondary site: ftp://ftp.x.org/contrib/applications +Web page: http://www.tux.org/~bagleyd/xlockmore.html +Maintainer: David A. Bagley + +Majordomos: Mail to majordomo@tux.org with just +subscribe [choice] [your-email-address] + in the body. + choice brief description + ------ ----------------- + xlock-beta Xlock beta and production announcements + xlock-alpha Xlock alpha ("daily") release announcements + xlock Xlock/Xlockmore development discussion + If there is trailing signature junk, just put "end" as the last line to + be read. If you need help just put "help" in the body. + +Please send all bug reports to bagleyd@bigfoot.com . +Alpha versions may be available through web page or ftp site. +Adapted from Patrick J. Naughton's original xlock, with lots of help + from others. + +BUGS to fix and other stuff to do see docs/TODO. + +[ +Things I would like to see in the next full release version: + text3d: twisting inversely related to line length. + have text3d do nothing if it cant find its fonts (I do not like it + calling blank.) + time stuff in text3d + maybe dclock and marquee could be combined too? + a separate -message3d for text3d + configure.in should be condensed. Its getting out of hand. + loop needs a mechanism to realize when the picture is nolonger changing + More work should be done for the different visuals... I heard that + VisualDepthMask taken out of vis.c it seems to work better + to get a PseudoColor visual one a root window of 24 bits. +] + +4.13 + kumppa patch (kumppa wrote only to the right quarter of the screen) and + make.com fix thanks to Jouk Jansen + lyapunov array bounds read error fixed. + New option "-/+description" on by default. Now can turn off description + of mode above password window. + crystal and tetris more xscreensaver more compatible (did not test it + using xscreensaver). + PAM ignored allowroot option, fixed by Sven Paas . + Bernd 'Bing' Leibing fixed a compile bug + for logout.c that I introduced in 4.12. + I got a patch from Andrew Sumner . This provides a + a way (simple edits to mode.h) to excluding unwanted modes. This is a + global change to all modes (especially random) except the blank mode. + Also affected are mode.c and mode.h. + Lost bees now caught in flow thanks to original author Tim Auckland + . This caused problems on VMS and probably + would happen on BSD systems. + lypapunov mode added. It is really slow. The way it is now -count is + set at 600 (4000 is recommended for a high quality picture but this + takes a real long time). So far its only available as a unstable mode. + Needs a way to speed it up (Sci Am recommends a table of logarithms). + Now with random forcing strings. (Hexadecimal representation shown with + -verbose). + Fixes for invert for pgcc compiler thanks to Tomasz Sulej + . + Thanks to Dan Stromberg for his update to + mandelbrot. It now does subregions. + lament problems with multiscreens fixed and kumppa problems fixed by + David Hansen . He also noticed problems with + life1d.c (SEGV'd in a malloc from XCreateGC), I have not been able to + duplicate the problem). + Found bug in xjack. When in small window a divide by zero would occur. + Taken out of unstable. + Thanks to Jouk Jansen his new tetris mode. + It now extensively remodeled after altris. [More needs to be done, + grep on "Future"]. Taken out of unstable. + Thanks to Tom Schmidt various fixes and leaks to + rubik, lament, invert, text3d, flow, decay, and tetris [last 2 are new]. + Also found problems with gltt which hopefully will be handled by the + gltt maintainters. + Thanks to Kenneth Stailey for his "hiv" add-on + to dclock. I also added my personal hang-ups "lab" (research animals) + and "veg" (consumed animals). Upgraded the last 2 to work off current + year to get rid of arbitrary start year of 1970. + decay mode from xscreensaver thanks to Peter D. Gray + but it does not work yet. + Proabably will add a nondefault uption where it will use your current + image on screen to play around with. New compile-time option to + activate: "CHANGEME". Have not tried it yet my machine is real slow. + Fixed -fullrandom for multiscreens. + Cool flow update by author Tim AuckLand . + A camera is attached to one of the trained bees and Duffing's forced + oscillator added. And multiscreen fix for tetris. + Configure updates + Various warnings about shadowing and prototyping removed. Removed -Wall + on gcc since it creates too much noise. Will use it privately though. + configure now assumes latest version of GL for lament. configure switch + does not seem to work on my Sun. Also added a switch for conditional + compile and link C++ code but not sure how to get it to work in configure + (see top of configure.in). (This introduces problems in make.com which + will soon be addressed.) I fixed the compile without --enable-unstable :). + Took out lament and invert from unstable and put in xjack (partially + put in before) and tetris (not that its unstable but it needs a lot of + work). Put it a warning if your using --enable-vtlock that it is a + pretty big security hole. + Update for bsd from Thorsten Frueauf + New lifeform for loop. I am not sure if its ever been done on a + hexagonal grid (Nov 02 1998). The hexagonal grid to be is slightly + more life-like since it maximzes a cell's area while minimizing its + perimeter. (Currently working on a triangular version in a hex grid). + Run xlock with the following "-mode loop -neighbors 6". Its cells use + 6 states. Beware, this option is very liberal about declaring memory. + Its not clear whether this lifeform for will survive on the infinite + plane forever or choke on its own waste. [Some improvements to make is + to fix centering, randomize orientation and maybe some improvements in + survival.] loop made them more bomb proof similar to wire. + Thanks to for pointing out that if DEF_PLAY + is used it could be made to overflow. Fixed, not a security issue though. + Another possible overflow in iostuff.c fixed (Jouk also fixed it too). + Thanks to for his fix for multiheaded bug + for starfish and link now uses thc CFLAG settings. There should not + be calls to release_starfish in draw_starfish. + Thanks to Tim Rowley for his new mode "invert", a + demonstration of turning a sphere inside out without creating any kinks + (two surfaces can occupy the same space at the same time). [So far you + configure it with --enable-unstable] + wire upgrades made more bomb proof... possibly an issue on a multihead + monochrome. + make clean should now work if ../configure is run in say xlockmore/linux. + Thanks to Kevin Vajk for his fix if Xresources + contains "xlock.mode: Something_really_long..." xlock would memory fault. + Thanks to Remi Cohen-Scali and Eric Lassauge + and Jouk Jansen for + updates to text3d and configure for text3d. Also "*.h" files upgraded + to handle C++ better. + Thanks to Remi Cohen-Scali and Eric Lassauge + for vtlock upgrade. [It still does not seem to work + on my Linux box.] + Thanks to for his signature patch if + a file has a NUL without a newline. + Added -showplanes for hyper. Option looks real bad now but it may be + improved upon later. All the planes that include the origin are shown. + Port of xjack.c from xscreensaver by request. [Most of the delays removed. + I'll see later about putting them back in. Also it sometimes writes off + the screen. Also got rid of the overlook stuff with a #ifdef. If anyone + wants it I'll change the name to just "jack". I have seen xjack bomb + out so do not use. May make it an unstable mode if I can not find it.] + configure change, added afs for Solaris + configure change, removed --without-gcc, now just set CC before running + configure. + configure changes for app-defaults and X11R6.3 + configure and util.c change for usleep for Ultrix. + text3d updates for AIX from Jouk Jansen. + +4.12 + crypt(3) requires strings to be null-terminated. The 3rd character + should be null. Does not matter for most implementations. Thanks to + Bill Fenner . + configure fix for afs thanks to Charles Hines . + configure fix for group shadow on linux. + Thanks to Jouk Jansen for the port of starfish + and kumppa. starfish must be enabled (using configure --enable-unstable) + to use... found unstable on multiscreens and possibly TrueColor. + Multiscreen error (seen on Xnest and real multiscreens): + X Error of failed request: BadMatch (invalid parameter attributes) + Major opcode of failed request: 2 (X_ChangedWindowAttributes) + On TrueColor it sometimes says it can not get all the colors. + Also did the dclock Dutch translation. + -fullrandom in 4.11 is confusing so I made it a special option under the + random mode. + Now can use g++ on Linux. Working on SunC++. Many stupid warnings + removed. + Thanks to Charles Vidal for his genlauncher. + This tool (in etc) should help me maintain xlock. Still needs some work. + (java, dt stuff) also in xalock and xmlock the #ifdef stuff gets + stripped. Also created a new configure.tcl . Also did the French + translation for dclock (accents were not available at the time). + goop -count now has some effect. + kaleid option for qix. + Allow customization of .Xresources. If using configure uncomment + CUSTOMIZATION part after running configure in config.h . Thanks to + Robert Bihlmeyer . I personally would rather + "xlock -display whatever:0" to work as it does in the original. If + someone else thinks this default should change ... let me know. + Thanks to Tom Schmidt various fixes and purify report. + Patch for root with no password... not allowed to unlock... could this + be a problem? Added verbose fix to color.c stuff. + Also several fixes for bubble3d on SunOS, now considered stable. + kumppa leak fixes and starfish leak fixes (one starfish leak remains?) + Thanks to Jouk Jansen and Tom Schmidt for finding -bitmap leaks. + Thanks to Remi Cohen-Scali and Eric Lassauge + for: + vtlock: xlock now VT lock switch when using -vtlock option. This is + enabled for linux with the --enable-vtlock option of configure. + This may or may not work on some versions of Linux, for example + it does not work on the maintainers machine. :( (His latest + did not make it in this release but tries to take care of the + potential problem of "locking" a vt while another one is active + (if using xautolock and two X servers for example).) + I recently changed this option from lockvt to vtlock so I would + not be confused. + configure: add autodetection of MesaGL links (pthread/glide/vga) + Autodetection of pthread caused xlock not to run for the maintainer + so it was commented out. + language: configure can select the lang used for elapsed time display. A + grammar/syntax problem have been fixed in French language. + The option selecting the language is --with-lang in configure. + xglock: configure can search for GTK+. Makefiles are now generated in + xglock if GTK+ is found. xglock have been adapted to gtk+-1.0.4. + It is under development. + ORIGINAL_XPM_PATCH: + the ORIGINAL_XPM_PATCH define enabling the pixmap icon mail can + be activated in configure with --enable-orig-xpm-patch option. + bubble3d: this mode now has now randomly colored bubbles. + text3d: compile with -DUSE_TEXT and GL but need g++ and the gltt lib. + configure not set up for this so edit the generated Makefiles. + This version works better but the Animate function needs still + some work. + More language stuff added in resource.c . It needs a few more German + translations and other languages too (besides French and Dutch). + To do more, each mode description would need to be translated. I + currently think that would be hard to maintain, but I will not turn + down a patch (to mode.c) on this if someone really wants to have this. + atlantis should no longer flash. + Fix for shadow passwords if the user no longer exists. + popex (population explosion) and forest (tropical deforestation) options + for dclock... really depressing. See dclock.c for where I get my + numbers. + Fade out converted from xscreensaver by Jouk Jansen. Still to do: + -fade out the session at xlock startup + fixed one, squaretate to draw with more granualarity so it would + not be so slow on my slow machine. + Update to crystal by Jouk Jansen to cycle colors like starfish. (Name of + option changed from -cycle to -shift so +cycle would still work on + starfish. Next version the maintainer hopes to have time to fix this...) + hyper -use3d. Too bad humans only have 2 eyes... otherwise I would add a + -use4d option and have it default to use green cellophane + -popcorn option on hop works but the output seems different then a picture + from my copy of Scientific American. + mandelbrot update by Tim AuckLand + changed from cut-off radius from 2 to sqrt(13) to improve resolution. + Fix for julia has some initialize errors... pixels in upper left corner. + Fix off by one error in triple_wipe. + Fix for -fg red -bg green ... fading does not work here. + starfish taken out of unstable since it is fixed for multiscreens. + Similar changes for kumppa and crystal. + Fix for the following: + xlock -mode random -modelist image -bitmap /nonexistant/ + xlock: caught signal 11 while running image mode (uid 561). + xlock -mode random -modelist image -bitmap /nonexistant + could not read file "gublety-gook" + Converted Jamie Zawinski lament to xlockmore. + This mode I just got working, so you need to configure with + --enable-unstable . Needs OpenGL1.1 ... configure and Imakefile assume + it for now. Beware of opening doors... + Also stole Jamie Zawinski's neat depend/distdepend stuff. This gives + errors if setup on linux. If setup on Sun (make distdepend after a + normal configure) it seems fine. + makedepend: warning: ../xlock/xlock.c: 13: + # error architecture not supported by the Linux C library + Took out xalock from building by default. configure gets tripped up + by a Sun include file of the same name. + kumppa now changes direction by -cycles 1000 . + Fixed up distdepend and reorganized dependencies to be the minimum necessary. + crystal, starfish, kumppa fixes for -mono and +install . + automata modes to have borders when -neighbors 4 or 8 since the others have + them. ant's squares should really be square now. + Thanks to Marcelo F. Vianna for his new version of + rubik.c . + +4.11 + atlantis mode thanks to Eric Lassauge ported from + Mark J. Kilgard of Silicon Graphics. + kaleid thanks to Robert Adam, II . -fullrandom + capability added thanks to Jouk Jansen . + kaleid is a totally new version. Make sure you reinstall XLock.ad. + May resurrect the old kaleid in qix? + bubble3d mode thanks to Richard Jones . + Not sure about the name... bubble is taken and bubbles is taken in + screensaver ... original name was glbubble. Seems to give problems + on SunOS so it must be enabled (using configure --enable-unstable) + to use. + hyper mode thanks to John Heidemann . This was built + independently from hyper. I did not understand some of the color stuff + and through it away in the name of speed (quick coding and quick exec). + Took move_line from the xscreensaver port. + -fullrandom added to mountain, triangle, and petal for wireframe the first + 2 include a joke... mixed wireframe/solid + Yet another try to solve the colormap problems with fvwm and tvwm. + New compile-time option for this COMPLIANT_COLORMAP. Currently this + is off by default since this fails on TrueColor. (See config.h[.in] + for more info). + Fixed white background on goop with +install. Also some day I have to add + back some of its xscreensaver options. + Thanks to Charles Vidal for his improved + xlock.tcl . He is also starting a configure.tcl... do not expect it to + work yet. ;) + Thanks to Tom Schmidt for fixing up the mailCmd to a + later point in the password screen since it could take several seconds + to run with the mail automounted. + Thanks to Jamie Zawinski ansi and mono fixes for flow.c. + Jamie also fixed global -no- options in xlock when compiled under + xscreensaver. + Fixed some compilation problems when compiling in xscreensaver. + glx stuff is now in sync with xscreensaver-2.17. + multiscreen fix for DT. Sometimes it uses the DefaultScreen and sometimes + it uses all its screens. + Bug fix, food for bugs not updated. + configure fix for Linux and shadow thanks to Robert Bihlmeyer + . + new ant. Size does not get too small except if the user wants it or there + is only a small space (iconified). -sharpturn option mainly for + neighbors = 6 but also works for 12. This new option easily degenerates + bees/ants to create highways. Also worked on getting the truchet + lines better... still not perfect. + fullrandom option now defaults on... this will probably cause confusion + when certain options are selected but most users probably do not run it + with options anyway. + batchcount depreciated ... it still works but not as a resource. Use + count. + xscreensaver/xautolock problem found. If using a xlock executable with + xscreensaver see xlock/vroot.h . + lisa looks a little better. I messed up the refreshing... oops. + If saturation not 1.0 it will run out of colors frequently if the colormap + is constant... I now retry it as 1.0. (No COMPLIANT_COLORMAP). + Fix for BSD_AUTH thanks to Douglas Berry . + +4.10 + goop mode added from xscreensaver. + color background stuff changed around... did I get it right yet? + I think the biggest outstanding problem is fvwm[2] and that I may not + have much control over since it does not let me install the colormap for + the whole screen. + color background reset for shape so it does not screw up other modes. + Solaris configure fixes by Tom Schmidt and David Bagley (Imakefile may + need some work) + xlock.c and random.c modified to allow -inwindow to pop up only once in + a multiscreen and work from :0.1. + Release code patches for bug, life, life3d, triangle, voters, and wator + to get it to work with the new -inwindow. + Thanks to Eduardo Santiago for his -enablesaver fix broken + probably in 4.06. + -inroot refresh problems, clear window was added to refresh + ant bat bouboule bounce braid bug clock dclock deco fadeplot flag forest + galaxy grav helix ico image julia laser life life3d lisa lissie loop + marquee maze mountain nose pacman petal pyro qix roll rotor + shape sierpinski spiral star swarm swirl triangle + vines voters wator wire world worm + Also debounced some modes since they now need a "painted" variable. + ant, ball, bug, crystal, helix, life, life3d, lissie, + petal, voters, and wator. + deco, marquee, nose could be better too. + debounced puzzle. + bug more interruptable. + xmlock and xalock patched to display black screens. + "xlock -sound -lockdelay 1" fixed so there is no overlapping sounds. + Thanks to Michael Duane for his check mail patch. + New options added -mailCmd, -mailIcon, -nomailIcon. A sample + check mail is supplied (by Michael) in etc . + Original patch used XPM. The code is still there under + ORIGINAL_XPM_PATCH, uncomment in xlock/mode.h. This has some colormap + problems. + Thanks to David Leigh for his AIX DCE password patch. + Suggestions in README for compiling. + Replaced MI_WIN_* with MI_* . + Changed many references from batchcount to count. -batchcount is still + used... could not figure out how to have them both work. + xlockmore can now be is dropped into the main xscreensaver directory and + have its modes compile for xscreensaver. + Sync'ed up these modes from xscreensaver-2.16: + ant bouboule braid drift fadeplot forest galaxy grav + hop[along] ifs julia laser lightning lisa lissie mountain + penrose rotor sierpinski slip sphere spiral strange swirl + triangle vines worm (flag has diverged) + Various new line width improvements from jwz: braid size option, + rotor size option, and lisa randomized linewidth. + Currently all xlock modes (but random) will compile in xscreensaver. + mandelbrot and tube will NOT run yet. The xpm stuff and program + option of marquee and tube still need to be improved too. + Could not figure out how to get -no-fullrandom to work if + "*fullrandom: True \n" is set in the mode. + xlockmore is dropped into the main xscreensaver directory. See README + in xlockmore/xscreensaver for more info. + Split out utils.c stuff to util.c random.c automata.c iostuff.c. + Also changed visual.c to vis.c . This is all in the name of + more xscreensaver compatibility. + Name changes + -imagefile -> -bitmap xscreensaver capability... + -messagefont -> -planfont probably not used too much anyway + -mfont -> -messagefont goes along with -message... + (This is not compatible with xscreensaver but true compatibility required + too many changes...) + Thanks to Tim Auckland for 3 new fractal modes + discrete, flow, and thornbird. Also wrote a wrapper script that + may give better performance when using java or netscape... set + etc/xlock.sh . Also -name fix. + Problem with bomb on 24 bit screen on Solaris 2, same as deco problem, + "fixed". + Multiscreen error when -geometry is used. Password screen size would be + set to the last screen, fixed. + Thanks to Yoav Yerushalmi for Kerberos fix. + -wireframe options added for mountain, petal, and triangle. + bad memory reads fixes on ant and thornbird thanks to Tom Schmidt + and Purify. + Fixed a bug with penrose where it would stop drawing if clicked a few + times. + DPMS (Display Power Management Signaling) Monitor patch thanks to + Matthew D. Rench . I guess it would make sense to + run xlock with +enablesaver when your using these new options. + Info for man pages obtained from http://www.randomc.com/~dperr/dpms.htm . + Fixed program default message bug for marquee and nose when compiled in + xscreensaver. + Thanks to Charles Vidal for his improved + xlock.tcl . + +4.09 + Fixed some white background problems. + Fixed flag free bug. Showed up on Linux and possibly to a lesser degree on + all BSD varieties. + shape "fix" on 15/16 bit displays on Linux. Took away stippling on Linux. + It will be back when it does not crash. Also added borders and shadowing + on shape. + Thanks to Yoav Yerushalmi for adding new resources: + logoutCmd, startCmd, and endCmd. Also patched up the .xlockrc stuff + as a fallback when using Kerberos. + Thanks to Alexander Knoll for adding a patch + for xlock to switch to blank mode if a SIGUSR1 is detected and back if + SIGUSR2 is detected. This is useful if one wants to used a load sharing + facility and does not want xlock gobling up precious CPU time. + qix modified to handle polygons. geometry.c merged in with a -complete + option (and with -fullrandom). geometry.c removed. + resource.c changed. Null strings are no longer malloc'd. life, life3d, + getText (used in marquee & nose) fixed to compensate for this. This + fixed an annoying but tiny (1 byte) leak. + ncolors on all modes should now be 64. There may be a problem on linux + (involving libc6?) BadValue on X_PolyPoint. + Added LESS_THAN_SOLARIS2_5 switch so that gcc could compile xlock.c. + xlock -help should not need -remote option if running xlock remotely. + This was moved for the modules stuff that I have not got working. This + bug is still present for modules, if it works. + Implemented USE_MULTIPLE_USER for acceptance of multiple passwords to unlock + similar to USE_MULTIPLE_ROOT. + +install now works again... broken in 4.08. I recommend -saturation 1.0 + when running in random mode so you get less mono modes. + Weeding out of ".", ".." `files' fixed for imagefile in UNIX. + -sequential now goes more alphabetically. + SYSV patches for VMS thanks to Jouk Jansen . + Image directories no longer need a final slash for -imagefile. + Fix when compiled with logout button and used in dtsaver on a 24 bit display. + Finally fixed puzzle mode when moved off screen as in -debug or -inwindow. + +4.08 + Patched up imagefile + Took out MAXSCREENS. No multiscreen limit now. + Took out NUMCOLORS. Put in ncolors as a mode option, range 2-200 + Took out inital point in qix in the top left corner. + Fixed closedown logout. Display was shutdown before logout was running. + New crystal.c thanks to Jouk Jansen and fixes + for AIX and VMS. + Fixes for TrueColor. Major bug fix for writable modes and TrueColor. + -imagefile for pacman and eyes. So far there is no xpm or ras. + Fixed up configure/Imakefile for Motif2.0. + Thanks to Charles Vidal for his improved + xalock and xmlock. His new improvements use the -parent option. + That option does not appear to work for multiscreens, but I think + the fix should be on the xlock side. + Removed some gcc-2.8.0 warnings and a static variable in draw_flame + (usually not multi-screen friendly). + Fixed white screens on mono. + make.com fix for clean thanks to to Jouk Jansen . + bouboule.c and rotor minor initialize fix + coral, swirl, flag, braid, and strange leak and bad memory reads fixes + thanks to Tom Schmidt and Purify. + Thanks to Hiroshi Kawaguchi for his + multi-byte character patches for password prompt and marquee mode. + Set up using configure --enable-use-mb. + Lint warnings removed. + Flag patched yet again. Default set back to xbm for image to get rid of + the annoying bad colors on the message part. + +4.07 + Added ELF patch I received from Adam P. Jenkins + in January 96. At the time it seemed like a lot of work to add and + maintain since I could not test it. It needs more work to get it running. + Changed back some code in resource.c to allow for machines that have + dynamically allocated IP addresses. Not sure if this was necessary now... + Added patch for SafeWord, not tested. + took out warnings about strdup in flag.c + removed g++ warnings in cartoon, crystal, mandelbrot, tube, and random. + Added hexlife rules to life, they both have known glider lifeforms... + (-callahan and -andreen options). The callahan option is more developed. + May yet add gliders coming from top and bottom. + Changed around sigset_t on the Sun. It may give lots of warnings on the + Sun but I think it will always compile this now. + -imagefile for each mode like batchcount. + Fixed swirl, tube, and mandelbrot with BadValue in X_QueryColors on + Solaris2.6. tube and mandelbrot fixed when static colormap. + This "fix" probably caused swirl to error out with -forground gray (or + -background) -install, this was then fixed.. + Changed default for -usefirst . The default is now on. I am amazed that + I have never done this before. + configure sometimes mistakenly sets up to use matherr then utils.c errors + out. + Thanks to Charles Vidal for his improved + xlock.tcl and a more wavy flag. + fadeplot was blank on TrueColor and there was a dot in the upper left. + This no longer happens but it no longer fades either. Added more + variablity and release code. + deco fixed some round-off errors (if width or height odd). + ant's truchet mode turned off if size is small. + GL modes are not be compiled in at all if there is no GL, same for + cartoon and xpm. + sproingies, pipes, and gears caused a Bad match on X_GLXMakeCurrent + after their release code is run and am running it remotely. + deco was weird on TrueColor (Ultra2). Strange repeated rectangles appear + in the first square (ie. top left) about 1/4 of the time. + gl modes are not always cleared when completed. XClearWindow does not + work all the time. This led to MI_CLEARWINDOW* macros defined in mode.h + and used in all modes. + (Fixed flame, turtle, and petal are blank on mono and with -mono ). + MI_PAUSE removed from all modes since it does not work on multiscreens + especially with above patch. + Modified xlock to give a blank screen the glx modes when GLX is not + supported by the screen. This is good for multiheaded machines with + a monochrome and OpenGL. + Separate LDFLAGS in configure for xlock, xmlock and xalock. + -mode ant,bug is an error but should not Segmentation Fault. Related to + the new -imagefile mode option. Fixed thanks to David Hansen + . + Interrupts for short delays thanks to William Shubert . + Delay for bouboule and swarm changed to compensate for this. + Currently backed out since it causes problems with random mode, + (USE_NEW_EVENT_LOOP). + If -duration is fast, password screen now gets the text info about the + mode updated. + -neighbors option for wire mode. + Stippling for demon mode on mono. + Use of union for neighbors info. + Thanks to Tom Schmidt for adding "default" as a + visual name. + Separated escher into cage and moebius. + Changed the compile-time option USE_MOUSE_MOTION to a run-time option + -mousemotion. Added a new compile-time option -DUSE_WINDOW_VISIBILITY, + which was suggested a while back (Heath Rice ), + allows one to have a window that sits on top of xlock. (This window must + pop itself in front if it gets a visibility event). + If xlock fails to get the encrypted shadow password it now attempts to use + the -cpasswd option, failing that $HOME/.xlockrc, failing that it queries + the user. This way, you do not need to choose between to have it + as a compile-time option. This is only used as a fallback. -DUSE_XLOCKRC + still remains in case that default is prefered. + Thanks to Charles Vidal for his new mode, bubble. + Solved a bug in flag involving raster files. + -garden mode for daisy. + Thanks to Marcelo F. Vianna for his early version of + the stairs mode, ala Infinite Stairs. It needs a bouncing ball on the + steps.... work in progress. + Configure changes for xalock, rplay, and nas. + fullrandom stuff for ant, bubble, daisy, and penrose. + AIXV3 fix for flag. + Thanks to Jouk Jansen for his patches to utils.c + that allow imagefile to work with the random mode and can now use + wild cards to choose specific files in a directory. + Thanks to Leonid V. Kalmankin for his patch for the + 3Dfx card. It is not autodetected so FX must be uncommented in + config.h.in before running configure (or iconfig.h before running + xmkmf -a ). + -mode life -rule and -mode life3d -rule3d format changed. It now + allows greater flexibility. Groupings of symmetric neighbor patterns + are also possible in life. So far this is only available for hexagonal + life. Add -lifefile and life3dfile for the life and life3d. + They pretty much follow the simple #P format of xlife. +file: glider.life (-rule S23/B3 -neighbors 8) +#P -1 -1 +*** +..* +.*. +file: glider.hlife (-rule S2b34/B2a -neighbors 6 (-callahan)) +#P -2 -2 + . . O . + . . . O + O . . O + . . . O +. . . O +file: glider.3dlife (-rule S45/B5) +#P -2 -2 -1 +.**. +*..* +*..* + +.... +.**. +.**. + Added a bit more color to pyro. + Fixed MesaGL on TrueColor for modes with MI_WIN_DEPTH in them. + KRB fixes thanks to Robert L. Sink . + PAM support thanks to Michael K. Johnson + and Marc Ewing , use --enable-pam . + Obscure multiscreen bug fix + xautolock -time 1 -locker "xlock" & + xlock/xlock -mode qix -saturation 0.4 + Caused a bad window because of a bad property. This was traced back + to vroot.h... this stuff does not need to run unless inroot is true. + Fixed Makefile.in for BSD... hopefully. + Visual fix if GL is not installed. Still not exactly right for xpm stuff. + tube and mandelbrot sometimes did not call XStoreColors correctly. + star fixes for multiscreens. + Will not exit out if someone did not set up /etc/hosts file correctly. + +4.06 + Fix for floating point error in cartoon for DEC UNIX. + Assorted minor fixes. Imakefile and Makefile.in fixes. + Thanks to Mike Kelly for fixing xlock on + xterminals (caused a buffer overrun ... not enough memory malloc'd). + In bug, bugs are now stippled on monochrome. + -modelist allxpm and -modelist allwrite for writeable colormap modes + added. I kept it mutually exclusive... even though allxpm modes use + a writeable colormap (I'll change this if anyone thinks that it is + confusing). + Added a feature to my_fopen that allows creation of a new file. Needed + for .xlockrc . + Added DEC, IBM, and SCO bitmaps and pixmaps. + Writeable colormap conflict should not bomb out xlock. There will be + no graphics. Not sure if the problem is in MesaGL but there is no + problem in OpenGL. -debug will print out the error when hit. + This is fixed in MesaGL2.5 when its released. + Rearranged XVisualInfo and context stuff. Should work the same... + May cause leaks if using < MesaGL2.5. Hoped that it would fix above + problem... it did not. + Thanks to Dan Stromberg for mandelbrot. + Thanks to Tom Schmidt leak fix. + RAS and XPM added for flag, maze, life, and life1d. Probably opened flood + gate for leaks... flag and scream.ras does not work well yet... + probably some padding problem... life and life1d still default to + bitmaps. + +resetsaver option added. If using DPMS, XResetScreenSaver resets + power timeouts, which may not be desirable. -resetsaver is on by + default. Thanks to Michel Eyckmans . + New Prisoner's Dilemma automata mode, "dilemma". Thanks to Tom Schmidt for + his leak fix. + New deco and coral modes stolen from xscreensaver. + Hopefully fixed font bomb on bomb. + New Purify logs from Tom Schmidt. + Fixed exposures on dclock, ifs, nose, and strange. It could still be a + problem on coral if your machine is slow. If you use -lockdelay it may + have to be lengthened. + Fixed some flashing on multiscreens for ifs and strange. + +4.05 + Fixes for bat and ifs leaks. Thanks to Tom Schmidt + for his purify report. + Fix for galaxy (floating point error on FreeBSD) with help from Bruce + Evans . + Changed configure so that -lgl is only for IRIX. + sierpinski in 3D thanks to Antti Kuntsi . -size 3 it will + have 3 corners and -size 4 it will have 4 corners... all others cause it + to pick 3 and 4 randomly. + Thanks to Tim Mooney for his patch to + configure for Digital Unix and using prefix to set the app-defaults + directory. + Thanks to Jouk Jansen for his new crystal.c. + Now all orthogonal unit cell crystals are represented (quasicrystals + are not). Fix for bad memory access and refresh. + Thanks to Charles Vidal for his improved + xlock.tcl. + Modified Makefiles.in used by configure. A make can be made in xlock and + modes/gl directories. Should be OK now with BSD make but I have not + tested it. Also added setuid and password stuff. + XPM MesaGL conflict lock pick solved by having the iconified window to have + fixed colors. This was added to fixedColors in utils.c . Other writable + colormap modes were updated to handle this. This also solves the problem + of the "black" password screen not being black. This probably does not + fix the real cause of the problem... + Better color handling of OpenGL. Still not perfect. GL modes may look + bad in PseudoColor and tube and swirl (and bat, image, puzzle, and + cartoon with XPM) may look bad in TrueColor at least on a 8 bit display. + Many thanks to Jongki Suwandi who figured out + what -dtsaver does and how to use it. See README. + Fix so that when DT changes the modes on xlock it does not cause errors in + the errorlog. + Pipes in the pipe mode going towards "near" and "far" should no longer be + invisible in OpenGL. + Put more shapes in tube. + +4.04 + Thanks to Marcelo F. Vianna for speed ups in morph3d + Created the great new rubik gl mode. D. Bagley made it a lot more + unreadable but also made it NxNxN. + fract name changed to vines. If batchcount is zero then each iteration + will produce a complete vine, otherwise it will produce a portion of + the vine. Nice values for growing the vines to be -batchcount 100 + and -delay 50000. Thanks to David Hansen + Thanks to Tom Schmidt for his password window + patches for server name and mode descriptions. + Thanks to Christian von Roques for his galaxy speed + ups. + Thanks to John Gotts for his syslog display patch. + Changed flag to allow it to change between image and message. + New directory structure. configure still needs some more work to get + it to make from any internal directory. configure should now get the + correct xapp directory. Many "ideas" were taken from Jamie Zawinski's + xscreensaver. Thanks to Jouk Jansen for his + new make.com. + puzzle should no longer bomb out with BadMatch if in a window. + Thanks to David Hansen for handling the -inroot + case. + Thanks to Charles Vidal for starting 2 more gui + interfaces xalock, this time using Athena and libsx, and etc/xlock.java. + -parent patch to be used with -inwindow option. This option + will be used on the GNOME project (http://www.gnome.org). Thanks to + Radek Doulik . + Added 12 and 6 bit for defaultVisualInfo. + Moved config directory to etc... imake could get confused. + Fixed color.c so that it could handle the case when all colors are used up. + sphere.c now can have the shadow in 4 different locations... it is randomly + chosen when init_sphere is run. Fixed a bug if sphere was restarted. + Fixed sierpinski and wire if there are only a few colors. + Fixed escher.c it had FALSE instead of "False" in 2 places and was + causing problems on 64 bit Digital Unix. + Fall throughs in case statements found on hop and ant. + hop would sometimes give a blank screen for a nonexisting hop. + hop now centered and scaled better. + ifs and strange are now reinitialized when refreshed... the size + of the window could have changed. + Ideas in DT workaround in README from Wade Wegner + + munch lifted from xscreensaver. + Thanks to Eric McDonald for his help on the SGI 12 bit + display. + Imakefile patch for SCO and Sun with OGL. + Configure patch for Purify. + Dave Prosser SVR4 random image patch. + allautomata, allspace, allgeometry add. allstandard taken away. + This also puts stuff back in alphabetical order except the special + modes. + Password window username now displays host and display info. Display info + only displayed if significant. + puzzle patched to handle bomb when batchcount was negative. + inline patch if set -ansi -pedantic . + More xscreensaver compatibility. flag and others need a bit more work. + Added eyes and swarm mouse options, very similar to the julia code. + Patch for Solaris2.6 . + Fix, sometimes flags would have enough room to fly. + +4.03 + Thanks to Jouk Jansen for VMS GL patches and + new mode, crystal. + Thanks to Ed Mackey for taking out some common code + to all GL modes and placed it in utils.c. Also found BIG leak in + gears.c, rewrote sproingies (now handles more sproingies and have + better explosions and not have 2 sproingies generated from the same + spot at the same time). Added many neat things to pipes. + Thanks to Tom Schmidt for his memory leak fixes + to xmlock.c and option.c. More unresolved leaks and uninitialized memory + reads are noted in the source. Handle matherr in utils.c. + Fixed uninitialized memory reads in pyro and worm for -use3d. + Thanks to Marcelo F. Vianna for speed ups in all gl + modes. Removed conflict between pipes and superquadrics & sproingies. + Pipes to handle -inwindow better. Created the great new escher gl mode. + Thanks to Jamie Zawinski for + VMS hlp capability make -f Makefile.in hlp + braid spin can go the other way, flag font and image capability, + ifs and strange less flashy, julia mouse option, sphere draws all 4 ways + swirl debugged on 24 bit sgi... it needs 32 bits + Thanks to Curtis Larsen for a new improved + bounce mode when run in -inroot. + Thanks to Jeff Epler for less tight turns in pipes. + Thanks to Scott Carter for check that only regular files + are read in the .xlockmessage, .plan, .signature. (Tom Schmidt did this + for all fopen calls except one :) ). + Tabs here are now interpreted. + Jason Larke for his AFS patch so nonsence lines + in passwd or shadow do not cause the xlock to barf. + release code now called in finish originally written by Ron Hitchens + . + XSetScreensaver now only called if locking the screen. Also able to turn + it off now in blank mode. + starting to remove the dependencies on MAXSCREENS and NUMCOLORS + bigcrypt added for HP secure passwords. + `xlock -mode spline -cycles 1 -erase` fixed. + boubloule bug solve using -use3d. all3d modelist option added. + New mode added, voters. + life3d.c leak fix. + Lifeforms added P3 Question, P8 Asym, and P8 Smiley added from + http://www.halcyon.com/hkoenig/LifeInfo/LifeInfo.html + life.c can now handle -neighbors 3, 4, 6, 8, 9 and 12. New pointer + algorithm. Hexagons for life, demon, & ant now look better. + wator.c can now handle -neighbors 3, 4, 6, 8, 9 and 12. + hop fix for multiscreens. Most of xmartin2.2 algorithms stolen. xmartin + was written by Ed Kubaitis . + a swirl fix for multisceens... one screen if larger than the other would + not reach its maximum size. + xmlock string options are now all in quotes. + bitmaps, pixmap and flag links are now no longer destroyed with a make + clean. + stderr is used for the VERBOSE stuff unless its informational stuff about + the mode as in ant and life*. + tube nolonger changes fg and bg. Should nolonger bomb out on TrueColor. + Can now use Makefile to adjust SYSLOG stuff. + Found a bug in ant and galaxy fixed on the HP-UX 9.0. + Got rid of some flashing of the grelb on eyes. + Reinitialize qix lines on each init_qix call. This gets rid of old lines + reappearing. + Added -imagefile option for bitmaps in life, life1d, and maze. eyes and + pacman will require more thought. flag now can have a runtime message or + use bitmaps. Thanks to Jamie Zawinski. + Put random colors on the nose guy. + Added -grabserver option for unsecure SGI. + Bug in strcat_firstword fixed thanks to + Fix for ":not found" text that appears after about 40 minutes. + +4.02 + Logout patch for SUNOS4, galaxy and life3d leak fix thanks to Tom Schmidt. + inline and seteuid patches for configure and xlock.h. + flag-freebsd.h added. + First mode was not being released in random mode. Fixed. + new ellipse code from Dan Stromberg (formerly + named trig) added to helix (xlock -mode helix -ellipse). + -fullrandom option added to make xlock more random. Thanks to Jouk + Jansen . So far only drift, helix, hop, & + spline are set up. Spline in -erase mode has cycles divided by 64 + so it is compatible with +erase. New options added to hop (-jong + and -sine). + Got SunC++, GnuC++, DECC++ errors and warnings out of xlock.c, passwd.c, + utils.c, logout.c, cartoon.c, clock.c, galaxy.c, life1d.c, turtle.c, + worm.c, bomb.c, fract.c, tube.c . It still does not link. + GnuC++ was tested on Linux and Solaris. Thanks to Jouk Jansen + for the DECC++ patches. + Thanks to Tom Schmidt for his memory leak fixes + to gears.c, mode.c, & resource.c. MesaGL 2.1 has some leaks that were + reported to the MesaGL maintainer and fixed in 2.2. Also fixed swirl, + and GL modes so they always default to the best visual. Also added + -visual (available with hackers code). gears and morph3d fixed to be + more random at start. + gears and morph3d multiscreen bug fixed by Brian Paul + MesaGL creator. + Thanks to Massimino Pascal for ifs and strange. + Thanks to Marcelo F. Vianna for morph3d and pipes. + Thanks to Dan Stromberg for tube. + Thanks to Caleb Cullen for lisa. + On Solaris, initial random mode was not random. This was fixed by a + cast for SRAND. Also updated references for seconds() from long or + int to unsigned long. time(NULL) will exceed maximum signed int in + 2038. + flag jumpiness and gears -mono fixed thanks to Ed Mackey + http://www.early.com/~emackey/sproingies/. + Sproingies and superquadrics GL modes and -wireframe option added. + "configure --enable-sproingies" sproingies is not compiled in by + default since it may run VERY slow on some machines. Also the -size + option may help you here (thanks to Tom Schmidt for this option). + Thanks to Tracy Camp for fract with improvements by + David Hansen . + "Minor" security hole noticed by David Hedley . + Minor in that the array is in the heap and not the stack, so it would + be tricky to write an exploit. Patched up by David Hansen + . + Debian bug report fix Bug#8276: xlockmore: xlock -help should output + to stdout rather stderr, thanks to Heiko Schlittermann + for pointing it out. xlock -version fixed too. + Debian bug report fix Bug#8406: app file was not being read when configure + was used. Fixed. Thanks to Herbert Xu + and Dirk Eddelbuettel for pointing it out. + added allnice, allstandard, allstable to modelist choices for the + random mode. Any mode that runs slower than star mode is considered + not nice. If gl modes are compiled in, these are considered + nonstandard modes. If hackers modes are compiled in, these are + considered unstable modes. To get only GL modes try: + xlock -mode random -modelist allstable-allstandard + allgl works too if you do not want to type that much. :) + X11 ico added added dodecahedron, tetrahedron, and the star octahedron. + -face and other options were removed to ease port. + -resources now prints out the resources for mode options. + button-logout and auto-logout rearranged. Also the logout button should + no longer overwrite your plan. See "configure --help". Note: 0 is a + special case and handled as infinity. + -icongeometry 1x1 fixes for bug, hop, and triangle . + fvwm2 menus thanks to James G. Feeney + Changed pause on multiscreens so that if pausing the second screen will + not override it. Its not exactly right but I am happy with it for now. + Thanks to Charles K. Hines for fixing grav.c + bug, casts to unsigned int. + LDFLAGS used if using cc on Solaris. There could be library problems if + setuid to root. + -neighbors 8 & 3 added to ant and 8, 3, 9, & 12 added for demon. + Fix on FreeBSD with xlock setuid and xdm for $HOME/.Xauthority thanks to + Thomas Gellekum . + -sequential option for random. Since the random mode is the most easily + broken... its good to have repeatability. + +4.01 + Fix in xlock.c if the HOME variable is not set. Fix in demon.c for + multiscreens thanks to David Hansen . + Security hole when xlock is setuid to root found by Richard Jones + (this affects all previous releases). + Similar problem found by David Hansen . + Thanks to David Hansen for his solution of mallocing userfile, + appdefaults, modname, modeclassname, fullname, fullclassname, buf + variables. Also the memory leak on line 831 of GetResources variable + classname is believed solved (David Hansen again). In utils.c get_dir + "dir" and "filename" are forced to remain within the sizes of DIRBUF + and MAXNAMLEN respectively. + Thanks to Tom Schmidt for adding --enable-hackers + --with-includes and --with-libraries and patching up the handling of + Editres in configure.in . A gears and tube bug patched. Also + contributed new Purify report showing many problems with the GL modes + (gears and morph3d). + Thanks to Jouk Jansen for the DECC patches. + +4.00 + xlock.html thanks to vh-man2html . + Patch for SGI to kill the Xsgi process when using 4Dwm thanks to + Martin Ebert and Phillip Moore + . + Fix for colormap stuff, swirl in random mode could crash xlock, error + made in ALPHA version. + Thanks to Alexander Jolk for a + update to lissie to handle -size . + Thanks to Sergio Gelato for a bug fix + for galaxy. + Fixed a "Bad Match" generated with random mode for multi-headed color + monitors using -install. + Thanks to Rick Ohnemus for patches to NAS sound + stuff. Typos were my fault. + I noticed a problem with Solaris2 and dirent.h . + xlock -mode image -imagefile ./bitmaps/ + is supposed to pick a random file. This mechanism does not seem to + work too well and may corrupt the filename when you give it a specific + file name. Therefore for Solaris2, I compile without dirent.h. + Check out utils.c and grep on Solaris2 to see more... + One must give a specific filename on Solaris... here + config/xlockrandimage.pl may help you. + Thanks to Charles Vidal for starting another gui + interface to xlock, xlock.tcl, in config directory. Moved xmlock, the + Motif gui for xlock (also written by Charles Vidal), from hackers + directory. + Robert Duff patch to randomize the starting + color of marquee. Same patch applied to blot, bouboule, braid, dclock, + geometry, flag, helix, hop, kaleid, julia, qix, roll, rotor, spiral, + spline, swarm, worm. On bomb, life, triangle this was not done on + purpose and on others... flame and lissie it was done already. + Leaks fixed in gears.c and bomb.c. Purify was not used so there could be + others there. + dclock should work correctly in password window... i.e. it should not get + stuck, and randomized initial direction. + penrose.c run with -verbose and it will tell you when it hits some + weirdness (about once an hour) "Dislocation occurred!" + If it says "Weirdness...." it would have terminated previously. + Updated make.com to use links instead of copies. Thanks to Jouk Jansen + . + Thanks to Tom Schmidt for fixing the formatting + on the "hours elapsed since locked." message and logout patches. + Also for adding several options to configure. + Thanks to Tim Mooney for Digital Unix + (aka OSF1) for patches to the Imakefile. + Middle button fix and monochrome random mode fix for multiscreens. + Multiscreen patch for marquee and nose. + Updated xlock.h not to have a \ at the end a line with a #if. VAXC chokes. + Updated size and batchcount in ball and size in pyro. + Updated mode.c for maze. Incorrect if XLock.ad was not installed. + Updated turtle.c. Incorrect HARTER_HEIGHTWAY mode and float casts to int + to please the VMS god. + Updated ant.c to handle more kinds of ants. Thanks to J Austin David + . Check out http://havoc.gtf.gatech.edu/austin + Hackers modes moved to main directory. cartoon.c may be kind of flashy + with -install and without it you might not get any cartoons. Looks OK + on monochrome. + audio stuff for VMS is in config directory. + Updated grav compile-time options now runtime options-> -decay and -trail. + New "-version" option now pulls the version from version.h. Also added a + more verbose option "-verbose" for maximum verbosity. -v now gets + version instead. + New "-sound" option added. It is off by default. If on it will only work + if RPLAY, NAS, VMS_PLAY, or DEF_PLAY are used at compile-time. + "Feature" where truncated mode names were accepted, such as "-mode s" now + give an error. It did not work well anyway (above example ran shapes in + monochrome). + Thanks to Alexander Lehmann for adding + backspace capability Control-H for marquee (but not with -message). + configure is now used. At this stage the Imakefile is still probably + more reliable. The Makefile.[acc hp std sun] are no longer supported. + (But are in config for reference). The Imakefile and make.com are still + supported. imake has fallen out of favor with me. imake is sometimes + not configured well, its make depend is confusing (some systems it is not + required), and cumbersome (and ugly) "@@\"'s are used to do more + complicated things. And it is not installed on some HP's. + A few things have been added for configure, but NOT used with Imakefile + or make.com: + config.h.in -> config.h when "configure" is run. + This file is where the users options are stored. These may depend + more on the administrator/user than on the system, but some options + are not available on some machines. See "configure --help". + If this file is modified... a "make clean" should be done unless you + know what your doing. + Makefile.in -> Makefile when "configure" is run. + configure.in -> configure when "autoconf" is run. Note: autoconf is + a GNU product that may not be installed. This is need only if you + update configure.in . + Although there is some VMS support features in Makefile.in... full + support for MMS, MMK, or VMS-GNU-MAKE is not there yet. + +3.13 + loop.c added, it is not exactly a screen saver, but it demonstrates + self-production. + turtle.c added. Recursive turtle graphics. The only one that works + at present is the Hilbert curve (which is may not exactly be + a turtle curve... but close enough). + Thanks to M G Berberich for .plan and + .signature stuff and purify log. + bomb and signature updates for VMS thanks to Jouk Jansen + . + flag fix for negative size thanks to . + MULTIPLE_ROOT & passwd in compat mode bug fix and NAS sound patch bug + fix thanks to Dave Smith . + Thanks to Tom L. Schmidt for purify logs. + Many leaks patched thanks to Purify! grep on "PURIFY" to find + unresolved leaks. Purify file is in the docs directory. + 2 problems in the Imakefile cleaned up thanks to Simon Josefsson + . + Patch to allow marquee to handle extended character set >=128 + Alexander Lehmann . + XPM files now work with -install (thanks to XPM maintainer Arnaud + Le Hors for pointing me in the right direction). Managed to reserve + black and white, but not fg and bg does not work. Sometimes in random + mode the colors are not mapped correctly. + -geometry should now work again without excessive refreshing. + Refresh update on image.c. + ball, julia, roll in the hackers directory are probably ready for + prime-time but have not been BETA tested. + +3.12 + swirl will cause xlock to dump core or CRASH OS within 50 repetitions + when run in random mode, fixed. + xlock -mode tri -mono dies, fixed. + xlock -mode swirl +install with netscape (stealing colors) running + is even less reliable, fixed. + daisy and slip are sometimes in red when there are no colors left, fixed. + After the delay has expired the first button click only redraws the + current mode. It then takes a second click to activate the + password display. Fixed thanks to David Hansen . + Individual -size option added (like batchcount). -gridsize removed. + If 0 it will use the bitmap if available. If negative it will be + random from 1 to -size inclusive (like batchcount). + Combined star mode with rock mode. rock mode removed. + -trek, -rock, -straight options. Star Trek features by Heath Rice + . + dclock updated offscreen so there is no annoying flashing. Originally + submitted by Michael Stembera . + bomb mode back... but its essentials are NOT compiled in by default. + Patches for SUNOS_ADJUNCT_PASSWD thanks to Mark Buglewicz + . + Many modes patched that did not initialize the redrawing variable. + Demon bug solved when alternating between iconified window and normal + window. + mountain patched so it would not be so slow. + life1d much improved. It now has a fade out if it is found repeating. + Now can break without it completing a whole screen. -totalistic + option added (+totalistic -> LCAU collection instead). + Updated clock to use batchcount (i.e. many clocks) .. if there are too + many collisions it will draw less clocks. + Thanks to Rene' Driessen + xlock -mode puzzle -mono ( -inwindow | -debug ) + will get a Bad Match if obscured (but still errors out if moved off + screen). + Updated modes to use size instead of batchcount... clock, flag, + maze, penrose. + Updated modes to use size instead of cycles... bouboule, star. + Updated modes to use size instead of worm's CIRCSIZE, and galaxy's STARSIZE. + Updated other modes to use size bat, bounce, ant, demon, life1d, life, + wator, wire. + galaxy bug on VAX now gone... not sure why... Disappeared when I added + temporary sin and cos calculations for efficiency. + Thanks to Dr. George D M Ross for SYSLOG (xlock.c) + and NETGROUP patches (logout.c). + Thanks to Gabor Herr for pointing + out that uid and gid privileges should be taken away unconditionally + after the encrypted password is grabbed. Otherwise, it may lead to a + major security hole depending on how it is installed. + xmlock.c added to hackers directory. Thanks to Charles Vidal + for starting a gui interface to xlock. Feel + free to improve upon it, but mail me your diffs. + -DUSE_HACKERS compile-time option added (cartoon.c took a step back, + nobody's fault but mine). + ant mode with -truchet memory leak found. Refreshing improved. + +3.11 + Ron Hitchens Updated xlock so it would refresh more + reliably and handle window resizing and -inroot + -neighbors is now randomly 4 or 6 if not 4 or 6. This affects the ant and + demon mode. Thanks to Jouk Jansen . + -help now displays help messages of each mode if there is one. + Changed _opts to include a separate counter for opts and vars & desc + since they do not have to be the same if there are boolean switches. + Added a -truchet option to ant, this leaves a trail of the ant. + One should probably change -gridsize to see it more clearly. + Added a -erase option to spline, if used one should make -cycles low, + say 20. + My long request for a penrose algorithm has been answered :) , + penrose.c added thanks to Timo Korvola . + -ammann will show ammann lines. These were useful for debugging + penrose.c . It is currently my favorite mode. Once I saw it do + a dislocation, I think. + tri.c added thanks to Desmond Daignault . + I would like to see other fractals added to this like fern. + daisy.c added. I modeled it after some slow PC lockscreen in the office. + More 3d options besides rock: bouboule, pyro, & worms. Rock patched up. + Now includes overlap color if colormap is installed. Thanks to + Henrik Theiling . + There is a bug on some machines with rock mode. A border of red can + be seen around the magenta rock (which should be blue). This happens + on my Sun with the colormap installed but not on Linux. + Password code mallocs fixed up and BSD_AUTH code added thanks to + Paul Borman . + 2 problems in Kerberos code and 2 in the Imakefile cleaned up thanks + to Simon Josefsson . + Kerberos 5 added thanks to Dale Harris . + Multi user per uid patch thanks to der Mouse + . + Now should compile under C++, but it complains about signaling, pclose, + crypt, and gethostname when linking. + All modes now have refresh hooks, but some just call the init_ hook. + lissie, bug, rotor, spline -erase and worm hooks thanks to Alexander + Jolk . + On slip, penrose, and puzzle, I made no attempt. + All modes now have change hooks. All except random call the init_ hook. + So when running a mode you can get it to restart by pressing the middle + button on your mouse. This does not work with the password window up + but probably should. + Added -debug runtime switch. Formerly accessed only by -DDEBUG. Some + debug switches are still only accessed in this way. + -rule for life and -rule3d for life3d runtime switches. Also a real + change hooks for these modes. For -rule3d if set to 0 all rules that + have known patterns will randomly selected. If set to 1 all rules that + have known gliders will be randomly selected. + "xlock -inwindow -lockdelay 10" now should work. + Sped up sphere by not drawing off screen. + Added a hackers directory for hackers. + Added hooks to Imakefile for MesaGL. No mode uses this yet see the + hackers directory. + +3.10 + Reorganized bitmaps. All single bitmaps use "image_" inside the bitmap + file. They are now organized t-tiny, s-small, m-medium, and l-large. + That way one can, if one wished, one can use one bitmap file for eyes, + image, life, life1d, maze, and puzzle at compile-time. + Removed all references to Scr, screen, and dsp in the modes. + Release mode stuff added to all modes (except random). Rewrote image + initialization for bat, image, and puzzle to make it safe for + multiscreens (image and puzzle are still not correct for multiscreens). + Negative batchcounts now allowed, if negative it will be random from + the smallest allowed positive batchcount to ABS(batchcount), inclusive. + It is available on + ant, bat, bounce, bug, eyes, flag, galaxy, geometry, grav, image, laser, + lissie, maze, mountain, petal, puzzle, rock, spiral, spline, swarm, + world, worm. + More mallocing (and freeing) done for bat, bounce, bug, eyes, galaxy, + geometry, image, lissie, maze, puzzle, rock, rotor, spline, wator, world, + worm, so there are less predefined limits. In the case of eyes and rock, + some limits were imposed where a dynamic number of pixmaps were + dynamically declared, so that xlock would not easily slow down to a crawl + and run out of memory. + bug now uses gridsize. And to some degree life, life1d, and wator. + It would be neat if you could choose not to use the bitmaps for big + windows. + worm now uses cycles for length of worm and galaxy uses cycles now too. + rock uses cycles for max rock size. + One no longer has to hit return twice to unlock using lockdelay. + flag now uses batchcount for "point" size. + XClearWindow is used instead of filling screen with a big black rectangle. + Added -icongeometry option. It has a range of 1x1 to 256x256 . Position + information is ignored. Updated modes to handle weird geometry's bat, + bounce, braid, bug, eyes, kaleid, life, life1d, maze, nose, puzzle, + wator, world. + mountain changed to allow it to be interrupted quicker, (braid and slip + are harder :) ). + bounce changed to get rid of drawing errors. I could not figure out how + easily remove more without the balls flashing. + wire mode added based on code from Kevin Dahlhausen + and Stefan Strack . + lightning mode added thanks to Keith Romberg . + in xlock.c, in function runMainLoop, reads should be declared not as + struct fd_set. This causes compilation errors with Linux kernels 2.0 + and higher. Thanks to Brian R. Doherty . + "nice" patch for xlock to so that xlock is "not so nice" when a password + window is being presented. Thanks to Jouk Jansen + . + lightning, eyes, maze, shape patched for multiscreens. XPM stuff patched + for multiscreens (thanks to XPM maintainer Arnaud Le Hors). + Tested on a machine where 0.0 is black/white, 0.1 is 8 bit color. + Also random mode does not use the correct initial values of modes on + multiscreens. Testing on multiscreen thanks to Mark Wedel + . + Long standing bug fixed (>= before MAXBATCH) for flame.c thanks to Ron + Charlton . + puzzle when in -inwindow or compiled with -DDEBUG and moved off screen + will not bomb out unless it is using an xbm image. This should be + completely fixed in 3.11. + New defaults: grelb substituted for life icon, -install for + installation of the colormap, some modes slowed down so they would look + correct on fast machines. + +3.9 + All modes (except eyes.c) have been updated to use less global variables. + Also updated xlockmore to ANSI C by GNU's protoize. + demon.c updated to be faster. Although it is now significantly more + complicated. + ant.c and demon now have runtime options. -neighbors 6 or 4 (default = 4) + -gridsize (170 default) (In ant, when neighbors = 6 it is called bees. + Not much is known about these critters. They do not seem to exhibit the + highway building activity found in normal ants, but otherwise they + behave pretty similar.) + flag mode thanks to Charles Vidal . + The Lissajous worm (lissie mode) thanks to Alexander Jolk + . + Shape mode now has triangles. Also now looks better when minimized. + From an idea in REC (Recreational & Educational Computing). + Random mode now tells you which mode is running when run with -verbose + [formerly -v]. + Added VERBOSE stuff to life, life3d, life1d, and ant. + Changed rock.c to use blue by default for the left eye. All 3D glasses + I have seen use blue. + Fixed swirl so it would not swirl "white". Even if it is not a bg or fg + color. This made the border around the little window change color. + From Ron Hitchens : + patch for middle button so that it will change locks even if duration + is 0 in random mode. + patch for window title noticeable when used with the -inwindow option. + fixed up demon.c + Random access to raster files by giving a directory thanks to Jouk + Jansen . If UNIX, give directory followed by + a "/", also it may try to put "." as an image file. + When xlock is compiled with shadow passwords it will still work on non + shadowed systems that use elf, thanks to Marek Michalkiewicz + Compilation with HAS_SHADOW is + forced on Linux with ELF (even if shadow passwording is not used). + This will facilitate a migration towards shadow passwording. + For the sake of completeness, xbm files can now be read in at run-time. + Courtesy of John Bradley's xv(xvbm.c), used by permission. + "xlock -nolock -lockdelay 1" should no longer crash + +3.8 + system call for sounds using DEF_PLAY thanks to Milco Numan + + Used GNU's indent to reformat all *.c and *.h files. It may have + screwed up some comments. I used: + -bap -nbacc -bad -nbc -br -bs -c33 -cd33 -ncdb -ce + -d0 -di12 -neei -fc1 -i8 -ip8 -l79 -lp -npcs -psl -nsc -nsob + -cli8 -cs -cp1 + Multiple root accounts for allowroot. Thanks to Lewis Muhlenkamp + . + Better make.com file for for VMS thanks to Jouk Jansen and the + author of XVMSUTILS, Trevor Taylor . + -display fix for VAX thanks to Jouk Jansen. + eyes mode, revamp to eliminate need for global variables in modes, + new hooks (release and refresh), and middle button for "Next" in + random mode, thanks to Ron Hitchens . + This now allows for many things to be cleaned up. Due to the number + of modes, it will take a few releases. See HACKERS.GUIDE. + puzzle mode thanks to Heath Rice & Jouk Jansen + . + Raster files (for puzzle.c and image.c) thanks to Tobias Gloth + & Jouk Jansen . + Background is now black when used with -install. + swirl for 16 bytes per pixel patch + bouboule mode memory leaks fixed thanks to Jeremie Petit . + maze's dead ends are now filled in. + More syslog stuff for notifying failures in unlocking xlock Andrew Sammut + . + blank now uses the power-down sleep mode if available, thanks to Ron + Hitchens . + +3.7 + HP bug timing bug fixed thanks to Ron Hitchens . + 3D mode for rock thanks to . + Get out your 3D glasses, Red on right and Green on left. + added compile time option for spline, FOLLOW to erase old splines + like Qix thanks to Richard Duran + petal now works with -inroot . + CDE DT saver thanks to Trevor Bourget + see Imakefile and README. + bouboule mode added, thanks to Jeremie Petit . + bouboule fixed for VMS and TrueColor. + +3.6 + Many patches, thanks to Ron Hitchens . + xlock now appears over the screensaver, passwd.c reorganized, + new event loop in xlock.c, new icons in bitmaps, updated clock + and triangle, and resource parsing fixed for "xlock". + pedal renamed to petal. + Clock mode updated to change in size thanks to original author + Petit Jeremie . + More context handling stuff for DCE thanks to Terje Marthinussen + . + slip mode added thanks to Scott Draves + with a patch from . + patch for -messagesfile code favored early quotes and new event loop + compatibility thanks to . + XLock.ad and xlock.man updated to be more consistent. + ultrix fix for strdup thanks to Erik Bertelsen . + invalid sound added thanks to + Thanks to for helping to debug marquee and nose + on multiheaded machines. + +3.5 + Fixed my goof on worm.c. + vms_play fixed for nonexisting sound files and -messagesfile code + updated thanks to . + marquee now more random and memmove no longer used. + marquee fixed for multiheaded machines thanks to Caleb Epstein + . + Random number generator fixed for 64 bit "long" thanks to Scott McCoy + . + +3.4 + rplay patch thanks to Simon Banks . xlock now + has sound where available. Edit your favorite makefile. + 2 new modes thanks to Tobias Gloth . + marquee (I changed a lot) shows text on the screen, similar to nose + triangle, (colormaping removed) similar to mountain + nose text functions removed to utils.c + image.c now with -imagefile option (only with XPM). + rect.c name changed to shape.c. + swirl.c and world.c fixed for multiscreens, thanks to Grant McDorman + . + A better way of handling fortunes from a file, thanks to Jouk Jansen + . To try use -messagesfile fortune.dat. + Also contributed vms_play.c and a new make.com file. + KERBEROS patch thanks to Omar Siddique for sending + and testing it (patch author unknown). + +3.3 + LIFE_5655 and LIFE_6767 compile time options for life3d. + ultrix passwd bug fix thanks to Erik Bertelsen . + nose now has a font option and is fixed for multiscreens. + Stupid memory leak in ant fixed. Now random colors. + swirl now needs to be used with -install to look right, + thanks to Heath A. Kehoe . + Patch for AIX thanks to Jouk Jansen . + Color pixmaps for bat from . + image pixmaps now default to bitmaps if xpm fails, thanks to + . + flame crashed xlock when using random mode on Linux, fixed. + Numerous fixes for multiscreens incl: bat, bounce, rect, hyper, life1d, + forest, laser, mountain, and braid. Also xlock.c patched or second + screen would have a black and white display. + Purify found memory leaks in swirl, mountain, laser, hyper, maze. + Thanks to . + New option -lockdelay #, for those who were bothered by xautolock + locking the screen when you you did not want it, now just hit + return (within a specified number of seconds) to get the screen back. + This option is intended to be used with xautolock. + worm now has no limit on the number of worms. + pyro bug fixed for large batchcount (500-2000), thanks to + Minoura Makoto . + +3.2 + Doug McLaren noticed a big security hole in + nose.c when xlock is setuid to root. Now, after the password is + read, it gives up root, thanks to Heath A. Kehoe + . + DCE Authentication patch added. + Thanks to Jouk Jansen for clearing up + a timing problem using -DOLD_EVENT_LOOP . + +3.1 + Multipatch by Heath A. Kehoe it includes + speed up in helix, random mode now switches modes, input to mode + is now customizable (see random.c), and a DCE authentication patch + (based on work by Phil O'Connell ). Also + usleep was dropped in favor of a new timing mechanism. It is still + available using -DOLD_EVENT_LOOP (VMS still uses it by default). + braid.c thanks to John Neil . + helix now looks even better. I found a bug in the translation from + xscreensaver. + nose.c may still need a little work (its a bit slow). Taken from 2 + sources xnlock and xscreensaver's noseguy. It no longer leaves + dust on the screen as well (the bitmaps are shifted up by one pixel). + pedal.c taken from xscreensaver. + Patches for OSF1_ENH_SEC but it unfortunately seems to need more work. + Idea to have the mode.h defaults used thanks to Roland Bock + . + closedown patch for xdm use from Janet Carson's xclosedown + with modifications from Anthony Thyssen . + image.c updated to use xbm if using a monochrome monitor or using -mono. + life1d, bug.c, ant.c, and demon.c added from Scientific American's + Computer Recreations. + hop.c now has Peter de Jong's hop. Half the time its boring but + the other half of the time its great. + A better patch from Peter Schmitzberger for + spiral (a bug that I introduced). + +3.0 + Patch from Peter Schmitzberger for maze and image. + Thanks to Shane Watts for helping me with + Linux shadowing. + world.c backward spinning jump fixed by Neale Pickett . + laser.c bug (that I introduced) solved by Heath A. Kehoe + . + Edited rect so that it does ellipses as well, like After Dark. + I should of renamed it right? + Got rid of "+=" in Imakefile because HP, AIX, and Ultrix have + trouble with it. Still used by some systems where there seems to + be no trouble. + passwd.c extracted from xlock.c and xlock.h . May have cured some + bugs (like a BIG network security bug) but most likely broke some + systems. Thanks for the many people who gave feedback during + the BETA test. + +2.10 + xlockrc password for more user control of xlock. Author unknown. + It is a compile-time option, see Imakefile and README. + Moved usleep.c and hsbramp.c to utils.c and logout.c to opt.c . + Split out mode.h from resource.c . + Changes of Skip_Burrell@sterling.com were incorporated into image.c . + Not sure how to get pixmaps to randomize color and -mono does + not work for pixmaps. See Imakefile and README. + -allowroot now works on Solaris2.x. + Clock mode added, thanks to Jeremie Petit . + laser and mountain modes added, similar to After Dark's version, and + also forest mode thanks to Pascal Pensa . + Updated maze and helix after seeing mountain mode. Do not have to + wait a second to enter password. :) + Now provide random number generator. Thanks to Mike Arras + . I changed RAND to LRAND. + Due to overwhelming demand, the old flame is back... well OK its + slightly modified. + Patch for SUNOS_ADJUNCT_PASSWD, thanks to Dale A. Harris + . + Imakefile reorganized for AIX. + +2.9 + "make install.man" should now work for imake users (if you would like + it to work for Makefile.hp ... mail me the patch). + Unbundled SunC warnings removed in bitmap files, maze, grav, life, + and swirl. + Swirl patched to work sensibly with TrueColor displays, thanks to + Steve Early + Rock mode made much better by Jeremie Petit . + Imakefile reorganized by for Solaris2.x . + Reorganized the README and the screens are now (mostly) alphabetical + throughout. + Updated life3d to include compile-time options LIFE_5766 and LIFE_4555. + 5766 is more like life, but 4555 (default) seems to be better. + I went through the lifep.zip (May 94) collection and pulled out some + small and interesting life forms. + I added another control to the screens. "-cycles num" influences the + time out (it applies to about a 1/3 of the screens, see man pages). + For consistency, the meaning of batchcount for qix, life, life3d, + and rect was changed. References to "seconds()" in the screens were + removed. The length of a "cycle" depends on "delay". + Multidisplay bug fix for maze, thanks to . + AIXV3 with AFS, thanks to . + +2.8 + No more bomb.c, if you think xlock needs it, let the maintainer know. + full_lock rewritten by Dale A. Harris to + handle non-login groups as well. + fixed a bug in wator, introduced in 2.7. + fixed nanosleep bug for delays of 1 second or more. Nanosleep is now + used by default on Solaris. The Imakefile will have to be modified + if using Solaris 2.0-2.2, since nanosleep is not available. + I do not know why, but the logout out feature now works on Solaris. + Various warnings and errors fixed in make.com, resource.c, logout.c, + and galaxy.c for VMS. Also fixed random generator for VMS not to + toggle the least significant bit. This made worm.c look funny. + xlock now works on VMS/AXP thanks to . One + will have to uncomment sections in make.com . Also fixed some + AIX problems. + Modes spiral and geometry thanks to Darrick Brown . + Batchcount in maze and spline were changed to behave similarly. + A patch from Heath Rice for a better way to handle + batchcount, delay, and saturation. + I went through xlife3.0 huge collection and added "suitable" lifeforms. + +2.7 + sgi patches and logos from Dave Truesdell . + flame bug fixed thanks to and + . + MANY patches from Heath A. Kehoe include: + The long awaited HP patch. It appears there was a bug in HP's XFlush + function. So XSync was substituted. HP_PASSWDETC patch. + maze, swarm, and worm -mono now look better. + Many changes to the Imakefile, new compile time features ... + including a logout button for labs (this appears to be better + implementation than the bomb mode (much of the bomb code has been + reused)) -install option to allow xlock to install its own colormap + if it runs out of colors. + Thanks to for yet another option: + grabmouse for compatibility with xscreensaver. So you would set + your apps-defaults file for xscreensaver like: + +*programs: xlock -nolock +grabmouse -mode random + + Updated life3d to include shooting gliders. + BSD and Linux icons slightly modified. Also new ships for life. + Compile time options HAS_RAND, HAS_RANDOM, and HAS_RAND48, and + updated the sccsid so `what` will give you something meaningful. + +2.6 + Created a HAS_USLEEP and a USE_VROOT switch. + There were numerous reports of the incompatibility with tvtwm, + (also problems with windows with StickyAbove set to true and + swirl), read the README section on that. + Thanks to Chris Ross , maintainer of tvtwm, for + fixing various bugs; make depend for R5 and less, life3d should not + have malloc.h, and a time-elapsed patch. + A few new life forms for life.c. Anyone know what SMILEY is really + supposed to look like? :) + Revised -inroot does not lock screen, as this is done better with the + following patch, and as someone pointed out, its not intuitive. + Thanks to Tim Medley for sending the -geometry patch of Mike Peercy + . Many of the modes will fail if the windows + are far from square or are too small. You can place Xlock off the + screen, for example, + xlock -enablesaver -mode blank -geometry +1152+0 + puts the window off the visible screen on a Sun. + A new version of flame.c from the original author Scott Draves + . + Something really devilish for BSD (new icons) thanks to J Wunsch + , but they have been modified. I also created a + Linux icon. + A patch for Ultrix systems (at least DECstations) running enhanced + security thanks to Chris Fuhrman and friend. + Multidisplay bug fix for life3d and wator, thanks to + . + Life3d on a monochrome monitor looks a little better. -mono was + working right. + +2.5 + A patch for swirl for fixed color maps (more colorful) and the + image now spirals outwards from the center with a fixed number of + points drawn every iteration, thanks to . + A patch for blot on dual-headed machines and nanosleep, thanks to + Greg Onufer . Use nanosleep on Solaris2.3 + and greater, examine the Imakefile and/or README for details. + A long needed patch for X11R5+ for -delay, -batchcount, and + -saturation to work thanks to Patrick D Sullivan . + bomb mode patch for more flexibility thanks to Dave Shield + . + bomb mode patch for Sun10 thanks to Nicolas Pioch . + modes wator and life3d added. + life now has a random soup pattern stolen from life3d. + -inroot option added, thanks to Bill Woodward . + Now more compatible with xscreensaver if run as + "xlock -mode kaleid -inroot -nolock". + +2.4 + hopalong now includes a sine hop (but less likely to come up). + life now has new organisms. They are now better centered. Some of + the nonperiodic forms were removed. + life's gliders now come from the edge of the screen, usually. + image now centers icons, for example, the hp icon is now centered. + blot now randomly has xsym, ysym, or both. + Solaris should now compile out of the box to handle shadow passwords. + Thanks to Alain Brossard . + rock, grav, rect, bat, world, bounce and swirl fix for 24 bit colors. + Patch for building under HP-UX with Secured Passwords, thanks to + Dale Harris . + +2.3 + Now the X Logo displays if not Sun or HP. + "bat" mode disastrous bug fixed. Thanks to R.K.Lloyd@csc.liv.ac.uk + for pointing it out. + -DMOUSE_MOTION switch added for those who want the Password window to + come up if you just moved the mouse. (Not recommended). + "swirl" mode was modified to check background, foreground, and black + so as not to cycle these colors, special thanks to Mark Dobie + . + -DFORCEFIXEDCOLORS switch for those who are annoyed by swirl cycling + its colors. + +2.2 + Made more consistent with the slackware release. XLock.ad changes + to rock, rotor, and foreground and background colors. + Fixed bug in life.c, evident in the Slackware release. + Minor patch for swirl on HP's due to R.K.Lloyd@csc.liv.ac.uk. + "bat" put back with minor changes. + +2.1 + Large modifications to README. + Patch for building under QNX 4.2 w/ Metrolink X server, thanks to + Brian Campbell . + +2.0 + "swirl" mode was added, thanks to Mark Dobie . + WOW, but not-so-neat on monochrome monitors. + Patch for Solaris 2.3 for local, NIS, and NIS+ passwords, thanks to + . + "image" mode was put back but random will not run it, too boring. + "bomb" mode was added, thanks to . + In order to use extra-long passwords with the Linux, changed + PASSLENGTH from 20 to 64. Thanks to . + +1.14 + Multidisplay bug fix for rect, thanks to . + Now works on IRIX on the SGI. Thanks to . + Now works on NetBSD. Thanks to Greg Earle . + Now works on a Alpha 3000/400 OSF/1 V2.0. Thanks to Udo Linauer + . + "galaxy" mode was added, thanks to Hubert Feyrer + . + "kaleid" mode was added, taken from the Linux version of xkaleid. + +1.13 + "timeelapsed" option was added. Allows you to find out how long a + machine is locked so you can complain to an administrator. + Now may work on IRIX on the SGI. Thanks to Thomas Runge + + "bat" mode was added, thanks to Lorenzo Patocchi . + +1.12 + xlock now works on Linux with shadow passwords. Special thanks to + H. J. Dihu + +1.11 + Shadow passwords and DES encryption are now detected by the Imakefile. + Victor Langeveld reorganized the Imakefile for + shadow passwords and crypt. Now should compile "right out of the + box" (although there are still problems on Solaris 2.3). + Patch to fix sudden rotation changes in rock from Yoshiaki Kasahara + . + +1.10 + R.K.Lloyd@csc.liv.ac.uk reorganized the Imakefile yet again. + Fixed a bug in rect.c thanks to . + Ditched bzero and bcopy since both are more generally available as + memset and memcpy. Also removed some lint warnings. + +1.9 + "rect" mode was added from xscreensaver's greynetic. + "helix" bug fixed. It is now more interesting. + bounce.c divide by zero fixed and grav.c improvements. Thanks to Greg + Bowering . + grav.c, rock.c, world.c fixed so no black objects. + +1.8 + Imakefile did not work with R6. Also Solaris2.3 may use SVR4 + instead of SYSV. Thanks to Chris P. Ross + "grav" mode was added. Its a simplistic gravitational simulation, + with (currently a constant 16) solid spheres (non-rendered) of equal + size and mass orbiting a fixed central mass. The sphere's orbit in + 3 dimensions, their position and size being projected with simple + perspective. Thanks to Greg Bowering . + "inwindow" option was added. Allows you to do what xlock already + did when DEBUG was defined. It no longer locks your screen, but + allows you to run xlock as a (somewhat distracting) decoration. + Thanks to Greg Bowering . + "bounce" mode (football) is back. + "world" mode was added. Thanks to Matthew Moyle-Croft + + "image" mode was removed. It was very similar to world anyway. + +1.7 + cuserid() is needed by Solaris2.3 with shadow passwords in xlock.c. + Thanks to Bill . + +1.6 + R.K.Lloyd@csc.liv.ac.uk pointed out again that gray_bits in maze.c needs + a type cast. + xlock.c defaults to "blank" to minimize cpu usage on a network. + +1.5 + xlock works again on VMS (see README.VMS) thanks to Anthony Clarke + . + memcpy and memset definitions for SYSV. Also there now is a switch + for shadow passwords thanks to . + +1.4 + Now works on BSD. Thanks to Victor Langeveld + Both Victor and Alexandre Miguel + suggested taking out the cuserid() call in xlock.c. For FreeBSD its + a necessity and the old way is is a security hole in SunOS. + +1.3 + Linux port from Darren Senn's (sinster@scintilla.capitola.ca.us) xlock. + Fixed drand to random in helix.c + Fixed a memory leak in rock.c. + +1.2 + SHIFT - CONTROL - BREAK on the HP is trapped. Thanks to + R.K.Lloyd@csc.liv.ac.uk who pointed out that this was done in xscreensaver. + AIXV3 and HP bugs fixed, again due to R. K. Lloyd. + +1.1 & 1.0 + took out "rint" from "worm.c" since HP's have trouble with it + added spline, maze, sphere, hyper, helix, rock, & blot modes. + fixed "xlock.h" and "usleep" for the HP. + changed border so it varies with size of screen on "swarm" so the + wasp would not be stuck in a corner when the password is entered. + +------------------------------------------------------------------------------- + +Original author: Patrick J. Naughton +Site: ftp.x.org in /R5contrib +The changes in the original xlock + +Changes of xlock (sccs version 23.21) patchlevel = 2.3 + o added worm mode. + o old -name and .name changed to -username and .username. + o lint cast. + o change color allocation to allow "#ffaabb" style color names. + o portability bug in flame mode fixed plus some other nits. + o white on black on monochrome screens fixed. +Changes of xlock (sccs version 23.19) patchlevel = 2.2 + o added -name to allow different resource files to be used. + o added -usefirst to allow first keystroke to be used in password. + o made changes to life mode to allow wrap around. + o made old life cells stay blue. + o added -resources to get default resource file. + o added random mode + o added pyro mode + o added flame mode. + o made passwords a little more secure. + o use effective uid to find current user. + o make main window managed by the wm in debug mode. + o some more SVR4 portability changes. + o resource code now looks at XUSERFILESEARCHPATH and XAPPLRESDIR. + o removed verbose copyright info from each file. + +------------------------------------------------------------------------------- + + 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. + + ______________________________________________________________________ + Patrick J. Naughton email: naughton@sun.com + Sun Microsystems Laboratories, Inc. voice: (415) 336 - 1080 + +Maintainer: David A. Bagley diff --git a/docs/TODO b/docs/TODO new file mode 100644 index 00000000..bf022dd2 --- /dev/null +++ b/docs/TODO @@ -0,0 +1,280 @@ +General problems: + + o It would be nice to have an option -idletime time. Where xlock would + run after a certain idle time. (Here xautolock may help you, see + above). + + o xscreensaver compatibility + 2 of the writeable modes: mandelbrot, tube-> get them to RUN (compile ok) + XPM capability needs to be improved. + + o Add a way to get xlock to switch to "blank" mode after X minutes + of (keyboard) inactivity, and to switch back to whatever mode list was + being used when activity is detected. This would be good for + users using DPMS to power down the monitor without using precious cpu + when the modes are not visible. + + o On a PsuedoColor display + xlock -mode life -install & + sleep 5 ; xlock -mode life -install + Colors will all be messed up after the second one tries to run. + This can easily happen if you are using xautolock and decide to lock + the display manually. + + o -wireframe should be a mode option (i.e. you should be able to turn it + on and off for a particular mode). Also a linewidth mode option would be + nice + + o I got an error with moebius running it on opengl on a 24 bit TrueColor like: + xlock -mode moebius -visual PseudoColor + (all the gl modes are messed up anyway... all mono) + + o some configurations of linux: swarm has noise when bees go beyond screen + Sun Ultra5 PCI Bus 24 bit display: flow has some noise (usually red) + + o A few unintialized memory reads and memory leaks were detected in some + of the code. grep for "PURIFY" in the source files to see where the + remaining problems are. Also see docs/Purify for more details. + + o -mono does not work for XPM, especially cartoon (others use XBM when + mono), also cage and stairs. + + o Options within a mode can not be duplicated in other modes. Temporary + solution is to have xlock modes like "-neighbor" that only a few of the + modes use. + + o -use3d -install is messed up on Sun's PseudoColor. Magenta boxes are + seen on the star mode. In worm mode, worms might be red and magenta + instead of red blue (and depending on SunCC or SunOS). + + o Not all resources are listed in "xlock -resources", e.g. nolock. + If xlock is renamed these resources are not picked up. + + o Without any programs stealing your colors, like netscape + xlock -modelist all -sequential -install -verbose + Hit the middle button a hundred times (not to bad on an ultra actually) + or try -duration 1 and let it sit for a while. + The second time it runs the GL modes they have all lost some colors. + This was only noticed on Solaris with pseudocolor. Also noticed on an + ancient HP9000/380 HPUX9.0 with 6 bit depth (without netscape). + + o On a German keyboard and Linux if the password contains special + characters (`|' vertical bar, `@' at-sign) while in debug mode + everything works fine. This probably has something to do with the + X11-keymapping, as these characters are composed with the right Alt-key + on a German keyboard. + + o neighbors option for wator and voters... sometimes circles are not + drawn in the correct spot. A -/+ wrap option would be nice also. + + o OpenGL and DT may be incompatible on PseudoColor. (MesaGL should be + OK.) OpenGL frequently causes xlock to error out on non-default visuals. + + o -visual DirectColor if used with any of the with the writeable modes + (mandelbrot, swirl, or tube) may corrupt the dynamic allocation of memory. + + o Errors in modes, if any, should not break lock. + + o Compile-time option to allow running of separate processes. + + o Fallback font if screen is small for marquee and nose... like bomb + + o make -n install prefix=/foo/bar does not work. + + o "xlock -mode random -modelist image -bitmap ./bitmaps/" + It should change images when middle mouse is pushed or when + -duration time runs out. + + o some sort of completion is used which may be confusing on UNIX + Say if a ../bitmaps directory exists and ../bitmap does not + xlock -mode random -modelist image -bitmap ../bitmap + will try to load ../bitmaps as a file... + + o kill -HUP to change modes as well as middle mouse button. Needed when + using -inroot . + + o jpeg/gif/animated gif support Fix ras for > 8 bit TrueColor + + o "-visual" commandline argument should accept "best" as well as + PseudoColor, TrueColor, default, etc. + + o Is there any chance the "visual" selection code could be made + mode-dependent? Most Xservers that support TrueColor, etc, visuals also + support PseudoColor visuals and it would be nice to have color-cycling + modes like "starfish" and "swirl" pick a PseudoColor visual if available, + while modes like "cartoon" could prevent colormap flashing by picking a + TrueColor visual. + + o modes from xscreensaver :) : bubbles, moire, LMorph, halo, ImsMap, BlitSpin + + +Mode specific problems: +---------------------- + Various modes need better refresh capability. + Various modes need more mouse capability like pacman and worm. + + ant: round ants. This would involve masking and images to do efficiently.:q + + ball: can it be updated to use a pixmap instead of a slow circle fill? + + braid: should be made so that it can be interrupted quicker. + + bouboule: always starts at the bottom right + + bounce: + sometimes a ball does not roll off another ball. + momentum seems to be created. + A -wall option, multiscreens should have balls bouncing between + screens. + -mode bounce -inroot may give BadWindow in X_GetWindowAttributes + if run for a while, but the screen is not locked :) + allow a background picture to be seen behind the bouncing football + (soccer ball) in "bounce" mode. Thus a picture of your favorite + team, etc. can be seen behind the bouncing balls. + football version of "bounce" using a pigskin instead of a soccer ball for + Americans/Canadians/etc. + Different balls with different mass and size. + + bug: + -neighbors option + init_bug should be broken up so it can be interrupted + + dclock: needs a -led [LED] option + + ico: + should have all the features of the original. + triangular face objects do not look good when rotated. + + image: middle button should do something when called like + "-bitmap ./bitmap/" + + flag: + sometimes a refresh causes a white background rectangle + + hop: center and size many of the hops. + + kaleid: needs to be triangular. + + life: + -find option to find new lifeforms. (mail the results out :) ). + Allow more symmetric type rules as proposed by Dr. Andreen. + When the bitmap is big it is rejected. Probably could be handled + better but if accepted then the screen could be blank because there + are bitmaps that are off screen. + + life3d: draws invisible cubes when it does not have to. The original + MS DOS code weeded this out, but it did not seem to port to X. + Also see life. + + marquee: + "-messagefile filename" truncates a large file. + "-message string" does not handle Control-H correctly. + + mountain: -size # for mountain should do something. + + nose: should handle Control-H better for underlining and accents. + + pyro: needs XDrawSegments code similar to swarm to give it depth. + + slip: + should be less jarring + get rid of single color blotch. + should be made so that it can be interrupted quicker. + + star: + fractal cracks when hit by rocks (with sound?) + user defined ships (user defined pixmaps like eyes and pacman). + stars should look more star-like "*"'s + + wire: it needs a better circuit generator. + + xglock: Needs a lot of work. + + kscreensaver: port xlock to KDE. + + +New mode ideas... (some may be very hard :) ): +--------------------------------------------- + o "dead" a Grateful Dead mode with dancing bears/skeletons/turtles. + (Or maybe "nose" in a tie die?) + o "floyd" a Pink Floyd mode from the cover of "Dark Side of the Moon" + with a turning prism and rainbow effect. + o "graph" a random planar graph drawn ... filled in by a 5 (or 4 :) ) + coloring algorithm. + o "minimal" a random minimal surface generator. + o "snow" mode with a nice Winter scene picture background and snowflakes + falling + o "squig" mode from squig/xsquig (xsquig is too slow) + o A NT-like GL 3d Maze, where you are inside the maze + o NT-like GL FlowerBox spring and Flying Objects + o A GL 4d ico where the 6 4D "platonic" objects "roll" around in 3d space. + o GL modes based on demos: isosurf, reflect, bounce, stex3d + o KitCat (R) clock mode (based on X11 catclock, a version of xclock) where + the cat clock floats around the screen like "dclock" mode does. Colors + of cat clock could be picked like nose-guy in "nose" mode. + o Lottery with bouncing numbered balls like PowerBall. + o A simple set of 2d geometric shapes that morph into one another whilst + colour cycling. So say you start with a rectangle that morphs into a + circle (leaving a small trail like Qix) that morphs into a triangle + that morphs into a polygon that morphs into a rectangle, etc. All the + while you have movement and colour cycling like Qix. If the trail is to + large then things could become messy, but if too short then you loose the + history element. + o A simple bouncing ball on a chess board. The ball is a silver + ray-traced/rendered globe. The chess board is a series of black and + white squares. Each black square is gold veined marble with the gold + glinting. Each white square is a textured surface (like little bumps, or + ridges). The whole sceen is lit from two light sources (either fixed or + moving). As the ball bounces it reflects like a mirror what is around it. + o A variant of the above whould be to hold that ball still in the centre of + the screen and move a randomly chosen bitmap around the ball. + o The above could also have embossed on standout lettering added (say a + single word like Linux). The lettering could either be stationary or + float around the ball in orbit a bit like the the Universal studios logo + where the Universal name revolves around a picture of the earth. + o Take pipes and add the constantly moving view point that you get with + rock so the mass of pipes seems to revolve and rotate around a moving + point in space. + o Make the little man in Nose seem to carve the letters of the message into + rock, or paint them on the screen. + o Make marquee use 3d extruded text that can be texture mapped and seem to + zoom into and out of the screen with the zomm source point drifting + around the screen at random + o Make puzzle take the present desktop image, invert it and shuffle the + pieces then put the whole things back. Once it has reassembled the + desktop you could have the image flip top over bottom as it receeds into + the screen, only to have a new randomly shuffled version of the desktop + flip back out. + o Use the spheres generated in sphere to draw molocules on the screen, + colour coding for the various types of atom present. A limit on the size + of each sphere would be needed. The spheres could be joined by simple + white lines. If you are feeling adventurious you could make it seem to + rotate in space so all parts of the molocule could be seen. + o In shape change things so that the shapes appear to be extruded from a + random point on the screen. You could aslo have a number of shapes be + extruded, each from its own origin, only to shrink back into the screen + again. Each time a shape shrinks back into the screen the origin would + move and a new shape would be choosen. + o When the screensaver is started have curtains drawn accross the desktop + at a medium pace, a second or twos pause then the curtain a pulled open + quickly to reveal a bitmaped image in place of the desktop. This cycles + with a different image each time. + o In pyro have the fireworks appear to zoom from a randomly choose point on + the screen. This would give the effect of the display being seen from + above. + +PLEASE NOTE: +----------- + I _REALLY_ hate to turn down contributions... I will try to consider + all submissions. Some things on new modes that bother me are: + Did not black out the screen when they start. I do not like people + to see what I am doing. :^| + Did not work in the little window or buggy. + Is too similar mode to a mode that already exists. (Maybe an option could + be added on an existing mode?). + Many people complained about the mode. + Just not enough randomness or is not interesting enough. + No multiscreen support. + But I labor over them (in a haphazard fashion) and they usually are + released eventually. (If they are in assembler I would definitely need + a working example and all the binaries and libraries to get it to run.) diff --git a/docs/cell_automata b/docs/cell_automata new file mode 100644 index 00000000..71c43be2 --- /dev/null +++ b/docs/cell_automata @@ -0,0 +1,161 @@ +There are a few modes devoted to cellular automata. +I also added a bunch of options. So I am providing a little explanation +so it is not overwhelming. I also say a little something at the top of the +C file of each. If your favorite little automaton is not here (or you think +it should be enhanced)... let me know. +The modes are ant, bug, demon, dilemma, life, life1d, life3d, loop, voters, +wator and wire. +use -install if netscape is stealing all your colors... :) +"xlock -help" may be helpful too. + +ant: Turing Machines where the tape is the screen. + Special options: + -truchet: this shows the path (good to use with -size at + least 10) Truchet option turned off if its not Turk's ants. + + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : number of ants + -cycles : how many cycles before a new ant + -size : size of ant in pixels + + -neighbors : 0 random, 4 ants, 3 & 6 bees, (8, 9, and 12 + are also available, but in my opinion, produces nonsence) + -verbose: verbose help identify ant (good to use with -inwindow or -debug) + +bug: Evolving bugs learn to walk straight (except in the garden) unlike + other modes there is no wrapping + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : number of bugs + -cycles : how many cycles before a new world + -size : size of bug in pixels + + -neighbor : option has no effect. Currently supports only a hexagonal + arrangement (6) (other neighborhoods currently in development) + +demon: A simple modulo automata + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : number of states + -cycles : how many cycles before a new screen + -size : size of cell in pixels + + -neighbors : 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12 + triangular + +dilemma: Happy (good) and Mean (bad) cells compete for domination + Special options: + -conscious: (default) uses its own state in calculation of payoff + +conscious: does not use its own state in calculation of payoff + -bonus : payoff for defecting + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : number of bad or defecting initial cells + -cycles : how many cycles before a new screen + -size : size of cell in pixels (mean faces and happy faces become + polygons and circles if not 0) + + -neighbors : 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12 + triangular (mean faces and happy faces become polygons and circles if + not 4 or 8) + +life: + Special options: + -rule : survival and birth parameters formated + S/B, so Conways rule is S23/B3. + Two format exceptions: + -rule P: Picks a random rule from all rules that have known patterns + -rule G: Picks a random rule from all rules that have known gliders + -callahan: Paul Callahan's B2a/S2b34 hexagonal life + -andreen: Bob Andreen's B2a3a4b/S2a2b4a hexagonal life + -lifefile : only the #P format of xlife + There is a limit of 128 initial live cells set by NUMFILEPTS in life.c. + + Mode options: + -cycles : how many cycles before a new lifeform + -batchcount : number of cycles before glider (if one exists) + -delay : controls the length of a cycle in microsec + -size : size of cell in pixels, if 0 may default to bitmap + + -neighbors : 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12 + triangular + -verbose: verbose help identify life (to be referenced with the source code) + (good to use with -inwindow or -debug) + +life1d: 1 dimensional life + Special options: + -totalistic: (default) totalistic 1d life + +totalistic: LCAU collection These rules may not be symmetric and are + more general (totalistic is a subset). + + Mode options: + -delay : controls the length of a cycle in microsec + -cycles : how many pages before a new lifeform + -size : size of cell in pixels, if 0 may default to bitmap + + -verbose: verbose to help identify life (to be referenced with the source + code) (good to use with -inwindow or -debug) + +life3d: 3 dimensional life + Special options: + -rule3d : survival and birth parameters formated + S/B, so Bays' rules are S45/B5, S567/B6, + S56/B5, and S67/B67. There is currently no way of accessing the + neighborhoods 10 to 27. + Two format exceptions: + -rule3d P: Picks a random rule from all rules that have known patterns + -rule3d G: Picks a random rule from all rules that have known gliders + -life3dfile : similar to the #P format of xlife, 3 integers are + required to center, sequential linefeeds imply a depth change + There is a limit of 84 initial live cells set by NUMFILEPTS in life3d.c. + + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : number of cycles before glider (if one exists) + -cycles : how many cycles before a new lifeform + + -verbose: verbose to help identify life (to be referenced with the source + code) (good to use with -inwindow or -debug) + +loop: Chris Langton's loops, its always the same but oriented 4 ways + this is far as I know is the best example of a self-generating life form. + Caution: this may cause you to question G-d's existence. :) + Mode options: + -delay : controls the length of a cycle in microsec + -cycles : how many cycles before it starts over + -size : size of cell in pixels + +voters: your political belief is influenced by your neighbor + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : number of parties 2 or 3 (3 may not be available) + -cycles : how many cycles before a new world starts + -size : size of cell in pixels (elephants and donkeys become + squares and circles if not 0, hammer/sickle unavailable) + + -neighbors : 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12 + triangular (elephants and donkeys become squares and circles if + not 4 or 8, hammer/sickle unavailable) + +wator: sharks and fish on a water torus planet + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : breed time for the fish + -cycles : how many cycles before a new world starts + -size : size of cell in pixels (sharks and fish become polygons + and circles if not 0) + + -neighbors : 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12 + triangular (sharks and fish become polygons and circles if not 4 or 8) + +wire: (this mode lacks a good circuit generator) unlike other modes there + is no wrapping + Mode options: + -delay : controls the length of a cycle in microsec + -batchcount : length of random circuit + -cycles : how many cycles before a circuit + -size : size of cell in pixels + + -neighbors : 0 random, 4 & 8 rectangular, 6 hexagonal, 3, 9 & 12 + triangular diff --git a/docs/xlock.hlp b/docs/xlock.hlp new file mode 100644 index 00000000..da1b1af7 --- /dev/null +++ b/docs/xlock.hlp @@ -0,0 +1,1783 @@ +1 XLOCK + + + +2 User Commands XLOCK(1) + + + +2 NNNNAAAAMMMMEEEE +xlock - Locks the local X display until a password is +entered. + + +2 SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS +xxxxlllloooocccckkkk [ -hhhheeeellllpppp ] [ -vvvveeeerrrrssssiiiioooonnnn ] [ -rrrreeeessssoooouuuurrrrcccceeeessss ] [ -ddddiiiissssppppllllaaaayyyy +_d_i_s_p_l_a_y_n_a_m_e ] [ -vvvviiiissssuuuuaaaallll _v_i_s_u_a_l_n_a_m_e ] [ -nnnnaaaammmmeeee _r_e_s_o_u_r_c_e_n_a_m_e ] +[ -mmmmooooddddeeee _m_o_d_e_n_a_m_e ] [ -ddddeeeellllaaaayyyy _u_s_e_c_s ] [ -bbbbaaaattttcccchhhhccccoooouuuunnnntttt _n_u_m ] [ +-ccccoooouuuunnnntttt _n_u_m ] [ -ccccyyyycccclllleeeessss _n_u_m ] [ -nnnnccccoooolllloooorrrrssss _n_u_m ] [ -ssssiiiizzzzeeee _n_u_m ] +[ -ssssaaaattttuuuurrrraaaattttiiiioooonnnn _v_a_l_u_e ] [ -eeeerrrraaaasssseeeemmmmooooddddeeee _m_o_d_e_n_a_m_e ] [ -eeeerrrraaaasssseeeeddddeeeellllaaaayyyy +_u_s_e_c_s ] [ ----////++++aaaalllllllloooowwwwaaaacccccccceeeessssssss ] [ -vvvvttttlllloooocccckkkk _m_o_d_e_n_a_m_e ] [ ----////++++nnnnoooolllloooocccckkkk +] [ ----////++++iiiinnnnwwwwiiiinnnnddddoooowwww ] [ ----////++++iiiinnnnrrrrooooooootttt ] [ ----////++++rrrreeeemmmmooootttteeee ] [ ----////++++mmmmoooonnnnoooo ] [ +----////++++aaaalllllllloooowwwwrrrrooooooootttt ] [ ----////++++ddddeeeebbbbuuuugggg ] [ ----////++++ddddeeeessssccccrrrriiiippppttttiiiioooonnnn ] [ ----////++++eeeecccchhhhooookkkkeeeeyyyyssss +] [ ----////++++eeeennnnaaaabbbblllleeeessssaaaavvvveeeerrrr ] [ ----////++++rrrreeeesssseeeettttssssaaaavvvveeeerrrr ] [ ----////++++ggggrrrraaaabbbbmmmmoooouuuusssseeee ] [ ---- +////++++ggggrrrraaaabbbbsssseeeerrrrvvvveeeerrrr ] [ ----////++++iiiinnnnssssttttaaaallllllll ] [ ----////++++mmmmoooouuuusssseeeemmmmoooottttiiiioooonnnn ] [ ----////++++ssssoooouuuunnnndddd +] [ ----////++++ttttiiiimmmmeeeeeeeellllaaaappppsssseeeedddd ] [ ----////++++uuuusssseeeeffffiiiirrrrsssstttt ] [ ----////++++vvvveeeerrrrbbbboooosssseeee ] [ -nnnniiiicccceeee +_l_e_v_e_l ] [ -lllloooocccckkkkddddeeeellllaaaayyyy _s_e_c_o_n_d_s ] [ -ttttiiiimmmmeeeeoooouuuutttt _s_e_c_o_n_d_s ] [ -ffffoooonnnntttt +_f_o_n_t_n_a_m_e ] [ -ppppllllaaaannnnffffoooonnnntttt _f_o_n_t_n_a_m_e ] [ -bbbbgggg _c_o_l_o_r ] [ -ffffgggg _c_o_l_o_r +] [ -bbbbaaaacccckkkkggggrrrroooouuuunnnndddd _c_o_l_o_r ] [ -ffffoooorrrreeeeggggrrrroooouuuunnnndddd _c_o_l_o_r ] [ -uuuusssseeeerrrrnnnnaaaammmmeeee +_s_t_r_i_n_g ] [ -ppppaaaasssssssswwwwoooorrrrdddd _s_t_r_i_n_g ] [ -iiiinnnnffffoooo _s_t_r_i_n_g ] [ -vvvvaaaalllliiiiddddaaaatttteeee +_s_t_r_i_n_g ] [ -iiiinnnnvvvvaaaalllliiiidddd _s_t_r_i_n_g ] [ -ggggeeeeoooommmmeeeettttrrrryyyy _g_e_o_m ] [ +-iiiiccccoooonnnnggggeeeeoooommmmeeeettttrrrryyyy _g_e_o_m ] [ -ggggllllggggeeeeoooommmmeeeettttrrrryyyy _g_e_o_m ] [ ----////++++ffffuuuullllllllrrrraaaannnnddddoooommmm ] +[ ----////++++wwwwiiiirrrreeeeffffrrrraaaammmmeeee ] [ ----////++++uuuusssseeee3333dddd ] [ -ddddeeeellllttttaaaa3333dddd _v_a_l_u_e ] [ -nnnnoooonnnneeee3333dddd +_c_o_l_o_r ] [ -rrrriiiigggghhhhtttt3333dddd _c_o_l_o_r ] [ -lllleeeefffftttt3333dddd _c_o_l_o_r ] [ -bbbbooootttthhhh3333dddd _c_o_l_o_r +] [ -pppprrrrooooggggrrrraaaammmm _p_r_o_g_r_a_m_n_a_m_e ] [ -mmmmeeeessssssssaaaaggggeeeessssffffiiiilllleeee _f_o_r_m_a_t_t_e_d- +_f_i_l_e_n_a_m_e ] [ -mmmmeeeessssssssaaaaggggeeeeffffiiiilllleeee _f_i_l_e_n_a_m_e ] [ -mmmmeeeessssssssaaaaggggeeee _s_t_r_i_n_g ] [ +-mmmmeeeessssssssaaaaggggeeeeffffoooonnnntttt _f_o_n_t_n_a_m_e ] [ -bbbbiiiittttmmmmaaaapppp _f_i_l_e_n_a_m_e ] [ -nnnneeeeiiiigggghhhhbbbboooorrrrssss +_n_u_m ] [ ----////++++mmmmoooouuuusssseeee ] [ -ccccppppaaaasssssssswwwwdddd _c_r_y_p_t_e_d-_p_a_s_s_w_o_r_d ] [ -ffffoooorrrrcccceeeeLLLLoooo---- +ggggoooouuuutttt _m_i_n_u_t_e_s ] [ -llllooooggggoooouuuuttttBBBBuuuuttttttttoooonnnnLLLLaaaabbbbeeeellll _t_e_x_t_s_t_r_i_n_g ] [ -llllooooggggoooouuuutttt---- +2 BBBBuuuuttttttttoooonnnnHHHHeeeellllpppp _t_e_x_t_s_t_r_i_n_g ] [ -llllooooggggoooouuuuttttFFFFaaaaiiiilllleeeeddddSSSSttttrrrriiiinnnngggg _t_e_x_t_s_t_r_i_n_g ] [ +----////++++ddddttttssssaaaavvvveeeerrrr ] [ -mmmmoooodddduuuulllleeeeppppaaaatttthhhh _p_a_t_h ] [ -lllloooocccckkkkssssoooouuuunnnndddd _s_t_r_i_n_g ] [ +-iiiinnnnffffoooossssoooouuuunnnndddd _s_t_r_i_n_g ] [ -vvvvaaaalllliiiiddddssssoooouuuunnnndddd _s_t_r_i_n_g ] [ -iiiinnnnvvvvaaaalllliiiiddddssssoooouuuunnnndddd +_s_t_r_i_n_g ] [ -ssssttttaaaarrrrttttCCCCmmmmdddd _s_t_r_i_n_g ] [ -eeeennnnddddCCCCmmmmdddd _s_t_r_i_n_g ] [ +-llllooooggggoooouuuuttttCCCCmmmmdddd _s_t_r_i_n_g ] + + +2 DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN +xxxxlllloooocccckkkk locks the X server till the user enters their password +at the keyboard. While xxxxlllloooocccckkkk is running, all new server +connections are refused. The screen saver is disabled. The +mouse cursor is turned off. The screen is blanked and a +changing pattern is put on the screen. If a key or a mouse +button is pressed then the user is prompted for the password +of the user who started xxxxlllloooocccckkkk. + +2 If the correct password is typed, then the screen is +unlocked and the X server is restored. When typing the +password Control-U and Control-H are active as kill and +erase respectively. To return to the locked screen, click +in the small icon version of the changing pattern. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 1 + + + + + + +2 User Commands XLOCK(1) + + + +2 In the lower part of the password screen a text is +displayed. This message is taken from the first file of the +following that exists: $HOME/.xlocktext, $HOME/.plan, or +$HOME/.signature. + +2 On systems which support new BSD style authentication, the +password may be prefixed by an authentication style followed +by a colon (i.e. "style:password"). See the login.conf(5) +for more information on authentication styles. + + +2 NNNNOOOOTTTTEEEE OOOONNNN EEEETTTTIIIIQQQQUUUUEEEETTTTTTTTEEEE +_X_l_o_c_k should not be used on public terminals when there is a +high demand for them. + +2 If you find a public terminal that has been locked by +another user and there are no other terminals available, and +the terminal appears to have been left idle for a while +(normally more than 15 minutes), it is fair to try to reset +the session in some manner. + + +2 OOOOPPPPTTTTIIIIOOOONNNNSSSS +-hhhheeeellllpppp + Print options and a brief description to standard out- + put. + +-vvvveeeerrrrssssiiiioooonnnn + Print version number (if >= 4.00) to standard output. + +-rrrreeeessssoooouuuurrrrcccceeeessss + Print default resource file to standard output. + +-ddddiiiissssppppllllaaaayyyy _d_i_s_p_l_a_y_n_a_m_e + The _d_i_s_p_l_a_y option sets the X11 display to lock. xxxxlllloooocccckkkk + locks all available screens on a given server, and res- + tricts you to locking only a local server such as + uuuunnnniiiixxxx::::0000,,,, llllooooccccaaaallllhhhhoooosssstttt::::0000,,,, or ::::0000 unless you set the -rrrreeeemmmmooootttteeee + option. + +-vvvviiiissssuuuuaaaallll _v_i_s_u_a_l_n_a_m_e + _v_i_s_u_a_l_n_a_m_e which is one of "StaticGray", "GrayScale", + "StaticColor", "PseudoColor", "TrueColor", + "DirectColor", or "default". default used to set the + screen's default visual (the visual of the root win- + dow). + +-nnnnaaaammmmeeee _r_e_s_o_u_r_c_e_n_a_m_e + _r_e_s_o_u_r_c_e_n_a_m_e is used instead of XXXXLLLLoooocccckkkk when looking for + resources to configure xxxxlllloooocccckkkk. + +-mmmmooooddddeeee _m_o_d_e_n_a_m_e + + + +2 X11R6 Contrib Last change: 8 Mar 1999 2 + + + + + + +2 User Commands XLOCK(1) + + + + As of this writing there are over 90 display modes sup- + ported (plus one more for random selection of one of + these). + +aaaannnntttt Shows Langton's and Turk's generalized ants. + +aaaattttllllaaaannnnttttiiiissss + Shows moving sharks/whales/dolphin. May not be + available depending on how it was configured. + +bbbbaaaallllllll Shows bouncing balls. + +bbbbaaaatttt Shows bouncing flying bats. + +bbbbllllooootttt Shows Rorschach's ink blot test. + +bbbboooouuuubbbboooouuuulllleeee + Shows Mimi's bouboule of moving stars. + +bbbboooouuuunnnncccceeee Shows bouncing footballs. + +bbbbrrrraaaaiiiidddd Shows random braids and knots. + +bbbbuuuubbbbbbbblllleeee Shows popping bubbles. + +bbbbuuuubbbbbbbblllleeee3333dddd + Shows Richard Jones's GL bubbles. May not be avail- + able depending on how it was configured. + +bbbbuuuugggg Shows Palmiter's bug evolution and a garden of Eden. + +ccccaaaarrrrttttoooooooonnnn Shows bouncing cartoons. May not be available + depending on how it was configured. + +cccclllloooocccckkkk Shows Packard's oclock. + +ccccoooorrrraaaallll Shows a coral reef. + +ccccrrrryyyyssssttttaaaallll Shows polygons in 2D plane groups. + +ddddaaaaiiiissssyyyy Shows a meadow of daisies. + +ddddcccclllloooocccckkkk Shows a floating digital clock. + +ddddeeeeccccoooo Shows art as ugly as sin. + +ddddeeeemmmmoooonnnn Shows Griffeath's cellular automata. + +ddddiiiilllleeeemmmmmmmmaaaa Shows Lloyd's Prisoner's Dilemma simulation. + +ddddiiiissssccccrrrreeeetttteeee + Shows various discrete maps. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 3 + + + + + + +2 User Commands XLOCK(1) + + + +ddddrrrriiiifffftttt Shows cosmic drifting flame fractals. + +ccccaaaaggggeeee Shows the Impossible Cage, an Escher-like GL scene. + May not be available depending on how it was config- + ured. + +eeeeyyyyeeeessss Shows eyes following a bouncing grelb. + +ffffaaaaddddeeeeppppllllooootttt + Shows a fading plot of sine squared. + +ffffllllaaaagggg Shows a waving flag of your operating system. + +ffffllllaaaammmmeeee Shows cosmic flame fractals. + +fffflllloooowwww Shows dynamic strange attractors. + +ffffoooorrrreeeesssstttt Shows binary trees of a fractal forest. + +ggggaaaallllaaaaxxxxyyyy Shows crashing spiral galaxies. + +ggggeeeeaaaarrrrssss Shows GL's gears. May not be available depending on + how it was configured. + +ggggoooooooopppp Shows goop from a lava lamp. + +ggggrrrraaaavvvv Shows orbiting planets. + +hhhheeeelllliiiixxxx Shows string art. + +hhhhoooopppp Shows real plane iterated fractals. + +hhhhyyyyppppeeeerrrr Shows spinning n-dimensional hypercubes. + +iiiiccccoooo Shows a bouncing polyhedron. + +iiiiffffssss Shows a modified iterated function system. + +iiiimmmmaaaaggggeeee Shows randomly appearing logos. + +jjjjuuuulllliiiiaaaa Shows the Julia set. + +kkkkaaaalllleeeeiiiidddd Shows Brewster's Kaleidoscope. + +kkkkuuuummmmmmmmppppaaaa Shows kumppa. + +llllaaaasssseeeerrrr Shows spinning lasers. + +lllliiiiffffeeee Shows Conway's game of life. + +lllliiiiffffeeee1111dddd Shows Wolfram's game of 1D life. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 4 + + + + + + +2 User Commands XLOCK(1) + + + +lllliiiiffffeeee3333dddd Shows Bays' game of 3D life. + +lllliiiigggghhhhttttnnnniiiinnnngggg + Shows Keith's fractal lightning bolts. + +lllliiiissssaaaa Shows animated lissajous loops. + +lllliiiissssssssiiiieeee Shows lissajous worms. + +lllloooooooopppp Shows Langton's self-producing loops. + +mmmmaaaannnnddddeeeellllbbbbrrrrooootttt + Shows mandelbrot sets. + +mmmmaaaarrrrqqqquuuueeeeeeee Shows text. + +mmmmaaaazzzzeeee Shows a random maze and a depth first search solu- + tion. + +mmmmooooeeeebbbbiiiiuuuussss Shows the Moebius Strip II, an Escher-like GL scene + with ants. May not be available depending on how it + was configured. + +mmmmoooorrrrpppphhhh3333dddd Shows GL morphing polyhedra. May not be available + depending on how it was configured. + +mmmmoooouuuunnnnttttaaaaiiiinnnn + Shows Papo's mountain range. + +mmmmuuuunnnncccchhhh Shows munching squares. + +nnnnoooosssseeee Shows a man with a big nose runs around spewing out + text. + +ppppaaaaccccmmmmaaaannnn Shows Pacman(tm). + +ppppiiiippppeeeessss Shows a self-building pipe system. May not be + available depending on how it was configured. + +ppppeeeennnnrrrroooosssseeee Shows Penrose's quasiperiodic tilings. + +ppppeeeettttaaaallll Shows various GCD Flowers. + +ppppuuuuzzzzzzzzlllleeee Shows a puzzle being scrambled and then solved. + +ppppyyyyrrrroooo Shows fireworks. + +qqqqiiiixxxx Shows spinning lines a la Qix(tm). + +rrrroooollllllll Shows a rolling ball. + +rrrroooottttoooorrrr Shows Tom's Roto-Rooter. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 5 + + + + + + +2 User Commands XLOCK(1) + + + +rrrruuuubbbbiiiikkkk Shows an auto-solving Rubik's Cube. May not be + available depending on how it was configured. + +sssshhhhaaaappppeeee Shows stippled rectangles, ellipses, and triangles. + +ssssiiiieeeerrrrppppiiiinnnnsssskkkkiiii + Shows a Sierpinski's triangle. + +sssslllliiiipppp Shows slipping blits. + +sssspppphhhheeeerrrreeee Shows a bunch of shaded spheres. + +ssssppppiiiirrrraaaallll Shows a helical locus of points. + +sssspppplllliiiinnnneeee Shows colorful moving splines. + +sssspppprrrrooooiiiinnnnggggiiiieeeessss + Shows Sproingies! Nontoxic. Safe for pets and + small children. May not be available depending on + how it was configured. + +ssssttttaaaaiiiirrrrssss Shows Infinite Stairs, an Escher-like GL scene. May + not be available depending on how it was configured. + +ssssttttaaaarrrr Shows a star field with a twist. + +ssssttttaaaarrrrffffiiiisssshhhh + Shows starfish. + +ssssttttrrrraaaannnnggggeeee Shows strange attractors. + +ssssuuuuppppeeeerrrrqqqquuuuaaaaddddrrrriiiiccccssss + Shows 3D mathematical shapes. May not be available + depending on how it was configured. + +sssswwwwaaaarrrrmmmm Shows a swarm of bees following a wasp. + +sssswwwwiiiirrrrllll Shows animated swirling patterns. + +tttteeeettttrrrriiiissss Shows tetris. + +tttthhhhoooorrrrnnnnbbbbiiiirrrrdddd + Shows an animated Bird in a Thorn Bush fractal map. + +ttttrrrriiiiaaaannnngggglllleeee + Shows a triangular mountain range. + +ttttuuuubbbbeeee Shows an animated tube. + +ttttuuuurrrrttttlllleeee Shows turtle fractals. + +vvvviiiinnnneeeessss Shows fractal-like vines. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 6 + + + + + + +2 User Commands XLOCK(1) + + + +vvvvooootttteeeerrrrssss Shows Dewdney's Voters. + +wwwwaaaattttoooorrrr Shows Dewdney's Water-Torus planet of fish and + sharks. + +wwwwiiiirrrreeee Shows a random circuit with 2 electrons. + +wwwwoooorrrrlllldddd Shows spinning Earths. + +wwwwoooorrrrmmmm Shows wiggly worms. + +xxxxjjjjaaaacccckkkk Shows Jack having one of those days. + +bbbbllllaaaannnnkkkk Shows nothing but a black screen. Does not show up + in random mode. + +bbbboooommmmbbbb Shows a bomb and will autologout after a time. Does + not show up in random mode and may be available + depending on how it was configured. + +rrrraaaannnnddddoooommmm Shows a random mode from above except blank (and + bomb). + + +-ddddeeeellllaaaayyyy _u_s_e_c_s + The _d_e_l_a_y option sets the speed at which a mode will + operate. It simply sets the number of microseconds to + delay between batches of animations. In blank mode, it + is important to set this to some small number of + seconds, because the keyboard and mouse are only + checked after each delay, so you cannot set the delay + too high, but a delay of zero would needlessly consume + cpu checking for mouse and keyboard input in a tight + loop, since blank mode has no work to do. + +-ccccoooouuuunnnntttt _n_u_m + The _b_a_t_c_h_c_o_u_n_t option sets number of _t_h_i_n_g_s to do per + batch to _n_u_m . + + In ant mode this refers the number of ants. + + In atlantis mode it is the number of sharks. + + In ball mode it is the number of balls. + + In bat mode it is the number of bats, could be less + because of conflicts. + + In blot mode this refers to the number of pixels ren- + dered in the same color. + + In bouboule mode it is the number of stars. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 7 + + + + + + +2 User Commands XLOCK(1) + + + + In bounce mode it is the number of balls, could be less + because of conflicts. + + In braid mode it is the upper bound number of strands. + + In bubble mode it is the number of bubbles. + + In bubble3d mode it is the number of bubbles. + + In bug mode it is the number of bugs, could be less + because of conflicts. + + In cage mode it is means nothing. + + In cartoon mode it means nothing. + + In clock mode it is the percentage of the screen, but + less than 100%. + + In coral mode it is the number of seeds. + + In crystal mode it is the number of polygons. + + In daisy mode it is the number flowers that make a + meadow. + + In dclock mode it means nothing. + + In deco mode it is the depth. + + In demon mode this refers the number of colors. + + In dilemma mode this refers the number of initial + defectors. + + In discrete mode it is the number of points. + + In drift mode it is the number of levels to recurse + (larger = more complex). + + In eyes mode it is the number of eyes. + + In fadeplot mode it is the number of steps. + + In flag mode it means nothing. + + In flame mode it is the number of levels to recurse + (larger = more complex). + + In flow mode it is the number of bees. + + In forest mode it is the number trees that make a + + + +2 X11R6 Contrib Last change: 8 Mar 1999 8 + + + + + + +2 User Commands XLOCK(1) + + + + forest. + + In galaxy mode it means the number of galaxies. + + In gears mode it is the number of degrees to rotate the + set of gears by. + + In goop mode it is the number of blobs per plane. + + In grav mode it is the number of planets. + + In helix mode it means nothing. + + In hop mode this refers to the number of pixels ren- + dered in the same color. + + In hyper mode it the number of dimensions. + + In ico mode it is the ith platonic solid. + + In ifs mode it means nothing. + + In image mode it means it is the number of logos on + screen at once. + + In julia mode it is the depth of recursion. + + In kaleid mode it is the number of pens. + + In kumppa mode it means nothing. + + In laser mode it is the number lasers. + + In life mode it is the number of generations before a + glider is introduced. + + In life1d mode it means nothing. + + In life3d mode it is the number of generations before a + glider is introduced. + + In lisa mode it is the number of loops. + + In lissie mode it is the number of worms. + + In loop mode it means nothing. + + In mandelbrot mode it is the order. + + In marquee mode it means nothing. + + In maze mode it means nothing. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 9 + + + + + + +2 User Commands XLOCK(1) + + + + In moebius mode it is means nothing. + + In morph3d mode it is the ith platonic solid. + + In mountain mode it is the number of mountains. + + In munch mode it means nothing. + + In nose mode it means nothing. + + In qix mode it is the number of points. + + In pacman mode it means the number of ghosts. + + In penrose mode it means nothing. + + In petal mode it the greatest random number of petals. + + In pipes mode it shows different joints, 0 random, 1 + spherical, 2 bolted elbow, 3 elbow, and 4 alternating. + + In puzzle mode it the number of moves. + + In pyro mode it is the maximum number flying rockets at + one time. + + In roll mode it is the number of points. + + In rotor mode it is the number of rotor thingys which + whirr... + + In rubik mode it is the number of moves. + + In shape mode it means nothing. + + In sierpinski mode it is the number of points. + + In slip mode it means nothing. + + In sphere mode it means nothing. + + In spiral mode it is the number of spirals. + + In spline mode it is the number of points "splined". + + In sproingies mode it is the number of sproingies. + + In stairs mode it is means nothing. + + In star mode it is the number of stars on the screen at + once. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 10 + + + + + + +2 User Commands XLOCK(1) + + + + In starfish mode it means nothing. + + In strange mode it means nothing. + + In superquadrics mode its the number of horizontal and + vertical lines in the superquadric. + + In swirl mode it means the number of "knots". + + In swarm mode it is the number of bees. + + In thornbird mode it is the number of points. + + In triangular mode it is the number of mountains. + + In tube mode it is a rectangle (= 1), an ellipse (= 2), + or a polygon if greater. + + In turtle mode it means nothing. + + In vines mode it is draw a complete vine (= 0) or a + portion (= 1). + + In voters mode it means the number of parties, 2 or 3. + + In wator mode it means the breed time for the fish. + + In wire mode it means the length of the circuit. + + In world mode it is the number of worlds. + + In worm mode it is the number of worms. + + In blank mode it means nothing. + + In bomb mode it means the number of minutes to autolo- + gout. + + A negative _c_o_u_n_t allows for randomness. The range from + the minimum allowed nonnegative _c_o_u_n_t for a particular + mode to the ABS( _c_o_u_n_t ) (or maximum allowed _c_o_u_n_t , + whichever is less). + +-bbbbaaaattttcccchhhhccccoooouuuunnnntttt _n_u_m + The _b_a_t_c_h_c_o_u_n_t option is depreciated but should still + work as _c_o_u_n_t. + +-ccccyyyycccclllleeeessss _n_u_m + The _c_y_c_l_e_s option sets the number of cycles until time + out for ant, blot, braid, bug, clock, crystal, daisy, + deco, demon, dilemma, discrete, eyes, flag, flow, + forest, galaxy, helix, hop, hyper, ico, laser, life, + + + +2 X11R6 Contrib Last change: 8 Mar 1999 11 + + + + + + +2 User Commands XLOCK(1) + + + + life1d, life3d, lisa, lissie, loop, mandelbrot, moun- + tain, petal, sierpinski, shape, spline +erase, thorn- + bird, triangle, tube, voters, wator, and wire. For + worm it is the length of the lines, for atlantis it is + the shark speed, for fadeplot, julia and spiral it is + the length of the trail of dots, munch it is the + minimum size of the squares, for kaleid it is the % of + black, for qix it is the number of lines, for spline + -erase it means the number of splines * 64 (for compa- + tibility with +erase), for gears it is the number of + degrees to increment the spin of each gear by, for + pipes it is the number of systems to draw before clear- + ing the screen, for rubik it is the number of steps to + complete a 90 move, for superquadrics it is the number + of frames it takes to morph from one shape to another. + For others it means nothing. + +-ssssiiiizzzzeeee _n_u_m + The _s_i_z_e option sets the size maximum size of a star in + bouboule, pyro and star, size of ball in ball and + bounce, size of bat in bat, maximum size of bubble in + bubble, size of clock in clock, minimum size of rectan- + gles in deco, size of the polygon in crystal, size of + polyhedron in ico, size of lissie in lissie, size of + dots of flag, for kaleid it is the symmetry, width of + maze hallway, size of side of penrose tile, radius of + loop in lisa, radius of ball in roll, number of corners + in sierpinski, size of tube in tube, width of worm in + worm, line width in rotor, size of cells in ant, bug, + dilemma, life, life1d, pacman, tetris, voters, wator, + and wire. In pipes it is the maximum length of a sys- + tem. In atlantis it is the shark size. In sproingies + it is the size of the screen. A negative number allows + for randomness, similar to _c_o_u_n_t. + +-nnnnccccoooolllloooorrrrssss _n_u_m + The _n_c_o_l_o_r_s option sets the maximum number of colors to + be used. + +-ssssaaaattttuuuurrrraaaattttiiiioooonnnn _v_a_l_u_e + The _s_a_t_u_r_a_t_i_o_n option sets saturation of the color ramp + used to _v_a_l_u_e . 0 is grayscale and 1 is very rich + color. 0.4 is a nice pastel. + +-eeeerrrraaaasssseeeemmmmooooddddeeee _m_o_d_e_n_a_m_e + As of this writing there are over 9 erase modes sup- + ported (if its not chosen its assumed random). The + erase modes are random_lines, random_squares, venetian, + triple_wipe, quad_wipe, circle_wipe, three_circle_wipe, + squaretate, no_fade. + +-eeeerrrraaaasssseeeeddddeeeellllaaaayyyy _u_s_e_c_s + + + +2 X11R6 Contrib Last change: 8 Mar 1999 12 + + + + + + +2 User Commands XLOCK(1) + + + + The _e_r_a_s_e_d_e_l_a_y option sets the number of microseconds + for steps of the eeeerrrraaaasssseeeemmmmooooddddeeee (a setting of 0 and the + eeeerrrraaaasssseeeemmmmooooddddeeee is bypassed). + +++++////----nnnnoooolllloooocccckkkk + The _n_o_l_o_c_k option causes xxxxlllloooocccckkkk to only draw the pat- + terns and not lock the display. A key press or a mouse + click will terminate the screen saver. + +----////++++iiiinnnnwwwwiiiinnnnddddoooowwww + Runs xxxxlllloooocccckkkk in a window, so that you can iconify, move, + or resize it and still use your screen for other stuff. + When running in a window, xxxxlllloooocccckkkk no longer locks your + screen, it just looks good. + +----////++++iiiinnnnrrrrooooooootttt + Runs xxxxlllloooocccckkkk in your root window. Like the _i_n_w_i_n_d_o_w + option it no longer locks the screen, it just looks + good. + +----////++++rrrreeeemmmmooootttteeee + The _r_e_m_o_t_e option tells xxxxlllloooocccckkkk to not stop you from + locking remote X11 servers. This option should be used + with care and is intended mainly to lock X11 terminals + which cannot run xxxxlllloooocccckkkk locally. If you lock someone + else's workstation, they will have to know yyyyoooouuuurrrr pass- + word to unlock it. Using +_r_e_m_o_t_e overrides any + resource derived values for _r_e_m_o_t_e and prevents xxxxlllloooocccckkkk + from being used to lock other X11 servers. (Use `+' + instead of `-' to override resources for other options + that can take the `+' modifier similarly.) + +----////++++mmmmoooonnnnoooo + The _m_o_n_o option causes xxxxlllloooocccckkkk to display monochrome, + (black and white) pixels rather than the default + colored ones on color displays. + +----////++++aaaalllllllloooowwwwaaaacccccccceeeessssssss + This option is required for servers which do not allow + clients to modify the host access control list. It is + also useful if you need to run x clients on a server + which is locked for some reason... When _a_l_l_o_w_a_c_c_e_s_s is + true, the X11 server is left open for clients to attach + and thus lowers the inherent security of this lock + screen. A side effect of using this option is that if + xxxxlllloooocccckkkk is killed -KILL, the access control list is not + lost. + +-vvvvttttlllloooocccckkkk _m_o_d_e_n_a_m_e + This option is used on a XFree86 system to manage VT + switching in [off|noswitch|switch|restore] mode. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 13 + + + + + + +2 User Commands XLOCK(1) + + + +_o_f_f means no VT switch locking. + +_s_w_i_t_c_h means VT switch locking + switching to xlock VT + when activated. + +_r_e_s_t_o_r_e means VT switch locking + switching to xlock VT + when activated + switching back to previous VT + when desactivated. + +_n_o_s_w_i_t_c_h means VT switch locking only when xlock VT is + active. + +----////++++aaaalllllllloooowwwwrrrrooooooootttt + The _a_l_l_o_w_r_o_o_t option allows the root password to unlock + the server as well as the user who started xxxxlllloooocccckkkk. May + not be able to turn this on and off depending on your + system and how xxxxlllloooocccckkkk was configured. + +----////++++ddddeeeebbbbuuuugggg + Allows xxxxlllloooocccckkkk to be debugged by doing all but locking + the screen. + +----////++++ddddeeeessssccccrrrriiiippppttttiiiioooonnnn + The _d_e_s_c_r_i_p_t_i_o_n option causes xxxxlllloooocccckkkk shows a mode + description above password window. The default is to + show this description. + +----////++++eeeecccchhhhooookkkkeeeeyyyyssss + The _e_c_h_o_k_e_y_s option causes xxxxlllloooocccckkkk to echo '?' characters + for each key typed into the password prompt. Some con- + sider this a security risk, so the default is to not + echo anything. + +----////++++eeeennnnaaaabbbblllleeeessssaaaavvvveeeerrrr + By default xxxxlllloooocccckkkk will disable the normal X server's + screen saver since it is in effect a replacement for + it. Since it is possible to set delay parameters long + enough to cause phosphor burn on some displays, this + option will turn back on the default screen saver which + is very careful to keep most of the screen black. + +----////++++rrrreeeesssseeeettttssssaaaavvvveeeerrrr + By default xxxxlllloooocccckkkk will call XResetScreenSaver. This may + be undesirable with DPMS monitors. + +----////++++ggggrrrraaaabbbbmmmmoooouuuusssseeee + The _g_r_a_b_m_o_u_s_e option causes xxxxlllloooocccckkkk to grab the mouse and + keyboard, this is the default. xxxxlllloooocccckkkk can not lock the + screen without this. + +----////++++ggggrrrraaaabbbbsssseeeerrrrvvvveeeerrrr + The _g_r_a_b_s_e_r_v_e_r option causes xxxxlllloooocccckkkk to grab the server. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 14 + + + + + + +2 User Commands XLOCK(1) + + + + This is not usually needed but some unsecure X servers + can be defeated without this. + +----////++++iiiinnnnssssttttaaaallllllll + Allows xxxxlllloooocccckkkk to install its own colormap if xxxxlllloooocccckkkk runs + out of colors. May not work on with some window + managers (fvwm) and does not work with the -inroot + option. + +----////++++mmmmoooouuuusssseeeemmmmoooottttiiiioooonnnn + Allows you to turn on and off the sensitivity to the + mouse to bring up the password window. + +----////++++ssssoooouuuunnnndddd + Allows you to turn on and off sound if installed with + the capability. + +----////++++ttttiiiimmmmeeeeeeeellllaaaappppsssseeeedddd + Allows you to find out how long a machine is locked so + you can complain to an administrator that someone is + hogging a machine. + +----////++++uuuusssseeeeffffiiiirrrrsssstttt + The _u_s_e_f_i_r_s_t option causes xxxxlllloooocccckkkk to use the keystroke + which got you to the password screen as the first char- + acter in the password. The default is to ignore the + first key pressed. + +----////++++vvvveeeerrrrbbbboooosssseeee + Verbose mode, tells what options it is going to use. + +-nnnniiiicccceeee _n_i_c_e_l_e_v_e_l + The _n_i_c_e option sets system nicelevel of the xxxxlllloooocccckkkk pro- + cess to _n_i_c_e_l_e_v_e_l . + +-lllloooocccckkkkddddeeeellllaaaayyyy _s_e_c_o_n_d_s + The _l_o_c_k_d_e_l_a_y option sets the number of _s_e_c_o_n_d_s before + the screen needs a password to be unlocked. Good for + use with an autolocking mechanism like xautolock(1). + +-ttttiiiimmmmeeeeoooouuuutttt _s_e_c_o_n_d_s + The _t_i_m_e_o_u_t option sets the number of _s_e_c_o_n_d_s before + the password screen will time out. + +-ffffoooonnnntttt _f_o_n_t_n_a_m_e + The _f_o_n_t option sets the font to be used on the prompt + screen. + +-ppppllllaaaannnnffffoooonnnntttt _f_o_n_t_n_a_m_e + option sets the font to be used for the text that is + displayed in the lower part of the password screen. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 15 + + + + + + +2 User Commands XLOCK(1) + + + +-ffffgggg _c_o_l_o_r + The _f_g option sets the color of the text on the pass- + word screen to _c_o_l_o_r . + +-bbbbgggg _c_o_l_o_r + The _b_g option sets the color of the background on the + password screen to _c_o_l_o_r . + +-ffffoooorrrreeeeggggrrrroooouuuunnnndddd _c_o_l_o_r + The _f_o_r_e_g_r_o_u_n_d option sets the color of the text on the + password screen to _c_o_l_o_r . + +-bbbbaaaacccckkkkggggrrrroooouuuunnnndddd _c_o_l_o_r + The _b_a_c_k_g_r_o_u_n_d option sets the color of the background + on the password screen to _c_o_l_o_r . + +-uuuusssseeeerrrrnnnnaaaammmmeeee _s_t_r_i_n_g + Text _s_t_r_i_n_g is shown in front of user name, defaults to + "Name: ". + +-ppppaaaasssssssswwwwoooorrrrdddd _s_t_r_i_n_g + Text _s_t_r_i_n_g is the password prompt string, defaults to + "Password: ". + +-iiiinnnnffffoooo _s_t_r_i_n_g + Text _s_t_r_i_n_g is an informational message to tell the + user what to do, defaults to "Enter password to unlock; + select icon to lock.". + +-vvvvaaaalllliiiiddddaaaatttteeee _s_t_r_i_n_g + Text _s_t_r_i_n_g is a message shown while validating the + password, defaults to "Validating login..." + +-iiiinnnnvvvvaaaalllliiiidddd _s_t_r_i_n_g + Text _s_t_r_i_n_g is a message shown when password is + invalid, defaults to "Invalid login." + +-ggggeeeeoooommmmeeeettttrrrryyyy _g_e_o_m + The _g_e_o_m_e_t_r_y option sets _g_e_o_m the size and offset of + the lock window (normally the entire screen). The + entire screen format is still used for entering the + password. The purpose is to see the screen even though + it is locked. This should be used with caution since + many of the modes will fail if the windows are far from + square or are too small (size must be greater than + 0x0). This should also be used with -enablesaver to + protect screen from phosphor burn. + +-iiiiccccoooonnnnggggeeeeoooommmmeeeettttrrrryyyy _g_e_o_m + The _i_c_o_n_g_e_o_m_e_t_r_y option sets _g_e_o_m the size of the + iconic screen (normally 64x64) seen when entering the + password. This should be used with caution since many + + + +2 X11R6 Contrib Last change: 8 Mar 1999 16 + + + + + + +2 User Commands XLOCK(1) + + + + of the modes will fail if the windows are far from + square or are too small (size must be greater than + 0x0). The greatest size is 256x256. There should be + some limit so users could see who has locked the + screen. Position information of icon is ignored. + +-ggggllllggggeeeeoooommmmeeeettttrrrryyyy _g_e_o_m + The _g_l_g_e_o_m_e_t_r_y option sets _g_e_o_m the size of the screen + for gl modes. Not normally available or needed. + +----////++++ffffuuuullllllllrrrraaaannnnddddoooommmm + Turn on/off randomness options within modes. Not + implemented on all mode options. + +----////++++wwwwiiiirrrreeeeffffrrrraaaammmmeeee + Turn on/off wireframe, available on atlantis, daisy, + gears, life3d, mountain, sproingies, superquadrics, and + triangle. + +----////++++uuuusssseeee3333dddd + Turn on/off 3d view, available on bouboule, pyro, star, + and worm. + +-ddddeeeellllttttaaaa3333dddd _v_a_l_u_e + Space between the center of your 2 eyes for 3d mode. + +-nnnnoooonnnneeee3333dddd _c_o_l_o_r + Color used for empty size in 3d mode. + +-rrrriiiigggghhhhtttt3333dddd _c_o_l_o_r + Color used for right eye in 3d mode. + +-lllleeeefffftttt3333dddd _c_o_l_o_r + Color used for left eye in 3d mode. + +-bbbbooootttthhhh3333dddd _c_o_l_o_r + Color used for overlapping images for left and right + eye in 3d mode. + +-pppprrrrooooggggrrrraaaammmm _p_r_o_g_r_a_m_n_a_m_e + The _p_r_o_g_r_a_m option sets the program to be used as the + fortune generator. Currently used only for marquee and + nose modes. + +-mmmmeeeessssssssaaaaggggeeeessssffffiiiilllleeee _f_o_r_m_a_t_t_e_d-_f_i_l_e_n_a_m_e + The _m_e_s_s_a_g_e_s_f_i_l_e option sets the file to be used as the + fortune generator. The first entry is the number of + fortunes, the next line contains the first fortune. + Fortunes begin with a "%%" on a line by itself. + Currently used only for marquee and nose modes. If one + exists, it takes precedence over the fortune program. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 17 + + + + + + +2 User Commands XLOCK(1) + + + +-mmmmeeeessssssssaaaaggggeeeeffffiiiilllleeee _f_i_l_e_n_a_m_e + The _m_e_s_s_a_g_e_f_i_l_e option sets the file whose contents are + displayed. Currently used only for marquee and nose + modes. If one exists, it takes precedence over the + fortune program and messagesfile. + +-mmmmeeeessssssssaaaaggggeeee _t_e_x_t_s_t_r_i_n_g + The _m_e_s_s_a_g_e option sets the text to be displayed in a + mode. Currently used only for flag, marquee and nose + modes. If one exists, it takes precedence over the + fortune program, messagesfile and message. + +-mmmmeeeessssssssaaaaggggeeeeffffoooonnnntttt _f_o_n_t_n_a_m_e + The _m_e_s_s_a_g_e_f_o_n_t option sets the font to be used in the + mode. Currently used only for flag, marquee, and nose + modes. + +-bbbbiiiittttmmmmaaaapppp _f_i_l_e_n_a_m_e + The _b_i_t_m_a_p option sets the xbm, xpm, or ras file to be + displayed with flag, image, life, life1d, maze, or puz- + zle mode. For eyes and pacman only a xbm file is + accepted. Certain modes reject the bitmap if too big. + +-nnnneeeeiiiigggghhhhbbbboooorrrrssss _n_u_m + The _n_e_i_g_h_b_o_r_s option sets the number of neighbors of a + cell to 3, 4, 6, 9 (may not have real mathematical + meaning), or 12 for several automata modes. Setting it + to 0 typically randomizes this, except in life where it + is set to 8. + +----////++++mmmmoooouuuusssseeee + Turn on and off mouse interaction in _e_y_e_s, _j_u_l_i_a, _a_n_d + _s_w_a_r_m. + + +2 MMMMOOOORRRREEEE OOOOPPPPTTTTIIIIOOOONNNNSSSS ((((tttthhhheeeesssseeee mmmmaaaayyyy nnnnooootttt bbbbeeee aaaavvvvaaaaiiiillllaaaabbbblllleeee)))) +-ccccppppaaaasssssssswwwwdddd _c_r_y_p_t_e_d-_p_a_s_s_w_o_r_d + The _c_p_a_s_s_w_d option sets the key to be this text string + to unlock xxxxlllloooocccckkkk instead of password file. + +-ffffoooorrrrcccceeeeLLLLooooggggoooouuuutttt _m_i_n_u_t_e_s + The _f_o_r_c_e_L_o_g_o_u_t option sets _m_i_n_u_t_e_s to auto-logout. + +-llllooooggggoooouuuuttttBBBBuuuuttttttttoooonnnnLLLLaaaabbbbeeeellll _s_t_r_i_n_g + Text _s_t_r_i_n_g is a message shown inside logout button + when logout button is displayed. Defaults to "Logout". + +-llllooooggggoooouuuuttttBBBBuuuuttttttttoooonnnnHHHHeeeellllpppp _s_t_r_i_n_g + Text _s_t_r_i_n_g is a message shown outside logout button + when logout button is displayed. Defaults to "Click + the \"Logout\" button to log out current\n user and + make workstation available." + + + +2 X11R6 Contrib Last change: 8 Mar 1999 18 + + + + + + +2 User Commands XLOCK(1) + + + +-llllooooggggoooouuuuttttFFFFaaaaiiiilllleeeeddddSSSSttttrrrriiiinnnngggg _s_t_r_i_n_g + Text _s_t_r_i_n_g is a message shown when a logout is + attempted and fails. Defaults to "Logout attempt + FAILED.\n Current user could not be automatically + logged out." + +----////++++ddddttttssssaaaavvvveeeerrrr + Turn on/off CDE Saver Mode. This option is only avail- + able if CDE support was compiled in. + +-mmmmoooodddduuuulllleeeeppppaaaatttthhhh _p_a_t_h + The _m_o_d_u_l_e_p_a_t_h option sets the _d_i_r_e_c_t_o_r_i_e_s that xxxxlllloooocccckkkk + searches for mode modules to load. It is a colon + separated list of directories to search. If "%S" is + included in the path, it is replaced by the default + modulepath. To add a private module directory to the + default path, use something like '%S:~/mymoduledir' as + the path. This option is only available if module sup- + port was compiled in. + +-lllloooocccckkkkssssoooouuuunnnndddd _s_t_r_i_n_g + Text _s_t_r_i_n_g references sound to use at lock time. + Default sound, male voice: "Thank you, for your + cooperation." + +-iiiinnnnffffoooossssoooouuuunnnndddd _s_t_r_i_n_g + Text _s_t_r_i_n_g references sound to use for information. + Default sound, male voice: "Identify please." + +-vvvvaaaalllliiiiddddssssoooouuuunnnndddd _s_t_r_i_n_g + Text _s_t_r_i_n_g references sound to when a password is + valid. Default sound, female voice: "Complete." + +-iiiinnnnvvvvaaaalllliiiiddddssssoooouuuunnnndddd _s_t_r_i_n_g + Text _s_t_r_i_n_g references sound to when a password is + invalid. Default sound, female voice: "I am not pro- + grammed to give you that information." + +-ssssttttaaaarrrrttttCCCCmmmmdddd _s_t_r_i_n_g + Text _s_t_r_i_n_g command to execute when the screen is + locked. Commonly used instructions include: "zaway". + This command, if still running when the screensaver + exist, will be killed. + +-eeeennnnddddCCCCmmmmdddd _s_t_r_i_n_g + Text _s_t_r_i_n_g command to execute when the screen is + unlocked. + +-llllooooggggoooouuuuttttCCCCmmmmdddd _s_t_r_i_n_g + Text _s_t_r_i_n_g command to execute when the program logs + the user out (either via the autologout or by pressing + the logout button). + + + +2 X11R6 Contrib Last change: 8 Mar 1999 19 + + + + + + +2 User Commands XLOCK(1) + + + +-mmmmaaaaiiiillllCCCCmmmmdddd _s_t_r_i_n_g + Text _s_t_r_i_n_g command to execute when the program to + check mail. + +-mmmmaaaaiiiillllIIIIccccoooonnnn _s_t_r_i_n_g + Text _s_t_r_i_n_g of file for the "mail arrived" bitmap. + +-nnnnoooommmmaaaaiiiillllIIIIccccoooonnnn _s_t_r_i_n_g + Text _s_t_r_i_n_g of file for the "no mail" bitmap. + +----ddddppppmmmmssssssssttttaaaannnnddddbbbbyyyy sssseeeeccccoooonnnnddddssss + Allows one to set DPMS Standby for monitor (0 is + defined as infinite). (Horizontal sync on, Vertical + sync off, RGB guns off, power supply on, tube filaments + energized, (screen saver mode). Typical 17 inch + screen... 110 out of 120 watts with a 3 sec recovery + time.) This option is only available if DPMS support + was compiled in. + +----ddddppppmmmmssssssssuuuussssppppeeeennnndddd sssseeeeccccoooonnnnddddssss + Allows one to set DPMS Suspend for monitor (0 is + defined as infinite). (Horizontal sync off, Vertical + sync on, RGB guns off, power supply off, tube filaments + energized. Typical 17 inch screen ... 15 out of 120 + watts with a 3 sec recovery time.) This option is only + available if DPMS support was compiled in. + +----ddddppppmmmmssssooooffffffff sssseeeeccccoooonnnnddddssss + Allows one to set DPMS Power Off for monitor (0 is + defined as infinite). (Horizontal sync off, Vertical + sync off, Small auxiliary circuit stays on to monitor + the HS/VS signals to enable power on when data needs to + be displayed on the screen. Typical 17 inch screen ... + 5 out of 120 watts with a 10 sec recovery time.) This + option is only available if DPMS support was compiled + in. + + +2 SSSSPPPPEEEECCCCIIIIAAAALLLL MMMMOOOODDDDEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNTTTT OOOOPPPPTTTTIIIIOOOONNNNSSSS +-wwwwhhhhaaaalllleeeessssppppeeeeeeeedddd _n_u_m + Allows one to set the speed of the whales and dolphin + in _a_t_l_a_n_t_i_s. + +----////++++ttttrrrruuuucccchhhheeeetttt + Turn on and off Truchet lines (trail) in _a_n_t. + +----////++++bbbbooooiiiillll + Turn on and off having the bubbles bubble up in _b_u_b_b_l_e. + +-nnnnxxxx _n_u_m + Allows one to set the number of unit cells in x- + direction in _c_r_y_s_t_a_l. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 20 + + + + + + +2 User Commands XLOCK(1) + + + +-nnnnyyyy _n_u_m + Allows one to set the number of unit cells in y- + direction in _c_r_y_s_t_a_l. + +----////++++cccceeeennnnttttrrrreeee + Turn on and off the centering on screen in _c_r_y_s_t_a_l. + +----////++++mmmmaaaaxxxxssssiiiizzzzeeee + Turn on and off the centering on screen in _c_r_y_s_t_a_l. + +----////++++cccceeeellllllll + Turn on and off the drawing of unit cell in _c_r_y_s_t_a_l. + +----////++++ggggrrrriiiidddd + Turn on and off the drwing of grid of unit cells (if + -cell is on) in _c_r_y_s_t_a_l. + +----////++++sssshhhhiiiifffftttt + Turn on and off colour cycling in _c_r_y_s_t_a_l. + +----////++++ffffoooorrrreeeesssstttt + Turn on and off the tropical deforest (hectares/acres) + counter in _d_c_l_o_c_k. + +----////++++ppppooooppppeeeexxxx + Turn on and off the population explosion counter in + _d_c_l_o_c_k. + +-bbbboooonnnnuuuussss _v_a_l_u_e + Allows one to set the bonus for cheating... between 1.0 + and 4.0 in _d_i_l_e_m_m_a. + +----////++++ggggaaaarrrrddddeeeennnn + Turn off and on garden look in _d_a_i_s_y. + +----////++++ccccoooonnnnsssscccciiiioooouuuussss + Turn off and on self-awareness in _d_i_l_e_m_m_a. + +----////++++ggggrrrroooowwww + Turn on and off growing fractals (else they are + animated) for _d_r_i_f_t. + +----////++++lllliiiissssssss + Turn on and off using lissajous figures to get points + for _d_r_i_f_t. + +----////++++nnnnooooaaaannnnttttssss + Turn off and on ants in _m_o_e_b_i_u_s. + +----////++++ssssoooolllliiiiddddmmmmooooeeeebbbbiiiiuuuussss + Turn on and off solid Mobius strip in _m_o_e_b_i_u_s. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 21 + + + + + + +2 User Commands XLOCK(1) + + + +----////++++iiiinnnnvvvveeeerrrrtttt + Turn on and off inverting of the _f_l_a_g. + +----////++++ttttrrrraaaacccckkkkssss + Turn on and off star tracks in _g_a_l_a_x_y. + +----////++++ddddeeeeccccaaaayyyy + Turn on and off decaying orbits for _g_r_a_v. + +----////++++ttttrrrraaaaiiiillll + Turn on and off decaying trail of dots for _g_r_a_v. + +----////++++eeeelllllllliiiippppsssseeee + Turn on and off ellipse format in _h_e_l_i_x. + +----////++++mmmmaaaarrrrttttiiiinnnn + Turn on and off Barry Martin's square root _h_o_p. ---- + ////++++ppppooooppppccccoooorrrrnnnn Turn on and off Clifford A. Pickover's pop- + corn _h_o_p. + +----////++++eeeejjjjkkkk1111............eeeejjjjkkkk6666 + Turn on and off Ed J. Kubaitis' _h_o_p_s. + +----////++++rrrrrrrr + Turn on and off Renaldo Recuerdo's _h_o_p. + +----////++++jjjjoooonnnngggg + Turn on and off Jong's _h_o_p. + +----////++++ssssiiiinnnneeee + Turn on and off Barry Martin's sine _h_o_p. + +----////++++ddddiiiissssccccoooonnnnnnnneeeecccctttteeeedddd + Turn on and off disconnected pen movement in _k_a_l_e_i_d. + +----////++++sssseeeerrrriiiiaaaallll + Turn on and off sequential allocation of colors in + _k_a_l_e_i_d. + +----////++++aaaalllltttteeeerrrrnnnnaaaatttteeee + Turn on and off alternate rotated display mode _k_a_l_e_i_d. + +----////++++qqqquuuuaaaadddd + Turn on and off quad mirrored/rotated mode similar to + size 4 in _k_a_l_e_i_d. + +----////++++oooocccctttt + Turn on and off oct mirrored/rotated mode similar to + size 8 in _k_a_l_e_i_d. + +----////++++lllliiiinnnneeeeaaaarrrr + Turn on and off Cartesian/Polar coordinate mode in + + + +2 X11R6 Contrib Last change: 8 Mar 1999 22 + + + + + + +2 User Commands XLOCK(1) + + + + _k_a_l_e_i_d. + +-rrrruuuulllleeee _S<_n_e_i_g_h_b_o_r_h_o_o_d>/_B<_n_e_i_g_h_b_o_r_h_o_o_d> + Allows one to set _l_i_f_e survival and birth parameters. + For example, Conway's rule is S23/B3. Special parame- + ters: P, picks a random rule from all rules that have + known patterns; G, picks a random rule from all rules + that have known gliders. + +-lllliiiiffffeeeeffffiiiilllleeee _f_i_l_e_n_a_m_e + The _l_i_f_e_f_i_l_e option sets the lifeform. Only one format + is currently supported, the #P xlife format. + +----////++++ccccaaaallllllllaaaahhhhaaaannnn + Turn on and off Paul Callahan's S2b34/B2a hexagonal + _l_i_f_e. + +----////++++aaaannnnddddrrrreeeeeeeennnn + Turn on and off Bob Andreen's S2a2b4a/B2a3a4b hexagonal + _l_i_f_e. + +----////++++ttttoooottttaaaalllliiiissssttttiiiicccc + Turn on and off totalistic rules for _l_i_f_e_1_d. If this is + off then it follows rules of the LCAU collection. + These rules may not be symmetric and are more general. + +-rrrruuuulllleeee3333dddd _S<_n_e_i_g_h_b_o_r_h_o_o_d>/_B<_n_e_i_g_h_b_o_r_h_o_o_d> + Allows one to set _l_i_f_e_3_d survival and birth parameters. + For example, Bay's rules are S45/B5, S567/B6 S56/B5, + and S67/B67. There is currently no way of accessing + neighborhoods beyond 9. Special parameters: P, picks a + random rule from all rules that have known patterns; G, + picks a random rule from all rules that have known + gliders. + +-lllliiiiffffeeee3333ddddffffiiiilllleeee _f_i_l_e_n_a_m_e + The _l_i_f_e_3_d_f_i_l_e option sets the lifeform. Only one for- + mat is currently supported, similar to the #P xlife + format. 2 linefeeds in a row are assumed to advance + the depth. + +----////++++aaaaddddddddiiiittttiiiivvvveeee + Turn on and off additive functions mode in _l_i_s_a. + +----////++++aaaammmmmmmmaaaannnnnnnn + Turn on and off lines for _p_e_n_r_o_s_e. + +-iiiinnnnccccrrrreeeemmmmeeeennnntttt _v_a_l_u_e + Allows fine adjustments to order in _m_a_n_d_e_l_b_r_o_t. + +----////++++eeeerrrraaaasssseeee + Turn on and off erasing for _s_p_l_i_n_e. If this option is + + + +2 X11R6 Contrib Last change: 8 Mar 1999 23 + + + + + + +2 User Commands XLOCK(1) + + + + on, _c_y_c_l_e_s is divided by 64 to compute the number of + lines, so as to be compatible when using -fullrandom. + +-ffffaaaaccccttttoooorrrryyyy _n_u_m + Number of extra factory parts in _p_i_p_e_s. + +----////++++ffffiiiisssshhhheeeeyyyyeeee + Turn on if you want a zoomed-in view of _p_i_p_e_s. + +----////++++ttttiiiigggghhhhttttttttuuuurrrrnnnnssss + Turn on if you want the _p_i_p_e_s to bend more often. + +----////++++rrrroooottttaaaatttteeeeppppiiiippppeeeessss + Turn on if you want the pipe system rotated in _p_i_p_e_s. + +----////++++ccccoooommmmpppplllleeeetttteeee + Turn on or off complete graph morphing in _q_i_x. + +----////++++hhhhiiiiddddeeeesssshhhhuuuufffffffflllliiiinnnngggg + Turn on or off hidden shuffle phase for _r_u_b_i_k. + +----////++++bbbboooorrrrddddeeeerrrr + Turn on or off borders in _s_h_a_p_e. + +----////++++_s_h_a_p_e + Turn on or off shadowing in _s_h_a_p_e. + +----////++++_s_h_a_p_e + Turn on or off stippling in _s_h_a_p_e. + +-ttttrrrreeeekkkk _n_u_m + If its a high number you will see the space ship all + the time in _s_t_a_r. + +----////++++rrrroooocccckkkk + Turn on and off rocks for _s_t_a_r. If this is off, stars + will be seen instead. + +----////++++ssssttttrrrraaaaiiiigggghhhhtttt + Turn on if _s_t_a_r gets you motion sick. + +-ccccyyyycccclllleeeeppppeeeeeeeedddd _n_u_m + Set speed of cycling in _s_t_a_r_f_i_s_h. + +-rrrroooottttaaaattttiiiioooonnnn _n_u_m + Set rotation velocity in _s_t_a_r_f_i_s_h. + +-tttthhhhiiiicccckkkknnnneeeessssssss _n_u_m + Set thickness in _s_t_a_r_f_i_s_h. + +----////++++ccccyyyycccclllleeee + Turn on and off cycle for _s_t_a_r_f_i_s_h. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 24 + + + + + + +2 User Commands XLOCK(1) + + + +----////++++rrrroooocccckkkk + Turn on and off blob for _s_t_a_r_f_i_s_h. + +-ssssppppiiiinnnnssssppppeeeeeeeedddd _n_u_m + Set speed of rotation, in degrees per frame for _s_u_p_e_r_- + _q_u_a_d_r_i_c_s. + +-dddduuuurrrraaaattttiiiioooonnnn _s_e_c_o_n_d_s + Allows one to set a duration for a mode in _r_a_n_d_o_m. + Duration of 0 is defined as infinite. + +-mmmmooooddddeeeelllliiiisssstttt _t_e_x_t_s_t_r_i_n_g + Allows one to pass a list of files to randomly display + to _r_a_n_d_o_m. "all" will get all files but blank (and bomb + if compiled in). "all,blank" will get all modes. + "all,-image bounce,+blank" will get all modes but image + and bounce. "bug wator" will get only bug and wator. + "allgl" will get only the GL modes if compiled in, + all-allgl will get all but the GL modes, "allnice" will + weed out high cpu usage modes (as well as hackers and + gl modes). "allxpm" will get all modes that use xpm. + "allwrite" will get all modes that take advantage of + writable colormaps (not including xpm). "all3d" will + get all the modes that support this option. "allmouse" + will get all the modes that support mouse interaction. + Similarly, "allautomata" for automata modes, "allfrac- + tal" for fractal modes, "allgeometry" for geometry + modes, "allspace" for space modes. The random mode + itself can not be referenced. + +----////++++sssseeeeqqqquuuueeeennnnttttiiiiaaaallll + Turn on non-random _r_a_n_d_o_m option. + + +********WWWWAAAARRRRNNNNIIIINNNNGGGG******** +xxxxlllloooocccckkkk can appear to hang if it is competing with a high- +priority process for the CPU. For example, if xxxxlllloooocccckkkk is +started after a process with 'nice -20' (high priority), +xxxxlllloooocccckkkk will take considerable amount of time to respond. + + +2 SSSSHHHHAAAADDDDOOOOWWWW PPPPAAAASSSSSSSSWWWWOOOORRRRDDDDSSSS +2 If the machine is using a shadow password system, then xxxxlllloooocccckkkk +may not be set up to get the real password and so must be +given one of its own. This can be either on the command +line, via the ----ccccppppaaaasssssssswwwwdddd option, or in the file +$$$$HHHHOOOOMMMMEEEE////....xxxxlllloooocccckkkkrrrrcccc, with the first taking precedence. In both +cases an encrypted password is expected (see makekey(8)). +2 If neither is given, then xxxxlllloooocccckkkk will prompt for a password +and will use that, also storing an encrypted version of it +in $$$$HHHHOOOOMMMMEEEE////....xxxxlllloooocccckkkkrrrrcccc for future use. + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 25 + + + + + + +2 User Commands XLOCK(1) + + + +2 BBBBUUUUGGGGSSSS +"kill -KILL xxxxlllloooocccckkkk " causes the server that was locked to be +unusable, since all hosts (including localhost) were removed +from the access control list to lock out new X clients, and +since xxxxlllloooocccckkkk could not catch SIGKILL, it terminated before +restoring the access control list. This will leave the X +server in a state where "_y_o_u _c_a_n _n_o _l_o_n_g_e_r _c_o_n_n_e_c_t _t_o _t_h_a_t +_s_e_r_v_e_r, _a_n_d _t_h_i_s _o_p_e_r_a_t_i_o_n _c_a_n_n_o_t _b_e _r_e_v_e_r_s_e_d _u_n_l_e_s_s _y_o_u +_r_e_s_e_t _t_h_e _s_e_r_v_e_r." -From the X11R4 Xlib Documen- +tation, Chapter 7. +2 NCD terminals do not allow xlock to remove all the hosts +from the access control list. Therefore you will need to +use the "-remote" and "-allowaccess" switches. If you hap- +pen to run without "-allowaccess" on an NCD terminal, xxxxlllloooocccckkkk +will not work and you will need to reboot the terminal, or +simply go into the SETUP menus, under 'Network Parameters', +and turn off TCP/IP access control. + +2 SSSSEEEEEEEE AAAALLLLSSSSOOOO +2 X(1), Xlib Documentation. + + +2 AAAAUUUUTTTTHHHHOOOORRRR +2 Maintained by: + David Albert Bagley, <_b_a_g_l_e_y_d@_b_i_g_f_o_o_t._c_o_m> + +2 The latest version is currently at: + _f_t_p://_f_t_p._t_u_x._o_r_g/_p_u_b/_t_u_x/_b_a_g_l_e_y_d/_x_l_o_c_k_m_o_r_e + _f_t_p://_f_t_p._x._o_r_g/_c_o_n_t_r_i_b/_a_p_p_l_i_c_a_t_i_o_n_s + +2 Original Author: + Patrick J. Naughton, <_n_a_u_g_h_t_o_n@_e_n_g._s_u_n._c_o_m> + Mailstop 21-14 + Sun Microsystems Laboratories, Inc. + Mountain View, CA 94043 + 415/336-1080 + +with many additional contributors. + + +2 CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT +2 Copyright (C) 1988-91 by Patrick J. Naughton +2 Copyright (C) 1993-98 by David A. Bagley + +2 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 docu- +mentation. +2 The original BSD daemon is Copyright (C) 1988 Marshall Kirk +2 McKusick. All Rights Reserved. + + + +2 X11R6 Contrib Last change: 8 Mar 1999 26 + + + + + + +2 User Commands XLOCK(1) + + + +2 DEC, HP, IBM, Linux, SCO, SGI, and Sun icons have their +respective copyrights. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 X11R6 Contrib Last change: 8 Mar 1999 27 + + + diff --git a/docs/xlock.html b/docs/xlock.html new file mode 100644 index 00000000..5b2500f0 --- /dev/null +++ b/docs/xlock.html @@ -0,0 +1,1415 @@ + + +

+NAME
+     xlock - Locks the  local  X  display  until  a  password  is
+     entered.
+
+
+SYNOPSIS
+     xlock [ -help ] [ -version  ]  [  -resources  ]  [  -display
+     displayname  ] [ -visual visualname ] [ -name resourcename ]
+     [ -mode modename ] [ -delay usecs ] [ -batchcount  num  ]  [
+     -count  num ] [ -cycles num ] [ -ncolors num ] [ -size num ]
+     [ -saturation value ] [ -erasemode modename ] [  -erasedelay
+     usecs  ] [ -/+allowaccess ] [ -vtlock modename ] [ -/+nolock
+     ] [ -/+inwindow ] [ -/+inroot ] [ -/+remote ] [ -/+mono ]  [
+     -/+allowroot ] [ -/+debug ] [ -/+description ] [ -/+echokeys
+     ] [ -/+enablesaver ] [ -/+resetsaver ] [ -/+grabmouse ] [  -
+     /+grabserver  ] [ -/+install ] [ -/+mousemotion ] [ -/+sound
+     ] [ -/+timeelapsed ] [ -/+usefirst ] [ -/+verbose ] [  -nice
+     level  ] [ -lockdelay seconds ] [ -timeout seconds ] [ -font
+     fontname ] [ -planfont fontname ] [ -bg color ] [ -fg  color
+     ]  [  -background  color ] [ -foreground color ] [ -username
+     string ] [ -password string ] [ -info string ]  [  -validate
+     string   ]  [  -invalid  string  ]  [  -geometry  geom  ]  [
+     -icongeometry geom ] [ -glgeometry geom ] [ -/+fullrandom  ]
+     [  -/+wireframe  ] [ -/+use3d ] [ -delta3d value ] [ -none3d
+     color ] [ -right3d color ] [ -left3d color ] [ -both3d color
+     ]  [  -program  programname  ]  [  -messagesfile  formatted-
+     filename ] [ -messagefile filename ] [ -message string  ]  [
+     -messagefont  fontname  ]  [ -bitmap filename ] [ -neighbors
+     num ] [ -/+mouse ] [ -cpasswd crypted-password ] [ -forceLo-
+     gout  minutes ] [ -logoutButtonLabel textstring ] [ -logout-
+     ButtonHelp textstring ] [ -logoutFailedString textstring ] [
+     -/+dtsaver  ]  [  -modulepath path ] [ -locksound string ] [
+     -infosound string ] [ -validsound string ]  [  -invalidsound
+     string  ]  [  -startCmd  string  ]  [  -endCmd  string  ]  [
+     -logoutCmd string ]
+
+
+DESCRIPTION
+     xlock locks the X server till the user enters their password
+     at  the  keyboard.   While  xlock is running, all new server
+     connections are refused.  The screen saver is disabled.  The
+     mouse  cursor  is  turned  off.  The screen is blanked and a
+     changing pattern is put on the screen.  If a key or a  mouse
+     button is pressed then the user is prompted for the password
+     of the user who started xlock.
+
+     If the  correct  password  is  typed,  then  the  screen  is
+     unlocked  and  the  X  server  is restored.  When typing the
+     password Control-U and Control-H  are  active  as  kill  and
+     erase  respectively.   To return to the locked screen, click
+     in the small icon version of the changing pattern.
+
+     In  the  lower  part  of  the  password  screen  a  text  is
+     displayed.  This message is taken from the first file of the
+     following that exists:   $HOME/.xlocktext,  $HOME/.plan,  or
+     $HOME/.signature.
+
+     On systems which support new BSD style  authentication,  the
+     password may be prefixed by an authentication style followed
+     by a colon (i.e. "style:password").  See  the  login.conf(5)
+     for more information on authentication styles.
+
+
+NOTE ON ETIQUETTE
+     Xlock should not be used on public terminals when there is a
+     high demand for them.
+
+     If you find a  public  terminal  that  has  been  locked  by
+     another user and there are no other terminals available, and
+     the terminal appears to have been  left  idle  for  a  while
+     (normally  more than 15 minutes), it is fair to try to reset
+     the session in some manner.
+
+
+OPTIONS
+     -help
+          Print options and a brief description to standard  out-
+          put.
+
+     -version
+          Print version number (if >= 4.00) to standard output.
+
+     -resources
+          Print default resource file to standard output.
+
+     -display displayname
+          The display option sets the X11 display to lock.  xlock
+          locks all available screens on a given server, and res-
+          tricts you to locking  only  a  local  server  such  as
+          unix:0,  localhost:0,  or :0 unless you set the -remote
+          option.
+
+     -visual visualname
+          visualname which is one of  "StaticGray",  "GrayScale",
+          "StaticColor",        "PseudoColor",       "TrueColor",
+          "DirectColor", or "default".  default used to  set  the
+          screen's  default  visual  (the visual of the root win-
+          dow).
+
+     -name resourcename
+          resourcename is used instead of XLock when looking  for
+          resources to configure xlock.
+
+     -mode modename
+          As of this writing there are over 90 display modes sup-
+          ported  (plus  one  more for random selection of one of
+          these).
+
+     ant     Shows Langton's and Turk's generalized ants.
+
+     atlantis
+             Shows  moving  sharks/whales/dolphin.   May  not  be
+             available depending on how it was configured.
+
+     ball    Shows bouncing balls.
+
+     bat     Shows bouncing flying bats.
+
+     blot    Shows Rorschach's ink blot test.
+
+     bouboule
+             Shows Mimi's bouboule of moving stars.
+
+     bounce  Shows bouncing footballs.
+
+     braid   Shows random braids and knots.
+
+     bubble  Shows popping bubbles.
+
+     bubble3d
+             Shows Richard Jones's GL bubbles.  May not be avail-
+             able depending on how it was configured.
+
+     bug     Shows Palmiter's bug evolution and a garden of Eden.
+
+     cartoon Shows  bouncing  cartoons.   May  not  be  available
+             depending on how it was configured.
+
+     clock   Shows Packard's oclock.
+
+     coral   Shows a coral reef.
+
+     crystal Shows polygons in 2D plane groups.
+
+     daisy   Shows a meadow of daisies.
+
+     dclock  Shows a floating digital clock.
+
+     deco    Shows art as ugly as sin.
+
+     demon   Shows Griffeath's cellular automata.
+
+     dilemma Shows Lloyd's Prisoner's Dilemma simulation.
+
+     discrete
+             Shows various discrete maps.
+
+     drift   Shows cosmic drifting flame fractals.
+
+     cage    Shows the Impossible Cage, an Escher-like GL  scene.
+             May not be available depending on how it was config-
+             ured.
+
+     eyes    Shows eyes following a bouncing grelb.
+
+     fadeplot
+             Shows a fading plot of sine squared.
+
+     flag    Shows a waving flag of your operating system.
+
+     flame   Shows cosmic flame fractals.
+
+     flow    Shows dynamic strange attractors.
+
+     forest  Shows binary trees of a fractal forest.
+
+     galaxy  Shows crashing spiral galaxies.
+
+     gears   Shows GL's gears.  May not be available depending on
+             how it was configured.
+
+     goop    Shows goop from a lava lamp.
+
+     grav    Shows orbiting planets.
+
+     helix   Shows string art.
+
+     hop     Shows real plane iterated fractals.
+
+     hyper   Shows spinning n-dimensional hypercubes.
+
+     ico     Shows a bouncing polyhedron.
+
+     ifs     Shows a modified iterated function system.
+
+     image   Shows randomly appearing logos.
+
+     julia   Shows the Julia set.
+
+     kaleid  Shows Brewster's Kaleidoscope.
+
+     kummpa  Shows kumppa.
+
+     laser   Shows spinning lasers.
+
+     life    Shows Conway's game of life.
+
+     life1d  Shows Wolfram's game of 1D life.
+
+     life3d  Shows Bays' game of 3D life.
+
+     lightning
+             Shows Keith's fractal lightning bolts.
+
+     lisa    Shows animated lissajous loops.
+
+     lissie  Shows lissajous worms.
+
+     loop    Shows Langton's self-producing loops.
+
+     mandelbrot
+             Shows mandelbrot sets.
+
+     marquee Shows text.
+
+     maze    Shows a random maze and a depth first  search  solu-
+             tion.
+
+     moebius Shows the Moebius Strip II, an Escher-like GL  scene
+             with ants.  May not be available depending on how it
+             was configured.
+
+     morph3d Shows GL morphing polyhedra.  May not  be  available
+             depending on how it was configured.
+
+     mountain
+             Shows Papo's mountain range.
+
+     munch   Shows munching squares.
+
+     nose    Shows a man with a big nose runs around spewing  out
+             text.
+
+     pacman  Shows Pacman(tm).
+
+     pipes   Shows a  self-building  pipe  system.   May  not  be
+             available depending on how it was configured.
+
+     penrose Shows Penrose's quasiperiodic tilings.
+
+     petal   Shows various GCD Flowers.
+
+     puzzle  Shows a puzzle being scrambled and then solved.
+
+     pyro    Shows fireworks.
+
+     qix     Shows spinning lines a la Qix(tm).
+
+     roll    Shows a rolling ball.
+
+     rotor   Shows Tom's Roto-Rooter.
+     rubik   Shows an auto-solving  Rubik's  Cube.   May  not  be
+             available depending on how it was configured.
+
+     shape   Shows stippled rectangles, ellipses, and triangles.
+
+     sierpinski
+             Shows a Sierpinski's triangle.
+
+     slip    Shows slipping blits.
+
+     sphere  Shows a bunch of shaded spheres.
+
+     spiral  Shows a helical locus of points.
+
+     spline  Shows colorful moving splines.
+
+     sproingies
+             Shows Sproingies!   Nontoxic.   Safe  for  pets  and
+             small  children.   May not be available depending on
+             how it was configured.
+
+     stairs  Shows Infinite Stairs, an Escher-like GL scene.  May
+             not be available depending on how it was configured.
+
+     star    Shows a star field with a twist.
+
+     starfish
+             Shows starfish.
+
+     strange Shows strange attractors.
+
+     superquadrics
+             Shows 3D mathematical shapes.  May not be  available
+             depending on how it was configured.
+
+     swarm   Shows a swarm of bees following a wasp.
+
+     swirl   Shows animated swirling patterns.
+
+     tetris  Shows tetris.
+
+     thornbird
+             Shows an animated Bird in a Thorn Bush fractal map.
+
+     triangle
+             Shows a triangular mountain range.
+
+     tube    Shows an animated tube.
+
+     turtle  Shows turtle fractals.
+
+     vines   Shows fractal-like vines.
+     voters  Shows Dewdney's Voters.
+
+     wator   Shows  Dewdney's  Water-Torus  planet  of  fish  and
+             sharks.
+
+     wire    Shows a random circuit with 2 electrons.
+
+     world   Shows spinning Earths.
+
+     worm    Shows wiggly worms.
+
+     xjack   Shows Jack having one of those days.
+
+     blank   Shows nothing but a black screen.  Does not show  up
+             in random mode.
+
+     bomb    Shows a bomb and will autologout after a time.  Does
+             not  show  up  in  random  mode and may be available
+             depending on how it was configured.
+
+     random  Shows a random mode from  above  except  blank  (and
+             bomb).
+
+
+     -delay usecs
+          The delay option sets the speed at which  a  mode  will
+          operate.   It simply sets the number of microseconds to
+          delay between batches of animations.  In blank mode, it
+          is  important  to  set  this  to  some  small number of
+          seconds,  because  the  keyboard  and  mouse  are  only
+          checked  after  each delay, so you cannot set the delay
+          too high, but a delay of zero would needlessly  consume
+          cpu  checking  for  mouse and keyboard input in a tight
+          loop, since blank mode has no work to do.
+
+     -count num
+          The batchcount option sets number of things to  do  per
+          batch to num .
+
+          In ant mode this refers the number of ants.
+
+          In atlantis mode it is the number of sharks.
+
+          In ball mode it is the number of balls.
+
+          In bat mode it is the number of  bats,  could  be  less
+          because of conflicts.
+
+          In blot mode this refers to the number of  pixels  ren-
+          dered in the same color.
+
+          In bouboule mode it is the number of stars.
+          In bounce mode it is the number of balls, could be less
+          because of conflicts.
+
+          In braid mode it is the upper bound number of strands.
+
+          In bubble mode it is the number of bubbles.
+
+          In bubble3d mode it is the number of bubbles.
+
+          In bug mode it is the number of  bugs,  could  be  less
+          because of conflicts.
+
+          In cage mode it is means nothing.
+
+          In cartoon mode it means nothing.
+
+          In clock mode it is the percentage of the  screen,  but
+          less than 100%.
+
+          In coral mode it is the number of seeds.
+
+          In crystal mode it is the number of polygons.
+
+          In daisy mode it is the  number  flowers  that  make  a
+          meadow.
+
+          In dclock mode it means nothing.
+
+          In deco mode it is the depth.
+
+          In demon mode this refers the number of colors.
+
+          In dilemma mode  this  refers  the  number  of  initial
+          defectors.
+
+          In discrete mode it is the number of points.
+
+          In drift mode it is the number  of  levels  to  recurse
+          (larger = more complex).
+
+          In eyes mode it is the number of eyes.
+
+          In fadeplot mode it is the number of steps.
+
+          In flag mode it means nothing.
+
+          In flame mode it is the number  of  levels  to  recurse
+          (larger = more complex).
+
+          In flow mode it is the number of bees.
+
+          In forest mode it is  the  number  trees  that  make  a
+          forest.
+
+          In galaxy mode it means the number of galaxies.
+
+          In gears mode it is the number of degrees to rotate the
+          set of gears by.
+
+          In goop mode it is the number of blobs per plane.
+
+          In grav mode it is the number of planets.
+
+          In helix mode it means nothing.
+
+          In hop mode this refers to the number  of  pixels  ren-
+          dered in the same color.
+
+          In hyper mode it the number of dimensions.
+
+          In ico mode it is the ith platonic solid.
+
+          In ifs mode it means nothing.
+
+          In image mode it means it is the  number  of  logos  on
+          screen at once.
+
+          In julia mode it is the depth of recursion.
+
+          In kaleid mode it is the number of pens.
+
+          In kumppa mode it means nothing.
+
+          In laser mode it is the number lasers.
+
+          In life mode it is the number of generations  before  a
+          glider is introduced.
+
+          In life1d mode it means nothing.
+
+          In life3d mode it is the number of generations before a
+          glider is introduced.
+
+          In lisa mode it is the number of loops.
+
+          In lissie mode it is the number of worms.
+
+          In loop mode it means nothing.
+
+          In mandelbrot mode it is the order.
+
+          In marquee mode it means nothing.
+
+          In maze mode it means nothing.
+          In moebius mode it is means nothing.
+
+          In morph3d mode it is the ith platonic solid.
+
+          In mountain mode it is the number of mountains.
+
+          In munch mode it means nothing.
+
+          In nose mode it means nothing.
+
+          In qix mode it is the number of points.
+
+          In pacman mode it means the number of ghosts.
+
+          In penrose mode it means nothing.
+
+          In petal mode it the greatest random number of petals.
+
+          In pipes mode it shows different joints,  0  random,  1
+          spherical, 2 bolted elbow, 3 elbow, and 4 alternating.
+
+          In puzzle mode it the number of moves.
+
+          In pyro mode it is the maximum number flying rockets at
+          one time.
+
+          In roll mode it is the number of points.
+
+          In rotor mode it is the number of rotor  thingys  which
+          whirr...
+
+          In rubik mode it is the number of moves.
+
+          In shape mode it means nothing.
+
+          In sierpinski mode it is the number of points.
+
+          In slip mode it means nothing.
+
+          In sphere mode it means nothing.
+
+          In spiral mode it is the number of spirals.
+
+          In spline mode it is the number of points "splined".
+
+          In sproingies mode it is the number of sproingies.
+
+          In stairs mode it is means nothing.
+
+          In star mode it is the number of stars on the screen at
+          once.
+
+          In starfish mode it means nothing.
+
+          In strange mode it means nothing.
+
+          In superquadrics mode its the number of horizontal  and
+          vertical lines in the superquadric.
+
+          In swirl mode it means the number of "knots".
+
+          In swarm mode it is the number of bees.
+
+          In thornbird mode it is the number of points.
+
+          In triangular mode it is the number of mountains.
+
+          In tube mode it is a rectangle (= 1), an ellipse (= 2),
+          or a polygon if greater.
+
+          In turtle mode it means nothing.
+
+          In vines mode it is draw a complete vine  (=  0)  or  a
+          portion (= 1).
+
+          In voters mode it means the number of parties, 2 or 3.
+
+          In wator mode it means the breed time for the fish.
+
+          In wire mode it means the length of the circuit.
+
+          In world mode it is the number of worlds.
+
+          In worm mode it is the number of worms.
+
+          In blank mode it means nothing.
+
+          In bomb mode it means the number of minutes to  autolo-
+          gout.
+
+          A negative count allows for randomness.  The range from
+          the  minimum allowed nonnegative count for a particular
+          mode to the ABS( count ) (or maximum  allowed  count  ,
+          whichever is less).
+
+     -batchcount num
+          The batchcount option is depreciated but  should  still
+          work as count.
+
+     -cycles num
+          The cycles option sets the number of cycles until  time
+          out  for  ant, blot, braid, bug, clock, crystal, daisy,
+          deco,  demon,  dilemma,  discrete,  eyes,  flag,  flow,
+          forest,  galaxy,  helix,  hop, hyper, ico, laser, life,
+          life1d, life3d, lisa, lissie, loop,  mandelbrot,  moun-
+          tain,  petal,  sierpinski, shape, spline +erase, thorn-
+          bird, triangle, tube, voters,  wator,  and  wire.   For
+          worm  it is the length of the lines, for atlantis it is
+          the shark speed, for fadeplot, julia and spiral  it  is
+          the  length  of  the  trail  of  dots,  munch it is the
+          minimum size of the squares, for kaleid it is the %  of
+          black,  for  qix  it is the number of lines, for spline
+          -erase it means the number of splines * 64 (for  compa-
+          tibility  with  +erase),  for gears it is the number of
+          degrees to increment the spin  of  each  gear  by,  for
+          pipes it is the number of systems to draw before clear-
+          ing the screen, for rubik it is the number of steps  to
+          complete  a 90 move, for superquadrics it is the number
+          of frames it takes to morph from one shape to  another.
+          For others it means nothing.
+
+     -size num
+          The size option sets the size maximum size of a star in
+          bouboule,  pyro  and  star,  size  of  ball in ball and
+          bounce, size of bat in bat, maximum size of  bubble  in
+          bubble, size of clock in clock, minimum size of rectan-
+          gles in deco, size of the polygon in crystal,  size  of
+          polyhedron  in  ico,  size of lissie in lissie, size of
+          dots of flag, for kaleid it is the symmetry,  width  of
+          maze  hallway,  size of side of penrose tile, radius of
+          loop in lisa, radius of ball in roll, number of corners
+          in  sierpinski,  size of tube in tube, width of worm in
+          worm, line width in rotor, size of cells in  ant,  bug,
+          dilemma,  life,  life1d, pacman, tetris, voters, wator,
+          and wire.  In pipes it is the maximum length of a  sys-
+          tem.   In atlantis it is the shark size.  In sproingies
+          it is the size of the screen.  A negative number allows
+          for randomness, similar to count.
+
+     -ncolors num
+          The ncolors option sets the maximum number of colors to
+          be used.
+
+     -saturation value
+          The saturation option sets saturation of the color ramp
+          used  to  value  .  0  is  grayscale and 1 is very rich
+          color.  0.4 is a nice pastel.
+
+     -erasemode modename
+          As of this writing there are over 9  erase  modes  sup-
+          ported  (if  its  not  chosen its assumed random).  The
+          erase modes are random_lines, random_squares, venetian,
+          triple_wipe, quad_wipe, circle_wipe, three_circle_wipe,
+          squaretate, no_fade.
+
+     -erasedelay usecs
+          The erasedelay option sets the number  of  microseconds
+          for  steps  of  the  erasemode  (a setting of 0 and the
+          erasemode is bypassed).
+
+     +/-nolock
+          The nolock option causes xlock to only  draw  the  pat-
+          terns and not lock the display.  A key press or a mouse
+          click will terminate the screen saver.
+
+     -/+inwindow
+          Runs xlock in a window, so that you can iconify,  move,
+          or resize it and still use your screen for other stuff.
+          When running in a window, xlock no  longer  locks  your
+          screen, it just looks good.
+
+     -/+inroot
+          Runs xlock in your  root  window.   Like  the  inwindow
+          option  it  no  longer  locks the screen, it just looks
+          good.
+
+     -/+remote
+          The remote option tells xlock  to  not  stop  you  from
+          locking remote X11 servers.  This option should be used
+          with care and is intended mainly to lock X11  terminals
+          which  cannot  run  xlock locally.  If you lock someone
+          else's workstation, they will have to know  your  pass-
+          word   to  unlock  it.   Using  +remote  overrides  any
+          resource derived values for remote and  prevents  xlock
+          from  being  used  to lock other X11 servers.  (Use `+'
+          instead of `-' to override resources for other  options
+          that can take the `+' modifier similarly.)
+
+     -/+mono
+          The mono option causes  xlock  to  display  monochrome,
+          (black  and  white)  pixels  rather  than  the  default
+          colored ones on color displays.
+
+     -/+allowaccess
+          This option is required for servers which do not  allow
+          clients  to modify the host access control list.  It is
+          also useful if you need to run x clients  on  a  server
+          which is locked for some reason...  When allowaccess is
+          true, the X11 server is left open for clients to attach
+          and  thus  lowers  the  inherent  security of this lock
+          screen.  A side effect of using this option is that  if
+          xlock  is  killed -KILL, the access control list is not
+          lost.
+
+     -vtlock modename
+          This option is used on a XFree86 system  to  manage  VT
+          switching in [off|noswitch|switch|restore] mode.
+
+     off       means no VT switch locking.
+
+     switch    means VT switch locking + switching  to  xlock  VT
+               when activated.
+
+     restore   means VT switch locking + switching  to  xlock  VT
+               when  activated  +  switching  back to previous VT
+               when desactivated.
+
+     noswitch  means VT switch locking  only  when  xlock  VT  is
+               active.
+
+     -/+allowroot
+          The allowroot option allows the root password to unlock
+          the  server as well as the user who started xlock.  May
+          not be able to turn this on and off depending  on  your
+          system and how xlock was configured.
+
+     -/+debug
+          Allows xlock to be debugged by doing  all  but  locking
+          the screen.
+
+     -/+description
+          The  description  option  causes  xlock  shows  a  mode
+          description  above  password window.  The default is to
+          show this description.
+
+     -/+echokeys
+          The echokeys option causes xlock to echo '?' characters
+          for each key typed into the password prompt.  Some con-
+          sider this a security risk, so the default  is  to  not
+          echo anything.
+
+     -/+enablesaver
+          By default xlock will disable  the  normal  X  server's
+          screen  saver  since  it is in effect a replacement for
+          it.  Since it is possible to set delay parameters  long
+          enough  to  cause  phosphor burn on some displays, this
+          option will turn back on the default screen saver which
+          is very careful to keep most of the screen black.
+
+     -/+resetsaver
+          By default xlock will call XResetScreenSaver.  This may
+          be undesirable with DPMS monitors.
+
+     -/+grabmouse
+          The grabmouse option causes xlock to grab the mouse and
+          keyboard,  this is the default.  xlock can not lock the
+          screen without this.
+
+     -/+grabserver
+          The grabserver option causes xlock to grab the  server.
+          This  is not usually needed but some unsecure X servers
+          can be defeated without this.
+
+     -/+install
+          Allows xlock to install its own colormap if xlock  runs
+          out  of  colors.   May  not  work  on  with some window
+          managers (fvwm) and does  not  work  with  the  -inroot
+          option.
+
+     -/+mousemotion
+          Allows you to turn on and off the  sensitivity  to  the
+          mouse to bring up the password window.
+
+     -/+sound
+          Allows you to turn on and off sound if  installed  with
+          the capability.
+
+     -/+timeelapsed
+          Allows you to find out how long a machine is locked  so
+          you  can  complain  to an administrator that someone is
+          hogging a machine.
+
+     -/+usefirst
+          The usefirst option causes xlock to use  the  keystroke
+          which got you to the password screen as the first char-
+          acter in the password.  The default is  to  ignore  the
+          first key pressed.
+
+     -/+verbose
+          Verbose mode, tells what options it is going to use.
+
+     -nice nicelevel
+          The nice option sets system nicelevel of the xlock pro-
+          cess to nicelevel .
+
+     -lockdelay seconds
+          The lockdelay option sets the number of seconds  before
+          the  screen  needs a password to be unlocked.  Good for
+          use with an autolocking mechanism like xautolock(1).
+
+     -timeout seconds
+          The timeout option sets the number  of  seconds  before
+          the password screen will time out.
+
+     -font fontname
+          The font option sets the font to be used on the  prompt
+          screen.
+
+     -planfont fontname
+          option sets the font to be used for the  text  that  is
+          displayed in the lower part of the password screen.
+
+     -fg color
+          The fg option sets the color of the text on  the  pass-
+          word screen to color .
+
+     -bg color
+          The bg option sets the color of the background  on  the
+          password screen to color .
+
+     -foreground color
+          The foreground option sets the color of the text on the
+          password screen to color .
+
+     -background color
+          The background option sets the color of the  background
+          on the password screen to color .
+
+     -username string
+          Text string is shown in front of user name, defaults to
+          "Name: ".
+
+     -password string
+          Text string is the password prompt string, defaults  to
+          "Password: ".
+
+     -info string
+          Text string is an informational  message  to  tell  the
+          user what to do, defaults to "Enter password to unlock;
+          select icon to lock.".
+
+     -validate string
+          Text string is a message  shown  while  validating  the
+          password, defaults to "Validating login..."
+
+     -invalid string
+          Text  string  is  a  message  shown  when  password  is
+          invalid, defaults to "Invalid login."
+
+     -geometry geom
+          The geometry option sets geom the size  and  offset  of
+          the  lock  window  (normally  the  entire screen).  The
+          entire screen format is still  used  for  entering  the
+          password.  The purpose is to see the screen even though
+          it is locked.  This should be used with  caution  since
+          many of the modes will fail if the windows are far from
+          square or are too small  (size  must  be  greater  than
+          0x0).   This  should  also be used with -enablesaver to
+          protect screen from phosphor burn.
+
+     -icongeometry geom
+          The icongeometry option  sets  geom  the  size  of  the
+          iconic  screen  (normally 64x64) seen when entering the
+          password.  This should be used with caution since  many
+          of  the  modes  will  fail  if the windows are far from
+          square or are too small  (size  must  be  greater  than
+          0x0).   The  greatest size is 256x256.  There should be
+          some limit so  users  could  see  who  has  locked  the
+          screen.  Position information of icon is ignored.
+
+     -glgeometry geom
+          The glgeometry option sets geom the size of the  screen
+          for gl modes.  Not normally available or needed.
+
+     -/+fullrandom
+          Turn  on/off  randomness  options  within  modes.   Not
+          implemented on all mode options.
+
+     -/+wireframe
+          Turn on/off wireframe, available  on  atlantis,  daisy,
+          gears, life3d, mountain, sproingies, superquadrics, and
+          triangle.
+
+     -/+use3d
+          Turn on/off 3d view, available on bouboule, pyro, star,
+          and worm.
+
+     -delta3d value
+          Space between the center of your 2 eyes for 3d mode.
+
+     -none3d color
+          Color used for empty size in 3d mode.
+
+     -right3d color
+          Color used for right eye in 3d mode.
+
+     -left3d color
+          Color used for left eye in 3d mode.
+
+     -both3d color
+          Color used for overlapping images for  left  and  right
+          eye in 3d mode.
+
+     -program programname
+          The program option sets the program to be used  as  the
+          fortune generator.  Currently used only for marquee and
+          nose modes.
+
+     -messagesfile formatted-filename
+          The messagesfile option sets the file to be used as the
+          fortune  generator.   The  first entry is the number of
+          fortunes, the next line  contains  the  first  fortune.
+          Fortunes  begin  with  a  "%%"  on  a  line  by itself.
+          Currently used only for marquee and nose modes.  If one
+          exists, it takes precedence over the fortune program.
+
+     -messagefile filename
+          The messagefile option sets the file whose contents are
+          displayed.   Currently  used  only for marquee and nose
+          modes.  If one exists, it  takes  precedence  over  the
+          fortune program and messagesfile.
+
+     -message textstring
+          The message option sets the text to be displayed  in  a
+          mode.   Currently  used only for flag, marquee and nose
+          modes.  If one exists, it  takes  precedence  over  the
+          fortune program, messagesfile and message.
+
+     -messagefont fontname
+          The messagefont option sets the font to be used in  the
+          mode.   Currently used only for flag, marquee, and nose
+          modes.
+
+     -bitmap filename
+          The bitmap option sets the xbm, xpm, or ras file to  be
+          displayed with flag, image, life, life1d, maze, or puz-
+          zle mode.  For eyes and  pacman  only  a  xbm  file  is
+          accepted.  Certain modes reject the bitmap if too big.
+
+     -neighbors num
+          The neighbors option sets the number of neighbors of  a
+          cell  to  3,  4,  6,  9 (may not have real mathematical
+          meaning), or 12 for several automata modes.  Setting it
+          to 0 typically randomizes this, except in life where it
+          is set to 8.
+
+     -/+mouse
+          Turn on and off mouse interaction in eyes,  julia,  and
+          swarm.
+
+
+MORE OPTIONS (these may not be available)
+     -cpasswd crypted-password
+          The cpasswd option sets the key to be this text  string
+          to unlock xlock instead of password file.
+
+     -forceLogout minutes
+          The forceLogout option sets minutes to auto-logout.
+
+     -logoutButtonLabel string
+          Text string is a message  shown  inside  logout  button
+          when logout button is displayed.  Defaults to "Logout".
+
+     -logoutButtonHelp string
+          Text string is a message shown  outside  logout  button
+          when  logout  button  is displayed.  Defaults to "Click
+          the \"Logout\" button to log  out  current\n  user  and
+          make workstation available."
+
+     -logoutFailedString string
+          Text string  is  a  message  shown  when  a  logout  is
+          attempted  and  fails.   Defaults  to  "Logout  attempt
+          FAILED.\n  Current  user  could  not  be  automatically
+          logged out."
+
+     -/+dtsaver
+          Turn on/off CDE Saver Mode.  This option is only avail-
+          able if CDE support was compiled in.
+
+     -modulepath path
+          The modulepath option sets the directories  that  xlock
+          searches  for  mode  modules  to  load.   It is a colon
+          separated list of directories to  search.  If  "%S"  is
+          included  in  the  path,  it is replaced by the default
+          modulepath.  To add a private module directory  to  the
+          default  path, use something like '%S:~/mymoduledir' as
+          the path.  This option is only available if module sup-
+          port was compiled in.
+
+     -locksound string
+          Text string references  sound  to  use  at  lock  time.
+          Default  sound,  male  voice:   "Thank  you,  for  your
+          cooperation."
+
+     -infosound string
+          Text string references sound to  use  for  information.
+          Default sound, male voice:  "Identify please."
+
+     -validsound string
+          Text string references sound  to  when  a  password  is
+          valid.  Default sound, female voice:  "Complete."
+
+     -invalidsound string
+          Text string references sound  to  when  a  password  is
+          invalid.   Default  sound, female voice: "I am not pro-
+          grammed to give you that information."
+
+     -startCmd string
+          Text string command  to  execute  when  the  screen  is
+          locked.  Commonly  used instructions include:  "zaway".
+          This command, if still  running  when  the  screensaver
+          exist, will be killed.
+
+     -endCmd string
+          Text string command  to  execute  when  the  screen  is
+          unlocked.
+
+     -logoutCmd string
+          Text string command to execute when  the  program  logs
+          the  user out (either via the autologout or by pressing
+          the logout button).
+
+     -mailCmd string
+          Text string command to  execute  when  the  program  to
+          check mail.
+
+     -mailIcon string
+          Text string of file for the "mail arrived" bitmap.
+
+     -nomailIcon string
+          Text string of file for the "no mail" bitmap.
+
+     -dpmsstandby  seconds
+          Allows one to  set  DPMS  Standby  for  monitor  (0  is
+          defined  as  infinite).   (Horizontal sync on, Vertical
+          sync off, RGB guns off, power supply on, tube filaments
+          energized,   (screen  saver  mode).   Typical  17  inch
+          screen...  110 out of 120 watts with a 3  sec  recovery
+          time.)   This  option is only available if DPMS support
+          was compiled in.
+
+     -dpmssuspend  seconds
+          Allows one to  set  DPMS  Suspend  for  monitor  (0  is
+          defined  as  infinite).  (Horizontal sync off, Vertical
+          sync on, RGB guns off, power supply off, tube filaments
+          energized.   Typical  17 inch screen ...  15 out of 120
+          watts with a 3 sec recovery time.)  This option is only
+          available if DPMS support was compiled in.
+
+     -dpmsoff  seconds
+          Allows one to set DPMS Power  Off  for  monitor  (0  is
+          defined  as  infinite).  (Horizontal sync off, Vertical
+          sync off, Small auxiliary circuit stays on  to  monitor
+          the HS/VS signals to enable power on when data needs to
+          be displayed on the screen.  Typical 17 inch screen ...
+          5  out of 120 watts with a 10 sec recovery time.)  This
+          option is only available if DPMS support  was  compiled
+          in.
+
+
+SPECIAL MODE DEPENDENT OPTIONS
+     -whalespeed num
+          Allows one to set the speed of the whales  and  dolphin
+          in atlantis.
+
+     -/+truchet
+          Turn on and off Truchet lines (trail) in ant.
+
+     -/+boil
+          Turn on and off having the bubbles bubble up in bubble.
+
+     -nx num
+          Allows one to set  the  number  of  unit  cells  in  x-
+          direction in crystal.
+
+     -ny num
+          Allows one to set  the  number  of  unit  cells  in  y-
+          direction in crystal.
+
+     -/+centre
+          Turn on and off the centering on screen in crystal.
+
+     -/+maxsize
+          Turn on and off the centering on screen in crystal.
+
+     -/+cell
+          Turn on and off the drawing of unit cell in crystal.
+
+     -/+grid
+          Turn on and off the drwing of grid of  unit  cells  (if
+          -cell is on) in crystal.
+
+     -/+shift
+          Turn on and off colour cycling in crystal.
+
+     -/+forest
+          Turn on and off the tropical deforest  (hectares/acres)
+          counter in dclock.
+
+     -/+popex
+          Turn on and off the  population  explosion  counter  in
+          dclock.
+
+     -bonus value
+          Allows one to set the bonus for cheating... between 1.0
+          and 4.0 in dilemma.
+
+     -/+garden
+          Turn off and on garden look in daisy.
+
+     -/+conscious
+          Turn off and on self-awareness in dilemma.
+
+     -/+grow
+          Turn  on  and  off  growing  fractals  (else  they  are
+          animated) for drift.
+
+     -/+liss
+          Turn on and off using lissajous figures to  get  points
+          for drift.
+
+     -/+noants
+          Turn off and on ants in moebius.
+
+     -/+solidmoebius
+          Turn on and off solid Mobius strip in moebius.
+
+     -/+invert
+          Turn on and off inverting of the flag.
+
+     -/+tracks
+          Turn on and off star tracks in galaxy.
+
+     -/+decay
+          Turn on and off decaying orbits for grav.
+
+     -/+trail
+          Turn on and off decaying trail of dots for grav.
+
+     -/+ellipse
+          Turn on and off ellipse format in helix.
+
+     -/+martin
+          Turn on and off  Barry  Martin's  square  root  hop.  -
+          /+popcorn  Turn  on and off Clifford A. Pickover's pop-
+          corn hop.
+
+     -/+ejk1...ejk6
+          Turn on and off Ed J. Kubaitis' hops.
+
+     -/+rr
+          Turn on and off Renaldo Recuerdo's hop.
+
+     -/+jong
+          Turn on and off Jong's hop.
+
+     -/+sine
+          Turn on and off Barry Martin's sine hop.
+
+     -/+disconnected
+          Turn on and off disconnected pen movement in kaleid.
+
+     -/+serial
+          Turn on and off  sequential  allocation  of  colors  in
+          kaleid.
+
+     -/+alternate
+          Turn on and off alternate rotated display mode kaleid.
+
+     -/+quad
+          Turn on and off quad mirrored/rotated mode  similar  to
+          size 4 in kaleid.
+
+     -/+oct
+          Turn on and off oct mirrored/rotated  mode  similar  to
+          size 8 in kaleid.
+
+     -/+linear
+          Turn on and  off  Cartesian/Polar  coordinate  mode  in
+          kaleid.
+
+     -rule S<neighborhood>/B<neighborhood>
+          Allows one to set life survival and  birth  parameters.
+          For  example, Conway's rule is S23/B3.  Special parame-
+          ters: P, picks a random rule from all rules  that  have
+          known  patterns;  G, picks a random rule from all rules
+          that have known gliders.
+
+     -lifefile filename
+          The lifefile option sets the lifeform.  Only one format
+          is currently supported, the #P xlife format.
+
+     -/+callahan
+          Turn on and off  Paul  Callahan's  S2b34/B2a  hexagonal
+          life.
+
+     -/+andreen
+          Turn on and off Bob Andreen's S2a2b4a/B2a3a4b hexagonal
+          life.
+
+     -/+totalistic
+          Turn on and off totalistic rules for life1d. If this is
+          off  then  it  follows  rules  of  the LCAU collection.
+          These rules may not be symmetric and are more general.
+
+     -rule3d S<neighborhood>/B<neighborhood>
+          Allows one to set life3d survival and birth parameters.
+          For  example,  Bay's  rules are S45/B5, S567/B6 S56/B5,
+          and S67/B67.  There is currently no  way  of  accessing
+          neighborhoods beyond 9.  Special parameters: P, picks a
+          random rule from all rules that have known patterns; G,
+          picks  a  random  rule  from  all rules that have known
+          gliders.
+
+     -life3dfile filename
+          The life3dfile option sets the lifeform.  Only one for-
+          mat  is  currently  supported,  similar to the #P xlife
+          format.  2 linefeeds in a row are  assumed  to  advance
+          the depth.
+
+     -/+additive
+          Turn on and off additive functions mode in lisa.
+
+     -/+ammann
+          Turn on and off lines for penrose.
+
+     -increment value
+          Allows fine adjustments to order in mandelbrot.
+
+     -/+erase
+          Turn on and off erasing for spline. If this  option  is
+          on,  cycles  is  divided by 64 to compute the number of
+          lines, so as to be compatible when using -fullrandom.
+
+     -factory num
+          Number of extra factory parts in pipes.
+
+     -/+fisheye
+          Turn on if you want a zoomed-in view of pipes.
+
+     -/+tightturns
+          Turn on if you want the pipes to bend more often.
+
+     -/+rotatepipes
+          Turn on if you want the pipe system rotated in pipes.
+
+     -/+complete
+          Turn on or off complete graph morphing in qix.
+
+     -/+hideshuffling
+          Turn on or off hidden shuffle phase for rubik.
+
+     -/+border
+          Turn on or off borders in shape.
+
+     -/+shape
+          Turn on or off shadowing in shape.
+
+     -/+shape
+          Turn on or off stippling in shape.
+
+     -trek num
+          If its a high number you will see the  space  ship  all
+          the time in star.
+
+     -/+rock
+          Turn on and off rocks for star. If this is  off,  stars
+          will be seen instead.
+
+     -/+straight
+          Turn on if star gets you motion sick.
+
+     -cyclepeed num
+          Set speed of cycling in starfish.
+
+     -rotation num
+          Set rotation velocity in starfish.
+
+     -thickness num
+          Set thickness in starfish.
+
+     -/+cycle
+          Turn on and off cycle for starfish.
+
+     -/+rock
+          Turn on and off blob for starfish.
+
+     -spinspeed num
+          Set speed of rotation, in degrees per frame for  super-
+          quadrics.
+
+     -duration seconds
+          Allows one to set a duration  for  a  mode  in  random.
+          Duration of 0 is defined as infinite.
+
+     -modelist textstring
+          Allows one to pass a list of files to randomly  display
+          to random. "all" will get all files but blank (and bomb
+          if  compiled  in).  "all,blank"  will  get  all  modes.
+          "all,-image bounce,+blank" will get all modes but image
+          and bounce.  "bug wator" will get only bug  and  wator.
+          "allgl"  will  get  only  the  GL modes if compiled in,
+          all-allgl will get all but the GL modes, "allnice" will
+          weed  out  high cpu usage modes (as well as hackers and
+          gl modes).  "allxpm" will get all modes that  use  xpm.
+          "allwrite"  will  get  all modes that take advantage of
+          writable colormaps (not including xpm).   "all3d"  will
+          get all the modes that support this option.  "allmouse"
+          will get all the modes that support mouse  interaction.
+          Similarly,  "allautomata" for automata modes, "allfrac-
+          tal" for  fractal  modes,  "allgeometry"  for  geometry
+          modes,  "allspace"  for  space  modes.  The random mode
+          itself can not be referenced.
+
+     -/+sequential
+          Turn on non-random random option.
+
+
+**WARNING**
+     xlock can appear to hang if it is  competing  with  a  high-
+     priority  process  for  the  CPU.  For  example, if xlock is
+     started after a process with  'nice  -20'  (high  priority),
+     xlock will take  considerable amount of time to respond.
+
+
+SHADOW PASSWORDS
+     If the machine is using a shadow password system, then xlock
+     may  not  be  set up to get the real password and so must be
+     given one of its own. This can  be  either  on  the  command
+     line,   via   the   -cpasswd   option,   or   in   the  file
+     $HOME/.xlockrc, with the first taking precedence.   In  both
+     cases  an  encrypted  password is expected (see makekey(8)).
+     If neither is given, then xlock will prompt for  a  password
+     and  will  use that, also storing an encrypted version of it
+     in $HOME/.xlockrc for future use.
+
+BUGS
+     "kill -KILL xlock " causes the server that was locked to  be
+     unusable, since all hosts (including localhost) were removed
+     from the access control list to lock out new X clients,  and
+     since  xlock  could  not catch SIGKILL, it terminated before
+     restoring the access control list.  This will  leave  the  X
+     server  in  a state where "you can no longer connect to that
+     server, and this operation cannot  be  reversed  unless  you
+     reset  the server."            -From the X11R4 Xlib Documen-
+     tation, Chapter 7.
+     NCD terminals do not allow xlock to  remove  all  the  hosts
+     from  the  access  control list.  Therefore you will need to
+     use the "-remote" and "-allowaccess" switches.  If you  hap-
+     pen  to run without "-allowaccess" on an NCD terminal, xlock
+     will not work and you will need to reboot the  terminal,  or
+     simply  go into the SETUP menus, under 'Network Parameters',
+     and turn off TCP/IP access control.
+
+SEE ALSO
+     X(1), Xlib Documentation.
+
+
+AUTHOR
+     Maintained by:
+          David Albert Bagley, <bagleyd@bigfoot.com>
+
+     The latest version is currently at:
+          ftp://ftp.tux.org/pub/tux/bagleyd/xlockmore
+          ftp://ftp.x.org/contrib/applications
+
+     Original Author:
+          Patrick J. Naughton, <naughton@eng.sun.com>
+          Mailstop 21-14
+          Sun Microsystems Laboratories, Inc.
+          Mountain View, CA  94043
+          415/336-1080
+
+     with many additional contributors.
+
+
+COPYRIGHT
+     Copyright (c) 1988-91 by Patrick J. Naughton
+     Copyright (c) 1993-98 by David A. Bagley
+
+     Permission  to  use,  copy,  modify,  and  distribute   this
+     software  and  its documentation for any purpose and without
+     fee is hereby granted, provided  that  the  above  copyright
+     notice  appear  in  all  copies and that both that copyright
+     notice and this permission notice appear in supporting docu-
+     mentation.
+     The original BSD daemon is Copyright (c) 1988 Marshall  Kirk
+     McKusick.  All Rights Reserved.
+     DEC, HP, IBM, Linux, SCO, SGI,  and  Sun  icons  have  their
+     respective copyrights.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/etc/README.etc b/etc/README.etc new file mode 100644 index 00000000..61551a2e --- /dev/null +++ b/etc/README.etc @@ -0,0 +1,48 @@ +These files are just examples of configuration files for xlock and +other tools which I use. They are not normally required. + +descrip.mms is no longer maintained since I can no longer check it on my + VMS system. make.com should work fine. +fortune.dat is for those who do not have fortune. +play.sh is a hack to get sound. +rplay* are ideas for setting up a more sophisticated sound package. +system.*wm*rc.xlock files are for fvwm2, fvwm, WindowMaker, openwin + (olwm & olvwm) and motif (mwm and dtwm) window managers. + By default they include all modes which may not be available depending + on your system. The openwin file can be referenced directly, the others + need to be placed in menu files. +xlock*life.pl stuff is for adding life patterns to life.c not all formats + are handled. However, the major format that is not handled here is close + to the format I use already in life.c. +glider.life and glider.hlife are simple examples of files that can be read + into the life mode like: + "-lifefile glider.life" (which works with "-neighbors 8 -rule S23/B3") + "-lifefile glider.hlife" (which works with "-callahan" or + "-neighbors 6 -rule S2b34/B2a") + There is a limit of 128 initial live cells set by NUMFILEPTS in life.c. +glider.3dlife is a simple example of a files that can be read into the + life3d mode like: + "-life3dfile glider.3dlife" (which works with "-rule3d S45/B5") + There is a limit of 84 initial live cells set by NUMFILEPTS in life3d.c. +xlockrandimage.pl picks a random image. Does not have to be used since + it is built in, one can just give a directory name. Some really old UNIX + systems might not have dirent.h. + +Contributed by Charles Vidal +xlock.tcl is another xlock launcher similar to xmlock and xalock but using + tcl. +xlock.java and xlockFrame.java is yet another xlock launcher similar to + xmlock and xalock but this time using java. Seems to require JDK 1.1.1, + on my 1.0 it can not spawn xlock. + +Contributed by Igor Markov +xlocksat.pl use like "xlock -saturation `xlocksat.pl`" The idea is that + high saturation looks weird at night and low saturation looks weird + during the day. Unfortuantely, as the day progresses the saturation does + not change. +xlockranddur.pl use like "xlock random -duration `xlockranddur.pl`" + This gives a random duration of a mode (providing you have fortune!). + +Contributed by R. Cohen-Scali +vtswitch is a command line tool to disable/enable VT switching for Linux. + Do "chown root.bin vtswitch; chmod 4755 vtswitch" diff --git a/etc/chkmbox/Mail.xpm b/etc/chkmbox/Mail.xpm new file mode 100644 index 00000000..b9016587 --- /dev/null +++ b/etc/chkmbox/Mail.xpm @@ -0,0 +1,88 @@ +/* XPM */ +static char * image_name[] = { +"56 46 39 1", +" c #FFFFFBEEFFFF", +". c #B6DAAEBAB6DA", +"X c #082004100820", +"o c #9E799A699E79", +"O c #8E388A288E38", +"+ c #38E36DB6A699", +"@ c #BEFBB6DABEFB", +"# c #000000001861", +"$ c #A69979E78E38", +"% c #79E786179E79", +"& c #A699A289A699", +"* c #AEBAAEBAB6DA", +"= c #000008200820", +"- c #000000001040", +"; c #8E38861779E7", +": c #A6999E79A699", +"> c #71C679E78617", +", c #AEBA9E795965", +"< c #AEBAB2CACF3C", +"1 c #96589658AEBA", +"2 c #514471C68E38", +"3 c #FFFFF3CEFFFF", +"4 c #C71BBAEAC71B", +"5 c #CF3CC71BCF3C", +"6 c #EFBEF3CEF7DE", +"7 c #69A669A671C6", +"8 c #FFFFFFFFFFFF", +"9 c #AEBAA69971C6", +"0 c #AEBA61856185", +"q c #AEBAA699AEBA", +"w c #71C675D671C6", +"e c #5144A2894924", +"r c #861779E78617", +"t c #BEFBC30BCF3C", +"y c #69A68617BEFB", +"u c #A699A699A699", +"i c #965896589658", +"p c #F7DEB2CAAEBA", +"a c #51445555FFFF", +" .", +" ......................................................X", +" ...............oOO+O+O+O+OOoo.........................X", +" ........@....OO++++++++++X+X++o...@....@....@....@....X", +" o@..o@..o.@O++XoOo+#+#+@$%+OXXX+&...o@..o@..o..@o...o@X", +" ...@.*....O=+X+X+X.O-+=;%$OX+XXXXo*@....*...*@....*@..X", +" o.o.o@o@o+X+X+:oX+$+++$++.>,#+X+XXo.o@o@o@o@o.o@o@o.o.X", +" @*@..o.*+X+#+o.O@<*@+$*$*,1>$X+X+XXo.o*...*..o.*.*...oX", +" o.o.o@o+X+X++@2++O@.*<%@%1%-+>X+-+XXo@o@o@o@1.o@o@o@o@X", +" @..:*.+X+-+-++++$%..<..O<>,OO#+X+X+XX1.o*..o...o...o*.X", +" o.o.oOX+X+++++$%. .3..O.O.24O+XXXOX+X+o9>$X+X+-+X+X+X+o.:o:.o:o.:ooX", +" o@%OX+O++3* .8@8. . ..O.O.%.-+-+-+-+-XXX+.o.o.o.o.:.o.X", +" o10O.X+<++ .8.8. .....@..O.O+-+X+X+X+X+XXoo:oo1oooooooX", +" o.+OOqX+q3+ .8.8.8.8.@O.O.O.X+X+-+-+XXOXX.1.o.o.1.o.1.X", +" oo%%*O.X@*@...*......*...%$O+X+X+-+XX XOXoo:oo:ooo1oooX", +" oq+;O@OO-+$%.. . .....O.O@w++3#e$:ooooX", +" o:+>:.O.X+X+-+X+O.O.O.O.$o:X+-+X+-+X$X.O.O*>O+O+>+X . ... . t+1o1e1X", +"3oo+O$O%:+X+-+-+X+X+=+%$OO1>,1+X . .. .. #eo::oX", +" oo0+%+;$%+-+X+-+-+X+X++%+,+2+# ... .. .. @+$oeqX", +"3ooy+;1>%O++X+-+X+X+X+#>9>+$+X .. .. .. ->::oX", +" eqe$+$+%$>O+X+X+-+-+XO++++++@@..@................@.O0,O>u+X+X+X+X+O#36 3 3 888 +>iX", +" $oOo+++O+2+OX+-+-+-++$X .. . . 888 upu X+:X", +" o%ooo#++>+O>+-+X+XoO%+X . . . ;u, -,OX", +" ,O%o%;+++$+O-+-+-o+$+>X +pp X+oX", +" :>o;:$+#++O++X+X++>+++X ppp ->OX", +" %1Oo%oO++++$#+Xu+;+$++# O%... X+:X", +" >,o$OOo$+#+++-++++++++X XOOX", +" O1Oo%o%qO+++++-++++++-X O;.O..O... X+1X", +" ;$e%;$,2$$++-+++++a+++X XOOX", +" $1$*%OO:%o1q++-+-+X+-+- $%..O.O;@8 X+oX", +" %O%O21O%%Oi2$$+-+-+-+-X 88 8 X$OX", +" ;,>o,$O1%>O:O%;&++X+X+X 88 8 X+>-", +"6%$%%>%O>,O0OO%$>O>$$OOX 88 8 X2,X", +" %o%$%OO%$:%%,>%1,1%;>OO++=X=XX=X=XX=XXXXXXXXX=XX=XXX+>-", +" i;$e%$%>O%;12OO%$;%1>92$O+O+O+O+O+O+O+O+O+O+O+O+O+O+OOX", +" $>9$>OOe$>OO01O%%$>,2>1;$>OO$>,>O$>,>O$>,2OO$>,>O$>9>1X", +".XXX--XX#--X-XXXXXXXX--XXX-X-X-X--X-X--X-X-X-X-X--X-XXXX"}; diff --git a/etc/chkmbox/Makefile b/etc/chkmbox/Makefile new file mode 100644 index 00000000..e310776d --- /dev/null +++ b/etc/chkmbox/Makefile @@ -0,0 +1,21 @@ +# +# Makefile for chkmbox +# + +CC= gcc +LN= gcc + +CFLAGS= -c -O2 -Wall + +XMBOX_OBJS= chkmbox.o imapsocket.o + +all: chkmbox + +.c.o: + $(CC) $(CFLAGS) $< + +chkmbox.o: imapsocket.h + +chkmbox: $(XMBOX_OBJS) + $(LN) -o $@ $(XMBOX_OBJS) + diff --git a/etc/chkmbox/NoMail.xpm b/etc/chkmbox/NoMail.xpm new file mode 100644 index 00000000..21c69d56 --- /dev/null +++ b/etc/chkmbox/NoMail.xpm @@ -0,0 +1,88 @@ +/* XPM */ +static char * image_name[] = { +"56 46 39 1", +" c #FFFFFBEEFFFF", +". c #B6DAAEBAB6DA", +"X c #082004100820", +"o c #9E799A699E79", +"O c #8E388A288E38", +"+ c #38E36DB6A699", +"@ c #BEFBB6DABEFB", +"# c #000000001861", +"$ c #A69979E78E38", +"% c #79E786179E79", +"& c #A699A289A699", +"* c #AEBAAEBAB6DA", +"= c #000008200820", +"- c #000000001040", +"; c #8E38861779E7", +": c #A6999E79A699", +"> c #71C679E78617", +", c #AEBA9E795965", +"< c #AEBAB2CACF3C", +"1 c #96589658AEBA", +"2 c #514471C68E38", +"3 c #FFFFF3CEFFFF", +"4 c #C71BBAEAC71B", +"5 c #CF3CC71BCF3C", +"6 c #EFBEF3CEF7DE", +"7 c #69A669A671C6", +"8 c #FFFFFFFFFFFF", +"9 c #AEBAA69971C6", +"0 c #AEBA61856185", +"q c #AEBAA699AEBA", +"w c #71C675D671C6", +"e c #5144A2894924", +"r c #861779E78617", +"t c #BEFBC30BCF3C", +"y c #69A68617BEFB", +"u c #A699A699A699", +"i c #965896589658", +"p c #F7DEB2CAAEBA", +"a c #51445555FFFF", +" .", +" ......................................................X", +" ...............oOO+O+O+O+OOoo.........................X", +" ........@....OO++++++++++X+X++o...@....@....@....@....X", +" o@..o@..o.@O++XoOo+#+#+@$%+OXXX+&...o@..o@..o..@o...o@X", +" ...@.*....O=+X+X+X.O-+=;%$OX+XXXXo*@....*...*@....*@..X", +" o.o.o@o@o+X+X+:oX+$+++$++.>,#+X+XXo.o@o@o@o@o.o@o@o.o.X", +" @*@..o.*+X+#+o.O@<*@+$*$*,1>$X+X+XXo.o*...*..o.*.*...oX", +" o.o.o@o+X+X++@2++O@.*<%@%1%-+>X+-+XXo@o@o@o@1.o@o@o@o@X", +" @..:*.+X+-+-++++$%..<..O<>,OO#+X+X+XX1.o*..o...o...o*.X", +" o.o.oOX+X+++++$%. .3..O.O.24O+XXXOX+X+o9>$X+X+-+X+X+Xeo.:o:.o:o.:ooX", +" o@%OX+O++3* .8@8. . ..O.O.%.-+-+-+-+-XXXi.o.o.o.o.:.o.X", +" o10O.X+<++ .8.8. .....@..O.O+-+X+X+X+X+XXeo:oo1oooooooX", +" o.+OOqX+q3+ .8.8.8.8.@O.O.O.X+X+-+-+XXOX+.1.o.o.1.o.1.X", +" oo%%*O.X@*@...*......*...%$O+X+X+-+XXOX+Xiooo:2ooo:oooX", +" oq+;O@OO-+$%.. . .....O.O@w:.O.X+X+-+X+O.O.O.O.$::oo:@oX", +" O1+:O>o:X+-+X+-+X$X.O.O*>O+O+>+%++++-X-:eoi:e::oe::oei-", +"3oo+O$O%:+X+-+-+X+X+=+%$OO1>,1++++++-++X-o:e:oreO$io:iqX", +" oo0+%+;$%+-+X+-+-+X+X++%+,+2+%++a+-a-++Xoq>>io:+>iOr>o-", +"3ooy+;1>%O++X+-+X+X+X+#>9>+$+i++++++i++->oeioqoo:eoqoioX", +" eqe$+$+%$>O+X+X+-+-+XO++++++@++++++++X.e,O>u+X+X+X+X+O#36 3 3 888 +>iX", +" $oOo+++O+2+OX+-+-+-++$X .. . . 888 upu X+:X", +" o%ooo#++>+O>+-+X+XoO%+X . . . ;u, -,OX", +" ,O%o%;+++$+O-+-+-o+$+>X +pp X+oX", +" :>o;:$+#++O++X+X++>+++X ppp ->OX", +" %1Oo%oO++++$#+Xu+;+$++# O%... X+:X", +" >,o$OOo$+#+++-++++++++X XOOX", +" O1Oo%o%qO+++++-++++++-X O;.O..O... X+1X", +" ;$e%;$,2$$++-+++++a+++X XOOX", +" $1$*%OO:%o1q++-+-+X+-+- $%..O.O;@8 X+oX", +" %O%O21O%%Oi2$$+-+-+-+-X 88 8 X$OX", +" ;,>o,$O1%>O:O%;&++X+X+X 88 8 X+>-", +"6%$%%>%O>,O0OO%$>O>$$OOX 88 8 X2,X", +" %o%$%OO%$:%%,>%1,1%;>OO++=X=XX=X=XX=XXXXXXXXX=XX=XXX+>-", +" i;$e%$%>O%;12OO%$;%1>92$O+O+O+O+O+O+O+O+O+O+O+O+O+O+OOX", +" $>9$>OOe$>OO01O%%$>,2>1;$>OO$>,>O$>,>O$>,2OO$>,>O$>9>1X", +".XXX--XX#--X-XXXXXXXX--XXX-X-X-X--X-X--X-X-X-X-X--X-XXXX"}; diff --git a/etc/chkmbox/chkmbox.c b/etc/chkmbox/chkmbox.c new file mode 100644 index 00000000..ea5f5195 --- /dev/null +++ b/etc/chkmbox/chkmbox.c @@ -0,0 +1,63 @@ +/****************************************************************************/ +/* + * xmbox.c -- Module to check for mail using an IMAP socket + * + * Logon to an IMAP server and check for unread messages. Return 0 if + * no RECENT or UNSEEN mail exists in the user's INBOX or > 0 if messages + * exist. + * + * Author: Michael P. Duane mduane@seanet.com + * Date: August 12, 1997 + * + * Copyright (c) 1997-98 by Michael P. Duane + * + * 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: + * + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include "imapsocket.h" + +char dftname [] = "chkmbox.cfg"; + +/*************************************************************************/ +int main( int argc, char **argv ) +{ +char *cfgname; +int msgnbr = -1; + + my_name = GetProgramName( *argv ); + + if ( argc >= 2 ) + cfgname = *(argv+1); + else + cfgname = dftname; + + RedirectErrLog(); + GetImapCfgInfo( cfgname ); + if ( !InitSocketAddr() ) + if ( !ServerLogin() ) /* Any errors here it will behave as "no mail" */ + msgnbr = CheckInbox(); + ServerLogout(); + + return( msgnbr ); + +} /* main */ diff --git a/etc/chkmbox/chkmbox.cfg b/etc/chkmbox/chkmbox.cfg new file mode 100644 index 00000000..439f2095 --- /dev/null +++ b/etc/chkmbox/chkmbox.cfg @@ -0,0 +1,7 @@ +# Configuration file for chkmbox + +Hostname = +port = 143 +User = +password = + diff --git a/etc/chkmbox/imapsocket.c b/etc/chkmbox/imapsocket.c new file mode 100644 index 00000000..5e5e800a --- /dev/null +++ b/etc/chkmbox/imapsocket.c @@ -0,0 +1,553 @@ +/****************************************************************************/ +/* + * imapsocket.c -- Module to check for mail using an IMAP socket + * + * Functions to logon to an IMAP server and check the user's INBOX for + * RECENT or UNSEEN mail. Errors may be logged to ~/.xsession-errors if + * stderr is redirected by a call to RedirectErrLog(), otherwise they are + * written to stderr. + * + * It is intended to be used as a set of library functions by a program + * that displays and icon, lights a keyboard LED or otherwise notifies + * a user that mail is waiting to be read. + * + * Author: Michael P. Duane mduane@seanet.com + * Date: August 12, 1997 + * + * Copyright (c) 1997-98 by Michael P. Duane + * + * 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: + * + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef FALSE +#define FALSE 0 +#define TRUE ~FALSE +#endif + +#define MAX_BUFFER_SIZE 8192 +#define MAX_BUFFER_LINES 32 + +#define SOCKET_ERROR (-1) + +char *my_name = ""; + +int fdImap = (-1); +struct sockaddr_in addrImap; + +int seq_num = 0; +char tag [ 8]; + +char hostname [64] = ""; +short port = 0; + +char user [64] = ""; +char passwd [64] = ""; + +char recv_buf [MAX_BUFFER_SIZE]; +char *line [MAX_BUFFER_LINES]; + +/****************************************************************************/ +/* + * GetProgramName() + * + * Extract just the basename from argv[0]. 'basename()' doesn't exist + * on all systems. + */ +char *GetProgramName( char *fullname ) +{ +char *name; + + return( name = ( (name = strrchr( fullname, '/' )) ? ++name : fullname ) ); + +} /* GetProgramName */ + +/****************************************************************************/ +/* + * RedirectErrLog() + * + * Redirect stderr to $HOME/.xsesson-errors. Create it if it doesn't + * exist, append to it if it does. + * + */ +int RedirectErrLog( void ) +{ +char *home; +char xsesserr [255]; +int mode = (O_CREAT | O_APPEND | O_WRONLY); +int fderr; + + if ( (home = getenv( "HOME" )) != NULL ) { + strcat( strcpy( xsesserr, home ), "/.xsession-errors" ); + if ( (fderr = open( xsesserr, mode, 0600 )) > 0 ) { + close( STDERR_FILENO ); + if ( dup( fderr ) == STDERR_FILENO ) + close( fderr ); + } + return( 0 ); + } + + return( -1 ); + +}/* RedirectErrLog */ + +/****************************************************************************/ +/* + * LogMessage() + * + * Prepend all error messages with my program name and log the corresponding + * errno description string where appropriate. + */ +void LogMessage( char *msg, int errval ) +{ + + if ( errval ) + fprintf( stderr, "%s: %s, %s\n", my_name, msg, strerror( errval ) ); + else + fprintf( stderr, "%s: %s\n", my_name, msg ); + +} /* LogMessage */ + +/****************************************************************************/ +/* + * ParseToken() + * + * Validate the "token = value" sequence to include a known token and + * a valid assignment operator. Store the value in a global on success. + */ +static void ParseToken( char *token, char *assign, char *value ) +{ +char errmsg [255]; +int i; + + for ( i=0; i< strlen( token ); i++ ) + *(token+i) = toupper( *(token+i) ); + + if ( strcmp( assign, "=" ) ) { + sprintf( errmsg, "\"%s\" missing assignment", token ); + LogMessage( errmsg, 0 ); + return; + } + + if ( !strcmp( token, "HOSTNAME" ) ) + strcpy( hostname, value ); + else if ( !strcmp( token, "PORT" ) ) + port = (short)strtol( value, (char **)NULL, 0 ); + else if ( !strcmp( token, "USER" ) ) + strcpy( user, value ); + else if ( !strcmp( token, "PASSWORD" ) ) + strcpy( passwd, value ); + else { + sprintf( errmsg, "Unexpected configuration token: \"%s\"", token ); + LogMessage( errmsg, 0 ); + } + +} /* ParseToken */ + +/****************************************************************************/ +static char *GetNextToken( char *str ) +{ + + return( strtok( str, " \t\n\r" ) ); + +} /* GetNextToken */ + +/****************************************************************************/ +/* + * GetImapCfgInfo() + * + * Reads the program configuration file looking for assignments of the + * form "token = value". '#' begins a comment that contiues to EOL. + */ +int GetImapCfgInfo( char *cfgfile ) +{ +FILE *cfg; +char txtbuf [512]; +char *txt; +char *tok; +char *assign; +char *val; + + if ( (cfg = fopen( cfgfile, "r" )) != NULL ) { + do { + if ( (txt = fgets( txtbuf, sizeof( txtbuf ), cfg )) != NULL) { + if ( (tok = GetNextToken( txt )) ) { + assign = val = NULL; + if ( strlen( tok ) ) { + if ( strchr( tok, '#' ) ) + continue; + assign = GetNextToken( NULL ); + val = GetNextToken( NULL ); + GetNextToken( NULL ); /* strip to eol */ + } + if ( assign && val ) + ParseToken( tok, assign, val ); + } + } + } while( !feof( cfg ) ); + fclose( cfg ); + } + else { + LogMessage( cfgfile, errno ); + return( -1 ); + } + + return( 0 ); + +} /* GetImapCfgInfo */ + +/****************************************************************************/ +/* + * InitSocketAddr() + * + * Setup and validate the host/port address for the IMAP socket + */ + +int InitSocketAddr( void ) +{ +struct hostent *host_info; +char addr_str [ 32]; + + if ( (host_info = gethostbyname( hostname )) == NULL ) { + LogMessage( "Host name error", errno ); + return( -1 ); + } + + sprintf( addr_str,"%u.%u.%u.%u", + (unsigned char)host_info->h_addr_list[0][0], + (unsigned char)host_info->h_addr_list[0][1], + (unsigned char)host_info->h_addr_list[0][2], + (unsigned char)host_info->h_addr_list[0][3] + ); + + addrImap.sin_family = PF_INET; + addrImap.sin_addr.s_addr = inet_addr( addr_str ); + addrImap.sin_port = htons( port ); + + if ( addrImap.sin_addr.s_addr == INADDR_NONE ) { + LogMessage( "Socket Address Error", errno ); + return( -1 ); + } + + return( 0 ); + +} /* InitSocketAddr */ + +/****************************************************************************/ +/* + * ConnectSocket() + * + * Open and connect to the IMAP socket + */ + +static int ConnectSocket( struct sockaddr_in *addrImap ) +{ + + if ( addrImap->sin_addr.s_addr == INADDR_NONE ) { + LogMessage( "Socket Address Error", errno ); + return( -1 ); + } + + if ( (fdImap = socket( AF_INET, SOCK_STREAM, 0 )) == SOCKET_ERROR ) { + LogMessage( "Error opening socket", errno ); + return( -1 ); + } + + if ( connect( fdImap, (struct sockaddr *)addrImap, + sizeof( struct sockaddr )) == SOCKET_ERROR ) { + close( fdImap ); + fdImap = (-1); + LogMessage( "Socket Connection error", errno ); + return( -1 ); + } + + return( 0 ); + +} /* ConnectSocket */ + +/****************************************************************************/ +/* + * OpenImapSocket() + * + * Connect to the IMAP socket and make sure the IMAP service responds. + */ + +static int OpenImapSocket( struct sockaddr_in *addrImap ) +{ +int i; + + if ( ConnectSocket( addrImap ) ) + return( -1 ); + + seq_num = 0; + memset( recv_buf, 0, sizeof( recv_buf ) ); + + for( i=0; i 0 ) { + for( i=0; i 0 ) { + for( i=0; iSessions->Failsafe Session item on the +### login screen, login and correct the error. The $HOME/.dt/startlog and +### $HOME/.dt/errorlog files may be helpful in identifying errors. +### +############################################################################## + +# +# If $HOME/.profile (.login) has been edited as described above, uncomment +# the following line. +# +DTSOURCEPROFILE=true + +# +# Screen savers. +# +#DTSCREENSAVERLIST="\ +#StartDtscreenSwarm \ +#StartDtscreenQix \ +#StartDtscreenFlame \ +#StartDtscreenHop \ +#StartDtscreenImage \ +#StartDtscreenLife \ +#StartDtscreenRotor \ +#StartDtscreenPyro \ +#StartDtscreenWorm \ +#StartDtscreenBlank" + +#export DTSCREENSAVERLIST="\ +#$DTSCREENSAVERLIST \ + +#DTSCREEN="/usr/dt/bin/dtscreen" +DTSCREEN="/usr/local/bin/xlock -dtsaver" +export DTSCREEN + +DTSCREENSAVERLIST="\ +StartDtscreenAnt \ +StartDtscreenAtlantis \ +StartDtscreenBall \ +StartDtscreenBat \ +StartDtscreenBlot \ +StartDtscreenBouboule \ +StartDtscreenBounce \ +StartDtscreenBraid \ +StartDtscreenBubble \ +StartDtscreenBubble3d \ +StartDtscreenBug \ +StartDtscreenCage \ +StartDtscreenCartoon \ +StartDtscreenClock \ +StartDtscreenCoral \ +StartDtscreenCrystal \ +StartDtscreenDaisy \ +StartDtscreenDclock \ +StartDtscreenDeco \ +StartDtscreenDemon \ +StartDtscreenDilemma \ +StartDtscreenDiscrete \ +StartDtscreenDrift \ +StartDtscreenEyes \ +StartDtscreenFadeplot \ +StartDtscreenFlag \ +StartDtscreenFlame \ +StartDtscreenFlow \ +StartDtscreenForest \ +StartDtscreenGalaxy \ +StartDtscreenGears \ +StartDtscreenGeometry \ +StartDtscreenGoop \ +StartDtscreenGrav \ +StartDtscreenHelix \ +StartDtscreenHop \ +StartDtscreenHyper \ +StartDtscreenIco \ +StartDtscreenIfs \ +StartDtscreenImage \ +StartDtscreenJulia \ +StartDtscreenKaleid \ +StartDtscreenKumppa \ +StartDtscreenLaser \ +StartDtscreenLife \ +StartDtscreenLife1d \ +StartDtscreenLife3d \ +StartDtscreenLightning \ +StartDtscreenLisa \ +StartDtscreenLissie \ +StartDtscreenLoop \ +StartDtscreenMandelbrot \ +StartDtscreenMarquee \ +StartDtscreenMaze \ +StartDtscreenMoebius \ +StartDtscreenMorph3d \ +StartDtscreenMountain \ +StartDtscreenMunch \ +StartDtscreenNose \ +StartDtscreenQix \ +StartDtscreenPacman \ +StartDtscreenPenrose \ +StartDtscreenPetal \ +StartDtscreenPipes \ +StartDtscreenPuzzle \ +StartDtscreenPyro \ +StartDtscreenRoll \ +StartDtscreenRotor \ +StartDtscreenRubik \ +StartDtscreenShape \ +StartDtscreenSierpinski \ +StartDtscreenSlip \ +StartDtscreenSphere \ +StartDtscreenSpiral \ +StartDtscreenSpline \ +StartDtscreenSproingies \ +StartDtscreenStairs \ +StartDtscreenStar \ +StartDtscreenStarfish \ +StartDtscreenStrange \ +StartDtscreenSuperquadrics \ +StartDtscreenSwarm \ +StartDtscreenSwirl \ +StartDtscreenTetris \ +StartDtscreenThornbird \ +StartDtscreenTriangle \ +StartDtscreenTube \ +StartDtscreenTurtle \ +StartDtscreenVines \ +StartDtscreenVoters \ +StartDtscreenWator \ +StartDtscreenWire \ +StartDtscreenWorld \ +StartDtscreenWorm \ +StartDtscreenXjack \ +StartDtscreenBlank \ +StartDtscreenBomb \ +StartDtscreenRandom" +export DTSCREENSAVERLIST diff --git a/etc/dtscreen.dt b/etc/dtscreen.dt new file mode 100644 index 00000000..80492613 --- /dev/null +++ b/etc/dtscreen.dt @@ -0,0 +1,925 @@ +############################################################################### +# +# dtscreen.dt +# +# Actions for defining screen savers to the Common Desktop Environment. +# +# (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company +# (c) Copyright 1993, 1994, 1995 International Business Machines Corp. +# (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc. +# (c) Copyright 1993, 1994, 1995 Novell, Inc. +# +# $XConsortium: dtscreen.dt.src /main/cde1_maint/1 1995/07/15 03:07:30 drk $ +# +############################################################################### +set DtDbVersion=1.0 + +############################################################################### +# +# WARNING: This file may be overwritten in subsequent installations of +# the Common Desktop Environment (CDE). Consequently, any system wide +# changes should be made to an equivalent database file in +# /etc/dt/types and not in this file. +# +############################################################################### + +################################################################### +# +# Actions +# +# Note: the following are dtscreen's original action changed to use xlock +################################################################### +ACTION StartDtscreenHop +{ + LABEL StartDtscreenHop + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode hop + DESCRIPTION hop: Real plane iterated fractals +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode hop +# DESCRIPTION hop: Hopalong iterated fractals + +ACTION StartDtscreenQix +{ + LABEL StartDtscreenQix + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode qix + DESCRIPTION qix: Spinning lines a la Qix(tm) +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode qix +# DESCRIPTION qix: Spinning lines + +ACTION StartDtscreenImage +{ + LABEL StartDtscreenImage + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode image + DESCRIPTION image: Randomly appearing logos +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode image +# DESCRIPTION image: Random bouncing image + +ACTION StartDtscreenLife +{ + LABEL StartDtscreenLife + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode life + DESCRIPTION life: Conway's game of Life +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode life + +ACTION StartDtscreenSwarm +{ + LABEL StartDtscreenSwarm + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode swarm + DESCRIPTION swarm: A swarm of bees following a wasp +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode swarm +# DESCRIPTION swarm: Swarm of bees + +ACTION StartDtscreenRotor +{ + LABEL StartDtscreenRotor + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode rotor + DESCRIPTION rotor: Tom's Roto-Rotor +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode rotor +# DESCRIPTION rotor: Rotor + +ACTION StartDtscreenPyro +{ + LABEL StartDtscreenPyro + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode pyro + DESCRIPTION pyro: Fireworks +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode pyro + +ACTION StartDtscreenFlame +{ + LABEL StartDtscreenFlame + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode flame + DESCRIPTION flame: Cosmic flame fractals +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode flame +# DESCRIPTION flame: Cosmic Flame Fractals + +ACTION StartDtscreenWorm +{ + LABEL StartDtscreenWorm + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode worm + DESCRIPTION worm: Wiggly worms +} +# EXEC_STRING /usr/dt/bin/dtscreen -mode worm +# DESCRIPTION worm: Wiggly Worms + +ACTION StartDtscreenBlank +{ + LABEL StartDtscreenBlank + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode blank + DESCRIPTION blank: Nothing but a blank screen +} +# DESCRIPTION blank: Blank Screen + +################################################################### +# +# xlock's modes that dtscreen doesn't have. +# +################################################################### +ACTION StartDtscreenAnt +{ + LABEL StartDtscreenAnt + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode ant + DESCRIPTION ant: Langton's and Turk's generalized ants +} + +ACTION StartDtscreenAtlantis +{ + LABEL StartDtscreenAtlantis + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode atlantis + DESCRIPTION atlantis: Moving sharks/whales/dolphin +} + +ACTION StartDtscreenBall +{ + LABEL StartDtscreenBall + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode ball + DESCRIPTION ball: Bouncing balls +} + +ACTION StartDtscreenBat +{ + LABEL StartDtscreenBat + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bat + DESCRIPTION bat: Bouncing flying bats +} + +ACTION StartDtscreenBlot +{ + LABEL StartDtscreenBlot + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode blot + DESCRIPTION blot: Rorschach's ink blot test +} + +ACTION StartDtscreenBouboule +{ + LABEL StartDtscreenBouboule + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bouboule + DESCRIPTION bouboule: Mimi's bouboule of moving stars +} + +ACTION StartDtscreenBounce +{ + LABEL StartDtscreenBounce + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bounce + DESCRIPTION bounce: Bouncing footballs +} + +ACTION StartDtscreenBraid +{ + LABEL StartDtscreenBraid + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode braid + DESCRIPTION braid: Random braids and knots +} + +ACTION StartDtscreenBubble +{ + LABEL StartDtscreenBubble + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bubble + DESCRIPTION bubble: Popping bubbles +} + +ACTION StartDtscreenBubble3d +{ + LABEL StartDtscreenBubble3d + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bubble3d + DESCRIPTION bubble3d: Richard Jones's GL bubbles +} +ACTION StartDtscreenBug +{ + LABEL StartDtscreenBug + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bug + DESCRIPTION bug: Palmiter's bug evolution and garden of Eden +} + +ACTION StartDtscreenCage +{ + LABEL StartDtscreenCage + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode cage + DESCRIPTION cage: The Impossible Cage, an Escher-like GL scene +} + +ACTION StartDtscreenCartoon +{ + LABEL StartDtscreenCartoon + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode cartoon + DESCRIPTION cartoon: Bouncing cartoons +} + +ACTION StartDtscreenClock +{ + LABEL StartDtscreenClock + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode clock + DESCRIPTION clock: Packard's clock +} + +ACTION StartDtscreenCoral +{ + LABEL StartDtscreenCoral + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode coral + DESCRIPTION coral: A coral reef +} + +ACTION StartDtscreenCrystal +{ + LABEL StartDtscreenCrystal + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode crystal +install + DESCRIPTION crystal: Polygons in 2D plane groups +} + +ACTION StartDtscreenDaisy +{ + LABEL StartDtscreenDaisy + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode daisy + DESCRIPTION daisy: A meadow of daisies +} + +ACTION StartDtscreenDclock +{ + LABEL StartDtscreenDclock + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode dclock + DESCRIPTION dclock: A floating digital clock +} + +ACTION StartDtscreenDeco +{ + LABEL StartDtscreenDeco + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode deco + DESCRIPTION deco: Art as ugly as sin +} + +ACTION StartDtscreenDemon +{ + LABEL StartDtscreenDemon + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode demon + DESCRIPTION demon: Griffeath's cellular automata +} + +ACTION StartDtscreenDilemma +{ + LABEL StartDtscreenDilemma + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode dilemma + DESCRIPTION dilemma: Lloyd's Prisoner's Dilemma simulation +} + +ACTION StartDtscreenDiscrete +{ + LABEL StartDtscreenDiscrete + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode discrete + DESCRIPTION discrete: Various discrete maps +} + +ACTION StartDtscreenDrift +{ + LABEL StartDtscreenDrift + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode drift + DESCRIPTION drift: Cosmic drifting flame fractals +} + +ACTION StartDtscreenEyes +{ + LABEL StartDtscreenEyes + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode eyes + DESCRIPTION eyes: Eyes following a bouncing grelb +} + +ACTION StartDtscreenFadeplot +{ + LABEL StartDtscreenFadeplot + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode fadeplot + DESCRIPTION fadeplot: A fading plot of sine squared +} + +ACTION StartDtscreenFlag +{ + LABEL StartDtscreenFlag + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode flag + DESCRIPTION flag: A waving flag of your operating system +} + +ACTION StartDtscreenFlow +{ + LABEL StartDtscreenFlow + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode flow + DESCRIPTION flow: Dynamic strange attractors +} + +ACTION StartDtscreenForest +{ + LABEL StartDtscreenForest + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode forest + DESCRIPTION forest: Binary trees of a fractal forest +} + +ACTION StartDtscreenGalaxy +{ + LABEL StartDtscreenGalaxy + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode galaxy + DESCRIPTION galaxy: Crashing spiral galaxies +} + +ACTION StartDtscreenGears +{ + LABEL StartDtscreenGears + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode gears + DESCRIPTION gears: GL's gears +} + +ACTION StartDtscreenGoop +{ + LABEL StartDtscreenGoop + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode goop + DESCRIPTION goop: Goop from a lava lamp +} + +ACTION StartDtscreenGrav +{ + LABEL StartDtscreenGrav + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode grav + DESCRIPTION grav: Orbiting planets +} + +ACTION StartDtscreenHelix +{ + LABEL StartDtscreenHelix + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode helix + DESCRIPTION helix: String art +} + +ACTION StartDtscreenHyper +{ + LABEL StartDtscreenHyper + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode hyper + DESCRIPTION hyper: Spinning n-dimensional hypercubes +} + +ACTION StartDtscreenIco +{ + LABEL StartDtscreenIco + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode ico + DESCRIPTION ico: A bouncing polyhedra +} + +ACTION StartDtscreenIfs +{ + LABEL StartDtscreenIfs + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode ifs + DESCRIPTION ifs: A modified iterated function system +} + +ACTION StartDtscreenJulia +{ + LABEL StartDtscreenJulia + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode julia + DESCRIPTION julia: The Julia set +} + +ACTION StartDtscreenKaleid +{ + LABEL StartDtscreenKaleid + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode kaleid + DESCRIPTION kaleid: Brewster's Kaleidoscope +} + +ACTION StartDtscreenKumppa +{ + LABEL StartDtscreenKumppa + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode kumppa +install + DESCRIPTION kumppa: Kumppa +} + +ACTION StartDtscreenLaser +{ + LABEL StartDtscreenLaser + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode laser + DESCRIPTION laser: Spinning lasers +} + +ACTION StartDtscreenLife1d +{ + LABEL StartDtscreenLife1d + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode life1d + DESCRIPTION life1d: Wolfram's game of 1D Life +} + +ACTION StartDtscreenLife3d +{ + LABEL StartDtscreenLife3d + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode life3d + DESCRIPTION life3d: Bays' game of 3D Life +} + +ACTION StartDtscreenLightning +{ + LABEL StartDtscreenLightning + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode lightning + DESCRIPTION lightning: Keith's fractal lightning bolts +} + +ACTION StartDtscreenLisa +{ + LABEL StartDtscreenLisa + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode lisa + DESCRIPTION lisa: Animated lisajous loops +} + +ACTION StartDtscreenLissie +{ + LABEL StartDtscreenLissie + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode lissie + DESCRIPTION lissie: Lissajous worms +} + +ACTION StartDtscreenLoop +{ + LABEL StartDtscreenLoop + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode loop + DESCRIPTION loop: Langton's self-producing loops +} + +ACTION StartDtscreenMandelbrot +{ + LABEL StartDtscreenMandelbrot + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode mandelbrot + DESCRIPTION mandelbrot: Mandelbrot sets +} + +ACTION StartDtscreenMarquee +{ + LABEL StartDtscreenMarquee + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode marquee + DESCRIPTION marquee: Messages +} + +ACTION StartDtscreenMaze +{ + LABEL StartDtscreenMaze + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode maze + DESCRIPTION maze: A random maze and a depth first search solution +} + +ACTION StartDtscreenMoebius +{ + LABEL StartDtscreenMoebius + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode moebius + DESCRIPTION moebius: Moebius Strip II, an Escher-like GL scene with ants +} + +ACTION StartDtscreenMorph3d +{ + LABEL StartDtscreenMorph3d + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode morph3d + DESCRIPTION morph3d: GL morphing polyhedra +} + +ACTION StartDtscreenMountain +{ + LABEL StartDtscreenMountain + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode mountain + DESCRIPTION mountain: Papo's mountain range +} + +ACTION StartDtscreenMunch +{ + LABEL StartDtscreenMunch + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode munch + DESCRIPTION munch: Munching squares +} + +ACTION StartDtscreenNose +{ + LABEL StartDtscreenNose + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode nose + DESCRIPTION nose: A man with a big nose runs around spewing out messages +} + +ACTION StartDtscreenPacman +{ + LABEL StartDtscreenPacman + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode pacman + DESCRIPTION pacman: Pacman(tm) +} + +ACTION StartDtscreenPenrose +{ + LABEL StartDtscreenPenrose + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode penrose + DESCRIPTION penrose: Penrose's quasiperiodic tilings +} + +ACTION StartDtscreenPetal +{ + LABEL StartDtscreenPetal + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode petal + DESCRIPTION petal: Various GCD Flowers +} + +ACTION StartDtscreenPipes +{ + LABEL StartDtscreenPipes + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode pipes + DESCRIPTION pipes: A selfbuilding pipe system +} + +ACTION StartDtscreenPuzzle +{ + LABEL StartDtscreenPuzzle + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode puzzle + DESCRIPTION puzzle: A puzzle being scrambled and then solved +} + +ACTION StartDtscreenRoll +{ + LABEL StartDtscreenRoll + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode roll + DESCRIPTION roll: A rolling ball +} + +ACTION StartDtscreenRubik +{ + LABEL StartDtscreenRubik + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode rubik + DESCRIPTION rubik: An auto-solving Rubik's cube +} + +ACTION StartDtscreenShape +{ + LABEL StartDtscreenShape + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode shape + DESCRIPTION shape: Stippled rectangles, ellipses, and triangles +} + +ACTION StartDtscreenSierpinski +{ + LABEL StartDtscreenSierpinski + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode sierpinski + DESCRIPTION sierpinski: Sierpinski's triangle +} + +ACTION StartDtscreenSlip +{ + LABEL StartDtscreenSlip + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode slip + DESCRIPTION slip: Slipping blits +} + +ACTION StartDtscreenSphere +{ + LABEL StartDtscreenSphere + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode sphere + DESCRIPTION sphere: A bunch of shaded spheres +} + +ACTION StartDtscreenSpiral +{ + LABEL StartDtscreenSpiral + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode spiral + DESCRIPTION spiral: Helixes of dots +} + +ACTION StartDtscreenSpline +{ + LABEL StartDtscreenSpline + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode spline + DESCRIPTION spline: Colorful moving splines +} + +ACTION StartDtscreenSproingies +{ + LABEL StartDtscreenSproingies + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode sproingies + DESCRIPTION sproingies: Sproingies! Nontoxic. Safe for pets and small children +} + +ACTION StartDtscreenStairs +{ + LABEL StartDtscreenStairs + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode stairs + DESCRIPTION stairs: Infinite Stairs, an Escher-like GL scene +} + +ACTION StartDtscreenStar +{ + LABEL StartDtscreenStar + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode star + DESCRIPTION star: A star field with a twist +} + +ACTION StartDtscreenStarfish +{ + LABEL StartDtscreenStarfish + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode starfish +install + DESCRIPTION starfish: Starfish +} + +ACTION StartDtscreenStrange +{ + LABEL StartDtscreenStrange + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode strange + DESCRIPTION strange: Strange attractors +} + +ACTION StartDtscreenSuperquadrics +{ + LABEL StartDtscreenSuperquadrics + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode superquadrics + DESCRIPTION superquadrics: 3D mathematical shapes +} + +ACTION StartDtscreenSwirl +{ + LABEL StartDtscreenSwirl + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode swirl + DESCRIPTION swirl: Animated swirling patterns +} + +ACTION StartDtscreenTetris +{ + LABEL StartDtscreenTetris + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode tetris +install + DESCRIPTION tetris: Tetris +} + +ACTION StartDtscreenThornbird +{ + LABEL StartDtscreenThornbird + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode thornbird + DESCRIPTION thornbird: An animated Bird in a Thorn Bush fractal map +} + +ACTION StartDtscreenTriangle +{ + LABEL StartDtscreenTriangle + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode triangle + DESCRIPTION triangle: A triangle mountain range +} + +ACTION StartDtscreenTube +{ + LABEL StartDtscreenTube + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode tube + DESCRIPTION tube: An animated tube +} + +ACTION StartDtscreenTurtle +{ + LABEL StartDtscreenTurtle + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode turtle + DESCRIPTION turtle: Turtle fractals +} + +ACTION StartDtscreenVines +{ + LABEL StartDtscreenVines + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode vines + DESCRIPTION vines: Fractals +} + +ACTION StartDtscreenVoters +{ + LABEL StartDtscreenVoters + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode voters + DESCRIPTION voters: Dewdney's Voters +} + +ACTION StartDtscreenWator +{ + LABEL StartDtscreenWator + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode wator + DESCRIPTION wator: Dewdney's Water-Torus planet of fish and sharks +} + +ACTION StartDtscreenWire +{ + LABEL StartDtscreenWire + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode wire + DESCRIPTION wire: A random circuit with 2 electrons +} + +ACTION StartDtscreenWorld +{ + LABEL StartDtscreenWorld + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode world + DESCRIPTION world: Spinning Earths +} + +ACTION StartDtscreenXjack +{ + LABEL StartDtscreenXjack + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode xjack + DESCRIPTION xjack: Jack having one of those days +} + +ACTION StartDtscreenBomb +{ + LABEL StartDtscreenBomb + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode bomb + DESCRIPTION bomb: A bomb and will autologout after a time +} + +ACTION StartDtscreenRandom +{ + LABEL StartDtscreenRandom + TYPE COMMAND + WINDOW_TYPE NO_STDIO + EXEC_STRING $DTSCREEN -mode random + DESCRIPTION random: A random mode except blank and bomb +} + diff --git a/etc/fortune.dat b/etc/fortune.dat new file mode 100644 index 00000000..9d8b0678 --- /dev/null +++ b/etc/fortune.dat @@ -0,0 +1,4052 @@ +1420 +%% +(She is loud and stubborn; her feet abide not in her house: +Now is she without, now in the streets, and lieth in wait at every corner.) +So she caught him, and kissed him, and +with an impudent face said unto him, +I have peace offerings with me; this day have I payed my vows. +%% +* UNIX is a trademark of AT&T Bell Laboratories. +%% +1 bulls, 3 cows. +%% +10.0 times 0.1 is hardly ever 1.0. +%% +A GOOD name is rather to be chosen than great riches, and +loving favour rather than silver and gold. +%% +A Puritan is someone who is deathly afraid that someone +somewhere is having fun. +%% +A bad compromise is better than a good battle. -- Russian +proverb +%% +A bird in hand is worth two in the bush. -- Cervantes +%% +A bird in the bush can't relieve itself in your hand. +%% +A brother offended is harder to be won than a strong city: +and their contentions are like the bars of a castle. +%% +A clash of doctrine is not a disaster -- it is an +opportunity. +%% +A conservative is one who is too cowardly to fight and too +fat to run. +%% +A continual dropping in a very rainy day and a contentious +woman are alike. +%% +A divine sentence is in the lips of the king: his mouth +transgresseth not in judgment. +%% +A faithful man shall abound with blessings: but he that +maketh haste to be rich shall not be innocent. +%% +A faithful witness will not lie: but a false witness will +utter lies. +%% +A false balance is abomination to the LORD: but a just +weight is his delight. +%% +A false witness shall not be unpunished, and he that +speaketh lies shall not escape. +%% +A false witness shall not be unpunished, and he that +speaketh lies shall perish. +%% +A fanatic is one who can't change his mind and won't change +the subject. +%% +A fool despiseth his father's instruction: but he that +regardeth reproof is prudent. +%% +A fool hath no delight in understanding, but that his heart +may discover itself. +%% +A fool uttereth all his mind: but a wise man keepeth it in +till afterwards. +%% +A fool's lips enter into contention, and his mouth calleth +for strokes. +%% +A fool's mouth is his destruction, and his lips are the +snare of his soul. +%% +A fool's wrath is presently known: but a prudent man +covereth shame. +%% +A foolish consistency is the hobgoblin of little minds. +%% +A foolish son is a grief to his father, and bitterness to +her that bare him. +%% +A foolish son is the calamity of his father: and the +contentions of a wife are a continual dropping. +%% +A foolish woman is clamorous: she is simple, and knoweth +nothing. +%% +A froward man soweth strife: and a whisperer separateth +chief friends. +%% +A gift in secret pacifieth anger: and a reward in the bosom +strong wrath. +%% +A gift is as a precious stone in the eyes of him that hath +it: whithersoever it turneth, it prospereth. +%% +A gift of flowers will soon be made to you. +%% +A good man leaveth an inheritance to his children's +children: and the wealth of the sinner is laid up for the just. +%% +A good man obtaineth favour of the LORD: but a man of +wicked devices will he condemn. +%% +A good memory does not equal pale ink. +%% +A gracious woman retaineth honour: and strong men retain +riches. +%% +A great empire, like a great cake, is most easily +diminished at the edges. +%% +A hammer sometimes misses its mark -- a bouquet never. +%% +A handful of friends is worth more than a wagon of gold. +%% +A hen is only an egg's way of making another egg. +%% +A hermit is a deserter from the army of humanity. +%% +A journey of a thousand miles begins with a cash advance. +%% +A just weight and balance are the LORD's: all the weights +of the bag are his work. +%% +A king that sitteth in the throne of judgment scattereth +away all evil with his eyes. +%% +A king's castle is his home. +%% +A lack of leadership is no substitute for inaction. +%% +A liberal is someone too poor to be a capitalist and too +rich to be a communist. +%% +A lying tongue hateth those that are afflicted by it; and a +flattering mouth worketh ruin. +%% +A man forgives only when he is in the wrong. +%% +A man hath joy by the answer of his mouth: and a word +spoken in due season, how good is it! The way of life is above +to the wise, that he may depart from hell beneath. +%% +A man of genius makes no mistakes. His errors are +volitional and are the portals of discovery. +%% +A man of great wrath shall suffer punishment: for if thou +deliver him, yet thou must do it again. +%% +A man paints with his brains and not with his hands. +%% +A man shall be commended according to his wisdom: but he +that is of a perverse heart shall be despised. +%% +A man shall be satisfied with good by the fruit of his +mouth: and the recompence of a man's hands shall be rendered +unto him. +%% +A man shall eat good by the fruit of his mouth: but the +soul of the transgressors shall eat violence. +%% +A man shall not be established by wickedness: but the root +of the righteous shall not be moved. +%% +A man that beareth false witness against his neighbour is a +maul, and a sword, and a sharp arrow. +%% +A man that doeth violence to the blood of any person shall +flee to the pit; let no man stay him. +%% +A man that flattereth his neighbour spreadeth a net for his +feet. +%% +A man that hath friends must shew himself friendly: and +there is a friend that sticketh closer than a brother. +%% +A man void of understanding striketh hands, and becometh +surety in the presence of his friend. +%% +A man who fishes for marlin in ponds will put his money in +Etruscan bonds. +%% +A man who turns green has eschewed protein. +%% +A man's belly shall be satisfied with the fruit of his +mouth; and with the increase of his lips shall he be filled. +%% +A man's gift maketh room for him, and bringeth him before +great men. +%% +A man's heart deviseth his way: but the LORD directeth his +steps. +%% +A man's pride shall bring him low: but honour shall uphold +the humble in spirit. +%% +A merry heart doeth good like a medicine: but a broken +spirit drieth the bones. +%% +A merry heart maketh a cheerful countenance: but by sorrow +of the heart the spirit is broken. +%% +A naughty person, a wicked man, walketh with a froward +mouth. +%% +A plucked goose doesn't lay golden eggs. +%% +A poor man that oppresseth the poor is like a sweeping rain +which leaveth no food. +%% +A professor is one who talks in someone else's sleep. +%% +A programming language is low-level when its programs +require attention to the irrelevant. +%% +A programming language that does not affect the way you +think about programming is not worth knowing. +%% +A prudent man concealeth knowledge: but the heart of fools +proclaimeth foolishness. +%% +A prudent man foreseeth the evil, and hideth himself: but +the simple pass on, and are punished. +%% +A prudent man foreseeth the evil, and hideth himself; but +the simple pass on, and are punished. +%% +A reproof entereth more into a wise man than an hundred +stripes into a fool. +%% +A righteous man falling down before the wicked is as a +troubled fountain, and a corrupt spring. +%% +A righteous man hateth lying: but a wicked man is +loathsome, and cometh to shame. +%% +A righteous man regardeth the life of his beast: but the +tender mercies of the wicked are cruel. +%% +A scorner seeketh wisdom, and findeth it not: but knowledge +is easy unto him that understandeth. +%% +A servant will not be corrected by words: for though he +understand he will not answer. +%% +A slothful man hideth his hand in his bosom, and will not +so much as bring it to his mouth again. +%% +A soft answer turneth away wrath: but grievous words stir +up anger. +%% +A soft drink turneth away company. +%% +A sound heart is the life of the flesh: but envy the +rottenness of the bones. +%% +A stone is heavy, and the sand weighty; but a fool's wrath +is heavier than them both. +%% +A straw vote only shows which way the hot air blows. +%% +A talebearer revealeth secrets: but he that is of a +faithful spirit concealeth the matter. +%% +A thing not worth doing is worth not doing well. +%% +A thing worth doing is worth the trouble of asking somebody +else to do. +%% +A true witness delivereth souls: but a deceitful witness +speaketh lies. +%% +A truly wise man never plays leapfrog with a Unicorn. +%% +A violent man enticeth his neighbour, and leadeth him into +the way that is not good. +%% +A virtuous woman is a crown to her husband: but she that +maketh ashamed is as rottenness in his bones. +%% +A visit to a fresh place will bring strange work. +%% +A visit to a strange place will bring fresh work. +%% +A whip for the horse, a bridle for the ass, and a rod for +the fool's back. +%% +A wholesome tongue is a tree of life: but perverseness +therein is a breach in the spirit. +%% +A wicked doer giveth heed to false lips; and a liar giveth +ear to a naughty tongue. +%% +A wicked man hardeneth his face: but as for the upright, he +directeth his way. +%% +A wicked man taketh a gift out of the bosom to pervert the +ways of judgment. +%% +A wicked messenger falleth into mischief: but a faithful +ambassador is health. +%% +A wise king scattereth the wicked, and bringeth the wheel +over them. +%% +A wise man feareth, and departeth from evil: but the fool +rageth, and is confident. +%% +A wise man is strong; yea, a man of knowledge increaseth +strength. +%% +A wise man scaleth the city of the mighty, and casteth down +the strength of the confidence thereof. +%% +A wise man will hear, and will increase learning; and a man +of understanding shall attain unto wise counsels: To +understand a proverb, and the interpretation; the words of the +wise, and their dark sayings. +%% +A wise servant shall have rule over a son that causeth +shame, and shall have part of the inheritance among the +brethren. +%% +A wise son heareth his father's instruction: but a scorner +heareth not rebuke. +%% +A wise son maketh a glad father: but a foolish man +despiseth his mother. +%% +A woman without a man is like a fish without a bicycle. +%% +A word fitly spoken is like apples of gold in pictures of +silver. +%% +A wound and dishonour shall he get; and his reproach shall +not be wiped away. +%% +A wrathful man stirreth up strife: but he that is slow to +anger appeaseth strife. +%% +About all some men accomplish in life is to send a son to +Harvard. +%% +About the only thing on a farm that has an easy time is the +dog. +%% +Above all things, reverence yourself. +%% +Absence makes the heart grow fonder. -- Sextus Aurelius +%% +Absolute power corrupts absolutely. +%% +Academy: A modern school where football is taught. +%% +Accuse not a servant unto his master, lest he curse thee, +and thou be found guilty. +%% +Actors will happen in the best-regulated families. +%% +Add thou not unto his words, lest he reprove thee, and thou +be found a liar. +%% +Admiration: Our polite recognition of another's resemblance +to ourselves. +%% +After a number of decimal places, nobody gives a darn. +%% +Age and treachery will always overcome youth and skill. +%% +Alimony and bribes will engage a large share of your wealth. +%% +All great ideas are controversial, or have been at one time. +%% +All heiresses are beautiful. -- John Dryden +%% +All in all, it's just another brick in the wall ... +%% +All that glitters has a high refractive index. +%% +All that trembles doesn't fall. -- Russian proverb +%% +All the brave men are in prison. -- Russian proverb +%% +All the brethren of the poor do hate him: how much more do +his friends go far from him? he pursueth them with words, +yet they are wanting to him. +%% +All the days of the afflicted are evil: but he that is of a +merry heart hath a continual feast. +%% +All the ways of a man are clean in his own eyes; but the +LORD weigheth the spirits. +%% +All the words of my mouth are in righteousness; there is +nothing froward or perverse in them. +%% +All this wheeling and dealing around, why, it isn't for +money, it's for fun. Money's just the way we keep score. +%% +Also to punish the just is not good, nor to strike princes +for equity. +%% +Also, that the soul be without knowledge, it is not good; +and he that hasteth with his feet sinneth. +%% +Always do right. This will gratify some people, and +astonish the rest. +%% +America's best buy for a dime is a telephone call to the +right person. +%% +An angry man stirreth up strife, and a furious man +aboundeth in transgression. +%% +An evil man seeketh only rebellion: therefore a cruel +messenger shall be sent against him. +%% +An expert is a person who avoids the small errors as he +sweeps on to the grand fallacy. +%% +An eye for an eye, a tooth for a tooth. +%% +An high look, and a proud heart, and the plowing of the +wicked, is sin. +%% +An hypocrite with his mouth destroyeth his neighbour: but +through knowledge shall the just be delivered. +%% +An idle mind is worth two in the bush. +%% +An inheritance may be gotten hastily at the beginning; but +the end thereof shall not be blessed. +%% +An optimist believes this to be the best of all possible +worlds. A pessimist fears this to be true. +%% +An ungodly man diggeth up evil: and in his lips there is as +a burning fire. +%% +An ungodly witness scorneth judgment: and the mouth of the +wicked devoureth iniquity. +%% +An unjust man is an abomination to the just: and he that is +upright in the way is abomination to the wicked. +%% +And they lay wait for their own blood; they lurk privily +for their own lives. +%% +And thou shalt have goats' milk enough for thy food, for +the food of thy household, and for the maintenance for thy +maidens. +%% +And why wilt thou, my son, be ravished with a strange +woman, and embrace the bosom of a stranger? For the ways of man +are before the eyes of the LORD, and he pondereth all his goings. +%% +Answer a fool according to his folly, lest he be wise in +his own conceit. +%% +Answer not a fool according to his folly, lest thou also be +like unto him. +%% +Anticipated events never live up to expectations. +%% +Any fool can paint a picture, but it takes a wise man to be +able to sell it. +%% +Anybody can win, unless there happens to be a second entry. +%% +Apply thine heart unto instruction, and thine ears to the +words of knowledge. +%% +As a bird that wandereth from her nest, so is a man that +wandereth from his place. +%% +As a dog returneth to his vomit, so a fool returneth to his +folly. +%% +As a jewel of gold in a swine's snout, so is a fair woman +which is without discretion. +%% +As a mad man who casteth firebrands, arrows, and death, So +is the man that deceiveth his neighbour, and saith, Am not +I in sport? Where no wood is, there the fire goeth out: so +where there is no talebearer, the strife ceaseth. +%% +As a roaring lion, and a ranging bear; so is a wicked ruler +over the poor people. +%% +As a thorn goeth up into the hand of a drunkard, so is a +parable in the mouths of fools. +%% +As an earring of gold, and an ornament of fine gold, so is +a wise reprover upon an obedient ear. +%% +As coals are to burning coals, and wood to fire; so is a +contentious man to kindle strife. +%% +As cold waters to a thirsty soul, so is good news from a +far country. +%% +As goatherd learns his trade by goat, so writer learns his +trade by wrote. +%% +As he that bindeth a stone in a sling, so is he that giveth +honour to a fool. +%% +As he that taketh away a garment in cold weather, and as +vinegar upon nitre, so is he that singeth songs to an heavy +heart. +%% +As in water face answereth to face, so the heart of man to +man. +%% +As long as the answer is right, who cares if the question +is wrong? +%% +As of next week, passwords will be entered in Morse code. +%% +As righteousness tendeth to life: so he that pursueth evil +pursueth it to his own death. +%% +As snow in summer, and as rain in harvest, so honour is not +seemly for a fool. +%% +As the bird by wandering, as the swallow by flying, so the +curse causeless shall not come. +%% +As the cold of snow in the time of harvest, so is a +faithful messenger to them that send him: for he refresheth the +soul of his masters. +%% +As the door turneth upon his hinges, so doth the slothful +upon his bed. +%% +As the fining pot for silver, and the furnace for gold; so +is a man to his praise. +%% +As the whirlwind passeth, so is the wicked no more: but the +righteous is an everlasting foundation. +%% +As vinegar to the teeth, and as smoke to the eyes, so is +the sluggard to them that send him. +%% +At the last it biteth like a serpent, and stingeth like an adder. +%% +Audacity, and again audacity, and always audacity. +-- Georges Jacques Danton +%% +Avoid GOTOs completely if you can keep the program readable. +%% +Avoid it, pass not by it, turn from it, and pass away. +%% +Avoid temporary variables. +%% +Avoid the Fortran arithmetic IF. +%% +Avoid unnecessary branches. +%% +Be careful when a loop exits to the same place from side +and bottom. +%% +Be careful! Is it classified? +%% +Be friends with the wolf, but keep one hand on your ax. -- +Russian proverb +%% +Be not a witness against thy neighbour without cause; and +deceive not with thy lips. +%% +Be not afraid of sudden fear, neither of the desolation of +the wicked, when it cometh. +%% +Be not among winebibbers; among riotous eaters of flesh: +For the drunkard and the glutton shall come to poverty: and +drowsiness shall clothe a man with rags. +%% +Be not desirous of his dainties: for they are deceitful meat. +%% +Be not thou envious against evil men, neither desire to be +with them. +%% +Be not thou one of them that strike hands, or of them that +are sureties for debts. +%% +Be not wise in thine own eyes: fear the LORD, and depart +from evil. +%% +Be prepared to go mad with fixed rule and method. -- Horace +%% +Be security conscious -- National Defense is at stake. +%% +Be thou diligent to know the state of thy flocks, and look +well to thy herds. +%% +Because I have called, and ye refused; I have stretched out +my hand, and no man regarded; But ye have set at nought +all my counsel, and would none of my reproof: I also will +laugh at your calamity; I will mock when your fear cometh; +When your fear cometh as desolation, and your destruction +cometh as a whirlwind; when distress and anguish cometh upon you. +%% +Before a fight, two men are boasting; after the fight, only +one. -- Russian proverb +%% +Before destruction the heart of man is haughty, and before +honour is humility. +%% +Before the mountains were settled, before the hills was I +brought forth: While as yet he had not made the earth, nor +the fields, nor the highest part of the dust of the world. +%% +Begin in the beginning and go on till you come to the end; +then stop. -- Lewis Carroll +%% +Behold, the righteous shall be recompensed in the earth: +much more the wicked and the sinner. +%% +Better is a dinner of herbs where love is, than a stalled +ox and hatred therewith. +%% +Better is a dry morsel, and quietness therewith, than an +house full of sacrifices with strife. +%% +Better is a little with righteousness than great revenues +without right. +%% +Better is little with the fear of the LORD than great +treasure and trouble therewith. +%% +Better is the poor that walketh in his integrity, than he +that is perverse in his lips, and is a fool. +%% +Better is the poor that walketh in his uprightness, than he +that is perverse in his ways, though he be rich. +%% +Better it is to be of an humble spirit with the lowly, than +to divide the spoil with the proud. +%% +Better living a beggar than buried an emperor. +%% +Better the first quarrel than the last. -- Russian proverb +%% +Better to light one candle than to curse the darkness. +%% +Better turn back than lose your way. -- Russian proverb +%% +Beware of Greeks bearing gifts. -- Virgil +%% +Beware of a dark-haired man with a loud tie. +%% +Beware of a tall dark man with a spoon up his nose. +%% +Beware of all enterprises that require new clothes. +%% +Beware the new TTY code! +%% +Bind them upon thy fingers, write them upon the table of +thine heart. +%% +Blessed are they that run around in circles, for they shall +be known as wheels. +%% +Blessed is the man that heareth me, watching daily at my +gates, waiting at the posts of my doors. +%% +Blessings are upon the head of the just: but violence +covereth the mouth of the wicked. +%% +Boast not thyself of to morrow; for thou knowest not what a +day may bring forth. +%% +Bow down thine ear, and hear the words of the wise, and +apply thine heart unto my knowledge. +%% +Brain fried -- +core dumped +%% +Bread of deceit is sweet to a man; but afterwards his mouth +shall be filled with gravel. +%% +Bullets don't respect uniforms. +-- Russian proverb +%% +Burning lips and a wicked heart are like a potsherd covered +with silver dross. +%% +Business will be either better or worse. -- Calvin Coolidge +%% +But he knoweth not that the dead are there; and that her +guests are in the depths of hell. +%% +But he that sinneth against me wrongeth his own soul: all +they that hate me love death. +%% +But the path of the just is as the shining light, that +shineth more and more unto the perfect day. +%% +But the wicked shall be cut off from the earth, and the +transgressors shall be rooted out of it. +%% +But whoso committeth adultery with a woman lacketh +understanding: he that doeth it destroyeth his own soul. +%% +But whoso hearkeneth unto me shall dwell safely, and shall +be quiet from fear of evil. +%% +Buy the truth, and sell it not; also wisdom, and +instruction, and understanding. +%% +By failing to prepare, you are preparing to fail. +%% +By his knowledge the depths are broken up, and the clouds +drop down the dew. +%% +By humility and the fear of the LORD are riches, and +honour, and life. +%% +By long forbearing is a prince persuaded, and a soft tongue +breaketh the bone. +%% +By me kings reign, and princes decree justice. +%% +By me princes rule, and nobles, even all the judges of the +earth. +%% +By mercy and truth iniquity is purged: and by the fear of +the LORD men depart from evil. +%% +By the blessing of the upright the city is exalted: but it +is overthrown by the mouth of the wicked. +%% +Can a man take fire in his bosom, and his clothes not be +burned? Can one go upon hot coals, and his feet not be +burned? So he that goeth in to his neighbour's wife; whosoever +toucheth her shall not be innocent. +%% +Can anyone remember when the times were not hard, and money +not scarce? +%% +Can anything be sadder than work left unfinished? Yes, +work never begun. +%% +Cannot open /usr/games/lib/fortunes. +%% +Cast out the scorner, and contention shall go out; yea, +strife and reproach shall cease. +%% +Cease, my son, to hear the instruction that causeth to err +from the words of knowledge. +%% +Change your thoughts and you change your world. +%% +Charity: A thing that begins at home and usually stays +there. +%% +Chasten thy son while there is hope, and let not thy soul +spare for his crying. +%% +Children's children are the crown of old men; and the glory +of children are their fathers. +%% +Chinese saying: He who speak with forked tongue, not need +chopsticks. +%% +Choose variable names that won't be confused. +%% +Civilization is the limitless multiplication of unnecessary +necessities. +%% +Classified material requires proper storage. +%% +Colorless green ideas sleep furiously. +%% +Come, let us take our fill of love until the morning: let +us solace ourselves with loves. +%% +Commit thy works unto the LORD, and thy thoughts shall be +established. +%% +Common sense is not so common. +%% +Complaint is the largest tribute heaven receives, and the +sincerest part of our devotion. +%% +Confidence in an unfaithful man in time of trouble is like +a broken tooth, and a foot out of joint. +%% +Conscience doth make cowards of us all. -- William +Shakespeare +%% +Continental Life. Why do you ask? +%% +Correct thy son, and he shall give thee rest; yea, he shall +give delight unto thy soul. +%% +Correction is grievous unto him that forsaketh the way: and +he that hateth reproof shall die. +%% +Could John Wayne have ever taken Normandy, Iwo Jima, Korea, +the Gulf of Tonkin, and the entire Wild West on a diet of +quiche and salad? +%% +Counsel in the heart of man is like deep water; but a man +of understanding will draw it out. +%% +Counsel is mine, and sound wisdom: I am understanding; I +have strength. +%% +Courage is grace under pressure. +%% +Courage is your greatest present need. +%% +Creditors have much better memories than debtors. +%% +Culture is the habit of being pleased with the best and +knowing why. +%% +Death and life are in the power of the tongue: and they +that love it shall eat the fruit thereof. +%% +Death: To stop sinning suddenly. +%% +Debate thy cause with thy neighbour himself; and discover +not a secret to another: Lest he that heareth it put thee to +shame, and thine infamy turn not away. +%% +Deceit is in the heart of them that imagine evil: but to +the counsellors of peace is joy. +%% +Delight is not seemly for a fool; much less for a servant +to have rule over princes. +%% +Deliver thyself as a roe from the hand of the hunter, and +as a bird from the hand of the fowler. +%% +Democracy is the recurrent suspicion that more than half of +the people are right more than half of the time. +%% +Depression is merely anger without the enthusiasm. +%% +Deprive a mirror of its silver and even the Czar won't see +his face. +%% +Devise not evil against thy neighbour, seeing he dwelleth +securely by thee. +%% +Disclose classified information only when a NEED TO KNOW +exists. +%% +Discretion is the better part of valor. -- William +Shakespeare +%% +Disk crunch -- please clean up. +%% +Divers weights are an abomination unto the LORD; and a +false balance is not good. +%% +Do not clog intellect's sluices with bits of knowledge of +questionable uses. +%% +Do not merely believe in miracles, rely on them. +%% +Do not take life too seriously: you will never get out of +it alive. +%% +Do not underestimate the power of the Force. +%% +Do they not err that devise evil? but mercy and truth shall +be to them that devise good. +%% +Do this now, my son, and deliver thyself, when thou art +come into the hand of thy friend; go, humble thyself, and make +sure thy friend. +%% +Do you always believe what a computer tells you? +%% +Do you really want to know what I think of you? +%% +Dogs do not dislike poor families. +%% +Don't be humble, you're not that great. +%% +Don't comment bad code -- rewrite it. +%% +Don't compare floating point numbers solely for equality. +%% +Don't despair -- your ideal lover is waiting for you around +the corner. +%% +Don't diddle code to make it faster -- find a better +algorithm. +%% +Don't drive your horse with a whip -- use the oat bag. -- +Russian proverb +%% +Don't force it, use a bigger hammer. +%% +Don't get stuck in a closet -- wear yourself out. +%% +Don't hit the keys so hard, it hurts. +%% +Don't look now, but the man in the moon is laughing at you. +%% +Don't look now, but there is a multi-legged creature on +your shoulder. +%% +Don't patch bad code -- rewrite it. +%% +Don't quit now, we might just as well lock the door and +throw away the key. +%% +Don't stop at one bug. +%% +Don't tell me what you dreamt last night for I've been +reading Freud. +%% +Doth not wisdom cry? and understanding put forth her voice? +She standeth in the top of high places, by the way in the +places of the paths. +%% +Drawing on my fine command of language, I said nothing. +%% +Drink waters out of thine own cistern, and running waters +out of thine own well. +%% +Drugs are for people who can't handle reality. +%% +Due to lack of interest, today has been cancelled. +%% +Due to popular demand, you have been awarded the day off. +%% +Eat thou not the bread of him that hath an evil eye, +neither desire thou his dainty meats: For as he thinketh in his +heart, so is he: Eat and drink, saith he to thee; but his +heart is not with thee. +%% +Education helps earning capacity. Ask any college +professor. +%% +Enter not into the path of the wicked, and go not in the +way of evil men. +%% +Envy thou not the oppressor, and choose none of his ways. +%% +Eternal nothingness is fine if you're dressed for it. +%% +Even a cabbage may look at a king. +%% +Even a child is known by his doings, whether his work be +pure, and whether it be right. +%% +Even a fool, when he holdeth his peace, is counted wise: +and he that shutteth his lips is esteemed a man of +understanding. +%% +Even a hawk is an eagle among crows. +%% +Even in laughter the heart is sorrowful; and the end of +that mirth is heaviness. +%% +Even the boldest zebra fears the hungry lion. +%% +Even the smallest candle burns brighter in the dark. +%% +Every absurdity has a champion to defend it. +%% +Every creature has within itself the wild, uncontrollable +urge to punt. +%% +Every generation laughs at old fashions, but follows +religiously the new. +%% +Every man shall kiss his lips that giveth a right answer. +%% +Every nation has the government it deserves. +%% +Every one that is proud in heart is an abomination to the +LORD: though hand join in hand, he shall not be unpunished. +%% +Every program has (at least) two purposes: the one for +which it was built, and another for which it wasn't. +%% +Every program is a part of some other program and rarely +fits. +%% +Every prudent man dealeth with knowledge: but a fool layeth +open his folly. +%% +Every purchase has its price. +%% +Every purpose is established by counsel: and with good +advice make war. +%% +Every silver lining has a cloud inside it. +%% +Every way of a man is right in his own eyes: but the LORD +pondereth the hearts. +%% +Every wise woman buildeth her house: but the foolish +plucketh it down with her hands. +%% +Everybody needs a little love sometime; stop hacking and +fall in love! +%% +Everybody ought to have a friend. +%% +Everyone is enthusiastic about your work. +%% +Everyone needs to believe in something; I believe I'll have +another beer. +%% +Everything should be built top-down, except the first time. +%% +Everything should be made as simple as possible, but no +simpler. +%% +Everything you know is wrong! +%% +Evil men understand not judgment: but they that seek the +LORD understand all things. +%% +Evil pursueth sinners: but to the righteous good shall be +repayed. +%% +Exalt her, and she shall promote thee: she shall bring thee +to honour, when thou dost embrace her. +%% +Excellent speech becometh not a fool: much less do lying +lips a prince. +%% +Facts do not cease to exist because they are ignored. +%% +Failure is more frequently from want of energy than want of +capital. +%% +Faithful are the wounds of a friend; but the kisses of an +enemy are deceitful. +%% +Far duller than a serpent's tooth it is to spend a quiet +youth. +%% +Favour is deceitful, and beauty is vain: but a woman that +feareth the LORD, she shall be praised. +%% +Fear has big eyes. -- Russian proverb +%% +Fidelity: A virtue peculiar to those who are about to be +betrayed. +%% +Finagle's Law: The perversity of the universe tends toward +a maximum. +%% +Flee at once, all is discovered. +%% +Folly is joy to him that is destitute of wisdom: but a man +of understanding walketh uprightly. +%% +Foolishness is bound in the heart of a child; but the rod +of correction shall drive it far from him. +%% +Fools ignore complexity. Pragmatists suffer it. Geniuses +remove it. +%% +Fools make a mock at sin: but among the righteous there is +favour. +%% +Fools rush in where angels fear to tread. -- Alexander Pope +%% +Fools shoot, but God directs the bullets. -- Russian +proverb +%% +For I give you good doctrine, forsake ye not my law. +%% +For I was my father's son, tender and only beloved in the +sight of my mother. +%% +For a whore is a deep ditch; and a strange woman is a +narrow pit. +%% +For at the window of my house I looked through my casement, +And beheld among the simple ones, I discerned among the +youths, a young man void of understanding, Passing through +the street near her corner; and he went the way to her house, +In the twilight, in the evening, in the black and dark +night: And, behold, there met him a woman with the attire of +an harlot, and subtil of heart. +%% +For by me thy days shall be multiplied, and the years of +thy life shall be increased. +%% +For by means of a whorish woman a man is brought to a piece +of bread: and the adultress will hunt for the precious +life. +%% +For by wise counsel thou shalt make thy war: and in +multitude of counsellors there is safety. +%% +For her house inclineth unto death, and her paths unto the +dead. +%% +For it is a pleasant thing if thou keep them within thee; +they shall withal be fitted in thy lips. +%% +For jealousy is the rage of a man: therefore he will not +spare in the day of vengeance. +%% +For my mouth shall speak truth; and wickedness is an +abomination to my lips. +%% +For riches are not for ever: and doth the crown endure to +every generation? The hay appeareth, and the tender grass +sheweth itself, and herbs of the mountains are gathered. +%% +For she hath cast down many wounded: yea, many strong men +have been slain by her. +%% +For she sitteth at the door of her house, on a seat in the +high places of the city, To call passengers who go right on +their ways: Whoso is simple, let him turn in hither: and +as for him that wanteth understanding, she saith to him, +Stolen waters are sweet, and bread eaten in secret is pleasant. +%% +For surely there is an end; and thine expectation shall not +be cut off. +%% +For the LORD giveth wisdom: out of his mouth cometh +knowledge and understanding. +%% +For the LORD shall be thy confidence, and shall keep thy +foot from being taken. +%% +For the commandment is a lamp; and the law is light; and +reproofs of instruction are the way of life: To keep thee +from the evil woman, from the flattery of the tongue of a +strange woman. +%% +For the froward is abomination to the LORD: but his secret +is with the righteous. +%% +For the goodman is not at home, he is gone a long journey: +He hath taken a bag of money with him, and will come home +at the day appointed. +%% +For the lips of a strange woman drop as an honeycomb, and +her mouth is smoother than oil: But her end is bitter as +wormwood, sharp as a two-edged sword. +%% +For the merchandise of it is better than the merchandise of +silver, and the gain thereof than fine gold. +%% +For the transgression of a land many are the princes +thereof: but by a man of understanding and knowledge the state +thereof shall be prolonged. +%% +For the turning away of the simple shall slay them, and the +prosperity of fools shall destroy them. +%% +For the upright shall dwell in the land, and the perfect +shall remain in it. +%% +For their heart studieth destruction, and their lips talk +of mischief. +%% +For they are life unto those that find them, and health to +all their flesh. +%% +For they eat the bread of wickedness, and drink the wine of +violence. +%% +For they sleep not, except they have done mischief; and +their sleep is taken away, unless they cause some to fall. +%% +For three things the earth is disquieted, and for four +which it cannot bear: For a servant when he reigneth; and a +fool when he is filled with meat; For an odious woman when she +is married; and an handmaid that is heir to her mistress. +%% +For whoso findeth me findeth life, and shall obtain favour +of the LORD. +%% +For wisdom is better than rubies; and all the things that +may be desired are not to be compared to it. +%% +Forgive and forget. -- Cervantes +%% +Forsake her not, and she shall preserve thee: love her, and +she shall keep thee. +%% +Forsake the foolish, and live; and go in the way of +understanding. +%% +Fret not thyself because of evil men, neither be thou +envious at the wicked: For there shall be no reward to the evil +man; the candle of the wicked shall be put out. +%% +Friends: People who borrow my books and set wet glasses on +them. +%% +General notions are generally wrong. +%% +Genius is the talent of a man who is dead. +%% +Get wisdom, get understanding: forget it not; neither +decline from the words of my mouth. +%% +Give her of the fruit of her hands; and let her own works +praise her in the gates. +%% +Give instruction to a wise man, and he will be yet wiser: +teach a just man, and he will increase in learning. +%% +Give not sleep to thine eyes, nor slumber to thine eyelids. +%% +Give strong drink unto him that is ready to perish, and +wine unto those that be of heavy hearts. +%% +Go directly to jail. Do not pass Go, do not collect $200. +%% +Go from the presence of a foolish man, when thou perceivest +not in him the lips of knowledge. +%% +Go not forth hastily to strive, lest thou know not what to +do in the end thereof, when thy neighbour hath put thee to +shame. +%% +Go to the ant, thou sluggard; consider her ways, and be +wise: Which having no guide, overseer, or ruler, Provideth her +meat in the summer, and gathereth her food in the harvest. +%% +God does not play dice. +%% +God gave us two ears and one tongue so that we may listen +twice as much as we speak. +%% +God helps them that help themselves. -- Benjamin Franklin +%% +God is not dead; He is only swapped out. +%% +God made the integers; all else is the work of Man. +%% +God may be subtle, but He isn't plain mean. +%% +God must love the common man: He made so many of them. +%% +Good intentions are far more difficult to cope with than +malicious behavior. +%% +Good intentions randomize behavior. +%% +Good understanding giveth favour: but the way of +transgressors is hard. +%% +Great is Holy Russia, but the sun shines elsewhere, too. -- +Old Russian proverb +%% +Great spirits have always encountered violent opposition +from mediocre minds. +%% +Greatness is a transitory experience. It is never +consistent. +%% +Hackers of the world, unite! +%% +Happiness adds and multiplies as we divide it with others. +%% +Happy is the man that feareth alway: but he that hardeneth +his heart shall fall into mischief. +%% +Happy is the man that findeth wisdom, and the man that +getteth understanding. +%% +Hast thou found honey? eat so much as is sufficient for +thee, lest thou be filled therewith, and vomit it. +%% +Haste makes waste. +%% +Hatred stirreth up strifes: but love covereth all sins. +%% +Have not I written to thee excellent things in counsels and +knowledge, That I might make thee know the certainty of +the words of truth; that thou mightest answer the words of +truth to them that send unto thee? Rob not the poor, because +he is poor: neither oppress the afflicted in the gate: For +the LORD will plead their cause, and spoil the soul of +those that spoiled them. +%% +Have you locked your file cabinet? +%% +He also that is slothful in his work is brother to him that +is a great waster. +%% +He becometh poor that dealeth with a slack hand: but the +hand of the diligent maketh rich. +%% +He coveteth greedily all the day long: but the righteous +giveth and spareth not. +%% +He goeth after her straightway, as an ox goeth to the +slaughter, or as a fool to the correction of the stocks; Till a +dart strike through his liver; as a bird hasteth to the +snare, and knoweth not that it is for his life. +%% +He is considered the most graceful speaker who can say +nothing in most words. +%% +He is in the way of life that keepeth instruction: but he +that refuseth reproof erreth. +%% +He is truly wise who gains wisdom from another's mishap. +%% +He keepeth the paths of judgment, and preserveth the way of +his saints. +%% +He layeth up sound wisdom for the righteous: he is a +buckler to them that walk uprightly. +%% +He looked at me as if I was a side dish he hadn't ordered. +%% +He loveth transgression that loveth strife: and he that +exalteth his gate seeketh destruction. +%% +He shall die without instruction; and in the greatness of +his folly he shall go astray. +%% +He shutteth his eyes to devise froward things: moving his +lips he bringeth evil to pass. +%% +He taught me also, and said unto me, Let thine heart retain +my words: keep my commandments, and live. +%% +He that answereth a matter before he heareth it, it is +folly and shame unto him. +%% +He that begetteth a fool doeth it to his sorrow: and the +father of a fool hath no joy. +%% +He that blesseth his friend with a loud voice, rising early +in the morning, it shall be counted a curse to him. +%% +He that by usury and unjust gain increaseth his substance, +he shall gather it for him that will pity the poor. +%% +He that covereth a transgression seeketh love; but he that +repeateth a matter separateth very friends. +%% +He that covereth his sins shall not prosper: but whoso +confesseth and forsaketh them shall have mercy. +%% +He that delicately bringeth up his servant from a child +shall have him become his son at the length. +%% +He that despiseth his neighbour sinneth: but he that hath +mercy on the poor, happy is he. +%% +He that deviseth to do evil shall be called a mischievous +person. +%% +He that diligently seeketh good procureth favour: but he +that seeketh mischief, it shall come unto him. +%% +He that followeth after righteousness and mercy findeth +life, righteousness, and honour. +%% +He that gathereth in summer is a wise son: but he that +sleepeth in harvest is a son that causeth shame. +%% +He that getteth wisdom loveth his own soul: he that keepeth +understanding shall find good. +%% +He that giveth unto the poor shall not lack: but he that +hideth his eyes shall have many a curse. +%% +He that goeth about as a talebearer revealeth secrets: +therefore meddle not with him that flattereth with his lips. +%% +He that handleth a matter wisely shall find good: and whoso +trusteth in the LORD, happy is he. +%% +He that hasteth to be rich hath an evil eye, and +considereth not that poverty shall come upon him. +%% +He that hateth dissembleth with his lips, and layeth up +deceit within him; When he speaketh fair, believe him not: for +there are seven abominations in his heart. +%% +He that hath a bountiful eye shall be blessed; for he +giveth of his bread to the poor. +%% +He that hath a froward heart findeth no good: and he that +hath a perverse tongue falleth into mischief. +%% +He that hath knowledge spareth his words: and a man of +understanding is of an excellent spirit. +%% +He that hath no rule over his own spirit is like a city +that is broken down, and without walls. +%% +He that hath pity upon the poor lendeth unto the LORD; and +that which he hath given will he pay him again. +%% +He that hideth hatred with lying lips, and he that uttereth +a slander, is a fool. +%% +He that is despised, and hath a servant, is better than he +that honoureth himself, and lacketh bread. +%% +He that is first in his own cause seemeth just; but his +neighbour cometh and searcheth him. +%% +He that is greedy of gain troubleth his own house; but he +that hateth gifts shall live. +%% +He that is of a proud heart stirreth up strife: but he that +putteth his trust in the LORD shall be made fat. +%% +He that is slow to anger is better than the mighty; and he +that ruleth his spirit than he that taketh a city. +%% +He that is slow to wrath is of great understanding: but he +that is hasty of spirit exalteth folly. +%% +He that is soon angry dealeth foolishly: and a man of +wicked devices is hated. +%% +He that is surety for a stranger shall smart for it: and he +that hateth suretiship is sure. +%% +He that is void of wisdom despiseth his neighbour: but a +man of understanding holdeth his peace. +%% +He that justifieth the wicked, and he that condemneth the +just, even they both are abomination to the LORD. +%% +He that keepeth his mouth keepeth his life: but he that +openeth wide his lips shall have destruction. +%% +He that keepeth the commandment keepeth his own soul; but +he that despiseth his ways shall die. +%% +He that laboureth laboureth for himself; for his mouth +craveth it of him. +%% +He that loveth pleasure shall be a poor man: he that loveth +wine and oil shall not be rich. +%% +He that loveth pureness of heart, for the grace of his lips +the king shall be his friend. +%% +He that oppresseth the poor reproacheth his Maker: but he +that honoureth him hath mercy on the poor. +%% +He that oppresseth the poor to increase his riches, and he +that giveth to the rich, shall surely come to want. +%% +He that passeth by, and meddleth with strife belonging not +to him, is like one that taketh a dog by the ears. +%% +He that rebuketh a man afterwards shall find more favour +than he that flattereth with the tongue. +%% +He that refuseth instruction despiseth his own soul: but he +that heareth reproof getteth understanding. +%% +He that reproveth a scorner getteth to himself shame: and +he that rebuketh a wicked man getteth himself a blot. +%% +He that saith unto the wicked, Thou are righteous; him +shall the people curse, nations shall abhor him: But to them +that rebuke him shall be delight, and a good blessing shall +come upon them. +%% +He that sendeth a message by the hand of a fool cutteth off +the feet, and drinketh damage. +%% +He that soweth iniquity shall reap vanity: and the rod of +his anger shall fail. +%% +He that spareth his rod hateth his son: but he that loveth +him chasteneth him betimes. +%% +He that speaketh truth sheweth forth righteousness: but a +false witness deceit. +%% +He that tilleth his land shall be satisfied with bread: but +he that followeth vain persons is void of understanding. +%% +He that tilleth his land shall have plenty of bread: but he +that followeth after vain persons shall have poverty +enough. +%% +He that troubleth his own house shall inherit the wind: and +the fool shall be servant to the wise of heart. +%% +He that trusteth in his own heart is a fool: but whoso +walketh wisely, he shall be delivered. +%% +He that trusteth in his riches shall fall; but the +righteous shall flourish as a branch. +%% +He that turneth away his ear from hearing the law, even his +prayer shall be abomination. +%% +He that walketh in his uprightness feareth the LORD: but he +that is perverse in his ways despiseth him. +%% +He that walketh uprightly walketh surely: but he that +perverteth his ways shall be known. +%% +He that walketh with wise men shall be wise: but a +companion of fools shall be destroyed. +%% +He that wasteth his father, and chaseth away his mother, is +a son that causeth shame, and bringeth reproach. +%% +He that winketh with the eye causeth sorrow: but a prating +fool shall fall. +%% +He that withholdeth corn, the people shall curse him: but +blessing shall be upon the head of him that selleth it. +%% +He that would govern others, first should be the master of +himself. +%% +He thinks by infection, catching an opinion like a cold. +%% +He walks as if balancing the family tree on his nose. +%% +He was so narrow-minded he could see through a keyhole with +both eyes. +%% +He who has imagination without learning has wings but no +feet. +%% +He who hates vices hates mankind. +%% +He who hesitates is lost. +%% +He who hesitates is sometimes saved. +%% +He who invents adages for others to peruse takes along +rowboat when going on cruise. +%% +He who laughs, lasts. +%% +He who lives without folly is less wise than he believes. +%% +He who spends a storm beneath a tree, takes life with a +grain of TNT. +%% +He will not regard any ransom; neither will he rest +content, though thou givest many gifts. +%% +He winketh with his eyes, he speaketh with his feet, he +teacheth with his fingers; Frowardness is in his heart, he +deviseth mischief continually; he soweth discord. +%% +He, that being often reproved hardeneth his neck, shall +suddenly be destroyed, and that without remedy. +%% +Hear counsel, and receive instruction, that thou mayest be +wise in thy latter end. +%% +Hear instruction, and be wise, and refuse it not. +%% +Hear me now therefore, O ye children, and depart not from +the words of my mouth. +%% +Hear thou, my son, and be wise, and guide thine heart in +the way. +%% +Hear, O my son, and receive my sayings; and the years of +thy life shall be many. +%% +Hear, ye children, the instruction of a father, and attend +to know understanding. +%% +Hear; for I will speak of excellent things; and the opening +of my lips shall be right things. +%% +Hearken unto me now therefore, O ye children, and attend to +the words of my mouth. +%% +Hearken unto thy father that begat thee, and despise not +thy mother when she is old. +%% +Heaviness in the heart of man maketh it stoop: but a good +word maketh it glad. +%% +Hell and destruction are before the LORD: how much more +then the hearts of the children of men? A scorner loveth not +one that reproveth him: neither will he go unto the wise. +%% +Hell and destruction are never full; so the eyes of man are +never satisfied. +%% +Hell is empty and all the devils are here. [The Tempest] +%% +Her children arise up, and call her blessed; her husband +also, and he praiseth her. +%% +Her feet go down to death; her steps take hold on hell. +%% +Her house is the way to hell, going down to the chambers of +death. +%% +Her husband is known in the gates, when he sitteth among +the elders of the land. +%% +Her ways are ways of pleasantness, and all her paths are +peace. +%% +His heart was yours from the first moment that you met. +%% +His own iniquities shall take the wicked himself, and he +shall be holden with the cords of his sins. +%% +Histories are fuller of examples of the fidelity of dogs +than of friends. +%% +Honi soit la vache qui rit. +%% +Honour the LORD with thy substance, and with the +firstfruits of all thine increase: So shall thy barns be filled with +plenty, and thy presses shall burst out with new wine. +%% +Hope deferred maketh the heart sick: but when the desire +cometh, it is a tree of life. +%% +Houdini's escaping from New Jersey! +%% +House and riches are the inheritance of fathers: and a +prudent wife is from the LORD. +%% +How can you work when the system's so crowded? +%% +How long wilt thou sleep, O sluggard? when wilt thou arise +out of thy sleep? Yet a little sleep, a little slumber, a +little folding of the hands to sleep: So shall thy poverty +come as one that travelleth, and thy want as an armed man. +%% +How many weeks are there in a light year? +%% +How much better is it to get wisdom than gold! and to get +understanding rather to be chosen than silver! The highway +of the upright is to depart from evil: he that keepeth his +way preserveth his soul. +%% +How sharper than a hound's tooth it is to have a thankless +serpent. +%% +How wonderful opera would be if there were no singers. +%% +How you look depends on where you go. +%% +Humility is the first of the virtues -- for other people. +-- Oliver W. Holmes +%% +I GOTTA GET OUTTA HERE! +%% +I am not arguing with you -- I am telling you. +%% +I came to MIT to get an education for myself and a diploma +for my mother. +%% +I hate quotations. -- Ralph Waldo Emerson +%% +I have decked my bed with coverings of tapestry, with +carved works, with fine linen of Egypt. +%% +I have perfumed my bed with myrrh, aloes, and cinnamon. +%% +I have taught thee in the way of wisdom; I have led thee in +right paths. +%% +I lead in the way of righteousness, in the midst of the +paths of judgment: That I may cause those that love me to +inherit substance; and I will fill their treasures. +%% +I like work; it fascinates me; I can sit and look at it for +hours. +%% +I love them that love me; and those that seek me early +shall find me. +%% +I must have slipped a disk; my pack hurts. +%% +I neither learned wisdom, nor have the knowledge of the +holy. +%% +I think we're all Bozos on this bus. +%% +I was set up from everlasting, from the beginning, or ever +the earth was. +%% +I went by the field of the slothful, and by the vineyard of +the man void of understanding; And, lo, it was all grown +over with thorns, and nettles had covered the face thereof, +and the stone wall thereof was broken down. +%% +I will never lie to you. +%% +I wisdom dwell with prudence, and find out knowledge of +witty inventions. +%% +I wish you humans would leave me alone. +%% +I'm a Hollywood writer; so I put on a sports jacket and +take off my brain. +%% +I'm not sure how to fly this thing, but I'll give it that +old college try! +%% +I've done so much with so little for so long that I can do +anything with nothing. +%% +IKM006 4050303293 CHECK/NOCHECK PREFIX NOT PERMITTED IN +THIS CONTEXT. +%% +IOT trap -- core dumped +%% +IOT trap -- mos dumped +%% +If God had wanted you to go around nude, He would have +given you bigger hands. +%% +If a group of N persons implements a COBOL compiler, there +will be N-1 passes: Someone in the group has to be the +manager. +%% +If a listener nods his head when you are explaining your +program, wake him up. +%% +If a program manipulates large amounts of data, it does so +in a small number of ways. +%% +If a ruler hearken to lies, all his servants are wicked. +%% +If a wise man contendeth with a foolish man, whether he +rage or laugh, there is no rest. +%% +If at first you don't succeed, get new batteries. +%% +If at first you don't succeed, quit; don't be a nut about +success. +%% +If at first you don't succeed, try, try again. +%% +If it doesn't feel good, don't do it. +%% +If the auto industry had done what the computer industry +has done in the past 30 years, a Rolls Royce would cost $2.50 +and would get 2,000,000 miles per gallon. +%% +If the path be beautiful, let us not ask where it leads. -- +Anatole France +%% +If they say, Come with us, let us lay wait for blood, let +us lurk privily for the innocent without cause: Let us +swallow them up alive as the grave; and whole, as those that go +down into the pit: We shall find all precious substance, we +shall fill our houses with spoil: Cast in thy lot among +us; let us all have one purse: My son, walk not thou in the +way with them; refrain thy foot from their path: For their +feet run to evil, and make haste to shed blood. +%% +If thine enemy be hungry, give him bread to eat; and if he +be thirsty, give him water to drink: For thou shalt heap +coals of fire upon his head, and the LORD shall reward thee. +%% +If thou be wise, thou shalt be wise for thyself: but if +thou scornest, thou alone shalt bear it. +%% +If thou faint in the day of adversity, thy strength is +small. +%% +If thou forbear to deliver them that are drawn unto death, +and those that are ready to be slain; If thou sayest, +Behold, we knew it not; doth not he that pondereth the heart +consider it? and he that keepeth thy soul, doth not he know +it? and shall not he render to every man according to his +works? My son, eat thou honey, because it is good; and the +honeycomb, which is sweet to thy taste: So shall the knowledge +of wisdom be unto thy soul: when thou hast found it, then +there shall be a reward, and thy expectation shall not be cut off. +%% +If thou hast done foolishly in lifting up thyself, or if +thou hast thought evil, lay thine hand upon thy mouth. +%% +If thou hast nothing to pay, why should he take away thy +bed from under thee? Remove not the ancient landmark, which +thy fathers have set. +%% +If we knew where we were going to fall, we could have +spread a carpet there. -- Russian proverb +%% +If you are a rooster, crow; if you are a hen, shut up and +lay eggs. -- Russian proverb +%% +If you are tired of a friend, lend him money. -- Russian +proverb +%% +If you ask how much it is, you can't afford it. +%% +If you pick up a starving dog and make him prosperous, he +will not bite you. This is the principal difference between +a dog and a man. -- Mark Twain +%% +If you suspect a man, don't employ him. +%% +If you think before you speak the other guy gets his joke +in first. +%% +If you tickle yourself, you can laugh when you please. -- +Russian proverb +%% +If you want a fortune, go to a Chinese restaurant. +%% +If you want to know how old a man is, ask his +brother-in-law. +%% +Ignorance is a lack of knowledge. Stupidity is ignorance +with pride. +%% +Ignorance is bliss. -- Thomas Gray +%% +Ignorance is when you don't know anything and somebody +finds it out. +%% +Ignore previous fortune. +%% +In all labour there is profit: but the talk of the lips +tendeth only to penury. +%% +In all thy ways acknowledge him, and he shall direct thy +paths. +%% +In marriage, as in war, it is permitted to take every +advantage of the enemy. +%% +In the fear of the LORD is strong confidence: and his +children shall have a place of refuge. +%% +In the first place, God made idiots; this was for practice; +then He made school boards. -- Mark Twain +%% +In the house of the righteous is much treasure: but in the +revenues of the wicked is trouble. +%% +In the light of the king's countenance is life; and his +favour is as a cloud of the latter rain. +%% +In the lips of him that hath understanding wisdom is found: +but a rod is for the back of him that is void of +understanding. +%% +In the mouth of the foolish is a rod of pride: but the lips +of the wise shall preserve them. +%% +In the multitude of people is the king's honour: but in the +want of people is the destruction of the prince. +%% +In the multitude of words there wanteth not sin: but he +that refraineth his lips is wise. +%% +In the transgression of an evil man there is a snare: but +the righteous doth sing and rejoice. +%% +In the way of righteousness is life: and in the pathway +thereof there is no death. +%% +In this world, not everyone with a long knife is a cook. -- +Russian proverb +%% +In this world, truth can wait; she's used to it. +%% +In unanimity there is cowardice and uncritical thinking. +%% +In wickedness there is a strong strain toward rationality. +%% +Institute: An archaic school where football in not taught. +%% +Integrity has no need for rules. +%% +Iron sharpeneth iron; so a man sharpeneth the countenance +of his friend. +%% +Is this really happening? +%% +It is a bad plan that admits of no modification. -- +Publilius Syrus +%% +It is a poor judge who cannot award a prize. +%% +It is an abomination to kings to commit wickedness: for the +throne is established by righteousness. +%% +It is an honour for a man to cease from strife: but every +fool will be meddling. +%% +It is as sport to a fool to do mischief: but a man of +understanding hath wisdom. +%% +It is better to die on your feet than to live on your +knees. +%% +It is better to dwell in a corner of the housetop, than +with a brawling woman in a wide house. +%% +It is better to dwell in the corner of the housetop, than +with a brawling woman and in a wide house. +%% +It is better to dwell in the wilderness, than with a +contentious and an angry woman. +%% +It is better to have loved and lost -- much better. +%% +It is better to have loved and lost than just to have lost. +%% +It is better to wear out than to rust out. +%% +It is easier to change the specification to fit the program +than vice versa. +%% +It is easier to fight for one's principles than to live up +to them. +%% +It is easier to run down a hill than up one. +%% +It is easier to write an incorrect program than to +understand a correct one. +%% +It is joy to the just to do judgment: but destruction shall +be to the workers of iniquity. +%% +It is naught, it is naught, saith the buyer: but when he is +gone his way, then he boasteth. +%% +It is not for kings, O Lemuel, it is not for kings to drink +wine; nor for princes strong drink: Lest they drink, and +forget the law, and pervert the judgment of any of the +afflicted. +%% +It is not good to accept the person of the wicked, to +overthrow the righteous in judgment. +%% +It is not good to eat much honey: so for men to search +their own glory is not glory. +%% +It is one thing to praise discipline, and another to submit +to it. +%% +It is the glory of God to conceal a thing: but the honour +of kings is to search out a matter. +%% +It is the wise bird who builds his nest in a tree. +%% +It seems to make an auto driver mad if he misses you. +%% +It shall be health to thy navel, and marrow to thy bones. +%% +It was a book to kill time for those who liked it better +dead. +%% +It's a good thing we don't get all the government we pay +for. +%% +It's a poor workman who blames his tools. +%% +It's all in the mind, ya know. +%% +It's better to burn out than to fade away. +%% +It's later than you think. +%% +It's not reality that's important, but how you perceive +things. +%% +It's not whether you win or lose, but how you play the +game. -- Grantland Rice +%% +It's pretty hard to tell what does bring happiness; poverty +and wealth have both failed. +%% +Journalism will kill you, but it will keep you alive while +you're at it. +%% +Judgments are prepared for scorners, and stripes for the +back of fools. +%% +Just because the bells are ringing, it is not necessarily +dinner time. -- Russian proverb +%% +Keep my commandments, and live; and my law as the apple of +thine eye. +%% +Keep thy heart with all diligence; for out of it are the +issues of life. +%% +Kiss your keyboard good-bye! +%% +LISP: To call a spade a thpade. +%% +Labour not to be rich: cease from thine own wisdom. +%% +Large numbers of things are determined, and therefore not +subject to change. +%% +Last guys don't finish nice. +%% +Laugh, and the world ignores you. Crying doesn't help +either. +%% +Lay not wait, O wicked man, against the dwelling of the +righteous; spoil not his resting place: For a just man falleth +seven times, and riseth up again: but the wicked shall +fall into mischief. +%% +Learn good things -- the bad ones will teach you by +themselves. -- Russian proverb +%% +Learned men are the cisterns of knowledge, not the +fountainheads. +%% +Lend money to a bad debtor and he will hate you. +%% +Length of days is in her right hand; and in her left hand +riches and honour. +%% +Lest thou shouldest ponder the path of life, her ways are +moveable, that thou canst not know them. +%% +Let a bear robbed of her whelps meet a man, rather than a +fool in his folly. +%% +Let a fool hold his tongue and he will pass for a sage. +%% +Let another man praise thee, and not thine own mouth; a +stranger, and not thine own lips. +%% +Let her be as the loving hind and pleasant roe; let her +breasts satisfy thee at all times; and be thou ravished always +with her love. +%% +Let him drink, and forget his poverty, and remember his +misery no more. +%% +Let him who takes the Plunge remember to return it by +Tuesday. +%% +Let not mercy and truth forsake thee: bind them about thy +neck; write them upon the table of thine heart: So shalt +thou find favour and good understanding in the sight of God +and man. +%% +Let not the sands of time get in your lunch. +%% +Let not thine heart decline to her ways, go not astray in +her paths. +%% +Let not thine heart envy sinners: but be thou in the fear +of the LORD all the day long. +%% +Let sleeping dogs lie. -- Charles Dickens +%% +Let the machine do the dirty work. +%% +Let them be only thine own, and not strangers' with thee. +%% +Let them not depart from thine eyes; keep them in the midst +of thine heart. +%% +Let thine eyes look right on, and let thine eyelids look +straight before thee. +%% +Let thy fountain be blessed: and rejoice with the wife of +thy youth. +%% +Let thy fountains be dispersed abroad, and rivers of waters +in the streets. +%% +Let your conscience be your guide. -- Alexander Pope +%% +Liar: One who tells an unpleasant truth. +%% +Life as we know it doesn't exist. +%% +Life is a game of bridge -- and you've just been finessed. +%% +Life is full of little surprises, and you are one of them. +%% +Life is like a sewer, what you get out of it depends on +what you put into it. +%% +Life is like an analogy. +%% +Life is unbearable, but death is not so pleasant either. -- +Russian proverb +%% +Like punning, programming is a play on words. +%% +Like winter snow on summer lawn, time past is time gone. +%% +Live a clean, healthy life and you will soon die of +boredom. +%% +Live a hundred years, learn a hundred years, and you'll +still die a fool. -- Russian proverb +%% +Live and scratch -- when you're dead, the itching will +stop. -- Russian proverb +%% +Logic is a little bird, sitting in a tree, that smells +AWFUL. +%% +Long computations that yield zero are probably all for +naught. +%% +Long life is in store for you. +%% +Look before you leap. -- Samuel Butler +%% +Look not thou upon the wine when it is red, when it giveth +his colour in the cup, when it moveth itself aright. +%% +Losing your driver's license is just God's way of saying +"BOOGA, BOOGA!" +%% +Love and scandal are the best sweeteners of tea. +%% +Love conquers all things. -- Virgil +%% +Love is in the offing, said the homicidal maniac. +%% +Love is in the offing. Be affectionate to one who adores +you. +%% +Love is the triumph of imagination over intelligence. +%% +Love not sleep, lest thou come to poverty; open thine eyes, +and thou shalt be satisfied with bread. +%% +Love the sea? I dote upon it -- from the beach. +%% +Lust not after her beauty in thine heart; neither let her +take thee with her eyelids. +%% +Lying lips are abomination to the LORD: but they that deal +truly are his delight. +%% +Make input easy to proofread. +%% +Make it right before you make it faster. +%% +Make no friendship with an angry man; and with a furious +man thou shalt not go: Lest thou learn his ways, and get a +snare to thy soul. +%% +Make sure all variables are initialized before use. +%% +Make sure comments and code agree. +%% +Make sure your code "does nothing" gracefully. +%% +Make yourself into a sheep, and you'll meet a wolf nearby. +-- Russian proverb +%% +Man alone suffers so excruciatingly in the world that he +was compelled to invent laughter. +%% +Man who falls in blast furnace is certain to feel +overwrought. +%% +Man who falls in vat of molten optical glass makes +spectacle of self. +%% +Man's goings are of the LORD; how can a man then understand +his own way? It is a snare to the man who devoureth that +which is holy, and after vows to make enquiry. +%% +Man's horizons are bounded by his vision. +%% +Many are called, few are chosen. Fewer still get to do the +choosing. +%% +Many are called, few volunteer. +%% +Many are cold, but few are frozen. +%% +Many daughters have done virtuously, but thou excellest +them all. +%% +Many pages make a thick book. +%% +Many receive advice, few profit from it. +%% +Many seek the ruler's favour; but every man's judgment +cometh from the LORD. +%% +Many will intreat the favour of the prince: and every man +is a friend to him that giveth gifts. +%% +Marriage -- a three ring circus: engagement ring, wedding +ring, and suffering. +%% +Marriage is like sneezing: even when you feel it coming on, +you can't stop. -- Russian proverb +%% +Mathematics deals exclusively with the relations of +concepts to each other without consideration of their relation to +experience. -- Albert Einstein +%% +Memory should be the starting point of the present. +%% +Men do not despise a thief, if he steal to satisfy his soul +when he is hungry; But if he be found, he shall restore +sevenfold; he shall give all the substance of his house. +%% +Men have a much better time of it than women; for one +thing, they marry later; for another thing, they die earlier. +%% +Men love to wonder, and that is the seed of science. +%% +Men use thought only to justify their wrong doings, and +speech only to conceal their thoughts. +%% +Mercy and truth preserve the king: and his throne is +upholden by mercy. +%% +Might as well be frank, Monsieur. It would take a miracle +to get you out of Casablanca. +%% +Mind your own business, Spock. I'm sick of your half-breed +interference. +%% +Mistakes are oft the stepping stones to failure. +%% +Moderation is a fatal thing. Nothing succeeds like excess. +%% +Modesty is a vastly overrated virtue. +%% +Money may buy friendship but money can not buy love. +%% +Money will say more in one moment than the most eloquent +lover can in years. +%% +Most men will proclaim every one his own goodness: but a +faithful man who can find? The just man walketh in his +integrity: his children are blessed after him. +%% +Most people eat as though they were fattening themselves +for market. +%% +Most people find the concept of programming obvious, but +the doing impossible. +%% +Much food is in the tillage of the poor: but there is that +is destroyed for want of judgment. +%% +My fruit is better than gold, yea, than fine gold; and my +revenue than choice silver. +%% +My opponent's best move is my best move. +%% +My son, attend to my words; incline thine ear unto my +sayings. +%% +My son, attend unto my wisdom, and bow thine ear to my +understanding: That thou mayest regard discretion, and that thy +lips may keep knowledge. +%% +My son, be wise, and make my heart glad, that I may answer +him that reproacheth me. +%% +My son, despise not the chastening of the LORD; neither be +weary of his correction: For whom the LORD loveth he +correcteth; even as a father the son in whom he delighteth. +%% +My son, fear thou the LORD and the king: and meddle not +with them that are given to change: For their calamity shall +rise suddenly; and who knoweth the ruin of them both? These +things also belong to the wise. It is not good to have +respect of persons in judgment. +%% +My son, forget not my law; but let thine heart keep my +commandments: For length of days, and long life, and peace, +shall they add to thee. +%% +My son, give me thine heart, and let thine eyes observe my +ways. +%% +My son, hear the instruction of thy father, and forsake not +the law of thy mother: For they shall be an ornament of +grace unto thy head, and chains about thy neck. +%% +My son, if sinners entice thee, consent thou not. +%% +My son, if thine heart be wise, my heart shall rejoice, +even mine. +%% +My son, if thou be surety for thy friend, if thou hast +stricken thy hand with a stranger, Thou art snared with the +words of thy mouth, thou art taken with the words of thy mouth. +%% +My son, if thou wilt receive my words, and hide my +commandments with thee; So that thou incline thine ear unto wisdom, +and apply thine heart to understanding; Yea, if thou +criest after knowledge, and liftest up thy voice for +understanding; If thou seekest her as silver, and searchest for her as +for hid treasures; Then shalt thou understand the fear of +the LORD, and find the knowledge of God. +%% +My son, keep my words, and lay up my commandments with +thee. +%% +My son, keep thy father's commandment, and forsake not the +law of thy mother: Bind them continually upon thine heart, +and tie them about thy neck. +%% +My son, let not them depart from thine eyes: keep sound +wisdom and discretion: So shall they be life unto thy soul, +and grace to thy neck. +%% +National security is in your hands -- guard it well. +%% +Nature teaches beasts to know their friends. +%% +Never give an inch! +%% +Never insult an alligator until you have crossed the river. +%% +Never look a gift horse in the mouth. -- Saint Jerome +%% +Never settle with words what you can accomplish with a +flame thrower. +%% +Never try to teach a pig to sing: it wastes your time and +annoys the pig. +%% +Nice guys finish last. -- Leo Durocher +%% +No amount of genius can overcome a preoccupation with +detail. +%% +No civilized person ever goes to bed the same day he gets +up. +%% +No directory. +%% +No evil can happen to a good man. -- Plato +%% +No one can feel as helpless as the owner of a sick +goldfish. +%% +No problem is insoluble in all conceivable circumstances. +%% +No use beating a dead horse. +%% +Noblemen make promises, but peasants have to keep them. -- +Russian proverb +%% +Nobody can be as agreeable as an uninvited guest. +%% +Nobody expects the Spanish Inquisition! +%% +None that go unto her return again, neither take they hold +of the paths of life. +%% +Nothing astonishes men so much as common sense and plain +dealing. +%% +Nothing endures like change. -- Heraclitus +%% +Nothing in life is to be feared. It is only to be +understood. +%% +Nothing so needs reforming as other people's habits. +%% +Nothing ventured, nothing gained. +%% +Nothing will dispel enthusiasm like a small admission fee. +%% +Now and then an innocent man is sent to the Legislature. +%% +Now therefore hearken unto me, O ye children: for blessed +are they that keep my ways. +%% +O ye simple, understand wisdom: and, ye fools, be ye of an +understanding heart. +%% +O'Toole's dictum: "Murphy was an optimist." +%% +Observation, not old age, brings wisdom. +%% +Of all forms of caution, caution in love is the most fatal. +%% +Oh, Aunty Em, it's so good to be home! +%% +Oh, what a tangled web we weave when first we practice to +conceive. +%% +Ointment and perfume rejoice the heart: so doth the +sweetness of a man's friend by hearty counsel. +%% +Old MacDonald had an agricultural real estate tax +abatement. +%% +Old soldiers never die. Young ones do. +%% +Once the word is out of your mouth, you can't swallow it +back. -- Russian proverb +%% +Once you understand how to write a program, get someone +else to write it. +%% +One Bell System -- it sometimes works. +%% +One Bell System -- it works. +%% +One man tells a falsehood, a hundred repeat it as true. +%% +One man's constant is another man's variable. +%% +Only by pride cometh contention: but with the well advised +is wisdom. +%% +Only presidents, editors, and people with tapeworms have +the right to use the editorial "we." +%% +Only those who attempt the absurd achieve the impossible. +%% +Open thy mouth for the dumb in the cause of all such as are +appointed to destruction. +%% +Open thy mouth, judge righteously, and plead the cause of +the poor and needy. +%% +Opportunity knocks but once. +%% +Optimization hinders evolution. +%% +Out of sight is out of mind. +%% +Paranoia doesn't mean the whole world really isn't out to +get you. +%% +Password: +%% +Passwords are implemented as a result of insecurity. +%% +People have declaimed against luxury for 2,000 years ... +and people have always delighted in it. +%% +People who take cat naps don't usually sleep in a cat's +cradle. +%% +People will buy anything that's one to a customer. +%% +Philosophy: Unintelligible answers to insoluble problems. +%% +Pleasant words are as an honeycomb, sweet to the soul, and +health to the bones. +%% +Please go away. +%% +Please update your programs. +%% +Ponder the path of thy feet, and let all thy ways be +established. +%% +Poverty and shame shall be to him that refuseth +instruction: but he that regardeth reproof shall be honoured. +%% +Power is poison. +%% +Pray to God, but keep rowing to shore. -- Russian proverb +%% +Prepare thy work without, and make it fit for thyself in +the field; and afterwards build thine house. +%% +Pride goeth before destruction, and an haughty spirit +before a fall. +%% +Promptness is its own reward, if one lives by the clock +instead of the sword. +%% +Proud and haughty scorner is his name, who dealeth in proud +wrath. +%% +Put away from thee a froward mouth, and perverse lips put +far from thee. +%% +Put not forth thyself in the presence of the king, and +stand not in the place of great men: For better it is that it +be said unto thee, Come up hither; than that thou shouldest +be put lower in the presence of the prince whom thine eyes +have seen. +%% +Put not your trust in money, but put your money in trust. +%% +Quack! +%% +Quantity is no substitute for quality, but it's the only +one we've got. +%% +Quit work and play for once! +%% +Rainy days and Mondays always get me down. +%% +Reading is thinking with someone else's head instead of +one's own. +%% +Reality is for people who can't handle drugs. +%% +Receive my instruction, and not silver; and knowledge +rather than choice gold. +%% +Recursion is the root of computation since it trades +description for time. +%% +Rejoice not when thine enemy falleth, and let not thine +heart be glad when he stumbleth: Lest the LORD see it, and it +displease him, and he turn away his wrath from him. +%% +Religions revolve madly around sexual questions. +%% +Remove not the old landmark; and enter not into the fields +of the fatherless: For their redeemer is mighty; he shall +plead their cause with thee. +%% +Remove thy way far from her, and come not nigh the door of +her house: Lest thou give thine honour unto others, and thy +years unto the cruel: Lest strangers be filled with thy +wealth; and thy labours be in the house of a stranger; And +thou mourn at the last, when thy flesh and thy body are +consumed, And say, How have I hated instruction, and my heart +despised reproof; And have not obeyed the voice of my +teachers, nor inclined mine ear to them that instructed me! I was +almost in all evil in the midst of the congregation and assembly. +%% +Replace repetitive expressions by calls to a common +function. +%% +Reprove not a scorner, lest he hate thee: rebuke a wise +man, and he will love thee. +%% +Riches and honour are with me; yea, durable riches and +righteousness. +%% +Riches profit not in the day of wrath: but righteousness +delivereth from death. +%% +Righteous lips are the delight of kings; and they love him +that speaketh right. +%% +Righteousness exalteth a nation: but sin is a reproach to +any people. +%% +Righteousness keepeth him that is upright in the way: but +wickedness overthroweth the sinner. +%% +Rotten wood can not be carved. -- Confucius +%% +Satire does not look pretty upon a tombstone. +%% +Save yourself! Reboot in 5 seconds! +%% +Say not thou, I will recompense evil; but wait on the LORD, +and he shall save thee. +%% +Say not unto thy neighbour, Go, and come again, and to +morrow I will give; when thou hast it by thee. +%% +Say not, I will do so to him as he hath done to me: I will +render to the man according to his work. +%% +Say unto wisdom, Thou art my sister; and call understanding +thy kinswoman: That they may keep thee from the strange +woman, from the stranger which flattereth with her words. +%% +Scornful men bring a city into a snare: but wise men turn +away wrath. +%% +Security is the individual's responsibility. +%% +Security is your responsibility. +%% +Seest thou a man diligent in his business? he shall stand +before kings; he shall not stand before mean men. +%% +Seest thou a man that is hasty in his words? there is more +hope of a fool than of him. +%% +Seest thou a man wise in his own conceit? there is more +hope of a fool than of him. +%% +She also lieth in wait as for a prey, and increaseth the +transgressors among men. +%% +She considereth a field, and buyeth it: with the fruit of +her hands she planteth a vineyard. +%% +She crieth at the gates, at the entry of the city, at the +coming in at the doors. +%% +She girdeth her loins with strength, and strengtheneth her +arms. +%% +She hath sent forth her maidens: she crieth upon the +highest places of the city, Whoso is simple, let him turn in +hither: as for him that wanteth understanding, she saith to +him, Come, eat of my bread, and drink of the wine which I have +mingled. +%% +She is a tree of life to them that lay hold upon her: and +happy is every one that retaineth her. +%% +She is like the merchants' ships; she bringeth her food +from afar. +%% +She is more precious than rubies: and all the things thou +canst desire are not to be compared unto her. +%% +She is not afraid of the snow for her household: for all +her household are clothed with scarlet. +%% +She layeth her hands to the spindle, and her hands hold the +distaff. +%% +She looketh well to the ways of her household, and eateth +not the bread of idleness. +%% +She maketh fine linen, and selleth it; and delivereth +girdles unto the merchant. +%% +She maketh herself coverings of tapestry; her clothing is +silk and purple. +%% +She openeth her mouth with wisdom; and in her tongue is the +law of kindness. +%% +She perceiveth that her merchandise is good: her candle +goeth not out by night. +%% +She riseth also while it is yet night, and giveth meat to +her household, and a portion to her maidens. +%% +She seeketh wool, and flax, and worketh willingly with her +hands. +%% +She shall give to thine head an ornament of grace: a crown +of glory shall she deliver to thee. +%% +She stretcheth out her hand to the poor; yea, she reacheth +forth her hands to the needy. +%% +She will do him good and not evil all the days of her life. +%% +Simplicity does not precede complexity, but follows it. +%% +Sin has many tools, but a lie is the handle that fits them +all. +%% +Slang is language that takes off its coat, spits on its +hands, and goes to work. +%% +Slothfulness casteth into a deep sleep; and an idle soul +shall suffer hunger. +%% +Smile, it makes the world wonder what you are up to. +%% +Smite a scorner, and the simple will beware: and reprove +one that hath understanding, and he will understand knowledge. +%% +Snow Day -- stay home. +%% +So are the ways of every one that is greedy of gain; which +taketh away the life of the owners thereof. +%% +Soap and education are not as sudden as a massacre, but +they are more deadly in the long run. +%% +Some men are discovered; others are found out. +%% +Some programming languages manage to absorb change but +withstand progress. +%% +Someone is unenthusiastic about your work. +%% +Sooner will men hold fire in their mouths than keep a +secret. +%% +Speak not in the ears of a fool: for he will despise the +wisdom of thy words. +%% +Stability itself is nothing else than a more sluggish +motion. +%% +Standing on head makes smile of frown, but rest of face +also upside down. +%% +Stop searching forever: happiness is just next to you. +%% +Stop searching forever: happiness is unattainable. +%% +Strength and honour are her clothing; and she shall rejoice +in time to come. +%% +Strive not with a man without cause, if he have done thee +no harm. +%% +Sturgeon's Law: Ninety percent of everything is crud. +%% +Success is a journey, not a destination. +%% +Such is the way of an adulterous woman; she eateth, and +wipeth her mouth, and saith, I have done no wickedness. +%% +Surely he scorneth the scorners: but he giveth grace unto +the lowly. +%% +Surely in vain the net is spread in the sight of any bird. +%% +Surely the churning of milk bringeth forth butter, and the +wringing of the nose bringeth forth blood: so the forcing +of wrath bringeth forth strife. +%% +System going down at 1:45 this afternoon for disk crashing. +%% +System going down indefinitely, please log off! +%% +Tact is the art of making a point without making an enemy. +%% +Take away the dross from the silver, and there shall come +forth a vessel for the finer. +%% +Take away the wicked from before the king, and his throne +shall be established in righteousness. +%% +Take care of the luxuries and the necessities will take +care of themselves. +%% +Take fast hold of instruction; let her not go: keep her; +for she is thy life. +%% +Take his garment that is surety for a stranger, and take a +pledge of him for a strange woman. +%% +Take his garment that is surety for a stranger: and take a +pledge of him for a strange woman. +%% +That must be wonderful! I don't understand it at all. +%% +That thou mayest walk in the way of good men, and keep the +paths of the righteous. +%% +That thy trust may be in the LORD, I have made known to +thee this day, even to thee. +%% +That which is not good for the swarm, neither is it good +for the bee. +%% +The LORD by wisdom hath founded the earth; by understanding +hath he established the heavens. +%% +The LORD hath made all things for himself: yea, even the +wicked for the day of evil. +%% +The LORD is far from the wicked: but he heareth the prayer +of the righteous. +%% +The LORD possessed me in the beginning of his way, before +his works of old. +%% +The LORD will destroy the house of the proud: but he will +establish the border of the widow. +%% +The LORD will not suffer the soul of the righteous to +famish: but he casteth away the substance of the wicked. +%% +The Tree of Learning bears the noblest fruit, but noble +fruit tastes bad. +%% +The attacker must vanquish; the defender need only survive. +%% +The backslider in heart shall be filled with his own ways: +and a good man shall be satisfied from himself. +%% +The beginning of strife is as when one letteth out water: +therefore leave off contention, before it be meddled with. +%% +The best prophet of the future is the past. +%% +The blessing of the LORD, it maketh rich, and he addeth no +sorrow with it. +%% +The bloodthirsty hate the upright: but the just seek his +soul. +%% +The blueness of a wound cleanseth away evil: so do stripes +the inward parts of the belly. +%% +The cow may be black, but the milk comes out white. -- +Russian proverb +%% +The crown of the wise is their riches: but the foolishness +of fools is folly. +%% +The curse of the LORD is in the house of the wicked: but he +blesseth the habitation of the just. +%% +The decision doesn't have to be logical, it was unanimous. +%% +The degree of civilization in a society can be judged by +entering its prisons. +%% +The desire accomplished is sweet to the soul: but it is +abomination to fools to depart from evil. +%% +The desire of a man is his kindness: and a poor man is +better than a liar. +%% +The desire of the righteous is only good: but the +expectation of the wicked is wrath. +%% +The desire of the slothful killeth him; for his hands +refuse to labour. +%% +The discretion of a man deferreth his anger; and it is his +glory to pass over a transgression. +%% +The door is the key. +%% +The ear that heareth the reproof of life abideth among the +wise. +%% +The early worm gets the bird. +%% +The end of labor is to gain leisure. +%% +The ends justify the means. +%% +The evil bow before the good; and the wicked at the gates +of the righteous. +%% +The eye that mocketh at his father, and despiseth to obey +his mother, the ravens of the valley shall pick it out, and +the young eagles shall eat it. +%% +The eyes of the LORD are in every place, beholding the evil +and the good. +%% +The eyes of the LORD preserve knowledge, and he +overthroweth the words of the transgressor. +%% +The famous politician was trying to save both his faces. +%% +The father of the righteous shall greatly rejoice: and he +that begetteth a wise child shall have joy of him. +%% +The fear of a king is as the roaring of a lion: whoso +provoketh him to anger sinneth against his own soul. +%% +The fear of man bringeth a snare: but whoso putteth his +trust in the LORD shall be safe. +%% +The fear of the LORD is a fountain of life, to depart from +the snares of death. +%% +The fear of the LORD is the beginning of knowledge: but +fools despise wisdom and instruction. +%% +The fear of the LORD is the beginning of wisdom: and the +knowledge of the holy is understanding. +%% +The fear of the LORD is the instruction of wisdom; and +before honour is humility. +%% +The fear of the LORD is to hate evil: pride, and arrogancy, +and the evil way, and the froward mouth, do I hate. +%% +The fear of the LORD prolongeth days: but the years of the +wicked shall be shortened. +%% +The fear of the LORD tendeth to life: and he that hath it +shall abide satisfied; he shall not be visited with evil. +%% +The fear of the wicked, it shall come upon him: but the +desire of the righteous shall be granted. +%% +The finest eloquence is that which gets things done. +%% +The fining pot is for silver, and the furnace for gold: but +the LORD trieth the hearts. +%% +The following statement is not true: +%% +The foolishness of man perverteth his way: and his heart +fretteth against the LORD. +%% +The fruit of the righteous is a tree of life; and he that +winneth souls is wise. +%% +The full soul loatheth an honeycomb; but to the hungry soul +every bitter thing is sweet. +%% +The future is his who knows how to wait. -- Russian proverb +%% +The future isn't what it used to be. It never was. +%% +The gentlemen looked one another over with microscopic +carelessness. +%% +The getting of treasures by a lying tongue is a vanity +tossed to and fro of them that seek death. +%% +The glory of young men is their strength: and the beauty of +old men is the grey head. +%% +The great God that formed all things both rewardeth the +fool, and rewardeth transgressors. +%% +The greatest of faults is to be conscious of none. +%% +The hand of the diligent shall bear rule: but the slothful +shall be under tribute. +%% +The hearing ear, and the seeing eye, the LORD hath made +even both of them. +%% +The heart knoweth his own bitterness; and a stranger doth +not intermeddle with his joy. +%% +The heart of her husband doth safely trust in her, so that +he shall have no need of spoil. +%% +The heart of him that hath understanding seeketh knowledge: +but the mouth of fools feedeth on foolishness. +%% +The heart of the righteous studieth to answer: but the +mouth of the wicked poureth out evil things. +%% +The heart of the wise teacheth his mouth, and addeth +learning to his lips. +%% +The heaven for height, and the earth for depth, and the +heart of kings is unsearchable. +%% +The hoary head is a crown of glory, if it be found in the +way of righteousness. +%% +The hope of the righteous shall be gladness: but the +expectation of the wicked shall perish. +%% +The horse is prepared against the day of battle: but safety +is of the LORD. +%% +The horseleach hath two daughters, crying, Give, give. +There are three things that are never satisfied, yea, four +things say not, It is enough: The grave; and the barren womb; +the earth that is not filled with water; and the fire that +saith not, It is enough. +%% +The house of the wicked shall be overthrown: but the +tabernacle of the upright shall flourish. +%% +The important thing is not to stop questioning. +%% +The integrity of the upright shall guide them: but the +perverseness of transgressors shall destroy them. +%% +The king by judgment establisheth the land: but he that +receiveth gifts overthroweth it. +%% +The king that faithfully judgeth the poor, his throne shall +be established for ever. +%% +The king's favour is toward a wise servant: but his wrath +is against him that causeth shame. +%% +The king's heart is in the hand of the LORD, as the rivers +of water: he turneth it whithersoever he will. +%% +The king's wrath is as the roaring of a lion; but his +favour is as dew upon the grass. +%% +The labour of the righteous tendeth to life: the fruit of +the wicked to sin. +%% +The lambs are for thy clothing, and the goats are the price +of the field. +%% +The law of the wise is a fountain of life, to depart from +the snares of death. +%% +The legs of the lame are not equal: so is a parable in the +mouth of fools. +%% +The liberal soul shall be made fat: and he that watereth +shall be watered also himself. +%% +The life that is unexamined is not worth living. +%% +The light of the eyes rejoiceth the heart: and a good +report maketh the bones fat. +%% +The light of the righteous rejoiceth: but the lamp of the +wicked shall be put out. +%% +The lip of truth shall be established for ever: but a lying +tongue is but for a moment. +%% +The lips of the righteous feed many: but fools die for want +of wisdom. +%% +The lips of the righteous know what is acceptable: but the +mouth of the wicked speaketh frowardness. +%% +The lips of the wise disperse knowledge: but the heart of +the foolish doeth not so. +%% +The lot causeth contentions to cease, and parteth between +the mighty. +%% +The lot is cast into the lap; but the whole disposing +thereof is of the LORD. +%% +The man that wandereth out of the way of understanding +shall remain in the congregation of the dead. +%% +The man who makes no mistakes does not usually make +anything. +%% +The memory of the just is blessed: but the name of the +wicked shall rot. +%% +The merciful man doeth good to his own soul: but he that is +cruel troubleth his own flesh. +%% +The more things change, the more they remain the same. +%% +The morsel which thou hast eaten shalt thou vomit up, and +lose thy sweet words. +%% +The mouth of a righteous man is a well of life: but +violence covereth the mouth of the wicked. +%% +The mouth of strange women is a deep pit: he that is +abhorred of the LORD shall fall therein. +%% +The mouth of the just bringeth forth wisdom: but the +froward tongue shall be cut out. +%% +The name of the LORD is a strong tower: the righteous +runneth into it, and is safe. +%% +The north wind driveth away rain: so doth an angry +countenance a backbiting tongue. +%% +The only difference between a rut and a grave is their +size. +%% +The only thing to do with good advice is pass it on. It is +never any use to oneself. +%% +The only way to amuse some people is to slip and fall on an +icy pavement. +%% +The plural of spouse is spice. +%% +The poor and the deceitful man meet together: the LORD +lighteneth both their eyes. +%% +The poor is hated even of his own neighbour: but the rich +hath many friends. +%% +The poor useth intreaties; but the rich answereth roughly. +%% +The preparations of the heart in man, and the answer of the +tongue, is from the LORD. +%% +The price of greatness is responsibility. +%% +The prince that wanteth understanding is also a great +oppressor: but he that hateth covetousness shall prolong his +days. +%% +The program is absolutely right; therefore the computer +must be wrong. +%% +The proverbs of Solomon the son of David, king of Israel; +To know wisdom and instruction; to perceive the words of +understanding; To receive the instruction of wisdom, justice, +and judgment, and equity; To give subtilty to the simple, +to the young man knowledge and discretion. +%% +The proverbs of Solomon. A wise son maketh a glad father: +but a foolish son is the heaviness of his mother. +%% +The ransom of a man's life are his riches: but the poor +heareth not rebuke. +%% +The rich and poor meet together: the LORD is the maker of +them all. +%% +The rich man is wise in his own conceit; but the poor that +hath understanding searcheth him out. +%% +The rich man's wealth is his strong city, and as an high +wall in his own conceit. +%% +The rich man's wealth is his strong city: the destruction +of the poor is their poverty. +%% +The rich ruleth over the poor, and the borrower is servant +to the lender. +%% +The righteous considereth the cause of the poor: but the +wicked regardeth not to know it. +%% +The righteous eateth to the satisfying of his soul: but the +belly of the wicked shall want. +%% +The righteous is delivered out of trouble, and the wicked +cometh in his stead. +%% +The righteous is more excellent than his neighbour: but the +way of the wicked seduceth them. +%% +The righteous man wisely considereth the house of the +wicked: but God overthroweth the wicked for their wickedness. +%% +The righteous shall never be removed: but the wicked shall +not inhabit the earth. +%% +The righteousness of the perfect shall direct his way: but +the wicked shall fall by his own wickedness. +%% +The righteousness of the upright shall deliver them: but +transgressors shall be taken in their own naughtiness. +%% +The road to ruin is always in good repair, and the +travelers pay the expense of it. +%% +The robbery of the wicked shall destroy them; because they +refuse to do judgment. +%% +The rod and reproof give wisdom: but a child left to +himself bringeth his mother to shame. +%% +The sacrifice of the wicked is abomination: how much more, +when he bringeth it with a wicked mind? A false witness +shall perish: but the man that heareth speaketh constantly. +%% +The sacrifice of the wicked is an abomination to the LORD: +but the prayer of the upright is his delight. +%% +The shortage will be divided among the poor. -- Russian +proverb +%% +The simple believeth every word: but the prudent man +looketh well to his going. +%% +The simple inherit folly: but the prudent are crowned with +knowledge. +%% +The slothful hideth his hand in his bosom; it grieveth him +to bring it again to his mouth. +%% +The slothful man roasteth not that which he took in +hunting: but the substance of a diligent man is precious. +%% +The slothful man saith, There is a lion in the way; a lion +is in the streets. +%% +The slothful man saith, There is a lion without, I shall be +slain in the streets. +%% +The slower you drive, the farther you get. -- Russian +proverb +%% +The sluggard is wiser in his own conceit than seven men +that can render a reason. +%% +The sluggard will not plow by reason of the cold; therefore +shall he beg in harvest, and have nothing. +%% +The soul of the sluggard desireth, and hath nothing: but +the soul of the diligent shall be made fat. +%% +The soul of the wicked desireth evil: his neighbour findeth +no favour in his eyes. +%% +The soul would have no rainbow had the eyes no tears. +%% +The spirit of a man will sustain his infirmity; but a +wounded spirit who can bear? The heart of the prudent getteth +knowledge; and the ear of the wise seeketh knowledge. +%% +The spirit of man is the candle of the LORD, searching all +the inward parts of the belly. +%% +The sun never sets on the British Empire because the +British are scared of the dark. +%% +The thought of foolishness is sin: and the scorner is an +abomination to men. +%% +The thoughts of the diligent tend only to plenteousness; +but of every one that is hasty only to want. +%% +The thoughts of the righteous are right: but the counsels +of the wicked are deceit. +%% +The thoughts of the wicked are an abomination to the LORD: +but the words of the pure are pleasant words. +%% +The time is right to make new friends. +%% +The tongue of the just is as choice silver: the heart of +the wicked is little worth. +%% +The tongue of the wise useth knowledge aright: but the +mouth of fools poureth out foolishness. +%% +The universe is laughing behind your back. +%% +The way of a fool is right in his own eyes: but he that +hearkeneth unto counsel is wise. +%% +The way of man is froward and strange: but as for the pure, +his work is right. +%% +The way of the LORD is strength to the upright: but +destruction shall be to the workers of iniquity. +%% +The way of the slothful man is as an hedge of thorns: but +the way of the righteous is made plain. +%% +The way of the wicked is an abomination unto the LORD: but +he loveth him that followeth after righteousness. +%% +The way of the wicked is as darkness: they know not at what +they stumble. +%% +The wicked are overthrown, and are not: but the house of +the righteous shall stand. +%% +The wicked desireth the net of evil men: but the root of +the righteous yieldeth fruit. +%% +The wicked flee when no man pursueth: but the righteous are +bold as a lion. +%% +The wicked is driven away in his wickedness: but the +righteous hath hope in his death. +%% +The wicked is snared by the transgression of his lips: but +the just shall come out of trouble. +%% +The wicked shall be a ransom for the righteous, and the +transgressor for the upright. +%% +The wicked worketh a deceitful work: but to him that soweth +righteousness shall be a sure reward. +%% +The wisdom of the prudent is to understand his way: but the +folly of fools is deceit. +%% +The wise in heart shall be called prudent: and the +sweetness of the lips increaseth learning. +%% +The wise in heart will receive commandments: but a prating +fool shall fall. +%% +The wise shall inherit glory: but shame shall be the +promotion of fools. +%% +The wise shepherd never trusts his flock to a smiling wolf. +%% +The words of Agur the son of Jakeh, even the prophecy: the +man spake unto Ithiel, even unto Ithiel and Ucal, Surely I +am more brutish than any man, and have not the +understanding of a man. +%% +The words of a man's mouth are as deep waters, and the +wellspring of wisdom as a flowing brook. +%% +The words of a talebearer are as wounds, and they go down +into the innermost parts of the belly. +%% +The words of a talebearer are as wounds, and they go down +into the innermost parts of the belly. +%% +The words of king Lemuel, the prophecy that his mother +taught him. +%% +The words of the wicked are to lie in wait for blood: but +the mouth of the upright shall deliver them. +%% +The world is coming to an end ... SAVE YOUR BUFFERS!!! +%% +The wrath of a king is as messengers of death: but a wise +man will pacify it. +%% +Then I saw, and considered it well: I looked upon it, and +received instruction. +%% +Then shall they call upon me, but I will not answer; they +shall seek me early, but they shall not find me: For that +they hated knowledge, and did not choose the fear of the +LORD: They would none of my counsel: they despised all my reproof. +%% +Then shalt thou understand righteousness, and judgment, and +equity; yea, every good path. +%% +Then shalt thou walk in thy way safely, and thy foot shall +not stumble. +%% +There are many devices in a man's heart; nevertheless the +counsel of the LORD, that shall stand. +%% +There are more old drunkards than old doctors. +%% +There are more things in heaven and earth than are dreamt +of ... in either. +%% +There are people so addicted to exaggeration that they +can't tell the truth without lying. +%% +There be four things which are little upon the earth, but +they are exceeding wise: The ants are a people not strong, +yet they prepare their meat in the summer; The conies are +but a feeble folk, yet make they their houses in the rocks; +The locusts have no king, yet go they forth all of them by +bands; The spider taketh hold with her hands, and is in +kings' palaces. +%% +There be three things which are too wonderful for me, yea, +four which I know not: The way of an eagle in the air; the +way of a serpent upon a rock; the way of a ship in the +midst of the sea; and the way of a man with a maid. +%% +There be three things which go well, yea, four are comely +in going: A lion which is strongest among beasts, and +turneth not away for any; A greyhound; an he goat also; and a +king, against whom there is no rising up. +%% +There is a generation that are pure in their own eyes, and +yet is not washed from their filthiness. +%% +There is a generation that curseth their father, and doth +not bless their mother. +%% +There is a generation, O how lofty are their eyes! and +their eyelids are lifted up. +%% +There is a generation, whose teeth are as swords, and their +jaw teeth as knives, to devour the poor from off the +earth, and the needy from among men. +%% +There is a way that seemeth right unto a man, but the end +thereof are the ways of death. +%% +There is a way which seemeth right unto a man, but the end +thereof are the ways of death. +%% +There is gold, and a multitude of rubies: but the lips of +knowledge are a precious jewel. +%% +There is no distinctly native American criminal class +except Congress. -- Mark Twain +%% +There is no heavier burden than a great potential. +%% +There is no proverb that is not true. -- Cervantes +%% +There is no sadder sight than a young pessimist. +%% +There is no sin but ignorance. -- Christopher Marlowe +%% +There is no such thing as pure pleasure; some anxiety +always goes with it. +%% +There is no time like the pleasant. +%% +There is no wisdom nor understanding nor counsel against +the LORD. +%% +There is that maketh himself rich, yet hath nothing: there +is that maketh himself poor, yet hath great riches. +%% +There is that scattereth, and yet increaseth; and there is +that withholdeth more than is meet, but it tendeth to +poverty. +%% +There is that speaketh like the piercings of a sword: but +the tongue of the wise is health. +%% +There is treasure to be desired and oil in the dwelling of +the wise; but a foolish man spendeth it up. +%% +There never was a good war or a bad peace. +%% +There shall no evil happen to the just: but the wicked +shall be filled with mischief. +%% +There's got to be more to life than compile-and-go. +%% +There's never time to do the job right, so we must find +time to do it again. +%% +There's no room in the drug world for amateurs. +%% +There's so much to say but your eyes keep interrupting me. +%% +Therefore came I forth to meet thee, diligently to seek thy +face, and I have found thee. +%% +Therefore shall his calamity come suddenly; suddenly shall +he be broken without remedy. +%% +Therefore shall they eat of the fruit of their own way, and +be filled with their own devices. +%% +These are also proverbs of Solomon, which the men of +Hezekiah king of Judah copied out. +%% +These six things doth the LORD hate: yea, seven are an +abomination unto him: A proud look, a lying tongue, and hands +that shed innocent blood, An heart that deviseth wicked +imaginations, feet that be swift in running to mischief, A +false witness that speaketh lies, and he that soweth discord +among brethren. +%% +They are all plain to him that understandeth, and right to +them that find knowledge. +%% +They have stricken me, shalt thou say, and I was not sick; +they have beaten me, and I felt it not: when shall I awake? +I will seek it yet again. +%% +They that are of a froward heart are abomination to the +LORD: but such as are upright in their way are his delight. +%% +They that forsake the law praise the wicked: but such as +keep the law contend with them. +%% +Thine eyes shall behold strange women, and thine heart +shall utter perverse things. +%% +Thine own friend, and thy father's friend, forsake not; +neither go into thy brother's house in the day of thy +calamity: for better is a neighbour that is near than a brother far +off. +%% +This fortune is inoperative. Please try another. +%% +This is a good time to punt work. +%% +This login session: $13.99 +%% +This screen intentionally left blank. +%% +Thorns and snares are in the way of the froward: he that +doth keep his soul shall be far from them. +%% +Those of you who think you know everything are very +annoying to us who do. +%% +Those who can, do. Those who can't, program. +%% +Those who can, do. Those who can't, simulate. +%% +Those who can, do. Those who can't, teach. Those who +can't teach, HACK! +%% +Those who in quarrels interpose must often wipe a bloody +nose. +%% +Those who talk, don't know. Those who don't talk, know. +%% +Thou shalt beat him with the rod, and shalt deliver his +soul from hell. +%% +Though hand join in hand, the wicked shall not be +unpunished: but the seed of the righteous shall be delivered. +%% +Though this be madness, yet there is method in 't. -- +William Shakespeare +%% +Though thou shouldest bray a fool in a mortar among wheat +with a pestle, yet will not his foolishness depart from him. +%% +Through desire a man, having separated himself, seeketh and +intermeddleth with all wisdom. +%% +Through wisdom is an house builded; and by understanding it +is established: And by knowledge shall the chambers be +filled with all precious and pleasant riches. +%% +Thy father and thy mother shall be glad, and she that bare +thee shall rejoice. +%% +Time and tide wait for no man. +%% +Time flies when you don't know what you're doing. +%% +Time for lunch! +%% +Time is but the stream I go a-fishing in. +%% +Time is nature's way of making sure that everything doesn't +happen at once. +%% +To be great is to be misunderstood. +%% +To criticize the incompetent is easy; it is more difficult +to criticize the competent. +%% +To do justice and judgment is more acceptable to the LORD +than sacrifice. +%% +To each his own and to you so long. +%% +To have a sense of humor is to be a tragic figure. +%% +To have respect of persons is not good: for for a piece of +bread that man will transgress. +%% +To iterate is human, to recurse, divine. +%% +To know thyself is the ultimate form of aggression. +%% +To laugh at men of sense is the privilege of fools. +%% +To teach is to learn. +%% +To understand a program you must become both the machine +and the program. +%% +Today is a good day to bribe a high-ranking public +official. +%% +Today is the last day of your life so far. +%% +Too clever is dumb. -- Ogden Nash +%% +Toto, I have a feeling we're not in Kansas any more! +%% +Train up a child in the way he should go: and when he is +old, he will not depart from it. +%% +Treasures of wickedness profit nothing: but righteousness +delivereth from death. +%% +Troubles are like babies; they only grow by nursing. +%% +Trust in Allah, but tie your camel anyway. +%% +Trust in the LORD with all thine heart; and lean not unto +thine own understanding. +%% +Truthful: Dumb and illiterate. +%% +Try "stty 0" -- it works much better. +%% +Try the Moo Shu Pork. It is especially good today. +%% +Try to divide your time evenly to keep others happy. +%% +Trying to get an education here is like trying to take a +drink from a fire hose. +%% +Turn not to the right hand nor to the left: remove thy foot +from evil. +%% +Turn the other cheek. -- Jesus Christ +%% +Two men look out through the same bars; one sees mud, and +one the stars. +%% +Two things have I required of thee; deny me them not before +I die: Remove far from me vanity and lies: give me neither +poverty nor riches; feed me with food convenient for me: +Lest I be full, and deny thee, and say, Who is the LORD? or +lest I be poor, and steal, and take the name of my God in vain. +%% +Understanding is a wellspring of life unto him that hath +it: but the instruction of fools is folly. +%% +Unix soit qui mal y pense. +%% +Unquestionably, there is progress. The average American +now pays out twice as much in taxes as he formerly got in +wages. +%% +Unto you, O men, I call; and my voice is to the sons of +man. +%% +Use GOTOs only to implement a fundamental structure. +%% +Use IF...ELSE IF...ELSE IF...ELSE... to implement +multi-way branches. +%% +Use debugging compilers. +%% +Use free-form input where possible. +%% +Use library functions. +%% +Vests are to suits as seat-belts are to cars. +%% +Volcano -- a mountain with hiccups. +%% +Wag your tongue as much as you please, but don't wave your +gun. -- Russian proverb +%% +Walk softly and carry a big stick. -- Theodore Roosevelt +%% +Wash a pig as much as you like, it'll go right back into +the mud puddle. -- Russian proverb +%% +Waste not, get your budget cut next year. +%% +Watch out for off-by-one errors. +%% +We all know that no one understands anything that isn't +funny. +%% +We always might win ... because the others might lose. +%% +We are all related: the same sun dries our rags. -- Russian +proverb +%% +We are always the same age inside. +%% +We could do that, but it would be wrong, that's for sure. +%% +We give advice, but we cannot give the wisdom to profit by +it. +%% +We learn from history that we do not learn anything from +history. +%% +We must remember the First Amendment which protects any +shrill jackass no matter how self-seeking. +%% +Wealth gotten by vanity shall be diminished: but he that +gathereth by labour shall increase. +%% +Wealth maketh many friends; but the poor is separated from +his neighbour. +%% +What garlic is to salad, insanity is to art. +%% +What good is honor on an empty stomach? -- Russian proverb +%% +What is wanted is not the will-to-believe, but the +wish-to-find-out, which are exact opposites. +%% +What sin has not been committed in the name of efficiency? +%% +What this country needs is a good five cent microcomputer. +%% +What you don't know can't hurt you. +%% +What, my son? and what, the son of my womb? and what, the +son of my vows? Give not thy strength unto women, nor thy +ways to that which destroyeth kings. +%% +When a man assumes a public trust, he should consider +himself as public property. -- Thomas Jefferson +%% +When a man's ways please the LORD, he maketh even his +enemies to be at peace with him. +%% +When a wicked man dieth, his expectation shall perish: and +the hope of unjust men perisheth. +%% +When choosing between two evils, always try the one you +have never tried before. +%% +When he prepared the heavens, I was there: when he set a +compass upon the face of the depth: When he established the +clouds above: when he strengthened the fountains of the +deep: When he gave to the sea his decree, that the waters +should not pass his commandment: when he appointed the +foundations of the earth: Then I was by him, as one brought up with +him: and I was daily his delight, rejoicing always before +him; Rejoicing in the habitable part of his earth; and my +delights were with the sons of men. +%% +When in charge, ponder; when in doubt, mumble; when in +trouble, delegate. +%% +When in doubt, lead trump. +%% +When it goeth well with the righteous, the city rejoiceth: +and when the wicked perish, there is shouting. +%% +When pride cometh, then cometh shame: but with the lowly is +wisdom. +%% +When righteous men do rejoice, there is great glory: but +when the wicked rise, a man is hidden. +%% +When the righteous are in authority, the people rejoice: +but when the wicked beareth rule, the people mourn. +%% +When the scorner is punished, the simple is made wise: and +when the wise is instructed, he receiveth knowledge. +%% +When the sheath is broken, you can't hide the sword. -- +Russian proverb +%% +When the wicked are multiplied, transgression increaseth: +but the righteous shall see their fall. +%% +When the wicked cometh, then cometh also contempt, and with +ignominy reproach. +%% +When the wicked rise, men hide themselves: but when they +perish, the righteous increase. +%% +When the wind is great, bow before it; when the wind is +heavy, yield to it. +%% +When there were no depths, I was brought forth; when there +were no fountains abounding with water. +%% +When thou goest, it shall lead thee; when thou sleepest, it +shall keep thee; and when thou awakest, it shall talk with +thee. +%% +When thou goest, thy steps shall not be straitened; and +when thou runnest, thou shalt not stumble. +%% +When thou liest down, thou shalt not be afraid: yea, thou +shalt lie down, and thy sleep shall be sweet. +%% +When thou sittest to eat with a ruler, consider diligently +what is before thee: And put a knife to thy throat, if thou +be a man given to appetite. +%% +When we write programs that "learn," it turns out that we +do and they don't. +%% +When wisdom entereth into thine heart, and knowledge is +pleasant unto thy soul; Discretion shall preserve thee, +understanding shall keep thee: To deliver thee from the way of +the evil man, from the man that speaketh froward things; Who +leave the paths of uprightness, to walk in the ways of +darkness; Who rejoice to do evil, and delight in the +frowardness of the wicked; Whose ways are crooked, and they froward +in their paths: To deliver thee from the strange woman, even +from the stranger which flattereth with her words; Which +forsaketh the guide of her youth, and forgetteth the +covenant of her God. +%% +When you live close to the graveyard, you can't weep for +every funeral. -- Russian proverb +%% +When your only tool is a hammer, you tend to treat +everything you find like a nail. +%% +Where no counsel is, the people fall: but in the multitude +of counsellors there is safety. +%% +Where no oxen are, the crib is clean: but much increase is +by the strength of the ox. +%% +Where the system is concerned, you're not allowed to ask +"Why?". +%% +Where there is no vision, the people perish: but he that +keepeth the law, happy is he. +%% +Wherefore is there a price in the hand of a fool to get +wisdom, seeing he hath no heart to it? A friend loveth at all +times, and a brother is born for adversity. +%% +Who are you? +%% +Who can find a virtuous woman? for her price is far above +rubies. +%% +Who can say, I have made my heart clean, I am pure from my +sin? Divers weights, and divers measures, both of them are +alike abomination to the LORD. +%% +Who hath ascended up into heaven, or descended? who hath +gathered the wind in his fists? who hath bound the waters in +a garment? who hath established all the ends of the earth? +what is his name, and what is his son's name, if thou canst +tell? Every word of God is pure: he is a shield unto them +that put their trust in him. +%% +Who hath woe? who hath sorrow? who hath contentions? who +hath babbling? who hath wounds without cause? who hath +redness of eyes? They that tarry long at the wine; they that go +to seek mixed wine. +%% +Whose hatred is covered by deceit, his wickedness shall be +shewed before the whole congregation. +%% +Whoso boasteth himself of a false gift is like clouds and +wind without rain. +%% +Whoso causeth the righteous to go astray in an evil way, he +shall fall himself into his own pit: but the upright shall +have good things in possession. +%% +Whoso curseth his father or his mother, his lamp shall be +put out in obscure darkness. +%% +Whoso despiseth the word shall be destroyed: but he that +feareth the commandment shall be rewarded. +%% +Whoso diggeth a pit shall fall therein: and he that rolleth +a stone, it will return upon him. +%% +Whoso findeth a wife findeth a good thing, and obtaineth +favour of the LORD. +%% +Whoso is partner with a thief hateth his own soul: he +heareth cursing, and bewrayeth it not. +%% +Whoso keepeth his mouth and his tongue keepeth his soul +from troubles. +%% +Whoso keepeth the fig tree shall eat the fruit thereof: so +he that waiteth on his master shall be honoured. +%% +Whoso keepeth the law is a wise son: but he that is a +companion of riotous men shameth his father. +%% +Whoso loveth instruction loveth knowledge: but he that +hateth reproof is brutish. +%% +Whoso loveth wisdom rejoiceth his father: but he that +keepeth company with harlots spendeth his substance. +%% +Whoso mocketh the poor reproacheth his Maker: and he that +is glad at calamities shall not be unpunished. +%% +Whoso rewardeth evil for good, evil shall not depart from +his house. +%% +Whoso robbeth his father or his mother, and saith, It is no +transgression; the same is the companion of a destroyer. +%% +Whoso stoppeth his ears at the cry of the poor, he also +shall cry himself, but shall not be heard. +%% +Whoso walketh uprightly shall be saved: but he that is +perverse in his ways shall fall at once. +%% +Whosoever hideth her hideth the wind, and the ointment of +his right hand, which bewrayeth itself. +%% +Wilt thou set thine eyes upon that which is not? for riches +certainly make themselves wings; they fly away as an eagle +toward heaven. +%% +Wine is a mocker, strong drink is raging: and whosoever is +deceived thereby is not wise. +%% +Wisdom crieth without; she uttereth her voice in the +streets: She crieth in the chief place of concourse, in the +openings of the gates: in the city she uttereth her words, +saying, How long, ye simple ones, will ye love simplicity? and +the scorners delight in their scorning, and fools hate +knowledge? Turn you at my reproof: behold, I will pour out my +spirit unto you, I will make known my words unto you. +%% +Wisdom hath builded her house, she hath hewn out her seven +pillars: She hath killed her beasts; she hath mingled her +wine; she hath also furnished her table. +%% +Wisdom is before him that hath understanding; but the eyes +of a fool are in the ends of the earth. +%% +Wisdom is the principal thing; therefore get wisdom: and +with all thy getting get understanding. +%% +Wisdom is too high for a fool: he openeth not his mouth in +the gate. +%% +Wisdom resteth in the heart of him that hath understanding: +but that which is in the midst of fools is made known. +%% +Wise men lay up knowledge: but the mouth of the foolish is +near destruction. +%% +With clothes the new are best, with friends the old are +best. +%% +With her much fair speech she caused him to yield, with the +flattering of her lips she forced him. +%% +Withdraw thy foot from thy neighbour's house; lest he be +weary of thee, and so hate thee. +%% +Withhold not correction from the child: for if thou beatest +him with the rod, he shall not die. +%% +Withhold not good from them to whom it is due, when it is +in the power of thine hand to do it. +%% +Within a computer, natural language is unnatural. +%% +Without adventure, civilization is in full decay. +%% +Without counsel purposes are disappointed: but in the +multitude of counsellors they are established. +%% +Words are the voice of the heart. +%% +Words must be weighed, not counted. +%% +Work is the curse of the drinking class. +%% +Wrath is cruel, and anger is outrageous; but who is able to +stand before envy? Open rebuke is better than secret love. +%% +Writing free verse is like playing tennis with the net +down. +%% +Yea, my reins shall rejoice, when thy lips speak right +things. +%% +Yea, thou shalt be as he that lieth down in the midst of +the sea, or as he that lieth upon the top of a mast. +%% +Yet a little sleep, a little slumber, a little folding of +the hands to sleep: So shall thy poverty come as one that +travelleth; and thy want as an armed man. +%% +You are being paged. +%% +You are being swapped. +%% +You are clever, but it comes slowly -- all the way from the +back of your head. -- Russian proverb +%% +You are going to have a new love affair. +%% +You are in a maze of twisty little passages, all alike. +%% +You attempt things that you do not even plan because of +your extreme stupidity. +%% +You can do more with a kind word and a gun than you can +with only a kind word. +%% +You can't depend on the man who made the mess to clean it +up. -- Richard Nixon [1952] +%% +You can't drive straight on a twisting road. -- Russian +proverb +%% +You can't go home again, unless you set $HOME. +%% +You can't pick a mushroom without bowing. -- Russian +proverb +%% +You cannot kill time without injuring eternity. +%% +You do not have mail. +%% +You don't have to rehearse to be yourself. +%% +You don't want to know what I know. +%% +You fill a much-needed gap. +%% +You have a deep interest in all that is artistic. +%% +You have a tendency to feel you are superior to most +computers. +%% +You have an ambitious nature and may make a name for +yourself. +%% +You have been selected for a secret mission. +%% +You have been swapped out. +%% +You have mail. +%% +You look tired. +%% +You never get a hangover from other people's vodka. -- +Russian proverb +%% +You now have Asian Flu. +%% +You should go home. +%% +You will attract cultured and artistic people to your home. +%% +You will be advanced socially, without any special effort +on your part. +%% +You will be recognized and honored as a community leader. +%% +You will be surprised by a loud noise. +%% +You will feel hungry again in another hour. +%% +You will live a long, healthy, happy life and make bags of +money. +%% +You will never know hunger. +%% +You will reach the highest possible point in your business +or profession. +%% +You will step on the night soil of many countries. +%% +You'll be called to a post requiring high ability in +handling groups of people. +%% +You'll be sent to Siberia to count the birches. -- Russian +proverb +%% +Your business will go through a period of considerable +expansion. +%% +Your code should be more efficient! +%% +Your computer account is overdrawn. Please reauthorize. +%% +Your education begins where what is called your education +is over. +%% +Your empty file directory has been deleted. +%% +Your ignorance cramps my conversation. +%% +Your mind understands what you have been taught; your +heart, what is true. +%% +Your salary will be increased. +%% +Your supervisor is thinking about you. +%% +Youth is the trustee of posterity. diff --git a/etc/genlauncher/README b/etc/genlauncher/README new file mode 100644 index 00000000..7e675aeb --- /dev/null +++ b/etc/genlauncher/README @@ -0,0 +1,18 @@ +This is a facility for the maintainer to populate +the launchers with all the modes. + +Written by Charles Vidal + +README This file +lmode.h The modes +make.launcher +xlockgen.lex + +To compile xlockgen.lex +lex xlockgen.lex +# Lex +gcc lex.yy.c -o xlockgen -ll +# Flex +gcc lex.yy.c -o xlockgen -lfl + +Then run make.launcher on the genlauncher directory diff --git a/etc/genlauncher/etc.xlock.tcl b/etc/genlauncher/etc.xlock.tcl new file mode 100755 index 00000000..384da7c4 --- /dev/null +++ b/etc/genlauncher/etc.xlock.tcl @@ -0,0 +1,647 @@ +#!/usr/X11/bin/wish -f + +#charles vidal 1998 +# update Sun Oct 18 1998 +# Add the menu file with load resources +# and the exit button +# Add the load_process procedure loading +# the ressource file ~/XLock +# + +#function find in demo: mkStyles.tcl +# The procedure below inserts text into a given text widget and +# applies one or more tags to that text. The arguments are: +# +# w Window in which to insert +# text Text to insert (it's inserted at the "insert" mark) +# args One or more tags to apply to text. If this is empty +# then all tags are removed from the text. +set bgcolor "" +set fgcolor "" +set ftname "" +set mftname "" +set usernom "" +set passmot "" +set XLock_validate "" +set XLock_invalid "" +set XLock_program "" +set geometrie "" +set icogeometrie "" +set XLock_info "" +set indxhelp "" +set messagesfile "" +set messagefile "" +set bitmap "" + +proc openfilesel { var } { +upvar $var toto +set toto [ tk_getOpenFile -parent .] +return toto +} + +proc insertWithTags {w text args} { + set start [$w index insert] + $w insert insert $text + foreach tag [$w tag names $start] { + $w tag remove $tag $start insert + } + foreach i $args { + $w tag add $i $start insert + } +} + +# Function for the help +proc mkHelpCheck { w args } { + set nbf 0 + foreach i $args { + set nbf [ expr $nbf +1 ] + $w insert insert "\n" + checkbutton $w.c$nbf -variable [lindex $i 0] -text [lindex $i 0] + $w window create {end lineend} -window $w.c$nbf + $w insert insert " [lindex $i 1] " + } +} + +proc mkHelpEntry { w args } { + set nbf 0 + foreach i $args { + set nbf [ expr $nbf +1 ] + insertWithTags $w "\n [lindex $i 0] " underline + entry $w.e$nbf -textvariable [lindex $i 1] + $w window create {end lineend} -window $w.e$nbf + $w insert insert "\n[lindex $i 2] " + } +} + +# +proc whichcolor { which } { + global fgcolor + global bgcolor + if {$which == "RESETFG"} {set fgcolor ""} + if {$which == "RESETBG"} {set bgcolor ""} + if ($tk_version>4) then { + if {$which== "FG" } {set fgcolor [tk_chooseColor -initialcolor $fgcolor -title "foreground color"]; + puts $fgcolor + } + if {$which == "BG"} {set bgcolor [tk_chooseColor -initialcolor $bgcolor -title "background color"]; + puts $bgcolor + } + } else + { + if {$which== "FG" } {set fgcolor [.color.frame.names get [.color.frame.names curselection]];} + if {$which == "BG"} {set bgcolor [.color.frame.names get [.color.frame.names curselection]];} + } +} + +proc mkColor { what } { + if ($tk_version>4) then { + whichcolor $what; destroy .color + } else + { + toplevel .color + wm title .color "Color" + frame .color.frame -borderwidth 10 + frame .color.frame2 -borderwidth 10 + set w .color.frame + label $w.msg0 -text "Color Options" + pack $w.msg0 -side top + foreach i {/usr/local/lib/X11/rgb.txt /usr/lib/X11/rgb.txt + /X11/R5/lib/X11/rgb.txt /X11/R4/lib/rgb/rgb.txt} { + if ![file readable $i] { + continue; + } + set f [open $i] + listbox .color.frame.names -yscrollcommand ".color.frame.scroll set" \ + -relief sunken -borderwidth 2 -exportselection false + bind .color.frame.names { + .color.test configure -bg [.color.frame.names get [.color.frame.names curselection]] + } + scrollbar .color.frame.scroll -orient vertical -command ".color.frame.names yview" \ + -relief sunken -borderwidth 2 + pack .color.frame.names -side left + pack .color.frame.scroll -side right -fill both + pack .color.frame -fill x + while {[gets $f line] >= 0} { + if {[llength $line] == 4} { + .color.frame.names insert end [lindex $line 3] + } + } + close $f + label .color.test -height 5 -width 20 + button .color.frame2.cancel -text Cancel -command "destroy .color" + button .color.frame2.ok -text OK -command "whichcolor $what; destroy .color" + button .color.frame2.reset -text Reset -command "whichcolor RESET$what; destroy .color" + pack .color.test + pack .color.frame2.ok .color.frame2.cancel .color.frame2.reset -side left -fill x + pack .color.frame2 -fill both + break; + } + } +} + +# moving in text by the list +proc moveintext { indx } { +upvar indxhelp t1 + .help.f.t yview [ lindex $t1 $indx ] + +} +#---------------------- +# Help ... +proc Helpxlock {} { + global indxhelp + toplevel .help + wm title .help "Help About Xlock" + frame .help.f + scrollbar .help.f.s -orient vertical -command {.help.f.t yview} + pack .help.f -expand yes -fill both + pack .help.f.s -side right -fill y -expand yes + text .help.f.t -yscrollcommand {.help.f.s set} -wrap word -width 60 -height 20 \ + -setgrid 1 + + listbox .help.f.names -width 20 -height 20 + + bind .help.f.names { + set titi [eval .help.f.names curselection] + moveintext $titi + } + + pack .help.f.names .help.f.t -expand y -fill both -side left + set w .help.f.t + $w tag configure big -font -Adobe-Courier-Bold-R-Normal-*-140-* + + foreach i {{"Xlock Help" { Locks the X server still the user enters their pass\ +word at the keyboard. While xlock is running, all new\ +server connections are refused. The screen saver is dis\ +abled. The mouse cursor is turned off. The screen is\ +blanked and a changing pattern is put on the screen. If a\ +key or a mouse button is pressed then the user is prompted\ +for the password of the user who started xlock. +If the correct password is typed, then the screen is\ +unlocked and the X server is restored. When typing the\ +password Control-U and Control-H are active as kill and\ +erase respectively. To return to the locked screen, click\ +in the small icon version of the changing pattern.} 0 } + {"Options" {The option sets the X11 display to lock.\ +xlock locks all available screens on a given server,\ +and restricts you to locking only a local server such\ +as unix::00,, localhost::00,, or ::00 unless you set the\ + -remote option.} 0 }\ + {"-name" {is used instead of XLock when looking for resources to configure xlock.} 1 } + {"-mode" {As of this writing there are 80+ display modes supported (plus one more for random selection of one of the 80+).} 1 } + {"-delay" {It simply sets the number of microseconds to delay +between batches of animations. In blank mode, it is important to set this to +some small number of microseconds, because the keyboard and mouse are only checked after each delay, so you cannot set the delay too high, but a delay of +zero would needlessly consume cpu checking for mouse and keyboard input in a tight loop, since blank mode has no work to do.} 1 } + {"-saturation" {This option sets saturation of the color ramp . 0 is grayscale and 1 is very rich color. 0.4 is a nice pastel.} 1 } + {"-username" {text string to use for Name prompt} 1 }\ + {"-password" {text string to use for Password prompt} 1 }\ + {"-info" {text string to use for instructions} 1 }\ + {"-validate" {the message shown while validating the password, +defaults to \"Validating login...\"} 1 }\ + {"-invalid" {the message shown when password is invalid, defaults to \"Invalid login.\"} 1 }\ + {"-geometry" {This option sets the size and offset of the lock +window (normally the entire screen). The entire screen format is still used for entering the password. The purpose is to see the screen even though it is locked. This should be used with caution since many of the modes will fail if the windows are far from square or are too small (size must be greater +than 0x0). This should also be used with esaver to protect screen from phosphor burn.} 1 }\ + {"-icongeometry" {this option sets the size of the iconic screen (normally 64x64) seen when entering the password. This should be used with caution since many of the modes will fail if the windows are far from square +or are too small (size must be greater than 0x0). The greatest size is +256x256. There should be some limit so users could see who has locked the screen. Position information of icon is ignored.} 1 } + {"-font" { Ths option sets the font to be used on the prompt screen.} 1 } + { "-fg " { This option sets the color of the text on the password screen.} 1 } + {"-bg" { This option sets the color of the background on the password screen.} 1 } + {"-forceLogout" { This option sets the auto-logout. This might not be enforced depending how your system is configured.} 1 }} { + lappend indxhelp [$w index current] + if { [lindex $i 2] == 1 } then {.help.f.names insert end " [lindex $i 0]"} else {.help.f.names insert end " [lindex $i 0]"} + insertWithTags $w "[lindex $i 0] " big + $w insert end "\n" + $w insert end [lindex $i 1] + $w insert end "\n" + } + lappend indxhelp [$w index current] + insertWithTags $w "Options boolean" big + $w insert end "\n" + .help.f.names insert end "Options boolean" + mkHelpCheck $w {XLock_mono {turn on/off monochrome override}}\ + {nolock {trun on/off no password required mode}}\ + {remote {turn on/off remote host access}}\ + {allowroot {turn on/off allow root password mode (ignored)}}\ + {enablesaver {turn on/off enable X server screen saver}}\ + {allowaccess {turn on/off access of the terminal X}}\ + {grabmouse {turn on/off grabbing of mouse and keyboard}}\ + {echokeys {turn on/off echo \'?\' for each password key}}\ + {usefirst {turn on/off using the first char typed in password}}\ + {verbose {turn on/off verbose mode}}\ + {inwindow {turn on/off making xlock run in a window}}\ + {inroot {turn on/off making xlock run in the root window}}\ + {timeelapsed {turn on/off clock}}\ + {install {whether to use private colormap if needed (yes/no)}}\ + {sound {whether to use sound if configured for it (yes/no}} + button .help.ok -text OK -command "destroy .help" + pack .help.ok +} + +# Create toplevel Author and Maintener. +proc mkAuthor {} { + toplevel .author + wm title .author "Author and Maintener of xlock" + frame .author.frame -borderwidth 10 + set w .author.frame + + label $w.msg0 -text "Author and Maintener of xlock" + label $w.msg1 -text "Maintained by: David A. Bagley (bagleyd@bigfoot.com)" + label $w.msg2 -text "Original Author: Patrick J. Naughton (naughton@eng.sun.com)" + label $w.msg3 -text "Mailstop 21-14 Sun Microsystems Laboratories," + label $w.msg4 -text "Inc. Mountain View, CA 94043 15//336-1080" + label $w.msg5 -text "with many additional contributors" + pack $w.msg0 $w.msg1 $w.msg2 $w.msg3 $w.msg4 $w.msg5 -side top + + label $w.msg6 -text "xlock.tcl\n created by charles VIDAL\n (author of flag mode and xmlock launcher )" + pack $w.msg6 -side top + + button .author.ok -text OK -command "destroy .author" + pack $w .author.ok +} + +proc mkFileDialog { nom titre args } { + toplevel .$nom + wm title .$nom "$titre" + frame .$nom.frame -borderwidth 10 + frame .$nom.frame2 -borderwidth 10 + frame .$nom.frame.frame4 -borderwidth 10 + set w .$nom.frame + set w2 .$nom.frame2 + set w4 .$nom.frame.frame4 + set nbf 0 + + label $w.msg0 -text "$titre" + pack $w.msg0 -side top + foreach i $args { + set nbf [ expr $nbf +1 ] + frame $w4.f$nbf + label $w4.f$nbf.l$nbf -text [lindex $i 0] + entry $w4.f$nbf.e$nbf -textvariable [lindex $i 1] + button $w4.f$nbf.b$nbf -text "..." -command "openfilesel [lindex $i 1]" + pack $w4.f$nbf.l$nbf $w4.f$nbf.e$nbf $w4.f$nbf.b$nbf -side left -expand yes + pack $w4.f$nbf -expand yes + } + button $w2.ok -text OK -command "destroy .$nom" + button $w2.cancel -text Cancel -command "destroy .$nom" + pack $w -side top -expand yes + pack $w4 -side right -expand yes + pack $w2.ok $w2.cancel -side left -fill x -expand yes + pack $w2 -side bottom -expand yes +} + +proc mkDialog { nom titre args } { + toplevel .$nom + wm title .$nom "$titre" + frame .$nom.frame -borderwidth 10 + frame .$nom.frame2 -borderwidth 10 + frame .$nom.frame.frame3 -borderwidth 10 + frame .$nom.frame.frame4 -borderwidth 10 + set w .$nom.frame + set w2 .$nom.frame2 + set w3 .$nom.frame.frame3 + set w4 .$nom.frame.frame4 + set nbf 0 + + label $w.msg0 -text "$titre" + pack $w.msg0 -side top + foreach i $args { + set nbf [ expr $nbf +1 ] + label $w3.l$nbf -text [lindex $i 0] + entry $w4.e$nbf -textvariable [lindex $i 1] + pack $w3.l$nbf + pack $w4.e$nbf + } + button $w2.ok -text OK -command "destroy .$nom" + button $w2.cancel -text Cancel -command "destroy .$nom" + pack $w -side top + pack $w3 -side left + pack $w4 -side right + pack $w2.ok $w2.cancel -side left -fill x + pack $w2 -side bottom +} + +proc mkMessage {} { + global passmot + global XLock_validate + global XLock_invalid + global XLock_info + mkDialog message {Message Options} \ + {"message password" passmot} \ + {"validate string" XLock_validate} \ + {"invalid string" XLock_invalid} \ + {"info string" XLock_info} +} + +proc mkGeometry {} { + global geometrie + global icogeometrie + mkDialog geometry {Geometry Options} \ + {"geometry" geometrie} \ + {"icon geometry" icogeometrie} +} + +proc mkFileOption {} { + global messagesfile + global messagefile + global bitmap + mkFileDialog fileoption {Files Options} \ + {"messagesfile" messagesfile} \ + {"messagefile" messagefile} \ + {"bitmap" bitmap} +} + +proc whichfont { which } { + global ftname + global mftname + if {$which== "FONT" } {set ftname [.font.frame.names get [.font.frame.names curselection]];} + if {$which == "MFONT"} {set mftname [.font.frame.names get [.font.frame.names curselection]];} + if {$which == "RESETFONT"} {set ftname ""} + if {$which == "RESETMFONT"} {set mftname ""} +} + +#this function should be erase in the newer version... +proc mkFont { What } { + toplevel .font + wm title .font "Font Options" + label .font.label -text "ABCDEFGH\nIJKabedfg\nhijkmnopq" + frame .font.frame -borderwidth 10 + frame .font.frame2 -borderwidth 10 + set w .font.frame + label $w.msg0 -text "Font Options" + pack $w.msg0 -side top + eval exec "xlsfonts \> /tmp/xlsfont.tmp" + set f [open "/tmp/xlsfont.tmp"] + listbox .font.frame.names -yscrollcommand ".font.frame.scroll set" \ + -xscrollcommand ".font.scroll2 set" -setgrid 1 \ + -exportselection false + bind .font.frame.names { + .font.test configure -font [.font.frame.names get [.font.frame.names curselection]] + } + scrollbar .font.frame.scroll -orient vertical -command ".font.frame.names yview" \ + -relief sunken -borderwidth 2 + scrollbar .font.scroll2 -orient horizontal -command ".font.frame.names xview" \ + -relief sunken -borderwidth 2 + while {[gets $f line] >= 0} { + .font.frame.names insert end $line + } + close $f + + eval exec "/bin/rm -f /tmp/xlsfont.tmp" + pack .font.frame.names -side left -expand y -fill both + pack .font.frame.scroll -side right -fill both + pack .font.frame -fill x + pack .font.scroll2 -fill both + label .font.test -text "ABCDEFGHIJKabedfghijkmnopq12345" + pack .font.test + + button .font.frame2.cancel -text Cancel -command "destroy .font" + button .font.frame2.reset -text Reset -command "whichfont RESET$What;destroy .font" + button .font.frame2.ok -text OK -command "whichfont $What;destroy .font" + pack .font.frame2.ok .font.frame2.cancel .font.frame2.reset -side left -fill both + pack .font.frame2 -fill both + + #frame $w.fontname + #label $w.fontname.l1 -text "font name" + #entry $w.fontname.e1 -relief sunken + #frame $w.specfont + #label $w.specfont.l2 -text "specifique font name" + #entry $w.specfont.e2 -relief sunken + #pack $w.fontname $w.specfont + #pack $w.fontname.l1 -side left + #pack $w.specfont.l2 -side left + #pack $w.fontname.e1 $w.specfont.e2 -side top -pady 5 -fill x + #button .font.frame2.ok -text OK -command "destroy .font" + #button .font.frame2.cancel -text Cancel -command "destroy .font" + #pack $w .font.frame2.ok .font.frame2.cancel -side left -fill x + #pack .font.frame2 -side bottom +} + +proc mkEntry {} { + global usernom + global XLock_program + mkDialog option {User Options} \ + {"user name" usernom} \ + {"program name" XLock_program} +} + +proc Affopts { device } { + +#options booleans + global XLock_mono + global nolock + global remote + global allowroot + global enablesaver + global allowaccess + global grabmouse + global echokeys + global usefirst + global install + global sound + + global fgcolor + global bgcolor + global ftname + global mftname + + global usernom + global passmot + global XLock_validate + global XLock_invalid + global XLock_program + global geometrie + global icogeometrie + global XLock_info + global messagesfile + global messagefile + global bitmap + + set linecommand "xlock " + + if {$device == 1} {append linecommand "-inwindow "} elseif {$device == 2} {append linecommand "-inroot "} + if {$bgcolor!=""} {append linecommand "-bg $bgcolor "} + if {$fgcolor!=""} {append linecommand "-fg $fgcolor "} + if {$ftname!=""} {append linecommand "-font $ftname "} + if {$mftname!=""} {append linecommand "-messagefont $mftname "} +#entry action + if {$usernom!=""} {append linecommand "-username $usernom "} + if {$passmot!=""} {append linecommand "-password $passmot "} + if {$XLock_validate!=""} {append linecommand "-validate $XLock_validate "} + if {$XLock_invalid!=""} {append linecommand "-invalid $XLock_invalid "} + if {$XLock_program!=""} {append linecommand "-program $XLock_program "} + if {$geometrie!=""} {append linecommand "-geometry $geometrie "} + if {$icogeometrie!=""} {append linecommand "-icongeometry $icogeometrie "} + if {$messagesfile!=""} {append linecommand "-messagesfile $messagesfile "} + if {$bitmap!=""} {append linecommand "-bitmap $bitmap "} + if {$icogeometrie!=""} {append linecommand "-icongeometry $icogeometrie "} + if {$XLock_info!=""} {append linecommand "-info $XLock_info "} +#check actions + if { $XLock_mono == 1 } {append linecommand "-mono "} + if { $install == 1 } {append linecommand "+install "} + if { $sound == 1 } {append linecommand "+sound "} + if { $nolock == 1 } {append linecommand "-nolock "} + if { $remote == 1 } {append linecommand "-remote "} + if { $allowroot == 1 } {append linecommand "-allowroot "} + if { $enablesaver == 1 } {append linecommand "-enablesaver "} + if { $allowaccess == 1 } {append linecommand "-allowaccess "} + if { $grabmouse == 1 } {append linecommand "-grabmouse "} + if { $echokeys == 1 } {append linecommand "-echokeys "} + if { $usefirst == 1 } {append linecommand "-usefirst "} + append linecommand "-mode " + append linecommand [.listscrol.list get [eval .listscrol.list curselection]] + puts $linecommand + eval exec $linecommand +} + +proc load_ressource { } { + global XLock_invalid + global XLock_validate + global XLock_info + global XLock_program + +set filename "" + +openfilesel filename + +set f [ open $filename r ] +while { ! [eof $f ] } { + gets $f line + switch -regexp $line { + {^XLock\.[a-zA-Z]+:} { + if { [ regexp -nocase {\: $} tyty ]} { + } + regsub {^} $line "set " line2 + regsub {XLock\.} $line2 "XLock_" line3 + regsub {: } $line3 " \"" line4 + regsub {on$} $line4 "1" line5 + regsub {off$} $line4 "0" line5 + eval "$line5\"" + } + {^XLock\.[a-zA-Z]+\.[a-zA-Z]+:[ \t]*[a-zA-Z0-9]+$} { + regsub {^} $line "set " line2 + regsub {XLock\.} $line2 "XLock_" line3 + regsub {\.} $line3 "(" line4 + regsub {: } $line4 ") \"" line5 + eval "$line5\"" + } +} +} +} + +# Creation of GUI + +wm title . "xlock launcher" +. configure -cursor top_left_arrow +frame .menu -relief raised -borderwidth 1 +menubutton .menu.button -text "switches" -menu .menu.button.check +pack .menu -side top -fill x + +global XLock_mono +global sound +global install +global nolock +global remote +global allowroot +global enablesaver +global allowaccess +global grabmouses +global echokeys +global usefirst + +global usernom +global passmot +global geometrie +global icogeometrie +global XLock_info + +# Creation of GUI + +#Creation of menu +set fileressource "" + +menubutton .menu.buttonf -text "file" -menu .menu.buttonf.file +menu .menu.buttonf.file +set FILE .menu.buttonf.file +$FILE add command -label "Load ressource" -command "load_ressource" +$FILE add command -label "exit" -command "exit" + +menu .menu.button.check +set CHECK .menu.button.check + +#menu with les check buttons +$CHECK add check -label "mono" -variable XLock_mono +$CHECK add check -label "nolock" -variable nolock +$CHECK add check -label "remote" -variable remote +$CHECK add check -label "allowroot" -variable allowroot +$CHECK add check -label "enablesaver" -variable enablesaver +$CHECK add check -label "allowaccess" -variable allowaccess +$CHECK add check -label "grabmouse" -variable grabmouse +$CHECK add check -label "echokeys" -variable echokeys +$CHECK add check -label "usefirst" -variable usefirst +$CHECK add check -label "install" -variable install +$CHECK add check -label "sound" -variable sound + +menubutton .menu.button2 -text "options" -menu .menu.button2.options +menu .menu.button2.options +set OPTIONS .menu.button2.options +#les options +$OPTIONS add command -label "generals options" -command "mkEntry" +$OPTIONS add command -label "font to use for password prompt" -command "mkFont FONT" +$OPTIONS add command -label "font for a specific mode" -command "mkFont MFONT" + + +$OPTIONS add command -label "geometry options" -command "mkGeometry" +$OPTIONS add command -label "file options" -command "mkFileOption" +$OPTIONS add command -label "message options" -command "mkMessage" + +#Color +menubutton .menu.button4 -text "color" -menu .menu.button4.color +menu .menu.button4.color +set COLOR .menu.button4.color +#if {$tk_version < 4} then { +#$COLOR add command -label "foreground options for password" -command "mkColor FG" +#$COLOR add command -label "background options for password" -command "mkColor BG" +#} +#else { +$COLOR add command -label "foreground options for password" -command "tk_chooseColor" +$COLOR add command -label "background options for password" -command "tk_chooseColor" +#} +menubutton .menu.button3 -text "help" -menu .menu.button3.help +menu .menu.button3.help +set HELP .menu.button3.help +$HELP add command -label "about xlock" -command "Helpxlock" +$HELP add command -label "about author" -command "mkAuthor" + +pack .menu.buttonf .menu.button .menu.button2 .menu.button4 -side left +pack .menu.button3 -side right + +#--------------------------- +#creation de la liste +#--------------------------- +frame .listscrol -borderwidth 4 -relief ridge +set LISTSCROL .listscrol +scrollbar $LISTSCROL.scroll -relief sunken -command "$LISTSCROL.list yview" +listbox $LISTSCROL.list -yscroll "$LISTSCROL.scroll set" + +#--------------------------- +#insert all modes in list +#--------------------------- +$LISTSCROL.list insert 0 \ +$%LISTTCL + +pack $LISTSCROL.scroll -side right -fill y +pack $LISTSCROL.list -side left -expand yes -fill both +pack $LISTSCROL -fill both -expand yes + +frame .buttons -borderwidth 4 -relief ridge +set BUTTON .buttons +button $BUTTON.launch -text "Launch" -command "Affopts 0" +button $BUTTON.launchinW -text "Launch in Window" -command "Affopts 1" +button $BUTTON.launchinR -text "Launch in Root" -command "Affopts 2" +button $BUTTON.quit -text Quit -command "exit" +pack $BUTTON.launch $BUTTON.launchinW $BUTTON.launchinR -side left +pack $BUTTON.quit -side right +pack $BUTTON -fill x -side bottom + diff --git a/etc/genlauncher/lex.yy.c b/etc/genlauncher/lex.yy.c new file mode 100644 index 00000000..e2994145 --- /dev/null +++ b/etc/genlauncher/lex.yy.c @@ -0,0 +1,1619 @@ +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +#define YY_FLEX_LEX_COMPAT +extern int yylineno; +int yylineno = 1; +extern char yytext[]; + + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + if ( yyleng + yy_more_offset >= YYLMAX ) \ + YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ + yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \ + yyleng += yy_more_offset; \ + yy_prev_more_offset = yy_more_offset; \ + yy_more_offset = 0; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 5 +#define YY_END_OF_BUFFER 6 +static yyconst short int yy_acclist[8] = + { 0, + 6, 5, 5, 3, 4, 1, 2 + } ; + +static yyconst short int yy_accept[30] = + { 0, + 1, 1, 1, 2, 3, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 5, 6, 6, 6, 7, 8, 8 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 4, 5, 6, 1, 1, 7, + 1, 1, 8, 9, 1, 10, 11, 1, 12, 1, + 1, 1, 13, 14, 1, 15, 1, 16, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[17] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[30] = + { 0, + 33, 32, 33, 36, 29, 21, 22, 16, 14, 0, + 23, 18, 13, 18, 8, 17, 7, 10, 15, 5, + 9, 36, 36, 0, 0, 36, 36, 36, 0 + } ; + +static yyconst short int yy_def[30] = + { 0, + 29, 29, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 0, 28 + } ; + +static yyconst short int yy_nxt[53] = + { 0, + 4, 28, 28, 28, 28, 28, 27, 28, 11, 12, + 13, 28, 28, 14, 28, 26, 25, 24, 23, 22, + 21, 20, 19, 18, 17, 16, 15, 10, 9, 8, + 7, 6, 28, 5, 5, 3, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28 + } ; + +static yyconst short int yy_chk[53] = + { 0, + 29, 0, 0, 0, 0, 0, 25, 0, 10, 10, + 10, 0, 0, 10, 0, 24, 21, 20, 19, 18, + 17, 16, 15, 14, 13, 12, 11, 9, 8, 7, + 6, 5, 3, 2, 1, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +static int yy_more_offset = 0; +static int yy_prev_more_offset = 0; +#define yymore() (yy_more_offset = yy_flex_strlen( yytext )) +#define YY_NEED_STRLEN +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET \ + { \ + yy_more_offset = yy_prev_more_offset; \ + yyleng -= yy_more_offset; \ + } +#ifndef YYLMAX +#define YYLMAX 8192 +#endif + +char yytext[YYLMAX]; +char *yytext_ptr; +#line 1 "xlockgen.lex" +#define INITIAL 0 +#line 2 "xlockgen.lex" +#include +#include +#include "lmode.h" +char *Begin="\""; +char *Sep="\","; +char *End="\""; +#line 418 "lex.yy.c" + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 10 "xlockgen.lex" + +#line 571 "lex.yy.c" + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 29 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 36 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 11 "xlockgen.lex" +{int i; + int numprocs = sizeof (LockProcs) / sizeof (LockProcs[0]); + for (i=0;iyy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 29 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 29 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 28); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + if ( c == '\n' ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 58 "xlockgen.lex" + +main(int argc,char *argv[]) +{ +yylex(); +} + diff --git a/etc/genlauncher/lmode.h b/etc/genlauncher/lmode.h new file mode 100644 index 00000000..b73292cd --- /dev/null +++ b/etc/genlauncher/lmode.h @@ -0,0 +1,375 @@ +/*- + * @(#)mode.h 4.00 97/01/01 xlockmore + * + * mode.h - mode management for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * + * Changes maintained by David Bagley + * 18-Mar-96: Ron Hitchens + * Extensive revision to define new data types for + * the new mode calling scheme. + * 02-Jun-95: Extracted out of resource.c. + * + */ + +/*- + * Declare external interface routines for supported screen savers. + */ + +/* -------------------------------------------------------------------- */ + +#define USE_XPM +#define USE_GL +#define USE_UNSTABLE +#define USE_BOMB + +typedef struct { + int dummy; +} ModeSpecOpt; + +struct LockStruct_s; +struct ModeInfo_s; + +typedef void (ModeHook) (struct ModeInfo_s *); +typedef void (HookProc) (struct LockStruct_s *, struct ModeInfo_s *); + +typedef struct LockStruct_s { + char *cmdline_arg; /* mode name */ +#if 0 + char *init_hook; /* func to init a mode */ + char *callback_hook; /* func to run (tick) a mode */ + char *release_hook; /* func to shutdown a mode */ + char *refresh_hook; /* tells mode to repaint */ + char *change_hook; /* user wants mode to change */ + char *unused_hook; /* for future expansion */ + ModeSpecOpt *msopt; /* this mode's def resources */ +#endif + int def_delay; /* default delay for mode */ + int def_count; + int def_cycles; + int def_size; + int def_ncolors; + float def_saturation; + char *def_bitmap; + char *desc; /* text description of mode */ + unsigned int flags; /* state flags for this mode */ + void *userdata; /* for use by the mode */ + char *define; +} LockStruct; + +LockStruct LockProcs[] = +{ + {"ant", + 1000, -3, 40000, -7, 64, 1.0, "", + "Shows Langton's and Turk's generalized ants", 0, NULL, NULL}, +#ifdef USE_GL + {"atlantis", + 1000, 4, 100, 6000, 64, 1.0, "", + "Shows moving sharks/whales/dolphin", 0, NULL, "#ifdef USE_GL"}, +#endif + {"ball", + 10000, 10, 20, -100, 64, 1.0, "", + "Shows bouncing balls", 0, NULL, NULL}, + {"bat", + 100000, -8, 1, 0, 64, 1.0, "", + "Shows bouncing flying bats", 0, NULL, NULL}, + {"blot", + 200000, 6, 30, 1, 64, 0.3, "", + "Shows Rorschach's ink blot test", 0, NULL, NULL}, + {"bouboule", + 10000, 100, 1, 15, 64, 1.0, "", + "Shows Mimi's bouboule of moving stars", 0, NULL, NULL}, + {"bounce", + 5000, -10, 1, 0, 64, 1.0, "", + "Shows bouncing footballs", 0, NULL, NULL}, + {"braid", + 1000, 15, 100, -7, 64, 1.0, "", + "Shows random braids and knots", 0, NULL, NULL}, + {"bubble", + 100000, 25, 1, 100, 64, 0.6, "", + "Shows popping bubbles", 0, NULL, NULL}, +#ifdef USE_GL + {"bubble3d", + 1000, 1, 2, 1, 64, 1.0, "", + "Richard Jones's GL bubbles", 0, NULL, NULL}, +#endif + {"bug", + 75000, 10, 32767, -4, 64, 1.0, "", + "Shows Palmiter's bug evolution and garden of Eden", 0, NULL, NULL}, +#ifdef USE_GL + {"cage", + 1000, 1, 1, 1, 64, 1.0, "", + "Shows the Impossible Cage, an Escher-like GL scene", 0, NULL, "#ifdef USE_GL"}, +#endif +#if defined( USE_XPM ) || defined( USE_XPMINC ) + {"cartoon", + 10000, 1, 1, 1, 64, 1.0, "", + "Shows bouncing cartoons", 0, NULL, "#if defined( USE_XPM ) || defined( USE_XPMINC )"}, +#endif + {"clock", + 100000, -16, 200, -200, 64, 1.0, "", + "Shows Packard's clock", 0, NULL, NULL}, + {"coral", + 60000, -3, 1, 35, 64, 0.6, "", + "Shows a coral reef", 0, NULL, NULL}, + {"crystal", + 60000, -500, 200, -15, 64, 1.0, "", + "Shows polygons in 2D plane groups", 0, NULL, NULL}, + {"daisy", + 100000, 300, 350, 1, 64, 1.0, "", + "Shows a meadow of daisies", 0, NULL, NULL}, + {"dclock", + 10000, 1, 10000, 1, 64, 0.3, "", + "Shows a floating digital clock", 0, NULL, NULL}, + {"deco", + 1000000, -30, 2, -10, 64, 0.6, "", + "Shows art as ugly as sin", 0, NULL, NULL}, + {"demon", + 50000, 0, 1000, -7, 64, 1.0, "", + "Shows Griffeath's cellular automata", 0, NULL, NULL}, + {"dilemma", + 200000, -2, 1000, 0, 64, 1.0, "", + "Shows Lloyd's Prisoner's Dilemma simulation", 0, NULL, NULL}, + {"discrete", + 1000, 4096, 2500, 1, 64, 1.0, "", + "Shows various discrete maps", 0, NULL, NULL}, + {"drift", + 10000, 30, 1, 1, 64, 1.0, "", + "Shows cosmic drifting flame fractals", 0, NULL, NULL}, + {"eyes", + 20000, -8, 5, 1, 64, 1.0, "", + "Shows eyes following a bouncing grelb", 0, NULL, NULL}, + {"fadeplot", + 30000, 10, 1500, 1, 64, 0.6, "", + "Shows a fading plot of sine squared", 0, NULL, NULL}, + {"flag", + 50000, 1, 1000, -7, 64, 1.0, "", + "Shows a waving flag of your operating system", 0, NULL, NULL}, + {"flame", + 750000, 20, 10000, 1, 64, 1.0, "", + "Shows cosmic flame fractals", 0, NULL, NULL}, + {"flow", + 1000, 1024, 3000, 1, 64, 1.0, "", + "Shows dynamic strange attractors", 0, NULL, NULL}, + {"forest", + 400000, 100, 200, 1, 64, 1.0, "", + "Shows binary trees of a fractal forest", 0, NULL, NULL}, + {"galaxy", + 100, -5, 250, -3, 64, 1.0, "", + "Shows crashing spiral galaxies", 0, NULL, NULL}, +#ifdef USE_GL + {"gears", + 1000, 1, 2, 1, 64, 1.0, "", + "Shows GL's gears", 0, NULL, "#ifdef USE_GL"}, +#endif + {"goop", + 10000, -12, 1, 1, 64, 1.0, "", + "Shows goop from a lava lamp", 0, NULL, NULL}, + {"grav", + 10000, -12, 1, 1, 64, 1.0, "", + "Shows orbiting planets", 0, NULL, NULL}, + {"helix", + 25000, 1, 100, 1, 64, 1.0, "", + "Shows string art", 0, NULL, NULL}, + {"hop", + 10000, 1000, 2500, 1, 64, 1.0, "", + "Shows real plane iterated fractals", 0, NULL, NULL}, + {"hyper", + 100000, -6, 300, 1, 64, 1.0, "", + "Shows spinning n-dimensional hypercubes", 0, NULL, NULL}, + {"ico", + 100000, 0, 400, 0, 64, 1.0, "", + "Shows a bouncing polyhedron", 0, NULL, NULL}, + {"ifs", + 1000, 1, 1, 1, 64, 1.0, "", + "Shows a modified iterated function system", 0, NULL, NULL}, + {"image", + 2000000, -10, 1, 1, 64, 1.0, "", + "Shows randomly appearing logos", 0, NULL, NULL}, + {"julia", + 10000, 1000, 20, 1, 64, 1.0, "", + "Shows the Julia set", 0, NULL, NULL}, + {"kaleid", + 80000, 4, 40, -9, 64, 0.6, "", + "Shows a kaleidoscope", 0, NULL, NULL}, + {"kumppa", + 10000, 1, 1, 1, 64, 1.0, "", + "Shows kumppa", 0, NULL, NULL}, + {"laser", + 20000, -10, 200, 1, 64, 1.0, "", + "Shows spinning lasers", 0, NULL, NULL}, + {"life", + 750000, 40, 140, 0, 64, 1.0, "", + "Shows Conway's game of Life", 0, NULL, NULL}, + {"life1d", + 10000, 1, 10, 0, 64, 1.0, "", + "Shows Wolfram's game of 1D Life", 0, NULL, NULL}, + {"life3d", + 1000000, 35, 85, 1, 64, 1.0, "", + "Shows Bays' game of 3D Life", 0, NULL, NULL}, + {"lightning", + 10000, 1, 1, 1, 64, 0.6, "", + "Shows Keith's fractal lightning bolts", 0, NULL, NULL}, + {"lisa", + 25000, 1, 256, -1, 64, 1.0, "", + "Shows animated lisajous loops", 0, NULL, NULL}, + {"lissie", + 10000, 1, 2000, -200, 64, 0.6, "", + "Shows lissajous worms", 0, NULL, NULL}, + {"loop", + 100000, 1, 1600, -12, 64, 1.0, "", + "Shows Langton's self-producing loops", 0, NULL, NULL}, + {"mandelbrot", + 25000, -8, 20000, 1, 64, 1.0, "", + "Shows mandelbrot sets", 0, NULL, NULL}, + {"marquee", + 100000, 1, 1, 1, 64, 1.0, "", + "Shows messages", 0, NULL, NULL}, + {"maze", + 1000, 1, 3000, -40, 64, 1.0, "", + "Shows a random maze and a depth first search solution", 0, NULL, NULL}, +#ifdef USE_GL + {"moebius", + 1000, 1, 1, 1, 64, 1.0, "", + "Shows Moebius Strip II, an Escher-like GL scene with ants", 0, NULL, "#ifdef USE_GL"}, + {"morph3d", + 1000, 0, 1, 1, 64, 1.0, "", + "Shows GL morphing polyhedra", 0, NULL, "#ifdef USE_GL"}, +#endif + {"mountain", + 1000, 30, 4000, 1, 64, 1.0, "", + "Shows Papo's mountain range", 0, NULL, NULL}, + {"munch", + 5000, 1, 7, 1, 64, 1.0, "", + "Shows munching squares", 0, NULL, NULL}, + {"nose", + 100000, 1, 1, 1, 64, 1.0, "", + "Shows a man with a big nose runs around spewing out messages", 0, NULL, NULL}, + {"pacman", + 100000, 10, 1, 0, 64, 1.0, "", + "Shows Pacman(tm)", 0, NULL, NULL}, + {"penrose", + 10000, 1, 1, -40, 64, 1.0, "", + "Shows Penrose's quasiperiodic tilings", 0, NULL, NULL}, + {"petal", + 10000, -500, 400, 1, 64, 1.0, "", + "Shows various GCD Flowers", 0, NULL, NULL}, +#ifdef USE_GL + {"pipes", + 1000, 2, 5, 500, 64, 1.0, "", + "Shows a selfbuilding pipe system", 0, NULL, "#ifdef USE_GL"}, +#endif + {"puzzle", + 10000, 250, 1, 1, 64, 1.0, "", + "Shows a puzzle being scrambled and then solved", 0, NULL, NULL}, + {"pyro", + 15000, 100, 1, -3, 64, 1.0, "", + "Shows fireworks", 0, NULL, NULL}, + {"qix", + 30000, -5, 32, 1, 64, 1.0, "", + "Shows spinning lines a la Qix(tm)", 0, NULL, NULL}, + {"roll", + 100000, 25, 1, -64, 64, 0.6, "", + "Shows a rolling ball", 0, NULL, NULL}, + {"rotor", + 10000, 4, 20, -6, 64, 0.3, "", + "Shows Tom's Roto-Rooter", 0, NULL, NULL}, +#ifdef USE_GL + {"rubik", + 10000, -30, 5, -6, 64, 1.0, "", + "Shows an auto-solving Rubik's Cube", 0, NULL, "#ifdef USE_GL"}, +#endif + {"shape", + 10000, 100, 256, 1, 64, 1.0, "", + "Shows stippled rectangles, ellipses, and triangles", 0, NULL, NULL}, + {"sierpinski", + 400000, 2000, 100, 1, 64, 1.0, "", + "Shows Sierpinski's triangle", 0, NULL, NULL}, + {"slip", + 50000, 35, 50, 1, 64, 1.0, "", + "Shows slipping blits", 0, NULL, NULL}, + {"sphere", + 5000, 1, 20, 0, 64, 1.0, "", + "Shows a bunch of shaded spheres", 0, NULL, NULL}, + {"spiral", + 5000, -40, 350, 1, 64, 1.0, "", + "Shows a helical locus of points", 0, NULL, NULL}, + {"spline", + 30000, -6, 2048, 1, 64, 0.3, "", + "Shows colorful moving splines", 0, NULL, NULL}, +#ifdef USE_GL + {"sproingies", + 1000, 5, 0, 400, 64, 1.0, "", + "Shows Sproingies! Nontoxic. Safe for pets and small children", 0, NULL, "#ifdef USE_GL"}, + {"stairs", + 200000, 0, 1, 1, 64, 1.0, "", +"Shows some Infinite Stairs, an Escher-like scene", 0, NULL, "#ifdef USE_GL"}, +#endif + {"star", + 75000, 100, 1, 100, 64, 0.3, "", + "Shows a star field with a twist", 0, NULL, NULL}, + {"starfish", + 10000, 1, 1, 1, 64, 1.0, "", + "Shows starfish", 0, NULL, NULL}, + {"strange", + 1000, 1, 1, 1, 64, 1.0, "", + "Shows strange attractors", 0, NULL, NULL}, +#ifdef USE_GL + {"superquadrics", + 1000, 25, 40, 1, 64, 1.0, "", + "Shows 3D mathematical shapes", 0, NULL, "#ifdef USE_GL"}, +#endif + {"swarm", + 15000, 100, 1, 1, 64, 1.0, "", + "Shows a swarm of bees following a wasp", 0, NULL, NULL}, + {"swirl", + 5000, 5, 1, 1, 64, 1.0, "", + "Shows animated swirling patterns", 0, NULL, NULL}, + {"tetris", + 50000, 1, 1, 0, 64, 1.0, "", + "Shows tetris", 0, NULL, NULL}, + {"thornbird", + 1000, 800, 16, 1, 64, 1.0, "", + "Shows an animated bird in a thorn bush fractal map", 0, NULL, NULL}, + {"triangle", + 10000, 1, 1, 1, 64, 1.0, "", + "Shows a triangle mountain range", 0, NULL, NULL}, + {"tube", + 25000, -9, 20000, -200, 64, 1.0, "", + "Shows an animated tube", 0, NULL, NULL}, + {"turtle", + 1000000, 1, 20, 1, 64, 1.0, "", + "Shows turtle fractals", 0, NULL, NULL}, + {"vines", + 200000, 0, 1, 1, 64, 1.0, "", + "Shows fractals", 0, NULL, NULL}, + {"voters", + 1000, 0, 327670, 0, 64, 1.0, "", + "Shows Dewdney's Voters", 0, NULL, NULL}, + {"wator", + 750000, 1, 32767, 0, 64, 1.0, "", + "Shows Dewdney's Water-Torus planet of fish and sharks", 0, NULL, NULL}, + {"wire", + 500000, 1000, 150, -8, 64, 1.0, "", + "Shows a random circuit with 2 electrons", 0, NULL, NULL}, + {"world", + 100000, -16, 1, 1, 64, 0.3, "", + "Shows spinning Earths", 0, NULL, NULL}, + {"worm", + 17000, -20, 10, -3, 64, 1.0, "", + "Shows wiggly worms", 0, NULL, NULL}, + {"xjack", + 50000, 1, 1, 1, 64, 1.0, "", + "Shows Jack having one of those days", 0, NULL, NULL}, + +/* SPECIAL MODES */ + {"blank", + 3000000, 1, 1, 1, 64, 1.0, "", + "Shows nothing but a black screen", 0, NULL, NULL} + +}; diff --git a/etc/genlauncher/make.launcher b/etc/genlauncher/make.launcher new file mode 100755 index 00000000..5c503908 --- /dev/null +++ b/etc/genlauncher/make.launcher @@ -0,0 +1,43 @@ +#/bin/sh +if test -f xlockgen +then + echo "xlockgen is present ok" + echo " Make the xlock.tcl in two passes " + if test -f ../xlock.tcl + then + cat etc.xlock.tcl | ./xlockgen > /tmp/xlock.tcl + echo " first pass " + cp ../xlock.tcl /tmp/etc.xlock.tcl.old + cp /tmp/xlock.tcl ../xlock.tcl + echo " two pass ok" + else + echo etc.xlock.tcl missing error ? + fi + echo " Make the modes of xmlock.c in two passes " + #if test -f ../../xmlock/modes.h + if test -f xmlock.modes.tpl + then + # cat ../../xmlock/modes.h | ./xlockgen > /tmp/modes + cat xmlock.modes.tpl | ./xlockgen > /tmp/modes + echo " first pass " + #cp ../../xmlock/modes.h /tmp/xmlock.modes.h.old + cp xmlock.modes.tpl /tmp/xmlock.modes.h.old + cp /tmp/modes ../../xmlock/modes.h + echo " two pass ok you could build xmlock" + else + echo xmlock.modes.tpl missing error ? + fi + echo " Make the modes of xalock.c in two pass " + if test -f xalock.modes.tpl + then + cat xalock.modes.tpl | ./xlockgen > /tmp/modes + echo " first pass " +# cp ../../xalock/modes.h /tmp/xalock.modes.h.old + cp /tmp/modes ../../xalock/modes.h + echo " two pass ok you could build xalock" + else + echo xalock.modes.tpl missing error ? + fi +else + echo "xlockgen is not present, please compile it" +fi diff --git a/etc/genlauncher/xalock.modes.tpl b/etc/genlauncher/xalock.modes.tpl new file mode 100644 index 00000000..2e9e50cc --- /dev/null +++ b/etc/genlauncher/xalock.modes.tpl @@ -0,0 +1,12 @@ +static char *LockProcs[] = +{ +$%LISTLIBSX +#ifdef USE_BOMB +"bomb", +"random" +#else +"random" +#endif +}; + +static int numprocs = sizeof (LockProcs) / sizeof (LockProcs[0]); diff --git a/etc/genlauncher/xlockgen.lex b/etc/genlauncher/xlockgen.lex new file mode 100644 index 00000000..62d066bc --- /dev/null +++ b/etc/genlauncher/xlockgen.lex @@ -0,0 +1,63 @@ +%{ +#include +#include +#include "lmode.h" +char *Begin="\""; +char *Sep="\","; +char *End="\""; +%} + +%% +"$%LISTLIBSX" {int i; + int numprocs = sizeof (LockProcs) / sizeof (LockProcs[0]); + for (i=0;id1`Yr$BIa_XZZ@#zZH(Sdi uk7>_3m%Tc*?H%{=Pd?YbX*~IL?)yJ}9XJUBvAKM*h|Hh#5fQ3``b1{VPwu1URG-U&3p8UP+vE2aPd literal 0 HcmV?d00001 diff --git a/etc/gif/ukflag.gif b/etc/gif/ukflag.gif new file mode 100644 index 0000000000000000000000000000000000000000..2c74822cf6a5f94c384ab8101f6f812c1c3aa96f GIT binary patch literal 182 zcmV;n07?HxNk%v~VJH9?0Pz3-|NsBHL_|bHy8r+HEC2ui04M+$0007y41S`^7jFQY z3PAgiq!s7QIiIJ2jTdnOiL7igi613v&1ElgdXJ|50_|Wf95G}}3^zelEV!(-oU|lL zdVH3)B}jw|MtR5NviXcotJmzd`+W|Fy>hTqgQMd!R2m|wx5v{b$aE#q#dr5N)1e0> k6~bun^axpV5?P7k7g?yXBsn=r33|9#!?|c_`d0t|I|uJfMF0Q* literal 0 HcmV?d00001 diff --git a/etc/glider.3dlife b/etc/glider.3dlife new file mode 100644 index 00000000..546110e3 --- /dev/null +++ b/etc/glider.3dlife @@ -0,0 +1,8 @@ +#P -2 -2 -1 +.**. +*..* +*..* + +.... +.**. +.**. diff --git a/etc/glider.hlife b/etc/glider.hlife new file mode 100644 index 00000000..debccb26 --- /dev/null +++ b/etc/glider.hlife @@ -0,0 +1,7 @@ +#P -2 -2 + . . O . + . . . O + O . . O + . . . O +. . . O + diff --git a/etc/glider.life b/etc/glider.life new file mode 100644 index 00000000..03c4c8a8 --- /dev/null +++ b/etc/glider.life @@ -0,0 +1,4 @@ +#P -1 -1 +*** +..* +.*. diff --git a/etc/play.sh b/etc/play.sh new file mode 100755 index 00000000..83c0a1aa --- /dev/null +++ b/etc/play.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cat $1 > /dev/audio diff --git a/etc/rplay.conf b/etc/rplay.conf new file mode 100644 index 00000000..859b8eba --- /dev/null +++ b/etc/rplay.conf @@ -0,0 +1,4 @@ +/usr/local/sounds/complete.au +/usr/local/sounds/identify-please.au +/usr/local/sounds/not-programmed.au +/usr/local/sounds/thank-you.au diff --git a/etc/rplay.hosts b/etc/rplay.hosts new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/etc/rplay.hosts @@ -0,0 +1 @@ +* diff --git a/etc/rplay.servers b/etc/rplay.servers new file mode 100644 index 00000000..060fcae4 --- /dev/null +++ b/etc/rplay.servers @@ -0,0 +1 @@ +*:rwx diff --git a/etc/showmodes.sh b/etc/showmodes.sh new file mode 100755 index 00000000..e768c98a --- /dev/null +++ b/etc/showmodes.sh @@ -0,0 +1,29 @@ +#!/bin/ksh + +# or /bin/bash + +# Simple script to look all xlock modes supported. +# +# 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. +# +# xlock-show-modes Copyright (C) 1998 Andrea Arcangeli +# by Andrea Arcangeli +# +# Does not work on my Sun (DAB) +function listmodes +{ + xlock --help 2>&1 | \ + awk '{ if (!true && match ($0,"-mode")) { gsub(/.*-mode/, ""); gsub(/\| /, ""); gsub("^ +", ""); printf("%s ", $0); true = 1 } else { if (true && /\|/) { gsub(/\| /, ""); gsub("^ +", ""); gsub("\]$", ""); printf("%s ", $0) } } }' +} + +for i in `listmodes`; do echo Trying mode $i; xlock -nolock -mode $i; done diff --git a/etc/system.fvwm2rc.xlock b/etc/system.fvwm2rc.xlock new file mode 100644 index 00000000..e29502ab --- /dev/null +++ b/etc/system.fvwm2rc.xlock @@ -0,0 +1,396 @@ +# Add this to your system or personal menu file +# System: /usr/lib/X11/fvwm2/system.fvwm2rc +# Personal $HOME/.fvwm2rc +# Put this in your "Utilities" uncommented. +# + "Lock_Saver" Menu Lock_Saver Close + +AddToMenu "Automata-Lock" ++ "Automata-Lock" Title ++ "Ant" Exec xlock -mode ant -neighbors 4 +truchet ++ "Ant Truchet" Exec xlock -mode ant -neighbors 4 -truchet ++ "Bee" Exec xlock -mode ant -neighbors 6 +truchet ++ "Bee Truchet" Exec xlock -mode ant -neighbors 6 -truchet ++ "Bug" Exec xlock -mode bug ++ "Demon" Exec xlock -mode demon ++ "Dilemma" Exec xlock -mode dilemma ++ "Life" Exec xlock -mode life ++ "Life Callahan" Exec xlock -mode life -callahan -size 7 ++ "Life1d" Exec xlock -mode life1d ++ "Life3d" Exec xlock -mode life3d ++ "Loop" Exec xlock -mode loop ++ "Voters" Exec xlock -mode voters ++ "Wator" Exec xlock -mode wator ++ "Wire" Exec xlock -mode wire ++ "Random" Exec xlock -mode random -modelist allautomata -fullrandom -neighbors 0 + +AddToMenu "Fractal-Lock" ++ "Fractal-Lock" Title ++ "Coral" Exec xlock -mode coral ++ "Discrete" Exec xlock -mode discrete ++ "Drift" Exec xlock -mode drift -fullrandom ++ "Flame" Exec xlock -mode flame ++ "Flow" Exec xlock -mode flow ++ "Forest" Exec xlock -mode forest ++ "Hop" Exec xlock -mode hop -fullrandom ++ "IFS" Exec xlock -mode ifs ++ "Julia" Exec xlock -mode julia +mouse ++ "Juliaptr" Exec xlock -mode julia -mouse ++ "Kumppa" Exec xlock -mode kumppa ++ "Lightning" Exec xlock -mode lightning ++ "Mandelbrot" Exec xlock -mode mandelbrot -install ++ "Mountain" Exec xlock -mode mountain ++ "Sierpinski" Exec xlock -mode sierpinski ++ "Strange" Exec xlock -mode strange ++ "Thornbird" Exec xlock -mode thornbird ++ "Triangle" Exec xlock -mode triangle ++ "Turtle" Exec xlock -mode turtle ++ "Vines" Exec xlock -mode vines ++ "Random" Exec xlock -mode random -modelist allfractal -fullrandom + +AddToMenu "Geometry-Lock" ++ "Geometry-Lock" Title ++ "Braid" Exec xlock -mode braid ++ "Fadeplot" Exec xlock -mode fadeplot ++ "Helix" Exec xlock -mode helix -fullrandom ++ "Hyper" Exec xlock -mode hyper ++ "Ico" Exec xlock -mode ico ++ "Kaleid" Exec xlock -mode kaleid ++ "Laser" Exec xlock -mode laser ++ "Lisa" Exec xlock -mode lisa ++ "Lissie" Exec xlock -mode lissie ++ "Penrose" Exec xlock -mode penrose +ammann ++ "Penrose Ammann" Exec xlock -mode penrose -ammann ++ "Petal" Exec xlock -mode petal ++ "Qix" Exec xlock -mode qix +complete ++ "Qix complete" Exec xlock -mode qix -complete ++ "Rotor" Exec xlock -mode rotor ++ "Shape" Exec xlock -mode shape ++ "Sphere" Exec xlock -mode sphere ++ "Spiral" Exec xlock -mode spiral ++ "Spline" Exec xlock -mode spline ++ "Random" Exec xlock -mode random -modelist allgeometry -fullrandom + +AddToMenu "Space-Lock" ++ "Space-Lock" Title ++ "Bouboule" Exec xlock -mode bouboule +use3d ++ "Bouboule3d" Exec xlock -mode bouboule -use3d ++ "Galaxy" Exec xlock -mode galaxy ++ "Grav" Exec xlock -mode grav +trail +decay ++ "Grav Trail" Exec xlock -mode grav -trail ++ "Grav Decay" Exec xlock -mode grav -decay ++ "Rock" Exec xlock -mode star -rock ++ "Star" Exec xlock -mode star +rock +use3d +trek 0 ++ "Star3d" Exec xlock -mode star -use3d ++ "Star Trek" Exec xlock -mode star -trek 100 ++ "World" Exec xlock -mode world ++ "Random Space" Exec xlock -mode random -modelist allspace + +AddToMenu "Assorted-Lock" ++ "Assorted-Lock" Title ++ "Ball" Exec xlock -mode ball ++ "Blot" Exec xlock -mode blot ++ "Bounce" Exec xlock -mode bounce ++ "Bubble" Exec xlock -mode bubble ++ "Clock" Exec xlock -mode clock ++ "Crystal" Exec xlock -mode crystal ++ "Daisy" Exec xlock -mode daisy ++ "Dclock" Exec xlock -mode dclock ++ "Deco" Exec xlock -mode deco ++ "Eyes" Exec xlock -mode eyes +mouse ++ "Eyesptr" Exec xlock -mode eyes -mouse ++ "Goop" Exec xlock -mode goop ++ "Marquee" Exec xlock -mode marquee ++ "Munch" Exec xlock -mode munch ++ "Nose" Exec xlock -mode nose ++ "Pacman" Exec xlock -mode pacman ++ "Pyro" Exec xlock -mode pyro +use3d ++ "Pyro3d" Exec xlock -mode pyro -use3d ++ "Roll" Exec xlock -mode roll ++ "Slip" Exec xlock -mode slip ++ "Starfish" Exec xlock -mode starfish -install ++ "Swarm" Exec xlock -mode swarm +mouse ++ "Swarmptr" Exec xlock -mode swarm -mouse ++ "Swirl" Exec xlock -mode swirl -install ++ "Tetris" Exec xlock -mode tetris ++ "Tube" Exec xlock -mode tube -install ++ "Worm" Exec xlock -mode worm +use3d ++ "Worm3d" Exec xlock -mode worm -use3d ++ "Xjack" Exec xlock -mode xjack + +AddToMenu "XPM-Lock" ++ "XPM-Lock" Title ++ "Bat" Exec xlock -mode bat ++ "Cartoon" Exec xlock -mode cartoon ++ "Image" Exec xlock -mode image ++ "Flag" Exec xlock -mode flag ++ "Life" Exec xlock -mode life ++ "Life1d" Exec xlock -mode life1d ++ "Maze" Exec xlock -mode maze ++ "Puzzle" Exec xlock -mode puzzle ++ "Random" Exec xlock -mode random -modelist allxpm -fullrandom + +AddToMenu "GL-Lock" ++ "GL-Lock" Title ++ "Atlantis" Exec xlock -mode atlantis ++ "Bubble3d" Exec xlock -mode bubble3d ++ "Cage" Exec xlock -mode cage ++ "Gears" Exec xlock -mode gears ++ "Moebius" Exec xlock -mode moebius ++ "Morph3d" Exec xlock -mode morph3d ++ "Pipes" Exec xlock -mode pipes ++ "Rubik" Exec xlock -mode rubik ++ "Sproingies" Exec xlock -mode sproingies ++ "Stairs" Exec xlock -mode stairs ++ "Superquadrics" Exec xlock -mode superquadrics ++ "Random" Exec xlock -mode random -modelist allgl -fullrandom + +AddToMenu "Marquee-Message-Lock" ++ "Message-Lock" Title ++ "Back Soon" Exec xlock -mode marquee -message "$LOGNAME will be back soon." ++ "Overnight" Exec xlock -mode marquee -message "$LOGNAME will be back in the morning." ++ "Rude" Exec xlock -mode marquee -message "$LOGNAME not here, please go away!" + +AddToMenu "Nose-Message-Lock" ++ "Message-Lock" Title ++ "Back Soon" Exec xlock -mode nose -message "$LOGNAME will be back soon." ++ "Overnight" Exec xlock -mode nose -message "$LOGNAME will be back in the morning." ++ "Rude" Exec xlock -mode nose -message "$LOGNAME not here, please go away!" + +AddToMenu "Xjack-Message-Lock" ++ "Xjack-Lock" Title ++ "Crazy Boy" Exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." ++ "Crazy Girl" Exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." + +AddToMenu "Special-Lock" ++ "Special-Lock" Title ++ "Blank" Exec xlock -mode blank ++ "Bomb" Exec xlock -mode bomb ++ "Random nice" Exec xlock -mode random -modelist allnice -fullrandom -neighbors 0 ++ "Random standard" Exec xlock -mode random -modelist all-allgl -fullrandom -neighbors 0 ++ "Random all" Exec xlock -mode random -modelist all -fullrandom -neighbors 0 ++ "Random 3d" Exec xlock -mode random -modelist all3d -use3d -fullrandom ++ "Random ptr" Exec xlock -mode random -modelist allmouse -mouse -fullrandom ++ "Random write" Exec xlock -mode random -modelist allwrite -install -fullrandom + +AddToMenu "Automata-Saver" ++ "Automata-Saver" Title ++ "Ant" Exec xlock -nolock -mode ant -neighbors 4 +truchet ++ "Ant Truchet" Exec xlock -nolock -mode ant -neighbors 4 -truchet ++ "Bee" Exec xlock -nolock -mode ant -neighbors 6 +truchet ++ "Bee Truchet" Exec xlock -nolock -mode ant -neighbors 6 -truchet ++ "Bug" Exec xlock -nolock -mode bug ++ "Demon" Exec xlock -nolock -mode demon ++ "Dilemma" Exec xlock -nolock -mode dilemma ++ "Life" Exec xlock -nolock -mode life ++ "Life Callahan" Exec xlock -nolock -mode life -callahan -size 7 ++ "Life1d" Exec xlock -nolock -mode life1d ++ "Life3d" Exec xlock -nolock -mode life3d ++ "Loop" Exec xlock -nolock -mode loop ++ "Voters" Exec xlock -nolock -mode voters ++ "Wator" Exec xlock -nolock -mode wator ++ "Wire" Exec xlock -nolock -mode wire ++ "Random" Exec xlock -nolock -mode random -modelist allautomata -fullrandom -neighbors 0 + +AddToMenu "Fractal-Saver" ++ "Fractal-Saver" Title ++ "Coral" Exec xlock -nolock -mode coral ++ "Discrete" Exec xlock -nolock -mode discrete ++ "Drift" Exec xlock -nolock -mode drift -fullrandom ++ "Flame" Exec xlock -nolock -mode flame ++ "Flow" Exec xlock -nolock -mode flow ++ "Forest" Exec xlock -nolock -mode forest ++ "Hop" Exec xlock -nolock -mode hop -fullrandom ++ "IFS" Exec xlock -nolock -mode ifs ++ "Julia" Exec xlock -nolock -mode julia +mouse ++ "Juliaptr" Exec xlock -nolock -mode julia -mouse ++ "Kumppa" Exec xlock -nolock -mode kumppa ++ "Lightning" Exec xlock -nolock -mode lightning ++ "Mandelbrot" Exec xlock -nolock -mode mandelbrot -install ++ "Mountain" Exec xlock -nolock -mode mountain ++ "Sierpinski" Exec xlock -nolock -mode sierpinski ++ "Strange" Exec xlock -nolock -mode strange ++ "Thornbird" Exec xlock -nolock -mode thornbird ++ "Triangle" Exec xlock -nolock -mode triangle ++ "Turtle" Exec xlock -nolock -mode turtle ++ "Vines" Exec xlock -nolock -mode vines ++ "Random" Exec xlock -nolock -mode random -modelist allfractal -fullrandom + +AddToMenu "Geometry-Saver" ++ "Geometry-Saver" Title ++ "Braid" Exec xlock -nolock -mode braid ++ "Fadeplot" Exec xlock -nolock -mode fadeplot ++ "Helix" Exec xlock -nolock -mode helix -fullrandom ++ "Hyper" Exec xlock -nolock -mode hyper ++ "Ico" Exec xlock -nolock -mode ico ++ "Kaleid" Exec xlock -nolock -mode kaleid ++ "Laser" Exec xlock -nolock -mode laser ++ "Lisa" Exec xlock -nolock -mode lisa ++ "Lissie" Exec xlock -nolock -mode lissie ++ "Penrose" Exec xlock -nolock -mode penrose +ammann ++ "Penrose Ammann" Exec xlock -nolock -mode penrose -ammann ++ "Petal" Exec xlock -nolock -mode petal ++ "Qix" Exec xlock -nolock -mode qix +complete ++ "Qix complete" Exec xlock -nolock -mode qix -complete ++ "Rotor" Exec xlock -nolock -mode rotor ++ "Shape" Exec xlock -nolock -mode shape ++ "Sphere" Exec xlock -nolock -mode sphere ++ "Spiral" Exec xlock -nolock -mode spiral ++ "Spline" Exec xlock -nolock -mode spline ++ "Random" Exec xlock -nolock -mode random -modelist allgeometry + +AddToMenu "Space-Saver" ++ "Space-Saver" Title ++ "Bouboule" Exec xlock -nolock -mode bouboule +use3d ++ "Bouboule3d" Exec xlock -nolock -mode bouboule -use3d ++ "Galaxy" Exec xlock -nolock -mode galaxy ++ "Grav" Exec xlock -nolock -mode grav +trail +decay ++ "Grav Trail" Exec xlock -nolock -mode grav -trail ++ "Grav Decay" Exec xlock -nolock -mode grav -decay ++ "Rock" Exec xlock -nolock -mode star -rock ++ "Star" Exec xlock -nolock -mode star +rock +use3d +trek 0 ++ "Star3d" Exec xlock -nolock -mode star -use3d ++ "Star Trek" Exec xlock -nolock -mode star -trek 100 ++ "World" Exec xlock -nolock -mode world ++ "Random Space" Exec xlock -nolock -mode random -modelist allspace + +AddToMenu "Assorted-Saver" ++ "Assorted-Saver" Title ++ "Ball" Exec xlock -nolock -mode ball ++ "Blot" Exec xlock -nolock -mode blot ++ "Bounce" Exec xlock -nolock -mode bounce ++ "Bubble" Exec xlock -nolock -mode bubble ++ "Clock" Exec xlock -nolock -mode clock ++ "Crystal" Exec xlock -nolock -mode crystal ++ "Daisy" Exec xlock -nolock -mode daisy ++ "Dclock" Exec xlock -nolock -mode dclock ++ "Deco" Exec xlock -nolock -mode deco ++ "Eyes" Exec xlock -nolock -mode eyes +mouse ++ "Eyesptr" Exec xlock -nolock -mode eyes -mouse ++ "Goop" Exec xlock -nolock -mode goop ++ "Marquee" Exec xlock -nolock -mode marquee ++ "Munch" Exec xlock -nolock -mode munch ++ "Nose" Exec xlock -nolock -mode nose ++ "Pacman" Exec xlock -nolock -mode pacman ++ "Pyro" Exec xlock -nolock -mode pyro +use3d ++ "Pyro3d" Exec xlock -nolock -mode pyro -use3d ++ "Roll" Exec xlock -nolock -mode roll ++ "Slip" Exec xlock -nolock -mode slip ++ "Starfish" Exec xlock -nolock -mode starfish -install ++ "Swarm" Exec xlock -nolock -mode swarm +mouse ++ "Swarmptr" Exec xlock -nolock -mode swarm -mouse ++ "Swirl" Exec xlock -nolock -mode swirl -install ++ "Tetris" Exec xlock -nolock -mode tetris ++ "Tube" Exec xlock -nolock -mode tube -install ++ "Worm" Exec xlock -nolock -mode worm +use3d ++ "Worm3d" Exec xlock -nolock -mode worm -use3d ++ "Xjack" Exec xlock -nolock -mode xjack + +AddToMenu "XPM-Saver" ++ "XPM-Saver" Title ++ "Bat" Exec xlock -nolock -mode bat ++ "Cartoon" Exec xlock -nolock -mode cartoon ++ "Image" Exec xlock -nolock -mode image ++ "Flag" Exec xlock -nolock -mode flag ++ "Life" Exec xlock -nolock -mode life ++ "Life1d" Exec xlock -nolock -mode life1d ++ "Maze" Exec xlock -nolock -mode maze ++ "Puzzle" Exec xlock -nolock -mode puzzle ++ "Random" Exec xlock -nolock -mode random -modelist allxpm -fullrandom + +AddToMenu "GL-Saver" ++ "GL-Saver" Title ++ "Atlantis" Exec xlock -nolock -mode atlantis ++ "Bubble3d" Exec xlock -nolock -mode bubble3d ++ "Cage" Exec xlock -nolock -mode cage ++ "Gears" Exec xlock -nolock -mode gears ++ "Moebius" Exec xlock -nolock -mode moebius ++ "Morph3d" Exec xlock -nolock -mode morph3d ++ "Pipes" Exec xlock -nolock -mode pipes ++ "Rubik" Exec xlock -nolock -mode rubik ++ "Sproingies" Exec xlock -nolock -mode sproingies ++ "Stairs" Exec xlock -nolock -mode stairs ++ "Superquadrics" Exec xlock -nolock -mode superquadrics ++ "Random" Exec xlock -nolock -mode random -modelist allgl -fullrandom + +AddToMenu "Marquee-Message-Saver" ++ "Marquee-Message" Title ++ "Brilliant!" Exec xlock -nolock -mode marquee -message "WOW! $LOGNAME, You're Brilliant!" ++ "Love You" Exec xlock -nolock -mode marquee -message "You know, I Love You $LOGNAME." ++ "Available" Exec xlock -nolock -mode marquee -message "Hey, I'm available now!" + +AddToMenu "Nose-Message-Saver" ++ "Nose-Message" Title ++ "Brilliant!" Exec xlock -nolock -mode nose -message "WOW! $LOGNAME, You're Brilliant!" ++ "Love You" Exec xlock -nolock -mode nose -message "You know, I Love You $LOGNAME." ++ "Available" Exec xlock -nolock -mode nose -message "Hey, I'm available now!" + +AddToMenu "Xjack-Message-Lock" ++ "Xjack-Lock" Title ++ "Crazy Boy" Exec xlock -nolock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." ++ "Crazy Girl" Exec xlock -nolock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." + +AddToMenu "Special-Saver" ++ "Special-Saver" Title ++ "Blank" Exec xlock -nolock -mode blank ++ "Bomb" Exec xlock -nolock -mode bomb ++ "Random nice" Exec xlock -nolock -mode random -modelist allnice -fullrandom -neighbors 0 ++ "Random standard" Exec xlock -nolock -mode random -modelist all-allgl -fullrandom -neighbors 0 ++ "Random all" Exec xlock -nolock -mode random -modelist all -fullrandom -neighbors 0 ++ "Random 3d" Exec xlock -nolock -mode random -modelist all3d -use3d -fullrandom ++ "Random ptr" Exec xlock -nolock -mode random -modelist allmouse -mouse -fullrandom ++ "Random write" Exec xlock -nolock -mode random -modelist allwrite -fullrandom + +AddToMenu Screenlock ++ "Screenlock" Title ++ "Cellular Automata" Menu Automata-Lock Close ++ "" Nop ++ "Fractal" Menu Fractal-Lock Close ++ "" Nop ++ "Geometry" Menu Geometry-Lock Close ++ "" Nop ++ "Space" Menu Space-Lock Close ++ "" Nop ++ "Assorted" Menu Assorted-Lock Close ++ "" Nop ++ "XPM" Menu XPM-Lock Close ++ "" Nop ++ "GL" Menu GL-Lock Close ++ "" Nop ++ "Marquee Message" Menu Marquee-Message-Lock Close ++ "" Nop ++ "Nose Message" Menu Nose-Message-Lock Close ++ "" Nop ++ "Xjack Message" Menu Xjack-Message-Lock Close ++ "" Nop ++ "Special" Menu Special-Lock Close + +AddToMenu Screensaver ++ "Screensaver" Title ++ "Cellular Automata" Menu Automata-Saver Close ++ "" Nop ++ "Fractal" Menu Fractal-Saver Close ++ "" Nop ++ "Geometry" Menu Geometry-Saver Close ++ "" Nop ++ "Space" Menu Space-Saver Close ++ "" Nop ++ "Assorted" Menu Assorted-Saver Close ++ "" Nop ++ "XPM" Menu XPM-Saver Close ++ "" Nop ++ "GL" Menu GL-Saver Close ++ "" Nop ++ "Marquee Message" Menu Marquee-Message-Saver Close ++ "" Nop ++ "Nose Message" Menu Nose-Message-Saver Close ++ "" Nop ++ "Xjack Message" Menu Xjack-Message-Saver Close ++ "" Nop ++ "Special" Menu Special-Saver Close + +AddToMenu "Lock_Saver" ++ "Lock_Saver" Title ++ "Screenlock" Menu Screenlock Close ++ "" Nop ++ "Screensaver" Menu Screensaver Close + diff --git a/etc/system.fvwmrc.xlock b/etc/system.fvwmrc.xlock new file mode 100644 index 00000000..ea41de7c --- /dev/null +++ b/etc/system.fvwmrc.xlock @@ -0,0 +1,421 @@ +# Add this to your system or personal menu file +# System: /usr/lib/X11/fvwm/system.fvwmrc +# Personal $HOME/.fvwmrc +# Put this in your "Utilities" uncommented. +# Popup "Lock_Saver" Lock_Saver +# This is for fvwm <=1.24r +# For -install to work right you must disable it before fvwm is compiled +# see README + +Popup "Automata-Lock" + Title "Automata-Lock" + Exec "Ant" exec xlock -mode ant -neighbors 4 +truchet & + Exec "Ant Truchet" exec xlock -mode ant -neighbors 4 -truchet & + Exec "Bee" exec xlock -mode ant -neighbors 6 +truchet & + Exec "Bee Truchet" exec xlock -mode ant -neighbors 6 -truchet & + Exec "Bug" exec xlock -mode bug & + Exec "Demon" exec xlock -mode demon & + Exec "Dilemma" exec xlock -mode dilemma & + Exec "Life" exec xlock -mode life & + Exec "Life Callahan" exec xlock -mode life -callahan -size 7 & + Exec "Life1d" exec xlock -mode life1d & + Exec "Life3d" exec xlock -mode life3d & + Exec "Loop" exec xlock -mode loop & + Exec "Voters" exec xlock -mode voters & + Exec "Wator" exec xlock -mode wator & + Exec "Wire" exec xlock -mode wire & + Exec "Random Automata" exec xlock -mode random -modelist allautomata -fullrandom -neighbors 0 & +EndPopup + +Popup "Fractal-Lock" + Title "Fractal-Lock" + Exec "Coral" exec xlock -mode coral & + Exec "Discrete" exec xlock -mode discrete & + Exec "Drift" exec xlock -mode drift -fullrandom & + Exec "Flame" exec xlock -mode flame & + Exec "Flow" exec xlock -mode flow & + Exec "Forest" exec xlock -mode forest & + Exec "Hop" exec xlock -mode hop -fullrandom & + Exec "IFS" exec xlock -mode ifs & + Exec "Julia" exec xlock -mode julia +mouse & + Exec "Juliaptr" exec xlock -mode julia -mouse & + Exec "Kumppa" exec xlock -mode kumppa & + Exec "Lightning" exec xlock -mode lightning & + Exec "Mandelbrot" exec xlock -mode mandelbrot -install & + Exec "Mountain" exec xlock -mode mountain & + Exec "Sierpinski" exec xlock -mode sierpinski & + Exec "Strange" exec xlock -mode strange & + Exec "Thornbird" exec xlock -mode thornbird & + Exec "Triangle" exec xlock -mode triangle & + Exec "Turtle" exec xlock -mode turtle & + Exec "Vines" exec xlock -mode vines & + Exec "Random Fractal" exec xlock -mode random -modelist allfractal -fullrandom & +EndPopup + +Popup "Geometry-Lock" + Title "Geometry-Lock" + Exec "Braid" exec xlock -mode braid & + Exec "Fadeplot" exec xlock -mode fadeplot & + Exec "Helix" exec xlock -mode helix -fullrandom & + Exec "Hyper" exec xlock -mode hyper & + Exec "Ico" exec xlock -mode ico & + Exec "Kaleid" exec xlock -mode kaleid & + Exec "Laser" exec xlock -mode laser & + Exec "Lisa" exec xlock -mode lisa & + Exec "Lissie" exec xlock -mode lissie & + Exec "Penrose" exec xlock -mode penrose +ammann & + Exec "Penrose Ammann" exec xlock -mode penrose -ammann & + Exec "Petal" exec xlock -mode petal & + Exec "Qix" exec xlock -mode qix +complete & + Exec "Qix complete" exec xlock -mode qix -complete & + Exec "Rotor" exec xlock -mode rotor & + Exec "Shape" exec xlock -mode shape & + Exec "Sphere" exec xlock -mode sphere & + Exec "Spiral" exec xlock -mode spiral & + Exec "Spline" exec xlock -mode spline & + Exec "Random Geometry" exec xlock -mode random -modelist allgeometry -fullrandom & +EndPopup + +Popup "Space-Lock" + Title "Space-Lock" + Exec "Bouboule" exec xlock -mode bouboule +use3d & + Exec "Bouboule3d" exec xlock -mode bouboule -use3d & + Exec "Galaxy" exec xlock -mode galaxy & + Exec "Grav" exec xlock -mode grav +trail +decay & + Exec "Grav Trail" exec xlock -mode grav -trail & + Exec "Grav Decay" exec xlock -mode grav -decay & + Exec "Rock" exec xlock -mode star -rock & + Exec "Star" exec xlock -mode star +rock +use3d -trek 0 & + Exec "Star3d" exec xlock -mode star -use3d & + Exec "Star Trek" exec xlock -mode star -trek 100 & + Exec "World" exec xlock -mode world & + Exec "Random Space" exec xlock -mode random -modelist allspace -fullrandom & +EndPopup + +Popup "Assorted-Lock" + Title "Assorted-Lock" + Exec "Ball" exec xlock -mode ball & + Exec "Blot" exec xlock -mode blot & + Exec "Bounce" exec xlock -mode bounce & + Exec "Bubble" exec xlock -mode bubble & + Exec "Clock" exec xlock -mode clock & + Exec "Crystal" exec xlock -mode crystal & + Exec "Daisy" exec xlock -mode daisy & + Exec "Dclock" exec xlock -mode dclock & + Exec "Deco" exec xlock -mode deco & + Exec "Eyes" exec xlock -mode eyes +mouse & + Exec "Eyesptr" exec xlock -mode eyes -mouse & + Exec "Goop" exec xlock -mode goop & + Exec "Marquee" exec xlock -mode marquee & + Exec "Munch" exec xlock -mode munch & + Exec "Nose" exec xlock -mode nose & + Exec "Pacman" exec xlock -mode pacman & + Exec "Pyro" exec xlock -mode pyro +use3d & + Exec "Pyro3d" exec xlock -mode pyro -use3d & + Exec "Roll" exec xlock -mode roll & + Exec "Slip" exec xlock -mode slip & + Exec "Starfish" exec xlock -mode starfish -install & + Exec "Swarm" exec xlock -mode swarm +mouse & + Exec "Swarmptr" exec xlock -mode swarm -mouse & + Exec "Swirl" exec xlock -mode swirl -install & + Exec "Tetris" exec xlock -mode tetris & + Exec "Tube" exec xlock -mode tube -install & + Exec "Worm" exec xlock -mode worm +use3d & + Exec "Worm3d" exec xlock -mode worm -use3d & + Exec "Xjack" exec xlock -mode xjack & +EndPopup + +Popup "XPM-Lock" + Exec "Bat" exec xlock -mode bat & + Exec "Cartoon" exec xlock -mode cartoon & + Exec "Image" exec xlock -mode image & + Exec "Flag" exec xlock -mode flag & + Exec "Life" exec xlock -mode life & + Exec "Life1d" exec xlock -mode life1d & + Exec "Maze" exec xlock -mode maze & + Exec "Puzzle" exec xlock -mode puzzle & + Exec "Random XPM" exec xlock -mode random -modelist allxpm -fullrandom & +EndPopup + +Popup "GL-Lock" + Exec "Atlantis" exec xlock -mode atlantis & + Exec "Bubble3d" exec xlock -mode bubble3d & + Exec "Cage" exec xlock -mode cage & + Exec "Gears" exec xlock -mode gears & + Exec "Moebius" exec xlock -mode moebius & + Exec "Morph3d" exec xlock -mode morph3d & + Exec "Pipes" exec xlock -mode pipes & + Exec "Rubik" exec xlock -mode rubik & + Exec "Sproingies" exec xlock -mode sproingies & + Exec "Stairs" exec xlock -mode stairs & + Exec "Superquadrics" exec xlock -mode superquadrics & + Exec "Random GL" exec xlock -mode random -modelist allgl -fullrandom & +EndPopup + +Popup "Marquee-Message-Lock" + Title "Marquee-Message-Lock" + Exec "Back Soon" exec xlock -mode marquee -message "$LOGNAME will be back soon." & + Exec "Overnight" exec xlock -mode marquee -message "$LOGNAME will be back in the morning." & + Exec "Rude" exec xlock -mode marquee -message "$LOGNAME not here, please go away! " & +EndPopup + +Popup "Nose-Message-Lock" + Title "Nose-Message-Lock" + Exec "Back Soon" exec xlock -mode nose -message "$LOGNAME will be back soon." + Exec "Overnight" exec xlock -mode nose -message "$LOGNAME will be back in the morning." & + Exec "Rude" exec xlock -mode nose -message "$LOGNAME not here, please go away! " & +EndPopup + +Popup "Xjack-Message-Lock" + Title "Xjack-Message-Lock" + Exec "Crazy Boy" exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + Exec "Crazy Girl" exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." & +EndPopup + +Popup "Special-Lock" + Title "Special-Lock" + Exec "Blank" exec xlock -mode blank & + Exec "Bomb" exec xlock -mode bomb & + Exec "Random nice" exec xlock -mode random -modelist allnice -fullrandom -neighbors 0 & + Exec "Random standard" exec xlock -mode random -modelist all-allgl -fullrandom -neighbors 0 & + Exec "Random all" exec xlock -mode random -modelist all -fullrandom -neighbors 0 & + Exec "Random 3d" exec xlock -mode random -modelist all3d -use3d -fullrandom & + Exec "Random ptr" exec xlock -mode random -modelist allmouse -mouse -fullrandom & + Exec "Random write" exec xlock -mode random -modelist allwrite -fullrandom & +EndPopup + +Popup "Screenlock" + Title "Screenlock" + Popup "Cellular Automata" Automata-Lock + Nop "" + Popup "Fractal" Fractal-Lock + Nop "" + Popup "Geometry" Geometry-Lock + Nop "" + Popup "Space" Space-Lock + Nop "" + Popup "Assorted" Assorted-Lock + Nop "" + Popup "XPM" XPM-Lock + Nop "" + Popup "GL" GL-Lock + Nop "" + Popup "Marquee Message" Marquee-Message-Lock + Nop "" + Popup "Nose Message" Nose-Message-Lock + Nop "" + Popup "Xjack Message" Xjack-Message-Lock + Nop "" + Popup "Special" Special-Lock +EndPopup + +Popup "Automata-Saver" + Title "Automata-Saver" + Exec "Ant" exec xlock -nolock -mode ant -neighbors 4 +truchet & + Exec "Ant Truchet" exec xlock -nolock -mode ant -neighbors 4 -truchet & + Exec "Bee" exec xlock -nolock -mode ant -neighbors 6 +truchet & + Exec "Bee Truchet" exec xlock -nolock -mode ant -neighbors 6 -truchet & + Exec "Bug" exec xlock -nolock -mode bug & + Exec "Demon" exec xlock -nolock -mode demon & + Exec "Dilemma" exec xlock -nolock -mode dilemma & + Exec "Life" exec xlock -nolock -mode life & + Exec "Life Callahan" exec xlock -nolock -mode life -callahan -size 7 & + Exec "Life1d" exec xlock -nolock -mode life1d & + Exec "Life3d" exec xlock -nolock -mode life3d & + Exec "Loop" exec xlock -nolock -mode loop & + Exec "Voters" exec xlock -nolock -mode voters & + Exec "Wator" exec xlock -nolock -mode wator & + Exec "Wire" exec xlock -nolock -mode wire & + Exec "Random Automata" exec xlock -nolock -mode random -modelist allautomata -fullrandom -neighbors 0 & + +EndPopup + +Popup "Fractal-Saver" + Title "Fractal-Saver" + Exec "Coral" exec xlock -nolock -mode coral & + Exec "Discrete" exec xlock -nolock -mode discrete & + Exec "Drift" exec xlock -nolock -mode drift -fullrandom & + Exec "Flame" exec xlock -nolock -mode flame & + Exec "Flow" exec xlock -nolock -mode flow & + Exec "Forest" exec xlock -nolock -mode forest & + Exec "Hop" exec xlock -nolock -mode hop -fullrandom & + Exec "IFS" exec xlock -nolock -mode ifs & + Exec "Julia" exec xlock -nolock -mode julia +mouse & + Exec "Juliaptr" exec xlock -nolock -mode julia -mouse & + Exec "Kumppa" exec xlock -nolock -mode kumppa & + Exec "Lightning" exec xlock -nolock -mode lightning & + Exec "Mandelbrot" exec xlock -nolock -mode mandelbrot -install & + Exec "Mountain" exec xlock -nolock -mode mountain & + Exec "Sierpinski" exec xlock -nolock -mode sierpinski & + Exec "Strange" exec xlock -nolock -mode strange & + Exec "Thornbird" exec xlock -nolock -mode thornbird & + Exec "Triangle" exec xlock -nolock -mode triangle & + Exec "Turtle" exec xlock -nolock -mode turtle & + Exec "Vines" exec xlock -nolock -mode vines & + Exec "Random Fractal" exec xlock -nolock -mode random -modelist allfractal -fullrandom & +EndPopup + +Popup "Geometry-Saver" + Title "Geometry-Saver" + Exec "Braid" exec xlock -nolock -mode braid & + Exec "Fadeplot" exec xlock -nolock -mode fadeplot & + Exec "Helix" exec xlock -nolock -mode helix -fullrandom & + Exec "Hyper" exec xlock -nolock -mode hyper & + Exec "Ico" exec xlock -nolock -mode ico & + Exec "Kaleid" exec xlock -nolock -mode kaleid & + Exec "Laser" exec xlock -nolock -mode laser & + Exec "Lisa" exec xlock -nolock -mode lisa & + Exec "Lissie" exec xlock -nolock -mode lissie & + Exec "Penrose" exec xlock -nolock -mode penrose +ammann & + Exec "Penrose Ammann" exec xlock -nolock -mode penrose -ammann & + Exec "Petal" exec xlock -nolock -mode petal & + Exec "Qix" exec xlock -nolock -mode qix +complete & + Exec "Qix complete" exec xlock -nolock -mode qix -complete & + Exec "Rotor" exec xlock -nolock -mode rotor & + Exec "Shape" exec xlock -nolock -mode shape & + Exec "Sphere" exec xlock -nolock -mode sphere & + Exec "Spiral" exec xlock -nolock -mode spiral & + Exec "Spline" exec xlock -nolock -mode spline & + Exec "Random Geometry" exec xlock -nolock -mode random -modelist allgeometry -fullrandom & +EndPopup + +Popup "Space-Saver" + Title "Space-Saver" + Exec "Bouboule" exec xlock -nolock -mode bouboule +use3d & + Exec "Bouboule3d" exec xlock -nolock -mode bouboule -use3d & + Exec "Galaxy" exec xlock -nolock -mode galaxy & + Exec "Grav" exec xlock -nolock -mode grav +trail +decay & + Exec "Grav Trail" exec xlock -nolock -mode grav -trail & + Exec "Grav Decay" exec xlock -nolock -mode grav -decay & + Exec "Rock" exec xlock -nolock -mode star -rock & + Exec "Star" exec xlock -nolock -mode star +rock +use3d +trek 0 & + Exec "Star3d" exec xlock -nolock -mode star -use3d & + Exec "Star Trek" exec xlock -nolock -mode star -trek 100 & + Exec "World" exec xlock -nolock -mode world & + Exec "Random Space" exec xlock -nolock -mode random -modelist allspace -fullrandom & +EndPopup + +Popup "Assorted-Saver" + Title "Assorted-Saver" + Exec "Ball" exec xlock -nolock -mode ball & + Exec "Blot" exec xlock -nolock -mode blot & + Exec "Bounce" exec xlock -nolock -mode bounce & + Exec "Bubble" exec xlock -nolock -mode bubble & + Exec "Clock" exec xlock -nolock -mode clock & + Exec "Crystal" exec xlock -nolock -mode crystal & + Exec "Daisy" exec xlock -nolock -mode daisy & + Exec "Dclock" exec xlock -nolock -mode dclock & + Exec "Deco" exec xlock -nolock -mode deco & + Exec "Eyes" exec xlock -nolock -mode eyes +mouse & + Exec "Eyesptr" exec xlock -nolock -mode eyes -mouse & + Exec "Goop" exec xlock -nolock -mode goop & + Exec "Marquee" exec xlock -nolock -mode marquee & + Exec "Munch" exec xlock -nolock -mode munch & + Exec "Nose" exec xlock -nolock -mode nose & + Exec "Pacman" exec xlock -nolock -mode pacman & + Exec "Pyro" exec xlock -nolock -mode pyro +use3d & + Exec "Pyro3d" exec xlock -nolock -mode pyro -use3d & + Exec "Roll" exec xlock -nolock -mode roll & + Exec "Slip" exec xlock -nolock -mode slip & + Exec "Starfish" exec xlock -nolock -mode starfish -install & + Exec "Swarm" exec xlock -nolock -mode swarm +mouse & + Exec "Swarmptr" exec xlock -nolock -mode swarm -mouse & + Exec "Swirl" exec xlock -nolock -mode swirl -install & + Exec "Tetris" exec xlock -nolock -mode tetris & + Exec "Tube" exec xlock -nolock -mode tube -install & + Exec "Worm" exec xlock -nolock -mode worm +use3d & + Exec "Worm3d" exec xlock -nolock -mode worm -use3d & + Exec "Xjack" exec xlock -nolock -mode xjack & +EndPopup + +Popup "XPM-Saver" + Exec "Bat" exec xlock -nolock -mode bat & + Exec "Cartoon" exec xlock -nolock -mode cartoon & + Exec "Image" exec xlock -nolock -mode image & + Exec "Flag" exec xlock -nolock -mode flag & + Exec "Life" exec xlock -nolock -mode life & + Exec "Life1d" exec xlock -nolock -mode life1d & + Exec "Maze" exec xlock -nolock -mode maze & + Exec "Puzzle" exec xlock -nolock -mode puzzle & + Exec "Random XPM" exec xlock -nolock -mode random -modelist allxpm -fullrandom & +EndPopup + +Popup "GL-Saver" + Exec "Atlantis" exec xlock -nolock -mode atlantis & + Exec "Bubble3d" exec xlock -nolock -mode bubble3d & + Exec "Cage" exec xlock -nolock -mode cage & + Exec "Gears" exec xlock -nolock -mode gears & + Exec "Moebius" exec xlock -nolock -mode moebius & + Exec "Morph3d" exec xlock -nolock -mode morph3d & + Exec "Pipes" exec xlock -nolock -mode pipes & + Exec "Rubik" exec xlock -nolock -mode rubik & + Exec "Sproingies" exec xlock -nolock -mode sproingies & + Exec "Stairs" exec xlock -nolock -mode stairs & + Exec "Superquadrics" exec xlock -nolock -mode superquadrics & + Exec "Random GL" exec xlock -nolock -mode random -modelist allgl -fullrandom & +EndPopup + +Popup "Marquee-Message-Saver" + Title "Marquee-Message-Saver" + Exec "Brilliant" exec xlock -nolock -mode marquee -message "WOW! $LOGNAME, You are Brilliant! " & + Exec "Love You" exec xlock -mode marquee -message "You know, I Love You $LOGNAME." & + Exec "Available" exec xlock -mode marquee -message "Hey, I am available now! " & +EndPopup + +Popup "Nose-Message-Saver" + Title "Nose-Message-Saver" + Exec "Brilliant!" exec xlock -mode nose -message "WOW! $LOGNAME, You are Briilliant! " + Exec "Love You" exec xlock -mode nose -message "You know, I Love You $LOGNAME." & + Exec "Available" exec xlock -mode nose -message "Hey, I am available now! " & +EndPopup + +Popup "Xjack-Message-Saver" + Title "Xjack-Message-Saver" + Exec "Crazy Boy" exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + Exec "Crazy Girl" exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." & +EndPopup + +Popup "Special-Saver" + Title "Special-Saver" + Exec "Blank" exec xlock -nolock -mode blank & + Exec "Bomb" exec xlock -nolock -mode bomb & + Exec "Random nice" exec xlock -nolock -mode random -modelist allnice -fullrandom -neighbors 0 & + Exec "Random standard" exec xlock -nolock -mode random -modelist all-allgl -fullrandom -neighbors 0 & + Exec "Random all" exec xlock -nolock -mode random -modelist all -fullrandom -neighbors 0 & + Exec "Random 3d" exec xlock -nolock -mode random -modelist all3d -use3d -fullrandom & + Exec "Random ptr" exec xlock -nolock -mode random -modelist allmouse -mouse -fullrandom & + Exec "Random write" exec xlock -nolock -mode random -modelist allwrite -fullrandom & +EndPopup + +Popup "Screensaver" + Title "Screensaver" + Popup "Cellular Automata" Automata-Saver + Nop "" + Popup "Fractal" Fractal-Saver + Nop "" + Popup "Geometry" Geometry-Saver + Nop "" + Popup "Space" Space-Saver + Nop "" + Popup "Assorted" Assorted-Saver + Nop "" + Popup "XPM" XPM-Saver + Nop "" + Popup "GL" GL-Saver + Nop "" + Popup "Marquee Message" Marquee-Message-Saver + Nop "" + Popup "Nose Message" Nose-Message-Saver + Nop "" + Popup "Xjack Message" Xjack-Message-Saver + Nop "" + Popup "Special" Special-Saver +EndPopup + +Popup "Lock_Saver" + Title "Lock_Saver" + Popup "Screenlock" Screenlock + Nop "" + Popup "Screensaver" Screensaver +EndPopup + diff --git a/etc/system.mwmrc.xlock b/etc/system.mwmrc.xlock new file mode 100644 index 00000000..60d3f7b6 --- /dev/null +++ b/etc/system.mwmrc.xlock @@ -0,0 +1,453 @@ +# Add this to your system or personal menu file contents +# System +# Motif file: /usr/lib/X11/system.mwmrc +# Desktop file: /usr/dt/config/C/sys.dtwmrc +# Personal +# Motif file: $HOME/.mwmrc +# Desktop file: $HOME/.dt/dtwmrc +# Put this in your RootMenu (mwm) or ProgramsMenu (dtwm) uncommented. +# "Lock_Saver" f.menu Lock_Saver +# For dt you may have to add the full path of xlock to "xlock" depending +# whether the location xlock is installed is in a path of DT. +# See /usr/dt/bin/Xsession look for instances of $PATH for system setup. +# See supplied dtprofile for personal setup...i.e. DTSOURCEPROFILE=true + +Menu Automata-Lock +{ + "Automata-Lock" f.title + "Ant" f.exec "xlock -mode ant -neighbors 4 +truchet &" + "Ant Truchet" f.exec "xlock -mode ant -neighbors 4 -truchet & + "Bee" f.exec "xlock -mode ant -neighbors 6 +truchet &" + "Bee Truchet" f.exec "xlock -mode ant -neighbors 6 -truchet &" + "Bug" f.exec "xlock -mode bug &" + "Demon" f.exec "xlock -mode demon &" + "Dilemma" f.exec "xlock -mode dilemma &" + "Life" f.exec "xlock -mode life &" + "Life Callahan" f.exec "xlock -mode life -callahan -size 7 &" + "Life1d" f.exec "xlock -mode life1d &" + "Life3d" f.exec "xlock -mode life3d &" + "Loop" f.exec "xlock -mode loop &" + "Voters" f.exec "xlock -mode voters &" + "Wator" f.exec "xlock -mode wator &" + "Wire" f.exec "xlock -mode wire &" + "Random Automata" f.exec "xlock -mode random -modelist allautomata -fullrandom -neighbors 0 &" +} + +Menu Fractal-Lock +{ + "Fractal-Lock" f.title + "Coral" f.exec "xlock -mode coral &" + "Discrete" f.exec "xlock -mode discrete &" + "Drift" f.exec "xlock -mode drift -fullrandom &" + "Flame" f.exec "xlock -mode flame &" + "Flow" f.exec "xlock -mode flow &" + "Forest" f.exec "xlock -mode forest &" + "Hop" f.exec "xlock -mode hop -fullrandom &" + "IFS" f.exec "xlock -mode ifs &" + "Julia" f.exec "xlock -mode julia +mouse &" + "Juliaptr" f.exec "xlock -mode julia -mouse &" + "Kumppa" f.exec "xlock -mode kumppa &" + "Lightning" f.exec "xlock -mode lightning &" + "Mandelbrot" f.exec "xlock -mode mandelbrot -install &" + "Mountain" f.exec "xlock -mode mountain &" + "Sierpinski" f.exec "xlock -mode sierpinski &" + "Strange" f.exec "xlock -mode strange &" + "Thornbird" f.exec "xlock -mode thornbird &" + "Triangle" f.exec "xlock -mode triangle &" + "Turtle" f.exec "xlock -mode turtle &" + "Vines" f.exec "xlock -mode vines &" + "Random Fractal" f.exec "xlock -mode random -modelist allfractal -fullrandom &" +} + +Menu Geometry-Lock +{ + "Geometry-Lock" f.title + "Braid" f.exec "xlock -mode braid &" + "Fadeplot" f.exec "xlock -mode fadeplot &" + "Helix" f.exec "xlock -mode helix -fullrandom &" + "Hyper" f.exec "xlock -mode hyper &" + "Ico" f.exec "xlock -mode ico &" + "Kaleid" f.exec "xlock -mode kaleid &" + "Laser" f.exec "xlock -mode laser &" + "Lisa" f.exec "xlock -mode lisa &" + "Lissie" f.exec "xlock -mode lissie &" + "Penrose" f.exec "xlock -mode penrose +ammann &" + "Penrose Ammann" f.exec "xlock -mode penrose -ammann &" + "Petal" f.exec "xlock -mode petal &" + "Qix" f.exec "xlock -mode qix +complete &" + "Qix complete" f.exec "xlock -mode qix -complete &" + "Rotor" f.exec "xlock -mode rotor &" + "Shape" f.exec "xlock -mode shape &" + "Sphere" f.exec "xlock -mode sphere &" + "Spiral" f.exec "xlock -mode spiral &" + "Spline" f.exec "xlock -mode spline &" + "Random Geometry" f.exec "xlock -mode random -modelist allgeometry -fullrandom &" +} + +Menu Space-Lock +{ + "Space-Lock" f.title + "Bouboule" f.exec "xlock -mode bouboule +use3d &" + "Bouboule3d" f.exec "xlock -mode bouboule -use3d &" + "Galaxy" f.exec "xlock -mode galaxy &" + "Grav" f.exec "xlock -mode grav +trail +decay &" + "Grav Trail" f.exec "xlock -mode grav -trail &" + "Grav Decay" f.exec "xlock -mode grav -decay &" + "Rock" f.exec "xlock -mode star -rock &" + "Star" f.exec "xlock -mode star +rock +use3d -trek 0 &" + "Star3d" f.exec "xlock -mode star -use3d &" + "Star Trek" f.exec "xlock -mode star -trek 100 &" + "World" f.exec "xlock -mode world &" + "Random Space" f.exec "xlock -mode random -modelist allspace -fullrandom &" +} + +Menu Assorted-Lock +{ + "Assorted-Lock" f.title + "Ball" f.exec "xlock -mode ball &" + "Blot" f.exec "xlock -mode blot &" + "Bounce" f.exec "xlock -mode bounce &" + "Bubble" f.exec "xlock -mode bubble &" + "Clock" f.exec "xlock -mode clock &" + "Crystal" f.exec "xlock -mode crystal &" + "Daisy" f.exec "xlock -mode daisy &" + "Dclock" f.exec "xlock -mode dclock &" + "Deco" f.exec "xlock -mode deco &" + "Eyes" f.exec "xlock -mode eyes +mouse &" + "Eyesptr" f.exec "xlock -mode eyes -mouse &" + "Goop" f.exec "xlock -mode goop &" + "Marquee" f.exec "xlock -mode marquee &" + "Munch" f.exec "xlock -mode munch &" + "Nose" f.exec "xlock -mode nose &" + "Pacman" f.exec "xlock -mode pacman &" + "Pyro" f.exec "xlock -mode pyro +use3d &" + "Pyro3d" f.exec "xlock -mode pyro -use3d &" + "Roll" f.exec "xlock -mode roll &" + "Slip" f.exec "xlock -mode slip &" + "Starfish" f.exec "xlock -mode starfish -install &" + "Swarm" f.exec "xlock -mode swarm +mouse &" + "Swarmptr" f.exec "xlock -mode swarm -mouse &" + "Swirl" f.exec "xlock -mode swirl -install &" + "Tetris" f.exec "xlock -mode tetris &" + "Tube" f.exec "xlock -mode tube -install &" + "Worm" f.exec "xlock -mode worm +use3d &" + "Worm3d" f.exec "xlock -mode worm -use3d &" + "Xjack" f.exec "xlock -mode xjack &" +} + +Menu XPM-Lock +{ + "XPM-Lock" f.title + "Bat" f.exec "xlock -mode bat &" + "Cartoon" f.exec "xlock -mode cartoon &" + "Image" f.exec "xlock -mode image &" + "Flag" f.exec "xlock -mode flag &" + "Life" f.exec "xlock -mode life &" + "Life1d" f.exec "xlock -mode life1d &" + "Maze" f.exec "xlock -mode maze &" + "Puzzle" f.exec "xlock -mode puzzle &" + "Random XPM" f.exec "xlock -mode random -modelist allxpm -fullrandom &" +} + +Menu GL-Lock +{ + "GL-Lock" f.title + "Atlantis" f.exec "xlock -mode atlantis &" + "Bubble3d" f.exec "xlock -mode bubble3d &" + "Cage" f.exec "xlock -mode cage &" + "Gears" f.exec "xlock -mode gears &" + "Moebius" f.exec "xlock -mode moebius &" + "Morph3d" f.exec "xlock -mode morph3d &" + "Pipes" f.exec "xlock -mode pipes &" + "Rubik" f.exec "xlock -mode rubik &" + "Sproingies" f.exec "xlock -mode sproingies &" + "Stairs" f.exec "xlock -mode stairs &" + "Superquadrics" f.exec "xlock -mode superquadrics &" + "Random GL" f.exec "xlock -mode random -modelist allgl -fullrandom &" +} + +Menu Marquee-Message-Lock +{ + "Marquee-Message-Lock" f.title + "Back Soon" f.exec "xlock -mode marquee -message "$LOGNAME will be back soon." &" + "Overnight" f.exec "xlock -mode marquee -message "$LOGNAME will be back in the morning." &" + "Rude" f.exec "xlock -mode marquee -message "$LOGNAME not here, please go away! " &" +} + +Menu Nose-Message-Lock +{ + "Nose-Message-Lock" f.title + "Back Soon" f.exec "xlock -mode nose -message "$LOGNAME will be back soon." + "Overnight" f.exec "xlock -mode nose -message "$LOGNAME will be back in the morning." &" + "Rude" f.exec "xlock -mode nose -message "$LOGNAME not here, please go away! " &" +} + +Menu Xjack-Message-Lock +{ + "Xjack-Message-Lock" f.title + "Crazy Boy" f.exec "xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + "Crazy Girl" f.exec "xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." &" +} + +Menu Special-Lock +{ + "Special-Lock" f.title + "Blank" f.exec "xlock -mode blank &" + "Bomb" f.exec "xlock -mode bomb &" + "Random nice" f.exec "xlock -mode random -modelist allnice -fullrandom -neighbors 0 &" + "Random standard" f.exec "xlock -mode random -modelist all-allgl -fullrandom -neighbors 0 &" + "Random all" f.exec "xlock -mode random -modelist all -fullrandom -neighbors 0 &" + "Random 3d" f.exec "xlock -mode random -modelist all3d -use3d -fullrandom &" + "Random ptr" f.exec "xlock -mode random -modelist allmouse -mouse -fullrandom &" + "Random write" f.exec "xlock -mode random -modelist allwrite -fullrandom &" +} + +Menu Screenlock +{ + "Screenlock" f.title + "Cellular Automata" f.menu Automata-Lock + no-label f.separator + "Fractal" f.menu Fractal-Lock + no-label f.separator + "Geometry" f.menu Geometry-Lock + no-label f.separator + "Space" f.menu Space-Lock + no-label f.separator + "Assorted" f.menu Assorted-Lock + no-label f.separator + "XPM" f.menu XPM-Lock + no-label f.separator + "GL" f.menu GL-Lock + no-label f.separator + "Marquee Message" f.menu Marquee-Message-Lock + no-label f.separator + "Nose Message" f.menu Nose-Message-Lock + no-label f.separator + "Xjack Message" f.menu Xjack-Message-Lock + no-label f.separator + "Special" f.menu Special-Lock +} + +Menu Automata-Saver +{ + "Automata-Saver" f.title + "Ant" f.exec "xlock -nolock -mode ant -neighbors 4 +truchet &" + "Ant Truchet" f.exec "xlock -nolock -mode ant -neighbors 4 -truchet &" + "Bee" f.exec "xlock -nolock -mode ant -neighbors 6 +truchet &" + "Bee Truchet" f.exec "xlock -nolock -mode ant -neighbors 6 -truchet &" + "Bug" f.exec "xlock -nolock -mode bug &" + "Demon" f.exec "xlock -nolock -mode demon &" + "Dilemma" f.exec "xlock -nolock -mode dilemma &" + "Life" f.exec "xlock -nolock -mode life &" + "Life Callahan" f.exec "xlock -nolock -mode life -callahan -size 7 &" + "Life1d" f.exec "xlock -nolock -mode life1d &" + "Life3d" f.exec "xlock -nolock -mode life3d &" + "Loop" f.exec "xlock -nolock -mode loop &" + "Voters" f.exec "xlock -nolock -mode voters &" + "Wator" f.exec "xlock -nolock -mode wator &" + "Wire" f.exec "xlock -nolock -mode wire &" + "Random Automata" f.exec "xlock -nolock -mode random -modelist allautomata -fullrandom -neighbors 0 &" +} + +Menu Fractal-Saver +{ + "Fractal-Saver" f.title + "Coral" f.exec "xlock -nolock -mode coral &" + "Discrete" f.exec "xlock -nolock -mode discrete &" + "Drift" f.exec "xlock -nolock -mode drift -fullrandom &" + "Flame" f.exec "xlock -nolock -mode flame &" + "Flow" f.exec "xlock -nolock -mode flow &" + "Forest" f.exec "xlock -nolock -mode forest &" + "Hop" f.exec "xlock -nolock -mode hop -fullrandom &" + "IFS" f.exec "xlock -nolock -mode ifs &" + "Julia" f.exec "xlock -nolock -mode julia +mouse &" + "Juliaptr" f.exec "xlock -nolock -mode julia -mouse &" + "Kumppa" f.exec "xlock -nolock -mode kumppa &" + "Lightning" f.exec "xlock -nolock -mode lightning &" + "Mandelbrot" f.exec "xlock -nolock -mode mandelbrot -install &" + "Mountain" f.exec "xlock -nolock -mode mountain &" + "Sierpinski" f.exec "xlock -nolock -mode sierpinski &" + "Strange" f.exec "xlock -nolock -mode strange &" + "Thornbird" f.exec "xlock -nolock -mode thornbird &" + "Triangle" f.exec "xlock -nolock -mode triangle &" + "Turtle" f.exec "xlock -nolock -mode turtle &" + "Vines" f.exec "xlock -nolock -mode vines &" + "Random Fractal" f.exec "xlock -nolock -mode random -modelist allfractal -fullrandom &" +} + +Menu Geometry-Saver +{ + "Geometry-Saver" f.title + "Braid" f.exec "xlock -nolock -mode braid &" + "Fadeplot" f.exec "xlock -nolock -mode fadeplot &" + "Helix" f.exec "xlock -nolock -mode helix -fullrandom &" + "Hyper" f.exec "xlock -nolock -mode hyper &" + "Ico" f.exec "xlock -nolock -mode ico &" + "Kaleid" f.exec "xlock -nolock -mode kaleid &" + "Laser" f.exec "xlock -nolock -mode laser &" + "Lisa" f.exec "xlock -nolock -mode lisa &" + "Lissie" f.exec "xlock -nolock -mode lissie &" + "Penrose" f.exec "xlock -nolock -mode penrose +ammann &" + "Penrose Ammann" f.exec "xlock -nolock -mode penrose -ammann &" + "Petal" f.exec "xlock -nolock -mode petal &" + "Qix" f.exec "xlock -nolock -mode qix +complete &" + "Qix complete" f.exec "xlock -nolock -mode qix -complete &" + "Rotor" f.exec "xlock -nolock -mode rotor &" + "Shape" f.exec "xlock -nolock -mode shape &" + "Sphere" f.exec "xlock -nolock -mode sphere &" + "Spiral" f.exec "xlock -nolock -mode spiral &" + "Spline" f.exec "xlock -nolock -mode spline &" + "Random Geometry" f.exec "xlock -nolock -mode random -modelist allgeometry -fullrandom &" +} + +Menu Space-Saver +{ + "Space-Saver" f.title + "Bouboule" f.exec "xlock -nolock -mode bouboule +use3d &" + "Bouboule3d" f.exec "xlock -nolock -mode bouboule -use3d &" + "Galaxy" f.exec "xlock -nolock -mode galaxy &" + "Grav" f.exec "xlock -nolock -mode grav +trail +decay &" + "Grav Trail" f.exec "xlock -nolock -mode grav -trail &" + "Grav Decay" f.exec "xlock -nolock -mode grav -decay &" + "Rock" f.exec "xlock -nolock -mode star -rock &" + "Star" f.exec "xlock -nolock -mode star +rock +use3d +trek 0 &" + "Star3d" f.exec "xlock -nolock -mode star -use3d &" + "Star Trek" f.exec "xlock -nolock -mode star -trek 100 &" + "World" f.exec "xlock -nolock -mode world &" + "Random Space" f.exec "xlock -nolock -mode random -modelist allspace -fullrandom &" +} + +Menu Assorted-Saver +{ + "Assorted-Saver" f.title + "Ball" f.exec "xlock -nolock -mode ball &" + "Blot" f.exec "xlock -nolock -mode blot &" + "Bounce" f.exec "xlock -nolock -mode bounce &" + "Bubble" f.exec "xlock -nolock -mode bubble &" + "Clock" f.exec "xlock -nolock -mode clock &" + "Crystal" f.exec "xlock -nolock -mode crystal &" + "Daisy" f.exec "xlock -nolock -mode daisy &" + "Dclock" f.exec "xlock -nolock -mode dclock &" + "Deco" f.exec "xlock -nolock -mode deco &" + "Eyes" f.exec "xlock -nolock -mode eyes +mouse &" + "Eyesptr" f.exec "xlock -nolock -mode eyes -mouse &" + "Goop" f.exec "xlock -nolock -mode goop &" + "Marquee" f.exec "xlock -nolock -mode marquee &" + "Munch" f.exec "xlock -nolock -mode munch &" + "Nose" f.exec "xlock -nolock -mode nose &" + "Pacman" f.exec "xlock -nolock -mode pacman &" + "Pyro" f.exec "xlock -nolock -mode pyro +use3d &" + "Pyro3d" f.exec "xlock -nolock -mode pyro -use3d &" + "Roll" f.exec "xlock -nolock -mode roll &" + "Slip" f.exec "xlock -nolock -mode slip &" + "Starfish" f.exec "xlock -nolock -mode starfish -install &" + "Swarm" f.exec "xlock -nolock -mode swarm +mouse &" + "Swarmptr" f.exec "xlock -nolock -mode swarm -mouse &" + "Swirl" f.exec "xlock -nolock -mode swirl -install &" + "Tetris" f.exec "xlock -nolock -mode tetris &" + "Tube" f.exec "xlock -nolock -mode tube -install &" + "Worm" f.exec "xlock -nolock -mode worm +use3d &" + "Worm3d" f.exec "xlock -nolock -mode worm -use3d &" + "Xjack" f.exec "xlock -nolock -mode xjack &" +} + +Menu XPM-Saver +{ + "XPM-Saver" f.title + "Bat" f.exec "xlock -nolock -mode bat &" + "Cartoon" f.exec "xlock -nolock -mode cartoon &" + "Image" f.exec "xlock -nolock -mode image &" + "Flag" f.exec "xlock -nolock -mode flag &" + "Life" f.exec "xlock -nolock -mode life &" + "Life1d" f.exec "xlock -nolock -mode life1d &" + "Maze" f.exec "xlock -nolock -mode maze &" + "Puzzle" f.exec "xlock -nolock -mode puzzle &" + "Random XPM" f.exec "xlock -nolock -mode random -modelist allxpm -fullrandom &" +} + +Menu GL-Saver +{ + "GL-Saver" f.title + "Atlantis" f.exec "xlock -nolock -mode atlantis &" + "Bubble3d" f.exec "xlock -nolock -mode bubble3d &" + "Cage" f.exec "xlock -nolock -mode cage &" + "Gears" f.exec "xlock -nolock -mode gears &" + "Moebius" f.exec "xlock -nolock -mode moebius &" + "Morph3d" f.exec "xlock -nolock -mode morph3d &" + "Pipes" f.exec "xlock -nolock -mode pipes &" + "Rubik" f.exec "xlock -nolock -mode rubik &" + "Sproingies" f.exec "xlock -nolock -mode sproingies &" + "Stairs" f.exec "xlock -nolock -mode stairs &" + "Superquadrics" f.exec "xlock -nolock -mode superquadrics &" + "Random GL" f.exec "xlock -nolock -mode random -modelist allgl -fullrandom &" +} + +Menu Marquee-Message-Saver +{ + "Marquee-Message-Saver" f.title + "Brilliant" f.exec "xlock -nolock -mode marquee -message "WOW! $LOGNAME, You are Brilliant! " &" + "Love You" f.exec "xlock -mode marquee -message "You know, I Love You $LOGNAME." &" + "Available" f.exec "xlock -mode marquee -message "Hey, I am available now! " &" +} + +Menu Nose-Message-Saver +{ + "Nose-Message-Saver" f.title + "Brilliant!" f.exec "xlock -mode nose -message "WOW! $LOGNAME, You are Briilliant! " + "Love You" f.exec "xlock -mode nose -message "You know, I Love You $LOGNAME." &" + "Available" f.exec "xlock -mode nose -message "Hey, I am available now! " &" +} + +Menu Xjack-Message-Saver +{ + "Xjack-Message-Saver" f.title + "Crazy Boy" f.exec "xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + "Crazy Girl" f.exec "xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." &" +} + +Menu Special-Saver +{ + "Special-Saver" f.title + "Blank" f.exec "xlock -nolock -mode blank &" + "Bomb" f.exec "xlock -nolock -mode bomb &" + "Random nice" f.exec "xlock -nolock -mode random -modelist allnice -fullrandom -neighbors 0 &" + "Random standard" f.exec "xlock -nolock -mode random -modelist all-allgl -fullrandom -neighbors 0 &" + "Random all" f.exec "xlock -nolock -mode random -modelist all -fullrandom -neighbors 0 &" + "Random 3d" f.exec "xlock -nolock -mode random -modelist all3d -use3d -fullranodm &" + "Random ptr" f.exec "xlock -nolock -mode random -modelist allmouse -mouse -fullrandom &" + "Random write" f.exec "xlock -nolock -mode random -modelist allwrite -fullrandom &" +} + +Menu Screensaver +{ + "Screensaver" f.title + "Cellular Automata" f.menu Automata-Saver + no-label f.separator + "Fractal" f.menu Fractal-Saver + no-label f.separator + "Geometry" f.menu Geometry-Saver + no-label f.separator + "Space" f.menu Space-Saver + no-label f.separator + "Assorted" f.menu Assorted-Saver + no-label f.separator + "XPM" f.menu XPM-Saver + no-label f.separator + "GL" f.menu GL-Saver + no-label f.separator + "Marquee Message" f.menu Marquee-Message-Saver + no-label f.separator + "Nose Message" f.menu Nose-Message-Saver + no-label f.separator + "Xjack Message" f.menu Xjack-Message-Saver + no-label f.separator + "Special" f.menu Special-Saver +} + +Menu "Lock_Saver" +{ + "Lock_Saver" f.title + "Screenlock" f.menu Screenlock + "Screensaver" f.menu Screensaver +} + diff --git a/etc/system.olwmrc.xlock b/etc/system.olwmrc.xlock new file mode 100644 index 00000000..68f7c17b --- /dev/null +++ b/etc/system.olwmrc.xlock @@ -0,0 +1,347 @@ +# Add this to your system or personal menu file +# System: /usr/openwin/lib/openwin-menu +# Personal $HOME/.openwin-menu +# Put this in your menu uncommented. +# "Lock_Saver" MENU $THISFILEPATH/system.olwmrc.xlock + +# put this in your $OPENWINHOME/lib, usually $OPENWINHOME is /usr/openwin + +"Screenlock" MENU + "Screenlock" TITLE PIN + "Cellular Automata" MENU + "Automata" TITLE + "Ant" exec xlock -mode ant -neighbors 4 +truchet + "Ant Truchet" exec xlock -mode ant -neighbors 4 -truchet + "Bee" exec xlock -mode ant -neighbors 6 +truchet + "Bee Truchet" exec xlock -mode ant -neighbors 6 -truchet + "Bug" exec xlock -mode bug + "Demon" exec xlock -mode demon + "Dilemma" exec xlock -mode dilemma + "Life" exec xlock -mode life + "Life Callahan" exec xlock -mode life -callahan -size 7 + "Life1d" exec xlock -mode life1d + "Life3d" exec xlock -mode life3d + "Loop" exec xlock -mode loop + "Voters" exec xlock -mode voters + "Wator" exec xlock -mode wator + "Wire" exec xlock -mode wire + "Random Automata" DEFAULT exec xlock -mode random -modelist allautomata -fullrandom -neighbors 0 + "Cellular Automata" END + "Fractal" MENU + "Fractal" TITLE + "Coral" exec xlock -mode coral + "Discrete" exec xlock -mode discrete + "Drift" exec xlock -mode drift -fullrandom + "Flame" exec xlock -mode flame + "Flow" exec xlock -mode flow + "Forest" exec xlock -mode forest + "Hop" exec xlock -mode hop -fullrandom + "IFS" exec xlock -mode ifs + "Julia" exec xlock -mode julia +mouse + "Juliaptr" exec xlock -mode julia -mouse + "Kumppa" exec xlock -mode kumppa + "Lightning" exec xlock -mode lightning + "Mandelbrot" exec xlock -mode mandelbrot -install + "Mountain" exec xlock -mode mountain + "Sierpinski" exec xlock -mode sierpinski + "Strange" exec xlock -mode strange + "Thornbird" exec xlock -mode thornbird + "Triangle" exec xlock -mode triangle + "Turtle" exec xlock -mode turtle + "Vines" exec xlock -mode vines + "Random Fractal" DEFAULT exec xlock -mode random -modelist allfractal -fullrandom + "Fractal" END + "Geometry" MENU + "Geometry" TITLE + "Braid" exec xlock -mode braid + "Fadeplot" exec xlock -mode fadeplot + "Helix" exec xlock -mode helix -fullrandom + "Hyper" exec xlock -mode hyper + "Ico" exec xlock -mode ico + "Kaleid" exec xlock -mode kaleid + "Laser" exec xlock -mode laser + "Lisa" exec xlock -mode lisa + "Lissie" exec xlock -mode lissie + "Penrose" exec xlock -mode penrose +ammann + "Penrose Ammann" exec xlock -mode penrose -ammann + "Petal" exec xlock -mode petal + "Qix" exec xlock -mode qix +complete + "Qix complete" exec xlock -mode qix -complete + "Shape" exec xlock -mode shape + "Sphere" exec xlock -mode sphere + "Spiral" exec xlock -mode spiral + "Spline" exec xlock -mode spline + "Random Geometry" DEFAULT exec xlock -mode random -modelist allgeometry -fullrandom + "Geometry" END + "Space" MENU + "Space" TITLE + "Bouboule" exec xlock -mode bouboule +use3d + "Bouboule3d" exec xlock -mode bouboule -use3d + "Galaxy" exec xlock -mode galaxy + "Grav" exec xlock -mode grav +trail +grav + "Grav Trail" exec xlock -mode grav -trail + "Grav Decay" exec xlock -mode grav -grav + "Rock" exec xlock -mode star -rock + "Star" exec xlock -mode star +rock +use3d -trek 0 + "Star3d" exec xlock -mode star -use3d + "Star Trek" exec xlock -mode star -trek 100 + "World" exec xlock -mode world + "Random Space" DEFAULT exec xlock -mode random -modelist allspace -fullrandom + "Space" END + "Assorted" MENU + "Assorted" TITLE + "Ball" exec xlock -mode ball + "Blot" exec xlock -mode blot + "Bounce" exec xlock -mode bounce + "Bubble" exec xlock -mode bubble + "Clock" exec xlock -mode clock + "Crystal" DEFAULT exec xlock -mode crystal + "Daisy" exec xlock -mode daisy + "Dclock" exec xlock -mode dclock + "Deco" exec xlock -mode deco + "Eyes" exec xlock -mode eyes +mouse + "Eyesptr" exec xlock -mode eyes -mouse + "Goop" exec xlock -mode goop + "Marquee" exec xlock -mode marquee + "Munch" exec xlock -mode munch + "Nose" exec xlock -mode nose + "Pacman" exec xlock -mode pacman + "Pyro" exec xlock -mode pyro +use3d + "Pyro3d" exec xlock -mode pyro -use3d + "Roll" exec xlock -mode roll + "Rotor" exec xlock -mode rotor + "Slip" exec xlock -mode slip + "Starfish" exec xlock -mode starfish -install + "Swarm" exec xlock -mode swarm +mouse + "Swarmptr" exec xlock -mode swarm -mouse + "Swirl" exec xlock -mode swirl -install + "Tetris" exec xlock -mode tetris + "Tube" exec xlock -mode tube -install + "Worm" exec xlock -mode worm +use3d + "Worm3d" exec xlock -mode worm -use3d + "Xjack" exec xlock -mode xjack + "Assorted" END + "XPM" MENU + "Bat" exec xlock -mode bat + "Cartoon" exec xlock -mode cartoon + "Image" exec xlock -mode image + "Flag" exec xlock -mode flag + "Life" exec xlock -mode life + "Life1d" exec xlock -mode life1d + "Maze" exec xlock -mode maze + "Puzzle" exec xlock -mode puzzle + "Random XPM" DEFAULT exec xlock -mode random -modelist allxpm -fullrandom + "XPM" END + "GL" MENU + "GL" TITLE + "Atlantis" exec xlock -mode atlantis + "Bubble3d" exec xlock -mode bubble3d + "Cage" exec xlock -mode cage + "Gears" exec xlock -mode gears + "Moebius" exec xlock -mode moebius + "Morph3d" exec xlock -mode morph3d + "Pipes" exec xlock -mode pipes + "Rubik" exec xlock -mode rubik + "Sproingies" exec xlock -mode sproingies + "Stairs" exec xlock -mode stairs + "Superquadrics" exec xlock -mode superquadrics + "Random GL" DEFAULT exec xlock -mode random -modelist allgl -fullrandom + "GL" END + "Marquee Messages" MENU + "Marquee Messages" TITLE + "Back Soon" DEFAULT exec xlock -mode marquee -message "$LOGNAME will be back soon." + "Overnight" exec xlock -mode marquee -message "$LOGNAME will be back in the morning." + "Rude" exec xlock -mode marquee -message "$LOGNAME not here, please go away! " + "Marquee Messages" END + "Nose Messages" MENU + "Nose Messages" TITLE + "Back Soon" DEFAULT exec xlock -mode nose -message "$LOGNAME will be back soon." + "Overnight" exec xlock -mode nose -message "$LOGNAME will be back in the morning." + "Rude" exec xlock -mode nose -message "$LOGNAME not here, please go away! " + "Nose Messages" END + "Xjack Messages" MENU + "Nose Messages" TITLE + "Crazy Boy" DEFAULT exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + "Crazy Girl" exec xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." + "Xjack Messages" END + "Special" DEFAULT MENU + "Special" TITLE + "Blank" exec xlock -mode blank + "Bomb" exec xlock -mode bomb + "Random nice" exec xlock -mode random -modelist allnice -fullrandom -neighbors 0 + "Random standard" exec xlock -mode random -modelist all-allgl -fullrandom -neighbors 0 + "Random all" DEFAULT exec xlock -mode random -modelist all -fullrandom -neighbors 0 + "Random 3d" exec xlock -modelist all3d -use3d -fullrandom + "Random ptr" exec xlock -modelist allmouse -mouse -fullrandom + "Random write" exec xlock -modelist allwrite -fullrandom + "Special" END +"Screenlock" END +"Screensaver" MENU + "Screensaver" TITLE PIN + "Cellular-Automata" MENU + "Automata" TITLE + "Ant" exec xlock -nolock -mode ant -neighbors 4 +truchet + "Ant Truchet" exec xlock -nolock -mode ant -neighbors 4 -truchet + "Bee" exec xlock -nolock -mode ant -neighbors 6 +truchet + "Bee Truchet" exec xlock -nolock -mode ant -neighbors 6 -truchet + "Bug" exec xlock -nolock -mode bug + "Demon" exec xlock -nolock -mode demon + "Dilemma" exec xlock -nolock -mode dilemma + "Life" exec xlock -nolock -mode life + "Life Callahan" exec xlock -nolock -mode life -callahan -size 7 + "Life1d" exec xlock -nolock -mode life1d + "Life3d" exec xlock -nolock -mode life3d + "Loop" exec xlock -nolock -mode loop + "Voters" exec xlock -nolock -mode voters + "Wator" exec xlock -nolock -mode wator + "Wire" exec xlock -nolock -mode wire + "Random Automata" DEFAULT exec xlock -nolock -mode random -modelist allautomata -fullrandom -neighbors 0 + "Cellular-Automata" END + "Fractal" MENU + "Fractal" TITLE + "Coral" exec xlock -nolock -mode coral + "Discrete" exec xlock -nolock -mode discrete + "Drift" exec xlock -nolock -mode drift -fullrandom + "Flame" exec xlock -nolock -mode flame + "Flow" exec xlock -nolock -mode flow + "Forest" exec xlock -nolock -mode forest + "Hop" exec xlock -nolock -mode hop -fullrandom + "IFS" exec xlock -nolock -mode ifs + "Julia" exec xlock -nolock -mode julia +mouse + "Juliaptr" exec xlock -nolock -mode julia -mouse + "Kumppa" exec xlock -nolock -mode kumppa + "Lightning" exec xlock -nolock -mode lightning + "Mandelbrot" exec xlock -nolock -mode mandelbrot -install + "Mountain" exec xlock -nolock -mode mountain + "Sierpinski" exec xlock -nolock -mode sierpinski + "Strange" exec xlock -nolock -mode strange + "Thornbird" exec xlock -nolock -mode thornbird + "Triangle" exec xlock -nolock -mode triangle + "Turtle" exec xlock -nolock -mode turtle + "Vines" exec xlock -nolock -mode vines + "Random Fractal" DEFAULT exec xlock -nolock -mode random -modelist allfractal -fullrandom + "Fractal" END + "Geometry" MENU + "Geometry" TITLE + "Braid" exec xlock -nolock -mode braid + "Fadeplot" exec xlock -nolock -mode fadeplot + "Helix" exec xlock -nolock -mode helix -fullrandom + "Hyper" exec xlock -nolock -mode hyper + "Ico" exec xlock -nolock -mode ico + "Kaleid" exec xlock -nolock -mode kaleid + "Laser" exec xlock -nolock -mode laser + "Lisa" exec xlock -nolock -mode lisa + "Lissie" exec xlock -nolock -mode lissie + "Penrose" exec xlock -nolock -mode penrose +ammann + "Penrose Ammann" exec xlock -nolock -mode penrose -ammann + "Petal" exec xlock -nolock -mode petal + "Qix" exec xlock -nolock -mode qix +complete + "Qix complete" exec xlock -nolock -mode qix -complete + "Shape" exec xlock -nolock -mode shape + "Sphere" exec xlock -nolock -mode sphere + "Spiral" exec xlock -nolock -mode spiral + "Spline" exec xlock -nolock -mode spline + "Random Geometry" DEFAULT exec xlock -nolock -mode random -modelist allgeometry -fullrandom + "Geometry" END + "Space" MENU + "Space" TITLE + "Bouboule" exec xlock -nolock -mode bouboule +use3d + "Bouboule3d" exec xlock -nolock -mode bouboule -use3d + "Galaxy" exec xlock -nolock -mode galaxy + "Grav" exec xlock -nolock -mode grav +trail +decay + "Grav Trail" exec xlock -nolock -mode grav -trail + "Grav Decay" exec xlock -nolock -mode grav -decay + "Rock" exec xlock -nolock -mode star -rock +use3d -trek 0 + "Star" exec xlock -nolock -mode star +rock +use3d -trek 0 + "Star3d" exec xlock -nolock -mode star -use3d + "Star Trek" exec xlock -nolock -mode star -trek 100 + "World" exec xlock -nolock -mode world + "Random Space" DEFAULT exec xlock -nolock -mode random -modelist allspace -fullrandom + "Space" END + "Assorted" MENU + "Assorted" TITLE + "Ball" exec xlock -nolock -mode ball + "Blot" exec xlock -nolock -mode blot + "Bounce" exec xlock -nolock -mode bounce + "Bubble" exec xlock -nolock -mode bubble + "Clock" exec xlock -nolock -mode clock + "Crystal" DEFAULT exec xlock -nolock -mode crystal + "Daisy" exec xlock -nolock -mode daisy + "Dclock" exec xlock -nolock -mode dclock + "Deco" exec xlock -nolock -mode deco + "Eyes" exec xlock -nolock -mode eyes +mouse + "Eyesptr" exec xlock -nolock -mode eyes -mouse + "Goop" exec xlock -nolock -mode goop + "Marquee" exec xlock -nolock -mode marquee + "Munch" exec xlock -nolock -mode munch + "Nose" exec xlock -nolock -mode nose + "Pacman" exec xlock -nolock -mode pacman + "Pyro" exec xlock -nolock -mode pyro +use3d + "Pyro3d" exec xlock -nolock -mode pyro -use3d + "Roll" exec xlock -nolock -mode roll + "Rotor" exec xlock -nolock -mode rotor + "Slip" exec xlock -nolock -mode slip + "Starfish" exec xlock -nolock -mode starfish -install + "Swarm" exec xlock -nolock -mode swarm +mouse + "Swarmptr" exec xlock -nolock -mode swarm -mouse + "Swirl" exec xlock -nolock -mode swirl -install + "Tetris" exec xlock -nolock -mode tetris + "Tube" exec xlock -nolock -mode tube -install + "Worm" exec xlock -nolock -mode worm +use3d + "Worm3d" exec xlock -nolock -mode worm -use3d + "Xjack" exec xlock -nolock -mode xjack + "Assorted" END + "XPM" MENU + "Bat" exec xlock -nolock -mode bat + "Cartoon" exec xlock -nolock -mode cartoon + "Image" exec xlock -nolock -mode image + "Flag" exec xlock -nolock -mode flag + "Life" exec xlock -nolock -mode life + "Life1d" exec xlock -nolock -mode life1d + "Maze" exec xlock -nolock -mode maze + "Puzzle" exec xlock -nolock -mode puzzle + "Random XPM" DEFAULT exec xlock -nolock -mode random -modelist allxpm -fullrandom + "XPM" END + "GL" MENU + "Atlantis" exec xlock -nolock -mode atlantis + "Bubble3d" exec xlock -nolock -mode bubble3d + "Cage" exec xlock -nolock -mode cage + "Gears" exec xlock -nolock -mode gears + "Moebius" exec xlock -nolock -mode moebius + "Morph3d" exec xlock -nolock -mode morph3d + "Pipes" exec xlock -nolock -mode pipes + "Rubik" exec xlock -nolock -mode rubik + "Sprongies" exec xlock -nolock -mode sproingies + "Stairs" exec xlock -nolock -mode stairs + "Superquadrics" exec xlock -nolock -mode superquadrics + "Random GL" DEFAULT exec xlock -nolock -mode random -modelist allgl -fullrandom + "GL" END + "Marquee Messages" MENU + "Marquee Messages" TITLE + "Brilliant" exec xlock -nolock -mode marquee -message "WOW! $LOGNAME, You are Brilliant! " + "Love You" exec xlock -nolock -mode marquee -message "You know, I Love You $LOGNAME." + "Available" exec xlock -nolock -mode marquee -message "Hey, I am available now! " + "Marquee Messages" END + "Nose Messages" MENU + "Nose Messages" TITLE + "Brilliant" exec xlock -nolock -mode nose -message "WOW! $LOGNAME, You are Brilliant! " + "Love You" exec xlock -nolock -mode nose -message "You know, I Love You $LOGNAME." + "Available" exec xlock -nolock -mode nose -message "Hey, I am available now! " + "Nose Messages" END + "Xjack Messages" MENU + "Xjack Messages" TITLE + "Crazy Boy" exec xlock -nolock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + "Crazy Girl" exec xlock -nolock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." + "Xjack Messages" END + "Special" DEFAULT MENU + "Special" TITLE + "Blank" exec xlock -nolock -mode blank + "Bomb" exec xlock -nolock -mode bomb + "Random nice" exec xlock -nolock -mode random -modelist allnice -fullrandom -neighbors 0 + "Random standard" exec xlock -nolock -mode random -modelist all-allgl -fullrandom -neighbors 0 + "Random all" DEFAULT exec xlock -nolock -mode random -modelist all -fullrandom -neighbors 0 + "Random 3d" exec xlock -nolock -modelist all3d -use3d -fullrandom + "Random ptr" exec xlock -nolock -modelist allmouse -mouse -fullrandom + "Random write" exec xlock -nolock -modelist allwrite -fullrandom + "Special" END +"Screensaver" END diff --git a/etc/system.wmrc.xlock b/etc/system.wmrc.xlock new file mode 100644 index 00000000..ddc28209 --- /dev/null +++ b/etc/system.wmrc.xlock @@ -0,0 +1,350 @@ +# Copy this to your personal Library directory for WindowMaker: +# $HOME/GNUstep/Library/WindowMaker/ +# And add this to $HOME/GNUstep/Library/WindowMaker/menu (or menu.xx) +# Put this in your "Workspace" menu +# "Lock_Saver" OPEN_MENU system.wmrc.xlock + +"Lock_Saver" MENU +"ScreenLock" MENU +"Automata" MENU + "Ant" EXEC xlock -mode ant -neighbors 4 +truchet + "Ant Truchet" EXEC xlock -mode ant -neighbors 4 -truchet + "Bee" EXEC xlock -mode ant -neighbors 6 +truchet + "Bee Truchet" EXEC xlock -mode ant -neighbors 6 -truchet + "Bug" EXEC xlock -mode bug + "Demon" EXEC xlock -mode demon + "Dilemma" EXEC xlock -mode dilemma + "Life" EXEC xlock -mode life + "Life Callahan" EXEC xlock -mode life -callahan -size 7 + "Life1d" EXEC xlock -mode life1d + "Life3d" EXEC xlock -mode life3d + "Loop" EXEC xlock -mode loop + "Voters" EXEC xlock -mode voters + "Wator" EXEC xlock -mode wator + "Wire" EXEC xlock -mode wire + "Random" EXEC xlock -mode random -modelist allautomata -fullrandom -neighbors 0 +"Automata" END + +"Fractal" MENU + "Coral" EXEC xlock -mode coral + "Discrete" EXEC xlock -mode discrete + "Drift" EXEC xlock -mode drift -fullrandom + "Flame" EXEC xlock -mode flame + "Flow" EXEC xlock -mode flow + "Forest" EXEC xlock -mode forest + "Hop" EXEC xlock -mode hop -fullrandom + "IFS" EXEC xlock -mode ifs + "Julia" EXEC xlock -mode julia +mouse + "Juliaptr" EXEC xlock -mode julia -mouse + "Kumppa" EXEC xlock -mode kumppa + "Lightning" EXEC xlock -mode lightning + "Mandelbrot" EXEC xlock -mode mandelbrot -install + "Mountain" EXEC xlock -mode mountain + "Sierpinski" EXEC xlock -mode sierpinski + "Strange" EXEC xlock -mode strange + "Thornbird" EXEC xlock -mode thornbird + "Triangle" EXEC xlock -mode triangle + "Turtle" EXEC xlock -mode turtle + "Vines" EXEC xlock -mode vines + "Random" EXEC xlock -mode random -modelist allfractal -fullrandom +"Fractal" END + +"Geometry" MENU + "Braid" EXEC xlock -mode braid + "Fadeplot" EXEC xlock -mode fadeplot + "Helix" EXEC xlock -mode helix -fullrandom + "Hyper" EXEC xlock -mode hyper + "Ico" EXEC xlock -mode ico + "Kaleid" EXEC xlock -mode kaleid + "Laser" EXEC xlock -mode laser + "Lisa" EXEC xlock -mode lisa + "Lissie" EXEC xlock -mode lissie + "Penrose" EXEC xlock -mode penrose +ammann + "Penrose Ammann" EXEC xlock -mode penrose -ammann + "Petal" EXEC xlock -mode petal + "Qix" EXEC xlock -mode qix +complete + "Qix complete" EXEC xlock -mode qix -complete + "Rotor" EXEC xlock -mode rotor + "Shape" EXEC xlock -mode shape + "Sphere" EXEC xlock -mode sphere + "Spiral" EXEC xlock -mode spiral + "Spline" EXEC xlock -mode spline + "Random" EXEC xlock -mode random -modelist allgeometry -fullrandom +"Geometry" END + +"Space" MENU + "Bouboule" EXEC xlock -mode bouboule +use3d + "Bouboule3d" EXEC xlock -mode bouboule -use3d + "Galaxy" EXEC xlock -mode galaxy + "Grav" EXEC xlock -mode grav +trail +decay + "Grav Trail" EXEC xlock -mode grav -trail + "Grav Decay" EXEC xlock -mode grav -decay + "Rock" EXEC xlock -mode star -rock + "Star" EXEC xlock -mode star +rock +use3d +trek 0 + "Star3d" EXEC xlock -mode star -use3d + "Star Trek" EXEC xlock -mode star -trek 100 + "World" EXEC xlock -mode world + "Random Space" EXEC xlock -mode random -modelist allspace +"Space" END + +"Assorted" MENU + "Ball" EXEC xlock -mode ball + "Blot" EXEC xlock -mode blot + "Bounce" EXEC xlock -mode bounce + "Bubble" EXEC xlock -mode bubble + "Clock" EXEC xlock -mode clock + "Crystal" EXEC xlock -mode crystal + "Daisy" EXEC xlock -mode daisy + "Dclock" EXEC xlock -mode dclock + "Deco" EXEC xlock -mode deco + "Eyes" EXEC xlock -mode eyes +mouse + "Eyesptr" EXEC xlock -mode eyes -mouse + "Goop" EXEC xlock -mode goop + "Marquee" EXEC xlock -mode marquee + "Munch" EXEC xlock -mode munch + "Nose" EXEC xlock -mode nose + "Pacman" EXEC xlock -mode pacman + "Pyro" EXEC xlock -mode pyro +use3d + "Pyro3d" EXEC xlock -mode pyro -use3d + "Roll" EXEC xlock -mode roll + "Slip" EXEC xlock -mode slip + "Starfish" EXEC xlock -mode starfish -install + "Swarm" EXEC xlock -mode swarm +mouse + "Swarmptr" EXEC xlock -mode swarm -mouse + "Swirl" EXEC xlock -mode swirl -install + "Tetris" EXEC xlock -mode tetris + "Tube" EXEC xlock -mode tube -install + "Worm" EXEC xlock -mode worm +use3d + "Worm3d" EXEC xlock -mode worm -use3d + "Xjack" EXEC xlock -mode xjack +"Assorted" END + +"XPM" MENU + "Bat" EXEC xlock -mode bat + "Cartoon" EXEC xlock -mode cartoon + "Image" EXEC xlock -mode image + "Flag" EXEC xlock -mode flag + "Life" EXEC xlock -mode life + "Life1d" EXEC xlock -mode life1d + "Maze" EXEC xlock -mode maze + "Puzzle" EXEC xlock -mode puzzle + "Random" EXEC xlock -mode random -modelist allxpm -fullrandom +"XPM" END + +"GL" MENU + "Atlantis" EXEC xlock -mode atlantis + "Bubble3d" EXEC xlock -mode bubble3d + "Cage" EXEC xlock -mode cage + "Gears" EXEC xlock -mode gears + "Moebius" EXEC xlock -mode moebius + "Morph3d" EXEC xlock -mode morph3d + "Pipes" EXEC xlock -mode pipes + "Rubik" EXEC xlock -mode rubik + "Sproingies" EXEC xlock -mode sproingies + "Stairs" EXEC xlock -mode stairs + "Superquadrics" EXEC xlock -mode superquadrics + "Text3d" EXEC xlock -mode text3d -message "$LOGNAME" + "Random" EXEC xlock -mode random -modelist allgl -fullrandom +"GL" END + +"Marquee-Message" MENU + "Back Soon" EXEC xlock -mode marquee -message "$LOGNAME will be back soon." + "Overnight" EXEC xlock -mode marquee -message "$LOGNAME will be back in the morning." + "Rude" EXEC xlock -mode marquee -message "$LOGNAME not here, please go away!" +"Marquee-Message" END + +"Nose-Message" MENU + "Back Soon" EXEC xlock -mode nose -message "$LOGNAME will be back soon." + "Overnight" EXEC xlock -mode nose -message "$LOGNAME will be back in the morning." + "Rude" EXEC xlock -mode nose -message "$LOGNAME not here, please go away!" +"Nose-Message" END + +"Xjack-Message" MENU + "Crazy Boy" EXEC xlock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + "Crazy Girl" EXEC xlock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." +"Xjack-Message" END + +"Special" MENU + "Blank" EXEC xlock -mode blank + "Bomb" EXEC xlock -mode bomb + "Random nice" EXEC xlock -mode random -modelist allnice -fullrandom -neighbors 0 + "Random standard" EXEC xlock -mode random -modelist all-allgl -fullrandom -neighbors 0 + "Random all" EXEC xlock -mode random -modelist all -fullrandom -neighbors 0 + "Random 3d" EXEC xlock -mode random -modelist all3d -use3d -fullrandom + "Random ptr" EXEC xlock -mode random -modelist allmouse -mouse -fullrandom + "Random write" EXEC xlock -mode random -modelist allwrite -install -fullrandom +"Special" END +"ScreenLock" END + +"ScreenSaver" MENU +"Automata" MENU + "Ant" EXEC xlock -nolock -mode ant -neighbors 4 +truchet + "Ant Truchet" EXEC xlock -nolock -mode ant -neighbors 4 -truchet + "Bee" EXEC xlock -nolock -mode ant -neighbors 6 +truchet + "Bee Truchet" EXEC xlock -nolock -mode ant -neighbors 6 -truchet + "Bug" EXEC xlock -nolock -mode bug + "Demon" EXEC xlock -nolock -mode demon + "Dilemma" EXEC xlock -nolock -mode dilemma + "Life" EXEC xlock -nolock -mode life + "Life Callahan" EXEC xlock -nolock -mode life -callahan -size 7 + "Life1d" EXEC xlock -nolock -mode life1d + "Life3d" EXEC xlock -nolock -mode life3d + "Loop" EXEC xlock -nolock -mode loop + "Voters" EXEC xlock -nolock -mode voters + "Wator" EXEC xlock -nolock -mode wator + "Wire" EXEC xlock -nolock -mode wire + "Random" EXEC xlock -nolock -mode random -modelist allautomata -fullrandom -neighbors 0 +"Automata" END + +"Fractal" MENU + "Coral" EXEC xlock -nolock -mode coral + "Discrete" EXEC xlock -nolock -mode discrete + "Drift" EXEC xlock -nolock -mode drift -fullrandom + "Flame" EXEC xlock -nolock -mode flame + "Flow" EXEC xlock -nolock -mode flow + "Forest" EXEC xlock -nolock -mode forest + "Hop" EXEC xlock -nolock -mode hop -fullrandom + "IFS" EXEC xlock -nolock -mode ifs + "Julia" EXEC xlock -nolock -mode julia +mouse + "Juliaptr" EXEC xlock -nolock -mode julia -mouse + "Kumppa" EXEC xlock -nolock -mode kumppa + "Lightning" EXEC xlock -nolock -mode lightning + "Mandelbrot" EXEC xlock -nolock -mode mandelbrot -install + "Mountain" EXEC xlock -nolock -mode mountain + "Sierpinski" EXEC xlock -nolock -mode sierpinski + "Strange" EXEC xlock -nolock -mode strange + "Thornbird" EXEC xlock -nolock -mode thornbird + "Triangle" EXEC xlock -nolock -mode triangle + "Turtle" EXEC xlock -nolock -mode turtle + "Vines" EXEC xlock -nolock -mode vines + "Random" EXEC xlock -nolock -mode random -modelist allfractal -fullrandom +"Fractal" END + +"Geometry" MENU + "Braid" EXEC xlock -nolock -mode braid + "Fadeplot" EXEC xlock -nolock -mode fadeplot + "Helix" EXEC xlock -nolock -mode helix -fullrandom + "Hyper" EXEC xlock -nolock -mode hyper + "Ico" EXEC xlock -nolock -mode ico + "Kaleid" EXEC xlock -nolock -mode kaleid + "Laser" EXEC xlock -nolock -mode laser + "Lisa" EXEC xlock -nolock -mode lisa + "Lissie" EXEC xlock -nolock -mode lissie + "Penrose" EXEC xlock -nolock -mode penrose +ammann + "Penrose Ammann" EXEC xlock -nolock -mode penrose -ammann + "Petal" EXEC xlock -nolock -mode petal + "Qix" EXEC xlock -nolock -mode qix +complete + "Qix complete" EXEC xlock -nolock -mode qix -complete + "Rotor" EXEC xlock -nolock -mode rotor + "Shape" EXEC xlock -nolock -mode shape + "Sphere" EXEC xlock -nolock -mode sphere + "Spiral" EXEC xlock -nolock -mode spiral + "Spline" EXEC xlock -nolock -mode spline + "Random" EXEC xlock -nolock -mode random -modelist allgeometry +"Geometry" END + +"Space" MENU + "Bouboule" EXEC xlock -nolock -mode bouboule +use3d + "Bouboule3d" EXEC xlock -nolock -mode bouboule -use3d + "Galaxy" EXEC xlock -nolock -mode galaxy + "Grav" EXEC xlock -nolock -mode grav +trail +decay + "Grav Trail" EXEC xlock -nolock -mode grav -trail + "Grav Decay" EXEC xlock -nolock -mode grav -decay + "Rock" EXEC xlock -nolock -mode star -rock + "Star" EXEC xlock -nolock -mode star +rock +use3d +trek 0 + "Star3d" EXEC xlock -nolock -mode star -use3d + "Star Trek" EXEC xlock -nolock -mode star -trek 100 + "World" EXEC xlock -nolock -mode world + "Random Space" EXEC xlock -nolock -mode random -modelist allspace +"Space" END + +"Assorted" MENU + "Ball" EXEC xlock -nolock -mode ball + "Blot" EXEC xlock -nolock -mode blot + "Bounce" EXEC xlock -nolock -mode bounce + "Bubble" EXEC xlock -nolock -mode bubble + "Clock" EXEC xlock -nolock -mode clock + "Crystal" EXEC xlock -nolock -mode crystal + "Daisy" EXEC xlock -nolock -mode daisy + "Dclock" EXEC xlock -nolock -mode dclock + "Deco" EXEC xlock -nolock -mode deco + "Eyes" EXEC xlock -nolock -mode eyes +mouse + "Eyesptr" EXEC xlock -nolock -mode eyes -mouse + "Goop" EXEC xlock -nolock -mode goop + "Marquee" EXEC xlock -nolock -mode marquee + "Munch" EXEC xlock -nolock -mode munch + "Nose" EXEC xlock -nolock -mode nose + "Pacman" EXEC xlock -nolock -mode pacman + "Pyro" EXEC xlock -nolock -mode pyro +use3d + "Pyro3d" EXEC xlock -nolock -mode pyro -use3d + "Roll" EXEC xlock -nolock -mode roll + "Slip" EXEC xlock -nolock -mode slip + "Starfish" EXEC xlock -nolock -mode starfish -install + "Swarm" EXEC xlock -nolock -mode swarm +mouse + "Swarmptr" EXEC xlock -nolock -mode swarm -mouse + "Swirl" EXEC xlock -nolock -mode swirl -install + "Tetris" EXEC xlock -nolock -mode tetris + "Tube" EXEC xlock -nolock -mode tube -install + "Worm" EXEC xlock -nolock -mode worm +use3d + "Worm3d" EXEC xlock -nolock -mode worm -use3d + "Xjack" EXEC xlock -nolock -mode xjack +"Assorted" END + +"XPM" MENU + "Bat" EXEC xlock -nolock -mode bat + "Cartoon" EXEC xlock -nolock -mode cartoon + "Image" EXEC xlock -nolock -mode image + "Flag" EXEC xlock -nolock -mode flag + "Life" EXEC xlock -nolock -mode life + "Life1d" EXEC xlock -nolock -mode life1d + "Maze" EXEC xlock -nolock -mode maze + "Puzzle" EXEC xlock -nolock -mode puzzle + "Random" EXEC xlock -nolock -mode random -modelist allxpm -fullrandom +"XPM" END + +"GL" MENU + "Atlantis" EXEC xlock -nolock -mode atlantis + "Bubble3d" EXEC xlock -nolock -mode bubble3d + "Cage" EXEC xlock -nolock -mode cage + "Gears" EXEC xlock -nolock -mode gears + "Moebius" EXEC xlock -nolock -mode moebius + "Morph3d" EXEC xlock -nolock -mode morph3d + "Pipes" EXEC xlock -nolock -mode pipes + "Rubik" EXEC xlock -nolock -mode rubik + "Sproingies" EXEC xlock -nolock -mode sproingies + "Stairs" EXEC xlock -nolock -mode stairs + "Superquadrics" EXEC xlock -nolock -mode superquadrics + "Text3d" EXEC xlock -nolock -mode text3d -message "$LOGNAME" + "Random" EXEC xlock -nolock -mode random -modelist allgl -fullrandom +"GL" END + +"Marquee-Message" MENU + "Brilliant!" EXEC xlock -nolock -mode marquee -message "WOW! $LOGNAME, You're Brilliant!" + "Love You" EXEC xlock -nolock -mode marquee -message "You know, I Love You $LOGNAME." + "Available" EXEC xlock -nolock -mode marquee -message "Hey, I'm available now!" +"Marquee-Message" END + +"Nose-Message" MENU + "Brilliant!" EXEC xlock -nolock -mode nose -message "WOW! $LOGNAME, You're Brilliant!" + "Love You" EXEC xlock -nolock -mode nose -message "You know, I Love You $LOGNAME." + "Available" EXEC xlock -nolock -mode nose -message "Hey, I'm available now!" +"Nose-Message" END + +"Xjack-Message" MENU + "Crazy Boy" EXEC xlock -nolock -mode xjack -message "All work and no play makes $LOGNAME a dull boy." + "Crazy Girl" EXEC xlock -nolock -mode xjack -message "All work and no play makes $LOGNAME a dull girl." +"Xjack-Message" END + +"Special" MENU + "Blank" EXEC xlock -nolock -mode blank + "Bomb" EXEC xlock -nolock -mode bomb + "Random nice" EXEC xlock -nolock -mode random -modelist allnice -fullrandom -neighbors 0 + "Random standard" EXEC xlock -nolock -mode random -modelist all-allgl -fullrandom -neighbors 0 + "Random all" EXEC xlock -nolock -mode random -modelist all -fullrandom -neighbors 0 + "Random 3d" EXEC xlock -nolock -mode random -modelist all3d -use3d -fullrandom + "Random ptr" EXEC xlock -nolock -mode random -modelist allmouse -mouse -fullrandom + "Random write" EXEC xlock -nolock -mode random -modelist allwrite -fullrandom +"Special" END + +"ScreenSaver" END +"Lock_Saver" END diff --git a/etc/vtswitch.c b/etc/vtswitch.c new file mode 100644 index 00000000..d7405885 --- /dev/null +++ b/etc/vtswitch.c @@ -0,0 +1,122 @@ +/* Copyright (c) R. Cohen-Scali, 1998. */ + +/* + * 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. + * + * + */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#define CONSOLE "/dev/console" + +static char *progname = NULL; +static char errmsg[1024]; + +static void usage( int verb ) +{ + fprintf( stderr, "%s: usage: %s [-h] \n", progname, progname ); + if ( verb ) + { + fprintf( stderr, " Allows to enable/disable to VT switching ability\n" ); + fprintf( stderr, " -- %s on -- enable VT switching\n", progname ); + fprintf( stderr, " -- %s off -- disable VT switching\n", progname ); + fprintf( stderr, " Option -h display this message\n" ); + } + fprintf( stderr, "\n", progname, progname ); +} + +main( int argc, char **argv ) +{ + char *cmd = argv[1]; + int allow = 0, consfd = -1; + uid_t uid = -1; + struct stat consstat; + + /* Program name */ + progname =( progname = strrchr( argv[0], '/' ) ) ? progname +1 : argv[0]; + + /* Check args */ + if ( argc != 2 && argc != 3 ) + { + usage( 0 ); + exit( 1 ); + } + + /* Process -h */ + if ( !strcmp( cmd, "-h" ) || !strcmp( cmd, "--help" ) ) + { + usage( 1 ); + cmd = argv[2]; + if ( argc == 2 ) exit( 0 ); + } + + /* Process on/off (case insensitive) */ + if ( strcasecmp( cmd, "on" ) && strcasecmp( cmd, "off" ) ) + { + usage( 0 ); + exit( 1 ); + } + allow = !strcasecmp( cmd, "on" ); + + /* Check user is allowed to do it */ + uid = getuid(); + if ( stat( CONSOLE, &consstat ) == -1 ) + { + sprintf( errmsg, "%s: Cannot stat " CONSOLE, progname ); + perror( errmsg ); + exit( 1 ); + } + if ( uid != consstat.st_uid ) + { + fprintf(stderr, + "%s: Sorry, you are not allowed to %slock" + " VT switching: Operation not permitted\n", + progname, + allow ? "un" : "" ); + exit( 1 ); + } + seteuid( 0 ); + + /* Open console */ + if ( ( consfd = open( CONSOLE, O_RDWR ) ) == -1 ) + { + sprintf( errmsg, "%s: Cannot open " CONSOLE, progname ); + perror( errmsg ); + seteuid( uid ); + exit( 1 ); + } + + /* Do it */ + if ( ioctl( consfd, allow?VT_UNLOCKSWITCH:VT_LOCKSWITCH ) == -1 ) + { + sprintf( errmsg, "%s: Cannot %slock VT switching for " CONSOLE, progname, allow ? "un" : "" ); + perror( errmsg ); + seteuid( uid ); + exit( 1 ); + } + + /* Terminate */ + close( consfd ); + fprintf( stdout, "VT switching %s\n", allow ? "enabled" : "disabled" ); + seteuid( uid ); + exit( 0 ); +} diff --git a/etc/xlock.java b/etc/xlock.java new file mode 100644 index 00000000..e28339c6 --- /dev/null +++ b/etc/xlock.java @@ -0,0 +1,28 @@ +// charles vidal 28.08.97 +// the main file , with the main class +// to compile javac xlock.java +// to launch java xlock +// in a browser you could show the GUI but , not launch the program + +import java.awt.*; +import xlockFrame; + +class xlock extends java.applet.Applet +{ +int isapp=0; +public void init(){ +Frame theAppWindow = new Frame("FrameTest"); +xlockFrame theApplet = new xlockFrame(); +theApplet.init(); +theApplet.start(); +theAppWindow.add("Center",theApplet); +theAppWindow.resize(350,400); +theAppWindow.show(); +} +public static void main(String args[]) { +xlock xpj = new xlock(); +xpj.init(); +xpj.start(); +} + +} diff --git a/etc/xlock.sh b/etc/xlock.sh new file mode 100755 index 00000000..7ff3f107 --- /dev/null +++ b/etc/xlock.sh @@ -0,0 +1,10 @@ +#!/bin/sh - +# Wrapper script to get better performance +# by Tim Auckland +# It simply suspends all netscape and JAVA applications and resumes them +# once xlock exits. These applications poll when idle and that is quite +# inconsiderate when you need all the cycles you can get for a good +# screensaver. +jobs=`ps -u $USER| awk '/jre/||/netscape/{print $1}'` +[ -n "$jobs" ] && trap 'kill -CONT $jobs' 0 1 2 14 15 && kill -STOP $jobs +/usr/local/bin/xlock "$@" diff --git a/etc/xlock.staff b/etc/xlock.staff new file mode 100644 index 00000000..ec59a91a --- /dev/null +++ b/etc/xlock.staff @@ -0,0 +1,4 @@ +root +wheel +bagleyd +david diff --git a/etc/xlock.tcl b/etc/xlock.tcl new file mode 100755 index 00000000..a039e0e2 --- /dev/null +++ b/etc/xlock.tcl @@ -0,0 +1,742 @@ +#!/usr/X11/bin/wish -f + +#charles vidal 1998 +# update Sun Oct 18 1998 +# Add the menu file with load resources +# and the exit button +# Add the load_process procedure loading +# the ressource file ~/XLock +# + +#function find in demo: mkStyles.tcl +# The procedure below inserts text into a given text widget and +# applies one or more tags to that text. The arguments are: +# +# w Window in which to insert +# text Text to insert (it's inserted at the "insert" mark) +# args One or more tags to apply to text. If this is empty +# then all tags are removed from the text. +set bgcolor "" +set fgcolor "" +set ftname "" +set mftname "" +set usernom "" +set passmot "" +set XLock_validate "" +set XLock_invalid "" +set XLock_program "" +set geometrie "" +set icogeometrie "" +set XLock_info "" +set indxhelp "" +set messagesfile "" +set messagefile "" +set bitmap "" + +proc openfilesel { var } { +upvar $var toto +set toto [ tk_getOpenFile -parent .] +return toto +} + +proc insertWithTags {w text args} { + set start [$w index insert] + $w insert insert $text + foreach tag [$w tag names $start] { + $w tag remove $tag $start insert + } + foreach i $args { + $w tag add $i $start insert + } +} + +# Function for the help +proc mkHelpCheck { w args } { + set nbf 0 + foreach i $args { + set nbf [ expr $nbf +1 ] + $w insert insert "\n" + checkbutton $w.c$nbf -variable [lindex $i 0] -text [lindex $i 0] + $w window create {end lineend} -window $w.c$nbf + $w insert insert " [lindex $i 1] " + } +} + +proc mkHelpEntry { w args } { + set nbf 0 + foreach i $args { + set nbf [ expr $nbf +1 ] + insertWithTags $w "\n [lindex $i 0] " underline + entry $w.e$nbf -textvariable [lindex $i 1] + $w window create {end lineend} -window $w.e$nbf + $w insert insert "\n[lindex $i 2] " + } +} + +# +proc whichcolor { which } { + global fgcolor + global bgcolor + if {$which == "RESETFG"} {set fgcolor ""} + if {$which == "RESETBG"} {set bgcolor ""} + if ($tk_version>4) then { + if {$which== "FG" } {set fgcolor [tk_chooseColor -initialcolor $fgcolor -title "foreground color"]; + puts $fgcolor + } + if {$which == "BG"} {set bgcolor [tk_chooseColor -initialcolor $bgcolor -title "background color"]; + puts $bgcolor + } + } else + { + if {$which== "FG" } {set fgcolor [.color.frame.names get [.color.frame.names curselection]];} + if {$which == "BG"} {set bgcolor [.color.frame.names get [.color.frame.names curselection]];} + } +} + +proc mkColor { what } { + if ($tk_version>4) then { + whichcolor $what; destroy .color + } else + { + toplevel .color + wm title .color "Color" + frame .color.frame -borderwidth 10 + frame .color.frame2 -borderwidth 10 + set w .color.frame + label $w.msg0 -text "Color Options" + pack $w.msg0 -side top + foreach i {/usr/local/lib/X11/rgb.txt /usr/lib/X11/rgb.txt + /X11/R5/lib/X11/rgb.txt /X11/R4/lib/rgb/rgb.txt} { + if ![file readable $i] { + continue; + } + set f [open $i] + listbox .color.frame.names -yscrollcommand ".color.frame.scroll set" \ + -relief sunken -borderwidth 2 -exportselection false + bind .color.frame.names { + .color.test configure -bg [.color.frame.names get [.color.frame.names curselection]] + } + scrollbar .color.frame.scroll -orient vertical -command ".color.frame.names yview" \ + -relief sunken -borderwidth 2 + pack .color.frame.names -side left + pack .color.frame.scroll -side right -fill both + pack .color.frame -fill x + while {[gets $f line] >= 0} { + if {[llength $line] == 4} { + .color.frame.names insert end [lindex $line 3] + } + } + close $f + label .color.test -height 5 -width 20 + button .color.frame2.cancel -text Cancel -command "destroy .color" + button .color.frame2.ok -text OK -command "whichcolor $what; destroy .color" + button .color.frame2.reset -text Reset -command "whichcolor RESET$what; destroy .color" + pack .color.test + pack .color.frame2.ok .color.frame2.cancel .color.frame2.reset -side left -fill x + pack .color.frame2 -fill both + break; + } + } +} + +# moving in text by the list +proc moveintext { indx } { +upvar indxhelp t1 + .help.f.t yview [ lindex $t1 $indx ] + +} +#---------------------- +# Help ... +proc Helpxlock {} { + global indxhelp + toplevel .help + wm title .help "Help About Xlock" + frame .help.f + scrollbar .help.f.s -orient vertical -command {.help.f.t yview} + pack .help.f -expand yes -fill both + pack .help.f.s -side right -fill y -expand yes + text .help.f.t -yscrollcommand {.help.f.s set} -wrap word -width 60 -height 20 \ + -setgrid 1 + + listbox .help.f.names -width 20 -height 20 + + bind .help.f.names { + set titi [eval .help.f.names curselection] + moveintext $titi + } + + pack .help.f.names .help.f.t -expand y -fill both -side left + set w .help.f.t + $w tag configure big -font -Adobe-Courier-Bold-R-Normal-*-140-* + + foreach i {{"Xlock Help" { Locks the X server still the user enters their pass\ +word at the keyboard. While xlock is running, all new\ +server connections are refused. The screen saver is dis\ +abled. The mouse cursor is turned off. The screen is\ +blanked and a changing pattern is put on the screen. If a\ +key or a mouse button is pressed then the user is prompted\ +for the password of the user who started xlock. +If the correct password is typed, then the screen is\ +unlocked and the X server is restored. When typing the\ +password Control-U and Control-H are active as kill and\ +erase respectively. To return to the locked screen, click\ +in the small icon version of the changing pattern.} 0 } + {"Options" {The option sets the X11 display to lock.\ +xlock locks all available screens on a given server,\ +and restricts you to locking only a local server such\ +as unix::00,, localhost::00,, or ::00 unless you set the\ + -remote option.} 0 }\ + {"-name" {is used instead of XLock when looking for resources to configure xlock.} 1 } + {"-mode" {As of this writing there are 80+ display modes supported (plus one more for random selection of one of the 80+).} 1 } + {"-delay" {It simply sets the number of microseconds to delay +between batches of animations. In blank mode, it is important to set this to +some small number of microseconds, because the keyboard and mouse are only checked after each delay, so you cannot set the delay too high, but a delay of +zero would needlessly consume cpu checking for mouse and keyboard input in a tight loop, since blank mode has no work to do.} 1 } + {"-saturation" {This option sets saturation of the color ramp . 0 is grayscale and 1 is very rich color. 0.4 is a nice pastel.} 1 } + {"-username" {text string to use for Name prompt} 1 }\ + {"-password" {text string to use for Password prompt} 1 }\ + {"-info" {text string to use for instructions} 1 }\ + {"-validate" {the message shown while validating the password, +defaults to \"Validating login...\"} 1 }\ + {"-invalid" {the message shown when password is invalid, defaults to \"Invalid login.\"} 1 }\ + {"-geometry" {This option sets the size and offset of the lock +window (normally the entire screen). The entire screen format is still used for entering the password. The purpose is to see the screen even though it is locked. This should be used with caution since many of the modes will fail if the windows are far from square or are too small (size must be greater +than 0x0). This should also be used with esaver to protect screen from phosphor burn.} 1 }\ + {"-icongeometry" {this option sets the size of the iconic screen (normally 64x64) seen when entering the password. This should be used with caution since many of the modes will fail if the windows are far from square +or are too small (size must be greater than 0x0). The greatest size is +256x256. There should be some limit so users could see who has locked the screen. Position information of icon is ignored.} 1 } + {"-font" { Ths option sets the font to be used on the prompt screen.} 1 } + { "-fg " { This option sets the color of the text on the password screen.} 1 } + {"-bg" { This option sets the color of the background on the password screen.} 1 } + {"-forceLogout" { This option sets the auto-logout. This might not be enforced depending how your system is configured.} 1 }} { + lappend indxhelp [$w index current] + if { [lindex $i 2] == 1 } then {.help.f.names insert end " [lindex $i 0]"} else {.help.f.names insert end " [lindex $i 0]"} + insertWithTags $w "[lindex $i 0] " big + $w insert end "\n" + $w insert end [lindex $i 1] + $w insert end "\n" + } + lappend indxhelp [$w index current] + insertWithTags $w "Options boolean" big + $w insert end "\n" + .help.f.names insert end "Options boolean" + mkHelpCheck $w {XLock_mono {turn on/off monochrome override}}\ + {nolock {trun on/off no password required mode}}\ + {remote {turn on/off remote host access}}\ + {allowroot {turn on/off allow root password mode (ignored)}}\ + {enablesaver {turn on/off enable X server screen saver}}\ + {allowaccess {turn on/off access of the terminal X}}\ + {grabmouse {turn on/off grabbing of mouse and keyboard}}\ + {echokeys {turn on/off echo \'?\' for each password key}}\ + {usefirst {turn on/off using the first char typed in password}}\ + {verbose {turn on/off verbose mode}}\ + {inwindow {turn on/off making xlock run in a window}}\ + {inroot {turn on/off making xlock run in the root window}}\ + {timeelapsed {turn on/off clock}}\ + {install {whether to use private colormap if needed (yes/no)}}\ + {sound {whether to use sound if configured for it (yes/no}} + button .help.ok -text OK -command "destroy .help" + pack .help.ok +} + +# Create toplevel Author and Maintener. +proc mkAuthor {} { + toplevel .author + wm title .author "Author and Maintener of xlock" + frame .author.frame -borderwidth 10 + set w .author.frame + + label $w.msg0 -text "Author and Maintener of xlock" + label $w.msg1 -text "Maintained by: David A. Bagley (bagleyd@bigfoot.com)" + label $w.msg2 -text "Original Author: Patrick J. Naughton (naughton@eng.sun.com)" + label $w.msg3 -text "Mailstop 21-14 Sun Microsystems Laboratories," + label $w.msg4 -text "Inc. Mountain View, CA 94043 15//336-1080" + label $w.msg5 -text "with many additional contributors" + pack $w.msg0 $w.msg1 $w.msg2 $w.msg3 $w.msg4 $w.msg5 -side top + + label $w.msg6 -text "xlock.tcl\n created by charles VIDAL\n (author of flag mode and xmlock launcher )" + pack $w.msg6 -side top + + button .author.ok -text OK -command "destroy .author" + pack $w .author.ok +} + +proc mkFileDialog { nom titre args } { + toplevel .$nom + wm title .$nom "$titre" + frame .$nom.frame -borderwidth 10 + frame .$nom.frame2 -borderwidth 10 + frame .$nom.frame.frame4 -borderwidth 10 + set w .$nom.frame + set w2 .$nom.frame2 + set w4 .$nom.frame.frame4 + set nbf 0 + + label $w.msg0 -text "$titre" + pack $w.msg0 -side top + foreach i $args { + set nbf [ expr $nbf +1 ] + frame $w4.f$nbf + label $w4.f$nbf.l$nbf -text [lindex $i 0] + entry $w4.f$nbf.e$nbf -textvariable [lindex $i 1] + button $w4.f$nbf.b$nbf -text "..." -command "openfilesel [lindex $i 1]" + pack $w4.f$nbf.l$nbf $w4.f$nbf.e$nbf $w4.f$nbf.b$nbf -side left -expand yes + pack $w4.f$nbf -expand yes + } + button $w2.ok -text OK -command "destroy .$nom" + button $w2.cancel -text Cancel -command "destroy .$nom" + pack $w -side top -expand yes + pack $w4 -side right -expand yes + pack $w2.ok $w2.cancel -side left -fill x -expand yes + pack $w2 -side bottom -expand yes +} + +proc mkDialog { nom titre args } { + toplevel .$nom + wm title .$nom "$titre" + frame .$nom.frame -borderwidth 10 + frame .$nom.frame2 -borderwidth 10 + frame .$nom.frame.frame3 -borderwidth 10 + frame .$nom.frame.frame4 -borderwidth 10 + set w .$nom.frame + set w2 .$nom.frame2 + set w3 .$nom.frame.frame3 + set w4 .$nom.frame.frame4 + set nbf 0 + + label $w.msg0 -text "$titre" + pack $w.msg0 -side top + foreach i $args { + set nbf [ expr $nbf +1 ] + label $w3.l$nbf -text [lindex $i 0] + entry $w4.e$nbf -textvariable [lindex $i 1] + pack $w3.l$nbf + pack $w4.e$nbf + } + button $w2.ok -text OK -command "destroy .$nom" + button $w2.cancel -text Cancel -command "destroy .$nom" + pack $w -side top + pack $w3 -side left + pack $w4 -side right + pack $w2.ok $w2.cancel -side left -fill x + pack $w2 -side bottom +} + +proc mkMessage {} { + global passmot + global XLock_validate + global XLock_invalid + global XLock_info + mkDialog message {Message Options} \ + {"message password" passmot} \ + {"validate string" XLock_validate} \ + {"invalid string" XLock_invalid} \ + {"info string" XLock_info} +} + +proc mkGeometry {} { + global geometrie + global icogeometrie + mkDialog geometry {Geometry Options} \ + {"geometry" geometrie} \ + {"icon geometry" icogeometrie} +} + +proc mkFileOption {} { + global messagesfile + global messagefile + global bitmap + mkFileDialog fileoption {Files Options} \ + {"messagesfile" messagesfile} \ + {"messagefile" messagefile} \ + {"bitmap" bitmap} +} + +proc whichfont { which } { + global ftname + global mftname + if {$which== "FONT" } {set ftname [.font.frame.names get [.font.frame.names curselection]];} + if {$which == "MFONT"} {set mftname [.font.frame.names get [.font.frame.names curselection]];} + if {$which == "RESETFONT"} {set ftname ""} + if {$which == "RESETMFONT"} {set mftname ""} +} + +#this function should be erase in the newer version... +proc mkFont { What } { + toplevel .font + wm title .font "Font Options" + label .font.label -text "ABCDEFGH\nIJKabedfg\nhijkmnopq" + frame .font.frame -borderwidth 10 + frame .font.frame2 -borderwidth 10 + set w .font.frame + label $w.msg0 -text "Font Options" + pack $w.msg0 -side top + eval exec "xlsfonts \> /tmp/xlsfont.tmp" + set f [open "/tmp/xlsfont.tmp"] + listbox .font.frame.names -yscrollcommand ".font.frame.scroll set" \ + -xscrollcommand ".font.scroll2 set" -setgrid 1 \ + -exportselection false + bind .font.frame.names { + .font.test configure -font [.font.frame.names get [.font.frame.names curselection]] + } + scrollbar .font.frame.scroll -orient vertical -command ".font.frame.names yview" \ + -relief sunken -borderwidth 2 + scrollbar .font.scroll2 -orient horizontal -command ".font.frame.names xview" \ + -relief sunken -borderwidth 2 + while {[gets $f line] >= 0} { + .font.frame.names insert end $line + } + close $f + + eval exec "/bin/rm -f /tmp/xlsfont.tmp" + pack .font.frame.names -side left -expand y -fill both + pack .font.frame.scroll -side right -fill both + pack .font.frame -fill x + pack .font.scroll2 -fill both + label .font.test -text "ABCDEFGHIJKabedfghijkmnopq12345" + pack .font.test + + button .font.frame2.cancel -text Cancel -command "destroy .font" + button .font.frame2.reset -text Reset -command "whichfont RESET$What;destroy .font" + button .font.frame2.ok -text OK -command "whichfont $What;destroy .font" + pack .font.frame2.ok .font.frame2.cancel .font.frame2.reset -side left -fill both + pack .font.frame2 -fill both + + #frame $w.fontname + #label $w.fontname.l1 -text "font name" + #entry $w.fontname.e1 -relief sunken + #frame $w.specfont + #label $w.specfont.l2 -text "specifique font name" + #entry $w.specfont.e2 -relief sunken + #pack $w.fontname $w.specfont + #pack $w.fontname.l1 -side left + #pack $w.specfont.l2 -side left + #pack $w.fontname.e1 $w.specfont.e2 -side top -pady 5 -fill x + #button .font.frame2.ok -text OK -command "destroy .font" + #button .font.frame2.cancel -text Cancel -command "destroy .font" + #pack $w .font.frame2.ok .font.frame2.cancel -side left -fill x + #pack .font.frame2 -side bottom +} + +proc mkEntry {} { + global usernom + global XLock_program + mkDialog option {User Options} \ + {"user name" usernom} \ + {"program name" XLock_program} +} + +proc Affopts { device } { + +#options booleans + global XLock_mono + global nolock + global remote + global allowroot + global enablesaver + global allowaccess + global grabmouse + global echokeys + global usefirst + global install + global sound + + global fgcolor + global bgcolor + global ftname + global mftname + + global usernom + global passmot + global XLock_validate + global XLock_invalid + global XLock_program + global geometrie + global icogeometrie + global XLock_info + global messagesfile + global messagefile + global bitmap + + set linecommand "xlock " + + if {$device == 1} {append linecommand "-inwindow "} elseif {$device == 2} {append linecommand "-inroot "} + if {$bgcolor!=""} {append linecommand "-bg $bgcolor "} + if {$fgcolor!=""} {append linecommand "-fg $fgcolor "} + if {$ftname!=""} {append linecommand "-font $ftname "} + if {$mftname!=""} {append linecommand "-messagefont $mftname "} +#entry action + if {$usernom!=""} {append linecommand "-username $usernom "} + if {$passmot!=""} {append linecommand "-password $passmot "} + if {$XLock_validate!=""} {append linecommand "-validate $XLock_validate "} + if {$XLock_invalid!=""} {append linecommand "-invalid $XLock_invalid "} + if {$XLock_program!=""} {append linecommand "-program $XLock_program "} + if {$geometrie!=""} {append linecommand "-geometry $geometrie "} + if {$icogeometrie!=""} {append linecommand "-icongeometry $icogeometrie "} + if {$messagesfile!=""} {append linecommand "-messagesfile $messagesfile "} + if {$bitmap!=""} {append linecommand "-bitmap $bitmap "} + if {$icogeometrie!=""} {append linecommand "-icongeometry $icogeometrie "} + if {$XLock_info!=""} {append linecommand "-info $XLock_info "} +#check actions + if { $XLock_mono == 1 } {append linecommand "-mono "} + if { $install == 1 } {append linecommand "+install "} + if { $sound == 1 } {append linecommand "+sound "} + if { $nolock == 1 } {append linecommand "-nolock "} + if { $remote == 1 } {append linecommand "-remote "} + if { $allowroot == 1 } {append linecommand "-allowroot "} + if { $enablesaver == 1 } {append linecommand "-enablesaver "} + if { $allowaccess == 1 } {append linecommand "-allowaccess "} + if { $grabmouse == 1 } {append linecommand "-grabmouse "} + if { $echokeys == 1 } {append linecommand "-echokeys "} + if { $usefirst == 1 } {append linecommand "-usefirst "} + append linecommand "-mode " + append linecommand [.listscrol.list get [eval .listscrol.list curselection]] + puts $linecommand + eval exec $linecommand +} + +proc load_ressource { } { + global XLock_invalid + global XLock_validate + global XLock_info + global XLock_program + +set filename "" + +openfilesel filename + +set f [ open $filename r ] +while { ! [eof $f ] } { + gets $f line + switch -regexp $line { + {^XLock\.[a-zA-Z]+:} { + if { [ regexp -nocase {\: $} tyty ]} { + } + regsub {^} $line "set " line2 + regsub {XLock\.} $line2 "XLock_" line3 + regsub {: } $line3 " \"" line4 + regsub {on$} $line4 "1" line5 + regsub {off$} $line4 "0" line5 + eval "$line5\"" + } + {^XLock\.[a-zA-Z]+\.[a-zA-Z]+:[ \t]*[a-zA-Z0-9]+$} { + regsub {^} $line "set " line2 + regsub {XLock\.} $line2 "XLock_" line3 + regsub {\.} $line3 "(" line4 + regsub {: } $line4 ") \"" line5 + eval "$line5\"" + } +} +} +} + +# Creation of GUI + +wm title . "xlock launcher" +. configure -cursor top_left_arrow +frame .menu -relief raised -borderwidth 1 +menubutton .menu.button -text "switches" -menu .menu.button.check +pack .menu -side top -fill x + +global XLock_mono +global sound +global install +global nolock +global remote +global allowroot +global enablesaver +global allowaccess +global grabmouses +global echokeys +global usefirst + +global usernom +global passmot +global geometrie +global icogeometrie +global XLock_info + +# Creation of GUI + +#Creation of menu +set fileressource "" + +menubutton .menu.buttonf -text "file" -menu .menu.buttonf.file +menu .menu.buttonf.file +set FILE .menu.buttonf.file +$FILE add command -label "Load ressource" -command "load_ressource" +$FILE add command -label "exit" -command "exit" + +menu .menu.button.check +set CHECK .menu.button.check + +#menu with les check buttons +$CHECK add check -label "mono" -variable XLock_mono +$CHECK add check -label "nolock" -variable nolock +$CHECK add check -label "remote" -variable remote +$CHECK add check -label "allowroot" -variable allowroot +$CHECK add check -label "enablesaver" -variable enablesaver +$CHECK add check -label "allowaccess" -variable allowaccess +$CHECK add check -label "grabmouse" -variable grabmouse +$CHECK add check -label "echokeys" -variable echokeys +$CHECK add check -label "usefirst" -variable usefirst +$CHECK add check -label "install" -variable install +$CHECK add check -label "sound" -variable sound + +menubutton .menu.button2 -text "options" -menu .menu.button2.options +menu .menu.button2.options +set OPTIONS .menu.button2.options +#les options +$OPTIONS add command -label "generals options" -command "mkEntry" +$OPTIONS add command -label "font to use for password prompt" -command "mkFont FONT" +$OPTIONS add command -label "font for a specific mode" -command "mkFont MFONT" + + +$OPTIONS add command -label "geometry options" -command "mkGeometry" +$OPTIONS add command -label "file options" -command "mkFileOption" +$OPTIONS add command -label "message options" -command "mkMessage" + +#Color +menubutton .menu.button4 -text "color" -menu .menu.button4.color +menu .menu.button4.color +set COLOR .menu.button4.color +#if {$tk_version < 4} then { +#$COLOR add command -label "foreground options for password" -command "mkColor FG" +#$COLOR add command -label "background options for password" -command "mkColor BG" +#} +#else { +$COLOR add command -label "foreground options for password" -command "tk_chooseColor" +$COLOR add command -label "background options for password" -command "tk_chooseColor" +#} +menubutton .menu.button3 -text "help" -menu .menu.button3.help +menu .menu.button3.help +set HELP .menu.button3.help +$HELP add command -label "about xlock" -command "Helpxlock" +$HELP add command -label "about author" -command "mkAuthor" + +pack .menu.buttonf .menu.button .menu.button2 .menu.button4 -side left +pack .menu.button3 -side right + +#--------------------------- +#creation de la liste +#--------------------------- +frame .listscrol -borderwidth 4 -relief ridge +set LISTSCROL .listscrol +scrollbar $LISTSCROL.scroll -relief sunken -command "$LISTSCROL.list yview" +listbox $LISTSCROL.list -yscroll "$LISTSCROL.scroll set" + +#--------------------------- +#insert all modes in list +#--------------------------- +$LISTSCROL.list insert 0 \ +ant\ +atlantis\ +ball\ +bat\ +blot\ +bouboule\ +bounce\ +braid\ +bubble\ +bubble3d\ +bug\ +cage\ +cartoon\ +clock\ +coral\ +crystal\ +daisy\ +dclock\ +deco\ +demon\ +dilemma\ +discrete\ +drift\ +eyes\ +fadeplot\ +flag\ +flame\ +flow\ +forest\ +galaxy\ +gears\ +goop\ +grav\ +helix\ +hop\ +hyper\ +ico\ +ifs\ +image\ +julia\ +kaleid\ +kumppa\ +laser\ +life\ +life1d\ +life3d\ +lightning\ +lisa\ +lissie\ +loop\ +mandelbrot\ +marquee\ +maze\ +moebius\ +morph3d\ +mountain\ +munch\ +nose\ +pacman\ +penrose\ +petal\ +pipes\ +puzzle\ +pyro\ +qix\ +roll\ +rotor\ +rubik\ +shape\ +sierpinski\ +slip\ +sphere\ +spiral\ +spline\ +sproingies\ +stairs\ +star\ +starfish\ +strange\ +superquadrics\ +swarm\ +swirl\ +tetris\ +thornbird\ +triangle\ +tube\ +turtle\ +vines\ +voters\ +wator\ +wire\ +world\ +worm\ +xjack\ +blank + + +pack $LISTSCROL.scroll -side right -fill y +pack $LISTSCROL.list -side left -expand yes -fill both +pack $LISTSCROL -fill both -expand yes + +frame .buttons -borderwidth 4 -relief ridge +set BUTTON .buttons +button $BUTTON.launch -text "Launch" -command "Affopts 0" +button $BUTTON.launchinW -text "Launch in Window" -command "Affopts 1" +button $BUTTON.launchinR -text "Launch in Root" -command "Affopts 2" +button $BUTTON.quit -text Quit -command "exit" +pack $BUTTON.launch $BUTTON.launchinW $BUTTON.launchinR -side left +pack $BUTTON.quit -side right +pack $BUTTON -fill x -side bottom + diff --git a/etc/xlockFrame.java b/etc/xlockFrame.java new file mode 100644 index 00000000..343e7085 --- /dev/null +++ b/etc/xlockFrame.java @@ -0,0 +1,287 @@ +// charles vidal +// the GUI definition and the handler event +import java.applet.*; +import java.awt.*; +import java.lang.Runtime; + +public class xlockFrame extends Applet { + +public static final int nbcoption=9; +public static final int nbbooleanopt=14; +Button blaunch; +Button blaunchinw; +Button bquit; +Choice coptions; +TextField foroptions; + List lst ; +int currentOption=0; + +MyFrameError mfe; + +boolean isinapp=false; + +// Array of option name +String[] nomOption={"Name program", +"File", +"Message Password", +"Message Valid", +"Message Invalid", +"Prompt", +"Fonts", +"Geometry","Display"}; + +String[] valueOption={"","","","","","","","",""}; +String[] cmdlineOption={"-program","-messagefile","-password","-validate","-invalid","","-font","-geometry","-display"}; + +// Array of option boolean name +String[] booleanOption={ +"-mono ", +"-nolock ", +"-remote ", +"-allowroot ", +"-enablesaver ", +"-allowaccess ", +"-grabmouse ", +"-echokeys ", +"-usefirst ", +"-verbose ", +"-inroot ", +"-timeelapsed ", +"-install ", +"-use3d "}; +Checkbox bopt[]=new Checkbox[15]; + public void init() + { + Frame theAppWindow = new Frame("xlockFrame"); + Panel Panel1 = new Panel(); + Panel Panel2 = new Panel(); + Panel Panel3 = new Panel(); + setLayout(new BorderLayout(10,10)); + + lst = new List(); + +coptions=new Choice(); +for (int i=0;i 64, one must increase points NUMPTS; +also to fit most screens and especially the iconified window, +one should have the size < 32x32.\n\n"; +&search; +print "\npoints = $PTS; size = ${X}x$Y\n"; + +sub search { + local ($row, $col, $firstrow, $firstcol); + local ($i, $j, $found, $c, $tempx, $tempy); + local (@array); + + + $row = $col = 0; + $firstrow = -1; + $firstcol = 80; + $PTS = $X = $Y = 0; + while (<>) { + if (!($_ =~ /^#/)) + { + @chars = split(//); + $col = 0; + foreach $c (@chars) { + if ($c =~ /[\*0O]/) { + $col++; + if ($firstrow < 0) { + $row = $firstrow = 1; + } + if ($col < $firstcol) { + $firstcol = $col; + } + if ($row > $Y) { + $Y = $row; + } + if ($col > $X) { + $X = $col; + } + $array{$col, $row} = 1; + $PTS++; + } elsif ($c =~ /[\.]/) { + $col++; + } + } + $row++; + } + } + $col = $X - $firstcol + 1; + $row = $Y; + print " {\n "; + for ($j = 0; $j <= $Y; $j++) { + $found = 0; + for ($i = 0; $i <= $X; $i++) { + if ($array{$i, $j}) { + $found = 1; + $tempx = $i - int(($col + 2) / 2) - $firstcol + 1; + $tempy = $j - int(($row + 2) / 2); + printf "$tempx, $tempy, "; + } + } + if ($found) { + print "\n "; + } + } + print "127\n },\n"; + $X = $col; +} diff --git a/etc/xlocklife.pl b/etc/xlocklife.pl new file mode 100755 index 00000000..85754f0b --- /dev/null +++ b/etc/xlocklife.pl @@ -0,0 +1,81 @@ +#!/usr/bin/perl +# This is used to add life to life +# This is a QUICK hack to convert life files to xlock's life format. +# Patterns MUST have <= 64 pts at start for life.c to use the data generated +# Below is an example of a life file without the first initial #'s +# Call the file piston.life and run it like xlocklife.pl < piston.life +#piston.life +##P -10 -3 Treated as a comment, program finds own center +#..........*........... +#..........****........ +#**.........****....... +#**.........*..*.....** +#...........****.....** +#..........****........ +#..........*........... + +print " +Drop these points in life.c, within the 'patterns' array. +Note if the number of points > 64, one must increase points NUMPTS; +also to fit most screens and especially the iconified window, +one should have the size < 32x32.\n\n"; +&search; +print "\npoints = $PTS; size = ${X}x$Y\n"; + +sub search { + local ($row, $col, $firstrow, $firstcol); + local ($i, $j, $found, $c, $tempx, $tempy); + local (@array); + + + $row = $col = 0; + $firstrow = -1; + $firstcol = 80; + $PTS = $X = $Y = 0; + while (<>) { + if (!($_ =~ /^#/)) + { + @chars = split(//); + $col = 0; + foreach $c (@chars) { + $col++; + if ($c =~ /[\*0O]/) { + if ($firstrow < 0) { + $row = $firstrow = 1; + } + if ($col < $firstcol) { + $firstcol = $col; + } + if ($row > $Y) { + $Y = $row; + } + if ($col > $X) { + $X = $col; + } + $array{$col, $row} = 1; + $PTS++; + } + } + $row++; + } + } + $col = $X - $firstcol + 1; + $row = $Y; + print " {\n "; + for ($j = 0; $j <= $Y; $j++) { + $found = 0; + for ($i = 0; $i <= $X; $i++) { + if ($array{$i, $j}) { + $found = 1; + $tempx = $i - int(($col + 2) / 2) - $firstcol + 1; + $tempy = $j - int(($row + 2) / 2); + printf "$tempx, $tempy, "; + } + } + if ($found) { + print "\n "; + } + } + print "127\n },\n"; + $X = $col; +} diff --git a/etc/xlockranddur.pl b/etc/xlockranddur.pl new file mode 100755 index 00000000..dea1046b --- /dev/null +++ b/etc/xlockranddur.pl @@ -0,0 +1,6 @@ +#!/usr/bin/perl +# xarand + open(S,"/usr/games/fortune|wc|"); + @numbers = split(" ",); + print int $numbers[2]/3; + diff --git a/etc/xlockrandimage.pl b/etc/xlockrandimage.pl new file mode 100755 index 00000000..1b185d96 --- /dev/null +++ b/etc/xlockrandimage.pl @@ -0,0 +1,28 @@ +#!/usr/bin/perl +# This is used if the RANDIMAGEFILE switch does not work so instead of: +# xlock -imagefile [ DIRECTORY | FILE ] [other xlock options] +# try +# randimagefile.pl [DIRECTORY | FILE] [other xlock options] +# By the way the typical other xlock options that would be used here are +# -mode [image | puzzle] -install + +$file = shift(@ARGV); +if ($file eq "") { + print "\nUsage: $0 [DIRECTORY | FILE] [other xlock options]\n"; + print "\tother xlock options typically are: -mode [image | puzzle] -install\n"; + exit 1; +} + +getrandfile(); +#printf "xlock -imagefile $file @ARGV\n"; +system "xlock -imagefile $file @ARGV"; + +sub getrandfile { + if (-d $file) { # OK so its not really a file :) + opendir(DIR, $file) || die "Can not open $file"; + local(@filenames) = grep(!/^\.\.?$/, readdir(DIR)); # ls but avoid . && .. + closedir(DIR); + srand(time); # use time|$$ if security involved + $file = splice(@filenames, rand @filenames, 1); # pick one + } +} diff --git a/etc/xlocksat.pl b/etc/xlocksat.pl new file mode 100755 index 00000000..6a285dda --- /dev/null +++ b/etc/xlocksat.pl @@ -0,0 +1,6 @@ +#!/usr/bin/perl +# xlocksat + +$h = `/bin/date "+%H:"`; +$sat = (12 - abs($h - 12)) / 12 ; +printf("%.2f\n",$sat); diff --git a/etc/xtermlock.sh b/etc/xtermlock.sh new file mode 100755 index 00000000..93cc1c16 --- /dev/null +++ b/etc/xtermlock.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Runs xlock displaying to the current X terminal emulator window +# Works well in xterm, but not so well in terminal emulators like +# dtterm that have menu bars and other junk. +# +# All arguments are passed to xlock. + +g=`stty -a | + sed -ne's/.* ypixels = \([^;]*\); xpixels = \([^;]*\).*/\2x\1/p'` +exec xlock -inwindow -parent $WINDOWID +install -geometry $g "$@" diff --git a/etc/xwinlock.sh b/etc/xwinlock.sh new file mode 100755 index 00000000..ae2d465d --- /dev/null +++ b/etc/xwinlock.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Runs xlock displaying in another X client's window. +# use -me to use current terminal emulator window (works in ddterm). +# use -id to display to a specific window. +# Otherwise select the target window with the cross-hair cursor. +# +# All other arguments are passed to xlock. + +case $1 in +-me)if [ "$WINDOWID" ]; then id="-id $WINDOWID"; shift + else echo >&2 "WINDOWID not set"; exit 1; fi;; +-id)if [ $# -gt 1 ]; then id="-id $2"; shift; shift + else echo >&2 "ID not specified"; exit 1; fi;; +esac +exec xlock +install -inwindow -parent `xwininfo $id -int | + awk '/Window id/{printf "%d", $4}; + /Width/{printf " -geometry %d", $2}; + /Height/{printf "x%d", $2}'` "$@" diff --git a/iconfig.h b/iconfig.h new file mode 100644 index 00000000..34884010 --- /dev/null +++ b/iconfig.h @@ -0,0 +1,503 @@ +/* Config file for xlockmore + * Many "ideas" taken from xscreensaver-1.34 by Jamie Zawinski. + * + * This file is included by the various Imakefiles. + * After editing this file, you need to execute the commands + * + * xmkmf + * make Makefiles + * + * Substitute #undef with #define to activate option + */ + +XCOMM !!!WARNING!!! Known security hole with MesaGL < 3.0 if setuid root +XCOMM Define these now or down further below, see below for explaination. +XCOMM #define XpmLibrary +XCOMM #define XmLibrary +XCOMM #define XawLibrary +XCOMM #define GLLibrary +XCOMM #define DtSaverLibrary +XCOMM #define DPMSLibrary +XCOMM #define RplayLibrary +XCOMM #define NasLibrary +XCOMM #define Modules +XCOMM #define Check +XCOMM #define Unstable + +N = +O = .o +XCOMM O = .obj +C=.c +XCOMM C = .cc +S=$(N) $(N) +XCOMM S = , + +XCOMM please define +XCOMM C as the C source code extension +XCOMM O as the object extension +XCOMM S as the separator for object code + +XCOMM CC = cc +XCOMM CC = acc +XCOMM CC = CC +XCOMM CC = gcc -Wall +XCOMM CC = g++ -Wall + +LN_S = $(LN) + +XCOMM *** BEGIN XPM CONFIG SECTION *** + +XCOMM Only the image.c and bat.c modes use this. +XCOMM If your system has libXpm, remove the 'XCOMM ' from the next line. +XCOMM #define XpmLibrary + +#ifdef XpmLibrary +XPMDEF = -DUSE_XPM +XCOMM Use the following if your xpm.h file is not in an X11 directory +XCOMM XPMDEF = -DUSE_XPMINC + +XCOMM If you get an error "Cannot find xpm.h" while compiling, set +XCOMM XPMINC to the directory X11/xpm.h is in. Below is a guess. +XPMINC = -I/usr/local/include +XCOMM SGI's ViewKit (use with -DUSE_XPMINC) +XCOMM XPMINC = -I/usr/include/Vk + +XCOMM If you get an error "Cannot find libXpm" while linking, set XPMLIBPATH +XCOMM to the directory libXpm.* is in. Below is a guess. +XPMLIB = -L/usr/local/lib -lXpm + +#endif + +XCOMM *** END XPM CONFIG SECTION *** + +XCOMM *** BEGIN XM CONFIG SECTION *** + +XCOMM Only options.c and xmlock.c uses Motif. +XCOMM If your system has libXm, remove the 'XCOMM ' from the next line. +XCOMM #define XmLibrary + +#ifdef XmLibrary +XCOMM If its not with your X11 stuff you should set the following +XCOMM MOTIFHOME = /usr/local +XCOMM MOTIFHOME = /usr/dt + +XCOMM If you get an error "Cannot find Xm/PanedW.h" while compiling, set +XCOMM XMINC to the directory Xm/PanedW.h is in. Below is a guess. +XCOMM XMINC = -I$(MOTIFHOME)/include + +XCOMM If you get an error "Cannot find libXm" while linking, set XMLIBPATH +XCOMM to the directory libXm.* is in. Below is a guess. +XCOMM XMLIB = -L$(MOTIFHOME)/lib -lXm +XMLIB = -lXm + +XCOMM Debugging with editres +XCOMM EDITRESDEF = -DUSE_XMU +XCOMM EDITRESLIB = -lXmu +#endif + +XCOMM *** END XM CONFIG SECTION *** + +XCOMM *** BEGIN XAW CONFIG SECTION *** + +XCOMM Only options.c and xalock.c uses Athena. +XCOMM If your system has libsx, libXaw, and libXmu, +XCOMM remove the 'XCOMM ' from the next line. +XCOMM #define XawLibrary + +#ifdef XawLibrary +XCOMM If its not with your X11 stuff you should set the following +XCOMM ATHENAHOME = /usr/local + +XCOMM Below is a guess. +XCOMM XAWINC = -I$(ATHENAHOME)/include + +XCOMM Below is a guess. +XCOMM XAWLIB = -L$(ATHENAHOME)/lib -lsx -lXaw -lXmu +XAWLIB = -lsx -lXaw -lXmu + +#endif + +XCOMM *** END XAW CONFIG SECTION *** + +XCOMM *** BEGIN MESAGL AND OPENGL CONFIG SECTION *** + +XCOMM escher, gears, morph3d, pipes, superquadrics, sproingies modes use this. +XCOMM If your system has libMesaGL & widgets, +XCOMM remove the 'XCOMM ' from the next line. +XCOMM #define GLLibrary + +#ifdef GLLibrary +GLDEF = -DUSE_GL + +XCOMM If you get an error "Cannot find GL/gl.h" while compiling, set +XCOMM GLINC to the directory GL/gl.h is in. +GLINC = -I/usr/local/include + +XCOMM If you get an error "Cannot find libMesaGL" while linking, set GLLIBPATH +XCOMM to the directory libMesaGL.* is in. Below is a guess. +XCOMM !!!WARNING!!! Known security hole with MesaGL < 3.0 if setuid root +GLLIB = -L/usr/local/lib -lMesaGL -lMesaGLU + +XCOMM On SGI +XCOMM GLLIB = -lGL -lGLU -lgl +XCOMM On other OpenGL +XCOMM GLLIB = -lGL -lGLU +XCOMM On Sun with OGL1.1 +XCOMM GLDEF += -DSUN_OGL_NO_VERTEX_MACROS +XCOMM 3Dfx card +XCOMM GLDEF += -DFX +XCOMM Threads +XCOMM GLLIB += -lpthread +#endif + +XCOMM *** END MESAGL AND OPENGL CONFIG SECTION *** + +XCOMM *** BEGIN CDE DT CONFIG SECTION *** + +XCOMM COMMON DESKTOP ENVIRONMENT +XCOMM if your system has libDtSvc, remove the 'XCOMM ' from the next line +XCOMM #define DtSaverLibrary + +#ifdef DtSaverLibrary +DTSAVERDEF = -DUSE_DTSAVER +DTSAVERINC = -I/usr/dt/include +DTSAVERLIB = -L/usr/dt/lib -lDtSvc +#endif + +XCOMM *** END CDE DT CONFIG SECTION *** + +XCOMM *** BEGIN DPMS CONFIG SECTION *** + +XCOMM DISPLAY POWER MANAGEMENT SIGNALING +XCOMM if your system has libXdpms, remove the 'XCOMM ' from the next line +XCOMM #define DPMSLibrary + +#ifdef DPMSLibrary +DTSAVERDEF = -DUSE_DPMS +XCOMM DPMSINC = +DPMSLIB = -lXdpms +#endif + +XCOMM *** END DPMS CONFIG SECTION *** + +XCOMM *** BEGIN SOUND CONFIG SECTION *** + +XCOMM Only xlock.c and resource.c use this +XCOMM if your system has these sound libraries, remove the 'XCOMM ' +XCOMM #define RplayLibrary +XCOMM #define NasLibrary + +#ifdef RplayLibrary +SOUNDDEF = -DUSE_RPLAY +SOUNDINC = -I/usr/local/include +XCOMM SOUNDLIB = -L/share/lib -lrplay +SOUNDLIB = -L/usr/local/lib -lrplay +#endif + +#ifdef NasLibrary +SOUNDDEF = -DUSE_NAS +SOUNDINC = -I/usr/X11R6/include +SOUNDLIB = -L/usr/X11R6/lib -laudio +#endif + +XCOMM system play (optional software) +XCOMM SUNOS 4.1.3 +XCOMM DEF_PLAY = "/usr/demo/SOUND/play /usr/local/share/sounds/xlock/" +XCOMM IRIX 5.3 +XCOMM DEF_PLAY = "/usr/sbin/sfplay /usr/local/share/sounds/xlock/" +XCOMM Digital Unix with Multimedia Services installed: +XCOMM DEF_PLAY = "/usr/bin/mme/decsound -play /usr/local/share/sounds/xlock/" +XCOMM LINUX and others (see config directory) +XCOMM DEF_PLAY = "/usr/local/bin/play.sh /usr/local/share/sounds/xlock/" +XCOMM Uncomment line below if you have one of the above +XCOMM SOUNDDEF = -DDEF_PLAY=\"$(DEF_PLAY)\" + +XCOMM *** END SOUND CONFIG SECTION *** + +XCOMM *** BEGIN RNG CONFIG SECTION *** + +XCOMM Uncomment to use your system's Random Number Generator +XCOMM They usually come in 3 types + +XCOMM Uncomment to use high-precision (but expensive) RNG +XCOMM SRANDDEF = -DSRAND=srand48 +XCOMM LRANDDEF = -DLRAND=lrand48 + +XCOMM SRANDDEF = -DSRAND=srandom +XCOMM LRANDDEF = -DLRAND=random + +XCOMM Least desirable RNG +XCOMM SRANDDEF = -DSRAND=srand +XCOMM LRANDDEF = -DLRAND=rand + +XCOMM Normally use the above with (default) +XCOMM MAXRANDDEF = -DMAXRAND=2147483648.0 +XCOMM Use the following if using srand/rand and NOT AIXV3 +XCOMM MAXRANDDEF = -DMAXRAND=32767.0 +RANDDEF = $(SRANDDEF) $(LRANDDEF) $(MAXRANDDEF) + +XCOMM *** END RNG CONFIG SECTION *** + +XCOMM *** BEGIN MODULES CONFIG SECTION ** + +XCOMM This is a HIGHLY experimental section. +XCOMM To use modules, you must have an ELF setup installed, and +XCOMM libdl. This was originally written for Linux. +XCOMM /usr/include/dlfcn.h is not present on all Linux machines. +XCOMM Also tried to get this running on XCOMM Solaris-2.6 with gcc and gmake. +XCOMM Do not know if other Unixes support this kind of dynamic loading. +XCOMM Un-commenting Modules will compile xlock so that all of the modes +XCOMM are in separate modules which are loaded at runtime. This means +XCOMM you can add new modes simply by putting them in your modules +XCOMM directory. +XCOMM #define Modules + +#ifdef Modules + +XCOMM #define UseElfFormat YES + +XCOMM This is the default directory to look in for modules. It can be +XCOMM a colon separated list of directories. +DEF_MODULEPATH = $(USRLIBDIR)/X11/xlock_modules + +XCOMM Flag to compile the main program so that global variables will be +XCOMM available to modules +MODULEFLAGS = -rdynamic + +MODULEDEF = -DDEF_MODULEPATH=\"$(DEF_MODULEPATH)\" -DUSE_MODULES + +XCOMM Library necessary to use dynamic loading +MODULELIB = -ldl + +#endif + +XCOMM *** END MODULES CONFIG SECTION *** + +XCOMM *** BEGIN DEBUG CHECK SECTION *** + +XCOMM #define Check + +#ifdef Check +XCOMM Very experimental +CHECKDEF = -DDEBUG +#endif + +XCOMM *** END DEBUG CHECK SECTION *** + +#ifndef __QNX__ +#ifndef MathLibrary +#define MathLibrary -lm +#endif +#else +#define MathLibrary +PASSWDDEF = -DHAVE_SHADOW -Dlinux +PASSWDLIB = -l/src/util/Lib/util +#endif + +XCOMM KERBEROS Ver. 4 +XCOMM PASSWDDEF = -DHAVE_KRB4 +XCOMM PASSWDINC = -I/usr/athena/include +XCOMM PASSWDLIB = -L/usr/athena/lib -lkrb -ldes -lresolv +XCOMM +XCOMM KERBEROS Ver. 5 +XCOMM PASSWDDEF = -DHAVE_KRB5 +XCOMM PASSWDINC = -I/opt/krb5/include +XCOMM PASSWDLIB = -L/opt/krb5/lib -lkrb5 -lcrypto -lcom_err + +XCOMM DCE authentication (tested only on HP's) +XCOMM PASSWDDEF = -DDCE_PASSWD +XCOMM PASSWDINC = -I/usr/include/reentrant +XCOMM PASSWDLIB = -ldce -lc_r + +XCOMM PAM (tested only on Linux) +XCOMM PASSWDDEF = -DUSE_PAM +XCOMM PASSWDLIB = -lpam -ldl + +#ifdef SVR4ix86Architecture +PASSWDDEF = -DHAVE_SHADOW +#endif + +#ifdef SunArchitecture +#if SystemV4 +#if OSMajorVersion == 2 && OSMinorVersion < 5 +SYSTEMDEF = -DLESS_THAN_SOLARIS2_5 -DSOLARIS2 +#else +SYSTEMDEF = -DSOLARIS2 +#endif +XCOMM imake is usually not set up right here. +XCOMM Assume shadowing... usually more correct. +XCOMM #if HasShadowPasswd +XCOMM PASSWDDEF = -DHAVE_SHADOW +XCOMM #endif +PASSWDDEF = -DHAVE_SHADOW +XCOMM SLEEPDEF = -DHAVE_NAONOSLEEP + +XCOMM Problems finding libXext.so.0 when sticky bit is set +EXTRA_LDOPTIONS = -R/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib + +PIXMAPTYPE = sol +#else +SYSTEMDEF = -DSUNOS4 -DUSE_MATHERR +SLEEPDEF = -DHAVE_USLEEP +#if HasShadowPasswd +XCOMM PASSWDDEF = -DSUNOS_ADJUNCT_PASSWD +PASSWDDEF = -DHAVE_SHADOW +#endif +PIXMAPTYPE = sun +#endif +BITMAPTYPE = sun +#else +#if HasShadowPasswd +PASSWDDEF = -DHAVE_SHADOW +XCOMM PASSWDLIB = -lshadow +#endif +#if defined(HPArchitecture) || defined(ApolloArchitecture) +#ifdef HPArchitecture +XCOMM If your site is using Secured Passwords, +XCOMM PASSWDDEF = -DHPUX_SECURE_PASSWD +XCOMM If your site is using Passwd Etc, +XCOMM PASSWDDEF = -DHP_PASSWDETC +XCOMM PASSWDLIB = -lrgy -lnck -lndbm +XCOMM PASSWDLIB = -lrgy -lnck -lndbm -lsec +CCOPTIONS = -Aa +SYSTEMDEF = -D_HPUX_SOURCE -DSYSV -DUSE_MATHERR +#else +SLEEPDEF = -DHAVE_USLEEP +#endif +EXTRA_LIBRARIES = -lXhp11 +BITMAPTYPE = hp +PIXMAPTYPE = hp +#else +#ifdef i386SVR4Architecture +EXTRA_LIBRARIES = -lsocket -lnsl -lgen +PASSWDDEF = -DHAVE_SHADOW +BITMAPTYPE = x11 +PIXMAPTYPE = x11 +#else +#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(i386BsdArchitecture) +SLEEPDEF = -DHAVE_USLEEP +BITMAPTYPE = bsd +PIXMAPTYPE = bsd +INSTPGMFLAGS = -s -o root -m 4111 +#else +#ifdef LinuxArchitecture +SLEEPDEF = -DHAVE_USLEEP +BITMAPTYPE = linux +PIXMAPTYPE = linux +#if HasShadowPasswd && !UseElfFormat +EXTRA_LIBRARIES = -lgdbm +#endif +#else +#ifdef SGIArchitecture +BITMAPTYPE = sgi +PIXMAPTYPE = sgi +#else +#ifdef AIXArchitecture +BITMAPTYPE = ibm +PIXMAPTYPE = ibm +XCOMM If AIX 3.1 or less, do not have struct passwd and other things +#if OSMajorVersion < 3 || (OSMajorVersion == 3 && OSMinorVersion < 2) +SYSTEMDEF = -DLESS_THAN_AIX3_2 +#endif +XCOMM Use this if your site is using AFS: +XCOMM PASSWDDEF = -DAFS +XCOMM PASSWDINC = -I/usr/afsws/include +XCOMM PASSWDLIB = -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth -lubik -lprot -lrxkad -lrx -llwp -lauth -lsys -ldes -lcmd -lcom_err /usr/afsws/lib/afs/util.a +XCOMM You may need this one too. +XCOMM EXTRA_LIBRARIES = -laudit + +#else +#ifdef UltrixArchitecture +BITMAPTYPE = dec +PIXMAPTYPE = dec +EXTRA_LIBRARIES = -lauth +#else + +#ifdef SCOArchitecture +PASSWDDEF = -DHAVE_SHADOW -DSVR4 +BITMAPTYPE = sco +PIXMAPTYPE = sco +#else +BITMAPTYPE = x11 +PIXMAPTYPE = x11 + +#endif +#endif +#endif +#endif +#endif +#endif +#endif +#endif +#endif + +XLOCKINC = -I$(top_srcdir) -I. -I$(UTILSDIR) + +XCOMM -DUSE_VROOT Allows xlock to run in root window (some +XCOMM window managers have problems) +XCOMM -DALWAYS_ALLOW_ROOT Users can not turn off allowroot +XCOMM -DUSE_SYSLOG Paranoid administrator option (a check is also +XCOMM done to see if you have it) +XCOMM -DUSE_MULTIPLE_USER Multiple users ... security? +XCOMM -DUSE_MULTIPLE_ROOT Multiple root users ... security? +XCOMM -DUSE_WINDOW_VISIBILITY Allow a window to be placed over xlock +XCOMM -DUSE_OLD_EVENT_LOOP Some machines may still need this (fd_set +XCOMM errors may be a sign) +XCOMM -DUSE_VMSUTILS This patches up old __VMS_VER < 70000000 +XCOMM -DUSE_DPMS DPMS stuff +XCOMM +XCOMM For personal use you may want to consider: +XCOMM -DUSE_XLOCKRC paranoid admin or unknown shadow passwd alg +XCOMM +XCOMM For labs you may want to consider: +XCOMM -DUSE_AUTO_LOGOUT=240 Enable auto-logout and set deadline (minutes) +XCOMM -DDEF_AUTO_LOGOUT=\"120\" Set default auto-logout deadline (minutes) +XCOMM -DUSE_BUTTON_LOGOUT=10 Enable logout button and set appear time (min) +XCOMM -DDEF_BUTTON_LOGOUT=\"5\" Set default logout button (minutes) +XCOMM -DUSE_BOMB Enable automatic logout mode (does not come up +XCOMM in random mode) +XCOMM -DUSE_UNSTABLE Enable unstable bubble3d GL mode +XCOMM -DCLOSEDOWN_LOGOUT Use with USE_AUTO_LOGOUT, USE_BUTTON_LOGOUT, +XCOMM USE_BOMB if using xdm +XCOMM -DSESSION_LOGOUT Alternate of above +XCOMM -DSTAFF_FILE=\"/etc/xlock.staff\" File of staff who are exempt +XCOMM -DSTAFF_NETGROUP=\"/etc/xlock.netgroup\" Netgroup that is exempt + +XCOMM May have to combine in one long line if "+=" does not work +OPTDEF = -DUSE_VROOT -DALWAYS_ALLOW_ROOT -DUSE_BOMB +XCOMM OPTDEF += -DUSE_UNSTABLE +XCOMM OPTDEF += -DUSE_SYSLOG -DSYSLOG_FACILITY=LOG_AUTH +XCOMM OPTDEF += -DSYSLOG_WARNING=LOG_WARNING +XCOMM OPTDEF += -DSYSLOG_NOTICE=LOG_NOTICE -DSYSLOG_INFO=LOG_INFO +XCOMM OPTDEF += -DUSE_MULTIPLE_USER +XCOMM OPTDEF += -DUSE_MULTIPLE_ROOT +XCOMM OPTDEF += -DUSE_OLD_EVENT_LOOP +XCOMM OPTDEF += -DUSE_XLOCKRC +XCOMM OPTDEF += -DUSE_AUTO_LOGOUT=240 +XCOMM OPTDEF += -DDEF_AUTO_LOGOUT=\"120\" +XCOMM OPTDEF += -DUSE_BUTTON_LOGOUT=10 +XCOMM OPTDEF += -DDEF_BUTTON_LOGOUT=\"5\" +XCOMM OPTDEF += -DCLOSEDOWN_LOGOUT +XCOMM OPTDEF += -DSESSION_LOGOUT +XCOMM OPTDEF += -DSTAFF_FILE=\"/etc/xlock.staff\" +XCOMM OPTDEF += -DSTAFF_NETGROUP=\"/etc/xlock.netgroup\" + +DEFINES = -DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" \ +$(SYSTEMDEF) $(EDITRESDEF) $(SLEEPDEF) $(OPTDEF) $(RANDDEF) $(MODULEDEF) \ +$(PASSWDDEF) $(XMINC) $(XAWINC) $(XPMDEF) $(GLDEF) $(DTSAVERDEF) $(DPMSDEF) \ +$(SOUNDDEF) $(PASSWDINC) $(XPMINC) $(GLINC) $(DTSAVERINC) $(DPMSINC) \ +$(SOUNDINC) $(XLOCKINC) + +DEPLIBS = $(DEPXLIB) +LOCAL_LIBRARIES = $(MODULELIB) $(XLIB) \ +$(XPMLIB) $(GLLIB) $(DTSAVERLIB) $(DPMSLIB) $(SOUNDLIB) +MLIBS = $(XPMLIB) $(XMLIB) $(EDITRESLIB) -lXt $(XLIB) $(SMLIB) $(ICELIB) +ALIBS = $(XAWLIB) -lXt $(XLIB) $(SMLIB) $(ICELIB) +LINTLIBS = $(LINTXLIB) +#if HasLibCrypt + CRYPTLIB = -lcrypt +#endif +SYS_LIBRARIES = $(CRYPTLIB) $(PASSWDLIB) MathLibrary + +VER = xlockmore +DISTVER = xlockmore-4.13 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/make.com b/make.com new file mode 100644 index 00000000..b71905eb --- /dev/null +++ b/make.com @@ -0,0 +1,491 @@ +$ save_verify='f$verify(0) +$! set ver +$! +$! VMS compile and link for xlockmore +$! +$! USAGE: +$! @make [debug clobber clean] +$! debug : compile with degugger switch +$! clean : clean all except executable +$! clobber : clean all +$! +$! If you have +$! XPM library +$! XVMSUTILS library (VMS6.2 or lower) +$! Mesa GL library +$! insert the correct directory instead of X11 or GL: +$ xvmsutilsf="X11:XVMSUTILS.OLB" +$ xpmf="X11:LIBXPM.OLB" +$ glf="GL:LIBMESAGL.OLB" +$ gluf="GL:LIBMESAGLU.OLB" +$ ttff="SYS$LIBRARY:LIBTTF.OLB" +$ glttf="SYS$LIBRARY:LIBGLTT.OLB" +$! +$! Assume C. +$ deccxx=0 +$! Assume C++ (but may not link on VMS6.2 or lower) +$! deccxx=1 +$! test on C++. +$! deccxx=f$search("SYS$SYSTEM:CXX$COMPILER.EXE") .nes. "" +$! +$! Already assumes DEC C on Alpha. +$! Assume VAX C on VAX. +$! decc=0 +$! Assume DEC C on VAX. +$! decc=1 +$! test on DEC C. +$ decc=f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "" +$! +$! if vroot<>0 the use of the root window is enabled +$ vroot=1 +$! vroot=0 +$! +$! if bomb<>0 the use bomb mode is included (does not come up in random mode) +$ bomb=1 +$! bomb=0 +$! +$! if unstable<>0 some of these mode(s) included could be a little buggy +$! unstable=0 +$ unstable=1 +$! +$! if sound<>0 sound capability is included (only available on Alpha) +$! from vms_amd.c and vms_amd.h +$ sound=1 +$! sound=0 +$! +$! Memory Check stuff. Very experimental! +$ check=0 +$! check=1 +$ +$! Compliant colour map if <>1 +$ complmap=0 +$! complmap=1 +$! +$! +$! NOTHING SHOULD BE MODIFIED BELOW +$! +$ if p1 .eqs. "CLEAN" then goto Clean +$ if p1 .eqs. "CLOBBER" then goto Clobber +$! +$ defs=="VMS" +$ dtsaver=f$search("SYS$LIBRARY:CDE$LIBDTSVC.EXE") .nes. "" +$ xpm=f$search("''xpmf'") .nes. "" +$ gl=f$search("''glf'") .nes. "" +$ glu=f$search("''gluf'") .nes. "" +$ gltt=f$search("''glttf'") .nes. "" +$ ttf=f$search("''ttff'") .nes. "" +$ iscxx=f$search("SYS$SYSTEM:CXX$COMPILER.EXE") .nes. "" +$ axp=f$getsyi("HW_MODEL") .ge. 1024 +$ sys_ver=f$edit(f$getsyi("version"),"compress") +$ if f$extract(0,1,sys_ver) .nes. "V" +$ then +$ type sys$input +This script will assume that the operating system version is at least V7.0. +$! +$ sys_ver="V7.0" +$ endif +$ sys_maj=0+f$extract(1,1,sys_ver) +$ if sys_maj .lt. 7 +$ then +$ xvmsutils=f$search("''xvmsutilsf'") .nes. "" +$ endif +$! +$! Create .opt file +$ close/nolog optf +$ open/write optf xlock.opt +$! +$ if iscxx then defs=="''defs',HAVE_CXX" +$ if ttf then defs=="''defs',HAVE_TTF" +$ if gltt then defs=="''defs',HAVE_GLTT" +$ if iscxx .and. ttf .and. gltt then defs=="''defs',USE_TEXT" +$ if complmap then defs=="''defs',COMPLIANT_COLORMAP" +$ if xpm then defs=="''defs',USE_XPM" +$ if gl then defs=="''defs',USE_GL,HAVE_GLBINDTEXTURE" +$ if dtsaver then defs=="''defs',USE_DTSAVER" +$ if axp .and. sound then defs=="''defs',USE_VMSPLAY" +$ if sys_maj .lt. 7 +$ then +$ if xvmsutils then defs=="''defs',USE_XVMSUTILS" +$ endif +$ if vroot then defs=="''defs',USE_VROOT" +$ if bomb then defs=="''defs',USE_BOMB" +$ if unstable then defs=="''defs',USE_UNSTABLE" +$ if check then defs=="''defs',DEBUG" +$! The next must be the last one. +$ if sys_maj .ge. 7 +$ then +$ defs=="''defs',HAVE_USLEEP" +$ defs=="''defs',SRAND=""""srand48"""",LRAND=""""lrand48"""",MAXRAND=2147483648.0" +$ endif +$! +$! Establish the Compiling Environment +$! +$! Set compiler command +$! Put in /include=[] for local include file like a pwd.h ... +$! not normally required. +$ cxx=="cxx/include=([],[.xlock])/define=(''defs')" +$ if deccxx +$ then +$ cc=="cxx/include=([],[.xlock])/define=(''defs')" +$ else +$ if axp +$ then +$! cc=="cc/standard=vaxc/include=([],[.xlock])/define=(''defs')" +$ cc=="cc/include=([],[.xlock])/define=(''defs')" +$ else +$ if decc +$ then +$! cc=="cc/decc/standard=vaxc/include=([],[.xlock])/define=(''defs')" +$ cc=="cc/decc/include=([],[.xlock])/define=(''defs')" +$ else ! VAX C +$ cc=="cc/include=([],[.xlock])/define=(''defs')" +$ endif +$ endif +$ endif +$ if p1 .eqs. "DEBUG" .or. p2 .eqs. "DEBUG" .or. p3 .eqs. "DEBUG" +$ then +$ if deccxx +$ then +$ cc=="cxx/deb/noopt/include=([],[.xlock])/define=(''defs')/list" +$ else +$ if axp +$ then +$! cc=="cc/deb/noopt/standard=vaxc/include=([],[.xlock])/define=(''defs')/list" +$ cc=="cc/deb/noopt/include=([],[.xlock])/define=(''defs')/list" +$ else +$ if decc +$ then +$! cc=="cc/deb/noopt/decc/standard=vaxc/include=([],[.xlock])/define=(''defs')/list" +$ cc=="cc/deb/noopt/decc/include=([],[.xlock])/define=(''defs')/list" +$ else ! VAX C +$ cc=="cc/deb/noopt/include=([],[.xlock])/define=(''defs')/list" +$ endif +$ endif +$ endif +$ link=="link/deb" +$ endif +$! +$ if axp .or. .not. decc +$ then +$ define/nolog sys sys$library +$ endif +$! +$ write sys$output "Linking Include Files" +$! call make eyes.xbm "set file/enter=[]eyes.xbm [.bitmaps]m-dec.xbm" [.bitmaps]m-dec.xbm +$ call make eyes.xbm "set file/enter=[]eyes.xbm [.bitmaps]m-grelb.xbm" [.bitmaps]m-grelb.xbm +$ call make flag.xbm "set file/enter=[]flag.xbm [.bitmaps]m-dec.xbm" [.bitmaps]m-dec.xbm +$! call make ghost.xbm "set file/enter=[]ghost.xbm [.bitmaps]m-dec.xbm" [.bitmaps]m-dec.xbm +$ call make ghost.xbm "set file/enter=[]ghost.xbm [.bitmaps]m-ghost.xbm" [.bitmaps]m-ghost.xbm +$ call make image.xbm "set file/enter=[]image.xbm [.bitmaps]m-dec.xbm" [.bitmaps]m-dec.xbm +$ call make life.xbm "set file/enter=[]life.xbm [.bitmaps]s-grelb.xbm" [.bitmaps]s-grelb.xbm +$! call make life.xbm "set file/enter=[]life.xbm [.bitmaps]s-dec.xbm" [.bitmaps]s-dec.xbm +$ call make life1d.xbm "set file/enter=[]life1d.xbm [.bitmaps]t-x11.xbm" [.bitmaps]t-x11.xbm +$ call make maze.xbm "set file/enter=[]maze.xbm [.bitmaps]l-dec.xbm" [.bitmaps]l-dec.xbm +$ call make puzzle.xbm "set file/enter=[]puzzle.xbm [.bitmaps]l-xlock.xbm" [.bitmaps]l-xlock.xbm +$ if xpm +$ then +$ call make flag.xpm "set file/enter=[]flag.xpm [.pixmaps]m-dec.xpm" [.pixaps]m-dec.xpm +$ call make image.xpm "set file/enter=[]image.xpm [.pixmaps]m-dec.xpm" [.pixmaps]m-dec.xpm +$ call make maze.xpm "set file/enter=[]maze.xpm [.pixmaps]m-dec.xpm" [.pixmaps]m-dec.xpm +$ call make puzzle.xpm "set file/enter=[]puzzle.xpm [.pixmaps]l-xlock.xpm" [.pixmaps]l-xlock.xpm +$! call make puzzle.xpm "set file/enter=[]puzzle.xpm [.pixmaps]m-dec.xpm" [.pixmaps]m-dec.xpm +$ endif +$! +$ write sys$output "Compiling XLock where cc =" +$ write sys$output "''cc'" +$ call make [.xlock]xlock.obj "cc /object=[.xlock] [.xlock]xlock.c" [.xlock]xlock.c [.xlock]xlock.h [.xlock]mode.h [.xlock]vroot.h +$ call make [.xlock]passwd.obj "cc /object=[.xlock] [.xlock]passwd.c" [.xlock]passwd.c [.xlock]xlock.h +$ call make [.xlock]resource.obj "cc /object=[.xlock] [.xlock]resource.c" [.xlock]resource.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.xlock]util.obj "cc /object=[.xlock] [.xlock]util.c" [.xlock]util.c [.xlock]xlock.h [.xlock]util.h +$ call make [.xlock]logout.obj "cc /object=[.xlock] [.xlock]logout.c" [.xlock]logout.c [.xlock]xlock.h +$ call make [.xlock]mode.obj "cc /object=[.xlock] [.xlock]mode.c" [.xlock]mode.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.xlock]ras.obj "cc /object=[.xlock] [.xlock]ras.c" [.xlock]ras.c [.xlock]xlock.h [.xlock]ras.h +$ call make [.xlock]xbm.obj "cc /object=[.xlock] [.xlock]xbm.c" [.xlock]xbm.c [.xlock]xlock.h +$ call make [.xlock]vis.obj "cc /object=[.xlock] [.xlock]vis.c" [.xlock]vis.c [.xlock]xlock.h [.xlock]vis.h +$ call make [.xlock]color.obj "cc /object=[.xlock] [.xlock]color.c" [.xlock]color.c [.xlock]xlock.h [.xlock]color.h +$ call make [.xlock]random.obj "cc /object=[.xlock] [.xlock]random.c" [.xlock]random.c [.xlock]xlock.h [.xlock]random.h +$ call make [.xlock]iostuff.obj "cc /object=[.xlock] [.xlock]iostuff.c" [.xlock]file.c [.xlock]xlock.h [.xlock]iostuff.h +$ call make [.xlock]automata.obj "cc /object=[.xlock] [.xlock]automata.c" [.xlock]automata.c [.xlock]xlock.h [.xlock]automata.h +$ call make [.xlock]spline.obj "cc /object=[.xlock] [.xlock]spline.c" [.xlock]spline.c [.xlock]xlock.h [.xlock]spline.h +$ call make [.xlock]erase.obj "cc /object=[.xlock] [.xlock]erase.c" [.xlock]erase.c [.xlock]xlock.h +$ if check +$ then +$ write sys$output "Compiling XLock Memory Check Caution: Experimental!" +$ call make [.xlock]memcheck.obj "cc /object=[.xlock] [.xlock]memcheck.c" [.xlock]memcheck.c [.xlock]xlock.h +$ endif +$ if axp .and. sound +$ then +$ call make [.xlock]sound.obj "cc /object=[.xlock] [.xlock]sound.c" [.xlock]sound.c [.xlock]xlock.h [.xlock]vms_amd.h +$ call make [.xlock]vms_amd.obj "cc /object=[.xlock] [.xlock]vms_amd.c" [.xlock]vms_amd.c [.xlock]vms_amd.h +$ else +$ call make [.xlock]sound.obj "cc /object=[.xlock] [.xlock]sound.c" [.xlock]sound.c [.xlock]xlock.h +$ endif +$ call make [.modes]ant.obj "cc /object=[.modes] [.modes]ant.c" [.modes]ant.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]ball.obj "cc /object=[.modes] [.modes]ball.c" [.modes]ball.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]bat.obj "cc /object=[.modes] [.modes]bat.c" [.modes]bat.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]blot.obj "cc /object=[.modes] [.modes]blot.c" [.modes]blot.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]bouboule.obj "cc /object=[.modes] [.modes]bouboule.c" [.modes]bouboule.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]bounce.obj "cc /object=[.modes] [.modes]bounce.c" [.modes]bounce.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]braid.obj "cc /object=[.modes] [.modes]braid.c" [.modes]braid.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]bubble.obj "cc /object=[.modes] [.modes]bubble.c" [.modes]bubble.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]bug.obj "cc /object=[.modes] [.modes]bug.c" [.modes]bug.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]clock.obj "cc /object=[.modes] [.modes]clock.c" [.modes]clock.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]coral.obj "cc /object=[.modes] [.modes]coral.c" [.modes]coral.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]crystal.obj "cc /object=[.modes] [.modes]crystal.c" [.modes]crystal.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]daisy.obj "cc /object=[.modes] [.modes]daisy.c" [.modes]daisy.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]dclock.obj "cc /object=[.modes] [.modes]dclock.c" [.modes]dclock.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]deco.obj "cc /object=[.modes] [.modes]deco.c" [.modes]deco.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]demon.obj "cc /object=[.modes] [.modes]demon.c" [.modes]demon.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]dilemma.obj "cc /object=[.modes] [.modes]dilemma.c" [.modes]dilemma.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]discrete.obj "cc /object=[.modes] [.modes]discrete.c" [.modes]discrete.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]drift.obj "cc /object=[.modes] [.modes]drift.c" [.modes]drift.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]eyes.obj "cc /object=[.modes] [.modes]eyes.c" [.modes]eyes.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]fadeplot.obj "cc /object=[.modes] [.modes]fadeplot.c" [.modes]fadeplot.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]flag.obj "cc /object=[.modes] [.modes]flag.c" [.modes]flag.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]flame.obj "cc /object=[.modes] [.modes]flame.c" [.modes]flame.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]flow.obj "cc /object=[.modes] [.modes]flow.c" [.modes]flow.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]forest.obj "cc /object=[.modes] [.modes]forest.c" [.modes]forest.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]galaxy.obj "cc /object=[.modes] [.modes]galaxy.c" [.modes]galaxy.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]goop.obj "cc /object=[.modes] [.modes]goop.c" [.modes]goop.c [.xlock]xlock.h [.xlock]mode.h [.xlock]spline.h +$ call make [.modes]grav.obj "cc /object=[.modes] [.modes]grav.c" [.modes]grav.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]helix.obj "cc /object=[.modes] [.modes]helix.c" [.modes]helix.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]hop.obj "cc /object=[.modes] [.modes]hop.c" [.modes]hop.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]hyper.obj "cc /object=[.modes] [.modes]hyper.c" [.modes]hyper.c [.xlock]xlock.h [.xlock]mode.h +$! call make [.modes]hyperer.obj "cc /object=[.modes] [.modes]hyperer.c" [.modes]hyperer.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]ico.obj "cc /object=[.modes] [.modes]ico.c" [.modes]ico.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]ifs.obj "cc /object=[.modes] [.modes]ifs.c" [.modes]ifs.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]image.obj "cc /object=[.modes] [.modes]image.c" [.modes]image.c [.xlock]xlock.h [.xlock]mode.h ras.h +$ call make [.modes]julia.obj "cc /object=[.modes] [.modes]julia.c" [.modes]julia.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]kaleid.obj "cc /object=[.modes] [.modes]kaleid.c" [.modes]kaleid.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]kumppa.obj "cc /object=[.modes] [.modes]kumppa.c" [.modes]kumppa.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]laser.obj "cc /object=[.modes] [.modes]laser.c" [.modes]laser.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]life.obj "cc /object=[.modes] [.modes]life.c" [.modes]life.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]life1d.obj "cc /object=[.modes] [.modes]life1d.c" [.modes]life1d.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]life3d.obj "cc /object=[.modes] [.modes]life3d.c" [.modes]life3d.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]lightning.obj "cc /object=[.modes] [.modes]lightning.c" [.modes]lightning.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]lisa.obj "cc /object=[.modes] [.modes]lisa.c" [.modes]lisa.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]lissie.obj "cc /object=[.modes] [.modes]lissie.c" [.modes]lissie.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]loop.obj "cc /object=[.modes] [.modes]loop.c" [.modes]loop.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]mandelbrot.obj "cc /object=[.modes] [.modes]mandelbrot.c" [.modes]mandelbrot.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]marquee.obj "cc /object=[.modes] [.modes]marquee.c" [.modes]marquee.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]maze.obj "cc /object=[.modes] [.modes]maze.c" [.modes]maze.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]mountain.obj "cc /object=[.modes] [.modes]mountain.c" [.modes]mountain.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]munch.obj "cc /object=[.modes] [.modes]munch.c" [.modes]munch.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]nose.obj "cc /object=[.modes] [.modes]nose.c" [.modes]nose.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]qix.obj "cc /object=[.modes] [.modes]qix.c" [.modes]qix.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]pacman.obj "cc /object=[.modes] [.modes]pacman.c" [.modes]pacman.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]penrose.obj "cc /object=[.modes] [.modes]penrose.c" [.modes]penrose.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]petal.obj "cc /object=[.modes] [.modes]petal.c" [.modes]petal.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]puzzle.obj "cc /object=[.modes] [.modes]puzzle.c" [.modes]puzzle.c [.xlock]xlock.h [.xlock]mode.h ras.h +$ call make [.modes]pyro.obj "cc /object=[.modes] [.modes]pyro.c" [.modes]pyro.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]roll.obj "cc /object=[.modes] [.modes]roll.c" [.modes]roll.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]rotor.obj "cc /object=[.modes] [.modes]rotor.c" [.modes]rotor.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]shape.obj "cc /object=[.modes] [.modes]shape.c" [.modes]shape.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]sierpinski.obj "cc /object=[.modes] [.modes]sierpinski.c" [.modes]sierpinski.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]slip.obj "cc /object=[.modes] [.modes]slip.c" [.modes]slip.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]sphere.obj "cc /object=[.modes] [.modes]sphere.c" [.modes]sphere.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]spiral.obj "cc /object=[.modes] [.modes]spiral.c" [.modes]spiral.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]spline.obj "cc /object=[.modes] [.modes]spline.c" [.modes]spline.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]star.obj "cc /object=[.modes] [.modes]star.c" [.modes]star.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]starfish.obj "cc /object=[.modes] [.modes]starfish.c" [.modes]starfish.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]strange.obj "cc /object=[.modes] [.modes]strange.c" [.modes]strange.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]swarm.obj "cc /object=[.modes] [.modes]swarm.c" [.modes]swarm.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]swirl.obj "cc /object=[.modes] [.modes]swirl.c" [.modes]swirl.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]tetris.obj "cc /object=[.modes] [.modes]tetris.c" [.modes]tetris.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]thornbird.obj "cc /object=[.modes] [.modes]thornbird.c" [.modes]thornbird.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]triangle.obj "cc /object=[.modes] [.modes]triangle.c" [.modes]triangle.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]tube.obj "cc /object=[.modes] [.modes]tube.c" [.modes]tube.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]turtle.obj "cc /object=[.modes] [.modes]turtle.c" [.modes]turtle.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]vines.obj "cc /object=[.modes] [.modes]vines.c" [.modes]vines.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]voters.obj "cc /object=[.modes] [.modes]voters.c" [.modes]voters.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]wator.obj "cc /object=[.modes] [.modes]wator.c" [.modes]wator.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]wire.obj "cc /object=[.modes] [.modes]wire.c" [.modes]wire.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]world.obj "cc /object=[.modes] [.modes]world.c" [.modes]world.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]worm.obj "cc /object=[.modes] [.modes]worm.c" [.modes]worm.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]xjack.obj "cc /object=[.modes] [.modes]xjack.c" [.modes]xjack.c [.xlock]xlock.h [.xlock]mode.h +$ if unstable +$ then +$ call make [.modes]decay.obj "cc /object=[.modes] [.modes]decay.c" [.modes]decay.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]lyapunov.obj "cc /object=[.modes] [.modes]lyapunov.c" [.modes]lyapunov.c [.xlock]xlock.h [.xlock]mode.h +$ endif +$ if xpm +$ then +$ call make [.modes]cartoon.obj "cc /object=[.modes] [.modes]cartoon.c" [.modes]cartoon.c [.xlock]xlock.h [.xlock]mode.h +$ endif +$ if gl +$ then +$ call make [.modes.glx]cage.obj "cc /object=[.modes.glx] [.modes.glx]cage.c" [.modes.glx]cage.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]gears.obj "cc /object=[.modes.glx] [.modes.glx]gears.c" [.modes.glx]gears.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]moebius.obj "cc /object=[.modes.glx] [.modes.glx]moebius.c" [.modes.glx]moebius.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]morph3d.obj "cc /object=[.modes.glx] [.modes.glx]morph3d.c" [.modes.glx]morph3d.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]rubik.obj "cc /object=[.modes.glx] [.modes.glx]rubik.c" [.modes.glx]rubik.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]stairs.obj "cc /object=[.modes.glx] [.modes.glx]stairs.c" [.modes.glx]stairs.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]superquadrics.obj "cc /object=[.modes.glx] [.modes.glx]superquadrics.c" [.modes.glx]superquadrics.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]buildlwo.obj "cc /object=[.modes.glx] [.modes.glx]buildlwo.c" [.modes.glx]buildlwo.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]pipes.obj "cc /object=[.modes.glx] [.modes.glx]pipes.c" [.modes.glx]pipes.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]pipeobjs.obj "cc /object=[.modes.glx] [.modes.glx]pipeobjs.c" [.modes.glx]pipeobjs.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]sproingies.obj "cc /object=[.modes.glx] [.modes.glx]sproingies.c" [.modes.glx]sproingies.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]sproingiewrap.obj "cc /object=[.modes.glx] [.modes.glx]sproingiewrap.c" [.modes.glx]sproingiewrap.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_b.obj "cc /object=[.modes.glx] [.modes.glx]s1_b.c" [.modes.glx]s1_b.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_1.obj "cc /object=[.modes.glx] [.modes.glx]s1_1.c" [.modes.glx]s1_1.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_2.obj "cc /object=[.modes.glx] [.modes.glx]s1_2.c" [.modes.glx]s1_2.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_3.obj "cc /object=[.modes.glx] [.modes.glx]s1_3.c" [.modes.glx]s1_3.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_4.obj "cc /object=[.modes.glx] [.modes.glx]s1_4.c" [.modes.glx]s1_4.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_5.obj "cc /object=[.modes.glx] [.modes.glx]s1_5.c" [.modes.glx]s1_5.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]s1_6.obj "cc /object=[.modes.glx] [.modes.glx]s1_6.c" [.modes.glx]s1_6.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]atlantis.obj "cc /object=[.modes.glx] [.modes.glx]atlantis.c" [.modes.glx]atlantis.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]dolphin.obj "cc /object=[.modes.glx] [.modes.glx]dolphin.c" [.modes.glx]dolphin.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]shark.obj "cc /object=[.modes.glx] [.modes.glx]shark.c" [.modes.glx]shark.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]swim.obj "cc /object=[.modes.glx] [.modes.glx]swim.c" [.modes.glx]swim.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]whale.obj "cc /object=[.modes.glx] [.modes.glx]whale.c" [.modes.glx]whale.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]bubble3d.obj "cc /object=[.modes.glx] [.modes.glx]bubble3d.c" [.modes.glx]bubble3d.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]b_draw.obj "cc /object=[.modes.glx] [.modes.glx]b_draw.c" [.modes.glx]b_draw.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]b_lockglue.obj "cc /object=[.modes.glx] [.modes.glx]b_lockglue.c" [.modes.glx]b_lockglue.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]b_sphere.obj "cc /object=[.modes.glx] [.modes.glx]b_sphere.c" [.modes.glx]b_sphere.c [.xlock]xlock.h [.xlock]mode.h +$ if unstable .and. xpm +$ then +$ call make [.modes.glx]lament.obj "cc /object=[.modes.glx] [.modes.glx]lament.c" [.modes.glx]lament.c [.xlock]xlock.h [.xlock]mode.h +$ endif +$ if iscxx +$ then +$ call make [.modes.glx]invert.obj "cc /object=[.modes.glx] [.modes.glx]invert.c" [.modes.glx]invert.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_figureeight.obj "cxx /object=[.modes.glx] [.modes.glx]i_figureeight.cc" [.modes.glx]i_figureeight.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_linkage.obj "cxx /object=[.modes.glx] [.modes.glx]i_linkage.cc" [.modes.glx]i_linkage.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_sphere.obj "cxx /object=[.modes.glx] [.modes.glx]i_sphere.cc" [.modes.glx]i_sphere.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_spline.obj "cxx /object=[.modes.glx] [.modes.glx]i_spline.cc" [.modes.glx]i_spline.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_threejet.obj "cxx /object=[.modes.glx] [.modes.glx]i_threejet.cc" [.modes.glx]i_threejet.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_threejetvec.obj "cxx /object=[.modes.glx] [.modes.glx]i_threejetvec.cc" [.modes.glx]i_threejetvec.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_twojet.obj "cxx /object=[.modes.glx] [.modes.glx]i_twojet.cc" [.modes.glx]i_twojet.cc [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes.glx]i_twojetvec.obj "cxx /object=[.modes.glx] [.modes.glx]i_twojetvec.cc" [.modes.glx]i_twojetvec.cc [.xlock]xlock.h [.xlock]mode.h +$ if ttf .and. gltt +$ then +$ call make [.modes.glx]text3d.obj "cxx /object=[.modes.glx] [.modes.glx]text3d.cc" [.modes.glx]text3d.cc [.xlock]xlock.h [.xlock]mode.h +$ endif +$ endif +$ endif +$ if bomb +$ then +$ call make [.modes]bomb.obj "cc /object=[.modes] [.modes]bomb.c" [.modes]bomb.c [.xlock]xlock.h [.xlock]mode.h +$ endif +$ call make [.modes]blank.obj "cc /object=[.modes] [.modes]blank.c" [.modes][.modes]blank.c [.xlock]xlock.h [.xlock]mode.h +$ call make [.modes]random.obj "cc /object=[.modes] [.modes]random.c" [.modes]random.c [.xlock]xlock.h [.xlock]mode.h +$! +$! Get libraries +$ if gltt then write optf "''glttf'/lib" +$ if ttf then write optf "''ttff'/lib" +$ if xpm then write optf "''xpmf'/lib" +$ if gl then write optf "''glf'/lib" +$ if glu then write optf "''gluf'/lib" +$ if sys_maj .lt. 7 +$ then +$ if xvmsutils then write optf "''xvmsutilsf'/lib" +$ endif +$! if .not. axp then write optf "sys$library:vaxcrtl/lib" +$ write optf "sys$library:vaxcrtl/lib" +$ if dtsaver then write optf "sys$library:cde$libdtsvc.exe/share" +$ if axp then write optf "sys$library:ucx$ipc_shr/share" +$ if axp then write optf "sys$share:decw$xextlibshr/share" +$ if axp then write optf "sys$share:decw$xtlibshrr5/share" +$ if .not. axp then write optf "sys$library:ucx$ipc/lib" +$ write optf "sys$share:decw$dxmlibshr/share" +$ write optf "sys$share:decw$xlibshr/share" +$ close optf +$! +$! LINK +$ write sys$output "Linking XLock" +$ link/map/exec=[.xlock] xlock/opt +$! +$! Create .opt file +$ open/write optf xmlock.opt +$ write sys$output "Compiling XmLock where cc =" +$ write sys$output "''cc'" +$ call make [.xmlock]option.obj "cc /object=[.xmlock] [.xmlock]option.c" option.c +$ call make [.xmlock]xmlock.obj "cc /object=[.xmlock] [.xmlock]xmlock.c" xmlock.c +$! Get libraries +$! if .not. axp then write optf "sys$library:vaxcrtl/lib" +$ write optf "sys$library:vaxcrtl/lib" +$ if axp then write optf "sys$library:ucx$ipc_shr/share" +$ if axp then write optf "sys$share:decw$xextlibshr/share" +$ if axp then write optf "sys$share:decw$xtlibshrr5/share" +$ if .not. axp then write optf "sys$library:ucx$ipc/lib" +$! write optf "sys$share:decw$dxmlibshr/share" +$ write optf "sys$share:decw$xmlibshr12/share" +$ write optf "sys$share:decw$xlibshr/share" +$ close optf +$! +$! LINK +$ write sys$output "Linking XmLock" +$ link/map/exec=[.xmlock] xmlock/opt +$! +$ set noverify +$ exit +$! +$Clobber: ! Delete executables, Purge directory and clean up object files +$! and listings +$ delete/noconfirm [.xlock]xlock.exe;* +$ delete/noconfirm [.xmlock]xmlock.exe;* +$! +$Clean: ! Purge directory, clean up object files and listings +$ close/nolog optf +$ purge [...] +$ delete/noconfirm [...]*.lis;* +$ delete/noconfirm [...]*.obj;* +$ delete/noconfirm [...]*.opt;* +$ delete/noconfirm [...]*.map;* +$ set file/remove eyes.xbm;* +$ set file/remove flag.xbm;* +$ set file/remove image.xbm;* +$ set file/remove ghost.xbm;* +$ set file/remove life.xbm;* +$ set file/remove life1d.xbm;* +$ set file/remove maze.xbm;* +$ set file/remove puzzle.xbm;* +$ set file/remove flag.xpm;* +$ set file/remove image.xpm;* +$ set file/remove maze.xpm;* +$ set file/remove puzzle.xpm;* +$! +$ exit +$! +! SUBROUTINE TO CHECK DEPENDENCIES +$ make: subroutine +$ v='f$verify(0) +$! p1 What we are trying to make +$! p2 Command to make it +$! p3 - p8 What it depends on +$ +$ if (f$extract(0,3,p2) .eqs. "cc ") then write optf "''p1'" +$ if (f$extract(0,4,p2) .eqs. "cxx ") then write optf "''p1'" +$ +$ if f$search(p1) .eqs. "" then goto MakeIt +$ time=f$cvtime(f$file(p1,"RDT")) +$ arg=3 +$Loop: +$ argument=p'arg +$ if argument .eqs. "" then goto Exit +$ el=0 +$Loop2: +$ file=f$element(el," ",argument) +$ if file .eqs. " " then goto Endl +$ afile="" +$Loop3: +$ ofile=afile +$ afile=f$search(file) +$ if afile .eqs. "" .or. afile .eqs. ofile then goto NextEl +$ if f$cvtime(f$file(afile,"RDT")) .gts. time then goto MakeIt +$ goto Loop3 +$NextEL: +$ el=el+1 +$ goto Loop2 +$EndL: +$ arg=arg+1 +$ if arg .le. 8 then goto Loop +$ goto Exit +$ +$MakeIt: +$ set verify +$ 'p2 +$ vv='f$verify(0) +$Exit: +$ if v then set verify +$ endsubroutine diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 00000000..5e1a43eb --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,30 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || errstatus=$? + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus diff --git a/modes/Imakefile b/modes/Imakefile new file mode 100644 index 00000000..37f5e391 --- /dev/null +++ b/modes/Imakefile @@ -0,0 +1,318 @@ +#ifndef XCOMM +#define XCOMM /**/# +#endif +XCOMM @(#)Sub Imakefile xlockmore +XCOMM + +#include "../iconfig.h" + +top_srcdir = .. +BITMAPDIR = $(top_srcdir)/bitmaps/ +PIXMAPDIR = $(top_srcdir)/pixmaps/ +UTILDIR = ../xlock/ +GLDIR = glx/ +UTILOBJDIR = ../xlock/ +GLOBJDIR = glx/ + +DM = +DOM = +DU = $(UTILDIR) +DOU = $(UTILOBJDIR) +DG = $(GLDIR) +DOG = $(GLOBJDIR) +OM = $(O)$(S)$(DOM) +OU = $(O)$(S)$(DOU) +OG = $(O)$(S)$(DOG) +CM = $(C) $(DM) +CU = $(C) $(DU) +CG = $(C) $(DG) + +XCOMM please define +XCOMM C as the C source code extension +XCOMM O as the object extension +XCOMM S as the separator for object code + +XCOMM Here is your chance to override the default icon: +XCOMM TINYBITMAP = $(BITMAPTYPE) +TINYBITMAP = t-x11 +SMALLBITMAP = s-$(BITMAPTYPE) +MEDIUMBITMAP = m-$(BITMAPTYPE) +LARGEBITMAP = l-$(BITMAPTYPE) +MEDIUMPIXMAP = m-$(PIXMAPTYPE) +LARGEPIXMAP = l-$(PIXMAPTYPE) + +XCOMM EYESBITMAP = $(MEDIUMBITMAP) +EYESBITMAP = m-grelb +FLAGBITMAP = $(MEDIUMBITMAP) +IMAGEBITMAP = $(MEDIUMBITMAP) +XCOMM IMAGEBITMAP = l-bob #Slackware icon +XCOMM IMAGEBITMAP = m-xlock #XLock icon +XCOMM LIFEBITMAP = $(SMALLBITMAP) +LIFEBITMAP = s-grelb +LIFE1DBITMAP = $(TINYBITMAP) +MAZEBITMAP = $(LARGEBITMAP) +XCOMM MAZEBITMAP = m-xlock +XCOMM PACMANBITMAP = $(MEDIUMBITMAP) +PACMANBITMAP = m-ghost +XCOMM PUZZLEBITMAP = $(LARGEBITMAP) +PUZZLEBITMAP = l-xlock +XCOMM PUZZLEBITMAP = l-linux +FLAGPIXMAP = $(MEDIUMPIXMAP) +XCOMM FLAGPIXMAP = m-xlock +IMAGEPIXMAP = $(MEDIUMPIXMAP) +XCOMM IMAGEPIXMAP = m-xlock +MAZEPIXMAP = $(MEDIUMPIXMAP) +XCOMM MAZEPIXMAP = m-xlock +XCOMM PUZZLEPIXMAP = $(LARGEPIXMAP) +PUZZLEPIXMAP = l-xlock +XCOMM PUZZLEPIXMAP = l-linux + +XCOMM List of object files +XLOCKUTILOBJS = $(DOU)xlock$(OU)passwd$(OU)resource$(O)$(S)\ +$(DOU)util$(OU)logout$(OU)mode$(OU)ras$(OU)xbm$(O)$(S)\ +$(DOU)vis$(OU)color$(OU)random$(OU)iostuff$(OU)automata$(O)$(S)\ +$(DOU)spline$(OU)erase$(OU)sound$(O)$(S)\ +$(DOU)vtlock$(O) +#ifdef Check +XLOCKCHECKOBJS = $(S)memcheck$(O) +#endif +#ifdef Unstable +XLOCKUNSTABLEOBJS = $(DOM)decay$(OM)lyapunov$(O) +#endif +XLOCKMODEOBJS = $(DOM)ant$(OM)ball$(OM)bat$(OM)blot$(OM)\ +bouboule$(OM)bounce$(OM)braid$(OM)bubble$(OM)bug$(OM)\ +clock$(OM)coral$(OM)crystal$(OM)\ +daisy$(OM)dclock$(OM)deco$(OM)demon$(OM)\ +dilemma$(OM)discrete$(OM)drift$(OM)eyes$(OM)\ +fadeplot$(OM)flag$(OM)flame$(OM)flow$(OM)forest$(OM)\ +galaxy$(OM)goop$(OM)grav$(OM)\ +helix$(OM)hop$(OM)hyper$(OM)\ +ico$(OM)ifs$(OM)image$(OM)julia$(OM)kaleid$(OM)kumppa$(OM)\ +laser$(OM)life$(OM)life1d$(OM)life3d$(OM)\ +lightning$(OM)lisa$(OM)lissie$(OM)loop$(OM)\ +mandelbrot$(OM)marquee$(OM)maze$(OM)mountain$(OM)munch$(OM)nose$(OM)\ +pacman$(OM)penrose$(OM)petal$(OM)puzzle$(OM)pyro$(OM)\ +qix$(OM)roll$(OM)rotor$(OM)\ +shape$(OM)sierpinski$(OM)slip$(OM)\ +sphere$(OM)spiral$(OM)spline$(OM)\ +star$(OM)starfish$(OM)strange$(OM)swarm$(OM)swirl$(OM)\ +tetris$(OM)thornbird$(OM)triangle$(OM)tube$(OM)turtle$(OM)\ +vines$(OM)voters$(OM)\ +wator$(OM)wire$(OM)world$(OM)worm$(OM)xjack$(OM)\ +$(XLOCKUNSTABLEOBJS) +#ifdef XpmLibrary +XLOCKXPMOBJS = $(DOM)cartoon$(O) +#endif +#ifdef GLLibrary +#ifdef XpmLibrary +#ifdef Unstable +XLOCKUNSTABLEGLOBJS = $(DOG)lament$(O) +#endif +#endif +XLOCKGLOBJS = $(DOG)cage$(OG)gears$(O)$(S)\ +$(DOG)moebius$(OG)morph3d$(O)$(S)\ +$(DOG)rubik$(OG)stairs$(OG)superquadrics$(O)$(S)\ +$(DOG)buildlwo$(OG)pipes$(OG)pipeobjs$(O)$(S)\ +$(DOG)sproingies$(OG)sproingiewrap$(OG)s1_b$(O)$(S)\ +$(DOG)s1_1$(OG)s1_2$(OG)s1_3$(OG)s1_4$(OG)s1_5$(OG)s1_6$(O)$(S)\ +$(DOG)atlantis$(OG)dolphin$(OG)shark$(OG)swim$(OG)whale$(O)$(S)\ +$(DOG)bubble3d$(OG)b_draw$(OG)b_sphere$(OG)b_lockglue$(O)$(S)\ +$(XLOCKUNSTABLEGLOBJS) +#endif +#if 1 +XLOCKBOMBOBJS = $(DOM)bomb$(O) +#endif +XLOCKUTILMODEOBJS = $(XLOCKBOMBOBJS)$(S)$(DOM)blank$(OM)random$(O) +XLOCKALLMODEOBJS = $(XLOCKMODEOBJS)$(S)\ +$(XLOCKXPMOBJS)$(S)$(XLOCKGLOBJS)$(S)$(XLOCKUTILMODEOBJS) +XLOCKALLUTILOBJS = $(XLOCKUTILOBJS)$(XLOCKCHECKOBJS) +XLOCKOBJS = $(XLOCKALLUTILOBJS)$(S)$(XLOCKALLMODEOBJS) + +XCOMM List of source files +BITMAPS = eyes.xbm flag.xbm ghost.xbm image.xbm life.xbm life1d.xbm \ +maze.xbm puzzle.xbm +PIXMAPS = flag.xpm image.xpm maze.xpm puzzle.xpm +XLOCKUTILHDRS = xlock.h mode.h vroot.h ras.h spline.h version.h config.h +XLOCKUTILSRCS = $(DU)xlock$(CU)passwd$(CU)resource$(C) \ +$(DU)vis$(CU)color$(CU)random$(CU)iostuff$(CU)automata$(C) \ +$(DU)spline$(CU)sound$(C) +XLOCKCHECKSRCS = $(DU)memcheck$(C) +XLOCKMODESRCS = $(DM)ant$(CM)ball$(CM)bat$(CM)blot$(C) \ +$(DM)bouboule$(CM)bounce$(CM)braid$(CM)bubble$(CM)bug$(C) \ +$(DM)clock$(CM)coral$(CM)crystal$(C) \ +$(DM)daisy$(CM)dclock$(CM)decay$(CM)deco$(CM)demon$(C) \ +$(DM)dilemma$(CM)discrete$(OM)drift$(C) \ +$(DM)eyes$(CM)fadeplot$(CM)flag$(CM)flame$(CM)flow$(CM)forest$(C) \ +$(DM)galaxy$(CM)goop$(CM)grav$(C) \ +$(DM)helix$(CM)hop$(CM)hyper$(C) \ +$(DM)ico$(CM)ifs$(CM)image$(CM)julia$(CM)kaleid$(CM)kumppa$(C) \ +$(DM)laser$(CM)life$(CM)life1d$(CM)life3d$(C) \ +$(DM)lightning$(CM)lisa$(CM)lissie$(CM)loop$(CM)lyapunov$(C) \ +$(DM)mandelbrot$(CM)marquee$(CM)maze$(CM)mountain$(CM)munch$(CM)nose$(C) \ +$(DM)pacman$(CM)penrose$(CM)petal$(CM)puzzle$(CM)pyro$(C) \ +$(DM)qix$(CM)roll$(CM)rotor$(C) \ +$(DM)shape$(CM)sierpinski$(CM)slip$(C) \ +$(DM)sphere$(CM)spiral$(CM)spline$(C) \ +$(DM)star$(CM)starfish$(CM)strange$(CM)swarm$(CM)swirl$(C) \ +$(DM)tetris$(CM)thornbird$(CM)triangle$(CM)tube$(CM)turtle$(C) \ +$(DM)vines$(CM)voters$(C) \ +$(DM)wator$(CM)wire$(CM)world$(CM)worm$(CM)xjack$(C) +XLOCKXPMSRCS = $(DM)cartoon$(C) +XLOCKGLSRCS = $(DG)cage$(CG)gears$(C) \ +$(DG)lament$(CG)moebius$(CG)morph3d$(C) \ +$(DG)rubik$(CG)stairs$(CG)superquadrics$(C) \ +$(DG)buildlwo$(CG)pipes$(CG)pipeobjs$(C) \ +$(DG)sproingies$(CG)sproingiewrap$(CG)s1_b$(C) \ +$(DG)s1_1$(CG)s1_2$(CG)s1_3$(CG)s1_4$(CG)s1_5$(CG)s1_6$(C) \ +$(DG)atlantis$(CG)dolphin$(CG)shark$(CG)swim$(CG)whale$(C) \ +$(DG)bubble3d$(CG)b_draw$(CG)b_sphere$(CG)b_lockglue$(C) +XLOCKBOMBSRCS = $(DM)bomb$(C) +XLOCKUTILMODESRCS = $(XLOCKBOMBSRCS) $(DM)blank$(CM)random$(C) +XLOCKSRCS = $(XLOCKUTILSRCS) $(XLOCKCHECKSRCS) $(XLOCKXPMSRCS) $(XLOCKGLSRCS) \ +$(XLOCKMODESRCS) $(XLOCKUTILMODESRCS) + +AllTarget($(UTILDIR)xlock) +#ifdef XpmLibrary +depend:: $(BITMAPS) $(PIXMAPS) +#else +depend:: $(BITMAPS) +#endif + +MODULES = $(XLOCKALLMODEOBJS:.o=.xlk) + +#ifndef Modules + +NormalProgramTarget($(UTILDIR)xlock, $(XLOCKOBJS), $(DEPXLIB), $(LOCAL_LIBRARIES), NullParameter) + +#else + +EXTRA_LDOPTIONS += $(MODULEFLAGS) +AllTarget($(MODULES) $(UTILDIR)xlock) + +NormalProgramTarget($(UTILDIR)xlock, $(XLOCKOBJS), $(DEPXLIB), $(LOCAL_LIBRARIES), NullParameter) + +InstallMultiple($(MODULES), $(DEF_MODULEPATH)) + +$(XLOCKALLMODEOBJS) : %.o:%.c + NormalSharedLibObjCompile() + +$(MODULES) : %.xlk:%.o + $(RM) $@ + $(CCLINK) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $< + +clean:: + $(RM) $(MODULES) +#endif + +DependTarget() +LintTarget() + +eyes$(O) : eyes$(C) eyes.xbm +life$(O) : life$(C) life.xbm +life1d$(O) : life1d$(C) life1d.xbm +pacman$(O) : pacman$(C) ghost.xbm +# Do not need xpm files if not using them but not worth figuring out +flag$(O) : flag$(C) flag.xbm flag.xpm +image$(O) : image$(C) image.xbm image.xpm +maze$(O) : maze$(C) maze.xbm maze.xpm +puzzle$(O) : puzzle$(C) puzzle.xbm puzzle.xpm + +eyes.xbm : $(BITMAPDIR)$(EYESBITMAP).xbm + $(RM) eyes.xbm ; $(LN_S) $(BITMAPDIR)$(EYESBITMAP).xbm eyes.xbm + +flag.xbm : $(BITMAPDIR)$(FLAGBITMAP).xbm + $(RM) flag.xbm ; $(LN_S) $(BITMAPDIR)$(FLAGBITMAP).xbm flag.xbm + +image.xbm : $(BITMAPDIR)$(IMAGEBITMAP).xbm + $(RM) image.xbm ; $(LN_S) $(BITMAPDIR)$(IMAGEBITMAP).xbm image.xbm + +ghost.xbm : $(BITMAPDIR)$(PACMANBITMAP).xbm + $(RM) ghost.xbm ; $(LN_S) $(BITMAPDIR)$(PACMANBITMAP).xbm ghost.xbm + +life.xbm : $(BITMAPDIR)$(LIFEBITMAP).xbm + $(RM) life.xbm ; $(LN_S) $(BITMAPDIR)$(LIFEBITMAP).xbm life.xbm + +life1d.xbm : $(BITMAPDIR)$(LIFE1DBITMAP).xbm + $(RM) life1d.xbm ; $(LN_S) $(BITMAPDIR)$(LIFE1DBITMAP).xbm life1d.xbm + +maze.xbm : $(BITMAPDIR)$(MAZEBITMAP).xbm + $(RM) maze.xbm ; $(LN_S) $(BITMAPDIR)$(MAZEBITMAP).xbm maze.xbm + +puzzle.xbm : $(BITMAPDIR)$(PUZZLEBITMAP).xbm + $(RM) puzzle.xbm ; $(LN_S) $(BITMAPDIR)$(PUZZLEBITMAP).xbm puzzle.xbm + +flag.xpm : $(PIXMAPDIR)$(FLAGPIXMAP).xpm + $(RM) flag.xpm ; $(LN_S) $(PIXMAPDIR)$(FLAGPIXMAP).xpm flag.xpm + +image.xpm : $(PIXMAPDIR)$(IMAGEPIXMAP).xpm + $(RM) image.xpm ; $(LN_S) $(PIXMAPDIR)$(IMAGEPIXMAP).xpm image.xpm + +maze.xpm : $(PIXMAPDIR)$(MAZEPIXMAP).xpm + $(RM) maze.xpm ; $(LN_S) $(PIXMAPDIR)$(MAZEPIXMAP).xpm maze.xpm + +puzzle.xpm : $(PIXMAPDIR)$(PUZZLEPIXMAP).xpm + $(RM) puzzle.xpm ; $(LN_S) $(PIXMAPDIR)$(PUZZLEPIXMAP).xpm puzzle.xpm + +$(UTILOBJDIR)xlock.o : $(UTILDIR)xlock.c +$(UTILOBJDIR)passwd.o : $(UTILDIR)passwd.c +$(UTILOBJDIR)resource.o : $(UTILDIR)resource.c +$(UTILOBJDIR)util.o : $(UTILDIR)util.c +$(UTILOBJDIR)logout.o : $(UTILDIR)logout.c +$(UTILOBJDIR)mode.o : $(UTILDIR)mode.c +$(UTILOBJDIR)ras.o : $(UTILDIR)ras.c +$(UTILOBJDIR)xbm.o : $(UTILDIR)xbm.c +$(UTILOBJDIR)vis.o : $(UTILDIR)vis.c +$(UTILOBJDIR)color.o : $(UTILDIR)color.c +$(UTILOBJDIR)random.o : $(UTILDIR)random.c +$(UTILOBJDIR)iostuff.o : $(UTILDIR)iostuff.c +$(UTILOBJDIR)automata.o : $(UTILDIR)automata.c +$(UTILOBJDIR)spline.o : $(UTILDIR)spline.c +$(UTILOBJDIR)sound.o : $(UTILDIR)sound.c +$(UTILOBJDIR)vtlock.o : $(UTILDIR)vtlock.c +$(UTILOBJDIR)memcheck.o : $(UTILDIR)memcheck.c + +$(XLOCKUTILOBJS) : + cd $(UTILOBJDIR) ; \ +$(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +$(GLOBJDIR)cage.o : $(GLDIR)cage.c +$(GLOBJDIR)gears.o : $(GLDIR)gears.c +$(GLOBJDIR)lament.o : $(GLDIR)lament.c +$(GLOBJDIR)moebius.o : $(GLDIR)moebius.c +$(GLOBJDIR)morph3d.o : $(GLDIR)morph3d.c +$(GLOBJDIR)rubik.o : $(GLDIR)rubik.c +$(GLOBJDIR)stairs.o : $(GLDIR)stairs.c +$(GLOBJDIR)superquadrics.o : $(GLDIR)superquadrics.c +$(GLOBJDIR)buildlwo.o : $(GLDIR)buildlwo.c +$(GLOBJDIR)pipes.o : $(GLDIR)pipes.c +$(GLOBJDIR)pipeobjs.o : $(GLDIR)pipeobjs.c +$(GLOBJDIR)sproingies.o : $(GLDIR)sproingies.c +$(GLOBJDIR)sproingiewrap.o : $(GLDIR)sproingiewrap.c +$(GLOBJDIR)s1_b.o : $(GLDIR)s1_b.c +$(GLOBJDIR)s1_1.o : $(GLDIR)s1_1.c +$(GLOBJDIR)s1_2.o : $(GLDIR)s1_2.c +$(GLOBJDIR)s1_3.o : $(GLDIR)s1_3.c +$(GLOBJDIR)s1_4.o : $(GLDIR)s1_4.c +$(GLOBJDIR)s1_5.o : $(GLDIR)s1_5.c +$(GLOBJDIR)s1_6.o : $(GLDIR)s1_6.c +$(GLOBJDIR)atlantis.o : $(GLDIR)atlantis.c +$(GLOBJDIR)swim.o : $(GLDIR)swim.c +$(GLOBJDIR)dolphin.o : $(GLDIR)dolphin.c +$(GLOBJDIR)shark.o : $(GLDIR)shark.c +$(GLOBJDIR)whale.o : $(GLDIR)whale.c +$(GLOBJDIR)bubble3d.o : $(GLDIR)bubble3d.c +$(GLOBJDIR)b_draw.o : $(GLDIR)b_draw.c +$(GLOBJDIR)b_sphere.o : $(GLDIR)b_sphere.c +$(GLOBJDIR)b_lockglue.o : $(GLDIR)b_lockglue.c + +$(XLOCKGLOBJS) : + cd $(GLDIR) ; \ +$(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +XLOCKINC = -I$(top_srcdir) -I. -I$(UTILDIR) -I../$(UTILDIR) + +distclean:: clean + $(RM) Makefile $(BITMAPS) $(PIXMAPS) \ +config.status config.cache config.log config.h + +clean.all:: distclean diff --git a/modes/Makefile.in b/modes/Makefile.in new file mode 100644 index 00000000..4c0ef233 --- /dev/null +++ b/modes/Makefile.in @@ -0,0 +1,1214 @@ +# $Id : Makefile.in 4.04 1997/07/10 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +# @SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ +BITMAPDIR = @BITMAPDIR@/ +PIXMAPDIR = @PIXMAPDIR@/ +UTILDIR = $(top_srcdir)/xlock/ +GLDIR = $(top_srcdir)/modes/glx/ +UTILOBJDIR = ../xlock/ +GLOBJDIR = glx/ + +N = +O = .o +#O = .obj +C = .c +CX = .cc +S = $(N) $(N) +#S = , + +DM = $(VPATH) +DOM = +DU = $(UTILDIR) +DOU = $(UTILOBJDIR) +DG = $(GLDIR) +DOG = $(GLOBJDIR) +OM = $(O)$(S)$(DOM) +OU = $(O)$(S)$(DOU) +OG = $(O)$(S)$(DOG) +CM = $(C) $(DM) +CU = $(C) $(DU) +CG = $(C) $(DG) +CXG = $(CX) $(DG) + +# please define +# C as the C source code extension +# CX as the C++ source code extension +# O as the object extension +# S as the separator for object code + + +# This debugging is new and is untested on many systems. +@CHECK@CHECKDEF = -DDEBUG +@CHECK@CHECKLDFLAG = -g +@CHECK@XLOCKCHECKOBJS = $(DOU)memcheck$(O) + +# List of object files +XLOCKUTILOBJS = $(DOU)xlock$(OU)passwd$(OU)resource$(O)$(S)\ +$(DOU)util$(OU)logout$(OU)mode$(OU)ras$(OU)xbm$(O)$(S)\ +$(DOU)vis$(OU)color$(OU)random$(OU)iostuff$(OU)automata$(O)$(S)\ +$(DOU)spline$(OU)sound$(OU)erase$(O)$(S)\ +$(DOU)vtlock$(OU)vtlock_proc$(O)$(S)$(XLOCKCHECKOBJS) + +XLOCKMODEOBJS = $(DOM)ant$(OM)ball$(OM)bat$(OM)blot$(OM)\ +bouboule$(OM)bounce$(OM)braid$(OM)bubble$(OM)bug$(OM)\ +clock$(OM)coral$(OM)crystal$(OM)\ +daisy$(OM)deco$(OM)dclock$(OM)demon$(OM)\ +dilemma$(OM)discrete$(OM)drift$(OM)\ +eyes$(OM)fadeplot$(OM)flag$(OM)flame$(OM)flow$(OM)forest$(OM)\ +galaxy$(OM)goop$(OM)grav$(OM)\ +helix$(OM)hop$(OM)hyper$(OM)\ +ico$(OM)ifs$(OM)image$(OM)julia$(OM)kaleid$(OM)kumppa$(OM)\ +laser$(OM)life$(OM)life1d$(OM)life3d$(OM)\ +lightning$(OM)lisa$(OM)lissie$(OM)loop$(OM)\ +mandelbrot$(OM)marquee$(OM)maze$(OM)mountain$(OM)munch$(OM)nose$(OM)\ +pacman$(OM)penrose$(OM)petal$(OM)puzzle$(OM)pyro$(OM)\ +qix$(OM)roll$(OM)rotor$(OM)\ +shape$(OM)sierpinski$(OM)slip$(OM)\ +sphere$(OM)spiral$(OM)spline$(OM)\ +star$(OM)starfish$(OM)strange$(OM)swarm$(OM)swirl$(OM)\ +tetris$(OM)thornbird$(OM)triangle$(OM)tube$(OM)turtle$(OM)\ +vines$(OM)voters$(OM)\ +wator$(OM)wire$(OM)world$(OM)worm$(OM)xjack$(O) +@UNSTABLE@XLOCKUNSTABLEOBJS = decay$(OM)lyapunov$(O) +@XPM@XLOCKXPMOBJS = $(DOM)cartoon$(O) +@GL@XLOCKGLOBJS = $(DOG)cage$(OG)gears$(O)$(S)\ +@GL@$(DOG)moebius$(OG)morph3d$(O)$(S)\ +@GL@$(DOG)rubik$(OG)stairs$(OG)superquadrics$(O)$(S)\ +@GL@$(DOG)buildlwo$(OG)pipes$(OG)pipeobjs$(O)$(S)\ +@GL@$(DOG)sproingies$(OG)sproingiewrap$(OG)s1_b$(O)$(S)\ +@GL@$(DOG)s1_1$(OG)s1_2$(OG)s1_3$(OG)s1_4$(OG)s1_5$(OG)s1_6$(O)$(S)\ +@GL@$(DOG)atlantis$(OG)dolphin$(OG)shark$(OG)swim$(OG)whale$(O)$(S)\ +@GL@$(DOG)bubble3d$(OG)b_draw$(OG)b_sphere$(OG)b_lockglue$(O) +@XPM@@GL@XLOCKXPMGLOBJS = $(DOG)lament$(O) +@CCC@@GL@XLOCKCPPGLOBJS = $(DOG)invert$(OG)i_figureeight$(OG)i_linkage$(O)$(S)\ +@CCC@@GL@$(DOG)i_sphere$(OG)i_spline$(O)$(S)\ +@CCC@@GL@$(DOG)i_threejet$(OG)i_threejetvec$(O)$(S)\ +@CCC@@GL@$(DOG)i_twojet$(OG)i_twojetvec$(O) +@UNSTABLE@@CCC@@GL@@GLTT@XLOCKUNSTABLETEXTGLOBJS = $(DOG)text3d$(O) +@UNSTABLE@@GL@XLOCKUNSTABLEGLOBJS = +@BOMB@XLOCKBOMBOBJS = $(DOM)bomb$(O) +XLOCKUTILMODEOBJS = $(XLOCKBOMBOBJS)$(S)$(DOM)blank$(OM)random$(O) +XLOCKALLMODEOBJS = $(XLOCKMODEOBJS)$(S)$(XLOCKUNSTABLEOBJS)$(S)\ +$(XLOCKXPMOBJS)$(S)$(XLOCKGLOBJS)$(S)\ +$(XLOCKXPMGLOBJS)$(S)$(XLOCKCPPGLOBJS)$(S)\ +$(XLOCKUNSTABLEGLOBJS)$(S)$(XLOCKUNSTABLETEXTGLOBJS)$(S)\ +$(XLOCKUTILMODEOBJS) +XLOCKALLUTILOBJS = $(XLOCKUTILOBJS)$(XLOCKDEBUGOBJS) +XLOCKOBJS = $(XLOCKALLUTILOBJS)$(S)$(XLOCKALLMODEOBJS) + +# List of source files +BITMAPS = eyes.xbm flag.xbm ghost.xbm image.xbm life.xbm life1d.xbm \ +maze.xbm puzzle.xbm +PIXMAPS = flag.xpm image.xpm maze.xpm puzzle.xpm +XLOCKUTILHDRS = xlock.h mode.h vroot.h ras.h version.h config.h +XLOCKCHECKSRCS = $(DU)memcheck$(C) +XLOCKUTILSRCS = $(DU)xlock$(CU)passwd$(CU)resource$(C) \ +$(DU)util$(CU)logout$(CU)mode$(CU)ras$(CU)xbm$(C) \ +$(DU)vis$(CU)color$(CU)random$(CU)iostuff$(CU)automata$(C) \ +$(DU)spline$(CU)sound$(CU)erase$(C) \ +$(DU)vtlock$(CU)vtlock_proc$(C) $(XLOCKCHECKSRCS) + +XLOCKMODESRCS = $(DM)ant$(CM)ball$(CM)bat$(CM)blot$(C) \ +$(DM)bouboule$(CM)bounce$(CM)braid$(CM)bubble$(CM)bug$(C) \ +$(DM)clock$(CM)coral$(CM)crystal$(C) \ +$(DM)daisy$(CM)dclock$(CM)decay$(CM)deco$(CM)demon$(C) \ +$(DM)dilemma$(CM)discrete$(CM)drift$(CM)eyes$(C) \ +$(DM)fadeplot$(CM)flag$(CM)flame$(CM)flow$(CM)forest$(C) \ +$(DM)galaxy$(CM)goop$(CM)grav$(C) \ +$(DM)helix$(CM)hop$(CM)hyper$(C) \ +$(DM)ico$(CM)ifs$(CM)image$(CM)julia$(CM)kaleid$(CM)kumppa$(C) \ +$(DM)laser$(CM)life$(CM)life1d$(CM)life3d$(C) \ +$(DM)lightning$(CM)lisa$(CM)lissie$(CM)loop$(CM)lyapunov$(C) \ +$(DM)mandelbrot$(CM)marquee$(CM)maze$(CM)mountain$(CM)munch$(CM)nose$(C) \ +$(DM)pacman$(CM)penrose$(CM)petal$(CM)puzzle$(CM)pyro$(C) \ +$(DM)qix$(CM)roll$(CM)rotor$(C) \ +$(DM)shape$(CM)sierpinski$(CM)slip$(C) \ +$(DM)sphere$(CM)spiral$(CM)spline$(C) \ +$(DM)star$(CM)starfish$(CM)strange$(CM)swarm$(CM)swirl$(C) \ +$(DM)tetris$(CM)thornbird$(CM)triangle$(CM)tube$(CM)turtle$(C) \ +$(DM)vines$(CM)voters$(C) \ +$(DM)wator$(CM)wire$(CM)world$(CM)worm$(CM)xjack$(C) +@XPM@XLOCKXPMSRCS = $(DM)cartoon$(C) +@GL@XLOCKGLSRCS = $(DG)cage$(CG)gears$(C) \ +@GL@$(DG)lament$(CG)moebius$(CG)morph3d$(C) \ +@GL@$(DG)rubik$(CG)stairs$(CG)superquadrics$(C) \ +@GL@$(DG)buildlwo$(CG)pipes$(CG)pipeobjs$(C) \ +@GL@$(DG)sproingies$(CG)sproingiewrap$(CG)s1_b$(C) \ +@GL@$(DG)s1_1$(CG)s1_2$(CG)s1_3$(CG)s1_4$(CG)s1_5$(CG)s1_6$(C) \ +@GL@$(DG)atlantis$(CG)dolphin$(CG)shark$(CG)swim$(CG)whale$(C) \ +@GL@$(DG)bubble3d$(CG)text3d$(CXG)b_draw$(CG)b_sphere$(CG)b_lockglue$(C) +@BOMB@XLOCKBOMBSRCS = $(DM)bomb$(C) +XLOCKUTILMODESRCS = $(XLOCKBOMBSRCS) $(DM)blank$(CM)random$(C) +XLOCKSRCS = $(XLOCKUTILSRCS) $(XLOCKXPMSRCS) $(XLOCKGLSRCS) \ +$(XLOCKMODESRCS) $(XLOCKUTILMODESRCS) + +# default target +all : $(XLOCKOBJS) $(UTILOBJDIR)xlock + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@/man1 +xapploaddir = @APPDEFAULTS@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTPGMFLAGS = @INSTPGMFLAGS@ + + +#CC = cc -g +#CC = cc -Ac -g +#CC = cc -Xc -g +#CC = acc -g +#CC = CC -g +#CC = gcc -g -Wall -ansi -pedantic +#CC = gcc -g -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes +#CC = g++ -g -Wall +CC = @CC@ +CXX = @CXX@ + +LINT = lint +#LINT = alint + +#DEPEND = makedepend +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +#BITMAPTYPE = x11 +#PIXMAPTYPE = x11 +BITMAPTYPE = @BITMAPTYPE@ +PIXMAPTYPE = @PIXMAPTYPE@ + +# Here is your chance to override the default icon: +TINYBITMAP = $(BITMAPTYPE) +TINYBITMAP = t-x11 +SMALLBITMAP = s-$(BITMAPTYPE) +MEDIUMBITMAP = m-$(BITMAPTYPE) +LARGEBITMAP = l-$(BITMAPTYPE) +MEDIUMPIXMAP = m-$(PIXMAPTYPE) +LARGEPIXMAP = l-$(PIXMAPTYPE) + +#EYESBITMAP = $(MEDIUMBITMAP) +EYESBITMAP = m-grelb +FLAGBITMAP = $(MEDIUMBITMAP) +IMAGEBITMAP = $(MEDIUMBITMAP) +#IMAGEBITMAP = l-bob #Slackware icon +#IMAGEBITMAP = m-xlock #XLock icon +#LIFEBITMAP = $(SMALLBITMAP) +LIFEBITMAP = s-grelb +LIFE1DBITMAP = $(TINYBITMAP) +MAZEBITMAP = $(LARGEBITMAP) +#MAZEBITMAP = m-xlock +#PACMANBITMAP = $(MEDIUMBITMAP) +PACMANBITMAP = m-ghost +#PUZZLEBITMAP = $(LARGEBITMAP) +PUZZLEBITMAP = l-xlock +#PUZZLEBITMAP = l-linux +FLAGPIXMAP = $(MEDIUMPIXMAP) +#FLAGPIXMAP = m-xlock +IMAGEPIXMAP = $(MEDIUMPIXMAP) +#IMAGEPIXMAP = m-xlock +MAZEPIXMAP = $(MEDIUMPIXMAP) +#MAZEPIXMAP = m-xlock +#PUZZLEPIXMAP = $(LARGEPIXMAP) +PUZZLEPIXMAP = l-xlock +#PUZZLEPIXMAP = l-linux + +LN_S = @LN_S@ +RM = rm -f +RM_S = $(RM) +ECHO = echo + +#BLN_S = set file/enter=[] +#RM = delete/noconfirm/nolog +#RM_S = set file/remove/nolog +#ECHO = write sys$output + +DEFINES = -DDEF_FILESEARCHPATH=\"$(xapploaddir)/%N%C%S:$(xapploaddir)/%N%S\" $(CHECKDEF) +DEFS = @DEFS@ $(DEFINES) +XLOCKINC = -I. -I.. -I$(UTILDIR) -I../.. @XLOCKINC@ +CFLAGS = @CFLAGS@ +CXXFLAGS = @CXXFLAGS@ +#CFLAGS = -O +#CFLAGS = -g +XLOCKLDFLAGS = @XLOCKLDFLAGS@ $(CHECKLDFLAG) +XLIBS = @XLIBS@ +XLOCKLIBS = @XLOCKLIBS@ + +#### +#### These might have become not necessary as configure do the job +#### It check for pthread, svga & glide in MesaGL lib and add each of them +#### if they was linked against. +#### +#MesaGL threads +#XLOCKLIBS = @XLOCKLIBS@ -lpthread +#MesaGL vga +#XLOCKLIBS = @XLOCKLIBS@ -lvga +#3Dfx Glide VooDoo graphics device driver for MesaGL >= 2.3? _NOT_ tested. +#XLOCKLIBS = @XLOCKLIBS@ -lglide -ltexus +#### +#### + +#SAFEWORD +#XLOCKLIBS = @XLOCKLIBS@ -lidpb +#If you have purify, and want to use it, uncomment this definition or +# run the make as `make PURIFY=purify' +# or run configure with the --with-purify argument. +PURIFY = @PURIFY@ + +xlock : $(UTILOBJDIR)xlock + +$(UTILOBJDIR)xlock : $(XLOCKOBJS) + $(PURIFY) $(CXX) $(CFLAGS) -o $@ $(XLOCKOBJS) $(XLOCKLDFLAGS) $(XLOCKLIBS) + @ $(ECHO) "$@ BUILD COMPLETE" + @ $(ECHO) "" + +eyes.xbm : $(BITMAPDIR)$(EYESBITMAP).xbm + $(RM) eyes.xbm ; $(LN_S) $(BITMAPDIR)$(EYESBITMAP).xbm eyes.xbm + +flag.xbm : $(BITMAPDIR)$(FLAGBITMAP).xbm + $(RM) flag.xbm ; $(LN_S) $(BITMAPDIR)$(FLAGBITMAP).xbm flag.xbm + +image.xbm : $(BITMAPDIR)$(IMAGEBITMAP).xbm + $(RM) image.xbm ; $(LN_S) $(BITMAPDIR)$(IMAGEBITMAP).xbm image.xbm + +ghost.xbm : $(BITMAPDIR)$(PACMANBITMAP).xbm + $(RM) ghost.xbm ; $(LN_S) $(BITMAPDIR)$(PACMANBITMAP).xbm ghost.xbm + +life.xbm : $(BITMAPDIR)$(LIFEBITMAP).xbm + $(RM) life.xbm ; $(LN_S) $(BITMAPDIR)$(LIFEBITMAP).xbm life.xbm + +life1d.xbm : $(BITMAPDIR)$(LIFE1DBITMAP).xbm + $(RM) life1d.xbm ; $(LN_S) $(BITMAPDIR)$(LIFE1DBITMAP).xbm life1d.xbm + +maze.xbm : $(BITMAPDIR)$(MAZEBITMAP).xbm + $(RM) maze.xbm ; $(LN_S) $(BITMAPDIR)$(MAZEBITMAP).xbm maze.xbm + +puzzle.xbm : $(BITMAPDIR)$(PUZZLEBITMAP).xbm + $(RM) puzzle.xbm ; $(LN_S) $(BITMAPDIR)$(PUZZLEBITMAP).xbm puzzle.xbm + +flag.xpm : $(PIXMAPDIR)$(FLAGPIXMAP).xpm + $(RM) flag.xpm ; $(LN_S) $(PIXMAPDIR)$(FLAGPIXMAP).xpm flag.xpm + +image.xpm : $(PIXMAPDIR)$(IMAGEPIXMAP).xpm + $(RM) image.xpm ; $(LN_S) $(PIXMAPDIR)$(IMAGEPIXMAP).xpm image.xpm + +maze.xpm : $(PIXMAPDIR)$(MAZEPIXMAP).xpm + $(RM) maze.xpm ; $(LN_S) $(PIXMAPDIR)$(MAZEPIXMAP).xpm maze.xpm + +puzzle.xpm : $(PIXMAPDIR)$(PUZZLEPIXMAP).xpm + $(RM) puzzle.xpm ; $(LN_S) $(PIXMAPDIR)$(PUZZLEPIXMAP).xpm puzzle.xpm + +$(UTILOBJDIR)xlock.o : $(UTILDIR)xlock.c +$(UTILOBJDIR)passwd.o : $(UTILDIR)passwd.c +$(UTILOBJDIR)resource.o : $(UTILDIR)resource.c +$(UTILOBJDIR)util.o : $(UTILDIR)util.c +$(UTILOBJDIR)logout.o : $(UTILDIR)logout.c +$(UTILOBJDIR)mode.o : $(UTILDIR)mode.c +$(UTILOBJDIR)ras.o : $(UTILDIR)ras.c +$(UTILOBJDIR)xbm.o : $(UTILDIR)xbm.c +$(UTILOBJDIR)vis.o : $(UTILDIR)vis.c +$(UTILOBJDIR)color.o : $(UTILDIR)color.c +$(UTILOBJDIR)random.o : $(UTILDIR)random.c +$(UTILOBJDIR)iostuff.o : $(UTILDIR)iostuff.c +$(UTILOBJDIR)automata.o : $(UTILDIR)automata.c +$(UTILOBJDIR)spline.o : $(UTILDIR)spline.c +$(UTILOBJDIR)sound.o : $(UTILDIR)sound.c +$(UTILOBJDIR)erase.o : $(UTILDIR)erase.c +$(UTILOBJDIR)vtlock.o : $(UTILDIR)vtlock.c +$(UTILOBJDIR)vtlock_proc.o : $(UTILDIR)vtlock_proc.c +$(UTILOBJDIR)memcheck.o : $(UTILDIR)memcheck.c + +#$(XLOCKUTILOBJS) : +# cd $(UTILOBJDIR) ; \ +#$(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +$(GLOBJDIR)cage.o : $(GLDIR)cage.c +$(GLOBJDIR)gears.o : $(GLDIR)gears.c +$(GLOBJDIR)lament.o : $(GLDIR)lament.c +$(GLOBJDIR)text3d.o : $(GLDIR)text3d.cc +$(GLOBJDIR)moebius.o : $(GLDIR)moebius.c +$(GLOBJDIR)morph3d.o : $(GLDIR)morph3d.c +$(GLOBJDIR)rubik.o : $(GLDIR)rubik.c +$(GLOBJDIR)stairs.o : $(GLDIR)stairs.c +$(GLOBJDIR)superquadrics.o : $(GLDIR)superquadrics.c +$(GLOBJDIR)buildlwo.o : $(GLDIR)buildlwo.c +$(GLOBJDIR)pipes.o : $(GLDIR)pipes.c +$(GLOBJDIR)pipeobjs.o : $(GLDIR)pipeobjs.c +$(GLOBJDIR)sproingies.o : $(GLDIR)sproingies.c +$(GLOBJDIR)sproingiewrap.o : $(GLDIR)sproingiewrap.c +$(GLOBJDIR)s1_b.o : $(GLDIR)s1_b.c +$(GLOBJDIR)s1_1.o : $(GLDIR)s1_1.c +$(GLOBJDIR)s1_2.o : $(GLDIR)s1_2.c +$(GLOBJDIR)s1_3.o : $(GLDIR)s1_3.c +$(GLOBJDIR)s1_4.o : $(GLDIR)s1_4.c +$(GLOBJDIR)s1_5.o : $(GLDIR)s1_5.c +$(GLOBJDIR)s1_6.o : $(GLDIR)s1_6.c + +#$(XLOCKGLOBJS) : +# cd $(GLOBJDIR) ; \ +#$(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +.SUFFIXES : $(C) $(CX) $(O) + +$(C)$(O) : + $(CC) -c -o $@ $(CPPFLAGS) $(DEFS) $(XLOCKINC) $(CFLAGS) $< + +$(CX)$(O) : + $(CXX) -c -o $@ $(CPPFLAGS) $(DEFS) $(XLOCKINC) $(CXXFLAGS) $< + +install : install-program install-man install-ad + @ $(ECHO) "$@ COMPLETE" + @ $(ECHO) "" + +install-program : xlock + $(top_srcdir)/mkinstalldirs $(bindir) + $(INSTALL_PROGRAM) $(INSTPGMFLAGS) $(UTILOBJDIR)xlock $(bindir) + +install-man : + $(top_srcdir)/mkinstalldirs $(mandir) + $(INSTALL_DATA) $(UTILDIR)xlock.man $(mandir)/xlock.1 + +install-ad : + $(top_srcdir)/mkinstalldirs $(xapploaddir) + $(INSTALL_DATA) $(UTILDIR)XLock.ad $(xapploaddir)/XLock + +uninstall : uninstall-program uninstall-man uninstall-ad + +uninstall-program : + $(RM) $(bindir)/xlock + +uninstall-man : + $(RM) $(mandir)/xlock.1 + +uninstall-ad : + $(RM) $(xapploaddir)/XLock + +lint : + $(LINT) -ax -DLINT $(DEFS) $(XLOCKINC) $(XLOCKSRCS) -L/usr/openwin/lib -lX11 -lm + +xrdb : + +man : + +html : + +hlp : + +clean : + $(RM) *.o *.xlk core *~ *% *.bak *.orig *.rej make.log MakeOut + +distclean : clean + $(RM) Makefile $(BITMAPS) $(PIXMAPS) + +clean.all : distclean + +# Adds all current dependencies to Makefile +depend : $(BITMAPS) $(PIXMAPS) + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(XLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XLOCKSRCS) + +# 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) -- \ + $(XLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XLOCKSRCS) | \ + ( \ + awk '/^#.*Id : Makefile.in/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@^\.\./xlock@$$(UTILOBJDIR)@' \ + -e 's@^\.\./modes/glx@$$(GLOBJDIR)@' \ + -e 's@\.\./bitmaps@$$(BITMAPDIR)@g' \ + -e 's@\.\./pixmaps@$$(PIXMAPDIR)@g' \ + -e 's@\.\./xlock@$$(UTILDIR)@g' \ + -e 's@\.\./modes/glx@$$(GLDIR)@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +# -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \ +# -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' ; \ + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/xlock.o: ../config.h +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/color.h +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/util.h +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/iostuff.h +$(UTILOBJDIR)/xlock.o: $(BITMAPDIR)/mailempty.xbm +$(UTILOBJDIR)/xlock.o: $(BITMAPDIR)/mailfull.xbm +$(UTILOBJDIR)/xlock.o: $(UTILDIR)/vroot.h +$(UTILOBJDIR)/passwd.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/passwd.o: ../config.h +$(UTILOBJDIR)/passwd.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/passwd.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/passwd.o: $(UTILDIR)/iostuff.h +$(UTILOBJDIR)/resource.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/resource.o: ../config.h +$(UTILOBJDIR)/resource.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/resource.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/resource.o: $(UTILDIR)/vis.h +$(UTILOBJDIR)/resource.o: $(UTILDIR)/iostuff.h +$(UTILOBJDIR)/resource.o: $(UTILDIR)/version.h +$(UTILOBJDIR)/util.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/util.o: ../config.h +$(UTILOBJDIR)/util.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/util.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/logout.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/logout.o: ../config.h +$(UTILOBJDIR)/logout.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/logout.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/mode.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/mode.o: ../config.h +$(UTILOBJDIR)/mode.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/mode.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/ras.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/ras.o: ../config.h +$(UTILOBJDIR)/ras.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/ras.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/ras.o: $(UTILDIR)/iostuff.h +$(UTILOBJDIR)/ras.o: $(UTILDIR)/ras.h +$(UTILOBJDIR)/xbm.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/xbm.o: ../config.h +$(UTILOBJDIR)/xbm.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/xbm.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/vis.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/vis.o: ../config.h +$(UTILOBJDIR)/vis.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/vis.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/vis.o: $(UTILDIR)/vis.h +$(UTILOBJDIR)/color.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/color.o: ../config.h +$(UTILOBJDIR)/color.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/color.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/color.o: $(UTILDIR)/color.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/iostuff.o: ../config.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/vis.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/color.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/iostuff.h +$(UTILOBJDIR)/iostuff.o: $(UTILDIR)/ras.h +$(UTILOBJDIR)/automata.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/automata.o: ../config.h +$(UTILOBJDIR)/automata.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/automata.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/automata.o: $(UTILDIR)/automata.h +$(UTILOBJDIR)/spline.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/spline.o: ../config.h +$(UTILOBJDIR)/spline.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/spline.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/spline.o: $(UTILDIR)/spline.h +$(UTILOBJDIR)/sound.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/sound.o: ../config.h +$(UTILOBJDIR)/sound.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/sound.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/erase.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/erase.o: ../config.h +$(UTILOBJDIR)/erase.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/erase.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/vtlock.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/vtlock.o: ../config.h +$(UTILOBJDIR)/vtlock.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/vtlock.o: $(UTILDIR)/random.h +$(UTILOBJDIR)/vtlock_proc.o: $(UTILDIR)/xlock.h +$(UTILOBJDIR)/vtlock_proc.o: ../config.h +$(UTILOBJDIR)/vtlock_proc.o: $(UTILDIR)/mode.h +$(UTILOBJDIR)/vtlock_proc.o: $(UTILDIR)/random.h +cartoon.o: $(UTILDIR)/xlock.h +cartoon.o: ../config.h +cartoon.o: $(UTILDIR)/mode.h +cartoon.o: $(UTILDIR)/random.h +cartoon.o: $(UTILDIR)/vis.h +cartoon.o: $(UTILDIR)/color.h +cartoon.o: $(UTILDIR)/iostuff.h +cartoon.o: $(PIXMAPDIR)/calvin2.xpm +cartoon.o: $(PIXMAPDIR)/gravity.xpm +cartoon.o: $(PIXMAPDIR)/calvin4.xpm +cartoon.o: $(PIXMAPDIR)/calvinf.xpm +cartoon.o: $(PIXMAPDIR)/hobbes.xpm +cartoon.o: $(PIXMAPDIR)/calvin.xpm +cartoon.o: $(PIXMAPDIR)/marino2.xpm +cartoon.o: $(PIXMAPDIR)/calvin3.xpm +cartoon.o: $(PIXMAPDIR)/garfield.xpm +$(GLOBJDIR)/cage.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/cage.o: ../config.h +$(GLOBJDIR)/cage.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/cage.o: $(UTILDIR)/random.h +$(GLOBJDIR)/cage.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/cage.o: $(GLDIR)/e_textures.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/gears.o: ../config.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/random.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/lament.o: ../config.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/random.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/moebius.o: ../config.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/random.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/moebius.o: $(GLDIR)/e_textures.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/morph3d.o: ../config.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/rubik.o: ../config.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/random.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/stairs.o: ../config.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/random.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/stairs.o: $(GLDIR)/e_textures.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/superquadrics.o: ../config.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/random.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/buildlwo.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/buildlwo.o: ../config.h +$(GLOBJDIR)/buildlwo.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/buildlwo.o: $(UTILDIR)/random.h +$(GLOBJDIR)/buildlwo.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/pipes.o: ../config.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/random.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/pipes.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/pipeobjs.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/pipeobjs.o: ../config.h +$(GLOBJDIR)/pipeobjs.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/pipeobjs.o: $(UTILDIR)/random.h +$(GLOBJDIR)/pipeobjs.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/sproingies.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/sproingies.o: ../config.h +$(GLOBJDIR)/sproingies.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/sproingies.o: $(UTILDIR)/random.h +$(GLOBJDIR)/sproingies.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/sproingiewrap.o: ../config.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/random.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/s1_b.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_b.o: ../config.h +$(GLOBJDIR)/s1_b.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_b.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_b.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/s1_1.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_1.o: ../config.h +$(GLOBJDIR)/s1_1.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_1.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_1.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/s1_2.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_2.o: ../config.h +$(GLOBJDIR)/s1_2.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_2.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_2.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/s1_3.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_3.o: ../config.h +$(GLOBJDIR)/s1_3.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_3.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_3.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/s1_4.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_4.o: ../config.h +$(GLOBJDIR)/s1_4.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_4.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_4.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/s1_5.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_5.o: ../config.h +$(GLOBJDIR)/s1_5.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_5.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_5.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/s1_6.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_6.o: ../config.h +$(GLOBJDIR)/s1_6.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_6.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_6.o: $(GLDIR)/buildlwo.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/atlantis.o: ../config.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/random.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/atlantis.o: $(GLDIR)/atlantis.h +$(GLOBJDIR)/dolphin.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/dolphin.o: ../config.h +$(GLOBJDIR)/dolphin.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/dolphin.o: $(UTILDIR)/random.h +$(GLOBJDIR)/dolphin.o: $(GLDIR)/atlantis.h +$(GLOBJDIR)/shark.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/shark.o: ../config.h +$(GLOBJDIR)/shark.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/shark.o: $(UTILDIR)/random.h +$(GLOBJDIR)/shark.o: $(GLDIR)/atlantis.h +$(GLOBJDIR)/swim.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/swim.o: ../config.h +$(GLOBJDIR)/swim.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/swim.o: $(UTILDIR)/random.h +$(GLOBJDIR)/swim.o: $(GLDIR)/atlantis.h +$(GLOBJDIR)/whale.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/whale.o: ../config.h +$(GLOBJDIR)/whale.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/whale.o: $(UTILDIR)/random.h +$(GLOBJDIR)/whale.o: $(GLDIR)/atlantis.h +$(GLOBJDIR)/bubble3d.o: $(GLDIR)/bubble3d.h +$(GLOBJDIR)/bubble3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/bubble3d.o: ../config.h +$(GLOBJDIR)/bubble3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/bubble3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/text3d.o: ../config.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/text3d.o: $(GLDIR)/text3d.h +$(GLOBJDIR)/b_draw.o: $(GLDIR)/bubble3d.h +$(GLOBJDIR)/b_draw.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/b_draw.o: ../config.h +$(GLOBJDIR)/b_draw.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/b_draw.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_sphere.o: $(GLDIR)/bubble3d.h +$(GLOBJDIR)/b_sphere.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/b_sphere.o: ../config.h +$(GLOBJDIR)/b_sphere.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/b_sphere.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_lockglue.o: $(GLDIR)/bubble3d.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/b_lockglue.o: ../config.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/vis.h +ant.o: $(UTILDIR)/xlock.h +ant.o: ../config.h +ant.o: $(UTILDIR)/mode.h +ant.o: $(UTILDIR)/random.h +ant.o: $(UTILDIR)/automata.h +ball.o: $(UTILDIR)/xlock.h +ball.o: ../config.h +ball.o: $(UTILDIR)/mode.h +ball.o: $(UTILDIR)/random.h +bat.o: $(UTILDIR)/xlock.h +bat.o: ../config.h +bat.o: $(UTILDIR)/mode.h +bat.o: $(UTILDIR)/random.h +bat.o: $(UTILDIR)/vis.h +bat.o: $(UTILDIR)/color.h +bat.o: $(UTILDIR)/iostuff.h +bat.o: $(PIXMAPDIR)/bat-0.xpm +bat.o: $(PIXMAPDIR)/bat-1.xpm +bat.o: $(PIXMAPDIR)/bat-2.xpm +bat.o: $(PIXMAPDIR)/bat-3.xpm +bat.o: $(PIXMAPDIR)/bat-4.xpm +bat.o: $(BITMAPDIR)/bat-0.xbm +bat.o: $(BITMAPDIR)/bat-1.xbm +bat.o: $(BITMAPDIR)/bat-2.xbm +bat.o: $(BITMAPDIR)/bat-3.xbm +bat.o: $(BITMAPDIR)/bat-4.xbm +blot.o: $(UTILDIR)/xlock.h +blot.o: ../config.h +blot.o: $(UTILDIR)/mode.h +blot.o: $(UTILDIR)/random.h +bouboule.o: $(UTILDIR)/xlock.h +bouboule.o: ../config.h +bouboule.o: $(UTILDIR)/mode.h +bouboule.o: $(UTILDIR)/random.h +bounce.o: $(UTILDIR)/xlock.h +bounce.o: ../config.h +bounce.o: $(UTILDIR)/mode.h +bounce.o: $(UTILDIR)/random.h +bounce.o: $(BITMAPDIR)/bounce-0.xbm +bounce.o: $(BITMAPDIR)/bounce-1.xbm +bounce.o: $(BITMAPDIR)/bounce-2.xbm +bounce.o: $(BITMAPDIR)/bounce-3.xbm +bounce.o: $(BITMAPDIR)/bounce-mask.xbm +braid.o: $(UTILDIR)/xlock.h +braid.o: ../config.h +braid.o: $(UTILDIR)/mode.h +braid.o: $(UTILDIR)/random.h +bubble.o: $(UTILDIR)/xlock.h +bubble.o: ../config.h +bubble.o: $(UTILDIR)/mode.h +bubble.o: $(UTILDIR)/random.h +bug.o: $(UTILDIR)/xlock.h +bug.o: ../config.h +bug.o: $(UTILDIR)/mode.h +bug.o: $(UTILDIR)/random.h +bug.o: $(UTILDIR)/automata.h +clock.o: $(UTILDIR)/xlock.h +clock.o: ../config.h +clock.o: $(UTILDIR)/mode.h +clock.o: $(UTILDIR)/random.h +coral.o: $(UTILDIR)/xlock.h +coral.o: ../config.h +coral.o: $(UTILDIR)/mode.h +coral.o: $(UTILDIR)/random.h +crystal.o: $(UTILDIR)/xlock.h +crystal.o: ../config.h +crystal.o: $(UTILDIR)/mode.h +crystal.o: $(UTILDIR)/random.h +crystal.o: $(UTILDIR)/color.h +daisy.o: $(UTILDIR)/xlock.h +daisy.o: ../config.h +daisy.o: $(UTILDIR)/mode.h +daisy.o: $(UTILDIR)/random.h +dclock.o: $(UTILDIR)/xlock.h +dclock.o: ../config.h +dclock.o: $(UTILDIR)/mode.h +dclock.o: $(UTILDIR)/random.h +dclock.o: $(UTILDIR)/util.h +dclock.o: $(UTILDIR)/iostuff.h +deco.o: $(UTILDIR)/xlock.h +deco.o: ../config.h +deco.o: $(UTILDIR)/mode.h +deco.o: $(UTILDIR)/random.h +demon.o: $(UTILDIR)/xlock.h +demon.o: ../config.h +demon.o: $(UTILDIR)/mode.h +demon.o: $(UTILDIR)/random.h +demon.o: $(UTILDIR)/automata.h +dilemma.o: $(UTILDIR)/xlock.h +dilemma.o: ../config.h +dilemma.o: $(UTILDIR)/mode.h +dilemma.o: $(UTILDIR)/random.h +dilemma.o: $(UTILDIR)/automata.h +dilemma.o: $(BITMAPDIR)/cooperat.xbm +dilemma.o: $(BITMAPDIR)/defect.xbm +discrete.o: $(UTILDIR)/xlock.h +discrete.o: ../config.h +discrete.o: $(UTILDIR)/mode.h +discrete.o: $(UTILDIR)/random.h +drift.o: $(UTILDIR)/xlock.h +drift.o: ../config.h +drift.o: $(UTILDIR)/mode.h +drift.o: $(UTILDIR)/random.h +eyes.o: $(UTILDIR)/xlock.h +eyes.o: ../config.h +eyes.o: $(UTILDIR)/mode.h +eyes.o: $(UTILDIR)/random.h +eyes.o: $(UTILDIR)/iostuff.h +eyes.o: eyes.xbm +fadeplot.o: $(UTILDIR)/xlock.h +fadeplot.o: ../config.h +fadeplot.o: $(UTILDIR)/mode.h +fadeplot.o: $(UTILDIR)/random.h +flag.o: $(UTILDIR)/xlock.h +flag.o: ../config.h +flag.o: $(UTILDIR)/mode.h +flag.o: $(UTILDIR)/random.h +flag.o: $(UTILDIR)/color.h +flag.o: $(UTILDIR)/iostuff.h +flag.o: flag.xbm +flag.o: flag.xpm +flame.o: $(UTILDIR)/xlock.h +flame.o: ../config.h +flame.o: $(UTILDIR)/mode.h +flame.o: $(UTILDIR)/random.h +flow.o: $(UTILDIR)/xlock.h +flow.o: ../config.h +flow.o: $(UTILDIR)/mode.h +flow.o: $(UTILDIR)/random.h +forest.o: $(UTILDIR)/xlock.h +forest.o: ../config.h +forest.o: $(UTILDIR)/mode.h +forest.o: $(UTILDIR)/random.h +galaxy.o: $(UTILDIR)/xlock.h +galaxy.o: ../config.h +galaxy.o: $(UTILDIR)/mode.h +galaxy.o: $(UTILDIR)/random.h +goop.o: $(UTILDIR)/xlock.h +goop.o: ../config.h +goop.o: $(UTILDIR)/mode.h +goop.o: $(UTILDIR)/random.h +goop.o: $(UTILDIR)/spline.h +grav.o: $(UTILDIR)/xlock.h +grav.o: ../config.h +grav.o: $(UTILDIR)/mode.h +grav.o: $(UTILDIR)/random.h +helix.o: $(UTILDIR)/xlock.h +helix.o: ../config.h +helix.o: $(UTILDIR)/mode.h +helix.o: $(UTILDIR)/random.h +hop.o: $(UTILDIR)/xlock.h +hop.o: ../config.h +hop.o: $(UTILDIR)/mode.h +hop.o: $(UTILDIR)/random.h +hyper.o: $(UTILDIR)/xlock.h +hyper.o: ../config.h +hyper.o: $(UTILDIR)/mode.h +hyper.o: $(UTILDIR)/random.h +ico.o: $(UTILDIR)/xlock.h +ico.o: ../config.h +ico.o: $(UTILDIR)/mode.h +ico.o: $(UTILDIR)/random.h +ifs.o: $(UTILDIR)/xlock.h +ifs.o: ../config.h +ifs.o: $(UTILDIR)/mode.h +ifs.o: $(UTILDIR)/random.h +image.o: $(UTILDIR)/xlock.h +image.o: ../config.h +image.o: $(UTILDIR)/mode.h +image.o: $(UTILDIR)/random.h +image.o: $(UTILDIR)/color.h +image.o: $(UTILDIR)/iostuff.h +image.o: image.xbm +image.o: image.xpm +julia.o: $(UTILDIR)/xlock.h +julia.o: ../config.h +julia.o: $(UTILDIR)/mode.h +julia.o: $(UTILDIR)/random.h +kaleid.o: $(UTILDIR)/xlock.h +kaleid.o: ../config.h +kaleid.o: $(UTILDIR)/mode.h +kaleid.o: $(UTILDIR)/random.h +kumppa.o: $(UTILDIR)/xlock.h +kumppa.o: ../config.h +kumppa.o: $(UTILDIR)/mode.h +kumppa.o: $(UTILDIR)/random.h +laser.o: $(UTILDIR)/xlock.h +laser.o: ../config.h +laser.o: $(UTILDIR)/mode.h +laser.o: $(UTILDIR)/random.h +life.o: $(UTILDIR)/xlock.h +life.o: ../config.h +life.o: $(UTILDIR)/mode.h +life.o: $(UTILDIR)/random.h +life.o: $(UTILDIR)/color.h +life.o: $(UTILDIR)/iostuff.h +life.o: $(UTILDIR)/automata.h +life.o: life.xbm +life1d.o: $(UTILDIR)/xlock.h +life1d.o: ../config.h +life1d.o: $(UTILDIR)/mode.h +life1d.o: $(UTILDIR)/random.h +life1d.o: $(UTILDIR)/color.h +life1d.o: $(UTILDIR)/automata.h +life1d.o: $(UTILDIR)/iostuff.h +life1d.o: life1d.xbm +life3d.o: $(UTILDIR)/xlock.h +life3d.o: ../config.h +life3d.o: $(UTILDIR)/mode.h +life3d.o: $(UTILDIR)/random.h +life3d.o: $(UTILDIR)/iostuff.h +lightning.o: $(UTILDIR)/xlock.h +lightning.o: ../config.h +lightning.o: $(UTILDIR)/mode.h +lightning.o: $(UTILDIR)/random.h +lisa.o: $(UTILDIR)/xlock.h +lisa.o: ../config.h +lisa.o: $(UTILDIR)/mode.h +lisa.o: $(UTILDIR)/random.h +lissie.o: $(UTILDIR)/xlock.h +lissie.o: ../config.h +lissie.o: $(UTILDIR)/mode.h +lissie.o: $(UTILDIR)/random.h +loop.o: $(UTILDIR)/xlock.h +loop.o: ../config.h +loop.o: $(UTILDIR)/mode.h +loop.o: $(UTILDIR)/random.h +loop.o: $(UTILDIR)/automata.h +mandelbrot.o: $(UTILDIR)/xlock.h +mandelbrot.o: ../config.h +mandelbrot.o: $(UTILDIR)/mode.h +mandelbrot.o: $(UTILDIR)/random.h +mandelbrot.o: $(UTILDIR)/vis.h +mandelbrot.o: $(UTILDIR)/color.h +marquee.o: $(UTILDIR)/xlock.h +marquee.o: ../config.h +marquee.o: $(UTILDIR)/mode.h +marquee.o: $(UTILDIR)/random.h +marquee.o: $(UTILDIR)/iostuff.h +maze.o: $(UTILDIR)/xlock.h +maze.o: ../config.h +maze.o: $(UTILDIR)/mode.h +maze.o: $(UTILDIR)/random.h +maze.o: $(UTILDIR)/color.h +maze.o: $(UTILDIR)/iostuff.h +maze.o: $(BITMAPDIR)/gray1.xbm +maze.o: maze.xbm +maze.o: maze.xpm +mountain.o: $(UTILDIR)/xlock.h +mountain.o: ../config.h +mountain.o: $(UTILDIR)/mode.h +mountain.o: $(UTILDIR)/random.h +munch.o: $(UTILDIR)/xlock.h +munch.o: ../config.h +munch.o: $(UTILDIR)/mode.h +munch.o: $(UTILDIR)/random.h +nose.o: $(UTILDIR)/xlock.h +nose.o: ../config.h +nose.o: $(UTILDIR)/mode.h +nose.o: $(UTILDIR)/random.h +nose.o: $(UTILDIR)/iostuff.h +nose.o: $(BITMAPDIR)/nose-hat.xbm +nose.o: $(BITMAPDIR)/nose-hatd.xbm +nose.o: $(BITMAPDIR)/nose-facef.xbm +nose.o: $(BITMAPDIR)/nose-faced.xbm +nose.o: $(BITMAPDIR)/nose-facel.xbm +nose.o: $(BITMAPDIR)/nose-facer.xbm +nose.o: $(BITMAPDIR)/nose-shoef.xbm +nose.o: $(BITMAPDIR)/nose-shoel.xbm +nose.o: $(BITMAPDIR)/nose-shoer.xbm +nose.o: $(BITMAPDIR)/nose-stepl.xbm +nose.o: $(BITMAPDIR)/nose-stepr.xbm +pacman.o: $(UTILDIR)/xlock.h +pacman.o: ../config.h +pacman.o: $(UTILDIR)/mode.h +pacman.o: $(UTILDIR)/random.h +pacman.o: $(UTILDIR)/iostuff.h +pacman.o: ghost.xbm +penrose.o: $(UTILDIR)/xlock.h +penrose.o: ../config.h +penrose.o: $(UTILDIR)/mode.h +penrose.o: $(UTILDIR)/random.h +petal.o: $(UTILDIR)/xlock.h +petal.o: ../config.h +petal.o: $(UTILDIR)/mode.h +petal.o: $(UTILDIR)/random.h +puzzle.o: $(UTILDIR)/xlock.h +puzzle.o: ../config.h +puzzle.o: $(UTILDIR)/mode.h +puzzle.o: $(UTILDIR)/random.h +puzzle.o: $(UTILDIR)/color.h +puzzle.o: $(UTILDIR)/iostuff.h +puzzle.o: puzzle.xbm +puzzle.o: puzzle.xpm +pyro.o: $(UTILDIR)/xlock.h +pyro.o: ../config.h +pyro.o: $(UTILDIR)/mode.h +pyro.o: $(UTILDIR)/random.h +qix.o: $(UTILDIR)/xlock.h +qix.o: ../config.h +qix.o: $(UTILDIR)/mode.h +qix.o: $(UTILDIR)/random.h +roll.o: $(UTILDIR)/xlock.h +roll.o: ../config.h +roll.o: $(UTILDIR)/mode.h +roll.o: $(UTILDIR)/random.h +rotor.o: $(UTILDIR)/xlock.h +rotor.o: ../config.h +rotor.o: $(UTILDIR)/mode.h +rotor.o: $(UTILDIR)/random.h +shape.o: $(UTILDIR)/xlock.h +shape.o: ../config.h +shape.o: $(UTILDIR)/mode.h +shape.o: $(UTILDIR)/random.h +shape.o: $(BITMAPDIR)/gray1.xbm +shape.o: $(BITMAPDIR)/gray3.xbm +shape.o: $(BITMAPDIR)/stipple.xbm +shape.o: $(BITMAPDIR)/cross_weave.xbm +shape.o: $(BITMAPDIR)/dimple1.xbm +shape.o: $(BITMAPDIR)/dimple3.xbm +shape.o: $(BITMAPDIR)/flipped_gray.xbm +shape.o: $(BITMAPDIR)/hlines2.xbm +shape.o: $(BITMAPDIR)/light_gray.xbm +shape.o: $(BITMAPDIR)/root_weave.xbm +shape.o: $(BITMAPDIR)/vlines2.xbm +shape.o: $(BITMAPDIR)/vlines3.xbm +sierpinski.o: $(UTILDIR)/xlock.h +sierpinski.o: ../config.h +sierpinski.o: $(UTILDIR)/mode.h +sierpinski.o: $(UTILDIR)/random.h +slip.o: $(UTILDIR)/xlock.h +slip.o: ../config.h +slip.o: $(UTILDIR)/mode.h +slip.o: $(UTILDIR)/random.h +sphere.o: $(UTILDIR)/xlock.h +sphere.o: ../config.h +sphere.o: $(UTILDIR)/mode.h +sphere.o: $(UTILDIR)/random.h +spiral.o: $(UTILDIR)/xlock.h +spiral.o: ../config.h +spiral.o: $(UTILDIR)/mode.h +spiral.o: $(UTILDIR)/random.h +spline.o: $(UTILDIR)/xlock.h +spline.o: ../config.h +spline.o: $(UTILDIR)/mode.h +spline.o: $(UTILDIR)/random.h +star.o: $(UTILDIR)/xlock.h +star.o: ../config.h +star.o: $(UTILDIR)/mode.h +star.o: $(UTILDIR)/random.h +star.o: $(BITMAPDIR)/trek-0.xbm +star.o: $(BITMAPDIR)/trek-1.xbm +starfish.o: $(UTILDIR)/xlock.h +starfish.o: ../config.h +starfish.o: $(UTILDIR)/mode.h +starfish.o: $(UTILDIR)/random.h +starfish.o: $(UTILDIR)/color.h +starfish.o: $(UTILDIR)/spline.h +strange.o: $(UTILDIR)/xlock.h +strange.o: ../config.h +strange.o: $(UTILDIR)/mode.h +strange.o: $(UTILDIR)/random.h +swarm.o: $(UTILDIR)/xlock.h +swarm.o: ../config.h +swarm.o: $(UTILDIR)/mode.h +swarm.o: $(UTILDIR)/random.h +swirl.o: $(UTILDIR)/xlock.h +swirl.o: ../config.h +swirl.o: $(UTILDIR)/mode.h +swirl.o: $(UTILDIR)/random.h +swirl.o: $(UTILDIR)/vis.h +swirl.o: $(UTILDIR)/color.h +tetris.o: $(UTILDIR)/xlock.h +tetris.o: ../config.h +tetris.o: $(UTILDIR)/mode.h +tetris.o: $(UTILDIR)/random.h +tetris.o: $(UTILDIR)/color.h +thornbird.o: $(UTILDIR)/xlock.h +thornbird.o: ../config.h +thornbird.o: $(UTILDIR)/mode.h +thornbird.o: $(UTILDIR)/random.h +triangle.o: $(UTILDIR)/xlock.h +triangle.o: ../config.h +triangle.o: $(UTILDIR)/mode.h +triangle.o: $(UTILDIR)/random.h +tube.o: $(UTILDIR)/xlock.h +tube.o: ../config.h +tube.o: $(UTILDIR)/mode.h +tube.o: $(UTILDIR)/random.h +tube.o: $(UTILDIR)/vis.h +tube.o: $(UTILDIR)/color.h +turtle.o: $(UTILDIR)/xlock.h +turtle.o: ../config.h +turtle.o: $(UTILDIR)/mode.h +turtle.o: $(UTILDIR)/random.h +vines.o: $(UTILDIR)/xlock.h +vines.o: ../config.h +vines.o: $(UTILDIR)/mode.h +vines.o: $(UTILDIR)/random.h +voters.o: $(UTILDIR)/xlock.h +voters.o: ../config.h +voters.o: $(UTILDIR)/mode.h +voters.o: $(UTILDIR)/random.h +voters.o: $(UTILDIR)/automata.h +voters.o: $(BITMAPDIR)/sickle.xbm +voters.o: $(BITMAPDIR)/donkey.xbm +voters.o: $(BITMAPDIR)/elephant.xbm +wator.o: $(UTILDIR)/xlock.h +wator.o: ../config.h +wator.o: $(UTILDIR)/mode.h +wator.o: $(UTILDIR)/random.h +wator.o: $(UTILDIR)/automata.h +wator.o: $(BITMAPDIR)/fish-0.xbm +wator.o: $(BITMAPDIR)/fish-1.xbm +wator.o: $(BITMAPDIR)/fish-2.xbm +wator.o: $(BITMAPDIR)/fish-3.xbm +wator.o: $(BITMAPDIR)/fish-4.xbm +wator.o: $(BITMAPDIR)/fish-5.xbm +wator.o: $(BITMAPDIR)/fish-6.xbm +wator.o: $(BITMAPDIR)/fish-7.xbm +wator.o: $(BITMAPDIR)/shark-0.xbm +wator.o: $(BITMAPDIR)/shark-1.xbm +wator.o: $(BITMAPDIR)/shark-2.xbm +wator.o: $(BITMAPDIR)/shark-3.xbm +wator.o: $(BITMAPDIR)/shark-4.xbm +wator.o: $(BITMAPDIR)/shark-5.xbm +wator.o: $(BITMAPDIR)/shark-6.xbm +wator.o: $(BITMAPDIR)/shark-7.xbm +wire.o: $(UTILDIR)/xlock.h +wire.o: ../config.h +wire.o: $(UTILDIR)/mode.h +wire.o: $(UTILDIR)/random.h +wire.o: $(UTILDIR)/automata.h +world.o: $(UTILDIR)/xlock.h +world.o: ../config.h +world.o: $(UTILDIR)/mode.h +world.o: $(UTILDIR)/random.h +world.o: $(BITMAPDIR)/terra-00.xbm +world.o: $(BITMAPDIR)/terra-01.xbm +world.o: $(BITMAPDIR)/terra-02.xbm +world.o: $(BITMAPDIR)/terra-03.xbm +world.o: $(BITMAPDIR)/terra-04.xbm +world.o: $(BITMAPDIR)/terra-05.xbm +world.o: $(BITMAPDIR)/terra-06.xbm +world.o: $(BITMAPDIR)/terra-07.xbm +world.o: $(BITMAPDIR)/terra-08.xbm +world.o: $(BITMAPDIR)/terra-09.xbm +world.o: $(BITMAPDIR)/terra-10.xbm +world.o: $(BITMAPDIR)/terra-11.xbm +world.o: $(BITMAPDIR)/terra-12.xbm +world.o: $(BITMAPDIR)/terra-13.xbm +world.o: $(BITMAPDIR)/terra-14.xbm +world.o: $(BITMAPDIR)/terra-15.xbm +world.o: $(BITMAPDIR)/terra-16.xbm +world.o: $(BITMAPDIR)/terra-17.xbm +world.o: $(BITMAPDIR)/terra-18.xbm +world.o: $(BITMAPDIR)/terra-19.xbm +world.o: $(BITMAPDIR)/terra-20.xbm +world.o: $(BITMAPDIR)/terra-21.xbm +world.o: $(BITMAPDIR)/terra-22.xbm +world.o: $(BITMAPDIR)/terra-23.xbm +world.o: $(BITMAPDIR)/terra-24.xbm +world.o: $(BITMAPDIR)/terra-25.xbm +world.o: $(BITMAPDIR)/terra-26.xbm +world.o: $(BITMAPDIR)/terra-27.xbm +world.o: $(BITMAPDIR)/terra-28.xbm +world.o: $(BITMAPDIR)/terra-29.xbm +worm.o: $(UTILDIR)/xlock.h +worm.o: ../config.h +worm.o: $(UTILDIR)/mode.h +worm.o: $(UTILDIR)/random.h +xjack.o: $(UTILDIR)/xlock.h +xjack.o: ../config.h +xjack.o: $(UTILDIR)/mode.h +xjack.o: $(UTILDIR)/random.h +xjack.o: $(UTILDIR)/iostuff.h +bomb.o: $(UTILDIR)/xlock.h +bomb.o: ../config.h +bomb.o: $(UTILDIR)/mode.h +bomb.o: $(UTILDIR)/random.h +bomb.o: $(UTILDIR)/iostuff.h +blank.o: $(UTILDIR)/xlock.h +blank.o: ../config.h +blank.o: $(UTILDIR)/mode.h +blank.o: $(UTILDIR)/random.h +random.o: $(UTILDIR)/xlock.h +random.o: ../config.h +random.o: $(UTILDIR)/mode.h +random.o: $(UTILDIR)/random.h +random.o: $(UTILDIR)/color.h +random.o: $(UTILDIR)/util.h + diff --git a/modes/Makefile.inxs b/modes/Makefile.inxs new file mode 100644 index 00000000..992fbb8a --- /dev/null +++ b/modes/Makefile.inxs @@ -0,0 +1,1721 @@ +# xlockmore/modes/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../../configure' script generates `xlockmore/modes/Makefile' from this file. + +@SET_MAKE@ +.SUFFIXES: +.SUFFIXES: .c .o + +srcdir = @srcdir@ +top_srcdir = @top_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) + +#XS = $(topdir) +XS = $(srcdir)/../.. +HACK_SRC = $(XS)/hacks +HACK_BIN = ../../hacks +UTILS_SRC = $(XS)/utils +UTILS_BIN = ../../utils +XLOCK_SRC = $(XS)/xlockmore/xlock +XLOCK_BIN = ../xlock + +INCLUDES = -I$(srcdir) -I$(XLOCK_SRC) -I$(UTILS_SRC) -I$(HACK_SRC) \ + -I$(HACK_SRC)/.. -I.. @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 \ + $(UTILS_SRC)/erase.c $(UTILS_SRC)/sgivideo.c + +XLOCKMORE_SRCS = $(XLOCK_SRC)/automata.c $(XLOCK_SRC)/iostuff.c $(XLOCK_SRC)/spline.c $(XLOCK_SRC)/xbm.c + +UTIL_OBJS = $(UTILS_BIN)/alpha.o $(UTILS_BIN)/colors.o \ + $(UTILS_BIN)/grabscreen.o $(UTILS_BIN)/hsv.o \ + $(UTILS_BIN)/resources.o $(UTILS_BIN)/spline.o \ + $(UTILS_BIN)/usleep.o $(UTILS_BIN)/visual.o \ + $(UTILS_BIN)/xroger.o $(UTILS_BIN)/yarandom.o \ + $(UTILS_BIN)/erase.o $(UTILS_BIN)/sgivideo.o + +XLOCKMORE_OBJS = $(XLOCK_BIN)/automata.o $(XLOCK_BIN)/iostuff.o $(XLOCK_BIN)/spline.o $(XLOCK_BIN)/xbm.o + +# + +XLOCKMODEOBJS = ant.o ball.o bat.o blot.o \ +bouboule.o bounce.o braid.o bubble.o bug.o \ +clock.o coral.o crystal.o \ +daisy.o deco.o dclock.o demon.o dilemma.o discrete.o drift.o \ +eyes.o fadeplot.o flag.o flame.o flow.o forest.o \ +galaxy.o goop.o grav.o \ +helix.o hop.o hyper.o \ +ico.o ifs.o image.o julia.o kaleid.o \ +laser.o life.o life1d.o life3d.o \ +lightning.o lisa.o lissie.o loop.o \ +mandelbrot.o marquee.o maze.o mountain.o munch.o nose.o \ +pacman.o penrose.o petal.o puzzle.o pyro.o \ +qix.o roll.o rotor.o \ +shape.o sierpinski.o slip.o \ +sphere.o spiral.o spline.o \ +star.o strange.o swarm.o swirl.o \ +thornbird.o triangle.o tube.o turtle.o \ +vines.o voters.o \ +wator.o wire.o world.o worm.o \ +cartoon.o blank.o bomb.o +# @XPM@XLOCKXPMOBJS = cartoon.o +# @BOMB@XLOCKBOMBOBJS = $(DOM)bomb.o +# XLOCKUTILMODEOBJS = $(XLOCKBOMBOBJS)$(S)$(DOM)blank.o random.o +XLOCKALLMODEOBJS = $(XLOCKMODEOBJS)$(S)\ +$(XLOCKXPMOBJS)$(S)$(XLOCKGLOBJS)$(S)$(XLOCKUTILMODEOBJS) +XLOCKALLUTILOBJS = $(XLOCKUTILOBJS)$(XLOCKDEBUGOBJS) +OBJS = $(XLOCKALLUTILOBJS)$(S)$(XLOCKALLMODEOBJS) + +# List of source files +BITMAPS = eyes.xbm flag.xbm ghost.xbm image.xbm life.xbm life1d.xbm \ +maze.xbm puzzle.xbm +PIXMAPS = flag.xpm image.xpm maze.xpm puzzle.xpm + +XLOCKMODESRCS = ant.c ball.c bat.c blot.c \ +bouboule.c bounce.c braid.c bubble.c bug.c \ +clock.c coral.c crystal.c \ +daisy.c dclock.c deco.c demon.c dilemma.c discrete.c drift.c \ +eyes.c fadeplot.c flag.c flame.c flow.c forest.c \ +galaxy.c goop.c grav.c \ +helix.c hop.c hyper.c \ +ico.c ifs.c image.c julia.c kaleid.c \ +laser.c life.c life1d.c life3d.c \ +lightning.c lisa.c lissie.c loop.c \ +mandelbrot.c marquee.c maze.c mountain.c munch.c nose.c \ +pacman.c penrose.c petal.c puzzle.c pyro.c \ +qix.c roll.c rotor.c \ +shape.c sierpinski.c slip.c \ +sphere.c spiral.c spline.c \ +star.c strange.c swarm.c swirl.c \ +thornbird.c triangle.c tube.c turtle.c \ +vines.c voters.c \ +wator.c wire.c world.c worm.c \ +cartoon.c blank.c bomb.c +# @XPM@XLOCKXPMSRCS = cartoon.c +# @BOMB@XLOCKBOMBSRCS = bomb.c +# XLOCKUTILMODESRCS = $(XLOCKBOMBSRCS) blank.c random.c +SRCS = $(XLOCKUTILSRCS) $(XLOCKXPMSRCS) $(XLOCKGLSRCS) \ +$(XLOCKMODESRCS) $(XLOCKUTILMODESRCS) + +XLOCKMODEEXES = ant ball bat blot \ +bouboule bounce braid bubble bug \ +clock coral crystal \ +daisy dclock deco demon dilemma discrete drift \ +eyes fadeplot flame flag flow forest \ +galaxy goop grav \ +helix hop hyper \ +ico ifs image julia kaleid \ +laser life life1d life3d \ +lightning lisa lissie loop \ +mandelbrot marquee maze mountain munch nose \ +pacman penrose petal puzzle pyro \ +qix roll rotor \ +shape sierpinski slip \ +sphere spiral spline \ +star strange swarm swirl \ +thornbird triangle tube turtle \ +vines voters \ +wator wire world worm \ +cartoon blank bomb +# @XPM@XLOCKXPMEXES = cartoon +# @BOMB@XLOCKBOMBEXES = bomb +# XLOCKUTILMODEEXES = $(XLOCKBOMBEXES) blank random +EXES = $(XLOCKUTILEXES) $(XLOCKXPMEXES) $(XLOCKGLEXES) \ +$(XLOCKMODEEXES) $(XLOCKUTILMODEEXES) + +HACK_OBJS_1 = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \ + $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@ +HACK_OBJS = $(HACK_BIN)/screenhack.o $(HACK_OBJS_1) +XLOCK_OBJS = $(HACK_BIN)/screenhack-xlock.o $(XLOCK_BIN)/xlock.o $(COLOR_OBJS) $(HACK_OBJS_1) +COLOR_OBJS = $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o +GRAB_OBJS_1 = $(UTILS_BIN)/grabscreen.o $(SGI_VIDEO_OBJS) +GRAB_OBJS = $(GRAB_OBJS_1) $(COLOR_OBJS) +GRAB_LIBS = $(SGI_VIDEO_LIBS) + +HDRS = +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' \ + -e 's@ $$(srcdir)/\(.*config.h\)@ \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) + +BITMAPTYPE = x11 +PIXMAPTYPE = x11 +#BITMAPTYPE = @BITMAPTYPE@ +#PIXMAPTYPE = @PIXMAPTYPE@ + +# Here is your chance to override the default icon: +TINYBITMAP = $(BITMAPTYPE) +TINYBITMAP = t-x11 +SMALLBITMAP = s-$(BITMAPTYPE) +MEDIUMBITMAP = m-$(BITMAPTYPE) +LARGEBITMAP = l-$(BITMAPTYPE) +MEDIUMPIXMAP = m-$(PIXMAPTYPE) +LARGEPIXMAP = l-$(PIXMAPTYPE) + +#EYESBITMAP = $(MEDIUMBITMAP) +EYESBITMAP = m-grelb +FLAGBITMAP = $(MEDIUMBITMAP) +IMAGEBITMAP = $(MEDIUMBITMAP) +#IMAGEBITMAP = l-bob #Slackware icon +#IMAGEBITMAP = m-xlock #XLock icon +LIFEBITMAP = $(TINYBITMAP) +#LIFEBITMAP = $(SMALLBITMAP) +#LIFEBITMAP = s-grelb +LIFE1DBITMAP = $(TINYBITMAP) +MAZEBITMAP = $(LARGEBITMAP) +#MAZEBITMAP = m-xlock +#PACMANBITMAP = $(MEDIUMBITMAP) +PACMANBITMAP = m-ghost +#PUZZLEBITMAP = $(LARGEBITMAP) +PUZZLEBITMAP = l-xlock +#PUZZLEBITMAP = l-linux +FLAGPIXMAP = $(MEDIUMPIXMAP) +#FLAGPIXMAP = m-xlock +IMAGEPIXMAP = $(MEDIUMPIXMAP) +#IMAGEPIXMAP = m-xlock +MAZEPIXMAP = $(MEDIUMPIXMAP) +#MAZEPIXMAP = m-xlock +#PUZZLEPIXMAP = $(LARGEPIXMAP) +PUZZLEPIXMAP = l-xlock +#PUZZLEPIXMAP = l-linux + +eyes.o: eyes.c eyes.xbm +life.o : life.c life.xbm +life1d.o : life1d.c life1d.xbm +pacman.o : pacman.c ghost.xbm +# Do not need xpm files if not using them but not worth figuring out +flag.o : flag.c flag.xbm flag.xpm +image.o : image.c image.xbm image.xpm +maze.o : maze.c maze.xbm maze.xpm +puzzle.o : puzzle.c puzzle.xbm puzzle.xpm + +BITMAPDIR = $(HACK_SRC)/../xlockmore/bitmaps/ +PIXMAPDIR = $(HACK_SRC)/../xlockmore/pixmaps/ +LN_S = ln -s + +eyes.xbm : $(BITMAPDIR)$(EYESBITMAP).xbm + $(RM) eyes.xbm ; $(LN_S) $(BITMAPDIR)$(EYESBITMAP).xbm eyes.xbm + +flag.xbm : $(BITMAPDIR)$(FLAGBITMAP).xbm + $(RM) flag.xbm ; $(LN_S) $(BITMAPDIR)$(FLAGBITMAP).xbm flag.xbm + +image.xbm : $(BITMAPDIR)$(IMAGEBITMAP).xbm + $(RM) image.xbm ; $(LN_S) $(BITMAPDIR)$(IMAGEBITMAP).xbm image.xbm + +ghost.xbm : $(BITMAPDIR)$(PACMANBITMAP).xbm + $(RM) ghost.xbm ; $(LN_S) $(BITMAPDIR)$(PACMANBITMAP).xbm ghost.xbm + +life.xbm : $(BITMAPDIR)$(LIFEBITMAP).xbm + $(RM) life.xbm ; $(LN_S) $(BITMAPDIR)$(LIFEBITMAP).xbm life.xbm + +life1d.xbm : $(BITMAPDIR)$(LIFE1DBITMAP).xbm + $(RM) life1d.xbm ; $(LN_S) $(BITMAPDIR)$(LIFE1DBITMAP).xbm life1d.xbm + +maze.xbm : $(BITMAPDIR)$(MAZEBITMAP).xbm + $(RM) maze.xbm ; $(LN_S) $(BITMAPDIR)$(MAZEBITMAP).xbm maze.xbm + +puzzle.xbm : $(BITMAPDIR)$(PUZZLEBITMAP).xbm + $(RM) puzzle.xbm ; $(LN_S) $(BITMAPDIR)$(PUZZLEBITMAP).xbm puzzle.xbm + +flag.xpm : $(PIXMAPDIR)$(FLAGPIXMAP).xpm + $(RM) flag.xpm ; $(LN_S) $(PIXMAPDIR)$(FLAGPIXMAP).xpm flag.xpm + +image.xpm : $(PIXMAPDIR)$(IMAGEPIXMAP).xpm + $(RM) image.xpm ; $(LN_S) $(PIXMAPDIR)$(IMAGEPIXMAP).xpm image.xpm + +maze.xpm : $(PIXMAPDIR)$(MAZEPIXMAP).xpm + $(RM) maze.xpm ; $(LN_S) $(PIXMAPDIR)$(MAZEPIXMAP).xpm maze.xpm + +puzzle.xpm : $(PIXMAPDIR)$(PUZZLEPIXMAP).xpm + $(RM) puzzle.xpm ; $(LN_S) $(PIXMAPDIR)$(PUZZLEPIXMAP).xpm puzzle.xpm + +# 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)/sgivideo.o: $(UTILS_SRC)/sgivideo.c +$(UTILS_BIN)/hsv.o: $(UTILS_SRC)/hsv.c +$(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c +$(UTILS_BIN)/spline.o: $(UTILS_SRC)/spline.c +$(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 +$(UTILS_BIN)/erase.o: $(UTILS_SRC)/erase.c + +$(XLOCK_BIN)/automata.o: $(XLOCK_SRC)/automata.c +$(XLOCK_BIN)/iostuff.o: $(XLOCK_SRC)/iostuff.c +$(XLOCK_BIN)/xbm.o: $(XLOCK_SRC)/xbm.c +$(XLOCK_BIN)/spline.o: $(XLOCK_SRC)/spline.c + +$(UTIL_OBJS): + cd $(UTILS_BIN) ; \ + $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +$(XLOCKMORE_OBJS): + cd $(XLOCK_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. +# +$(HACK_BIN)/screenhack-xlock.o: $(HACK_SRC)/screenhack.c + $(CC) -o $@ -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) \ + -DXLOCKMORE $(HACK_SRC)/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 $(SPL) +GRAB = $(GRAB_OBJS) +ERASE = $(UTILS_BIN)/erase.o +AUTOMATA = $(XLOCK_BIN)/automata.o +IOSTUFF = $(XLOCK_BIN)/iostuff.o $(XLOCK_BIN)/xbm.o +SPLINE = $(XLOCK_BIN)/spline.o +COL = $(COLOR_OBJS) + +$(XLOCK_BIN)/xlock.o: $(XLOCK_SRC)/xlock.c + cd $(XLOCK_BIN) ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" + + +CC_HACK = $(CC) $(LDFLAGS) + +ant: ant.o $(XLOCK_OBJS) $(AUTOMATA) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(ERASE) $(HACK_LIBS) + +ball: ball.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +bat: bat.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(XPM_LIBS) + +blank: blank.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +blot: blot.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +bomb: bomb.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(HACK_LIBS) + +bouboule: bouboule.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +bounce: bounce.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +braid: braid.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +bubble: bubble.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +bug: bug.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +cartoon: cartoon.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(XPM_LIBS) + +clock: clock.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +coral: coral.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +crystal: crystal.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +daisy: daisy.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +dclock: dclock.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(HACK_LIBS) + +deco: deco.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +demon: demon.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +dilemma: dilemma.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +discrete: discrete.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +drift: drift.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +eyes: eyes.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(HACK_LIBS) + +fadeplot: fadeplot.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +flag: flag.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(XPM_LIBS) + +flame: flame.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +flow: flow.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +forest: forest.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +galaxy: galaxy.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +goop: goop.o $(XLOCK_OBJS) $(SPLINE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(SPLINE) $(HACK_LIBS) + +grav: grav.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +helix: helix.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +hop: hop.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +hyper: hyper.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +ico: ico.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +ifs: ifs.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +image: image.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(XPM_LIBS) + +julia: julia.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +kaleid: kaleid.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +laser: laser.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +life: life.o $(XLOCK_OBJS) $(AUTOMATA) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(IOSTUFF) $(HACK_LIBS) + +life1d: life1d.o $(XLOCK_OBJS) $(AUTOMATA) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(IOSTUFF) $(HACK_LIBS) + +life3d: life3d.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(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) + +lissie: lissie.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +loop: loop.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +mandelbrot: mandelbrot.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +marquee: marquee.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(HACK_LIBS) + +maze: maze.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(XPM_LIBS) + +mountain: mountain.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +munch: munch.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +nose: nose.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(HACK_LIBS) + +pacman: pacman.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(HACK_LIBS) + +penrose: penrose.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +petal: petal.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +puzzle: puzzle.o $(XLOCK_OBJS) $(IOSTUFF) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(IOSTUFF) $(XPM_LIBS) + +pyro: pyro.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +qix: qix.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +random: random.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +roll: roll.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +rotor: rotor.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +shape: shape.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_OBJS_1) $(HACK_LIBS) $(GRAB_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) + +spline: spline.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +star: star.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +strange: strange.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +swarm: swarm.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +swirl: swirl.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +thornbird: thornbird.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +triangle: triangle.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +tube: tube.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +turtle: turtle.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +vines: vines.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +voters: voters.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +wator: wator.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +wire: wire.o $(XLOCK_OBJS) $(AUTOMATA) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(AUTOMATA) $(HACK_LIBS) + +world: world.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +worm: worm.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +ant.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +ant.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +ant.o: $(HACK_SRC)/../config.h +ant.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +ant.o: $(HACK_SRC)/../hacks/screenhack.h +ant.o: $(UTILS_SRC)/yarandom.h +ant.o: $(UTILS_SRC)/usleep.h +ant.o: $(UTILS_SRC)/resources.h +ant.o: $(UTILS_SRC)/hsv.h +ant.o: $(UTILS_SRC)/colors.h +ant.o: $(UTILS_SRC)/grabscreen.h +ant.o: $(UTILS_SRC)/visual.h +ant.o: $(UTILS_SRC)/erase.h +ant.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +ball.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +ball.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +ball.o: $(HACK_SRC)/../config.h +ball.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +ball.o: $(HACK_SRC)/../hacks/screenhack.h +ball.o: $(UTILS_SRC)/yarandom.h +ball.o: $(UTILS_SRC)/usleep.h +ball.o: $(UTILS_SRC)/resources.h +ball.o: $(UTILS_SRC)/hsv.h +ball.o: $(UTILS_SRC)/colors.h +ball.o: $(UTILS_SRC)/grabscreen.h +ball.o: $(UTILS_SRC)/visual.h +bat.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +bat.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +bat.o: $(HACK_SRC)/../config.h +bat.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +bat.o: $(HACK_SRC)/../hacks/screenhack.h +bat.o: $(UTILS_SRC)/yarandom.h +bat.o: $(UTILS_SRC)/usleep.h +bat.o: $(UTILS_SRC)/resources.h +bat.o: $(UTILS_SRC)/hsv.h +bat.o: $(UTILS_SRC)/colors.h +bat.o: $(UTILS_SRC)/grabscreen.h +bat.o: $(UTILS_SRC)/visual.h +bat.o: $(HACK_SRC)/../xlockmore/bitmaps/bat-0.xbm +bat.o: $(HACK_SRC)/../xlockmore/bitmaps/bat-1.xbm +bat.o: $(HACK_SRC)/../xlockmore/bitmaps/bat-2.xbm +bat.o: $(HACK_SRC)/../xlockmore/bitmaps/bat-3.xbm +bat.o: $(HACK_SRC)/../xlockmore/bitmaps/bat-4.xbm +blot.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +blot.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +blot.o: $(HACK_SRC)/../config.h +blot.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +blot.o: $(HACK_SRC)/../hacks/screenhack.h +blot.o: $(UTILS_SRC)/yarandom.h +blot.o: $(UTILS_SRC)/usleep.h +blot.o: $(UTILS_SRC)/resources.h +blot.o: $(UTILS_SRC)/hsv.h +blot.o: $(UTILS_SRC)/colors.h +blot.o: $(UTILS_SRC)/grabscreen.h +blot.o: $(UTILS_SRC)/visual.h +bouboule.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +bouboule.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +bouboule.o: $(HACK_SRC)/../config.h +bouboule.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +bouboule.o: $(HACK_SRC)/../hacks/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 +bounce.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +bounce.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +bounce.o: $(HACK_SRC)/../config.h +bounce.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +bounce.o: $(HACK_SRC)/../hacks/screenhack.h +bounce.o: $(UTILS_SRC)/yarandom.h +bounce.o: $(UTILS_SRC)/usleep.h +bounce.o: $(UTILS_SRC)/resources.h +bounce.o: $(UTILS_SRC)/hsv.h +bounce.o: $(UTILS_SRC)/colors.h +bounce.o: $(UTILS_SRC)/grabscreen.h +bounce.o: $(UTILS_SRC)/visual.h +bounce.o: $(HACK_SRC)/../xlockmore/bitmaps/bounce-0.xbm +bounce.o: $(HACK_SRC)/../xlockmore/bitmaps/bounce-1.xbm +bounce.o: $(HACK_SRC)/../xlockmore/bitmaps/bounce-2.xbm +bounce.o: $(HACK_SRC)/../xlockmore/bitmaps/bounce-3.xbm +bounce.o: $(HACK_SRC)/../xlockmore/bitmaps/bounce-mask.xbm +braid.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +braid.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +braid.o: $(HACK_SRC)/../config.h +braid.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +braid.o: $(HACK_SRC)/../hacks/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 +braid.o: $(UTILS_SRC)/erase.h +bubble.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +bubble.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +bubble.o: $(HACK_SRC)/../config.h +bubble.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +bubble.o: $(HACK_SRC)/../hacks/screenhack.h +bubble.o: $(UTILS_SRC)/yarandom.h +bubble.o: $(UTILS_SRC)/usleep.h +bubble.o: $(UTILS_SRC)/resources.h +bubble.o: $(UTILS_SRC)/hsv.h +bubble.o: $(UTILS_SRC)/colors.h +bubble.o: $(UTILS_SRC)/grabscreen.h +bubble.o: $(UTILS_SRC)/visual.h +bug.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +bug.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +bug.o: $(HACK_SRC)/../config.h +bug.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +bug.o: $(HACK_SRC)/../hacks/screenhack.h +bug.o: $(UTILS_SRC)/yarandom.h +bug.o: $(UTILS_SRC)/usleep.h +bug.o: $(UTILS_SRC)/resources.h +bug.o: $(UTILS_SRC)/hsv.h +bug.o: $(UTILS_SRC)/colors.h +bug.o: $(UTILS_SRC)/grabscreen.h +bug.o: $(UTILS_SRC)/visual.h +bug.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +clock.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +clock.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +clock.o: $(HACK_SRC)/../config.h +clock.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +clock.o: $(HACK_SRC)/../hacks/screenhack.h +clock.o: $(UTILS_SRC)/yarandom.h +clock.o: $(UTILS_SRC)/usleep.h +clock.o: $(UTILS_SRC)/resources.h +clock.o: $(UTILS_SRC)/hsv.h +clock.o: $(UTILS_SRC)/colors.h +clock.o: $(UTILS_SRC)/grabscreen.h +clock.o: $(UTILS_SRC)/visual.h +coral.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +coral.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +coral.o: $(HACK_SRC)/../config.h +coral.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +coral.o: $(HACK_SRC)/../hacks/screenhack.h +coral.o: $(UTILS_SRC)/yarandom.h +coral.o: $(UTILS_SRC)/usleep.h +coral.o: $(UTILS_SRC)/resources.h +coral.o: $(UTILS_SRC)/hsv.h +coral.o: $(UTILS_SRC)/colors.h +coral.o: $(UTILS_SRC)/grabscreen.h +coral.o: $(UTILS_SRC)/visual.h +crystal.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +crystal.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +crystal.o: $(HACK_SRC)/../config.h +crystal.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +crystal.o: $(HACK_SRC)/../hacks/screenhack.h +crystal.o: $(UTILS_SRC)/yarandom.h +crystal.o: $(UTILS_SRC)/usleep.h +crystal.o: $(UTILS_SRC)/resources.h +crystal.o: $(UTILS_SRC)/hsv.h +crystal.o: $(UTILS_SRC)/colors.h +crystal.o: $(UTILS_SRC)/grabscreen.h +crystal.o: $(UTILS_SRC)/visual.h +daisy.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +daisy.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +daisy.o: $(HACK_SRC)/../config.h +daisy.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +daisy.o: $(HACK_SRC)/../hacks/screenhack.h +daisy.o: $(UTILS_SRC)/yarandom.h +daisy.o: $(UTILS_SRC)/usleep.h +daisy.o: $(UTILS_SRC)/resources.h +daisy.o: $(UTILS_SRC)/hsv.h +daisy.o: $(UTILS_SRC)/colors.h +daisy.o: $(UTILS_SRC)/grabscreen.h +daisy.o: $(UTILS_SRC)/visual.h +dclock.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +dclock.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +dclock.o: $(HACK_SRC)/../config.h +dclock.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +dclock.o: $(HACK_SRC)/../hacks/screenhack.h +dclock.o: $(UTILS_SRC)/yarandom.h +dclock.o: $(UTILS_SRC)/usleep.h +dclock.o: $(UTILS_SRC)/resources.h +dclock.o: $(UTILS_SRC)/hsv.h +dclock.o: $(UTILS_SRC)/colors.h +dclock.o: $(UTILS_SRC)/grabscreen.h +dclock.o: $(UTILS_SRC)/visual.h +dclock.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +deco.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +deco.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +deco.o: $(HACK_SRC)/../config.h +deco.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +deco.o: $(HACK_SRC)/../hacks/screenhack.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 +demon.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +demon.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +demon.o: $(HACK_SRC)/../config.h +demon.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +demon.o: $(HACK_SRC)/../hacks/screenhack.h +demon.o: $(UTILS_SRC)/yarandom.h +demon.o: $(UTILS_SRC)/usleep.h +demon.o: $(UTILS_SRC)/resources.h +demon.o: $(UTILS_SRC)/hsv.h +demon.o: $(UTILS_SRC)/colors.h +demon.o: $(UTILS_SRC)/grabscreen.h +demon.o: $(UTILS_SRC)/visual.h +demon.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +dilemma.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +dilemma.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +dilemma.o: $(HACK_SRC)/../config.h +dilemma.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +dilemma.o: $(HACK_SRC)/../hacks/screenhack.h +dilemma.o: $(UTILS_SRC)/yarandom.h +dilemma.o: $(UTILS_SRC)/usleep.h +dilemma.o: $(UTILS_SRC)/resources.h +dilemma.o: $(UTILS_SRC)/hsv.h +dilemma.o: $(UTILS_SRC)/colors.h +dilemma.o: $(UTILS_SRC)/grabscreen.h +dilemma.o: $(UTILS_SRC)/visual.h +dilemma.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +dilemma.o: $(HACK_SRC)/../xlockmore/bitmaps/cooperat.xbm +dilemma.o: $(HACK_SRC)/../xlockmore/bitmaps/defect.xbm +discrete.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +discrete.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +discrete.o: $(HACK_SRC)/../config.h +discrete.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +discrete.o: $(HACK_SRC)/../hacks/screenhack.h +discrete.o: $(UTILS_SRC)/yarandom.h +discrete.o: $(UTILS_SRC)/usleep.h +discrete.o: $(UTILS_SRC)/resources.h +discrete.o: $(UTILS_SRC)/hsv.h +discrete.o: $(UTILS_SRC)/colors.h +discrete.o: $(UTILS_SRC)/grabscreen.h +discrete.o: $(UTILS_SRC)/visual.h +discrete.o: $(UTILS_SRC)/erase.h +drift.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +drift.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +drift.o: $(HACK_SRC)/../config.h +drift.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +drift.o: $(HACK_SRC)/../hacks/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 +drift.o: $(UTILS_SRC)/erase.h +eyes.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +eyes.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +eyes.o: $(HACK_SRC)/../config.h +eyes.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +eyes.o: $(HACK_SRC)/../hacks/screenhack.h +eyes.o: $(UTILS_SRC)/yarandom.h +eyes.o: $(UTILS_SRC)/usleep.h +eyes.o: $(UTILS_SRC)/resources.h +eyes.o: $(UTILS_SRC)/hsv.h +eyes.o: $(UTILS_SRC)/colors.h +eyes.o: $(UTILS_SRC)/grabscreen.h +eyes.o: $(UTILS_SRC)/visual.h +eyes.o: $(srcdir)/eyes.xbm +fadeplot.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +fadeplot.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +fadeplot.o: $(HACK_SRC)/../config.h +fadeplot.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +fadeplot.o: $(HACK_SRC)/../hacks/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 +flag.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +flag.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +flag.o: $(HACK_SRC)/../config.h +flag.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +flag.o: $(HACK_SRC)/../hacks/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: $(HACK_SRC)/../hacks/images/bob.xbm +flame.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +flame.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +flame.o: $(HACK_SRC)/../config.h +flame.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +flame.o: $(HACK_SRC)/../hacks/screenhack.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 +flow.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +flow.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +flow.o: $(HACK_SRC)/../config.h +flow.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +flow.o: $(HACK_SRC)/../hacks/screenhack.h +flow.o: $(UTILS_SRC)/yarandom.h +flow.o: $(UTILS_SRC)/usleep.h +flow.o: $(UTILS_SRC)/resources.h +flow.o: $(UTILS_SRC)/hsv.h +flow.o: $(UTILS_SRC)/colors.h +flow.o: $(UTILS_SRC)/grabscreen.h +flow.o: $(UTILS_SRC)/visual.h +flow.o: $(UTILS_SRC)/erase.h +forest.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +forest.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +forest.o: $(HACK_SRC)/../config.h +forest.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +forest.o: $(HACK_SRC)/../hacks/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 +forest.o: $(UTILS_SRC)/erase.h +galaxy.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +galaxy.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +galaxy.o: $(HACK_SRC)/../config.h +galaxy.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +galaxy.o: $(HACK_SRC)/../hacks/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 +goop.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +goop.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +goop.o: $(HACK_SRC)/../config.h +goop.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +goop.o: $(HACK_SRC)/../hacks/screenhack.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: $(HACK_SRC)/../xlockmore/xlock/spline.h +grav.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +grav.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +grav.o: $(HACK_SRC)/../config.h +grav.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +grav.o: $(HACK_SRC)/../hacks/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 +helix.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +helix.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +helix.o: $(HACK_SRC)/../config.h +helix.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +helix.o: $(HACK_SRC)/../hacks/screenhack.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 +hop.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +hop.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +hop.o: $(HACK_SRC)/../config.h +hop.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +hop.o: $(HACK_SRC)/../hacks/screenhack.h +hop.o: $(UTILS_SRC)/yarandom.h +hop.o: $(UTILS_SRC)/usleep.h +hop.o: $(UTILS_SRC)/resources.h +hop.o: $(UTILS_SRC)/hsv.h +hop.o: $(UTILS_SRC)/colors.h +hop.o: $(UTILS_SRC)/grabscreen.h +hop.o: $(UTILS_SRC)/visual.h +hop.o: $(UTILS_SRC)/erase.h +hyper.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +hyper.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +hyper.o: $(HACK_SRC)/../config.h +hyper.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +hyper.o: $(HACK_SRC)/../hacks/screenhack.h +hyper.o: $(UTILS_SRC)/yarandom.h +hyper.o: $(UTILS_SRC)/usleep.h +hyper.o: $(UTILS_SRC)/resources.h +hyper.o: $(UTILS_SRC)/hsv.h +hyper.o: $(UTILS_SRC)/colors.h +hyper.o: $(UTILS_SRC)/grabscreen.h +hyper.o: $(UTILS_SRC)/visual.h +ico.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +ico.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +ico.o: $(HACK_SRC)/../config.h +ico.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +ico.o: $(HACK_SRC)/../hacks/screenhack.h +ico.o: $(UTILS_SRC)/yarandom.h +ico.o: $(UTILS_SRC)/usleep.h +ico.o: $(UTILS_SRC)/resources.h +ico.o: $(UTILS_SRC)/hsv.h +ico.o: $(UTILS_SRC)/colors.h +ico.o: $(UTILS_SRC)/grabscreen.h +ico.o: $(UTILS_SRC)/visual.h +ifs.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +ifs.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +ifs.o: $(HACK_SRC)/../config.h +ifs.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +ifs.o: $(HACK_SRC)/../hacks/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 +image.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +image.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +image.o: $(HACK_SRC)/../config.h +image.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +image.o: $(HACK_SRC)/../hacks/screenhack.h +image.o: $(UTILS_SRC)/yarandom.h +image.o: $(UTILS_SRC)/usleep.h +image.o: $(UTILS_SRC)/resources.h +image.o: $(UTILS_SRC)/hsv.h +image.o: $(UTILS_SRC)/colors.h +image.o: $(UTILS_SRC)/grabscreen.h +image.o: $(UTILS_SRC)/visual.h +image.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +image.o: $(srcdir)/image.xbm +julia.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +julia.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +julia.o: $(HACK_SRC)/../config.h +julia.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +julia.o: $(HACK_SRC)/../hacks/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 +kaleid.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +kaleid.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +kaleid.o: $(HACK_SRC)/../config.h +kaleid.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +kaleid.o: $(HACK_SRC)/../hacks/screenhack.h +kaleid.o: $(UTILS_SRC)/yarandom.h +kaleid.o: $(UTILS_SRC)/usleep.h +kaleid.o: $(UTILS_SRC)/resources.h +kaleid.o: $(UTILS_SRC)/hsv.h +kaleid.o: $(UTILS_SRC)/colors.h +kaleid.o: $(UTILS_SRC)/grabscreen.h +kaleid.o: $(UTILS_SRC)/visual.h +laser.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +laser.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +laser.o: $(HACK_SRC)/../config.h +laser.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +laser.o: $(HACK_SRC)/../hacks/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 +life.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +life.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +life.o: $(HACK_SRC)/../config.h +life.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +life.o: $(HACK_SRC)/../hacks/screenhack.h +life.o: $(UTILS_SRC)/yarandom.h +life.o: $(UTILS_SRC)/usleep.h +life.o: $(UTILS_SRC)/resources.h +life.o: $(UTILS_SRC)/hsv.h +life.o: $(UTILS_SRC)/colors.h +life.o: $(UTILS_SRC)/grabscreen.h +life.o: $(UTILS_SRC)/visual.h +life.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +life.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +life.o: $(srcdir)/life.xbm +life1d.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +life1d.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +life1d.o: $(HACK_SRC)/../config.h +life1d.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +life1d.o: $(HACK_SRC)/../hacks/screenhack.h +life1d.o: $(UTILS_SRC)/yarandom.h +life1d.o: $(UTILS_SRC)/usleep.h +life1d.o: $(UTILS_SRC)/resources.h +life1d.o: $(UTILS_SRC)/hsv.h +life1d.o: $(UTILS_SRC)/colors.h +life1d.o: $(UTILS_SRC)/grabscreen.h +life1d.o: $(UTILS_SRC)/visual.h +life1d.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +life1d.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +life1d.o: $(srcdir)/life1d.xbm +life3d.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +life3d.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +life3d.o: $(HACK_SRC)/../config.h +life3d.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +life3d.o: $(HACK_SRC)/../hacks/screenhack.h +life3d.o: $(UTILS_SRC)/yarandom.h +life3d.o: $(UTILS_SRC)/usleep.h +life3d.o: $(UTILS_SRC)/resources.h +life3d.o: $(UTILS_SRC)/hsv.h +life3d.o: $(UTILS_SRC)/colors.h +life3d.o: $(UTILS_SRC)/grabscreen.h +life3d.o: $(UTILS_SRC)/visual.h +life3d.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +lightning.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +lightning.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +lightning.o: $(HACK_SRC)/../config.h +lightning.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +lightning.o: $(HACK_SRC)/../hacks/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: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +lisa.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +lisa.o: $(HACK_SRC)/../config.h +lisa.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +lisa.o: $(HACK_SRC)/../hacks/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 +lissie.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +lissie.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +lissie.o: $(HACK_SRC)/../config.h +lissie.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +lissie.o: $(HACK_SRC)/../hacks/screenhack.h +lissie.o: $(UTILS_SRC)/yarandom.h +lissie.o: $(UTILS_SRC)/usleep.h +lissie.o: $(UTILS_SRC)/resources.h +lissie.o: $(UTILS_SRC)/hsv.h +lissie.o: $(UTILS_SRC)/colors.h +lissie.o: $(UTILS_SRC)/grabscreen.h +lissie.o: $(UTILS_SRC)/visual.h +loop.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +loop.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +loop.o: $(HACK_SRC)/../config.h +loop.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +loop.o: $(HACK_SRC)/../hacks/screenhack.h +loop.o: $(UTILS_SRC)/yarandom.h +loop.o: $(UTILS_SRC)/usleep.h +loop.o: $(UTILS_SRC)/resources.h +loop.o: $(UTILS_SRC)/hsv.h +loop.o: $(UTILS_SRC)/colors.h +loop.o: $(UTILS_SRC)/grabscreen.h +loop.o: $(UTILS_SRC)/visual.h +loop.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +mandelbrot.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +mandelbrot.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +mandelbrot.o: $(HACK_SRC)/../config.h +mandelbrot.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +mandelbrot.o: $(HACK_SRC)/../hacks/screenhack.h +mandelbrot.o: $(UTILS_SRC)/yarandom.h +mandelbrot.o: $(UTILS_SRC)/usleep.h +mandelbrot.o: $(UTILS_SRC)/resources.h +mandelbrot.o: $(UTILS_SRC)/hsv.h +mandelbrot.o: $(UTILS_SRC)/colors.h +mandelbrot.o: $(UTILS_SRC)/grabscreen.h +mandelbrot.o: $(UTILS_SRC)/visual.h +marquee.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +marquee.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +marquee.o: $(HACK_SRC)/../config.h +marquee.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +marquee.o: $(HACK_SRC)/../hacks/screenhack.h +marquee.o: $(UTILS_SRC)/yarandom.h +marquee.o: $(UTILS_SRC)/usleep.h +marquee.o: $(UTILS_SRC)/resources.h +marquee.o: $(UTILS_SRC)/hsv.h +marquee.o: $(UTILS_SRC)/colors.h +marquee.o: $(UTILS_SRC)/grabscreen.h +marquee.o: $(UTILS_SRC)/visual.h +marquee.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +maze.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +maze.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +maze.o: $(HACK_SRC)/../config.h +maze.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +maze.o: $(HACK_SRC)/../hacks/screenhack.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 +maze.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +maze.o: $(HACK_SRC)/../xlockmore/bitmaps/gray1.xbm +maze.o: $(srcdir)/maze.xbm +mountain.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +mountain.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +mountain.o: $(HACK_SRC)/../config.h +mountain.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +mountain.o: $(HACK_SRC)/../hacks/screenhack.h +mountain.o: $(UTILS_SRC)/yarandom.h +mountain.o: $(UTILS_SRC)/usleep.h +mountain.o: $(UTILS_SRC)/resources.h +mountain.o: $(UTILS_SRC)/hsv.h +mountain.o: $(UTILS_SRC)/colors.h +mountain.o: $(UTILS_SRC)/grabscreen.h +mountain.o: $(UTILS_SRC)/visual.h +munch.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +munch.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +munch.o: $(HACK_SRC)/../config.h +munch.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +munch.o: $(HACK_SRC)/../hacks/screenhack.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 +nose.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +nose.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +nose.o: $(HACK_SRC)/../config.h +nose.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +nose.o: $(HACK_SRC)/../hacks/screenhack.h +nose.o: $(UTILS_SRC)/yarandom.h +nose.o: $(UTILS_SRC)/usleep.h +nose.o: $(UTILS_SRC)/resources.h +nose.o: $(UTILS_SRC)/hsv.h +nose.o: $(UTILS_SRC)/colors.h +nose.o: $(UTILS_SRC)/grabscreen.h +nose.o: $(UTILS_SRC)/visual.h +nose.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-hat.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-hatd.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-facef.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-faced.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-facel.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-facer.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-shoef.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-shoel.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-shoer.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-stepl.xbm +nose.o: $(HACK_SRC)/../xlockmore/bitmaps/nose-stepr.xbm +pacman.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +pacman.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +pacman.o: $(HACK_SRC)/../config.h +pacman.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +pacman.o: $(HACK_SRC)/../hacks/screenhack.h +pacman.o: $(UTILS_SRC)/yarandom.h +pacman.o: $(UTILS_SRC)/usleep.h +pacman.o: $(UTILS_SRC)/resources.h +pacman.o: $(UTILS_SRC)/hsv.h +pacman.o: $(UTILS_SRC)/colors.h +pacman.o: $(UTILS_SRC)/grabscreen.h +pacman.o: $(UTILS_SRC)/visual.h +pacman.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +pacman.o: $(srcdir)/ghost.xbm +penrose.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +penrose.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +penrose.o: $(HACK_SRC)/../config.h +penrose.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +penrose.o: $(HACK_SRC)/../hacks/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 +petal.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +petal.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +petal.o: $(HACK_SRC)/../config.h +petal.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +petal.o: $(HACK_SRC)/../hacks/screenhack.h +petal.o: $(UTILS_SRC)/yarandom.h +petal.o: $(UTILS_SRC)/usleep.h +petal.o: $(UTILS_SRC)/resources.h +petal.o: $(UTILS_SRC)/hsv.h +petal.o: $(UTILS_SRC)/colors.h +petal.o: $(UTILS_SRC)/grabscreen.h +petal.o: $(UTILS_SRC)/visual.h +puzzle.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +puzzle.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +puzzle.o: $(HACK_SRC)/../config.h +puzzle.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +puzzle.o: $(HACK_SRC)/../hacks/screenhack.h +puzzle.o: $(UTILS_SRC)/yarandom.h +puzzle.o: $(UTILS_SRC)/usleep.h +puzzle.o: $(UTILS_SRC)/resources.h +puzzle.o: $(UTILS_SRC)/hsv.h +puzzle.o: $(UTILS_SRC)/colors.h +puzzle.o: $(UTILS_SRC)/grabscreen.h +puzzle.o: $(UTILS_SRC)/visual.h +puzzle.o: $(HACK_SRC)/../xlockmore/xlock/iostuff.h +puzzle.o: $(srcdir)/puzzle.xbm +pyro.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +pyro.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +pyro.o: $(HACK_SRC)/../config.h +pyro.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +pyro.o: $(HACK_SRC)/../hacks/screenhack.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: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +qix.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +qix.o: $(HACK_SRC)/../config.h +qix.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +qix.o: $(HACK_SRC)/../hacks/screenhack.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 +roll.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +roll.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +roll.o: $(HACK_SRC)/../config.h +roll.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +roll.o: $(HACK_SRC)/../hacks/screenhack.h +roll.o: $(UTILS_SRC)/yarandom.h +roll.o: $(UTILS_SRC)/usleep.h +roll.o: $(UTILS_SRC)/resources.h +roll.o: $(UTILS_SRC)/hsv.h +roll.o: $(UTILS_SRC)/colors.h +roll.o: $(UTILS_SRC)/grabscreen.h +roll.o: $(UTILS_SRC)/visual.h +rotor.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +rotor.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +rotor.o: $(HACK_SRC)/../config.h +rotor.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +rotor.o: $(HACK_SRC)/../hacks/screenhack.h +rotor.o: $(UTILS_SRC)/yarandom.h +rotor.o: $(UTILS_SRC)/usleep.h +rotor.o: $(UTILS_SRC)/resources.h +rotor.o: $(UTILS_SRC)/hsv.h +rotor.o: $(UTILS_SRC)/colors.h +rotor.o: $(UTILS_SRC)/grabscreen.h +rotor.o: $(UTILS_SRC)/visual.h +shape.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +shape.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +shape.o: $(HACK_SRC)/../config.h +shape.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +shape.o: $(HACK_SRC)/../hacks/screenhack.h +shape.o: $(UTILS_SRC)/yarandom.h +shape.o: $(UTILS_SRC)/usleep.h +shape.o: $(UTILS_SRC)/resources.h +shape.o: $(UTILS_SRC)/hsv.h +shape.o: $(UTILS_SRC)/colors.h +shape.o: $(UTILS_SRC)/grabscreen.h +shape.o: $(UTILS_SRC)/visual.h +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/gray1.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/gray3.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/stipple.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/cross_weave.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/dimple1.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/dimple3.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/flipped_gray.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/hlines2.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/light_gray.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/root_weave.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/vlines2.xbm +shape.o: $(HACK_SRC)/../xlockmore/bitmaps/vlines3.xbm +sierpinski.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +sierpinski.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +sierpinski.o: $(HACK_SRC)/../config.h +sierpinski.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +sierpinski.o: $(HACK_SRC)/../hacks/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 +slip.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +slip.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +slip.o: $(HACK_SRC)/../config.h +slip.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +slip.o: $(HACK_SRC)/../hacks/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: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +sphere.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +sphere.o: $(HACK_SRC)/../config.h +sphere.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +sphere.o: $(HACK_SRC)/../hacks/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: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +spiral.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +spiral.o: $(HACK_SRC)/../config.h +spiral.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +spiral.o: $(HACK_SRC)/../hacks/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 +spline.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +spline.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +spline.o: $(HACK_SRC)/../config.h +spline.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +spline.o: $(HACK_SRC)/../hacks/screenhack.h +spline.o: $(UTILS_SRC)/yarandom.h +spline.o: $(UTILS_SRC)/usleep.h +spline.o: $(UTILS_SRC)/resources.h +spline.o: $(UTILS_SRC)/hsv.h +spline.o: $(UTILS_SRC)/colors.h +spline.o: $(UTILS_SRC)/grabscreen.h +spline.o: $(UTILS_SRC)/visual.h +star.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +star.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +star.o: $(HACK_SRC)/../config.h +star.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +star.o: $(HACK_SRC)/../hacks/screenhack.h +star.o: $(UTILS_SRC)/yarandom.h +star.o: $(UTILS_SRC)/usleep.h +star.o: $(UTILS_SRC)/resources.h +star.o: $(UTILS_SRC)/hsv.h +star.o: $(UTILS_SRC)/colors.h +star.o: $(UTILS_SRC)/grabscreen.h +star.o: $(UTILS_SRC)/visual.h +star.o: $(HACK_SRC)/../xlockmore/bitmaps/trek-0.xbm +star.o: $(HACK_SRC)/../xlockmore/bitmaps/trek-1.xbm +strange.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +strange.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +strange.o: $(HACK_SRC)/../config.h +strange.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +strange.o: $(HACK_SRC)/../hacks/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 +swarm.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +swarm.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +swarm.o: $(HACK_SRC)/../config.h +swarm.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +swarm.o: $(HACK_SRC)/../hacks/screenhack.h +swarm.o: $(UTILS_SRC)/yarandom.h +swarm.o: $(UTILS_SRC)/usleep.h +swarm.o: $(UTILS_SRC)/resources.h +swarm.o: $(UTILS_SRC)/hsv.h +swarm.o: $(UTILS_SRC)/colors.h +swarm.o: $(UTILS_SRC)/grabscreen.h +swarm.o: $(UTILS_SRC)/visual.h +swirl.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +swirl.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +swirl.o: $(HACK_SRC)/../config.h +swirl.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +swirl.o: $(HACK_SRC)/../hacks/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 +thornbird.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +thornbird.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +thornbird.o: $(HACK_SRC)/../config.h +thornbird.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +thornbird.o: $(HACK_SRC)/../hacks/screenhack.h +thornbird.o: $(UTILS_SRC)/yarandom.h +thornbird.o: $(UTILS_SRC)/usleep.h +thornbird.o: $(UTILS_SRC)/resources.h +thornbird.o: $(UTILS_SRC)/hsv.h +thornbird.o: $(UTILS_SRC)/colors.h +thornbird.o: $(UTILS_SRC)/grabscreen.h +thornbird.o: $(UTILS_SRC)/visual.h +triangle.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +triangle.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +triangle.o: $(HACK_SRC)/../config.h +triangle.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +triangle.o: $(HACK_SRC)/../hacks/screenhack.h +triangle.o: $(UTILS_SRC)/yarandom.h +triangle.o: $(UTILS_SRC)/usleep.h +triangle.o: $(UTILS_SRC)/resources.h +triangle.o: $(UTILS_SRC)/hsv.h +triangle.o: $(UTILS_SRC)/colors.h +triangle.o: $(UTILS_SRC)/grabscreen.h +triangle.o: $(UTILS_SRC)/visual.h +tube.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +tube.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +tube.o: $(HACK_SRC)/../config.h +tube.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +tube.o: $(HACK_SRC)/../hacks/screenhack.h +tube.o: $(UTILS_SRC)/yarandom.h +tube.o: $(UTILS_SRC)/usleep.h +tube.o: $(UTILS_SRC)/resources.h +tube.o: $(UTILS_SRC)/hsv.h +tube.o: $(UTILS_SRC)/colors.h +tube.o: $(UTILS_SRC)/grabscreen.h +tube.o: $(UTILS_SRC)/visual.h +turtle.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +turtle.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +turtle.o: $(HACK_SRC)/../config.h +turtle.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +turtle.o: $(HACK_SRC)/../hacks/screenhack.h +turtle.o: $(UTILS_SRC)/yarandom.h +turtle.o: $(UTILS_SRC)/usleep.h +turtle.o: $(UTILS_SRC)/resources.h +turtle.o: $(UTILS_SRC)/hsv.h +turtle.o: $(UTILS_SRC)/colors.h +turtle.o: $(UTILS_SRC)/grabscreen.h +turtle.o: $(UTILS_SRC)/visual.h +vines.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +vines.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +vines.o: $(HACK_SRC)/../config.h +vines.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +vines.o: $(HACK_SRC)/../hacks/screenhack.h +vines.o: $(UTILS_SRC)/yarandom.h +vines.o: $(UTILS_SRC)/usleep.h +vines.o: $(UTILS_SRC)/resources.h +vines.o: $(UTILS_SRC)/hsv.h +vines.o: $(UTILS_SRC)/colors.h +vines.o: $(UTILS_SRC)/grabscreen.h +vines.o: $(UTILS_SRC)/visual.h +vines.o: $(UTILS_SRC)/erase.h +voters.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +voters.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +voters.o: $(HACK_SRC)/../config.h +voters.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +voters.o: $(HACK_SRC)/../hacks/screenhack.h +voters.o: $(UTILS_SRC)/yarandom.h +voters.o: $(UTILS_SRC)/usleep.h +voters.o: $(UTILS_SRC)/resources.h +voters.o: $(UTILS_SRC)/hsv.h +voters.o: $(UTILS_SRC)/colors.h +voters.o: $(UTILS_SRC)/grabscreen.h +voters.o: $(UTILS_SRC)/visual.h +voters.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +voters.o: $(HACK_SRC)/../xlockmore/bitmaps/sickle.xbm +voters.o: $(HACK_SRC)/../xlockmore/bitmaps/donkey.xbm +voters.o: $(HACK_SRC)/../xlockmore/bitmaps/elephant.xbm +wator.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +wator.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +wator.o: $(HACK_SRC)/../config.h +wator.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +wator.o: $(HACK_SRC)/../hacks/screenhack.h +wator.o: $(UTILS_SRC)/yarandom.h +wator.o: $(UTILS_SRC)/usleep.h +wator.o: $(UTILS_SRC)/resources.h +wator.o: $(UTILS_SRC)/hsv.h +wator.o: $(UTILS_SRC)/colors.h +wator.o: $(UTILS_SRC)/grabscreen.h +wator.o: $(UTILS_SRC)/visual.h +wator.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-0.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-1.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-2.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-3.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-4.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-5.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-6.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/fish-7.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-0.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-1.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-2.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-3.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-4.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-5.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-6.xbm +wator.o: $(HACK_SRC)/../xlockmore/bitmaps/shark-7.xbm +wire.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +wire.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +wire.o: $(HACK_SRC)/../config.h +wire.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +wire.o: $(HACK_SRC)/../hacks/screenhack.h +wire.o: $(UTILS_SRC)/yarandom.h +wire.o: $(UTILS_SRC)/usleep.h +wire.o: $(UTILS_SRC)/resources.h +wire.o: $(UTILS_SRC)/hsv.h +wire.o: $(UTILS_SRC)/colors.h +wire.o: $(UTILS_SRC)/grabscreen.h +wire.o: $(UTILS_SRC)/visual.h +wire.o: $(HACK_SRC)/../xlockmore/xlock/automata.h +world.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +world.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +world.o: $(HACK_SRC)/../config.h +world.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +world.o: $(HACK_SRC)/../hacks/screenhack.h +world.o: $(UTILS_SRC)/yarandom.h +world.o: $(UTILS_SRC)/usleep.h +world.o: $(UTILS_SRC)/resources.h +world.o: $(UTILS_SRC)/hsv.h +world.o: $(UTILS_SRC)/colors.h +world.o: $(UTILS_SRC)/grabscreen.h +world.o: $(UTILS_SRC)/visual.h +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-00.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-01.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-02.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-03.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-04.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-05.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-06.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-07.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-08.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-09.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-10.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-11.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-12.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-13.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-14.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-15.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-16.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-17.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-18.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-19.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-20.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-21.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-22.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-23.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-24.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-25.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-26.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-27.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-28.xbm +world.o: $(HACK_SRC)/../xlockmore/bitmaps/terra-29.xbm +worm.o: $(HACK_SRC)/../xlockmore/xlock/xlockmore.h +worm.o: $(HACK_SRC)/../xlockmore/xlock/xlock.h +worm.o: $(HACK_SRC)/../config.h +worm.o: $(HACK_SRC)/../xlockmore/xlock/mode.h +worm.o: $(HACK_SRC)/../hacks/screenhack.h +worm.o: $(UTILS_SRC)/yarandom.h +worm.o: $(UTILS_SRC)/usleep.h +worm.o: $(UTILS_SRC)/resources.h +worm.o: $(UTILS_SRC)/hsv.h +worm.o: $(UTILS_SRC)/colors.h +worm.o: $(UTILS_SRC)/grabscreen.h +worm.o: $(UTILS_SRC)/visual.h + diff --git a/modes/ant.c b/modes/ant.c new file mode 100644 index 00000000..4c5018e6 --- /dev/null +++ b/modes/ant.c @@ -0,0 +1,1157 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/*- + * ant --- Chris Langton's generalized turing machine ants (also known + * as Greg Turk's turmites) whose tape is the screen + */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)ant.c 4.11 98/06/18 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 16-Apr-97: -neighbors 3 and 8 added + * 01-Jan-97: Updated ant.c to handle more kinds of ants. Thanks to + * J Austin David . Check it out in + * java at http://havoc.gtf.gatech.edu/austin He thought up the + * new Ladder ant. + * 04-Apr-96: -neighbors 6 runtime-time option added for hexagonal ants + * (bees), coded from an idea of Jim Propp's in Science News, + * Oct 28, 1995 VOL. 148 page 287 + * 20-Sep-95: Memory leak in ant fixed. Now random colors. + * 05-Sep-95: Coded from A.K. Dewdney's "Computer Recreations", Scientific + * American Magazine" Sep 1989 pp 180-183, Mar 1990 p 121 + * Also used Ian Stewart's Mathematical Recreations, Scientific + * American Jul 1994 pp 104-107 + * also used demon.c and life.c as a guide. + */ + +/*- + Species Grid Number of Neigbors + ------- ---- ------------------ + Ants Square 4 (or 8) + Bees Hexagon 6 + Bees Triangle 3 (or 9, 12) + + Neighbors 6 and neighbors 3 produce the same Turk ants. +*/ + +#ifdef STANDALONE +#define PROGCLASS "Ant" +#define HACK_INIT init_ant +#define HACK_DRAW draw_ant +#define ant_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*count: -3 \n" \ + "*cycles: 40000 \n" \ + "*size: -12 \n" \ + "*ncolors: 64 \n" \ + "*neighbors: 0 \n" \ + "*sharpturn: False \n" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_ant + +/*- + * neighbors of 0 randomizes it between 3, 4 and 6. + * 8, 9 12 are available also but not recommended. + */ +extern int neighbors; + +#define DEF_TRUCHET "False" +#define DEF_SHARPTURN "False" + +static Bool truchet; +static Bool sharpturn; + +static XrmOptionDescRec opts[] = +{ + {"-truchet", ".ant.truchet", XrmoptionNoArg, (caddr_t) "on"}, + {"+truchet", ".ant.truchet", XrmoptionNoArg, (caddr_t) "off"}, + {"-sharpturn", ".ant.sharpturn", XrmoptionNoArg, (caddr_t) "on"}, + {"+sharpturn", ".ant.sharpturn", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & truchet, "truchet", "Truchet", DEF_TRUCHET, t_Bool}, + {(caddr_t *) & sharpturn, "sharpturn", "SharpTurn", DEF_SHARPTURN, t_Bool} +}; +static OptionStruct desc[] = +{ +#if 0 + {"-neighbors num", "squares 4 or 8, hexagons 6, triangles 3, 9 or 12"}, +#endif + {"-/+truchet", "turn on/off Truchet lines"}, + {"-/+sharpturn", "turn on/off sharp turns (6 or 12 neighbors only)"} +}; + +ModeSpecOpt ant_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct ant_description = +{"ant", "init_ant", "draw_ant", "release_ant", + "refresh_ant", "init_ant", NULL, &ant_opts, + 1000, -3, 40000, -12, 64, 1.0, "", + "Shows Langton's and Turk's generalized ants", 0, NULL}; + +#endif + +#define ANTBITS(n,w,h)\ + ap->pixmaps[ap->init_bits++]=\ + XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1) + +/* If you change the table you may have to change the following 2 constants */ +#define STATES 2 +#define MINANTS 1 +#define REDRAWSTEP 2000 /* How much tape to draw per cycle */ +#define MINGRIDSIZE 24 +#define MINSIZE 1 +#define MINRANDOMSIZE 5 +#define ANGLES 360 + +typedef struct { + unsigned char color; + short direction; + unsigned char next; +} statestruct; + +typedef struct { + int col, row; + short direction; + unsigned char state; +} antstruct; + +typedef struct { + Bool painted; + int neighbors; + int generation; + int xs, ys; + int xb, yb; + int nrows, ncols; + int width, height; + unsigned char ncolors, nstates; + int n; + int redrawing, redrawpos; + int truchet; /* Only for Turk modes */ + int sharpturn; /* Only for even neighbors > 4 (i.e. 6 and 12) */ + statestruct machine[NUMSTIPPLES * STATES]; + unsigned char *tape; + unsigned char *truchet_state; + antstruct *ants; + int init_bits; + unsigned char colors[NUMSTIPPLES - 1]; + GC stippledGC; + Pixmap pixmaps[NUMSTIPPLES - 1]; + union { + XPoint hexagon[7]; /* Need more than 6 for truchet */ + XPoint triangle[2][4]; /* Need more than 3 for truchet */ + } shape; +} antfarmstruct; + +static char plots[] = +{3, +#if 1 /* Without this... this mode is misnamed... */ + 4, +#endif + 6}; /* Neighborhoods, 8 just makes a mess */ + +#define NEIGHBORKINDS (long) (sizeof plots / sizeof *plots) + +/* Relative ant moves */ +#define FS 0 /* Step */ +#define TRS 1 /* Turn right, then step */ +#define THRS 2 /* Turn hard right, then step */ +#define TBS 3 /* Turn back, then step */ +#define THLS 4 /* Turn hard left, then step */ +#define TLS 5 /* Turn left, then step */ +#define SF 6 /* Step */ +#define STR 7 /* Step then turn right */ +#define STHR 8 /* Step then turn hard right */ +#define STB 9 /* Step then turn back */ +#define STHL 10 /* Step then turn hard left */ +#define STL 11 /* Step then turn left */ + +static antfarmstruct *antfarms = NULL; + +/* LANGTON'S ANT (10) Chaotic after 500, Builder after 10,000 (104p) */ +/* TURK'S 100 ANT Always chaotic?, tested past 150,000,000 */ +/* TURK'S 101 ANT Always chaotic? */ +/* TURK'S 110 ANT Builder at 150 (18p) */ +/* TURK'S 1000 ANT Always chaotic? */ +/* TURK'S 1100 SYMMETRIC ANT all even run 1's and 0's are symmetric */ +/* other examples 1001, 110011, 110000, 1001101 */ +/* TURK'S 1101 ANT Builder after 250,000 (388p) */ +/* Once saw a chess horse type builder (i.e. non-45 degree builder) */ + +/* BEE ONLY */ +/* All alternating 10 appear symmetric, no proof (i.e. 10, 1010, etc) */ +/* Even runs of 0's and 1's are also symmetric */ +/* I have seen Hexagonal builders but they are more rare. */ + +static unsigned char tables[][3 * NUMSTIPPLES * STATES + 2] = +{ +#if 0 + /* Here just so you can figure out notation */ + { /* Langton's ant */ + 2, 1, + 1, TLS, 0, 0, TRS, 0 + }, +#else + /* First 2 numbers are the size (ncolors, nstates) */ + { /* LADDER BUILDER */ + 4, 1, + 1, STR, 0, 2, STL, 0, 3, TRS, 0, 0, TLS, 0 + }, + { /* SPIRALING PATTERN */ + 2, 2, + 1, TLS, 0, 0, FS, 1, + 1, TRS, 0, 1, TRS, 0 + }, + { /* SQUARE (HEXAGON) BUILDER */ + 2, 2, + 1, TLS, 0, 0, FS, 1, + 0, TRS, 0, 1, TRS, 0 + }, +#endif +}; + +#define NTABLES (sizeof tables / sizeof tables[0]) + +static void +position_of_neighbor(antfarmstruct * ap, int dir, int *pcol, int *prow) +{ + int col = *pcol, row = *prow; + + if (ap->neighbors == 6) { + switch (dir) { + case 0: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + break; + case 60: + if (!(row & 1)) + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 120: + if (row & 1) + col = (!col) ? ap->ncols - 1 : col - 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? ap->ncols - 1 : col - 1; + break; + case 240: + if (row & 1) + col = (!col) ? ap->ncols - 1 : col - 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 300: + if (!(row & 1)) + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (ap->neighbors == 4 || ap->neighbors == 8) { + switch (dir) { + case 0: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + break; + case 45: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 90: + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 135: + col = (!col) ? ap->ncols - 1 : col - 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? ap->ncols - 1 : col - 1; + break; + case 225: + col = (!col) ? ap->ncols - 1 : col - 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 270: + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 315: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = (!col) ? ap->ncols - 1 : col - 1; + break; + case 30: + case 40: + col = (!col) ? ap->ncols - 1 : col - 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 60: + col = (!col) ? ap->ncols - 1 : col - 1; + if (!row) + row = ap->nrows - 2; + else if (!(row - 1)) + row = ap->nrows - 1; + else + row = row - 2; + break; + case 80: + case 90: + if (!row) + row = ap->nrows - 2; + else if (!(row - 1)) + row = ap->nrows - 1; + else + row = row - 2; + break; + case 120: + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 150: + case 160: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 180: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + break; + case 200: + case 210: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 240: + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 270: + case 280: + if (row + 1 == ap->nrows) + row = 1; + else if (row + 2 == ap->nrows) + row = 0; + else + row = row + 2; + break; + case 300: + col = (!col) ? ap->ncols - 1 : col - 1; + if (row + 1 == ap->nrows) + row = 1; + else if (row + 2 == ap->nrows) + row = 0; + else + row = row + 2; + break; + case 320: + case 330: + col = (!col) ? ap->ncols - 1 : col - 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + break; + case 30: + case 40: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 60: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + if (row + 1 == ap->nrows) + row = 1; + else if (row + 2 == ap->nrows) + row = 0; + else + row = row + 2; + break; + case 80: + case 90: + if (row + 1 == ap->nrows) + row = 1; + else if (row + 2 == ap->nrows) + row = 0; + else + row = row + 2; + break; + case 120: + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 150: + case 160: + col = (!col) ? ap->ncols - 1 : col - 1; + row = (row + 1 == ap->nrows) ? 0 : row + 1; + break; + case 180: + col = (!col) ? ap->ncols - 1 : col - 1; + break; + case 200: + case 210: + col = (!col) ? ap->ncols - 1 : col - 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 240: + row = (!row) ? ap->nrows - 1 : row - 1; + break; + case 270: + case 280: + if (!row) + row = ap->nrows - 2; + else if (row == 1) + row = ap->nrows - 1; + else + row = row - 2; + break; + case 300: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + if (!row) + row = ap->nrows - 2; + else if (row == 1) + row = ap->nrows - 1; + else + row = row - 2; + break; + case 320: + case 330: + col = (col + 1 == ap->ncols) ? 0 : col + 1; + row = (!row) ? ap->nrows - 1 : row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + *pcol = col; + *prow = row; +} + +static void +fillcell(ModeInfo * mi, GC gc, int col, int row) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + + if (ap->neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + ap->shape.hexagon[0].x = ap->xb + ccol * ap->xs; + ap->shape.hexagon[0].y = ap->yb + crow * ap->ys; + if (ap->xs == 1 && ap->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ap->shape.hexagon[0].x, ap->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ap->shape.hexagon, 6, Convex, CoordModePrevious); + } else if (ap->neighbors == 4 || ap->neighbors == 8) { + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ap->xb + ap->xs * col, ap->yb + ap->ys * row, + ap->xs - (ap->xs > 3), ap->ys - (ap->ys > 3)); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + ap->shape.triangle[orient][0].x = ap->xb + col * ap->xs; + ap->shape.triangle[orient][0].y = ap->yb + row * ap->ys; + if (ap->xs <= 3 || ap->ys <= 3) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ((orient) ? -1 : 1) + ap->shape.triangle[orient][0].x, + ap->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + ap->shape.triangle[orient][0].x += (ap->xs / 2 - 1); + else + ap->shape.triangle[orient][0].x -= (ap->xs / 2 - 1); + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ap->shape.triangle[orient], 3, Convex, CoordModePrevious); + } + } +} + +static void +truchetcell(ModeInfo * mi, int col, int row, int truchetstate) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + + if (ap->neighbors == 6) { + + int ccol = 2 * col + !(row & 1), crow = 2 * row; + int side; + int fudge = 7; /* fudge because the hexagons are not exact */ + XPoint hex, hex2; + + if (ap->sharpturn) { + hex.x = ap->xb + ccol * ap->xs - (int) ((double) ap->xs / 2.0) - 1; + hex.y = ap->yb + crow * ap->ys - (int) ((double) ap->ys / 2.0) - 1; + for (side = 0; side < 6; side++) { + if (side > 0) { + hex.x += ap->shape.hexagon[side].x; + hex.y += ap->shape.hexagon[side].y; + } + if (truchetstate == side % 2) + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + hex.x, hex.y, ap->xs, ap->ys, + ((570 - (side * 60) + fudge) % 360) * 64, (120 - 2 * fudge) * 64); + } + } else { + /* Very crude approx of Sqrt 3, so it will not cause drawing errors. */ + hex.x = ap->xb + ccol * ap->xs - (int) ((double) ap->xs * 1.6 / 2.0); + hex.y = ap->yb + crow * ap->ys - (int) ((double) ap->ys * 1.6 / 2.0); + for (side = 0; side < 6; side++) { + if (side > 0) { + hex.x += ap->shape.hexagon[side].x; + hex.y += ap->shape.hexagon[side].y; + } + hex2.x = hex.x + ap->shape.hexagon[side + 1].x / 2; + hex2.y = hex.y + ap->shape.hexagon[side + 1].y / 2; + if (truchetstate == side % 3) + /* Crude approx of 120 deg, so it will not cause drawing errors. */ + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + hex2.x, hex2.y, + (int) ((double) ap->xs * 1.5), (int) ((double) ap->ys * 1.5), + ((555 - (side * 60)) % 360) * 64, 90 * 64); + } + } + } else if (ap->neighbors == 4) { + if (truchetstate) { + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + ap->xb + ap->xs * col - ap->xs / 2 + 1, + ap->yb + ap->ys * row + ap->ys / 2 - 1, + ap->xs - 2, ap->ys - 2, + 0 * 64, 90 * 64); + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + ap->xb + ap->xs * col + ap->xs / 2 - 1, + ap->yb + ap->ys * row - ap->ys / 2 + 1, + ap->xs - 2, ap->ys - 2, + -90 * 64, -90 * 64); + } else { + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + ap->xb + ap->xs * col - ap->xs / 2 + 1, + ap->yb + ap->ys * row - ap->ys / 2 + 1, + ap->xs - 2, ap->ys - 2, + 0 * 64, -90 * 64); + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + ap->xb + ap->xs * col + ap->xs / 2 - 1, + ap->yb + ap->ys * row + ap->ys / 2 - 1, + ap->xs - 2, ap->ys - 2, + 90 * 64, 90 * 64); + } + } else if (ap->neighbors == 3) { + int orient = (col + row) % 2; /* O left 1 right */ + int side, ang; + int fudge = 7; /* fudge because the triangles are not exact */ + XPoint tri; + + tri.x = ap->xb + col * ap->xs; + tri.y = ap->yb + row * ap->ys; + if (orient) { + tri.x += (ap->xs / 2 - 1); + } else { + tri.x -= (ap->xs / 2 - 1); + } + for (side = 0; side < 3; side++) { + if (side > 0) { + tri.x += ap->shape.triangle[orient][side].x; + tri.y += ap->shape.triangle[orient][side].y; + } + if (truchetstate == side % 3) { + if (orient) + ang = (510 - side * 120) % 360; /* Right */ + else + ang = (690 - side * 120) % 360; /* Left */ + XDrawArc(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + tri.x - ap->xs / 2, tri.y - 3 * ap->ys / 4, + ap->xs, 3 * ap->ys / 2, + (ang + fudge) * 64, (60 - 2 * fudge) * 64); + } + } + } +} + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned char color) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + GC gc; + + if (!color) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + gc = MI_GC(mi); + } else if (MI_NPIXELS(mi) > 2) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), + MI_PIXEL(mi, ap->colors[color - 1])); + gc = MI_GC(mi); + } else { + XGCValues gcv; + + gcv.stipple = ap->pixmaps[color - 1]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), ap->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = ap->stippledGC; + } + fillcell(mi, gc, col, row); +} + +static void +drawtruchet(ModeInfo * mi, int col, int row, + unsigned char color, unsigned char truchetstate) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + + if (!color) + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WHITE_PIXEL(mi)); + else if (MI_NPIXELS(mi) > 2 || color > ap->ncolors / 2) + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + else + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WHITE_PIXEL(mi)); + truchetcell(mi, col, row, truchetstate); +} + +static void +draw_anant(ModeInfo * mi, int col, int row) +{ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WHITE_PIXEL(mi)); + fillcell(mi, MI_GC(mi), col, row); +#if 0 /* Can not see eyes */ + { + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + if (ap->xs > 2 && ap->ys > 2) { /* Draw Eyes */ + + XSetForeground(display, MI_GC(mi), MI_BLACK_PIXEL(mi)); + switch (direction) { + case 0: + XDrawPoint(display, window, MI_GC(mi), + ap->xb + ap->xs - 1, ap->yb + 1); + XDrawPoint(display, window, MI_GC(mi), + ap->xb + ap->xs - 1, ap->yb + ap->ys - 2); + break; + case 180: + XDrawPoint(display, window, MI_GC(mi), ap->xb, ap->yb + 1); + XDrawPoint(display, window, MI_GC(mi), ap->xb, ap->yb + ap->ys - 2); + break; + if (neighbors == 4) { + case 90: + XDrawPoint(display, window, MI_GC(mi), ap->xb + 1, ap->yb); + XDrawPoint(display, window, MI_GC(mi), + ap->xb + ap->xs - 2, ap->yb); + break; + case 270: + XDrawPoint(display, window, MI_GC(mi), + ap->xb + 1, ap->yb + ap->ys - 1); + XDrawPoint(display, window, MI_GC(mi), + ap->xb + ap->xs - 2, ap->yb + ap->ys - 1); + break; + } /* else BEE */ + default: + } + } + } +#endif +} + +#if 0 +static void +RandomSoup(mi) + ModeInfo *mi; +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + int row, col, mrow = 0; + + for (row = 0; row < ap->nrows; ++row) { + for (col = 0; col < ap->ncols; ++col) { + ap->old[col + mrow] = (unsigned char) NRAND((int) ap->ncolors); + drawcell(mi, col, row, ap->old[col + mrow]); + } + mrow += ap->nrows; + } +} + +#endif + +static short +fromTableDirection(unsigned char dir, int local_neighbors) +{ + switch (dir) { + case FS: + return 0; + case TRS: + return (ANGLES / local_neighbors); + case THRS: + return (ANGLES / 2 - ANGLES / local_neighbors); + case TBS: + return (ANGLES / 2); + case THLS: + return (ANGLES / 2 + ANGLES / local_neighbors); + case TLS: + return (ANGLES - ANGLES / local_neighbors); + case SF: + return ANGLES; + case STR: + return (ANGLES + ANGLES / local_neighbors); + case STHR: + return (3 * ANGLES / 2 - ANGLES / local_neighbors); + case STB: + return (3 * ANGLES / 2); + case STHL: + return (3 * ANGLES / 2 + ANGLES / local_neighbors); + case STL: + return (2 * ANGLES - ANGLES / local_neighbors); + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + return -1; +} + +static void +getTable(ModeInfo * mi, int i) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + int j, total; + unsigned char *patptr; + + patptr = &tables[i][0]; + ap->ncolors = *patptr++; + ap->nstates = *patptr++; + total = ap->ncolors * ap->nstates; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, + "ants %d, neighbors %d, table number %d, colors %d, states %d\n", + ap->n, ap->neighbors, i, ap->ncolors, ap->nstates); + for (j = 0; j < total; j++) { + ap->machine[j].color = *patptr++; + if (ap->sharpturn && ap->neighbors > 4 && !(ap->neighbors % 2)) { + int k = *patptr++; + + switch (k) { + case TRS: + k = THRS; + break; + case THRS: + k = TRS; + break; + case THLS: + k = TLS; + break; + case TLS: + k = THLS; + break; + case STR: + k = STHR; + break; + case STHR: + k = STR; + break; + case STHL: + k = STL; + break; + case STL: + k = STHL; + break; + default: + break; + } + ap->machine[j].direction = fromTableDirection(k, ap->neighbors); + } else { + ap->machine[j].direction = fromTableDirection(*patptr++, ap->neighbors); + } + ap->machine[j].next = *patptr++; + } + ap->truchet = False; +} + +static void +getTurk(ModeInfo * mi, int i) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + int power2, j, number, total; + + /* To force a number, say has i + 2 (or 4) binary digits */ + power2 = 1 << (i + 1); + /* Do not want numbers which in binary are all 1's. */ + number = NRAND(power2 - 1) + power2; + /* To force a particular number, say */ + + ap->ncolors = i + 2; + ap->nstates = 1; + total = ap->ncolors * ap->nstates; + for (j = 0; j < total; j++) { + ap->machine[j].color = (j + 1) % total; + if (ap->sharpturn && ap->neighbors > 4 && !(ap->neighbors % 2)) { + ap->machine[j].direction = (power2 & number) ? + fromTableDirection(THRS, ap->neighbors) : + fromTableDirection(THLS, ap->neighbors); + } else { + ap->machine[j].direction = (power2 & number) ? + fromTableDirection(TRS, ap->neighbors) : + fromTableDirection(TLS, ap->neighbors); + } + ap->machine[j].next = 0; + power2 >>= 1; + } + ap->truchet = (ap->truchet && ap->xs > 2 && ap->ys > 2 && + (ap->neighbors == 3 || ap->neighbors == 4 || ap->neighbors == 6)); + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, + "ants %d, neighbors %d, Turk's number %d, colors %d\n", + ap->n, ap->neighbors, number, ap->ncolors); +} + +void +init_ant(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int size = MI_SIZE(mi); + antfarmstruct *ap; + int col, row, dir; + long i; + + if (antfarms == NULL) { + if ((antfarms = (antfarmstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (antfarmstruct))) == NULL) + return; + } + ap = &antfarms[MI_SCREEN(mi)]; + ap->redrawing = 0; + if (MI_NPIXELS(mi) <= 2) { + if (ap->stippledGC == None) { + XGCValues gcv; + + gcv.fill_style = FillOpaqueStippled; + ap->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv); + } + if (ap->init_bits == 0) { + for (i = 1; i < NUMSTIPPLES; i++) + ANTBITS(stipples[i], STIPPLESIZE, STIPPLESIZE); + } + } + ap->generation = 0; + ap->n = MI_COUNT(mi); + if (ap->n < -MINANTS) { + /* if ap->n is random ... the size can change */ + if (ap->ants != NULL) { + (void) free((void *) ap->ants); + ap->ants = NULL; + } + ap->n = NRAND(-ap->n - MINANTS + 1) + MINANTS; + } else if (ap->n < MINANTS) + ap->n = MINANTS; + + ap->width = MI_WIDTH(mi); + ap->height = MI_HEIGHT(mi); + + if (neighbors == 8 || neighbors == 9 || neighbors == 12) + ap->neighbors = neighbors; /* Discourage but not deny use... */ + else + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + ap->neighbors = plots[i]; + break; + } + if (i == NEIGHBORKINDS - 1) { + ap->neighbors = plots[NRAND(NEIGHBORKINDS)]; + break; + } + } + + if (ap->neighbors == 6) { + int nccols, ncrows; + + if (ap->width < 2) + ap->width = 2; + if (ap->height < 4) + ap->height = 4; + if (size < -MINSIZE) { + ap->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(ap->width, ap->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + if (ap->ys < MINRANDOMSIZE) + ap->ys = MIN(MINRANDOMSIZE, + MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE)); + } else if (size < MINSIZE) { + if (!size) + ap->ys = MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE); + else + ap->ys = MINSIZE; + } else + ap->ys = MIN(size, MAX(MINSIZE, MIN(ap->width, ap->height) / + MINGRIDSIZE)); + ap->xs = ap->ys; + nccols = MAX(ap->width / ap->xs - 2, 2); + ncrows = MAX(ap->height / ap->ys - 1, 2); + ap->ncols = nccols / 2; + ap->nrows = 2 * (ncrows / 4); + ap->xb = (ap->width - ap->xs * nccols) / 2 + ap->xs / 2; + ap->yb = (ap->height - ap->ys * (ncrows / 2) * 2) / 2 + ap->ys; + for (i = 0; i < 6; i++) { + ap->shape.hexagon[i].x = (ap->xs - 1) * hexagonUnit[i].x; + ap->shape.hexagon[i].y = ((ap->ys - 1) * hexagonUnit[i].y / 2) * 4 / 3; + } + /* Avoid array bounds read of hexagonUnit */ + ap->shape.hexagon[6].x = 0; + ap->shape.hexagon[6].y = 0; + } else if (ap->neighbors == 4 || ap->neighbors == 8) { + if (size < -MINSIZE) { + ap->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(ap->width, ap->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + if (ap->ys < MINRANDOMSIZE) + ap->ys = MIN(MINRANDOMSIZE, + MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE)); + } else if (size < MINSIZE) { + if (!size) + ap->ys = MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE); + else + ap->ys = MINSIZE; + } else + ap->ys = MIN(size, MAX(MINSIZE, MIN(ap->width, ap->height) / + MINGRIDSIZE)); + ap->xs = ap->ys; + ap->ncols = MAX(ap->width / ap->xs, 2); + ap->nrows = MAX(ap->height / ap->ys, 2); + ap->xb = (ap->width - ap->xs * ap->ncols) / 2; + ap->yb = (ap->height - ap->ys * ap->nrows) / 2; + } else { /* TRI */ + int orient; + + if (ap->width < 2) + ap->width = 2; + if (ap->height < 2) + ap->height = 2; + if (size < -MINSIZE) { + ap->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(ap->width, ap->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + if (ap->ys < MINRANDOMSIZE) + ap->ys = MIN(MINRANDOMSIZE, + MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE)); + } else if (size < MINSIZE) { + if (!size) + ap->ys = MAX(MINSIZE, MIN(ap->width, ap->height) / MINGRIDSIZE); + else + ap->ys = MINSIZE; + } else + ap->ys = MIN(size, MAX(MINSIZE, MIN(ap->width, ap->height) / + MINGRIDSIZE)); + ap->xs = (int) (1.52 * ap->ys); + ap->ncols = (MAX(ap->width / ap->xs - 1, 2) / 2) * 2; + ap->nrows = (MAX(ap->height / ap->ys - 1, 2) / 2) * 2; + ap->xb = (ap->width - ap->xs * ap->ncols) / 2 + ap->xs / 2; + ap->yb = (ap->height - ap->ys * ap->nrows) / 2 + ap->ys; + for (orient = 0; orient < 2; orient++) { + for (i = 0; i < 3; i++) { + ap->shape.triangle[orient][i].x = + (ap->xs - 2) * triangleUnit[orient][i].x; + ap->shape.triangle[orient][i].y = + (ap->ys - 2) * triangleUnit[orient][i].y; + } + /* Avoid array bounds read of triangleUnit */ + ap->shape.triangle[orient][3].x = 0; + ap->shape.triangle[orient][3].y = 0; + } + } + + XSetLineAttributes(display, MI_GC(mi), 1, LineSolid, CapNotLast, JoinMiter); + MI_CLEARWINDOW(mi); + ap->painted = False; + + if (MI_IS_FULLRANDOM(mi)) { + ap->truchet = (Bool) (LRAND() & 1); + ap->sharpturn = (Bool) (LRAND() & 1); + } else { + ap->truchet = truchet; + ap->sharpturn = sharpturn; + } + /* Exclude odd # of neighbors, stepping forward not defined */ + if (!NRAND(NUMSTIPPLES) && ((ap->neighbors + 1) % 2)) { + getTable(mi, (int) (NRAND(NTABLES))); + } else + getTurk(mi, (int) (NRAND(NUMSTIPPLES - 1))); + if (MI_NPIXELS(mi) > 2) + for (i = 0; i < (int) ap->ncolors - 1; i++) + ap->colors[i] = (unsigned char) (NRAND(MI_NPIXELS(mi)) + + i * MI_NPIXELS(mi)) / ((int) (ap->ncolors - 1)); + if (ap->ants == NULL) + ap->ants = (antstruct *) malloc(ap->n * sizeof (antstruct)); + if (ap->tape != NULL) + (void) free((void *) ap->tape); + ap->tape = (unsigned char *) + calloc(ap->ncols * ap->nrows, sizeof (unsigned char)); + + if (ap->truchet_state != NULL) + (void) free((void *) ap->truchet_state); + ap->truchet_state = (unsigned char *) + calloc(ap->ncols * ap->nrows, sizeof (unsigned char)); + + col = ap->ncols / 2; + row = ap->nrows / 2; + dir = NRAND(ap->neighbors) * ANGLES / ap->neighbors; + /* Have them all start in the same spot, why not? */ + for (i = 0; i < ap->n; i++) { + ap->ants[i].col = col; + ap->ants[i].row = row; + ap->ants[i].direction = dir; + ap->ants[i].state = 0; + } + draw_anant(mi, col, row); +} + +void +draw_ant(ModeInfo * mi) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + antstruct *anant; + statestruct *status; + int i, state_pos, tape_pos; + unsigned char color; + short chg_dir, old_dir; + + MI_IS_DRAWN(mi) = True; + + ap->painted = True; + for (i = 0; i < ap->n; i++) { + anant = &ap->ants[i]; + tape_pos = anant->col + anant->row * ap->ncols; + color = ap->tape[tape_pos]; /* read tape */ + state_pos = color + anant->state * ap->ncolors; + status = &(ap->machine[state_pos]); + drawcell(mi, anant->col, anant->row, status->color); + ap->tape[tape_pos] = status->color; /* write on tape */ + + /* Find direction of Bees or Ants. */ + /* Translate relative direction to actual direction */ + old_dir = anant->direction; + chg_dir = (2 * ANGLES - status->direction) % ANGLES; + anant->direction = (chg_dir + old_dir) % ANGLES; + if (ap->truchet) { + int a = 0, b; + + if (ap->neighbors == 6) { + if (ap->sharpturn) { + a = (chg_dir / 120 == 2); + drawtruchet(mi, anant->col, anant->row, status->color, a); + } else { + a = (old_dir / 60) % 3; + b = (anant->direction / 60) % 3; + a = (a + b + 1) % 3; + drawtruchet(mi, anant->col, anant->row, status->color, a); + } + } else if (ap->neighbors == 4) { + a = old_dir / 180; + b = anant->direction / 180; + a = ((a && !b) || (b && !a)); + drawtruchet(mi, anant->col, anant->row, status->color, a); + } else if (ap->neighbors == 3) { + if (chg_dir == 240) + a = (2 + anant->direction / 120) % 3; + else + a = (1 + anant->direction / 120) % 3; + drawtruchet(mi, anant->col, anant->row, status->color, a); + } + ap->truchet_state[tape_pos] = a + 1; + } + anant->state = status->next; + + /* If edge than wrap it */ + old_dir = ((status->direction < ANGLES) ? anant->direction : old_dir); + position_of_neighbor(ap, old_dir, &(anant->col), &(anant->row)); + draw_anant(mi, anant->col, anant->row); + } + if (++ap->generation > MI_CYCLES(mi)) { + init_ant(mi); + } + if (ap->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + if (ap->tape[ap->redrawpos] || + (ap->truchet && ap->truchet_state[ap->redrawpos])) { + drawcell(mi, ap->redrawpos % ap->ncols, ap->redrawpos / ap->ncols, + ap->tape[ap->redrawpos]); + if (ap->truchet) + drawtruchet(mi, ap->redrawpos % ap->ncols, ap->redrawpos / ap->ncols, + ap->tape[ap->redrawpos], + ap->truchet_state[ap->redrawpos] - 1); + } + if (++(ap->redrawpos) >= ap->ncols * ap->nrows) { + ap->redrawing = 0; + break; + } + } + } +} + +void +release_ant(ModeInfo * mi) +{ + if (antfarms != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + antfarmstruct *ap = &antfarms[screen]; + int shade; + + if (ap->stippledGC != None) { + XFreeGC(MI_DISPLAY(mi), ap->stippledGC); + } + for (shade = 0; shade < ap->init_bits; shade++) + XFreePixmap(MI_DISPLAY(mi), ap->pixmaps[shade]); + if (ap->tape != NULL) + (void) free((void *) ap->tape); + if (ap->ants != NULL) + (void) free((void *) ap->ants); + if (ap->truchet_state != NULL) + (void) free((void *) ap->truchet_state); + } + (void) free((void *) antfarms); + antfarms = NULL; + } +} + +void +refresh_ant(ModeInfo * mi) +{ + antfarmstruct *ap = &antfarms[MI_SCREEN(mi)]; + + if (ap->painted) { + MI_CLEARWINDOW(mi); + ap->redrawing = 1; + ap->redrawpos = 0; + } +} + +#endif /* MODE_ant */ diff --git a/modes/ball.c b/modes/ball.c new file mode 100644 index 00000000..c44fcec5 --- /dev/null +++ b/modes/ball.c @@ -0,0 +1,511 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* ball --- bouncing balls with random drawing functions that leave a trail */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)ball.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by Heath Rice . + * + * 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 "Ball" +#define HACK_INIT init_ball +#define HACK_DRAW draw_ball +#define ball_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 10 \n" \ + "*cycles: 20 \n" \ + "*size: -100 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_ball + +ModeSpecOpt ball_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct ball_description = +{"ball", "init_ball", "draw_ball", "release_ball", + "refresh_ball", "init_ball", NULL, &ball_opts, + 10000, 10, 20, -100, 64, 1.0, "", + "Shows bouncing balls", 0, NULL}; + +#endif + +#define NONE 0 /* not in a window */ +#define V 1 /* vertical */ +#define H 2 /* horizontal */ +#define B 3 /* ball */ + +#define MINBALLS 1 +#define MINSIZE 2 +#define MINGRIDSIZE 4 + +#define DEFNO 6 +#define SPEED 156 +#define SQLIMIT (SPEED*SPEED/(30*30)) /* square of lower speed limit */ +#define RATE 600 + +typedef struct { + int x, y; /* x and y coords */ + int dx, dy; /* x and y velocity */ + int rad; + int bounce; + int dyold; + int started; + int def; + GC GcF, GcB; +} balltype; + +typedef struct { + Bool painted; + balltype *bt; + int rad; + int size; + int width, height; + int bounce; + int nballs; + int dispx, dispy; +} ballstruct; + +static ballstruct *balls = NULL; + +static void +collided(ModeInfo * mi, int i, int n, int *dx, int *dy, int td) +{ + ballstruct *bp = &balls[MI_SCREEN(mi)]; + balltype *bti = &bp->bt[i]; + balltype *btn = &bp->bt[n]; + int rx1, ry1, rx2, ry2; + int Vx1, Vy1, Vx2, Vy2; + int NVx1, NVy1, NVx2, NVy2; + + float Ux1, Uy1, Ux2, Uy2; + float mag1, mag2, imp; + + rx1 = bti->x; + ry1 = bti->y; + Vx1 = bti->dx; + Vy1 = bti->dy; + + rx2 = btn->x; + ry2 = btn->y; + Vx2 = btn->dx; + Vy2 = btn->dy; + + Ux1 = rx1 - rx2; + Uy1 = ry1 - ry2; + mag1 = sqrt(((Ux1 * Ux1) + (Uy1 * Uy1))); + Ux1 = Ux1 / mag1; + Uy1 = Uy1 / mag1; + + Ux2 = rx2 - rx1; + Uy2 = ry2 - ry1; + mag2 = sqrt(((Ux2 * Ux2) + (Uy2 * Uy2))); + Ux2 = Ux2 / mag2; + Uy2 = Uy2 / mag2; + + imp = ((Vx1 * Ux2) + (Vy1 * Uy2)) + ((Vx2 * Ux1) + (Vy2 * Uy1)); + + NVx1 = Vx1 + (int) (imp * Ux1); + NVy1 = Vy1 + (int) (imp * Uy1); + + NVx2 = Vx2 + (int) (imp * Ux2); + NVy2 = Vy2 + (int) (imp * Uy2); + + bti->dx = NVx1; + bti->dy = NVy1; + + btn->dx = NVx2; + btn->dy = NVy2; + + XFillArc(MI_DISPLAY(mi), MI_WINDOW(mi), btn->GcB, + btn->x - (btn->rad / 2), btn->y - (btn->rad / 2), + btn->rad, btn->rad, 0, 360 * 64); + if (bp->dispx > 100) { + *dx = (td * btn->dx) / RATE; + *dy = (td * btn->dy) / RATE; + } else { + *dx = (td * btn->dx) / 150; + *dy = (td * btn->dy) / 150; + } + + btn->x += (*dx / 2); + btn->y += (*dy / 2); + XFillArc(MI_DISPLAY(mi), MI_WINDOW(mi), btn->GcF, + btn->x - (btn->rad / 2), btn->y - (btn->rad / 2), + btn->rad, btn->rad, 0, 360 * 64); + + if (bp->dispx > 100) { + *dx = (td * bti->dx) / RATE; + *dy = (td * bti->dy) / RATE; + } else { + *dx = (td * bti->dx) / 150; + *dy = (td * bti->dy) / 150; + } + + bti->x += (*dx / 2); + bti->y += (*dy / 2); +} + +static int +inwin(ballstruct * bp, int x, int y, int *n, int rad) +{ + int i, diffx, diffy; + + if ((x < 0) || (x > bp->dispx)) { + return (V); + } + if ((y < 0) || (y > bp->dispy)) { + return (H); + } + if (bp->dispx > 100) { + for (i = 0; i < bp->nballs; i++) { + if ((i == (*n)) || (!bp->bt[i].def)) + continue; + diffx = (bp->bt[i].x - x); + diffy = (bp->bt[i].y - y); + if ((diffx * diffx + diffy * diffy) < + (((rad / 2) * (rad / 2) * 2) + + ((bp->bt[i].rad / 2) * (bp->bt[i].rad / 2) * 2))) { + (*n) = i; + return (B); + } + } + } + return (NONE); +} + +static void +randomball(ModeInfo * mi, int i) +{ + ballstruct *bp = &balls[MI_SCREEN(mi)]; + balltype *bti = &bp->bt[i]; + Display *display = MI_DISPLAY(mi); + int x, y, bn; + int dum; + int attempts; + unsigned long randbg = 1; + + attempts = 0; + if (bp->bounce == -2) + bn = 30 + NRAND(69L); + else + bn = bp->bounce; + + if (bn > 100) + bn = 100; + if (bn < 0) + bn = 0; + bn = (0 - bn); + + if (bp->dispx > 100) { + bti->dx = NRAND(2L * SPEED) + SPEED; + bti->dy = NRAND(2L * SPEED) + (SPEED / 2); + } else { + bti->dx = NRAND(4L * SPEED) + (SPEED / 20); + bti->dy = NRAND(2L * SPEED) + (SPEED / 40); + } + + switch (NRAND(9L) % 2) { + case 0: + break; + case 1: + bti->dx = (0 - bti->dx); + break; + } + + bti->bounce = bn; + bti->dyold = 0; + bti->rad = bp->rad; /* Pretty lame... should be different sizes */ + + do { + dum = i; + x = NRAND((long) bp->dispx); + y = 0; + attempts++; + if (attempts > 5) { + bti->def = 0; + return; + } + } + + while ((inwin(bp, x, y, &dum, bti->rad) != NONE) || + (inwin(bp, bti->dx + x, bti->dy + y, &dum, bti->rad) != NONE)); + + bti->def = 1; + bti->x = x; + bti->y = y; + + /* set background color for ball */ + + if (MI_NPIXELS(mi) > 2) { + randbg = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + } else { + randbg = MI_BLACK_PIXEL(mi); + } + XSetForeground(display, bti->GcB, randbg); + + /* set foreground color for ball */ + + if (MI_NPIXELS(mi) > 2) { + randbg = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + } else { + randbg = MI_WHITE_PIXEL(mi); + } + XSetForeground(display, bti->GcF, randbg); + + XFillArc(display, MI_WINDOW(mi), + bti->GcB, bti->x - (bti->rad / 2), bti->y - (bti->rad / 2), + bti->rad, bti->rad, 0, 360 * 64); +} + +void +init_ball(ModeInfo * mi) +{ + ballstruct *bp; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int GcLp, i; + int size = MI_SIZE(mi); + + if (balls == NULL) { + if ((balls = (ballstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (ballstruct))) == NULL) + return; + } + bp = &balls[MI_SCREEN(mi)]; + + bp->bounce = 85; + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + + bp->nballs = MI_COUNT(mi); + if (bp->nballs < -MINBALLS) { + /* if bp->nballs is random ... the size can change */ + if (bp->bt != NULL) { + (void) free((void *) bp->bt); + bp->bt = NULL; + } + bp->nballs = NRAND(-bp->nballs - MINBALLS + 1) + MINBALLS; + } else if (bp->nballs < MINBALLS) + bp->nballs = MINBALLS; + if (bp->bt == NULL) { + bp->bt = (balltype *) calloc(bp->nballs, sizeof (balltype)); + } + if (size == 0 || + MINGRIDSIZE * size > bp->width || MINGRIDSIZE * size > bp->height) { + bp->rad = MAX(MINSIZE, MIN(bp->width, bp->height) / MINGRIDSIZE); + } else { + if (size < -MINSIZE) + bp->rad = NRAND(MIN(-size, MAX(MINSIZE, MIN(bp->width, bp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + bp->rad = MINSIZE; + else + bp->rad = MIN(size, MAX(MINSIZE, MIN(bp->width, bp->height) / + MINGRIDSIZE)); + } + + /* clearballs */ + MI_CLEARWINDOW(mi); + bp->painted = False; + XFlush(display); + if (bp->nballs <= 0) + bp->nballs = 1; + if (!bp->bt[0].GcB) { + XGCValues gcv; + + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + for (GcLp = 0; GcLp < bp->nballs; GcLp++) { + bp->bt[GcLp].GcB = XCreateGC(display, window, + GCForeground | GCBackground, &gcv); + bp->bt[GcLp].GcF = XCreateGC(display, window, + GCForeground | GCBackground, &gcv); + } + } + for (GcLp = 0; GcLp < bp->nballs; GcLp++) { + if (MI_NPIXELS(mi) > 2) { + XSetFunction(display, bp->bt[GcLp].GcB, NRAND(16L)); + XSetFunction(display, bp->bt[GcLp].GcF, NRAND(16L)); + } else { + XSetFunction(display, bp->bt[GcLp].GcB, NRAND(8L)); + XSetFunction(display, bp->bt[GcLp].GcF, NRAND(8L)); + } + } + + bp->dispx = MI_WIDTH(mi); + bp->dispy = MI_HEIGHT(mi); + + XFlush(display); + for (i = 0; i < bp->nballs; i++) { + randomball(mi, i); + } +} + +void +draw_ball(ModeInfo * mi) +{ + ballstruct *bp = &balls[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int i, n; + int td; + int dx, dy; + int redo; + + MI_IS_DRAWN(mi) = True; + + td = 10; + bp->painted = True; + for (i = 0; i < bp->nballs; i++) { + if (!bp->bt[i].def) + randomball(mi, i); + } + + for (i = 0; i < bp->nballs; i++) { + if (!bp->bt[i].def) { + continue; + } + XFillArc(display, window, bp->bt[i].GcB, + bp->bt[i].x - (bp->bt[i].rad / 2), bp->bt[i].y - (bp->bt[i].rad / 2), + bp->bt[i].rad, bp->bt[i].rad, 0, 360 * 64); + redo = 0; + if (((bp->bt[i].dx * bp->bt[i].dx + bp->bt[i].dy * bp->bt[i].dy) < + SQLIMIT) && (bp->bt[i].y >= (bp->dispy - 3))) { + redo = 25; + } + do { + if (bp->dispx > 100) { + dx = (td * bp->bt[i].dx) / RATE; + dy = (td * bp->bt[i].dy) / RATE; + } else { + dx = (td * bp->bt[i].dx) / 150; + dy = (td * bp->bt[i].dy) / 150; + } + + if (redo > 5) { + redo = 0; + randomball(mi, i); + if (!bp->bt[i].def) + continue; + XFillArc(display, window, bp->bt[i].GcF, + bp->bt[i].x - (bp->bt[i].rad / 2), + bp->bt[i].y - (bp->bt[i].rad / 2), + bp->bt[i].rad, bp->bt[i].rad, 0, 360 * 64); + } + n = i; + switch (inwin(bp, dx + bp->bt[i].x, dy + bp->bt[i].y, &n, + bp->bt[i].rad)) { + case NONE: + bp->bt[i].x += dx; + bp->bt[i].y += dy; + redo = 0; + break; + case V: + bp->bt[i].dx = (int) (((float) bp->bt[i].bounce * + (float) bp->bt[i].dx) / (float) 100); + redo++; + break; + case H: + bp->bt[i].dy = (int) (((float) bp->bt[i].bounce * + (float) bp->bt[i].dy) / (float) 100); + if (bp->bt[i].bounce != 100) { + if ((bp->bt[i].y >= (bp->dispy - 3)) && (bp->bt[i].dy > -250) && + (bp->bt[i].dy < 0)) { + redo = 15; + } + if ((bp->bt[i].y >= (bp->dispy - 3)) && + (bp->bt[i].dy == bp->bt[i].dyold)) { + redo = 10; + } + bp->bt[i].dyold = bp->bt[i].dy; + } + redo++; + break; + case B: + if (redo > 5) { + if (bp->bt[i].y >= (bp->dispy - 3)) { + randomball(mi, i); + redo = 0; + } else if (bp->bt[n].y >= (bp->dispy - 3)) { + randomball(mi, n); + redo = 0; + } else + redo = 0; + } else { + collided(mi, i, n, &dx, &dy, td); + redo = 0; + } + break; + } + } + while (redo); + bp->bt[i].dy += td; + + if (bp->bt[i].def) + XFillArc(display, window, bp->bt[i].GcF, + bp->bt[i].x - (bp->bt[i].rad / 2), bp->bt[i].y - (bp->bt[i].rad / 2), + bp->bt[i].rad, bp->bt[i].rad, 0, 360 * 64); + } + + XFlush(display); +} + +void +release_ball(ModeInfo * mi) +{ + if (balls != NULL) { + int screen, i; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + ballstruct *bp = &balls[screen]; + + for (i = 0; i < bp->nballs; i++) { + if (bp->bt[i].GcF) + XFreeGC(MI_DISPLAY(mi), bp->bt[i].GcF); + if (bp->bt[i].GcB) + XFreeGC(MI_DISPLAY(mi), bp->bt[i].GcB); + } + if (bp->bt != NULL) + (void) free((void *) bp->bt); + + } + (void) free((void *) balls); + balls = NULL; + } +} + +void +refresh_ball(ModeInfo * mi) +{ + ballstruct *bp = &balls[MI_SCREEN(mi)]; + + if (bp->painted) + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_ball */ diff --git a/modes/bat.c b/modes/bat.c new file mode 100644 index 00000000..0f8240b7 --- /dev/null +++ b/modes/bat.c @@ -0,0 +1,580 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bat --- bouncing bats */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bat.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1988 by Sun Microsystems + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 18-Sep-95: 5 bats now in color + * 20-Sep-94: 5 bats instead of bouncing balls, based on bounce.c + * + * 2-Sep-93: bounce version David Bagley + * 1986: Sun Microsystems + */ + +/*- + * original copyright + * ************************************************************************** + * 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. + * *************************************************************************** + */ + +#ifdef STANDALONE +#define PROGCLASS "Bat" +#define HACK_INIT init_bat +#define HACK_DRAW draw_bat +#define bat_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: -8 \n" \ + "*size: 0 \n" \ + "*ncolors: 200 \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "vis.h" +#include "color.h" +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_bat + +ModeSpecOpt bat_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct bat_description = +{"bat", "init_bat", "draw_bat", "release_bat", + "refresh_bat", "init_bat", NULL, &bat_opts, + 100000, -8, 1, 0, 64, 1.0, "", + "Shows bouncing flying bats", 0, NULL}; + +#endif + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#if USE_XPMINC +#include +#else +#include /* Normal spot */ +#endif +#include "pixmaps/bat-0.xpm" +#include "pixmaps/bat-1.xpm" +#include "pixmaps/bat-2.xpm" +#include "pixmaps/bat-3.xpm" +#include "pixmaps/bat-4.xpm" +#endif + +#include "bitmaps/bat-0.xbm" +#include "bitmaps/bat-1.xbm" +#include "bitmaps/bat-2.xbm" +#include "bitmaps/bat-3.xbm" +#include "bitmaps/bat-4.xbm" + +#define MAX_STRENGTH 24 +#define FRICTION 15 +#define PENETRATION 0.4 +#define SLIPAGE 4 +#define TIME 32 +#define MINBATS 1 +#define MINSIZE 1 +#define MINGRIDSIZE 3 + +#define ORIENTS 8 +#define ORIENTCYCLE 32 +#define CCW 1 +#define CW (ORIENTS-1) +#define DIR(x) (((x)>=0)?CCW:CW) +#define SIGN(x) (((x)>=0)?1:-1) + +static XImage bimages[] = +{ + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1} +}; + +typedef struct { + int x, y, xlast, ylast; + int spincount, spindelay, spindir, orient; + int vx, vy, vang; + int graphics_format; + unsigned long color; +} batstruct; + +typedef struct { + int width, height; + int nbats; + int xs, ys; + int avgsize; + int restartnum; + int graphics_format; + int pixelmode; + GC backGC; + Colormap cmap; + unsigned long black; + batstruct *bats; + XImage *images[ORIENTS / 2 + 1]; +} bouncestruct; + +static bouncestruct *bounces = NULL; + +static void checkCollision(bouncestruct * bp, int a_bat); +static void drawabat(ModeInfo * mi, batstruct * bat); +static void movebat(bouncestruct * bp, batstruct * bat); +static void flapbat(batstruct * bat, int dir, int *vel, int avgsize); +static int collide(bouncestruct * bp, int a_bat); + +static unsigned char *bits[] = +{ + bat0_bits, bat1_bits, bat2_bits, bat3_bits, bat4_bits +}; + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +static char **pixs[] = +{ + bat0, bat1, bat2, bat3, bat4 +}; + +#endif + +static void +checkCollision(bouncestruct * bp, int a_bat) +{ + int i, amount, spin, d, size; + double x, y; + + for (i = 0; i < bp->nbats; i++) { + if (i != a_bat) { + x = (double) (bp->bats[i].x - bp->bats[a_bat].x); + y = (double) (bp->bats[i].y - bp->bats[a_bat].y); + d = (int) sqrt(x * x + y * y); + size = bp->avgsize; + if (d > 0 && d < size) { + amount = size - d; + if (amount > PENETRATION * size) + amount = (int) (PENETRATION * size); + bp->bats[i].vx += (int) ((double) amount * x / d); + bp->bats[i].vy += (int) ((double) amount * y / d); + bp->bats[i].vx -= bp->bats[i].vx / FRICTION; + bp->bats[i].vy -= bp->bats[i].vy / FRICTION; + bp->bats[a_bat].vx -= (int) ((double) amount * x / d); + bp->bats[a_bat].vy -= (int) ((double) amount * y / d); + bp->bats[a_bat].vx -= bp->bats[a_bat].vx / FRICTION; + bp->bats[a_bat].vy -= bp->bats[a_bat].vy / FRICTION; + spin = (bp->bats[i].vang - bp->bats[a_bat].vang) / + (2 * size * SLIPAGE); + bp->bats[i].vang -= spin; + bp->bats[a_bat].vang += spin; + bp->bats[i].spindir = DIR(bp->bats[i].vang); + bp->bats[a_bat].spindir = DIR(bp->bats[a_bat].vang); + if (!bp->bats[i].vang) { + bp->bats[i].spindelay = 1; + bp->bats[i].spindir = 0; + } else + bp->bats[i].spindelay = (int) ((double) M_PI * + bp->avgsize / (ABS(bp->bats[i].vang))) + 1; + if (!bp->bats[a_bat].vang) { + bp->bats[a_bat].spindelay = 1; + bp->bats[a_bat].spindir = 0; + } else + bp->bats[a_bat].spindelay = (int) ((double) M_PI * + bp->avgsize / (ABS(bp->bats[a_bat].vang))) + 1; + return; + } + } + } +} + +static void +drawabat(ModeInfo * mi, batstruct * bat) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + if (bp->pixelmode) { + if (bat->xlast != -1) { + XSetForeground(display, bp->backGC, bp->black); + XFillRectangle(display, window, bp->backGC, + bat->xlast, bat->ylast, bp->xs, bp->ys); + } + XSetForeground(display, bp->backGC, bat->color); + XFillRectangle(display, window, bp->backGC, + bat->x, bat->y, bp->xs, bp->ys); + } else { + XSetForeground(display, bp->backGC, bat->color); +/* PURIFY 4.0.1 on SunOS4 and on Solaris 2 reports a 15985 byte memory leak on + * the next line. */ + (void) XPutImage(display, window, bp->backGC, + bp->images[(bat->orient > ORIENTS / 2) ? + ORIENTS - bat->orient : bat->orient], + 0, 0, bat->x, bat->y, bp->xs, bp->ys); + if (bat->xlast != -1) { + XSetForeground(display, bp->backGC, bp->black); + ERASE_IMAGE(display, window, bp->backGC, + bat->x, bat->y, bat->xlast, bat->ylast, bp->xs, bp->ys); + } + } +} + +static void +movebat(bouncestruct * bp, batstruct * bat) +{ + bat->xlast = bat->x; + bat->ylast = bat->y; + bat->x += bat->vx; + if (bat->x > (bp->width - bp->xs)) { + /* Bounce off the right edge */ + bat->x = 2 * (bp->width - bp->xs) - bat->x; + bat->vx = -bat->vx + bat->vx / FRICTION; + flapbat(bat, 1, &bat->vy, bp->avgsize); + } else if (bat->x < 0) { + /* Bounce off the left edge */ + bat->x = -bat->x; + bat->vx = -bat->vx + bat->vx / FRICTION; + flapbat(bat, -1, &bat->vy, bp->avgsize); + } + bat->vy++; + bat->y += bat->vy; + if (bat->y >= (bp->height + bp->ys)) { /* Don't see bat bounce */ + /* Bounce off the bottom edge */ + bat->y = (bp->height - bp->ys); + bat->vy = -bat->vy + bat->vy / FRICTION; + flapbat(bat, -1, &bat->vx, bp->avgsize); + } /* else if (bat->y < 0) { */ + /* Bounce off the top edge */ + /*bat->y = -bat->y; + bat->vy = -bat->vy + bat->vy / FRICTION; + flapbat(bat, 1, &bat->vx, bp->avgsize); + } */ + if (bat->spindir) { + bat->spincount--; + if (!bat->spincount) { + bat->orient = (bat->spindir + bat->orient) % ORIENTS; + bat->spincount = bat->spindelay; + } + } +} + +static void +flapbat(batstruct * bat, int dir, int *vel, int avgsize) +{ + *vel -= (int) ((*vel + SIGN(*vel * dir) * + bat->spindelay * ORIENTCYCLE / (M_PI * avgsize)) / SLIPAGE); + if (*vel) { + bat->spindir = DIR(*vel * dir); + bat->vang = *vel * ORIENTCYCLE; + bat->spindelay = (int) ((double) M_PI * avgsize / (ABS(bat->vang))) + 1; + } else + bat->spindir = 0; +} + +static int +collide(bouncestruct * bp, int a_bat) +{ + int i, d, x, y; + + for (i = 0; i < a_bat; i++) { + x = (bp->bats[i].x - bp->bats[a_bat].x); + y = (bp->bats[i].y - bp->bats[a_bat].y); + d = (int) sqrt((double) (x * x + y * y)); + if (d < bp->avgsize) + return i; + } + return i; +} + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + if (!bp->cmap && !bp->pixelmode) { + int i; + +#if defined( USE_XPM ) || defined( USE_XPMINC ) + int total = 0; + XpmAttributes attrib; + +#ifndef STANDALONE + if (!fixedColors(mi)) { + bp->cmap = XCreateColormap(display, window, MI_VISUAL(mi), AllocNone); + attrib.colormap = bp->cmap; + reserveColors(mi, bp->cmap, &bp->black); + } else +#endif /* STANDALONE */ + attrib.colormap = MI_COLORMAP(mi); + + attrib.visual = MI_VISUAL(mi); + attrib.depth = MI_DEPTH(mi); + attrib.valuemask = XpmVisual | XpmColormap | XpmDepth; + + if (bp->graphics_format == IS_NONE +#ifndef USE_MONOXPM + && MI_NPIXELS(mi) > 2 +#endif + ) { + for (i = 0; i <= ORIENTS / 2; i++) + if (XpmSuccess != XpmCreateImageFromData(display, pixs[i], + &(bp->images[i]), (XImage **) NULL, &attrib)) + break; + bp->graphics_format = IS_XPM; + total = i; + if (total <= ORIENTS / 2) { /* All or nothing */ + bp->graphics_format = IS_XBM; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stderr, "Full color images could not be loaded.\n"); + for (i = 0; i < total; i++) { + (void) XDestroyImage(bp->images[i]); + bp->images[i] = None; + } + bp->images[total] = None; + if (bp->cmap != None) { + XFreeColormap(display, bp->cmap); + bp->cmap = None; + } + } + } + if (total <= ORIENTS / 2) +#endif + + { + if (!bimages[0].data) /* Only need to do this once */ + for (i = 0; i <= ORIENTS / 2; i++) { + bimages[i].data = (char *) bits[i]; + bimages[i].width = bat0_width; + bimages[i].height = bat0_height; + bimages[i].bytes_per_line = (bat0_width + 7) / 8; + } + for (i = 0; i <= ORIENTS / 2; i++) + bp->images[i] = &(bimages[i]); + } + } + if (bp->cmap != None) { + +#ifndef STANDALONE + setColormap(display, window, bp->cmap, MI_IS_INWINDOW(mi)); +#endif + if (bp->backGC == None) { + XGCValues xgcv; + + xgcv.background = bp->black; + bp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else { + bp->black = MI_BLACK_PIXEL(mi); + bp->backGC = MI_GC(mi); + } + +} + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +static void +free_stuff(Display * display, bouncestruct * bp) +{ + int i; + + if (bp->graphics_format == IS_XPM) { + for (i = 0; i <= ORIENTS / 2; i++) { + if (bp->images[i]) { + (void) XDestroyImage(bp->images[i]); + bp->images[i] = None; + } + } + bp->graphics_format = IS_NONE; + } + if (bp->cmap != None) { + XFreeColormap(display, bp->cmap); + if (bp->backGC != None) { + XFreeGC(display, bp->backGC); + bp->backGC = None; + } + bp->cmap = None; + } else + bp->backGC = None; +} +#endif + +void +init_bat(ModeInfo * mi) +{ + bouncestruct *bp; + int size = MI_SIZE(mi); + int i, tryagain = 0; + + if (bounces == NULL) { + if ((bounces = (bouncestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (bouncestruct))) == NULL) + return; + } + bp = &bounces[MI_SCREEN(mi)]; + +#if defined( USE_XPM ) || defined( USE_XPMINC ) + free_stuff(MI_DISPLAY(mi), bp); +#endif + + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + if (bp->width < 2) + bp->width = 2; + if (bp->height < 2) + bp->height = 2; + bp->restartnum = TIME; + + bp->nbats = MI_COUNT(mi); + if (bp->nbats < -MINBATS) { + /* if bp->nbats is random ... the size can change */ + if (bp->bats != NULL) { + (void) free((void *) bp->bats); + bp->bats = NULL; + } + bp->nbats = NRAND(-bp->nbats - MINBATS + 1) + MINBATS; + } else if (bp->nbats < MINBATS) + bp->nbats = MINBATS; + if (!bp->bats) + bp->bats = (batstruct *) malloc(bp->nbats * sizeof (batstruct)); + if (size == 0 || + MINGRIDSIZE * size > bp->width / 2 || MINGRIDSIZE * size > bp->height) { + if (bp->width > MINGRIDSIZE * bat0_width && + bp->height > MINGRIDSIZE * bat0_height) { + bp->pixelmode = False; + bp->xs = bat0_width; + bp->ys = bat0_height; + } else { + bp->pixelmode = True; + bp->ys = MAX(MINSIZE, MIN(bp->width / 2, bp->height) / MINGRIDSIZE); + bp->xs = 2 * bp->ys; + } + } else { + bp->pixelmode = True; + if (size < -MINSIZE) + bp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(bp->width / 2, bp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + bp->ys = MINSIZE; + else + bp->ys = MIN(size, MAX(MINSIZE, MIN(bp->width / 2, bp->height) / + MINGRIDSIZE)); + bp->xs = 2 * bp->ys; + } + bp->avgsize = (bp->xs + bp->ys) / 2; + + init_stuff(mi); + + i = 0; + while (i < bp->nbats) { + bp->bats[i].vx = ((LRAND() & 1) ? -1 : 1) * (NRAND(MAX_STRENGTH) + 1); + bp->bats[i].x = (bp->bats[i].vx >= 0) ? 0 : bp->width - bp->xs; + bp->bats[i].y = NRAND(bp->height / 2); + if (i == collide(bp, i) || tryagain >= 8) { + if (MI_NPIXELS(mi) > 2) + bp->bats[i].color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + bp->bats[i].color = MI_WHITE_PIXEL(mi); + bp->bats[i].xlast = -1; + bp->bats[i].ylast = 0; + bp->bats[i].spincount = 1; + bp->bats[i].spindelay = 1; + bp->bats[i].vy = ((LRAND() & 1) ? -1 : 1) * NRAND(MAX_STRENGTH); + bp->bats[i].spindir = 0; + bp->bats[i].vang = 0; + bp->bats[i].orient = NRAND(ORIENTS); + i++; + } else + tryagain++; + } + MI_CLEARWINDOWCOLORMAP(mi, bp->backGC, bp->black); +} + +void +draw_bat(ModeInfo * mi) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < bp->nbats; i++) { + drawabat(mi, &bp->bats[i]); + movebat(bp, &bp->bats[i]); + } + for (i = 0; i < bp->nbats; i++) + checkCollision(bp, i); + if (!NRAND(TIME)) /* Put some randomness into the time */ + bp->restartnum--; + if (!bp->restartnum) + init_bat(mi); +} + +void +release_bat(ModeInfo * mi) +{ + if (bounces != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + bouncestruct *bp = &bounces[screen]; + +#if defined( USE_XPM ) || defined( USE_XPMINC ) + free_stuff(MI_DISPLAY(mi), bp); +#endif + + if (bp->bats != NULL) + (void) free((void *) bp->bats); + } + (void) free((void *) bounces); + bounces = NULL; + } +} + +void +refresh_bat(ModeInfo * mi) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + MI_CLEARWINDOWCOLORMAP(mi, bp->backGC, bp->black); +} + +#endif /* MODE_bat */ diff --git a/modes/blank.c b/modes/blank.c new file mode 100644 index 00000000..4ac768ed --- /dev/null +++ b/modes/blank.c @@ -0,0 +1,97 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* blank --- blank screen */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)blank.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver :) OK you probably should not + * use this for xscreensaver but I could not resist. + * 21-Mar-96: Ron Hitchens + * Bonehead alert. Don't blank during password prompting. + * 19-Mar-96: Ron Hitchens + * Changed to activate X server's native screensaver. + * On some devices, this will result in power saving "sleep" + * mode, or video blanking. + * 31-Aug-90: Written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Blank" +#define HACK_INIT init_blank +#define HACK_DRAW draw_blank +#define blank_opts xlockmore_opts +#define DEFAULTS "*delay: 1000000 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +ModeSpecOpt blank_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct blank_description = +{"blank", "init_blank", "draw_blank", "release_blank", + "refresh_blank", "init_blank", NULL, &blank_opts, + 3000000, 1, 1, 1, 64, 1.0, "", + "Shows nothing but a black screen", 0, NULL}; + +#endif + +extern Bool enablesaver; + +void +init_blank(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); + /* Must set PreferBlanking, or XForceScreenSaver won't work */ + if (!MI_IS_INWINDOW(mi) && !MI_IS_INROOT(mi) && enablesaver) + XSetScreenSaver(MI_DISPLAY(mi), 0, 0, PreferBlanking, 0); +} + +/* ARGSUSED */ +void +draw_blank(ModeInfo * mi) +{ + /* Leave the lights on while user types password */ + if (!MI_IS_INWINDOW(mi) && !MI_IS_INROOT(mi) && enablesaver) { + if (MI_IS_ICONIC(mi)) + XForceScreenSaver(MI_DISPLAY(mi), ScreenSaverReset); + else + XForceScreenSaver(MI_DISPLAY(mi), ScreenSaverActive); + } +} + +void +release_blank(ModeInfo * mi) +{ + /* clear screensaver settings, just in case */ + if (!MI_IS_INWINDOW(mi) && !MI_IS_INROOT(mi) && enablesaver) { + XForceScreenSaver(MI_DISPLAY(mi), ScreenSaverReset); + XSetScreenSaver(MI_DISPLAY(mi), 0, 0, 0, 0); + } +} + +void +refresh_blank(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself :) */ +} diff --git a/modes/blot.c b/modes/blot.c new file mode 100644 index 00000000..9d174cdc --- /dev/null +++ b/modes/blot.c @@ -0,0 +1,202 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* blot --- Rorschach's ink blot test */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)blot.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1992 by Jamie Zawinski + * + * 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. + * + * 10-May-97: Compatible with xscreensaver + * 05-Jan-95: patch for Dual-Headed machines from Greg Onufer + * + * 07-Dec-94: now randomly has xsym, ysym, or both. + * 02-Sep-93: xlock version David Bagley + * 1992: xscreensaver version Jamie Zawinski + */ + +/*- + * original copyright + * 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. + */ + +#ifdef STANDALONE +#define PROGCLASS "Blot" +#define HACK_INIT init_blot +#define HACK_DRAW draw_blot +#define blot_opts xlockmore_opts +#define DEFAULTS "*delay: 2000000 \n" \ + "*count: 6 \n" \ + "*cycles: 30 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_blot + +ModeSpecOpt blot_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct blot_description = +{"blot", "init_blot", "draw_blot", "release_blot", + "refresh_blot", "init_blot", NULL, &blot_opts, + 200000, 6, 30, 1, 64, 0.3, "", + "Shows Rorschach's ink blot test", 0, NULL}; + +#endif + +typedef struct { + int width; + int height; + int xmid, ymid; + int offset; + int xsym, ysym; + int size; + int pix; + int count; + XPoint *pointBuffer; + unsigned int pointBufferSize; +} blotstruct; + +static blotstruct *blots = NULL; + +void +init_blot(ModeInfo * mi) +{ + blotstruct *bp; + Display *display = MI_DISPLAY(mi); + + if (blots == NULL) { + if ((blots = (blotstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (blotstruct))) == NULL) + return; + } + bp = &blots[MI_SCREEN(mi)]; + + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + bp->xmid = bp->width / 2; + bp->ymid = bp->height / 2; + + bp->offset = 4; + bp->ysym = (int) LRAND() & 1; + bp->xsym = (bp->ysym) ? (int) LRAND() & 1 : 1; + if (MI_NPIXELS(mi) > 2) + bp->pix = NRAND(MI_NPIXELS(mi)); + if (bp->offset <= 0) + bp->offset = 3; + if (MI_COUNT(mi) < 0) + bp->size = NRAND(-MI_COUNT(mi) + 1); + else + bp->size = MI_COUNT(mi); + + /* Fudge the size so it takes up the whole screen */ + bp->size *= (bp->width / 32 + 1) * (bp->height / 32 + 1); + if (!bp->pointBuffer || bp->pointBufferSize < bp->size * sizeof (XPoint)) { + if (bp->pointBuffer != NULL) + (void) free((void *) bp->pointBuffer); + bp->pointBufferSize = bp->size * sizeof (XPoint); + bp->pointBuffer = (XPoint *) malloc(bp->pointBufferSize); + } + MI_CLEARWINDOW(mi); + XSetForeground(display, MI_GC(mi), MI_WHITE_PIXEL(mi)); + bp->count = 0; +} + +void +draw_blot(ModeInfo * mi) +{ + blotstruct *bp = &blots[MI_SCREEN(mi)]; + XPoint *xp = bp->pointBuffer; + int x, y, k; + + MI_IS_DRAWN(mi) = True; + + if (MI_NPIXELS(mi) > 2) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, bp->pix)); + if (++bp->pix >= MI_NPIXELS(mi)) + bp->pix = 0; + } + x = bp->xmid; + y = bp->ymid; + k = bp->size; + while (k >= 4) { + x += (NRAND(1 + (bp->offset << 1)) - bp->offset); + y += (NRAND(1 + (bp->offset << 1)) - bp->offset); + k--; + xp->x = x; + xp->y = y; + xp++; + if (bp->xsym) { + k--; + xp->x = bp->width - x; + xp->y = y; + xp++; + } + if (bp->ysym) { + k--; + xp->x = x; + xp->y = bp->height - y; + xp++; + } + if (bp->xsym && bp->ysym) { + k--; + xp->x = bp->width - x; + xp->y = bp->height - y; + xp++; + } + } + XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + bp->pointBuffer, (bp->size - k), CoordModeOrigin); + if (++bp->count > MI_CYCLES(mi)) + init_blot(mi); +} + + +void +release_blot(ModeInfo * mi) +{ + if (blots != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + if (blots[screen].pointBuffer != NULL) { + (void) free((void *) blots[screen].pointBuffer); + } + } + (void) free((void *) blots); + blots = NULL; + } +} + +void +refresh_blot(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_blot */ diff --git a/modes/bomb.c b/modes/bomb.c new file mode 100644 index 00000000..4b307e5f --- /dev/null +++ b/modes/bomb.c @@ -0,0 +1,417 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bomb --- temporary screen */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bomb.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1994 by Dave Shield + * + * 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: Made more compatible with xscreensaver :) + * 09-Jan-95: Assorted defines to control various aspects of bomb mode. + * Uncomment, or otherwise define the appropriate line + * to obtain the relevant behaviour, thanks to Dave Shield + * . + * 20-Dec-94: Time patch for multiprocessor machines (ie. Sun10) thanks to + * Nicolas Pioch . + * 1994: Written. Dave Shield Liverpool Computer Science + */ + +/*- + * This mode may have limited appeal. Its good for logging yourself out + * if you do not know if your going to be back. It is no longer to be used + * as a way of forcing users in a lab to logout after locking the screen. + */ + + +#ifdef STANDALONE +#define USE_BOMB +#define PROGCLASS "Bomb" +#define HACK_INIT init_bomb +#define HACK_DRAW draw_bomb +#define bomb_opts xlockmore_opts +#define DEFAULTS "*delay: 1000000 \n" \ + "*count: 10 \n" \ + "*cycles: 20 \n" \ + "*ncolors: 200 \n" \ + "*verbose: False \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_bomb + +ModeSpecOpt bomb_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct bomb_description = +{"bomb", "init_bomb", "draw_bomb", "release_bomb", + "refresh_bomb", "change_bomb", NULL, &bomb_opts, + 100000, 10, 20, 1, 64, 1.0, "", + "Shows a bomb and will autologout after a time", 0, NULL}; + +#endif + +#include + +#if 0 +#define SIMPLE_COUNTDOWN /* Display a simple integer countdown, */ +#endif + /* rather than a "MIN:SEC" format. */ +#define COLOUR_CHANGE /* Display cycles through the colour wheel */ + /* rather than staying red throughout. */ + +#define FULL_COUNT_FONT "-*-*-*-*-*-*-34-*-*-*-*-*-*-*" +#define ICON_COUNT_FONT "-*-*-*-*-*-*-8-*-*-*-*-*-*-*" +#define COUNTDOWN 600 /* No. seconds to lock for */ +#define NDIGITS 4 /* Number of digits in count */ + +#define MAX_DELAY 1000000 /* Max delay between updates */ +#define NAP_TIME 5 /* Sleep between shutdown attempts */ +#define DELTA 10 /* Border around the digits */ +#define RIVET_RADIUS 6 /* Size of detonator 'rivets' */ + +extern XFontStruct *getFont(Display * display); + +typedef struct { + Bool painted; + int width, height; + int x, y; + XPoint loc; + int delta; + int color; + int countdown; + int startcountdown; + int text_width; + int text_ascent; + int text_descent; + int moveok; +} bombstruct; + +static bombstruct *bombs = NULL; + +static XFontStruct *mode_font = None; + +static void +rivet(ModeInfo * mi, int x, int y) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (MI_NPIXELS(mi) > 2) { + XDrawArc(display, MI_WINDOW(mi), gc, x, y, + 2 * RIVET_RADIUS, 2 * RIVET_RADIUS, 270 * 64, 90 * 64); + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XDrawArc(display, MI_WINDOW(mi), gc, x, y, + 2 * RIVET_RADIUS, 2 * RIVET_RADIUS, 70 * 64, 130 * 64); + } else + XDrawArc(display, MI_WINDOW(mi), gc, x, y, + 2 * RIVET_RADIUS, 2 * RIVET_RADIUS, 0, 360 * 64); +} + +static void +detonator(ModeInfo * mi, int draw) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + bombstruct *bp = &bombs[MI_SCREEN(mi)]; + int b_width, b_height; + + b_width = bp->width / 2; + b_height = bp->height / 3; + if (draw) { +#ifdef SOLARIS2 + /* + * if this is not done the rectangle is sometimes messed up on + * Solaris2 with 24 bit TrueColor (Ultra2) + */ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + XFillRectangle(display, MI_WINDOW(mi), gc, + bp->loc.x, bp->loc.y, b_width, b_height); +#endif + if (MI_NPIXELS(mi) > 2) + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), + MI_PIXEL(mi, bp->color)); + else + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WHITE_PIXEL(mi)); + /*XSetForeground(display, gc, allocPixel(display, MI_COLORMAP(mi), + "grey", "white")); */ + XFillRectangle(display, MI_WINDOW(mi), gc, + bp->loc.x, bp->loc.y, b_width, b_height); + + /* + * If a full size screen (and colour), + * 'rivet' the box to it + */ + if (bp->width > 160 && bp->height > 160) { + rivet(mi, bp->loc.x + RIVET_RADIUS, bp->loc.y + RIVET_RADIUS); + rivet(mi, bp->loc.x + RIVET_RADIUS, + bp->loc.y + b_height - 3 * RIVET_RADIUS); + rivet(mi, bp->loc.x + b_width - 3 * RIVET_RADIUS, + bp->loc.y + RIVET_RADIUS); + rivet(mi, bp->loc.x + b_width - 3 * RIVET_RADIUS, + bp->loc.y + b_height - 3 * RIVET_RADIUS); + } + } else { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + XFillRectangle(display, MI_WINDOW(mi), gc, + bp->loc.x, bp->loc.y, b_width, b_height); + } +} + +void +init_bomb(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + bombstruct *bp; + char number[NDIGITS + 2]; + + if (bombs == NULL) { + if ((bombs = (bombstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (bombstruct))) == NULL) + return; + } + bp = &bombs[MI_SCREEN(mi)]; + + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } + /* Set up text font */ + if (bp->width > 256 && bp->height > 256) { /* Full screen */ + mode_font = XLoadQueryFont(display, FULL_COUNT_FONT); + bp->delta = DELTA; + } else { /* icon window */ + mode_font = XLoadQueryFont(display, ICON_COUNT_FONT); + bp->delta = 2; + } + if (mode_font == None) + mode_font = getFont(display); + if (mode_font != None) + XSetFont(display, gc, mode_font->fid); + +#ifdef SIMPLE_COUNTDOWN + (void) sprintf(number, "%0*d", NDIGITS, 0); +#else + (void) sprintf(number, "%.*s:**", NDIGITS - 2, "*******"); +#endif + if (mode_font != None) + bp->text_width = XTextWidth(mode_font, number, NDIGITS + 1); + else + bp->text_width = 8; + bp->text_ascent = mode_font->max_bounds.ascent; + bp->text_descent = mode_font->max_bounds.descent; + +#ifndef STANDALONE + if (MI_DELAY(mi) > MAX_DELAY) + MI_DELAY(mi) = MAX_DELAY; /* Time cannot move slowly */ +#endif /* STANDALONE */ + if (MI_COUNT(mi) < 1) + bp->startcountdown = 1; /* Do not want an instantaneous logout */ + bp->startcountdown = MI_COUNT(mi); + bp->startcountdown *= 60; +#if 0 /* Stricter if uncommented but people do not have to run bomb */ + if (bp->startcountdown > COUNTDOWN) + bp->startcountdown = COUNTDOWN; +#endif + if (bp->countdown == 0) /* <--Stricter if uncommented */ + bp->countdown = (int) (time((time_t *) NULL) + bp->startcountdown); + /* Detonator Primed */ + + MI_CLEARWINDOW(mi); + bp->painted = False; + + /* + * Draw the graphics + * Very simple - detonator box with countdown + * + * ToDo: Improve the graphics + * (e.g. stick of dynamite, with burning fuse?) + */ + bp->loc.x = NRAND(bp->width / 2); + bp->loc.y = NRAND(bp->height * 3 / 5); + bp->x = bp->loc.x + bp->width / 4 - (bp->text_width / 2); + bp->y = bp->loc.y + bp->height / 5; /* Central-ish */ + if (MI_NPIXELS(mi) > 2) + bp->color = NRAND(MI_NPIXELS(mi)); + detonator(mi, 1); + bp->moveok = 0; +} + + /* + * Game Over + */ +static void +explode(ModeInfo * mi) +{ + bombstruct *bp = &bombs[MI_SCREEN(mi)]; + char buff[NDIGITS + 2]; + extern void logoutUser(Display * display); + +#ifdef SunCplusplus +/* #include */ + extern int kill(pid_t, int); + +#else +#if 0 + extern int kill(int, int); + +#endif +#endif + + /* + * ToDo: + * Improve the graphics - some sort of explosion? + * (Will need to involve the main X event loop) + */ +#ifdef SIMPLE_COUNTDOWN + (void) sprintf(buff, "%.*s", NDIGITS, "*********"); +#else + (void) sprintf(buff, "%.*s:**", NDIGITS - 2, "*******"); +#endif + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, 1)); + (void) XDrawString(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + bp->x, bp->y, buff, NDIGITS); + + (void) fprintf(stderr, "BOOM!!!!\n"); +#ifndef DEBUG + if (MI_IS_INWINDOW(mi) || MI_IS_INROOT(mi) || + MI_IS_NOLOCK(mi) || MI_IS_DEBUG(mi)) + (void) kill((int) getpid(), SIGTERM); + else if ((int) getuid() == 0) { /* Do not try to logout root! */ + bp->countdown = 0; + init_bomb(mi); + } else + logoutUser(MI_DISPLAY(mi)); +#else + (void) kill(getpid(), SIGTERM); +#endif +} + +void +draw_bomb(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + bombstruct *bp = &bombs[MI_SCREEN(mi)]; + char number[NDIGITS + 2]; + unsigned long crayon; + time_t countleft; + + countleft = (bp->countdown - time((time_t *) NULL)); + if (countleft <= 0) + explode(mi); /* Bye, bye.... */ + else { + bp->painted = True; +#ifdef SIMPLE_COUNTDOWN + (void) sprintf(number, "%0*d", NDIGITS, (int) countleft); +#else + (void) sprintf(number, "%0*d:%02d", NDIGITS - 2, + (int) countleft / 60, (int) countleft % 60); +#endif + + /* Blank out the previous number .... */ + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, MI_WINDOW(mi), gc, + bp->x - bp->delta, + (bp->y - bp->text_ascent) - bp->delta, + bp->text_width + (2 * bp->delta), + (bp->text_ascent + bp->text_descent) + (2 * bp->delta)); + + /* ... and count down */ + if (MI_NPIXELS(mi) <= 2) + crayon = MI_WHITE_PIXEL(mi); + else +#ifdef COLOUR_CHANGE /* Blue to red */ + crayon = MI_PIXEL(mi, countleft * MI_NPIXELS(mi) / bp->startcountdown); +#else + crayon = MI_PIXEL(mi, 1); +#endif + if (!(countleft % 60)) { + if (bp->moveok) { + detonator(mi, 0); + bp->loc.x = NRAND(bp->width / 2); + bp->loc.y = NRAND(bp->height * 3 / 5); + bp->x = bp->loc.x + bp->width / 4 - (bp->text_width / 2); + bp->y = bp->loc.y + bp->height / 5; /* Central-ish */ + if (MI_NPIXELS(mi) > 2) + bp->color = NRAND(MI_NPIXELS(mi)); + detonator(mi, 1); + bp->moveok = 0; + } + } else { + bp->moveok = 1; + } + XSetForeground(display, gc, crayon); + (void) XDrawString(display, MI_WINDOW(mi), gc, bp->x, bp->y, + number, strlen(number)); + } +} + +void +release_bomb(ModeInfo * mi) +{ + if (bombs != NULL) { + (void) free((void *) bombs); + bombs = NULL; + } + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } +} + +void +refresh_bomb(ModeInfo * mi) +{ + bombstruct *bp = &bombs[MI_SCREEN(mi)]; + + if (bp->painted) { + MI_CLEARWINDOW(mi); + detonator(mi, 1); + } +} + +void +change_bomb(ModeInfo * mi) +{ + bombstruct *bp = &bombs[MI_SCREEN(mi)]; + + detonator(mi, 0); + bp->painted = False; + bp->loc.x = NRAND(bp->width / 2); + bp->loc.y = NRAND(bp->height * 3 / 5); + bp->x = bp->loc.x + bp->width / 4 - (bp->text_width / 2); + bp->y = bp->loc.y + bp->height / 5; /* Central-ish */ + if (MI_NPIXELS(mi) > 2) + bp->color = NRAND(MI_NPIXELS(mi)); + detonator(mi, 1); + bp->moveok = 0; +} + +#endif /* MODE_bomb */ diff --git a/modes/bouboule.c b/modes/bouboule.c new file mode 100644 index 00000000..3c71fe9e --- /dev/null +++ b/modes/bouboule.c @@ -0,0 +1,850 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bouboule --- glob of spheres twisting and changing size */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bouboule.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright 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. + * + * 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: + * 15-May-97: jwz@jwz.org: turned into a standalone program. + * 04-Sep-96: Added 3d support Henrik Theiling + * 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. + * + * Sort of starfield with a 3D engine. 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. + * + * Use: batchcount is the number of stars. + * cycles is the maximum size for a star + * + * 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 "*delay: 10000 \n" \ + "*count: 100 \n" \ + "*size: 15 \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" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_bouboule + +ModeSpecOpt bouboule_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct bouboule_description = +{"bouboule", "init_bouboule", "draw_bouboule", "release_bouboule", + "refresh_bouboule", "init_bouboule", NULL, &bouboule_opts, + 10000, 100, 1, 15, 64, 1.0, "", + "Shows Mimi's bouboule of moving stars", 0, NULL}; + +#endif + +#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 +#if HAVE_SYS_TIME_H +#include +#else +#if HAVE_SYS_SELECT_H +#include +#endif +#endif +#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 +#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_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + + /* use the right `black' pixel values: */ + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(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_COUNT(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_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_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_IS_USE3D(mi)) + arcleft = &(sp->xarcleft[i]); +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + oarc = &(sp->oldxarc[i]); + if (MI_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, but offscreen */ + arc->x = MI_WIDTH(mi); + arc->y = MI_HEIGHT(mi); + if (MI_IS_USE3D(mi)) { + arcleft->x = MI_WIDTH(mi); + arcleft->y = MI_HEIGHT(mi); + } +#if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1)) + oarc->x = MI_WIDTH(mi); + oarc->y = MI_HEIGHT(mi); + if (MI_IS_USE3D(mi)) { + oarcleft->x = MI_WIDTH(mi); + oarcleft->y = MI_HEIGHT(mi); + } +#endif + arc->width = 2 + star->size; + arc->height = 2 + star->size; + if (MI_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_IS_USE3D(mi)) { + oarcleft->width = 2 + star->size; + oarcleft->height = 2 + star->size; + } +#endif + + arc->angle1 = 0; + arc->angle2 = 360 * 64; + if (MI_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_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_IS_USE3D(mi) && MI_NPIXELS(mi) > 2) + sp->color = MI_PIXEL(mi, sp->colorp); + else + sp->color = MI_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 + + MI_IS_DRAWN(mi) = True; + +#if ((USEOLDXARCS == 0) || (ADAPT_ERASE == 1)) + if (MI_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_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_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_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_IS_USE3D(mi)) { + arcleft->x -= star->size; + arcleft->y -= star->size; + } + } + } + + /* First, we erase the previous starfield */ + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_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_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_IS_USE3D(mi)) + XFillArcs(display, window, gc, + sp->oldxarcleft, sp->NbStars); + } else { + long usec; + + if (sp->hasbeenchecked > ADAPT_CHECKS) { + GETTIMEOFDAY(&tv1); + XFillRectangle(display, window, gc, + x_1, y_1, x_2, y_2); + GETTIMEOFDAY(&tv2); + 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 { + GETTIMEOFDAY(&tv1); + XFillArcs(display, window, gc, + sp->oldxarc, sp->NbStars); + if (MI_IS_USE3D(mi)) + XFillArcs(display, window, gc, + sp->oldxarcleft, sp->NbStars); + GETTIMEOFDAY(&tv2); + 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_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_IS_USE3D(mi)) { + if (MI_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_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_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_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_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) +{ + /* use the right `black' pixel values: */ + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } + +} + +#endif /* MODE_bouboule */ diff --git a/modes/bounce.c b/modes/bounce.c new file mode 100644 index 00000000..4e305335 --- /dev/null +++ b/modes/bounce.c @@ -0,0 +1,598 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bounce --- bouncing footballs */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bounce.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1988 by Sun Microsystems + * + * 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 + * 01-Apr-97: Curtis Larsen + * The modification is only for the inroot mode. It causes the balls to see + * children of the root window and bounce off of the sides of them. New + * windows are only recognized after every init_bounce, because fvwm did not + * like xlock setting SubstructureNotifyMask on root. I did not fix the + * initial placement of balls yet, so they can start out underneath windows. + * 18-Sep-95: tinkered with it to look like bat.c . + * 15-Jul-94: cleaned up in time for the final match. + * 4-Apr-94: spinning multiple ball version + * (I got a lot of help from with the physics of ball to ball + * collision looking at the source of xpool from Ismail ARIT + * + * 22-Mar-94: got rid of flashing problem by only erasing parts of the image + * that will not be in the next image. + * 2-Sep-93: xlock version David Bagley + * 1986: Sun Microsystems + */ + +/*- + * original copyright + * ************************************************************************** + * 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. + * *************************************************************************** + */ + +/*- + * Open for improvement: + * include different balls (size and mass) + * how about be real crazy and put in an American/Australian football? + * should only have 1 bitmap for ball, the others should be generated + * as 90 degree rotations. + * multiscreen interaction + */ + +#ifdef STANDALONE +#define PROGCLASS "Bounce" +#define HACK_INIT init_bounce +#define HACK_DRAW draw_bounce +#define bounce_opts xlockmore_opts +#define DEFAULTS "*delay: 5000 \n" \ + "*count: -10 \n" \ + "*size: 0 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_bounce + +ModeSpecOpt bounce_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct bounce_description = +{"bounce", "init_bounce", "draw_bounce", "release_bounce", + "refresh_bounce", "init_bounce", NULL, &bounce_opts, + 5000, -10, 1, 0, 64, 1.0, "", + "Shows bouncing footballs", 0, NULL}; + +#endif + +#include "bitmaps/bounce-0.xbm" +#include "bitmaps/bounce-1.xbm" +#include "bitmaps/bounce-2.xbm" +#include "bitmaps/bounce-3.xbm" +#include "bitmaps/bounce-mask.xbm" +#define BALLBITS(n,w,h)\ + bp->pixmaps[bp->init_orients++]=\ + XCreateBitmapFromData(display,window,(char *)n,w,h) + +#define MAX_STRENGTH 24 +#define FRICTION 24 +#define PENETRATION 0.3 +#define SLIPAGE 4 +#define TIME 32 +#define MINBALLS 1 +#define MINSIZE 1 +#define MINGRIDSIZE 6 + +#define ORIENTS 4 +#define ORIENTCYCLE 16 +#define CCW 1 +#define CW (ORIENTS-1) +#define DIR(x) (((x)>=0)?CCW:CW) +#define SIGN(x) (((x)>=0)?1:-1) + +typedef struct { + int x, y; + int width, height; +} ballwindow; + +typedef struct { + int x, y, xlast, ylast, orientlast; + int spincount, spindelay, spindir, orient; + int vx, vy, vang; + unsigned long color; +} ballstruct; + +typedef struct { + int width, height; + int nballs; + int xs, ys, avgsize; + int restartnum; + int pixelmode; + ballstruct *balls; + GC stippledGC; + Pixmap pixmaps[ORIENTS + 1]; + int init_orients; + int nwindow; + ballwindow *windows; +} bouncestruct; + +static bouncestruct *bounces = NULL; + +static void +checkCollision(bouncestruct * bp, int aball) +{ + int i, amount, spin, d, size; + double x, y; + + for (i = 0; i < bp->nballs; i++) { + if (i != aball) { + x = (double) (bp->balls[i].x - bp->balls[aball].x); + y = (double) (bp->balls[i].y - bp->balls[aball].y); + d = (int) sqrt(x * x + y * y); + size = bp->avgsize; + if (d > 0 && d < size) { + amount = size - d; + if (amount > PENETRATION * size) + amount = (int) (PENETRATION * size); + bp->balls[i].vx += (int) ((double) amount * x / d); + bp->balls[i].vy += (int) ((double) amount * y / d); + bp->balls[i].vx -= bp->balls[i].vx / FRICTION; + bp->balls[i].vy -= bp->balls[i].vy / FRICTION; + bp->balls[aball].vx -= (int) ((double) amount * x / d); + bp->balls[aball].vy -= (int) ((double) amount * y / d); + bp->balls[aball].vx -= bp->balls[aball].vx / FRICTION; + bp->balls[aball].vy -= bp->balls[aball].vy / FRICTION; + spin = (bp->balls[i].vang - bp->balls[aball].vang) / + (2 * size * SLIPAGE); + bp->balls[i].vang -= spin; + bp->balls[aball].vang += spin; + bp->balls[i].spindir = DIR(bp->balls[i].vang); + bp->balls[aball].spindir = DIR(bp->balls[aball].vang); + if (!bp->balls[i].vang) { + bp->balls[i].spindelay = 1; + bp->balls[i].spindir = 0; + } else + bp->balls[i].spindelay = (int) ((double) M_PI * + bp->avgsize / (ABS(bp->balls[i].vang))) + 1; + if (!bp->balls[aball].vang) { + bp->balls[aball].spindelay = 1; + bp->balls[aball].spindir = 0; + } else + bp->balls[aball].spindelay = (int) ((double) M_PI * + bp->avgsize / (ABS(bp->balls[aball].vang))) + 1; + return; + } + } + } +} + +static void +drawball(ModeInfo * mi, ballstruct * ball) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + if (bp->pixelmode) { + if (ball->xlast != -1) { + XSetForeground(display, MI_GC(mi), MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, MI_GC(mi), + ball->xlast, ball->ylast, bp->xs, bp->ys); + } + XSetForeground(display, MI_GC(mi), ball->color); + XFillRectangle(display, window, MI_GC(mi), + ball->x, ball->y, bp->xs, bp->ys); + } else { + if (ball->xlast != -1) { + XSetForeground(display, bp->stippledGC, MI_BLACK_PIXEL(mi)); + XSetStipple(display, bp->stippledGC, bp->pixmaps[ORIENTS]); + XSetFillStyle(display, bp->stippledGC, FillStippled); + XSetTSOrigin(display, bp->stippledGC, ball->xlast, ball->ylast); +#ifdef FLASH + XFillRectangle(display, window, bp->stippledGC, + ball->xlast, ball->ylast, bp->xs, bp->ys); +#else + ERASE_IMAGE(display, window, bp->stippledGC, ball->x, ball->y, + ball->xlast, ball->ylast, bp->xs, bp->ys); +#endif + } + XSetTSOrigin(display, bp->stippledGC, ball->x, ball->y); + XSetForeground(display, bp->stippledGC, ball->color); + XSetStipple(display, bp->stippledGC, bp->pixmaps[ball->orient]); +#ifdef FLASH + XSetFillStyle(display, bp->stippledGC, FillStippled); +#else + XSetFillStyle(display, bp->stippledGC, FillOpaqueStippled); +#endif + XFillRectangle(display, window, bp->stippledGC, + ball->x, ball->y, bp->xs, bp->ys); + XFlush(display); + } +} + +static void +spinball(ballstruct * ball, int dir, int *vel, int avgsize) +{ + *vel -= (int) ((*vel + SIGN(*vel * dir) * + ball->spindelay * ORIENTCYCLE / (M_PI * avgsize)) / SLIPAGE); + if (*vel) { + ball->spindir = DIR(*vel * dir); + ball->vang = *vel * ORIENTCYCLE; + ball->spindelay = (int) ((double) M_PI * avgsize / (ABS(ball->vang))) + 1; + } else + ball->spindir = 0; +} + +#define BETWEEN(x, xmin, xmax) (((x) >= (xmin)) && ((x) <= (xmax))) +static void +hit_left_wall(ModeInfo * mi, ballstruct * ball, + int ytop, int height, int x, int side) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + if ((ball->x <= x) && ((ball->xlast >= x) || side) && + BETWEEN(ball->y, ytop - bp->ys, ytop + height)) { + /* Bounce off the wall to the left of the ball */ + + ball->x = 2 * x - ball->x; + ball->vx = (ball->vx - (ball->vx * FRICTION)) / FRICTION; + spinball(ball, -1, &ball->vy, bp->avgsize); + } +} + +static void +hit_right_wall(ModeInfo * mi, ballstruct * ball, + int ytop, int height, int x, int side) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + x -= bp->xs; /* account for ball width */ + + if ((ball->x >= x) && ((ball->xlast <= x) || side) && + BETWEEN(ball->y, ytop - bp->ys, ytop + height)) { + /* Bounce off the wall to the right of the ball */ + + ball->x = 2 * x - ball->x; + ball->vx = (ball->vx - (ball->vx * FRICTION)) / FRICTION; + spinball(ball, 1, &ball->vy, bp->avgsize); + } +} + +static void +hit_top_wall(bouncestruct * bp, ballstruct * ball, int xleft, int width, int y, int side) +{ + if ((ball->y <= y) && ((ball->ylast >= y) || side) && + BETWEEN(ball->x, xleft - bp->xs, xleft + width)) { /* Bounce off the wall to the top of the ball */ + ball->y = 2 * y - ball->y; + /* HACK to make it look better for iconified mode */ + if (y == 0) { + ball->vy = 0; + } else { + ball->vy = (ball->vy - (FRICTION * ball->vy)) / FRICTION; + } + spinball(ball, 1, &ball->vx, bp->avgsize); + } +} + + +static void +hit_bottom_wall(bouncestruct * bp, ballstruct * ball, int xleft, int width, int y, int side) +{ + y -= bp->ys; /* account for ball height */ + + if ((ball->y >= y) && ((ball->ylast <= y) || side) && + BETWEEN(ball->x, xleft - bp->xs, xleft + width)) { /* Bounce off the wall to the bottom of the ball */ + ball->y = y; + ball->vy = (ball->vy - (FRICTION * ball->vy)) / FRICTION; + spinball(ball, -1, &ball->vx, bp->avgsize); + } +} + +static void +moveball(ModeInfo * mi, ballstruct * ball) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + int i; + ballwindow *win; + + ball->xlast = ball->x; + ball->ylast = ball->y; + ball->orientlast = ball->orient; + ball->x += ball->vx; + + for (i = 0; i < bp->nwindow; i++) { + win = &bp->windows[i]; + + hit_left_wall(mi, ball, win->y, win->height, win->x + win->width, 0); + hit_right_wall(mi, ball, win->y, win->height, win->x, 0); + } + hit_right_wall(mi, ball, 0, bp->height, bp->width, 1); + hit_left_wall(mi, ball, 0, bp->height, 0, 1); + + ball->vy++; + ball->y += ball->vy; + + for (i = 0; i < bp->nwindow; i++) { + win = &bp->windows[i]; + + hit_top_wall(bp, ball, win->x, win->width, win->y + win->height, 0); + hit_bottom_wall(bp, ball, win->x, win->width, win->y, 0); + } + hit_top_wall(bp, ball, 0, bp->width, 0, 1); + hit_bottom_wall(bp, ball, 0, bp->width, bp->height, 1); + + if (ball->spindir) { + ball->spincount--; + if (!ball->spincount) { + ball->orient = (ball->spindir + ball->orient) % ORIENTS; + ball->spincount = ball->spindelay; + } + } +} + +static int +collide(bouncestruct * bp, int aball) +{ + int i, d, x, y; + + for (i = 0; i < aball; i++) { + x = (bp->balls[i].x - bp->balls[aball].x); + y = (bp->balls[i].y - bp->balls[aball].y); + d = (int) sqrt((double) (x * x + y * y)); + if (d < bp->avgsize) + return i; + } + return i; +} + +static void +bounce_windows(ModeInfo * mi, bouncestruct * bs) +{ + Window root, parent, *children; + unsigned int nchildren; + int i; + int n; + + if (!MI_IS_INROOT(mi)) { + bs->nwindow = 0; + return; + } + if (XQueryTree(MI_DISPLAY(mi), MI_WINDOW(mi), + &root, &parent, &children, &nchildren) == 0) { /* failure */ + bs->nwindow = 0; + return; + } + bs->nwindow = nchildren; + if (bs->windows != NULL) { + (void) free((void *) bs->windows); + } + bs->windows = (ballwindow *) malloc(bs->nwindow * sizeof (ballwindow)); + for (n = 0, i = 0; i < bs->nwindow; i++) { + XWindowAttributes att; + +/*- + May give + X Error of failed request: BadWindow (invalid Window parameter) + Major opcode of failed request: 3 (X_GetWindowAttributes) + */ + if (XGetWindowAttributes(MI_DISPLAY(mi), children[i], &att) == 0) { /* failure */ + bs->nwindow = 0; + return; + } + if ((att.x < 0) || (att.x > bs->width) || + (att.y < 0) || (att.y > bs->height) || +#if defined(__cplusplus) || defined(c_plusplus) + (att.c_class != InputOutput) || +#else + (att.class != InputOutput) || +#endif + (att.map_state != IsViewable)) { + continue; + } + bs->windows[n].x = att.x; + bs->windows[n].y = att.y; + bs->windows[n].width = att.width; + bs->windows[n].height = att.height; + n++; + } + bs->nwindow = n; + XFree((caddr_t) children); + return; +} + +void +init_bounce(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int size = MI_SIZE(mi); + bouncestruct *bp; + XGCValues gcv; + int i, tryagain = 0; + + if (bounces == NULL) { + if ((bounces = (bouncestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (bouncestruct))) == NULL) + return; + } + bp = &bounces[MI_SCREEN(mi)]; + + if (!bp->stippledGC) { + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + if ((bp->stippledGC = XCreateGC(display, window, + GCForeground | GCBackground, &gcv)) == None) + return; + } + if (!bp->init_orients) { + BALLBITS(bounce0_bits, bounce0_width, bounce0_height); + BALLBITS(bounce1_bits, bounce1_width, bounce1_height); + BALLBITS(bounce2_bits, bounce2_width, bounce2_height); + BALLBITS(bounce3_bits, bounce3_width, bounce3_height); + BALLBITS(bouncemask_bits, bouncemask_width, bouncemask_height); + } + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + if (bp->width < 2) + bp->width = 2; + if (bp->height < 2) + bp->height = 2; + bp->restartnum = TIME; + bounce_windows(mi, bp); + bp->nballs = MI_COUNT(mi); + if (bp->nballs < -MINBALLS) { + /* if bp->nballs is random ... the size can change */ + if (bp->balls != NULL) { + (void) free((void *) bp->balls); + bp->balls = NULL; + } + bp->nballs = NRAND(-bp->nballs - MINBALLS + 1) + MINBALLS; + } else if (bp->nballs < MINBALLS) + bp->nballs = MINBALLS; + if (!bp->balls) + bp->balls = (ballstruct *) malloc(bp->nballs * sizeof (ballstruct)); + if (size == 0 || + MINGRIDSIZE * size > bp->width || MINGRIDSIZE * size > bp->height) { + if (bp->width > MINGRIDSIZE * bounce0_width && + bp->height > MINGRIDSIZE * bounce0_height) { + bp->pixelmode = False; + bp->xs = bounce0_width; + bp->ys = bounce0_height; + } else { + bp->pixelmode = True; + bp->ys = MAX(MINSIZE, MIN(bp->width, bp->height) / MINGRIDSIZE); + bp->xs = bp->ys; + } + } else { + bp->pixelmode = True; + if (size < -MINSIZE) + bp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(bp->width, bp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + bp->ys = MINSIZE; + else + bp->ys = MIN(size, MAX(MINSIZE, MIN(bp->width, bp->height) / + MINGRIDSIZE)); + bp->xs = bp->ys; + } + bp->avgsize = (bp->xs + bp->ys) / 2; + i = 0; + while (i < bp->nballs) { + bp->balls[i].vx = ((LRAND() & 1) ? -1 : 1) * (NRAND(MAX_STRENGTH) + 1); + bp->balls[i].x = (bp->balls[i].vx >= 0) ? 0 : bp->width - bp->xs; + bp->balls[i].y = NRAND(bp->height / 2); + if (i == collide(bp, i) || tryagain >= 8) { + if (MI_NPIXELS(mi) > 2) + bp->balls[i].color = + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + bp->balls[i].color = MI_WHITE_PIXEL(mi); + bp->balls[i].xlast = -1; + bp->balls[i].ylast = 0; + bp->balls[i].orientlast = 0; + bp->balls[i].spincount = 1; + bp->balls[i].spindelay = 1; + bp->balls[i].vy = ((LRAND() & 1) ? -1 : 1) * NRAND(MAX_STRENGTH); + bp->balls[i].spindir = 0; + bp->balls[i].vang = 0; + bp->balls[i].orient = NRAND(ORIENTS); + i++; + } else + tryagain++; + } + MI_CLEARWINDOW(mi); +} + +void +draw_bounce(ModeInfo * mi) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < bp->nballs; i++) { + drawball(mi, &bp->balls[i]); + moveball(mi, &bp->balls[i]); + } + for (i = 0; i < bp->nballs; i++) + checkCollision(bp, i); + if (!NRAND(TIME)) /* Put some randomness into the time */ + bp->restartnum--; + if (!bp->restartnum) + init_bounce(mi); +} + +void +release_bounce(ModeInfo * mi) +{ + if (bounces != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + bouncestruct *bp = &bounces[screen]; + int bits; + + if (bp->balls != NULL) + (void) free((void *) bp->balls); + if (bp->stippledGC != NULL) + XFreeGC(MI_DISPLAY(mi), bp->stippledGC); + for (bits = 0; bits < bp->init_orients; bits++) + XFreePixmap(MI_DISPLAY(mi), bp->pixmaps[bits]); + } + (void) free((void *) bounces); + bounces = NULL; + } +} + +void +refresh_bounce(ModeInfo * mi) +{ + bouncestruct *bp = &bounces[MI_SCREEN(mi)]; + + MI_CLEARWINDOW(mi); + bounce_windows(mi, bp); +} + +#endif /* MODE_bounce */ diff --git a/modes/braid.c b/modes/braid.c new file mode 100644 index 00000000..b335d342 --- /dev/null +++ b/modes/braid.c @@ -0,0 +1,445 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/*- + * braid --- random braids around a circle and then changes the color in + * a rotational pattern + */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)braid.c 4.07 97/11/24 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: Jamie Zawinski compatible with xscreensaver + * 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 "*delay: 1000 \n" \ + "*count: 15 \n" \ + "*cycles: 100 \n" \ + "*size: -7 \n" \ + "*ncolors: 64 \n" +#define UNIFORM_COLORS +#include "xlockmore.h" +#else /* STANDALONE */ +#include "xlock.h" + +#endif /* STANDALONE */ + +#ifdef MODE_braid + +ModeSpecOpt braid_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct braid_description = +{"braid", "init_braid", "draw_braid", "release_braid", + "refresh_braid", "init_braid", NULL, &braid_opts, + 1000, 15, 100, 1, 64, 1.0, "", + "Shows random braids and knots", 0, NULL}; + +#endif + +#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 linewidth; + 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) +{ + 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_WIDTH(mi) / 2; + braid->center_y = MI_HEIGHT(mi) / 2; + braid->age = 0; + + /* jwz: go in the other direction sometimes. */ + braid->color_direction = ((LRAND() & 1) ? 1 : -1); + + MI_CLEARWINDOW(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_COUNT(mi) < MINSTRANDS) + braid->nstrands = MINSTRANDS; + else + braid->nstrands = INTRAND(MINSTRANDS, + MAX(MIN(MIN(MAXSTRANDS, MI_COUNT(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); + + braid->linewidth = MI_SIZE(mi); + + if (braid->linewidth < 0) + braid->linewidth = NRAND(-braid->linewidth) + 1; + + 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)]; + int num_points = 500; + float 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; + + MI_IS_DRAWN(mi) = True; + + XSetLineAttributes(display, MI_GC(mi), braid->linewidth, + LineSolid, + (braid->linewidth <= 3 ? CapButt : CapRound), + JoinMiter); + + theta = (2.0 * M_PI) / (float) (braid->braidlength); + t_inc = (2.0 * M_PI) / (float) num_points; + color_inc = (float) MI_NPIXELS(mi) * braid->color_direction / + (float) num_points; + braid->startcolor += SPINRATE * color_inc; + if (((int) 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 (((int) color) >= 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 (((int) color_use) >= MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + while (((int) color_use) < 0) + color_use += (float) MI_NPIXELS(mi); + } +#endif +#ifdef COLORROUND + if (MI_NPIXELS(mi) > 2) { + color_use += SPINRATE * color_inc; + while (((int) color_use) >= 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_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 (((int) color_use) >= MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + while (((int) color_use) < 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_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 (((int) color_use) >= MI_NPIXELS(mi)) + color_use -= (float) MI_NPIXELS(mi); + while (((int) color_use) < 0) + color_use += (float) MI_NPIXELS(mi); + } +#endif +#ifdef COLORROUND + if (MI_NPIXELS(mi) > 2) { + color_use += SPINRATE * color_inc; + while (((int) color_use) >= 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_WHITE_PIXEL(mi)); + + XDrawLine(display, window, MI_GC(mi), + (int) (x_1), (int) (y_1), (int) (x_2), (int) (y_2)); + } + } + } + } + XSetLineAttributes(display, MI_GC(mi), 1, LineSolid, CapNotLast, JoinRound); + + 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) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_braid */ diff --git a/modes/bubble.c b/modes/bubble.c new file mode 100644 index 00000000..8af7791d --- /dev/null +++ b/modes/bubble.c @@ -0,0 +1,286 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bubble --- simple exploding bubbles */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bubble.c 4.07 98/01/08 xlockmore"; + +#endif + +/*- + * Copyright (c) 1998 by Charles Vidal + * http://www.chez.com/vidalc + * and David Bagley + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-Jan-98: Written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Bubble" +#define HACK_INIT init_bubble +#define HACK_DRAW draw_bubble +#define bubble_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: 25 \n" \ + "*size: 100 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_bubble + +#define DEF_BOIL "False" +static Bool boil; + +static XrmOptionDescRec opts[] = +{ + {"-boil", ".bubble.boil", XrmoptionNoArg, (caddr_t) "on"}, + {"+boil", ".bubble.boil", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & boil, "boil", "Boil", DEF_BOIL, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+boil", "turn on/off boil"} +}; + +ModeSpecOpt bubble_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct bubble_description = +{"bubble", "init_bubble", "draw_bubble", "release_bubble", + "refresh_bubble", "init_bubble", NULL, &bubble_opts, + 100000, 25, 1, 100, 64, 0.6, "", + "Shows popping bubbles", 0, NULL}; + +#endif + +typedef struct { + int x, y, life; +} bubbletype; + +#define MINSIZE 20 +#define MINBUBBLES 1 + +typedef struct { + int direction; + int color; + int width, height; + int nbubbles; + Bool boil; + bubbletype *bubble; + int d; + Pixmap dbuf; + GC dbuf_gc; +} bubblestruct; + +static bubblestruct *bubbles = NULL; + +static void +updateBubble(ModeInfo * mi, int i) +{ + bubblestruct *bp = &bubbles[MI_SCREEN(mi)]; + int x, diameter, x4, y4, diameter4; + + if (bp->bubble[i].life + 1 > bp->d - NRAND(16) || + bp->bubble[i].y < 0) { + bp->bubble[i].life = 0; + return; + } + ++bp->bubble[i].life; + diameter = bp->bubble[i].life; + x = bp->bubble[i].x; + if (bp->boil) { + bp->bubble[i].y -= diameter / 2; + x += (int) (cos((double) (diameter + + bp->bubble[i].x) / (M_PI / 5.0)) * (double) diameter); + } + /* SunOS 4.1.X xnews server may crash without this */ + if (diameter < 4) { + XFillRectangle(MI_DISPLAY(mi), bp->dbuf, bp->dbuf_gc, + x - diameter / 2, bp->bubble[i].y - diameter / 2, + diameter, diameter); + } else { + XDrawArc(MI_DISPLAY(mi), bp->dbuf, bp->dbuf_gc, + x - diameter / 2, bp->bubble[i].y - diameter / 2, + diameter, diameter, 0, 23040); + } + diameter4 = diameter / 4; + if (diameter4 > 0) { + x4 = x - diameter4 / 2 + + ((bp->direction / 2) ? (-1) : 1) * diameter / 6; + y4 = bp->bubble[i].y - diameter4 / 2 + + ((bp->direction % 2) ? 1 : (-1)) * diameter / 6; + /* SunOS 4.1.X xnews server may crash without this */ + if (diameter4 < 4) { + XFillRectangle(MI_DISPLAY(mi), bp->dbuf, bp->dbuf_gc, + x4, y4, diameter4, diameter4); + } else { + XFillArc(MI_DISPLAY(mi), bp->dbuf, bp->dbuf_gc, + x4, y4, diameter4, diameter4, 0, 23040); + } + } +} + +static void +changeBubble(ModeInfo * mi) +{ + bubblestruct *bp = &bubbles[MI_SCREEN(mi)]; + int i; + + for (i = 0; i < bp->nbubbles; i++) { + if (bp->bubble[i].life != 0) + updateBubble(mi, i); + } + i = NRAND(bp->nbubbles); + if (bp->bubble[i].life == 0) { + bp->bubble[i].x = NRAND(bp->width); + if (bp->boil) + bp->bubble[i].y = bp->height - + ((bp->height >= 16) ? NRAND(bp->height / 16) : 0); + else + bp->bubble[i].y = NRAND(bp->height); + updateBubble(mi, i); + } +} + +void +init_bubble(ModeInfo * mi) +{ + bubblestruct *bp; + int size = MI_SIZE(mi); + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + XGCValues gcv; + + if (bubbles == NULL) { + if ((bubbles = (bubblestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (bubblestruct))) == NULL) + return; + } + bp = &bubbles[MI_SCREEN(mi)]; + + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + bp->direction = NRAND(4); + if (MI_IS_FULLRANDOM(mi)) + bp->boil = (Bool) (LRAND() & 1); + else + bp->boil = boil; + + if (size < -MINSIZE) + bp->d = NRAND(MIN(-size, MAX(MINSIZE, + MIN(bp->width, bp->height) / 2)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + bp->d = MAX(MINSIZE, MIN(bp->width, bp->height) / 2); + else + bp->d = MINSIZE; + } else + bp->d = MIN(size, MAX(MINSIZE, + MIN(bp->width, bp->height) / 2)); + bp->nbubbles = MI_COUNT(mi); + if (bp->nbubbles < -MINBUBBLES) { + bp->nbubbles = NRAND(-bp->nbubbles - MINBUBBLES + 1) + MINBUBBLES; + } else if (bp->nbubbles < MINBUBBLES) + bp->nbubbles = MINBUBBLES; + if (bp->bubble != NULL) + (void) free((void *) bp->bubble); + bp->bubble = (bubbletype *) calloc(bp->nbubbles, sizeof (bubbletype)); + + if (MI_NPIXELS(mi) > 2) + bp->color = NRAND(MI_NPIXELS(mi)); + + if (bp->dbuf) + XFreePixmap(display, bp->dbuf); + bp->dbuf = XCreatePixmap(display, window, bp->width, bp->height, 1); + /* Do not want any exposure events from XCopyPlane */ + XSetGraphicsExposures(display, MI_GC(mi), False); + + gcv.foreground = 1; + gcv.background = 0; + gcv.function = GXcopy; + gcv.graphics_exposures = False; + gcv.line_width = 2; + if (bp->dbuf_gc) + XFreeGC(display, bp->dbuf_gc); + bp->dbuf_gc = XCreateGC(display, bp->dbuf, + GCForeground | GCBackground | GCLineWidth | GCFunction, &gcv); + + MI_CLEARWINDOW(mi); +} + +void +draw_bubble(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + bubblestruct *bp = &bubbles[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else { + bp->color = (bp->color + 1) % MI_NPIXELS(mi); + XSetForeground(display, gc, MI_PIXEL(mi, bp->color)); + } + if (bp->dbuf) { + XSetForeground(display, bp->dbuf_gc, 0); + XFillRectangle(display, bp->dbuf, bp->dbuf_gc, + 0, 0, bp->width, bp->height); + XSetForeground(display, bp->dbuf_gc, 1); + changeBubble(mi); + XCopyPlane(display, bp->dbuf, window, gc, + 0, 0, bp->width, bp->height, 0, 0, 1); + } +} + +void +release_bubble(ModeInfo * mi) +{ + if (bubbles != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + bubblestruct *bp = &bubbles[screen]; + + if (bp->dbuf) + XFreePixmap(MI_DISPLAY(mi), bp->dbuf); + if (bp->dbuf_gc) + XFreeGC(MI_DISPLAY(mi), bp->dbuf_gc); + if (bp->bubble != NULL) + (void) free((void *) bp->bubble); + } + (void) free((void *) bubbles); + bubbles = NULL; + } +} + +void +refresh_bubble(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself */ +} + +#endif /* MODE_bubble */ diff --git a/modes/bug.c b/modes/bug.c new file mode 100644 index 00000000..bf4770ca --- /dev/null +++ b/modes/bug.c @@ -0,0 +1,954 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bug --- Michael Palmiter's simulated evolution */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bug.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 24-Aug-95: Coded from A.K. Dewdney's, "Computer Recreations", Scientific + * American Magazine" May 1989 pp138-141 and Sept 1989 p 183. + * also used wator.c as a guide. + */ + +/*- + * Bugs learn to hunt bacteria (or die) in the Garden of Eden and outside. + * They start as jitterbugs and "evolve" to move straight (in the Garden + * they may evolve to twirl around). + */ + +#ifdef STANDALONE +#define PROGCLASS "Bug" +#define HACK_INIT init_bug +#define HACK_DRAW draw_bug +#define bug_opts xlockmore_opts +#define DEFAULTS "*delay: 75000 \n" \ + "*count: 10 \n" \ + "*cycles: 32767 \n" \ + "*size: -4 \n" \ + "*ncolors: 64 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_bug + +ModeSpecOpt bug_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct bug_description = +{"bug", "init_bug", "draw_bug", "release_bug", + "refresh_bug", "init_bug", NULL, &bug_opts, + 75000, 10, 32767, -4, 64, 1.0, "", + "Shows Palmiter's bug evolution and garden of Eden", 0, NULL}; + +#endif + +extern int neighbors; + +#define BUGBITS(n,w,h)\ + bp->pixmaps[bp->init_bits++]=\ + XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1) + +#define BACTERIA 0 +#define BUG 1 + +#define MAXENERGY 1500 /* Max energy storage */ +#define INITENERGY 400 /* Initial energy */ +#define FOODPERCYCLE 1 +#define BACTERIAENERGY 40 +#define STRONG 1000 /* Min energy to breed */ +#define MATURE 800 /* Breeding time of bugs */ +#define MAXGENE 6 +#define MINGENE (-MAXGENE) +#define REDRAWSTEP 2000 /* How many bacteria to draw per cycle */ +#define MINGRIDSIZE 24 +#define MINSIZE 1 +#define ANGLES 360 +#define NEIGHBORKINDS 6 +#ifdef NEIGHBORS +#define MAXNEIGHBORS 12 +#else +#define MAXNEIGHBORS 6 +#endif + +/* Relative bug moves */ +/* Forward, Right, Hard Right, Reverse, Hard Left, Left */ + +/* Bug data */ +typedef struct { + char direction; + int age, energy; + unsigned int color; + int col, row; + int gene[MAXNEIGHBORS]; + double gene_prob[MAXNEIGHBORS]; +} bugstruct; + +/* Doublely linked list */ +typedef struct _BugList { + bugstruct info; + struct _BugList *previous, *next; +} BugList; + +typedef struct { + Bool painted; + int neighbors; + int n; /* Number of bugs */ + int eden; /* Does the garden exist? */ + int generation; + int nhcols, nhrows; + int width, height; + int edenwidth, edenheight; + int edenstartx, edenstarty; + int xs, ys, xb, yb; + int redrawing, redrawpos; + BugList *currbug, *babybug, *lastbug, *firstbug, *lasttemp, *firsttemp; + BugList **arr; /* 0=empty or pts to a bug */ + char *bacteria; /* 0=empty or food */ + int init_bits; + GC stippledGC; + Pixmap pixmaps[NUMSTIPPLES - 1]; + union { + XPoint hexagon[6]; + XPoint triangle[2][3]; + } shape; +} bugfarmstruct; + +static double genexp[MAXGENE - MINGENE + 1]; + +#ifdef NEIGHBORS +static char plots[NEIGHBORKINDS] = +{3, 4, 6, 8, 9, 12}; /* Neighborhoods */ + +#endif + +static bugfarmstruct *bugfarms = NULL; + +#ifdef NEIGHBORS +static void +position_of_neighbor(bugfarmstruct * bp, int dir, int *pcol, int *prow) +{ + int col = *pcol, row = *prow; + + /* NO WRAPING */ + + if (bp->neighbors == 6) { + switch (dir) { + case 0: + col = col + 1; + break; + case 60: + if (!(row & 1)) + col = col + 1; + row = row - 1; + break; + case 120: + if (row & 1) + col = col - 1; + row = row - 1; + break; + case 180: + col = col - 1; + break; + case 240: + if (row & 1) + col = col - 1; + row = row + 1; + break; + case 300: + if (!(row & 1)) + col = col + 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (bp->neighbors == 4 || bp->neighbors == 8) { + switch (dir) { + case 0: + col = col + 1; + break; + case 45: + col = col + 1; + row = row - 1; + break; + case 90: + row = row - 1; + break; + case 135: + col = col - 1; + row = row - 1; + break; + case 180: + col = col - 1; + break; + case 225: + col = col - 1; + row = row + 1; + break; + case 270: + row = row + 1; + break; + case 315: + col = col + 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = col - 1; + break; + case 30: + case 40: + col = col - 1; + row = row - 1; + break; + case 60: + col = col - 1; + row = row - 2; + break; + case 80: + case 90: + row = row - 2; + break; + case 120: + row = row - 1; + break; + case 150: + case 160: + col = col + 1; + row = row - 1; + break; + case 180: + col = col + 1; + break; + case 200: + case 210: + col = col + 1; + row = row + 1; + break; + case 240: + row = row + 1; + break; + case 270: + case 280: + row = row + 2; + break; + case 300: + col = col - 1; + row = row + 2; + break; + case 320: + case 330: + col = col - 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = col + 1; + break; + case 30: + case 40: + col = col + 1; + row = row + 1; + break; + case 60: + col = col + 1; + row = row + 2; + break; + case 80: + case 90: + row = row + 2; + break; + case 120: + row = row + 1; + break; + case 150: + case 160: + col = col - 1; + row = row + 1; + break; + case 180: + col = col - 1; + break; + case 200: + case 210: + col = col - 1; + row = row - 1; + break; + case 240: + row = row - 1; + break; + case 270: + case 280: + row = row - 2; + break; + case 300: + col = col + 1; + row = row - 2; + break; + case 320: + case 330: + col = col + 1; + row = row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + *pcol = col; + *prow = row; +} + +#endif + +#if 0 +static void +cart2hex(cx, cy, hx, hy) + int cx, cy, *hx, *hy; +{ + *hy = cy / 2; + *hx = (cx + 1) / 2 - 1; +} + +#endif + +static void +hex2cart(int hx, int hy, int *cx, int *cy) +{ + *cy = hy * 2 + 1; + *cx = 2 * hx + 1 + !(hy & 1); +} + +/* hexagon compass move */ +static char +hexcmove(bugfarmstruct * bp, int hx, int hy, int dir, int *nhx, int *nhy) +{ + switch (dir) { + case 0: + *nhy = hy - 1; + *nhx = hx + (int) !(hy & 1); + return (*nhy >= 0 && *nhx < bp->nhcols - !(*nhy & 1)); + case 60: + *nhy = hy; + *nhx = hx + 1; + return (*nhx < bp->nhcols - !(*nhy & 1)); + case 120: + *nhy = hy + 1; + *nhx = hx + (int) !(hy & 1); + return (*nhy < bp->nhrows && *nhx < bp->nhcols - !(*nhy & 1)); + case 180: + *nhy = hy + 1; + *nhx = hx - (int) (hy & 1); + return (*nhy < bp->nhrows && *nhx >= 0); + case 240: + *nhy = hy; + *nhx = hx - 1; + return (*nhx >= 0); + case 300: + *nhy = hy - 1; + *nhx = hx - (int) (hy & 1); + return (*nhy >= 0 && *nhx >= 0); + default: + return 0; + } +} + +static int +has_neighbor(bugfarmstruct * bp, int hcol, int hrow) +{ + int colrow = hcol + hrow * bp->nhcols; + + if ((hrow > 0) && (bp->arr[colrow - bp->nhcols])) + return True; + if ((hrow < bp->nhrows - 1) && bp->arr[colrow + bp->nhcols]) + return True; + if (hcol > 0) { + if (bp->arr[colrow - 1]) + return True; + if (hrow & 1) { + if ((hrow > 0) && bp->arr[colrow - 1 - bp->nhcols]) + return True; + if ((hrow < bp->nhrows - 1) && bp->arr[colrow - 1 + bp->nhcols]) + return True; + } + } + if (hcol < bp->nhcols - 1) { + if (bp->arr[colrow + 1]) + return True; + if (!(hrow & 1)) { + if ((hrow > 0) && bp->arr[colrow + 1 - bp->nhcols]) + return True; + if ((hrow < bp->nhrows - 1) && bp->arr[colrow + 1 + bp->nhcols]) + return True; + } + } + return False; +} + +static void +drawabacterium(ModeInfo * mi, int hcol, int hrow, unsigned char color) +{ + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + int ccol, crow; + + if (color) + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WHITE_PIXEL(mi)); + else + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + hex2cart(hcol, hrow, &ccol, &crow); + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + bp->xb + bp->xs * ccol, bp->yb + bp->ys * crow, + bp->xs, bp->ys); +} + +static void +drawabug(ModeInfo * mi, int hcol, int hrow, unsigned int color) +{ + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + int ccol, crow; + GC gc; + + if (MI_NPIXELS(mi) > 3) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, color)); + gc = MI_GC(mi); + } else { + XGCValues gcv; + + gcv.stipple = bp->pixmaps[color]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), bp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = bp->stippledGC; + } + + hex2cart(hcol, hrow, &ccol, &crow); + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + bp->xb + bp->xs * (ccol - 1), bp->yb + bp->ys * (crow - 1), + 3 * bp->xs, 3 * bp->ys); +} + + +static void +eraseabug(ModeInfo * mi, int hcol, int hrow) +{ + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + int ccol, crow; + + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + hex2cart(hcol, hrow, &ccol, &crow); + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + bp->xb + bp->xs * (ccol - 1), bp->yb + bp->ys * (crow - 1), + 3 * bp->xs, 3 * bp->ys); +} + +static void +init_buglist(bugfarmstruct * bp) +{ + /* Waste some space at the beginning and end of list + so we do not have to complicated checks against falling off the ends. */ + bp->lastbug = (BugList *) malloc(sizeof (BugList)); + bp->firstbug = (BugList *) malloc(sizeof (BugList)); + bp->firstbug->previous = bp->lastbug->next = NULL; + bp->firstbug->next = bp->lastbug->previous = NULL; + bp->firstbug->next = bp->lastbug; + bp->lastbug->previous = bp->firstbug; + + bp->lasttemp = (BugList *) malloc(sizeof (BugList)); + bp->firsttemp = (BugList *) malloc(sizeof (BugList)); + bp->firsttemp->previous = bp->lasttemp->next = NULL; + bp->firsttemp->next = bp->lasttemp->previous = NULL; + bp->firsttemp->next = bp->lasttemp; + bp->lasttemp->previous = bp->firsttemp; +} + +static void +addto_buglist(bugfarmstruct * bp, bugstruct info) +{ + bp->currbug = (BugList *) malloc(sizeof (BugList)); + bp->lastbug->previous->next = bp->currbug; + bp->currbug->previous = bp->lastbug->previous; + bp->currbug->next = bp->lastbug; + bp->lastbug->previous = bp->currbug; + bp->currbug->info = info; +} + +static void +removefrom_buglist(bugfarmstruct * bp, BugList * ptr) +{ + ptr->previous->next = ptr->next; + ptr->next->previous = ptr->previous; + bp->arr[ptr->info.col + ptr->info.row * bp->nhcols] = 0; + (void) free((void *) ptr); +} + +static void +dupin_buglist(bugfarmstruct * bp) +{ + BugList *temp; + + temp = (BugList *) malloc(sizeof (BugList)); + temp->previous = bp->babybug; + temp->next = bp->babybug->next; + bp->babybug->next = temp; + temp->next->previous = temp; + temp->info = bp->babybug->info; + bp->babybug = temp; +} + +/*- + * new bug at end of list, this rotates who goes first, young bugs go last + * this most likely will not change the feel to any real degree + */ +static void +cutfrom_buglist(bugfarmstruct * bp) +{ + bp->babybug = bp->currbug; + bp->currbug = bp->currbug->previous; + bp->currbug->next = bp->babybug->next; + bp->babybug->next->previous = bp->currbug; + bp->babybug->next = bp->lasttemp; + bp->babybug->previous = bp->lasttemp->previous; + bp->babybug->previous->next = bp->babybug; + bp->babybug->next->previous = bp->babybug; +} + +static void +reattach_buglist(bugfarmstruct * bp) +{ + bp->currbug = bp->lastbug->previous; + bp->currbug->next = bp->firsttemp->next; + bp->currbug->next->previous = bp->currbug; + bp->lastbug->previous = bp->lasttemp->previous; + bp->lasttemp->previous->next = bp->lastbug; + bp->lasttemp->previous = bp->firsttemp; + bp->firsttemp->next = bp->lasttemp; +} + +static void +flush_buglist(bugfarmstruct * bp) +{ + while (bp->lastbug->previous != bp->firstbug) { + bp->currbug = bp->lastbug->previous; + bp->currbug->previous->next = bp->lastbug; + bp->lastbug->previous = bp->currbug->previous; + /*bp->arr[bp->currbug->info.col + bp->currbug->info.row * bp->nhcols] = 0; */ + (void) free((void *) bp->currbug); + } + + while (bp->lasttemp->previous != bp->firsttemp) { + bp->currbug = bp->lasttemp->previous; + bp->currbug->previous->next = bp->lasttemp; + bp->lasttemp->previous = bp->currbug->previous; + /*bp->arr[bp->currbug->info.col + bp->currbug->info.row * bp->nhcols] = 0; */ + (void) free((void *) bp->currbug); + } +} + +static int +dirbug(bugstruct * info, int local_neighbors) +{ + double sum = 0.0, prob; + int i; + + prob = (double) LRAND() / MAXRAND; + for (i = 0; i < local_neighbors; i++) { + sum += info->gene_prob[i]; + if (prob < sum) + return i; + } + return local_neighbors - 1; /* Could miss due to rounding */ +} + +static void +mutatebug(bugstruct * info, int local_neighbors) +{ + double sum = 0.0; + int gene; + + gene = NRAND(local_neighbors); + if (LRAND() & 1) { + if (info->gene[gene] == MAXGENE) + return; + info->gene[gene]++; + } else { + if (info->gene[gene] == MINGENE) + return; + info->gene[gene]--; + } + for (gene = 0; gene < local_neighbors; gene++) + sum += genexp[info->gene[gene] + MAXGENE]; + for (gene = 0; gene < local_neighbors; gene++) + info->gene_prob[gene] = genexp[info->gene[gene] + MAXGENE] / sum; +} + +static void +makebacteria(ModeInfo * mi, + int n, int startx, int starty, int width, int height, Bool draw) +{ + int i = 0, j = 0, hcol, hrow, colrow; + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + + /* Make bacteria but if can't, don't loop forever */ + while (i < n && j < 2 * n) { + hrow = NRAND(height) + starty; + if (width - (!(hrow & 1)) > 0) + hcol = NRAND(width - (!(hrow & 1))) + startx; + else + hcol = startx; + colrow = hcol + hrow * bp->nhcols; + j++; + if (!bp->arr[colrow] && !bp->bacteria[colrow]) { + i++; + bp->bacteria[colrow] = True; + drawabacterium(mi, hcol, hrow, draw); + } + } +} + +static void +redrawbacteria(ModeInfo * mi, int colrow) +{ + int hcol, hrow; + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + + if (!bp->bacteria[colrow]) + return; + + hrow = colrow / bp->nhcols; + hcol = colrow % bp->nhcols; + drawabacterium(mi, hcol, hrow, True); +} + +void +init_bug(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int size = MI_SIZE(mi); + XGCValues gcv; + bugfarmstruct *bp; + int i = 0, j = 0, hcol, hrow, gene, colrow; + int nccols, ncrows; + double sum; + bugstruct info; + + if (bugfarms == NULL) { + if ((bugfarms = (bugfarmstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (bugfarmstruct))) == NULL) + return; + } + bp = &bugfarms[MI_SCREEN(mi)]; + if (MI_NPIXELS(mi) <= 3) { + if (bp->stippledGC == None) { + gcv.fill_style = FillOpaqueStippled; + bp->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv); + } + if (bp->init_bits == 0) { + for (i = 1; i < NUMSTIPPLES; i++) + BUGBITS(stipples[i], STIPPLESIZE, STIPPLESIZE); + } + } + bp->generation = 0; + if (!bp->firstbug) { /* Genesis */ + /* Set up what will be a 'triply' linked list. + doubly linked list, doubly linked to an array */ + init_buglist(bp); + genexp[MAXGENE] = 1; + for (i = 1; i <= MAXGENE; i++) { + genexp[MAXGENE + i] = genexp[MAXGENE + i - 1] * M_E; + genexp[MAXGENE - i] = 1.0 / genexp[MAXGENE + i]; + } + } else /* Apocolypse now */ + flush_buglist(bp); + +#ifndef NEIGHBORS + bp->neighbors = 6; +#else + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + dp->neighbors = plots[i]; + break; + } + if (i == NEIGHBORKINDS - 1) { + dp->neighbors = plots[NRAND(NEIGHBORKINDS)]; + break; + } + } +#endif + + bp->width = MI_WIDTH(mi); + bp->height = MI_HEIGHT(mi); + if (bp->width < 4) + bp->width = 4; + if (bp->height < 4) + bp->height = 4; + + if (size < -MINSIZE) + bp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(bp->width, bp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + bp->ys = MAX(MINSIZE, MIN(bp->width, bp->height) / MINGRIDSIZE); + else + bp->ys = MINSIZE; + } else + bp->ys = MIN(size, MAX(MINSIZE, MIN(bp->width, bp->height) / + MINGRIDSIZE)); + bp->xs = bp->ys; + nccols = MAX(bp->width / bp->xs - 2, 2); + ncrows = MAX(bp->height / bp->ys - 1, 2); + bp->nhcols = nccols / 2; + bp->nhrows = ncrows / 2; + bp->nhrows -= !(bp->nhrows & 1); /* Must be odd */ + bp->xb = (bp->width - bp->xs * nccols) / 2; + bp->yb = (bp->height - bp->ys * ncrows) / 2; + if (bp->arr != NULL) + (void) free((void *) bp->arr); + bp->arr = (BugList **) calloc(bp->nhcols * bp->nhrows, sizeof (BugList *)); + if (bp->bacteria != NULL) + (void) free((void *) bp->bacteria); + bp->bacteria = (char *) calloc(bp->nhcols * bp->nhrows, sizeof (char)); + + bp->edenwidth = bp->nhcols / 4; + bp->edenheight = bp->nhrows / 4; + if (bp->edenheight) + bp->edenheight -= !(bp->edenheight & 1); /* Make sure its odd */ + bp->eden = (bp->edenwidth > 1 && bp->edenheight > 1); + if (bp->eden) { + bp->edenstartx = NRAND(bp->nhcols - bp->edenwidth); + bp->edenstarty = NRAND(bp->nhrows - bp->edenheight); + if (bp->edenstarty & 1) + bp->edenstarty++; + } + /* Play G-d with these numbers */ + bp->n = MI_COUNT(mi); + if (bp->n < 0) + bp->n = NRAND(-bp->n) + 1; + + MI_CLEARWINDOW(mi); + bp->painted = False; + + /* Make bugs but if can't, don't loop forever */ + i = 0, j = 0; + while (i < bp->n && j < 2 * bp->n) { + hrow = NRAND(bp->nhrows); + if (bp->nhcols - (!(hrow & 1)) > 0) + hcol = NRAND(bp->nhcols - (!(hrow & 1))); + else + hcol = 0; + colrow = hcol + hrow * bp->nhcols; + j++; + if (!bp->arr[colrow] && !has_neighbor(bp, hcol, hrow)) { + i++; + info.age = 0; + info.energy = INITENERGY; + info.direction = NRAND(bp->neighbors); + for (gene = 0; gene < bp->neighbors; gene++) +#if 0 /* Some creationalism, may create gliders or twirlers */ + do { + double temp = (double) LRAND() / MAXRAND; + + info.gene[gene] = ((int) (1.0 / (1.0 - temp * temp)) - 1) * + ((LRAND() & 1) ? -1 : 1); + } while (info.gene[gene] > MAXGENE / 2 || + info.gene[gene] < MINGENE / 2); +#else /* Jitterbugs, evolve or die */ + info.gene[gene] = 0; +#endif + sum = 0; + for (gene = 0; gene < bp->neighbors; gene++) + sum += genexp[info.gene[gene] + MAXGENE]; + for (gene = 0; gene < bp->neighbors; gene++) + info.gene_prob[gene] = genexp[info.gene[gene] + MAXGENE] / sum; + if (MI_NPIXELS(mi) > 3) + info.color = NRAND(MI_NPIXELS(mi)); + else + info.color = NRAND(NUMSTIPPLES - 1); + info.col = hcol; + info.row = hrow; + addto_buglist(bp, info); + bp->arr[colrow] = bp->currbug; + drawabug(mi, hcol, hrow, bp->currbug->info.color); + } + } + makebacteria(mi, bp->nhcols * bp->nhrows / 2, 0, 0, bp->nhcols, bp->nhrows, + False); + if (bp->eden) + makebacteria(mi, bp->edenwidth * bp->edenheight / 2, + bp->edenstartx, bp->edenstarty, bp->edenwidth, bp->edenheight, + False); + bp->redrawing = 1; + bp->redrawpos = 0; +} + +#define ENOUGH 16 +void +draw_bug(ModeInfo * mi) +{ + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + int hcol, hrow, nhcol, nhrow, colrow, ncolrow, absdir, tryit; + + MI_IS_DRAWN(mi) = True; + + bp->painted = True; + bp->currbug = bp->firstbug->next; + while (bp->currbug != bp->lastbug) { + hcol = bp->currbug->info.col; + hrow = bp->currbug->info.row; + colrow = hcol + hrow * bp->nhcols; + if (bp->currbug->info.energy-- < 0) { /* Time to die, Bug */ + /* back up one or else in void */ + bp->currbug = bp->currbug->previous; + removefrom_buglist(bp, bp->arr[colrow]); + bp->arr[colrow] = 0; + eraseabug(mi, hcol, hrow); + bp->n--; + } else { /* try to move */ + bp->arr[colrow] = 0; /* Don't want neighbor to detect itself */ + tryit = 0; + do { + if (tryit++ > ENOUGH) { + break; + } + absdir = (bp->currbug->info.direction + + dirbug(&bp->currbug->info, bp->neighbors)) % bp->neighbors; + } while (!hexcmove(bp, hcol, hrow, absdir * ANGLES / bp->neighbors, + &nhcol, &nhrow) || has_neighbor(bp, nhcol, nhrow)); + bp->currbug->info.age++; + bp->currbug->info.energy--; + if (tryit <= ENOUGH) { + ncolrow = nhcol + nhrow * bp->nhcols; + if (bp->bacteria[ncolrow]) { + bp->currbug->info.energy += BACTERIAENERGY; + bp->bacteria[ncolrow] = 0; + if (bp->currbug->info.energy > MAXENERGY) + bp->currbug->info.energy = MAXENERGY; + } + bp->currbug->info.col = nhcol; + bp->currbug->info.row = nhrow; + bp->currbug->info.direction = absdir; + bp->arr[ncolrow] = bp->currbug; + if (bp->currbug->info.energy > STRONG && + bp->currbug->info.age > MATURE) { /* breed */ + drawabug(mi, nhcol, nhrow, bp->currbug->info.color); + cutfrom_buglist(bp); /* This rotates out who goes first */ + bp->babybug->info.age = 0; + bp->babybug->info.energy = INITENERGY; + dupin_buglist(bp); + mutatebug(&bp->babybug->previous->info, bp->neighbors); + mutatebug(&bp->babybug->info, bp->neighbors); + bp->arr[colrow] = bp->babybug; + bp->babybug->info.col = hcol; + bp->babybug->info.row = hrow; + bp->n++; + } else { + eraseabug(mi, hcol, hrow); + drawabug(mi, nhcol, nhrow, bp->currbug->info.color); + } + } else + bp->arr[colrow] = bp->currbug; + } + bp->currbug = bp->currbug->next; + } + reattach_buglist(bp); + makebacteria(mi, FOODPERCYCLE, 0, 0, bp->nhcols, bp->nhrows, True); + if (bp->eden) + makebacteria(mi, FOODPERCYCLE, + bp->edenstartx, bp->edenstarty, bp->edenwidth, bp->edenheight, True); + if (!bp->n || bp->generation >= MI_CYCLES(mi)) + init_bug(mi); + bp->generation++; + if (bp->redrawing) { + int i; + + for (i = 0; i < REDRAWSTEP; i++) { + if (bp->bacteria[bp->redrawpos]) + redrawbacteria(mi, bp->redrawpos); + if (++(bp->redrawpos) >= bp->nhcols * bp->nhrows) { + bp->redrawing = 0; + break; + } + } + } +} + +void +release_bug(ModeInfo * mi) +{ + if (bugfarms != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + bugfarmstruct *bp = &bugfarms[screen]; + int shade; + + if (bp->stippledGC != None) { + XFreeGC(MI_DISPLAY(mi), bp->stippledGC); + } + for (shade = 0; shade < bp->init_bits; shade++) { + if (bp->pixmaps[shade]) + XFreePixmap(MI_DISPLAY(mi), bp->pixmaps[shade]); + } + if (bp->firstbug) + flush_buglist(bp); + (void) free((void *) bp->lastbug); + (void) free((void *) bp->firstbug); + (void) free((void *) bp->lasttemp); + (void) free((void *) bp->firsttemp); + if (bp->arr != NULL) + (void) free((void *) bp->arr); + if (bp->bacteria != NULL) + (void) free((void *) bp->bacteria); + } + (void) free((void *) bugfarms); + bugfarms = NULL; + } +} + +void +refresh_bug(ModeInfo * mi) +{ + bugfarmstruct *bp = &bugfarms[MI_SCREEN(mi)]; + + if (bp->painted) { + MI_CLEARWINDOW(mi); + bp->painted = False; + bp->redrawing = 1; + bp->redrawpos = 0; + } +} + +#endif /* MODE_bug */ diff --git a/modes/cartoon.c b/modes/cartoon.c new file mode 100644 index 00000000..382ab257 --- /dev/null +++ b/modes/cartoon.c @@ -0,0 +1,408 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* cartoon --- bouncing cartoons */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)cartoon.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1988 by Sun Microsystems + * + * 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 + * 14-Oct-96: + * Updated the equations for mapping the charater + * to follow a parabolic time curve. Also adjust + * the rate based on the size (area) of the cartoon. + * Eliminated unused variables carried over from bounce.c + * Still needs a user attribute to control the rate + * depending on their computer and preference. + * 20-Sep-94: I done this file starting from the previous bounce.c + * I draw the 8 cartoons like they are. + * Lorenzo Patocchi + * David monkeyed around with the cmap stuff to get it to work. + * 2-Sep-93: xlock version David Bagley + * 1986: Sun Microsystems + */ + +/*- + * original copyright + * ************************************************************************** + * 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. + * *************************************************************************** + */ + +/*- +-visual DirectColor may yield +X Error of failed request: BadMatch (invalid parameter attributes) + Major opcode of failed request: 2 (X_ChangeWindowAttributes) +puzzle.c has the same disease. + */ + +#ifdef STANDALONE +#define PROGCLASS "Cartoon" +#define HACK_INIT init_cartoon +#define HACK_DRAW draw_cartoon +#define cartoon_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "vis.h" +#include "color.h" +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_cartoon + +ModeSpecOpt cartoon_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct cartoon_description = +{"cartoon", "init_cartoon", "draw_cartoon", "release_cartoon", + NULL, "init_cartoon", NULL, &cartoon_opts, + 10000, 1, 1, 1, 64, 1.0, "", + "Shows bouncing cartoons", 0, NULL}; + +#endif + +/* Yes, it does not have to be done again but you could override the above... */ +#if defined( USE_XPM ) || defined( USE_XPMINC ) + +#if USE_XPMINC +#include +#else +#include /* Normal spot */ +#endif + +#include "pixmaps/calvin2.xpm" +#include "pixmaps/gravity.xpm" +#include "pixmaps/calvin4.xpm" +#include "pixmaps/calvinf.xpm" +#include "pixmaps/hobbes.xpm" +#include "pixmaps/calvin.xpm" +#include "pixmaps/marino2.xpm" +#include "pixmaps/calvin3.xpm" +#include "pixmaps/garfield.xpm" +#ifdef ALL_CARTOONS /* Some of these gave me trouble on some systems */ +#include "pixmaps/dragon.xpm" +#include "pixmaps/cal_hob.xpm" +#define NUM_CARTOONS 11 +#else +#define NUM_CARTOONS 9 +#endif +#else +#define NUM_CARTOONS 0 /* Not much point... */ +#endif + +#define MAX_X_STRENGTH 8 +#define MAX_Y_STRENGTH 3 + +static char **cartoonlist[NUM_CARTOONS] = +{ +#if NUM_CARTOONS + calvin2, gravity, calvin4, calvinf, hobbes, + calvin, marino2, calvin3, garfield +#ifdef ALL_CARTOONS + ,dragon, cal_hob +#endif +#endif +}; + +typedef struct { + int x, y, xlast, ylast; + int vx, vy, tbx, tby; + int ytime, ybase; + double yrate; + int width, height; + GC backGC; + XImage *image; + int success; + int choice; + Colormap cmap; + unsigned long black; +} cartoonstruct; + +static cartoonstruct *cartoons = NULL; + +static void erase_image(Display * display, Window win, GC gc, + int x, int y, int xl, int yl, int xsize, int ysize); + +static void +free_stuff(Display * display, cartoonstruct * cp) +{ + if (cp->image) { + (void) XDestroyImage(cp->image); + cp->image = None; + } + if (cp->cmap != None) { + XFreeColormap(display, cp->cmap); + if (cp->backGC != None) { + XFreeGC(display, cp->backGC); + cp->backGC = None; + } + cp->cmap = None; + } else + cp->backGC = None; +} + +static void +initimage(ModeInfo * mi, int cartoon) +{ +#if defined( USE_XPM ) || defined( USE_XPMINC ) + cartoonstruct *cp = &cartoons[MI_SCREEN(mi)]; + XpmAttributes attrib; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + free_stuff(display, cp); + +#ifndef STANDALONE + if (!fixedColors(mi)) { + cp->cmap = XCreateColormap(display, window, MI_VISUAL(mi), AllocNone); + attrib.colormap = cp->cmap; + reserveColors(mi, cp->cmap, &cp->black); + } else +#endif /* !STANDALONE */ + attrib.colormap = MI_COLORMAP(mi); + + attrib.visual = MI_VISUAL(mi); + attrib.depth = MI_DEPTH(mi); + attrib.valuemask = XpmVisual | XpmColormap | XpmDepth; + + /* if (MI_NPIXELS(mi) > 2) *//* Does not look too bad in monochrome */ + cp->success = (XpmSuccess == XpmCreateImageFromData( + display, cartoonlist[cartoon], &cp->image, (XImage **) NULL, &attrib)); +#endif + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stderr, "Color image %d%s loaded.\n", + cartoon, (cp->success) ? "" : " could not be"); +#ifndef STANDALONE + if (cp->cmap != None) { + setColormap(display, window, cp->cmap, MI_IS_INWINDOW(mi)); + if (cp->backGC == None) { + XGCValues xgcv; + + xgcv.background = cp->black; + cp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* !STANDALONE */ + { + cp->black = MI_BLACK_PIXEL(mi); + cp->backGC = MI_GC(mi); + } +} + +static void +put_cartoon(ModeInfo * mi) +{ + cartoonstruct *cp = &cartoons[MI_SCREEN(mi)]; + +/* PURIFY 4.0.1 on SunOS4 and on Solaris 2 reports a 29756 byte memory leak on + * the next line. */ + (void) XPutImage(MI_DISPLAY(mi), MI_WINDOW(mi), cp->backGC, + cp->image, 0, 0, + cp->x - cp->tbx, cp->y - cp->tby, + cp->image->width, cp->image->height); + if (cp->xlast != -1) { + erase_image(MI_DISPLAY(mi), MI_WINDOW(mi), cp->backGC, + cp->x - cp->tbx, cp->y - cp->tby, + cp->xlast, cp->ylast, + cp->image->width, cp->image->height); + } +} /* put_cartoon */ + +static void +select_cartoon(ModeInfo * mi) +{ +#if ( NUM_CARTOONS <= 0 ) + return; +#else + cartoonstruct *cp = &cartoons[MI_SCREEN(mi)]; + +#if ( NUM_CARTOONS > 1 ) + int old; + + old = cp->choice; + while (old == cp->choice) + cp->choice = NRAND(NUM_CARTOONS); + if (MI_IS_DEBUG(mi)) + (void) fprintf(stderr, "cartoon %d.\n", cp->choice); + initimage(mi, cp->choice); +#else /* Probably will never be used but ... */ + cp->choice = 0; + if (MI_IS_DEBUG(mi)) + (void) fprintf(stderr, "cartoon %d.\n", cp->choice); + if (!cp->success) + initimage(mi, cp->choice); +#endif +#endif +} /* select_cartoon */ + +/* This stops some flashing, could be more efficient */ +static void +erase_image(Display * display, Window win, GC gc, + int x, int y, int xl, int yl, int xsize, int ysize) +{ + if (y < 0) + y = 0; + if (x < 0) + x = 0; + if (xl < 0) + xl = 0; + if (yl < 0) + yl = 0; + + if (xl - x > 0) + XFillRectangle(display, win, gc, x + xsize, yl, xl - x, ysize); + if (yl - y > 0) + XFillRectangle(display, win, gc, xl, y + ysize, xsize, yl - y); + if (y - yl > 0) + XFillRectangle(display, win, gc, xl, yl, xsize, y - yl); + if (x - xl > 0) + XFillRectangle(display, win, gc, xl, yl, x - xl, ysize); +} /* erase_image */ + +void +init_cartoon(ModeInfo * mi) +{ + cartoonstruct *cp; + int i; + + if (cartoons == NULL) { + if ((cartoons = (cartoonstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (cartoonstruct))) == NULL) + return; + } + cp = &cartoons[MI_SCREEN(mi)]; + + if (!cp->success) { + cp->choice = -1; + + } + cp->width = MI_WIDTH(mi); + cp->height = MI_HEIGHT(mi); + + select_cartoon(mi); + + if (cp->success) { + cp->vx = ((LRAND() & 1) ? -1 : 1) * NRAND(MAX_X_STRENGTH); + + cp->x = (cp->vx >= 0) ? 0 : cp->width - cp->image->width; + + cp->y = cp->height + cp->image->height; + cp->ytime = 0; + i = 100000 / (cp->image->width * cp->image->height); + cp->yrate = (1.0 + NRAND(MAX_Y_STRENGTH)) * ((double) i * i) / 4.0; + cp->ybase = (int) sqrt(((3 * cp->y / 4) + + (NRAND(cp->y / 4))) * 2 / cp->yrate); + + cp->xlast = -1; + cp->ylast = 0; + + } + MI_CLEARWINDOWCOLORMAP(mi, cp->backGC, cp->black); +} /* init_cartoon */ + +static void +move_cartoon(ModeInfo * mi) +{ + cartoonstruct *cp = &cartoons[MI_SCREEN(mi)]; + + cp->xlast = cp->x - cp->tbx; + cp->ylast = cp->y - cp->tby; + + cp->x += cp->vx; + if ((cp->width > cp->image->width && cp->x > cp->width - cp->image->width) || + (cp->width < cp->image->width && cp->x < 0)) { + /* Bounce off the right edge */ + cp->x = 2 * (cp->width - cp->image->width) - cp->x; + cp->vx = -cp->vx; + } else if ((cp->width < cp->image->width && + cp->x > cp->width - cp->image->width) || + (cp->width > cp->image->width && cp->x < 0)) { + /* Bounce off the left edge */ + cp->x = -cp->x; + cp->vx = -cp->vx; + } + cp->ytime++; + + cp->y += (int) ((cp->ytime / cp->yrate) - cp->ybase); + + + if (cp->y >= (cp->height + cp->image->height)) { + /* Back at the bottom edge, time for a new cartoon */ + init_cartoon(mi); + } +} /* move_cartoon */ + +void +draw_cartoon(ModeInfo * mi) +{ + cartoonstruct *cp = &cartoons[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (cp->success) { + put_cartoon(mi); + move_cartoon(mi); + } else + init_cartoon(mi); +} /* draw_cartoon */ + +void +release_cartoon(ModeInfo * mi) +{ + if (cartoons != NULL) { +#if defined( USE_XPM ) || defined( USE_XPMINC ) + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + cartoonstruct *cp = &cartoons[screen]; + + free_stuff(MI_DISPLAY(mi), cp); + } +#endif + (void) free((void *) cartoons); + cartoons = NULL; + } +} /* release_cartoon */ + +#endif /* MODE_cartoon */ diff --git a/modes/clock.c b/modes/clock.c new file mode 100644 index 00000000..c555af1a --- /dev/null +++ b/modes/clock.c @@ -0,0 +1,460 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* clock --- displays an analog clock */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)clock.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 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. + * + * 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 design was highly inspirated from 'oclock' but not the code, + * which is all mine. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 24-Dec-95: Ron Hitchens cycles range and defaults + * changed. + * 01-Dec-95: Clock size changes each time it is displayed. + * 01-Jun-95: Written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Clock" +#define HACK_INIT init_clock +#define HACK_DRAW draw_clock +#define clock_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: -16 \n" \ + "*cycles: 200 \n" \ + "*size: -200 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_clock + +ModeSpecOpt clock_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct clock_description = +{"clock", "init_clock", "draw_clock", "release_clock", + "refresh_clock", "init_clock", NULL, &clock_opts, + 100000, -16, 200, -200, 64, 1.0, "", + "Shows Packard's clock", 0, NULL}; + +#endif + +#ifdef TM_IN_SYS_TIME +#include +#else +#include +#endif + +#define MIN_CYCLES 50 /* shortest possible time before moving the clock */ +#define MAX_CYCLES 1000 /* longest possible time before moving the clock */ +#define CLOCK_BORDER 9 /* Percentage of the clock size for the border */ +#define HOURS_SIZE 50 /* Percentage of the clock size for hours length */ +#define MINUTES_SIZE 75 /* Idem for minutes */ +#define SECONDS_SIZE 80 /* Idem for seconds */ +#define HOURS_WIDTH 10 /* Percentage of the clock size for hours width */ +#define MINUTES_WIDTH 5 /* Idem for minutes */ +#define SECONDS_WIDTH 2 /* Idem for seconds */ +#define JEWEL_POSITION 90 /* The relative position of the jewel */ +#define JEWEL_SIZE 9 /* The relative size of the jewel */ +#define MINCLOCKS 1 +#define MINSIZE 16 /* size, minimum */ + +typedef struct { + int size; /* length of the hand */ + int width; /* width of the hand */ + unsigned long color; /* color of the hand */ +} hand; + +typedef struct { + hand hours; /* the hours hand */ + hand minutes; /* the minutes hand */ + hand seconds; /* the seconds hand */ + XPoint pos; + int size; + int radius; + int boxsize; + int jewel_size; + int jewel_position; + int border_width; + unsigned long border_color; + unsigned long jewel_color; + struct tm dd_time; +} oclock; + +typedef struct { + oclock *oclocks; + time_t d_time; + int clock_count; + int width, height; + int nclocks; + int currentclocks; + int redrawing; +} clockstruct; + +static clockstruct *clocks = NULL; + +static int +myrand(int minimum, int maximum) +{ + return ((int) (minimum + (LRAND() / MAXRAND) * (maximum + 1 - minimum))); +} + +static double +HourToAngle(oclock * oclockp) +{ + return ((M_PI * ((double) oclockp->dd_time.tm_hour + + ((double) oclockp->dd_time.tm_min / 60) + + ((double) oclockp->dd_time.tm_sec / 3600))) / 6 - M_PI_2); +} + +static double +MinutesToAngle(oclock * oclockp) +{ + return ((M_PI * ((double) oclockp->dd_time.tm_min + + ((double) oclockp->dd_time.tm_sec / 60))) / 30 - M_PI_2); +} + +static double +SecondsToAngle(oclock * oclockp) +{ + return ((M_PI * ((double) oclockp->dd_time.tm_sec) / 30) - M_PI_2); +} + +static void +DrawDisk(Display * display, Window window, GC gc, + int center_x, int center_y, int diameter) +{ + int radius = diameter / 2; + + if (diameter > 1) + XFillArc(display, window, gc, + center_x - radius, center_y - radius, + diameter, diameter, + 0, 23040); + else + XDrawPoint(display, window, gc, center_x, center_y); +} + +static void +DrawBorder(ModeInfo * mi, int clck, short int mode) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + + + if (mode == 0) + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + else + XSetForeground(display, gc, cp->oclocks[clck].border_color); + + XSetLineAttributes(display, gc, cp->oclocks[clck].border_width, + LineSolid, CapNotLast, JoinMiter); + XDrawArc(display, MI_WINDOW(mi), gc, + cp->oclocks[clck].pos.x - cp->oclocks[clck].size / 2, + cp->oclocks[clck].pos.y - cp->oclocks[clck].size / 2, + cp->oclocks[clck].size, cp->oclocks[clck].size, + 0, 23040); +} + +static void +DrawJewel(ModeInfo * mi, int clck, short int mode) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + + XSetLineAttributes(display, gc, 1, LineSolid, CapNotLast, JoinMiter); + if (mode == 0) + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + else + XSetForeground(display, gc, cp->oclocks[clck].jewel_color); + DrawDisk(display, MI_WINDOW(mi), gc, + cp->oclocks[clck].pos.x, + cp->oclocks[clck].pos.y - cp->oclocks[clck].jewel_position, + cp->oclocks[clck].jewel_size); +} + +static void +DrawHand(ModeInfo * mi, int clck, hand * h, double angle, short int mode) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + int cosi, sinj; + + /* mode: 0 for erasing, anything else for drawing */ + if (mode == 0) + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + else + XSetForeground(display, gc, h->color); + XSetLineAttributes(display, gc, h->width, LineSolid, CapNotLast, JoinMiter); + DrawDisk(display, window, gc, + cp->oclocks[clck].pos.x, cp->oclocks[clck].pos.y, h->width); + cosi = (int) (cos(angle) * (double) (h->size)); + sinj = (int) (sin(angle) * (double) (h->size)); + XDrawLine(display, window, gc, + cp->oclocks[clck].pos.x, cp->oclocks[clck].pos.y, + cp->oclocks[clck].pos.x + cosi, cp->oclocks[clck].pos.y + sinj); + DrawDisk(display, window, gc, + cp->oclocks[clck].pos.x + cosi, cp->oclocks[clck].pos.y + sinj, + h->width); +} + +static void +real_draw_clock(ModeInfo * mi, int clck, short int mode) +{ + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + + DrawBorder(mi, clck, mode); + DrawJewel(mi, clck, mode); + DrawHand(mi, clck, &cp->oclocks[clck].hours, + HourToAngle(&cp->oclocks[clck]), mode); + DrawHand(mi, clck, &cp->oclocks[clck].minutes, + MinutesToAngle(&cp->oclocks[clck]), mode); + DrawHand(mi, clck, &cp->oclocks[clck].seconds, + SecondsToAngle(&cp->oclocks[clck]), mode); +} + +static int +collide(clockstruct * cp, int clck) +{ + int i, d, x, y; + + for (i = 0; i < clck; i++) { + x = (cp->oclocks[i].pos.x - cp->oclocks[clck].pos.x); + y = (cp->oclocks[i].pos.y - cp->oclocks[clck].pos.y); + d = (int) sqrt((double) (x * x + y * y)); + if (d < (cp->oclocks[i].size + cp->oclocks[i].border_width + + cp->oclocks[clck].size + cp->oclocks[clck].border_width) / 2) + return i; + } + return clck; +} + +static int +new_clock_state(ModeInfo * mi, int clck) +{ + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + int size = MI_SIZE(mi); + int tryit; + + for (tryit = 0; tryit < 8; tryit++) { + /* We change the clock size */ + if (size < -MINSIZE) + cp->oclocks[clck].size = NRAND(MIN(-size, MAX(MINSIZE, + MIN(cp->width, cp->height))) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + cp->oclocks[clck].size = MAX(MINSIZE, MIN(cp->width, cp->height)); + else + cp->oclocks[clck].size = MINSIZE; + } else + cp->oclocks[clck].size = MIN(size, MAX(MINSIZE, + MIN(cp->width, cp->height))); + + /* We must compute new attributes for the clock because its size changes */ + cp->oclocks[clck].hours.size = (cp->oclocks[clck].size * HOURS_SIZE) / 200; + cp->oclocks[clck].minutes.size = + (cp->oclocks[clck].size * MINUTES_SIZE) / 200; + cp->oclocks[clck].seconds.size = + (cp->oclocks[clck].size * SECONDS_SIZE) / 200; + cp->oclocks[clck].jewel_size = (cp->oclocks[clck].size * JEWEL_SIZE) / 200; + + cp->oclocks[clck].border_width = + (cp->oclocks[clck].size * CLOCK_BORDER) / 200; + cp->oclocks[clck].hours.width = (cp->oclocks[clck].size * HOURS_WIDTH) / 200; + cp->oclocks[clck].minutes.width = + (cp->oclocks[clck].size * MINUTES_WIDTH) / 200; + cp->oclocks[clck].seconds.width = + (cp->oclocks[clck].size * SECONDS_WIDTH) / 200; + + cp->oclocks[clck].jewel_position = + (cp->oclocks[clck].size * JEWEL_POSITION) / 200; + + cp->oclocks[clck].radius = + (cp->oclocks[clck].size / 2) + cp->oclocks[clck].border_width + 1; + + /* Here we set new values for the next clock to be displayed */ + if (MI_NPIXELS(mi) > 2) { + /* New colors */ + cp->oclocks[clck].border_color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + cp->oclocks[clck].jewel_color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + cp->oclocks[clck].hours.color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + cp->oclocks[clck].minutes.color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + cp->oclocks[clck].seconds.color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + } + /* A new position for the clock */ + cp->oclocks[clck].pos.x = myrand(cp->oclocks[clck].radius, + cp->width - cp->oclocks[clck].radius); + cp->oclocks[clck].pos.y = myrand(cp->oclocks[clck].radius, + cp->height - cp->oclocks[clck].radius); + if (clck == collide(cp, clck)) + return True; + } + cp->currentclocks = clck; + return False; +} + +static void +update_clock(ModeInfo * mi, int clck) +{ + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + + DrawHand(mi, clck, &cp->oclocks[clck].hours, + HourToAngle(&cp->oclocks[clck]), 0); + DrawHand(mi, clck, &cp->oclocks[clck].minutes, + MinutesToAngle(&cp->oclocks[clck]), 0); + DrawHand(mi, clck, &cp->oclocks[clck].seconds, + SecondsToAngle(&cp->oclocks[clck]), 0); + cp->d_time = time((time_t *) 0); + (void) memcpy((char *) &cp->oclocks[clck].dd_time, + (char *) localtime(&cp->d_time), + sizeof (cp->oclocks[clck].dd_time)); + DrawHand(mi, clck, &cp->oclocks[clck].hours, + HourToAngle(&cp->oclocks[clck]), 1); + DrawHand(mi, clck, &cp->oclocks[clck].minutes, + MinutesToAngle(&cp->oclocks[clck]), 1); + DrawHand(mi, clck, &cp->oclocks[clck].seconds, + SecondsToAngle(&cp->oclocks[clck]), 1); +} + +void +init_clock(ModeInfo * mi) +{ + clockstruct *cp; + int clck; + + if (clocks == NULL) { + if ((clocks = (clockstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (clockstruct))) == NULL) + return; + } + cp = &clocks[MI_SCREEN(mi)]; + + + cp->redrawing = 0; + cp->width = MI_WIDTH(mi); + cp->height = MI_HEIGHT(mi); + + MI_CLEARWINDOW(mi); + + cp->nclocks = MI_COUNT(mi); + if (cp->nclocks < -MINCLOCKS) { + /* if cp->nclocks is random ... the size can change */ + if (cp->oclocks != NULL) { + (void) free((void *) cp->oclocks); + cp->oclocks = NULL; + } + cp->nclocks = NRAND(-cp->nclocks - MINCLOCKS + 1) + MINCLOCKS; + } else if (cp->nclocks < MINCLOCKS) + cp->nclocks = MINCLOCKS; + if (cp->oclocks == NULL) + cp->oclocks = (oclock *) malloc(cp->nclocks * sizeof (oclock)); + + cp->clock_count = MI_CYCLES(mi); + if (cp->clock_count < MIN_CYCLES) + cp->clock_count = MIN_CYCLES; + if (cp->clock_count > MAX_CYCLES) + cp->clock_count = MAX_CYCLES; + + for (clck = 0; clck < cp->nclocks; clck++) { + /* By default, we set the clock's colors to white */ + cp->oclocks[clck].border_color = MI_WHITE_PIXEL(mi); + cp->oclocks[clck].jewel_color = MI_WHITE_PIXEL(mi); + cp->oclocks[clck].hours.color = MI_WHITE_PIXEL(mi); + cp->oclocks[clck].minutes.color = MI_WHITE_PIXEL(mi); + cp->oclocks[clck].seconds.color = MI_WHITE_PIXEL(mi); + cp->d_time = time((time_t *) 0); + } + for (clck = 0; clck < cp->nclocks; clck++) { + (void) memcpy((char *) &cp->oclocks[clck].dd_time, + (char *) localtime(&cp->d_time), + sizeof (cp->oclocks[clck].dd_time)); + } + cp->currentclocks = cp->nclocks; + for (clck = 0; clck < cp->currentclocks; clck++) + if (!new_clock_state(mi, clck)) + break; +} + +void +draw_clock(ModeInfo * mi) +{ + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + int clck; + + MI_IS_DRAWN(mi) = True; + + if (++cp->clock_count >= MI_CYCLES(mi)) { + cp->clock_count = 0; + for (clck = 0; clck < cp->currentclocks; clck++) + real_draw_clock(mi, clck, 0); + cp->currentclocks = cp->nclocks; + for (clck = 0; clck < cp->currentclocks; clck++) + if (!new_clock_state(mi, clck)) + break; + for (clck = 0; clck < cp->currentclocks; clck++) + real_draw_clock(mi, clck, 1); + cp->redrawing = 0; + } else if (cp->d_time != time((time_t *) 0)) + for (clck = 0; clck < cp->currentclocks; clck++) + update_clock(mi, clck); + if (cp->redrawing) { + for (clck = 0; clck < cp->currentclocks; clck++) + real_draw_clock(mi, clck, 1); + cp->redrawing = 0; + } +} + +void +release_clock(ModeInfo * mi) +{ + if (clocks != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + clockstruct *cp = &clocks[screen]; + + if (cp->oclocks != NULL) + (void) free((void *) cp->oclocks); + } + (void) free((void *) clocks); + clocks = NULL; + } +} + +void +refresh_clock(ModeInfo * mi) +{ + clockstruct *cp = &clocks[MI_SCREEN(mi)]; + + MI_CLEARWINDOW(mi); + cp->redrawing = 1; +} + +#endif /* MODE_clock */ diff --git a/modes/coral.c b/modes/coral.c new file mode 100644 index 00000000..05fcdb2b --- /dev/null +++ b/modes/coral.c @@ -0,0 +1,332 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* coral --- a coral reef */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)coral.c 4.07 97/11/24 xlockmore"; + +#endif +/* + * Copyright (c) 1997 by "Frederick G.M. Roeber" + * + * 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: + * 29-Oct-97: xlock version (David Bagley ) + * 15-Jul-97: xscreensaver version Frederick G.M. Roeber + */ + +/*- + * original copyright + * Copyright (c) 1997 by "Frederick G.M. Roeber" + * + * 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 STANDALONE +#define PROGCLASS "Coral" +#define HACK_INIT init_coral +#define HACK_DRAW draw_coral +#define coral_opts xlockmore_opts +#define DEFAULTS "*delay: 60000 \n" \ + "*batchcount: -3 \n" \ + "*size: 35 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_coral + +ModeSpecOpt coral_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct coral_description = +{"coral", "init_coral", "draw_coral", "release_coral", + "init_coral", "init_coral", NULL, &coral_opts, + 60000, -3, 1, 35, 64, 0.6, "", + "Shows a coral reef", 0, NULL}; + +#endif + +#define MINSIZE 1 +#define MINSEEDS 1 +#define MAXSIZE 99 +#define MAXPOINTS 200 +#define COLORTHRESH 512 + +typedef struct { + unsigned int default_fg_pixel; + + XPoint *walkers; + XPoint *pointbuf; + unsigned int *reef; + int nwalkers; + int width, widthb; + int height; + int colorindex; + int density; + int seeds; +} coralstruct; + +static coralstruct *reefs = NULL; + +#define getdot(x,y) (cp->reef[(y*cp->widthb)+(x>>5)] & (1<<(x & 31))) +/* Avoid array bounds reads and writes */ +#define setdot(x,y) (cp->reef[((y*cp->widthb)+(x>>5) >= 0 ? (y*cp->widthb)+(x>>5) : 0)] |= (1<<(x & 31))) + +/*- + * returns 2 bits of randomness (conserving calls to LRAND()). + * This speeds things up a little, but not a lot (5-10% or so.) + */ +static int +rand_2(void) +{ + static int i = 0; + static int r = 0; + + if (i) { + i--; + } else { + i = 15; + r = (int) LRAND(); + } + + { + register int j = (r & 3); + + r = r >> 2; + return j; + } +} + + +void +init_coral(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + coralstruct *cp; + int size = MI_SIZE(mi); + + int i; + + if (reefs == NULL) { + if ((reefs = (coralstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (coralstruct))) == NULL) + return; + } + cp = &reefs[MI_SCREEN(mi)]; + + + cp->width = MAX(MI_WIDTH(mi), 2); + cp->height = MAX(MI_HEIGHT(mi), 2); + + cp->widthb = ((cp->width + 31) >> 5); + + if (cp->reef) { + (void) free((void *) cp->reef); + cp->reef = NULL; + } + cp->reef = (unsigned int *) calloc((cp->widthb + 1) * cp->height, + sizeof (unsigned int)); + + if (!cp->reef) + return; + + if (size < -MINSIZE) + cp->density = NRAND(MIN(MAXSIZE, -size) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + cp->density = MINSIZE; + else + cp->density = MIN(MAXSIZE, size); + + cp->nwalkers = (cp->width * cp->height * cp->density) / 100; + if (cp->walkers) { + (void) free((void *) cp->walkers); + cp->walkers = NULL; + } + cp->walkers = (XPoint *) calloc(cp->nwalkers, sizeof (XPoint)); + if (!cp->walkers) + return; + + cp->seeds = MI_COUNT(mi); + if (cp->seeds < -MINSEEDS) + cp->seeds = NRAND(-cp->seeds - MINSEEDS + 1) + MINSEEDS; + else if (cp->seeds < MINSEEDS) + cp->seeds = MINSEEDS; + + MI_CLEARWINDOW(mi); + + if (MI_NPIXELS(mi) > 2) { + cp->colorindex = NRAND(MI_NPIXELS(mi) * COLORTHRESH); + XSetForeground(display, gc, MI_PIXEL(mi, cp->colorindex / COLORTHRESH)); + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + for (i = 0; i < cp->seeds; i++) { + int x, y; + + do { + x = NRAND(cp->width); + y = NRAND(cp->height); + } while (getdot(x, y)); + + setdot((x - 1), (y - 1)); + setdot(x, (y - 1)); + setdot((x + 1), (y - 1)); + setdot((x - 1), y); + setdot(x, y); + setdot((x + 1), y); + setdot((x - 1), (y + 1)); + setdot(x, (y + 1)); + setdot((x + 1), (y + 1)); + XDrawPoint(display, window, gc, x, y); + } + + for (i = 0; i < cp->nwalkers; i++) { + cp->walkers[i].x = NRAND(cp->width - 2) + 1; + cp->walkers[i].y = NRAND(cp->height - 2) + 1; + } + if (cp->pointbuf) { + (void) free((void *) cp->pointbuf); + cp->pointbuf = NULL; + } + cp->pointbuf = (XPoint *) calloc((MAXPOINTS + 2), sizeof (XPoint)); + if (!cp->pointbuf) + return; +} + + +void +draw_coral(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + coralstruct *cp = &reefs[MI_SCREEN(mi)]; + + int npoints = 0; + + + int i; + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < cp->nwalkers; i++) { + int x = cp->walkers[i].x; + int y = cp->walkers[i].y; + + if (getdot(x, y)) { + + /* XDrawPoint(display, window, gc, x, y); */ + cp->pointbuf[npoints].x = x; + cp->pointbuf[npoints].y = y; + npoints++; + + /* Mark the surrounding area as "sticky" */ + setdot((x - 1), (y - 1)); + setdot(x, (y - 1)); + setdot((x + 1), (y - 1)); + setdot((x - 1), y); + setdot((x + 1), y); + setdot((x - 1), (y + 1)); + setdot(x, (y + 1)); + setdot((x + 1), (y + 1)); + cp->nwalkers--; + cp->walkers[i].x = cp->walkers[cp->nwalkers].x; + cp->walkers[i].y = cp->walkers[cp->nwalkers].y; + + if (0 == cp->nwalkers || npoints >= MAXPOINTS) { + XDrawPoints(display, window, gc, cp->pointbuf, npoints, + CoordModeOrigin); + npoints = 0; + } + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, cp->colorindex / COLORTHRESH)); + if (++cp->colorindex >= MI_NPIXELS(mi) * COLORTHRESH) + cp->colorindex = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + if (0 == cp->nwalkers) { + if (cp->pointbuf) + (void) free((void *) cp->pointbuf); + cp->pointbuf = 0; + init_coral(mi); + return; + } + } else { + /* move it a notch */ + switch (rand_2()) { + case 0: + if (1 == x) + continue; + cp->walkers[i].x--; + break; + case 1: + if (cp->width - 2 == x) + continue; + cp->walkers[i].x++; + break; + case 2: + if (1 == y) + continue; + cp->walkers[i].y--; + break; + default: /* case 3: */ + if (cp->height - 2 == y) + continue; + cp->walkers[i].y++; + break; + } + } + } + + if (npoints > 0) { + XDrawPoints(display, window, gc, cp->pointbuf, npoints, + CoordModeOrigin); + npoints = 0; + } +} + +void +release_coral(ModeInfo * mi) +{ + if (reefs != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + coralstruct *cp = &reefs[screen]; + + if (cp->reef != NULL) + (void) free((void *) cp->reef); + if (cp->pointbuf != NULL) + (void) free((void *) cp->pointbuf); + if (cp->walkers != NULL) + (void) free((void *) cp->walkers); + } + (void) free((void *) reefs); + reefs = NULL; + } +} + +#endif /* MODE_coral */ diff --git a/modes/crystal.c b/modes/crystal.c new file mode 100644 index 00000000..d9f66e0a --- /dev/null +++ b/modes/crystal.c @@ -0,0 +1,1274 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* crystal --- polygons moving according to plane group rules */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)crystal.c 4.12 98/09/10 xlockmore"; + +#endif + +/*- + * Copyright (c) 1997 by Jouk Jansen + * + * 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 author should like to be notified if changes have been made to the + * routine. Response will only be guaranteed when a VMS version of the + * program is available. + * + * A moving polygon-mode. The polygons obey 2D-planegroup symmetry. + * + * The groupings of the cells fall in 3 categories: + * oblique groups 1 and 2 where the angle gamma ranges from 60 to 120 degrees + * square groups 3 through 11 where the angle gamma is 90 degrees + * hexagonal groups 12 through 17 where the angle gamma is 120 degrees + * + * Revision History: + * 03-Dec-98: Random inversion of y-axis included to simulate hexagonal groups + * with an angle of 60 degrees. + * 10-Sep-98: new colour scheme + * 24-Feb-98: added option centre which turns on/off forcing the centre of + * the screen to be used + * added option maxsize which forces the dimensions to be chasen + * in such ua way that the largest possible part of the screen is + * used + * When only one unit cell is drawn, it is chosen at random + * 18-Feb-98: added support for negative numbers with -nx and -ny meaning + * "random" choice with given maximum + * added +/-grid option. If -cell is specified this option + * determines if one or all unit cells are drawn. + * -batchcount is now a parameter for all the objects on the screen + * instead of the number of "unique" objects + * The maximum size of the objects now scales with the part + * of the screen used. + * fixed "size" problem. Now very small non-vissable objects + * are not allowed + * 13-Feb-98: randomized the unit cell size + * runtime options -/+cell (turn on/off unit cell drawing) + * -nx num (number of translational symmetries in x-direction + * -ny num (idem y-direction but ignored for square and + * hexagonal space groups + * i.e. try xlock -mode crystal -nx 3 -ny 2 + * Fullrandom overrules the -/+cell option. + * 05-Feb-98: Revision + bug repairs + * shows unit cell + * use part of the screen for unit cell + * in hexagonal and square groups a&b axis forced to be equal + * cell angle for oblique groups randomly chosen between 60 and 120 + * bugs solved: planegroups with cell angles <> 90.0 now work properly + * 19-Sep-97: Added remaining hexagonal groups + * 12-Jun-97: Created + */ + +#ifdef STANDALONE +#define PROGCLASS "Crystal" +#define HACK_INIT init_crystal +#define HACK_DRAW draw_crystal +#define crystal_opts xlockmore_opts +#define DEFAULTS "*delay: 60000 \n" \ + "*count: -500 \n" \ + "*cycles: 200 \n" \ + "*size: -15 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ + +#ifdef MODE_crystal + +#define DEF_CELL "True" /* Draw unit cell */ +#define DEF_GRID "False" /* Draw unit all cell if DEF_CELL is True */ +#define DEF_NX "-3" /* number of unit cells in x-direction */ +#define DEF_NX1 1 /* number of unit cells in x-direction */ +#define DEF_NY "-3" /* number of unit cells in y-direction */ +#define DEF_NY1 1 /* number of unit cells in y-direction */ +#define DEF_CENTRE "False" +#define DEF_MAXSIZE "False" +#define DEF_CYCLE "True" + +#define min(a,b) ((a) <= (b) ? (a) : (b)) + +static int nx, ny; + +static Bool unit_cell, grid_cell, centre, maxsize, cycle_p; + +static XrmOptionDescRec opts[] = +{ + {"-nx", "crystal.nx", XrmoptionSepArg, (caddr_t) NULL}, + {"-ny", "crystal.ny", XrmoptionSepArg, (caddr_t) NULL}, + {"-centre", ".crystal.centre", XrmoptionNoArg, (caddr_t) "on"}, + {"+centre", ".crystal.centre", XrmoptionNoArg, (caddr_t) "off"}, + {"-maxsize", ".crystal.maxsize", XrmoptionNoArg, (caddr_t) "on"}, + {"+maxsize", ".crystal.maxsize", XrmoptionNoArg, (caddr_t) "off"}, + {"-cell", ".crystal.cell", XrmoptionNoArg, (caddr_t) "on"}, + {"+cell", ".crystal.cell", XrmoptionNoArg, (caddr_t) "off"}, + {"-grid", ".crystal.grid", XrmoptionNoArg, (caddr_t) "on"}, + {"+grid", ".crystal.grid", XrmoptionNoArg, (caddr_t) "off"}, + {"-shift", ".crystal.shift", XrmoptionNoArg, (caddr_t) "on"}, + {"+shift", ".crystal.shift", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & nx, "nx", "nx", DEF_NX, t_Int}, + {(caddr_t *) & ny, "ny", "ny", DEF_NY, t_Int}, + {(caddr_t *) & centre, "centre", "Centre", DEF_CENTRE, t_Bool}, + {(caddr_t *) & maxsize, "maxsize", "Maxsize", DEF_MAXSIZE, t_Bool}, + {(caddr_t *) & unit_cell, "cell", "Cell", DEF_CELL, t_Bool}, + {(caddr_t *) & grid_cell, "grid", "Grid", DEF_GRID, t_Bool}, + {(caddr_t *) & cycle_p, "shift", "Shift", DEF_CYCLE, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-nx num", "Number of unit cells in x-direction"}, + {"-ny num", "Number of unit cells in y-direction"}, + {"-/+centre", "turn on/off centering on screen"}, + {"-/+maxsize", "turn on/off use of maximum part of screen"}, + {"-/+cell", "turn on/off drawing of unit cell"}, + {"-/+grid", "turn on/off drawing of grid of unit cells (if -cell is on)"}, + {"-/+shift", "turn on/off colour cycling"} +}; + +ModeSpecOpt crystal_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct crystal_description = +{"crystal", "init_crystal", "draw_crystal", "release_crystal", + "refresh_crystal", "init_crystal", NULL, &crystal_opts, + 60000, -40, 200, -15, 64, 1.0, "", + "Shows polygons in 2D plane groups", 0, NULL}; + +#endif + +#define DEF_NUM_ATOM 10 + +#define DEF_SIZ_ATOM 10 + +#define PI_RAD (M_PI / 180.0) + +static Bool centro[17] = +{ + False, + True, + False, + False, + False, + True, + True, + True, + True, + True, + True, + True, + False, + False, + False, + True, + True +}; + +static Bool primitive[17] = +{ + True, + True, + True, + True, + False, + True, + True, + True, + False, + True, + True, + True, + True, + True, + True, + True, + True +}; + +static short numops[34] = +{ + 1, 0, + 1, 0, + 9, 7, + 2, 0, + 9, 7, + 9, 7, + 4, 2, + 5, 3, + 9, 7, + 8, 6, + 10, 6, + 8, 4, + 16, 13, + 19, 13, + 16, 10, + 19, 13, + 19, 13 +}; + +static short operation[114] = +{ + 1, 0, 0, 1, 0, 0, + -1, 0, 0, 1, 0, 1, + -1, 0, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 0, + -1, 0, 0, 1, 1, 1, + 1, 0, 0, 1, 1, 1, + 0, -1, 1, 0, 0, 0, + 1, 0, 0, 1, 0, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 1, 0, 0, 0, + -1, 0, -1, 1, 0, 0, + 1, -1, 0, -1, 0, 0, + 0, 1, 1, 0, 0, 0, + 0, -1, 1, -1, 0, 0, + -1, 1, -1, 0, 0, 0, + 1, 0, 0, 1, 0, 0, + 0, -1, -1, 0, 0, 0, + -1, 1, 0, 1, 0, 0, + 1, 0, 1, -1, 0, 0 +}; + +typedef struct { + unsigned long colour; + int x0, y0, velocity[2]; + float angle, velocity_a; + int num_point, at_type, size_at; + XPoint xy[5]; +} crystalatom; + +typedef struct { + Bool painted; + int win_width, win_height, num_atom; + int planegroup, a, b, offset_w, offset_h, nx, ny; + float gamma; + crystalatom *atom; + GC gc; + Bool unit_cell, grid_cell; + Colormap cmap; + XColor *colors; + int ncolors; + Bool cycle_p, mono_p, no_colors; + unsigned long blackpixel, whitepixel, fg, bg; + int direction , invert; +} crystalstruct; + +static crystalstruct *crystals = NULL; + +static void +trans_coor(XPoint * xyp, XPoint * new_xyp, int num_points, + float gamma ) +{ + int i; + + for (i = 0; i <= num_points; i++) { + new_xyp[i].x = xyp[i].x + + (int) (xyp[i].y * sin((gamma - 90.0) * PI_RAD)); + new_xyp[i].y = (int) (xyp[i].y / cos((gamma - 90.0) * PI_RAD)); + } +} + +static void +trans_coor_back(XPoint * xyp, XPoint * new_xyp, + int num_points, float gamma, int offset_w, int offset_h , + int winheight , int invert ) +{ + int i; + + for (i = 0; i <= num_points; i++) { + new_xyp[i].y = (int) (xyp[i].y * cos((gamma - 90) * PI_RAD)) + + offset_h; + new_xyp[i].x = xyp[i].x - (int) (xyp[i].y * sin((gamma - 90.0) + * PI_RAD)) + offset_w; + if ( invert ) new_xyp[i].y = winheight - new_xyp[i].y; + } +} + +static void +crystal_setupatom(crystalatom * atom0, float gamma) +{ + XPoint xy[5]; + int x0, y0; + + y0 = (int) (atom0->y0 * cos((gamma - 90) * PI_RAD)); + x0 = atom0->x0 - (int) (atom0->y0 * sin((gamma - 90.0) * PI_RAD)); + switch (atom0->at_type) { + case 0: /* rectangles */ + xy[0].x = x0 + (int) (2 * atom0->size_at * + cos(atom0->angle)) + + (int) (atom0->size_at * sin(atom0->angle)); + xy[0].y = y0 + (int) (atom0->size_at * + cos(atom0->angle)) - + (int) (2 * atom0->size_at * sin(atom0->angle)); + xy[1].x = x0 + (int) (2 * atom0->size_at * + cos(atom0->angle)) - + (int) (atom0->size_at * sin(atom0->angle)); + xy[1].y = y0 - (int) (atom0->size_at * + cos(atom0->angle)) - + (int) (2 * atom0->size_at * sin(atom0->angle)); + xy[2].x = x0 - (int) (2 * atom0->size_at * + cos(atom0->angle)) - + (int) (atom0->size_at * sin(atom0->angle)); + xy[2].y = y0 - (int) (atom0->size_at * + cos(atom0->angle)) + + (int) (2 * atom0->size_at * sin(atom0->angle)); + xy[3].x = x0 - (int) (2 * atom0->size_at * + cos(atom0->angle)) + + (int) (atom0->size_at * sin(atom0->angle)); + xy[3].y = y0 + (int) (atom0->size_at * + cos(atom0->angle)) + + (int) (2 * atom0->size_at * + sin(atom0->angle)); + xy[4].x = xy[0].x; + xy[4].y = xy[0].y; + trans_coor(xy, atom0->xy, 4, gamma); + return; + case 1: /* squares */ + xy[0].x = x0 + (int) (1.5 * atom0->size_at * + cos(atom0->angle)) + + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[0].y = y0 + (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[1].x = x0 + (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[1].y = y0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[2].x = x0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[2].y = y0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) + + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[3].x = x0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) + + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[3].y = y0 + (int) (1.5 * atom0->size_at * + cos(atom0->angle)) + + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[4].x = xy[0].x; + xy[4].y = xy[0].y; + trans_coor(xy, atom0->xy, 4, gamma); + return; + case 2: /* triangles */ + xy[0].x = x0 + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[0].y = y0 + (int) (1.5 * atom0->size_at * + cos(atom0->angle)); + xy[1].x = x0 + (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[1].y = y0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[2].x = x0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) - + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[2].y = y0 - (int) (1.5 * atom0->size_at * + cos(atom0->angle)) + + (int) (1.5 * atom0->size_at * + sin(atom0->angle)); + xy[3].x = xy[0].x; + xy[3].y = xy[0].y; + trans_coor(xy, atom0->xy, 3, gamma); + return; + } +} + +static void +crystal_drawatom(ModeInfo * mi, crystalatom * atom0) +{ + crystalstruct *cryst; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int j, k, l, m; + + cryst = &crystals[MI_SCREEN(mi)]; + for (j = numops[2 * cryst->planegroup + 1]; + j < numops[2 * cryst->planegroup]; j++) { + XPoint xy[5], new_xy[5]; + XPoint xy_1[5]; + int xtrans, ytrans; + + xtrans = operation[j * 6] * atom0->x0 + operation[j * 6 + 1] * + atom0->y0 + (int) (operation[j * 6 + 4] * cryst->a / + 2.0); + ytrans = operation[j * 6 + 2] * atom0->x0 + operation[j * 6 + + 3] * atom0->y0 + (int) (operation[j * 6 + 5] * + cryst->b / 2.0); + if (xtrans < 0) { + if (xtrans < -cryst->a) + xtrans = 2 * cryst->a; + else + xtrans = cryst->a; + } else if (xtrans >= cryst->a) + xtrans = -cryst->a; + else + xtrans = 0; + if (ytrans < 0) + ytrans = cryst->b; + else if (ytrans >= cryst->b) + ytrans = -cryst->b; + else + ytrans = 0; + for (k = 0; k < atom0->num_point; k++) { + xy[k].x = operation[j * 6] * atom0->xy[k].x + + operation[j * 6 + 1] * + atom0->xy[k].y + (int) (operation[j * 6 + 4] * + cryst->a / 2.0) + + xtrans; + xy[k].y = operation[j * 6 + 2] * atom0->xy[k].x + + operation[j * 6 + 3] * + atom0->xy[k].y + (int) (operation[j * 6 + 5] * + cryst->b / 2.0) + + ytrans; + } + xy[atom0->num_point].x = xy[0].x; + xy[atom0->num_point].y = xy[0].y; + for (l = 0; l < cryst->nx; l++) { + for (m = 0; m < cryst->ny; m++) { + + for (k = 0; k <= atom0->num_point; k++) { + xy_1[k].x = xy[k].x + l * cryst->a; + xy_1[k].y = xy[k].y + m * cryst->b; + } + trans_coor_back(xy_1, new_xy, atom0->num_point, + cryst->gamma, cryst->offset_w, + cryst->offset_h , + cryst->win_height, + cryst->invert); + XFillPolygon(display, window, cryst->gc, new_xy, + atom0->num_point, Convex, CoordModeOrigin); + } + } + if (centro[cryst->planegroup] == True) { + for (k = 0; k <= atom0->num_point; k++) { + xy[k].x = cryst->a - xy[k].x; + xy[k].y = cryst->b - xy[k].y; + } + for (l = 0; l < cryst->nx; l++) { + for (m = 0; m < cryst->ny; m++) { + + for (k = 0; k <= atom0->num_point; k++) { + xy_1[k].x = xy[k].x + l * cryst->a; + xy_1[k].y = xy[k].y + m * cryst->b; + } + trans_coor_back(xy_1, new_xy, atom0->num_point, + cryst->gamma, + cryst->offset_w, + cryst->offset_h , + cryst->win_height , + cryst->invert); + XFillPolygon(display, window, cryst->gc, + new_xy, + atom0->num_point, Convex, + CoordModeOrigin); + } + } + } + if (primitive[cryst->planegroup] == False) { + if (xy[atom0->num_point].x >= (int) (cryst->a / 2.0)) + xtrans = (int) (-cryst->a / 2.0); + else + xtrans = (int) (cryst->a / 2.0); + if (xy[atom0->num_point].y >= (int) (cryst->b / 2.0)) + ytrans = (int) (-cryst->b / 2.0); + else + ytrans = (int) (cryst->b / 2.0); + for (k = 0; k <= atom0->num_point; k++) { + xy[k].x = xy[k].x + xtrans; + xy[k].y = xy[k].y + ytrans; + } + for (l = 0; l < cryst->nx; l++) { + for (m = 0; m < cryst->ny; m++) { + + for (k = 0; k <= atom0->num_point; k++) { + xy_1[k].x = xy[k].x + l * cryst->a; + xy_1[k].y = xy[k].y + m * cryst->b; + } + trans_coor_back(xy_1, new_xy, atom0->num_point, + cryst->gamma, + cryst->offset_w, + cryst->offset_h , + cryst->win_height, + cryst->invert); + XFillPolygon(display, window, cryst->gc, + new_xy, + atom0->num_point, Convex, + CoordModeOrigin); + } + } + if (centro[cryst->planegroup] == True) { + XPoint xy1[5]; + + for (k = 0; k <= atom0->num_point; k++) { + xy1[k].x = cryst->a - xy[k].x; + xy1[k].y = cryst->b - xy[k].y; + } + for (l = 0; l < cryst->nx; l++) { + for (m = 0; m < cryst->ny; m++) { + + for (k = 0; k <= atom0->num_point; k++) { + xy_1[k].x = xy1[k].x + l * cryst->a; + xy_1[k].y = xy1[k].y + m * cryst->b; + } + trans_coor_back(xy_1, new_xy, atom0->num_point, + cryst->gamma, + cryst->offset_w, + cryst->offset_h , + cryst->win_height, + cryst->invert); + XFillPolygon(display, window, + cryst->gc, + new_xy, atom0->num_point, + Convex, CoordModeOrigin); + } + } + } + } + } +} + +void +draw_crystal(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + crystalstruct *cryst = &crystals[MI_SCREEN(mi)]; + int i; + + if (cryst->no_colors) { + release_crystal(mi); + init_crystal(mi); + return; + } + cryst->painted = True; + MI_IS_DRAWN(mi) = True; + XSetFunction(display, cryst->gc, GXxor); + +/* Rotate colours */ + if (cryst->cycle_p) { + rotate_colors(display, cryst->cmap, cryst->colors, cryst->ncolors, + cryst->direction); + if (!(LRAND() % 1000)) + cryst->direction = -cryst->direction; + } + for (i = 0; i < cryst->num_atom; i++) { + crystalatom *atom0; + + atom0 = &cryst->atom[i]; + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XSetForeground(display, cryst->gc, cryst->colors[atom0->colour].pixel); + } else { + XSetForeground(display, cryst->gc, atom0->colour); + } + crystal_drawatom(mi, atom0); + atom0->velocity[0] += NRAND(3) - 1; + atom0->velocity[0] = MAX(-20, MIN(20, atom0->velocity[0])); + atom0->velocity[1] += NRAND(3) - 1; + atom0->velocity[1] = MAX(-20, MIN(20, atom0->velocity[1])); + atom0->x0 += atom0->velocity[0]; + /*if (cryst->gamma == 90.0) { */ + if (atom0->x0 < 0) + atom0->x0 += cryst->a; + else if (atom0->x0 >= cryst->a) + atom0->x0 -= cryst->a; + atom0->y0 += atom0->velocity[1]; + if (atom0->y0 < 0) + atom0->y0 += cryst->b; + else if (atom0->y0 >= cryst->b) + atom0->y0 -= cryst->b; + /*} */ + atom0->velocity_a += ((float) NRAND(1001) - 500.0) / 2000.0; + atom0->angle += atom0->velocity_a; + crystal_setupatom(atom0, cryst->gamma); + crystal_drawatom(mi, atom0); + } + XSetFunction(display, cryst->gc, GXcopy); +} + +void +refresh_crystal(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + crystalstruct *cryst = &crystals[MI_SCREEN(mi)]; + int i; + + if (!cryst->painted) + return; + MI_CLEARWINDOW(mi); + XSetFunction(display, cryst->gc, GXxor); + + if (cryst->unit_cell) { + int y_coor1 , y_coor2; + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, cryst->gc, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi)))); + else + XSetForeground(display, cryst->gc, MI_WHITE_PIXEL(mi)); + if (cryst->grid_cell) { + int inx, iny; + + if ( cryst->invert ) + y_coor1 = y_coor2 = cryst->win_height - cryst->offset_h; + else + y_coor1 = y_coor2 = cryst->offset_h; + XDrawLine(display, window, cryst->gc, cryst->offset_w, + y_coor1, cryst->offset_w + cryst->nx * cryst->a, + y_coor2); + if ( cryst->invert ) + { + y_coor1 = cryst->win_height - cryst->offset_h; + y_coor2 = cryst->win_height - (int) (cryst->ny * + cryst->b * + cos((cryst->gamma - 90) * PI_RAD)) - + cryst->offset_h; + } + else + { + y_coor1 = cryst->offset_h; + y_coor2 = (int) (cryst->ny * cryst->b * + cos((cryst->gamma - 90) * PI_RAD)) + + cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, cryst->offset_w, + y_coor1, (int) (cryst->offset_w - cryst->ny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + inx = cryst->nx; + for (iny = 1; iny <= cryst->ny; iny++) { + if ( cryst->invert ) + { + y_coor1 = cryst->win_height - + (int) (iny * cryst->b * cos((cryst->gamma - 90) * + PI_RAD)) - cryst->offset_h; + y_coor2 = cryst->win_height - + (int) (iny * cryst->b * cos((cryst->gamma - 90) * + PI_RAD)) - + cryst->offset_h; + } + else + { + y_coor1 = (int) (iny * cryst->b * cos((cryst->gamma - 90) * + PI_RAD)) + cryst->offset_h; + y_coor2 = (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + + cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, + (int) (cryst->offset_w + + inx * cryst->a - (int) (iny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD))), + y_coor1, + (int) (cryst->offset_w - iny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + } + iny = cryst->ny; + for (inx = 1; inx <= cryst->nx; inx++) { + if ( cryst->invert ) + { + y_coor1 =cryst->win_height - + (int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) - cryst->offset_h; + y_coor2 =cryst->win_height - cryst->offset_h; + } + else + { + y_coor1 =(int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) + cryst->offset_h; + y_coor2 =cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, + (int) (cryst->offset_w + + inx * cryst->a - (int) (iny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD))), + y_coor1, + cryst->offset_w + inx * cryst->a, + y_coor2); + } + } else { + int inx, iny; + + inx = NRAND(cryst->nx); + iny = NRAND(cryst->ny); + if ( cryst->invert ) + { + y_coor1 =cryst->win_height - + (int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) - + cryst->offset_h; + y_coor2 =cryst->win_height - + (int) ( ( iny + 1 ) * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) - + cryst->offset_h; + } + else + { + y_coor1 =(int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) + + cryst->offset_h; + y_coor2 =(int) (( iny + 1 ) * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) + + cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, + cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1, + cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1); + XDrawLine(display, window, cryst->gc, + cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1, + cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + XDrawLine(display, window, cryst->gc, + cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1, + cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + XDrawLine(display, window, cryst->gc, + cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2, + cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + } + } + for (i = 0; i < cryst->num_atom; i++) { + crystalatom *atom0; + + atom0 = &cryst->atom[i]; + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XSetForeground(display, cryst->gc, cryst->colors[atom0->colour].pixel); + } else { + XSetForeground(display, cryst->gc, atom0->colour); + } + crystal_drawatom(mi, atom0); + } + XSetFunction(display, cryst->gc, GXcopy); +} + +void +release_crystal(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + + if (crystals != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + crystalstruct *cryst = &crystals[screen]; + + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + MI_WHITE_PIXEL(mi) = cryst->whitepixel; + MI_BLACK_PIXEL(mi) = cryst->blackpixel; +#ifndef STANDALONE + MI_FG_PIXEL(mi) = cryst->fg; + MI_BG_PIXEL(mi) = cryst->bg; +#endif + if (cryst->colors && cryst->ncolors && !cryst->no_colors) + free_colors(display, cryst->cmap, cryst->colors, cryst->ncolors); + if (cryst->colors) + (void) free((void *) cryst->colors); + XFreeColormap(display, cryst->cmap); + } + if (cryst->gc != NULL) + XFreeGC(display, cryst->gc); + if (cryst->atom != NULL) + (void) free((void *) cryst->atom); + } + (void) free((void *) crystals); + crystals = NULL; + } +} + +void +init_crystal(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + crystalstruct *cryst; + int i, max_atoms, size_atom, neqv; + int cell_min; + +#define MIN_CELL 200 + +/* initialize */ + if (crystals == NULL) { + if ((crystals = (crystalstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (crystalstruct))) == NULL) + return; + } + cryst = &crystals[MI_SCREEN(mi)]; + + if (!cryst->gc) { + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XColor color; + +#ifndef STANDALONE + extern char *background; + extern char *foreground; + + cryst->fg = MI_FG_PIXEL(mi); + cryst->bg = MI_BG_PIXEL(mi); +#endif + cryst->blackpixel = MI_BLACK_PIXEL(mi); + cryst->whitepixel = MI_WHITE_PIXEL(mi); + cryst->cmap = XCreateColormap(display, window, + MI_VISUAL(mi), AllocNone); + XSetWindowColormap(display, window, cryst->cmap); + (void) XParseColor(display, cryst->cmap, "black", &color); + (void) XAllocColor(display, cryst->cmap, &color); + MI_BLACK_PIXEL(mi) = color.pixel; + (void) XParseColor(display, cryst->cmap, "white", &color); + (void) XAllocColor(display, cryst->cmap, &color); + MI_WHITE_PIXEL(mi) = color.pixel; +#ifndef STANDALONE + (void) XParseColor(display, cryst->cmap, background, &color); + (void) XAllocColor(display, cryst->cmap, &color); + MI_BG_PIXEL(mi) = color.pixel; + (void) XParseColor(display, cryst->cmap, foreground, &color); + (void) XAllocColor(display, cryst->cmap, &color); + MI_FG_PIXEL(mi) = color.pixel; +#endif + cryst->colors = 0; + cryst->ncolors = 0; + } + if ((cryst->gc = XCreateGC(display, MI_WINDOW(mi), + (unsigned long) 0, (XGCValues *) NULL)) == None) + return; + } +/* Clear Display */ + MI_CLEARWINDOW(mi); + cryst->painted = False; + XSetFunction(display, cryst->gc, GXxor); + + +/*Set up crystal data */ + cryst->direction = (LRAND() & 1) ? 1 : -1; + if (MI_IS_FULLRANDOM(mi)) { + if (LRAND() & 1) + cryst->unit_cell = True; + else + cryst->unit_cell = False; + } else + cryst->unit_cell = unit_cell; + if (cryst->unit_cell) { + if (MI_IS_FULLRANDOM(mi)) { + if (LRAND() & 1) + cryst->grid_cell = True; + else + cryst->grid_cell = False; + } else + cryst->grid_cell = grid_cell; + } + cryst->win_width = MI_WIDTH(mi); + cryst->win_height = MI_HEIGHT(mi); + cell_min = min(cryst->win_width / 2 + 1, MIN_CELL); + cell_min = min(cell_min, cryst->win_height / 2 + 1); + cryst->planegroup = NRAND(17); + cryst->invert = NRAND(2); + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "Selected plane group no %d\n", + cryst->planegroup + 1); + if (cryst->planegroup > 11) + cryst->gamma = 120.0; + else if (cryst->planegroup < 2) + cryst->gamma = 60.0 + NRAND(60); + else + cryst->gamma = 90.0; + neqv = numops[2 * cryst->planegroup] - numops[2 * cryst->planegroup + 1]; + if (centro[cryst->planegroup] == True) + neqv = 2 * neqv; + if (primitive[cryst->planegroup] == False) + neqv = 2 * neqv; + + + if (nx > 0) + cryst->nx = nx; + else if (nx < 0) + cryst->nx = NRAND(-nx) + 1; + else + cryst->nx = DEF_NX1; + if (cryst->planegroup > 8) + cryst->ny = cryst->nx; + else if (ny > 0) + cryst->ny = ny; + else if (ny < 0) + cryst->ny = NRAND(-ny) + 1; + else + cryst->ny = DEF_NY1; + neqv = neqv * cryst->nx * cryst->ny; + + cryst->num_atom = MI_COUNT(mi); + max_atoms = MI_COUNT(mi); + if (cryst->num_atom == 0) { + cryst->num_atom = DEF_NUM_ATOM; + max_atoms = DEF_NUM_ATOM; + } else if (cryst->num_atom < 0) { + max_atoms = -cryst->num_atom; + cryst->num_atom = NRAND(-cryst->num_atom) + 1; + } + if (neqv > 1) + cryst->num_atom = cryst->num_atom / neqv + 1; + + if (cryst->atom == NULL) + cryst->atom = (crystalatom *) calloc(max_atoms, sizeof ( + crystalatom)); + + if (maxsize) { + if (cryst->planegroup < 13) { + cryst->gamma = 90.0; + cryst->offset_w = 0; + cryst->offset_h = 0; + if (cryst->planegroup < 10) { + cryst->b = cryst->win_height; + cryst->a = cryst->win_width; + } else { + cryst->b = min(cryst->win_height, cryst->win_width); + cryst->a = cryst->b; + } + } else { + cryst->gamma = 120.0; + cryst->a = (int) (cryst->win_width * 2.0 / 3.0); + cryst->b = cryst->a; + cryst->offset_h = (int) (cryst->b * 0.25 * + cos((cryst->gamma - 90) * PI_RAD)); + cryst->offset_w = (int) (cryst->b * 0.5); + } + } else { + cryst->offset_w = -1; + while (cryst->offset_w < 4 || (int) (cryst->offset_w - cryst->b * + sin((cryst->gamma - 90) * PI_RAD)) < 4) { + cryst->b = NRAND((int) (cryst->win_height / (cos((cryst->gamma - 90) * + PI_RAD))) - cell_min) + cell_min; + if (cryst->planegroup > 8) + cryst->a = cryst->b; + else + cryst->a = NRAND(cryst->win_width - cell_min) + cell_min; + cryst->offset_w = (int) ((cryst->win_width - (cryst->a - cryst->b * + sin((cryst->gamma - 90) * + PI_RAD))) / 2.0); + } + cryst->offset_h = (int) ((cryst->win_height - cryst->b * cos(( + cryst->gamma - 90) * PI_RAD)) / 2.0); + if (!centre) { + if (cryst->offset_h > 0) + cryst->offset_h = NRAND(2 * cryst->offset_h); + cryst->offset_w = (int) (cryst->win_width - cryst->a - + cryst->b * + fabs(sin((cryst->gamma - 90) * PI_RAD))); + if (cryst->gamma > 90.0) { + if (cryst->offset_w > 0) + cryst->offset_w = NRAND(cryst->offset_w) + + (int) (cryst->b * sin((cryst->gamma - 90) * PI_RAD)); + else + cryst->offset_w = (int) (cryst->b * sin((cryst->gamma - 90) * + PI_RAD)); + } else if (cryst->offset_w > 0) + cryst->offset_w = NRAND(cryst->offset_w); + else + cryst->offset_w = 0; + } + } + + size_atom = min((int) ((float) (cryst->a) / 40.) + 1, + (int) ((float) (cryst->b) / 40.) + 1); + if (MI_SIZE(mi) < size_atom) { + if (MI_SIZE(mi) < -size_atom) + size_atom = -size_atom; + else + size_atom = MI_SIZE(mi); + } + cryst->a = cryst->a / cryst->nx; + cryst->b = cryst->b / cryst->ny; + if (cryst->unit_cell) { + int y_coor1 , y_coor2; + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, cryst->gc, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi)))); + else + XSetForeground(display, cryst->gc, MI_WHITE_PIXEL(mi)); + if (cryst->grid_cell) { + int inx, iny; + + if ( cryst->invert ) + y_coor1 = y_coor2 = cryst->win_height - cryst->offset_h; + else + y_coor1 = y_coor2 = cryst->offset_h; + XDrawLine(display, window, cryst->gc, cryst->offset_w, + y_coor1, cryst->offset_w + cryst->nx * cryst->a, + y_coor2); + if ( cryst->invert ) + { + y_coor1 = cryst->win_height - cryst->offset_h; + y_coor2 = cryst->win_height - (int) (cryst->ny * + cryst->b * + cos((cryst->gamma - 90) * PI_RAD)) - + cryst->offset_h; + } + else + { + y_coor1 = cryst->offset_h; + y_coor2 = (int) (cryst->ny * cryst->b * + cos((cryst->gamma - 90) * PI_RAD)) + + cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, cryst->offset_w, + y_coor1, (int) (cryst->offset_w - cryst->ny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + inx = cryst->nx; + for (iny = 1; iny <= cryst->ny; iny++) { + if ( cryst->invert ) + { + y_coor1 = cryst->win_height - + (int) (iny * cryst->b * cos((cryst->gamma - 90) * + PI_RAD)) - cryst->offset_h; + y_coor2 = cryst->win_height - + (int) (iny * cryst->b * cos((cryst->gamma - 90) * + PI_RAD)) - + cryst->offset_h; + } + else + { + y_coor1 = (int) (iny * cryst->b * cos((cryst->gamma - 90) * + PI_RAD)) + cryst->offset_h; + y_coor2 = (int) (iny * cryst->b * cos((cryst->gamma - 90) * PI_RAD)) + + cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, + (int) (cryst->offset_w + + inx * cryst->a - (int) (iny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD))), + y_coor1, + (int) (cryst->offset_w - iny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + } + iny = cryst->ny; + for (inx = 1; inx <= cryst->nx; inx++) { + if ( cryst->invert ) + { + y_coor1 =cryst->win_height - + (int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) - cryst->offset_h; + y_coor2 =cryst->win_height - cryst->offset_h; + } + else + { + y_coor1 =(int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) + cryst->offset_h; + y_coor2 =cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, + (int) (cryst->offset_w + + inx * cryst->a - (int) (iny * cryst->b * + sin((cryst->gamma - 90) * PI_RAD))), + y_coor1, + cryst->offset_w + inx * cryst->a, + y_coor2); + } + } else { + int inx, iny; + + inx = NRAND(cryst->nx); + iny = NRAND(cryst->ny); + if ( cryst->invert ) + { + y_coor1 =cryst->win_height - + (int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) - + cryst->offset_h; + y_coor2 =cryst->win_height - + (int) ( ( iny + 1 ) * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) - + cryst->offset_h; + } + else + { + y_coor1 =(int) (iny * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) + + cryst->offset_h; + y_coor2 =(int) (( iny + 1 ) * cryst->b * + cos((cryst->gamma - 90) * + PI_RAD)) + + cryst->offset_h; + } + XDrawLine(display, window, cryst->gc, + cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1, + cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1); + XDrawLine(display, window, cryst->gc, + cryst->offset_w + inx * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1, + cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + XDrawLine(display, window, cryst->gc, + cryst->offset_w + (inx + 1) * cryst->a - (int) (iny * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor1, + cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + XDrawLine(display, window, cryst->gc, + cryst->offset_w + inx * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2, + cryst->offset_w + (inx + 1) * cryst->a - (int) ((iny + 1) * cryst->b * sin((cryst->gamma - 90) * PI_RAD)), + y_coor2); + } + } + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { +/* Set up colour map */ + if (cryst->colors && cryst->ncolors && !cryst->no_colors) + free_colors(display, cryst->cmap, cryst->colors, cryst->ncolors); + if (cryst->colors) + (void) free((void *) cryst->colors); + cryst->colors = 0; + cryst->ncolors = MI_NCOLORS(mi); + if (cryst->ncolors < 2) + cryst->ncolors = 2; + if (cryst->ncolors <= 2) + cryst->mono_p = True; + else + cryst->mono_p = False; + + if (cryst->mono_p) + cryst->colors = 0; + else + cryst->colors = (XColor *) malloc(sizeof (*cryst->colors) * (cryst->ncolors + 1)); + cryst->cycle_p = has_writable_cells(mi); + if (cryst->cycle_p) { + if (MI_IS_FULLRANDOM(mi)) { + if (!NRAND(8)) + cryst->cycle_p = False; + else + cryst->cycle_p = True; + } else { + cryst->cycle_p = cycle_p; + } + } + if (!cryst->mono_p) { + if (!(LRAND() % 10)) + make_random_colormap( +#ifdef STANDALONE + MI_DISPLAY(mi), MI_WINDOW(mi), +#else + mi, +#endif + cryst->cmap, cryst->colors, &cryst->ncolors, + True, True, &cryst->cycle_p); + else if (!(LRAND() % 2)) + make_uniform_colormap( +#ifdef STANDALONE + MI_DISPLAY(mi), MI_WINDOW(mi), +#else + mi, +#endif + cryst->cmap, cryst->colors, &cryst->ncolors, + True, &cryst->cycle_p); + else + make_smooth_colormap( +#ifdef STANDALONE + MI_DISPLAY(mi), MI_WINDOW(mi), +#else + mi, +#endif + cryst->cmap, cryst->colors, &cryst->ncolors, + True, &cryst->cycle_p); + } + XInstallColormap(display, cryst->cmap); + if (cryst->ncolors < 2) { + cryst->ncolors = 2; + cryst->no_colors = True; + } else + cryst->no_colors = False; + if (cryst->ncolors <= 2) + cryst->mono_p = True; + + if (cryst->mono_p) + cryst->cycle_p = False; + + } + for (i = 0; i < cryst->num_atom; i++) { + crystalatom *atom0; + + atom0 = &cryst->atom[i]; + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + if (cryst->ncolors > 2) + atom0->colour = NRAND(cryst->ncolors - 2) + 2; + else + atom0->colour = 1; /* Just in case */ + XSetForeground(display, cryst->gc, cryst->colors[atom0->colour].pixel); + } else { + if (MI_NPIXELS(mi) > 2) + atom0->colour = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + atom0->colour = 1; /*Xor'red so WHITE may not be appropriate */ + XSetForeground(display, cryst->gc, atom0->colour); + } + atom0->x0 = NRAND(cryst->a); + atom0->y0 = NRAND(cryst->b); + atom0->velocity[0] = NRAND(7) - 3; + atom0->velocity[1] = NRAND(7) - 3; + atom0->velocity_a = (NRAND(7) - 3) * PI_RAD; + atom0->angle = NRAND(90) * PI_RAD; + atom0->at_type = NRAND(3); + if (size_atom == 0) + atom0->size_at = DEF_SIZ_ATOM; + else if (size_atom > 0) + atom0->size_at = size_atom; + else + atom0->size_at = NRAND(-size_atom) + 1; + atom0->size_at++; + if (atom0->at_type == 2) + atom0->num_point = 3; + else + atom0->num_point = 4; + crystal_setupatom(atom0, cryst->gamma); + crystal_drawatom(mi, atom0); + } + XSync(display, False); + XSetFunction(display, cryst->gc, GXcopy); +} + +#endif /* MODE_crystal */ diff --git a/modes/daisy.c b/modes/daisy.c new file mode 100644 index 00000000..9b63f792 --- /dev/null +++ b/modes/daisy.c @@ -0,0 +1,313 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* daisy --- flowers in a field */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)daisy.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 07-Aug-96: written. Initially copied forest.c and made continual + * refinements, pyro was helpful too. Based on a program + * I saw on a PC. + * + */ + +#ifdef STANDALONE +#define PROGCLASS "Daisy" +#define HACK_INIT init_daisy +#define HACK_DRAW draw_daisy +#define daisy_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: 300 \n" \ + "*cycles: 350 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" +#define BRIGHT_COLORS +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_daisy + +#define DEF_GARDEN "False" + +static Bool garden; + +static XrmOptionDescRec opts[] = +{ + {"-garden", ".daisy.garden", XrmoptionNoArg, (caddr_t) "on"}, + {"+garden", ".daisy.garden", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & garden, "garden", "Garden", DEF_GARDEN, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+garden", "turn on/off garden"} +}; + +ModeSpecOpt daisy_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct daisy_description = +{"daisy", "init_daisy", "draw_daisy", "release_daisy", + "refresh_daisy", "init_daisy", NULL, &daisy_opts, + 100000, 300, 350, 1, 64, 1.0, "", + "Shows a meadow of daisies", 0, NULL}; + +#endif + +#define GREEN (23 * MI_NPIXELS(mi) / 64) +#define NOTGREEN (7 * MI_NPIXELS(mi) / 64) +#define MINDAISIES 1 + +#define DROOP 20 /* Percentage x with relation to y */ +#define MINHEIGHT 20 /* Daisy height range */ +#define MAXHEIGHT 40 + +typedef struct { + int width; + int height; + int time; /* up time */ + int ndaisies; + int meadow_y; + Bool garden; + float step; +} daisystruct; + +static daisystruct *daisies = NULL; + +/* always green, straight for now, parabolic later */ +static void +drawstem(ModeInfo * mi, XPoint start, XPoint stop) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, GREEN)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); +#if 1 + XDrawLine(display, window, gc, start.x, start.y, stop.x, stop.y); +#else + XDrawArc(display, window, gc, stop.x, stop.y, + NRAND(50) + 30, start.y - stop.y + 1, 90 * 64, 170 * 64); +#endif +} + +/* not green */ +static unsigned long +drawpetals(ModeInfo * mi, XPoint center, + int size, int circles, int delta, int offset, int petals) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + unsigned long colour = 0; + float start_angle, inc_angle; + XPoint newcenter; + int petal, inc; + float sine, cosine; + + if (MI_NPIXELS(mi) > GREEN + NOTGREEN) { + do { + colour = NRAND(MI_NPIXELS(mi)); + } while ((long) colour >= GREEN - NOTGREEN && + (long) colour <= GREEN + NOTGREEN); + } + start_angle = NRAND(360) * M_PI / 180; + inc_angle = 2 * M_PI / petals; + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (size > 2) + XFillArc(display, window, gc, + center.x - size / 2, center.y - size / 2, size, size, + 0, 23040); + for (petal = 0; petal < petals; petal++) { + sine = SINF(start_angle + petal * inc_angle); + cosine = COSF(start_angle + petal * inc_angle); + if (size > 2) + if (MI_NPIXELS(mi) <= 2) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + for (inc = 0; inc < circles; inc++) { + newcenter.x = center.x + (int) (sine * (offset + delta * inc)); + newcenter.y = center.y + (int) (cosine * (offset + delta * inc)); + XDrawArc(display, window, gc, + newcenter.x - size / 2, newcenter.y - size / 2, size, size, + 0, 23040); + } + } + if (MI_NPIXELS(mi) > 2 && MI_NPIXELS(mi) > GREEN + NOTGREEN) + XSetForeground(display, gc, MI_PIXEL(mi, colour)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + for (inc = 0; inc < circles; inc++) { + newcenter.x = center.x + (int) (sine * (offset + delta * inc)); + newcenter.y = center.y + (int) (cosine * (offset + delta * inc)); + if (size < 2) + XDrawPoint(display, window, gc, newcenter.x, newcenter.y); + else + XFillArc(display, window, gc, + newcenter.x - size / 2, newcenter.y - size / 2, size, size, + 0, 23040); + } + } + return colour; +} + +/* not green */ +static void +drawcenter(ModeInfo * mi, XPoint center, int size, unsigned long petalcolour) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + unsigned long colour; + + if (MI_NPIXELS(mi) > GREEN + NOTGREEN) { + do { + /* Insure good contrast */ + colour = (NRAND(2 * MI_NPIXELS(mi) / 3) + petalcolour + + MI_NPIXELS(mi) / 6) % MI_NPIXELS(mi); + } while ((long) colour >= GREEN - NOTGREEN && + (long) colour <= GREEN + NOTGREEN); + XSetForeground(display, gc, MI_PIXEL(mi, colour)); + } else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (size < 2) + XDrawPoint(display, window, gc, center.x, center.y); + else + XFillArc(display, window, gc, + center.x - size / 2, center.y - size / 2, size, size, 0, 23040); +} + +static void +drawdaisy(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + daisystruct *dp = &daisies[MI_SCREEN(mi)]; + XPoint stem_start, stem_stop; + int height, droop; + unsigned long colour; + + /* Care more about the flower being on the screen rather than the stem */ +#ifdef LINEAR + stem_stop.y = dp->meadow_y + dp->time * dp->step; + height = (NRAND(MAXHEIGHT - MINHEIGHT + 1) + MINHEIGHT) * dp->height / 300 * + 2 * (dp->time + 20) / (dp->ndaisies + 20); +#else + stem_stop.y = dp->meadow_y + (int) ((float) dp->time * dp->time * + dp->step / dp->ndaisies); + height = (NRAND(MAXHEIGHT - MINHEIGHT + 1) + MINHEIGHT) * dp->height / 300 * + 2 * (dp->time * dp->time + 1) / (dp->ndaisies * dp->ndaisies + 1); +#endif + stem_start.y = stem_stop.y + height; + if (dp->garden) { + stem_stop.x = ((LRAND() & 1) ? 1 : -1) * + NRAND(dp->width / 4 * (dp->time + 1) / (dp->ndaisies + 20) + + dp->width / 4) + dp->width / 2; + } else { + stem_stop.x = NRAND(dp->width); + } + /* Give about droop left or right with 25% randomness */ + droop = ((LRAND() & 1) ? 1 : -1) * DROOP * (NRAND(50) + 75) / 100; + stem_start.x = stem_stop.x + droop * height / 100; + XSetLineAttributes(display, gc, height / 24 + 1, + LineSolid, CapNotLast, JoinRound); + drawstem(mi, stem_start, stem_stop); + XSetLineAttributes(display, gc, 1, LineSolid, CapNotLast, JoinRound); + colour = drawpetals(mi, stem_stop, height / 6, 5, height / 32 + 1, + height / 7, NRAND(6) + 6); + drawcenter(mi, stem_stop, height / 7, colour); +} + + +void +init_daisy(ModeInfo * mi) +{ + daisystruct *dp; + + if (daisies == NULL) { + if ((daisies = (daisystruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (daisystruct))) == NULL) + return; + } + dp = &daisies[MI_SCREEN(mi)]; + + dp->width = MI_WIDTH(mi); + dp->height = MI_HEIGHT(mi); + dp->time = 0; + if (MI_IS_FULLRANDOM(mi)) + dp->garden = (Bool) (LRAND() & 1); + else + dp->garden = garden; + + dp->ndaisies = MI_COUNT(mi); + if (dp->ndaisies < -MINDAISIES) + dp->ndaisies = NRAND(-dp->ndaisies - MINDAISIES + 1) + MINDAISIES; + else if (dp->ndaisies < MINDAISIES) + dp->ndaisies = MINDAISIES; + dp->meadow_y = dp->height / 5; + dp->step = (float) (dp->height - 2 * dp->meadow_y) / (dp->ndaisies + 1.0); + MI_CLEARWINDOW(mi); +} + +void +draw_daisy(ModeInfo * mi) +{ + daisystruct *dp = &daisies[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (dp->time < dp->ndaisies) + drawdaisy(mi); + if (++dp->time > MI_CYCLES(mi)) + init_daisy(mi); +} + +void +release_daisy(ModeInfo * mi) +{ + if (daisies != NULL) { + (void) free((void *) daisies); + daisies = NULL; + } +} + +void +refresh_daisy(ModeInfo * mi) +{ + daisystruct *dp = &daisies[MI_SCREEN(mi)]; + + if (dp->time < dp->ndaisies) { + MI_CLEARWINDOW(mi); + } else { + init_daisy(mi); + } +} + +#endif /* MODE_daisy */ diff --git a/modes/dclock.c b/modes/dclock.c new file mode 100644 index 00000000..acc91314 --- /dev/null +++ b/modes/dclock.c @@ -0,0 +1,667 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* dclock --- floating digital clock */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)dclock.c 4.07 97/11/24 xlockmore"; + +#endif +/*- + * Copyright (C) 1995 by Michael Stembera . + * + * 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: + * 04-Dec-98: New "savers" added for hiv, veg, and lab. + hiv one due to Kenneth Stailey + * 10-Aug-98: Population Explosion and Tropical Forest Countdown stuff + * I tried to get precise numbers but they may be off a few percent. + * Whether or not, its still pretty scary IMHO. + * Although I am a US citizen... I have the default for area in + * metric. David Bagley + * 10-May-97: Compatible with xscreensaver + * 29-Aug-95: Written. + */ + +/*- + * Some of my calcualations laid bare... (I have a little problem with + * the consistency of the numbers I got at the Bronx Zoo but proportions + * were figured to be 160.70344 people a minute increase not 180 and + * 35.303144 hectares (87.198766 acres) a minute decrease not 247 (100 acres). + * So I am going with these more conservative numbers.) + * + * Time 0 is 0:00:00 1 Jan 1970 at least according to hard core UNIX fans + * Minutes from 1 Jan 1970 to 21 Jun 1985: 8137440 + * Minutes from 21 Jun 1985 to 12 Jul 1988: 6867360 + * Total: 15004800 + * + * Population Explosion Saver (popex) + * 3,535,369,000 people (figured by extrapolation) 1 Jan 1970 + * 4,843,083,596 people 21 Jun 1985 (Opening of Wild Asia in the Bronx Zoo) + * 5,946,692,000 people 12 Jul 1998 (David Bagley visits zoo ;) ) + * 180 people a minute increase in global population (I heard 170 also) + * 260,000 people a day increase in global population + * + * Tropical Forest Countdown Saver (forest) + * 1,184,193,000 hectares (figured by extrapolation) 1 Jan 1970 + * (2,924,959,000 acres) + * 896,916,700 hectares 21 Jun 1985 (Opening of Wild Asia in the Bronx Zoo) + * (2,215,384,320 acres) + * 654,477,300 hectares 12 Jul 1998 (David Bagley visits zoo ;) ) + * (1,616,559,000 acres) + * 247 hectares a minute lost forever (1 hectare = 2.47 acres) + * + * HIV Infection Counter Saver (hiv) + * -130,828,080 cases (figured by extrapolation) 1 Jan 1970 + * (hmmm...) + * 36,503,000 3 Dec 1998 (from http://www.vers.com/aidsclock/INDEXA.HTM) + * 11 cases/min + * + * 365.25 * 24 * 60 = 525960 minutes in a year + * + * Animal Research Counter Saver (lab) + * Approximately 17-22 million animals are used in research each year. + * OK so assume 17,000,000 / 525960 = 32.32184957 per minute + * http://www.fcs.uga.edu/~mhulsey/GDB.html + * + * Animal Consumation Counter Saver (veg) + * Approximately 5 billion are consumed for food annually. + * OK 5,000,000,000 / 525960 = 9506.426344209 per minute + * http://www.fcs.uga.edu/~mhulsey/GDB.html + */ + +#ifdef STANDALONE +#define PROGCLASS "Dclock" +#define HACK_INIT init_dclock +#define HACK_DRAW draw_dclock +#define dclock_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*cycles: 10000 \n" \ + "*ncolors: 64 \n" +#define BRIGHT_COLORS +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#include "mode.h" +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "util.h" +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_dclock + +#ifndef METRIC +#define METRIC 1 +#endif +#if METRIC +#define AREA_STRING "Hectares" +#define AREA_MIN 35.303144 +#define AREA_TIME_START 1184193000.0 +#else +#define AREA_STRING "Acres" +#define AREA_MIN 87.198766 +#define AREA_TIME_START 2924959000.0 +#endif +#define PEOPLE_MIN 160.70344 +#define PEOPLE_TIME_START 3535369000.0 +#define HIV_MIN 11.0 +#define HIV_TIME_START -130828080.0 +#define LAB_MIN 32.32184957 +#define LAB_TIME_START 0 +#define VEG_MIN 9506.426344209 +#define VEG_TIME_START 0 + +#define DEF_POPEX "False" +#define DEF_FOREST "False" +#define DEF_HIV "False" +#define DEF_LAB "False" +#define DEF_VEG "False" + +static Bool popex; +static Bool forest; +static Bool hiv; +static Bool lab; +static Bool veg; + +static XrmOptionDescRec opts[] = +{ + {"-popex", ".dclock.popex", XrmoptionNoArg, (caddr_t) "on"}, + {"+popex", ".dclock.popex", XrmoptionNoArg, (caddr_t) "off"}, + {"-forest", ".dclock.forest", XrmoptionNoArg, (caddr_t) "on"}, + {"+forest", ".dclock.forest", XrmoptionNoArg, (caddr_t) "off"}, + {"-hiv", ".dclock.hiv", XrmoptionNoArg, (caddr_t) "on"}, + {"+hiv", ".dclock.hiv", XrmoptionNoArg, (caddr_t) "off"}, + {"-lab", ".dclock.lab", XrmoptionNoArg, (caddr_t) "on"}, + {"+lab", ".dclock.lab", XrmoptionNoArg, (caddr_t) "off"}, + {"-veg", ".dclock.veg", XrmoptionNoArg, (caddr_t) "on"}, + {"+veg", ".dclock.veg", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & popex, "popex", "PopEx", DEF_POPEX, t_Bool}, + {(caddr_t *) & forest, "forest", "Forest", DEF_FOREST, t_Bool}, + {(caddr_t *) & hiv, "hiv", "Hiv", DEF_HIV, t_Bool}, + {(caddr_t *) & lab, "lab", "Lab", DEF_LAB, t_Bool}, + {(caddr_t *) & veg, "veg", "Veg", DEF_VEG, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+popex", "turn on/off population explosion"}, + {"-/+forest", "turn on/off tropical forest descruction"}, + {"-/+hiv", "turn on/off HIV infection counter"}, + {"-/+lab", "turn on/off Animal Research counter"}, + {"-/+veg", "turn on/off Animal Consumation counter"} +}; + +ModeSpecOpt dclock_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct dclock_description = +{"dclock", "init_dclock", "draw_dclock", "release_dclock", + "refresh_dclock", "init_dclock", NULL, &dclock_opts, + 10000, 1, 10000, 1, 0.3, 64, "", + "Shows a floating digital clock", 0, NULL}; + +#endif + +#include + +#ifdef FR +#define POPEX_STRING "Population Mondiale" +#define PEOPLE_STRING " Personnes" +#define FOREST_STRING "Nombre des Forets Tropicales" +#define TROPICAL_STRING " Zones Tropicales en " +#define HIV_STRING "Infection par le HIV a l'heure actuelle dans le monde est de" +#define CASES_STRING "" +#define LAB_STRING "Used in research" +#define VEG_STRING "Consumed for Food by Mankind" +#define YEAR_STRING " animals this year" +#else +#ifdef NL +#define POPEX_STRING "Wereld populatie" +#define PEOPLE_STRING " Mensen" +#define FOREST_STRING "Aantal tropische wouden" +#define TROPICAL_STRING " Tropisch gebied in " +#define HIV_STRING "Huidige staat HIV infecties wereldwijd" +#define CASES_STRING " gevallen" +#define LAB_STRING "Used in research" +#define VEG_STRING "Consumed for Food by Mankind" +#define YEAR_STRING " animals this year" +#else +#define POPEX_STRING "World Population" +#define PEOPLE_STRING " People" +#define FOREST_STRING "Tropical Forest Countdown" +#define TROPICAL_STRING " Tropical Forest in " +#define HIV_STRING "Current HIV Infections World Wide" +#define CASES_STRING " Cases" +#define LAB_STRING "Used in research" +#define VEG_STRING "Consumed for Food by Mankind" +#define YEAR_STRING " animals this year" +#endif +#endif + +#define font_height(f) (f->ascent + f->descent) + +extern XFontStruct *getFont(Display * display); + +typedef struct { + int color; + short height, width; + char *str, str1[40], str2[40], str1old[80], str2old[80]; + char *str1pta, *str2pta, *str1ptb, *str2ptb; + time_t timenew, timeold; + short maxx, maxy, clockx, clocky; + short text_height, text_width, text_width1, text_width2; + short text_start1, text_start2; + short hour; + short dx, dy; + int done; + int pixw, pixh; + Pixmap pixmap; + GC fgGC, bgGC; + Bool popex, forest, hiv, lab, veg; +} dclockstruct; + +static dclockstruct *dclocks = NULL; + +static XFontStruct *mode_font = None; + +#define BASE 10.0 +#define GROUP 3 +static double logbase; + +static unsigned long +timeAtLastNewYear(unsigned long timeNow) +{ + int year = 1970, days; /* Beginning of time */ + unsigned long lastNewYear = 0; + unsigned long secondCount = 0; + + while (lastNewYear + secondCount < timeNow) { + lastNewYear += secondCount; + days = 365; + if ((!(year % 400)) || ((year % 100) && (!(year % 4)))) + days++; + secondCount = days * 24 * 60 * 60; + year++; + } + return lastNewYear; +} + +static void +convert(double x, char *string) +{ + int i, j, k = 0; + int place = (int) (log(x) / logbase); + double divisor = 1.0; + + for (i = 0; i < place; i++) + divisor *= BASE; + + for (i = place; i >= 0; i--) { + j = (int) (x / divisor); + string[k++] = (char) j + '0'; + x -= j * divisor; + divisor /= BASE; + if ((i > 0) && (i % GROUP == 0)) { + string[k++] = ','; + } + } + string[k++] = '\0'; +} + +static void +drawDclock(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + dclockstruct *dp = &dclocks[MI_SCREEN(mi)]; + short xold, yold; + char *tmppt; + + xold = dp->clockx; + yold = dp->clocky; + dp->clockx += dp->dx; + dp->clocky += dp->dy; + + if (dp->maxx < dp->text_start1) { + if (dp->clockx < dp->maxx + dp->text_start1 || + dp->clockx > dp->text_start1) { + dp->dx = -dp->dx; + dp->clockx += dp->dx; + } + } else if (dp->maxx > dp->text_start1) { + if (dp->clockx > dp->maxx + dp->text_start1 || + dp->clockx < dp->text_start1) { + dp->dx = -dp->dx; + dp->clockx += dp->dx; + } + } + if (dp->maxy < mode_font->ascent) { + if (dp->clocky > mode_font->ascent || dp->clocky < dp->maxy) { + dp->dy = -dp->dy; + dp->clocky += dp->dy; + } + } else if (dp->maxy > mode_font->ascent) { + if (dp->clocky > dp->maxy || dp->clocky < mode_font->ascent) { + dp->dy = -dp->dy; + dp->clocky += dp->dy; + } + } + if (!dp->popex && !dp->forest && !dp->hiv && !dp->lab && !dp->veg) { + if (dp->timeold != (dp->timenew = time((time_t *) NULL))) { + /* only parse if time has changed */ + dp->timeold = dp->timenew; + dp->str = ctime(&dp->timeold); + + if (!dp->popex && !dp->forest && !dp->hiv && !dp->lab && !dp->veg) { + + /* keep last disp time so it can be cleared even if it changed */ + tmppt = dp->str1ptb; + dp->str1ptb = dp->str1pta; + dp->str1pta = tmppt; + + /* copy the hours portion for 24 to 12 hr conversion */ + (void) strncpy(dp->str1pta, (dp->str + 11), 8); + dp->hour = (short) (dp->str1pta[0] - 48) * 10 + + (short) (dp->str1pta[1] - 48); + if (dp->hour > 12) { + dp->hour -= 12; + (void) strcpy(dp->str1pta + 8, " PM"); + } else { + if (dp->hour == 0) + dp->hour += 12; + (void) strcpy(dp->str1pta + 8, " AM"); + } + dp->str1pta[0] = (dp->hour / 10) + 48; + dp->str1pta[1] = (dp->hour % 10) + 48; + if (dp->str1pta[0] == '0') + dp->str1pta[0] = ' '; + /* keep last disp time so it can be cleared even if it changed */ + } + tmppt = dp->str2ptb; + dp->str2ptb = dp->str2pta; + dp->str2pta = tmppt; + + /* copy day month */ + (void) strncpy(dp->str2pta, dp->str, 11); + /* copy year */ + (void) strncpy(dp->str2pta + 11, (dp->str + 20), 4); + } + } else { + unsigned long timeNow = seconds(); + + if (dp->popex) { + convert(PEOPLE_TIME_START + (PEOPLE_MIN / 60.0) * timeNow, dp->str2); + (void) strcat(dp->str2, PEOPLE_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->forest) { + convert(AREA_TIME_START - (AREA_MIN / 60.0) * timeNow, dp->str2); + (void) strcat(dp->str2, TROPICAL_STRING); + (void) strcat(dp->str2, AREA_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->hiv) { + convert(HIV_TIME_START + (HIV_MIN / 60.0) * timeNow, dp->str2); + (void) strcat(dp->str2, CASES_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->lab) { + convert((LAB_MIN / 60.0) * (timeNow - timeAtLastNewYear(timeNow)), + dp->str2); + (void) strcat(dp->str2, YEAR_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->veg) { + convert((VEG_MIN / 60.0) * (timeNow - timeAtLastNewYear(timeNow)), + dp->str2); + (void) strcat(dp->str2, YEAR_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } + } + if (dp->pixw != dp->text_width || dp->pixh != 2 * dp->text_height) { + XGCValues gcv; + + if (dp->fgGC) + XFreeGC(display, dp->fgGC); + if (dp->bgGC) + XFreeGC(display, dp->bgGC); + if (dp->pixmap) { + XFreePixmap(display, dp->pixmap); + MI_CLEARWINDOW(mi); + } + dp->pixw = dp->text_width; + dp->pixh = 2 * dp->text_height; + dp->pixmap = XCreatePixmap(display, window, dp->pixw, dp->pixh, 1); + gcv.font = mode_font->fid; + gcv.background = 0; + gcv.foreground = 1; + gcv.graphics_exposures = False; + dp->fgGC = XCreateGC(display, dp->pixmap, + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + gcv.foreground = 0; + dp->bgGC = XCreateGC(display, dp->pixmap, + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + } + XFillRectangle(display, dp->pixmap, dp->bgGC, 0, 0, dp->pixw, dp->pixh); + + (void) XDrawString(display, dp->pixmap, dp->fgGC, + dp->text_start1, mode_font->ascent, + dp->str1pta, strlen(dp->str1pta)); + (void) XDrawString(display, dp->pixmap, dp->fgGC, + dp->text_start2, mode_font->ascent + dp->text_height, + dp->str2pta, strlen(dp->str2pta)); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + /* This could leave screen dust on the screen if the width changes + But that only happens once a day... + ... this is solved by the ClearWindow above + */ + ERASE_IMAGE(display, window, gc, + (dp->clockx - dp->text_start1), (dp->clocky - mode_font->ascent), + (xold - dp->text_start1), (yold - mode_font->ascent), + dp->pixw, dp->pixh); + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, dp->color)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XCopyPlane(display, dp->pixmap, window, gc, + 0, 0, dp->text_width, 2 * dp->text_height, + dp->clockx - dp->text_start1, dp->clocky - mode_font->ascent, + 1L); +} + +void +init_dclock(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + dclockstruct *dp; + unsigned long timeNow; + + if (dclocks == NULL) { + logbase = log(BASE); + if ((dclocks = (dclockstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (dclockstruct))) == NULL) + return; + } + dp = &dclocks[MI_SCREEN(mi)]; + + dp->width = MI_WIDTH(mi); + dp->height = MI_HEIGHT(mi); + + MI_CLEARWINDOW(mi); + + dp->popex = False; + dp->forest = False; + dp->hiv = False; + dp->lab = False; + dp->veg = False; + if (MI_IS_FULLRANDOM(mi)) { + switch (NRAND(6)) { + case 1: + dp->popex = True; + break; + case 2: + dp->forest = True; + break; + case 3: + dp->hiv = True; + break; + case 4: + dp->lab = True; + break; + case 5: + dp->veg = True; + break; + default: + break; + } + } else { /* first come, first served */ + dp->popex = popex; + dp->forest = forest; + dp->hiv = hiv; + dp->lab = lab; + dp->veg = veg; + } + + if (mode_font == None) + mode_font = getFont(display); + if (!dp->done) { + dp->done = 1; + if (mode_font != None) + XSetFont(display, MI_GC(mi), mode_font->fid); + } + /* (void)time(&dp->timenew); */ + dp->timeold = dp->timenew = time((time_t *) NULL); + dp->str = ctime(&dp->timeold); + dp->dx = (LRAND() & 1) ? 1 : -1; + dp->dy = (LRAND() & 1) ? 1 : -1; + + if (dp->popex) { + dp->str1pta = POPEX_STRING; + dp->str1ptb = dp->str1pta; + } else if (dp->forest) { + dp->str1pta = FOREST_STRING; + dp->str1ptb = dp->str1pta; + } else if (dp->hiv) { + dp->str1pta = HIV_STRING; + dp->str1ptb = dp->str1pta; + } else if (dp->lab) { + dp->str1pta = LAB_STRING; + dp->str1ptb = dp->str1pta; + } else if (dp->veg) { + dp->str1pta = VEG_STRING; + dp->str1ptb = dp->str1pta; + } else { + (void) strncpy(dp->str1, (dp->str + 11), 8); + dp->hour = (short) (dp->str1[0] - 48) * 10 + (short) (dp->str1[1] - 48); + if (dp->hour > 12) { + dp->hour -= 12; + (void) strcpy(dp->str1 + 8, " PM"); + } else { + if (dp->hour == 0) + dp->hour += 12; + (void) strcpy(dp->str1 + 8, " AM"); + } + dp->str1[0] = (dp->hour / 10) + 48; + dp->str1[1] = (dp->hour % 10) + 48; + if (dp->str1[0] == '0') + dp->str1[0] = ' '; + dp->str1[11] = 0; /* terminate dp->str1 */ + dp->str1old[11] = 0; /* terminate dp->str1old */ + + (void) strncpy(dp->str2, dp->str, 11); + (void) strncpy(dp->str2 + 11, (dp->str + 20), 4); + dp->str2[15] = 0; /* terminate dp->str2 */ + dp->str2old[15] = 0; /* terminate dp->str2old */ + + dp->str1pta = dp->str1; + dp->str1ptb = dp->str1old; + } + timeNow = seconds(); + if (dp->popex) { + convert(PEOPLE_TIME_START + (PEOPLE_MIN / 60.0) * timeNow, dp->str2); + (void) strcat(dp->str2, PEOPLE_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->forest) { + convert(AREA_TIME_START - (AREA_MIN / 60.0) * timeNow, dp->str2); + (void) strcat(dp->str2, TROPICAL_STRING); + (void) strcat(dp->str2, AREA_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->hiv) { + convert(HIV_TIME_START + (HIV_MIN / 60.0) * timeNow, dp->str2); + (void) strcat(dp->str2, CASES_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->lab) { + convert((LAB_MIN / 60.0) * (timeNow - timeAtLastNewYear(timeNow)), + dp->str2); + (void) strcat(dp->str2, YEAR_STRING); + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2pta; + } else if (dp->veg) { + convert((VEG_MIN / 60.0) * (timeNow - timeAtLastNewYear(timeNow)), + dp->str2); + (void) strcat(dp->str2, YEAR_STRING); + dp->str2pta = dp->str2; + } else { + dp->str2pta = dp->str2; + dp->str2ptb = dp->str2old; + } + + dp->text_height = font_height(mode_font); + dp->text_width1 = XTextWidth(mode_font, dp->str1pta, strlen(dp->str1pta)); + dp->text_width2 = XTextWidth(mode_font, dp->str2pta, strlen(dp->str2pta)); + if (dp->text_width1 > dp->text_width2) { + dp->text_width = dp->text_width1; + dp->text_start1 = 0; + dp->text_start2 = (dp->text_width - dp->text_width2) / 2; + } else { + dp->text_width = dp->text_width2; + dp->text_start1 = (dp->text_width - dp->text_width1) / 2; + dp->text_start2 = 0; + } + dp->maxx = dp->width - dp->text_width; + dp->maxy = dp->height - dp->text_height - mode_font->descent; + if (dp->maxx == 0) + dp->clockx = dp->text_start1; + else if (dp->maxx < 0) + dp->clockx = -NRAND(-dp->maxx) + dp->text_start1; + else + dp->clockx = NRAND(dp->maxx) + dp->text_start1; + if (dp->maxy - mode_font->ascent == 0) + dp->clocky = mode_font->ascent; + else if (dp->maxy - mode_font->ascent < 0) + dp->clocky = -NRAND(mode_font->ascent - dp->maxy) + mode_font->ascent; + else + dp->clocky = NRAND(dp->maxy - mode_font->ascent) + mode_font->ascent; + + if (MI_NPIXELS(mi) > 2) + dp->color = NRAND(MI_NPIXELS(mi)); + + /* don't want any exposure events from XCopyPlane */ + XSetGraphicsExposures(display, MI_GC(mi), False); +} + +void +draw_dclock(ModeInfo * mi) +{ + dclockstruct *dp = &dclocks[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + drawDclock(mi); + if (MI_NPIXELS(mi) > 2) { + if (++dp->color >= MI_NPIXELS(mi)) + dp->color = 0; + } +} + +void +release_dclock(ModeInfo * mi) +{ + if (dclocks != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + dclockstruct *dp = &dclocks[screen]; + Display *display = MI_DISPLAY(mi); + + if (dp->fgGC) + XFreeGC(display, dp->fgGC); + if (dp->bgGC) + XFreeGC(display, dp->bgGC); + if (dp->pixmap) + XFreePixmap(display, dp->pixmap); + + } + (void) free((void *) dclocks); + dclocks = NULL; + } + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } +} + +void +refresh_dclock(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_dclock */ diff --git a/modes/decay.c b/modes/decay.c new file mode 100644 index 00000000..ab78ce08 --- /dev/null +++ b/modes/decay.c @@ -0,0 +1,254 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* decay --- decayscreen */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)decay.c 4.13 98/12/03 xlockmore"; + +#endif + +/* 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 + * + * Hacked by jwz, 28-Nov-97 (sped up and added new motion directions) + */ + +#ifdef STANDALONE +#define PROGCLASS "Decay" +#define HACK_INIT init_decay +#define HACK_DRAW draw_decay +#define decay_opts xlockmore_opts +#define DEFAULTS "*delay: 200000 \n" \ + "*count: 6 \n" \ + "*cycles: 30 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_decay + +ModeSpecOpt decay_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct blot_description = +{"decay", "init_decay", "draw_decay", "release_decay", + "refresh_decay", "init_decay", NULL, &decay_opts, + 200000, 6, 30, 1, 64, 0.3, "", + "Shows a decaying screen", 0, NULL}; + +#endif + +typedef struct +{ + Display * dsp; + Window w; + int sizex; + int sizey; + GC gc; + int mode; +} decaystruct; + +static decaystruct * decay_info = NULL; + +#define SHUFFLE 0 +#define UP 1 +#define LEFT 2 +#define RIGHT 3 +#define DOWN 4 +#define UPLEFT 5 +#define DOWNLEFT 6 +#define UPRIGHT 7 +#define DOWNRIGHT 8 +#define IN 9 +#define OUT 10 +#define DEGREE 1 + + +void +init_decay (ModeInfo * mi) +{ + decaystruct *dc; + XGCValues gcv; + long gcflags; + + char *s = "random"; + + if (decay_info == NULL) + decay_info = (decaystruct *) calloc(MI_NUM_SCREENS(mi), + sizeof(decaystruct)); + if(decay_info == NULL) return; + dc = &decay_info[MI_SCREEN(mi)]; + + + if (s && !strcmp(s, "shuffle")) dc->mode = SHUFFLE; + else if (s && !strcmp(s, "up")) dc->mode = UP; + else if (s && !strcmp(s, "left")) dc->mode = LEFT; + else if (s && !strcmp(s, "right")) dc->mode = RIGHT; + else if (s && !strcmp(s, "down")) dc->mode = DOWN; + else if (s && !strcmp(s, "upleft")) dc->mode = UPLEFT; + else if (s && !strcmp(s, "downleft")) dc->mode = DOWNLEFT; + else if (s && !strcmp(s, "upright")) dc->mode = UPRIGHT; + else if (s && !strcmp(s, "downright")) dc->mode = DOWNRIGHT; + else if (s && !strcmp(s, "in")) dc->mode = IN; + else if (s && !strcmp(s, "out")) dc->mode = OUT; + else + { + if (s && *s && !!strcmp(s, "random")) + fprintf(stderr, "%s: unknown mode %s\n", ProgramName, s); + dc->mode = random() % (OUT+1); + } + + dc->dsp = MI_DISPLAY(mi); + dc->w = MI_WINDOW(mi); + dc->sizex = MI_WIDTH(mi); + dc->sizey = MI_HEIGHT(mi); + gcv.function = GXcopy; + gcflags = GCFunction; + dc->gc = XCreateGC (dc->dsp, dc->w, gcflags, &gcv); +#ifdef USE_UNSTABLE + XCopyArea (dc->dsp, MI_ROOT_PIXMAP(mi), dc->w, + dc->gc, 0, 0, MI_WIDTH(mi), MI_HEIGHT(mi), + 0, 0); +#endif + XFlush(dc->dsp); + return; +} + + +/* + * perform one iteration of decay + */ +void +draw_decay (ModeInfo * mi) +{ + int left, top, width, height, toleft, totop; + +#define L 101 +#define R 102 +#define U 103 +#define D 104 + static int no_bias[] = { L,L,L,L, R,R,R,R, U,U,U,U, D,D,D,D }; + static int up_bias[] = { L,L,L,L, R,R,R,R, U,U,U,U, U,U,D,D }; + static int down_bias[] = { L,L,L,L, R,R,R,R, U,U,D,D, D,D,D,D }; + static int left_bias[] = { L,L,L,L, L,L,R,R, U,U,U,U, D,D,D,D }; + static int right_bias[] = { L,L,R,R, R,R,R,R, U,U,U,U, D,D,D,D }; + + static int upleft_bias[] = { L,L,L,L, L,R,R,R, U,U,U,U, U,D,D,D }; + static int downleft_bias[] = { L,L,L,L, L,R,R,R, U,U,U,D, D,D,D,D }; + static int upright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,U, U,D,D,D }; + static int downright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,D, D,D,D,D }; + static int *bias; + + decaystruct * dc = &decay_info[MI_SCREEN(mi)]; + + switch (dc->mode) { + case SHUFFLE: bias = no_bias; break; + case UP: bias = up_bias; break; + case LEFT: bias = left_bias; break; + case RIGHT: bias = right_bias; break; + case DOWN: bias = down_bias; break; + case UPLEFT: bias = upleft_bias; break; + case DOWNLEFT: bias = downleft_bias; break; + case UPRIGHT: bias = upright_bias; break; + case DOWNRIGHT: bias = downright_bias; break; + case IN: bias = no_bias; break; + case OUT: bias = no_bias; break; + default: abort(); + } + +#define nrnd(x) (random() % (x)) + + left = nrnd(dc->sizex - 1); + top = nrnd(dc->sizey); + width = nrnd(dc->sizex - left); + height = nrnd(dc->sizey - top); + + toleft = left; + totop = top; + + if (dc->mode == IN || dc->mode == OUT) { + int x = left+(width/2); + int y = top+(height/2); + int cx = dc->sizex/2; + int cy = dc->sizey/2; + if (dc->mode == IN) { + if (x > cx && y > cy) bias = upleft_bias; + else if (x < cx && y > cy) bias = upright_bias; + else if (x < cx && y < cy) bias = downright_bias; + else /* (x > cx && y < cy)*/ bias = downleft_bias; + } else { + if (x > cx && y > cy) bias = downright_bias; + else if (x < cx && y > cy) bias = downleft_bias; + else if (x < cx && y < cy) bias = upleft_bias; + else /* (x > cx && y < cy)*/ bias = upright_bias; + } + } + + switch (bias[random() % (sizeof(no_bias)/sizeof(*no_bias))]) { + case L: toleft = left-DEGREE; break; + case R: toleft = left+DEGREE; break; + case U: totop = top-DEGREE; break; + case D: totop = top+DEGREE; break; + default: abort(); break; + } + + XCopyArea (dc->dsp, dc->w, dc->w, + dc->gc, left, top, width, height, + toleft, totop); + XFlush(dc->dsp); +#undef nrnd + +} + +void +refresh_decay(ModeInfo * mi) +{ + return; +} + +void +release_decay(ModeInfo * mi) +{ + if (decay_info != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + if (decay_info[screen].gc != NULL) + XFreeGC(MI_DISPLAY(mi), decay_info[screen].gc); + } + (void) free((void *) decay_info); + decay_info = NULL; + } +} + +#endif /* MODE_decay */ diff --git a/modes/deco.c b/modes/deco.c new file mode 100644 index 00000000..85b5f120 --- /dev/null +++ b/modes/deco.c @@ -0,0 +1,186 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* deco --- art as ugly as sin */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)deco.c 4.07 97/11/24 xlockmore"; + +#endif +/* + * Copyright (c) 1997 by Jamie Zawinski + * + * 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: + * 29-Oct-97: xlock version (David Bagley ) + * 1997: xscreensaver version Jamie Zawinski + */ + +/*- + * original copyright + * 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 + */ + +#ifdef STANDALONE +#define PROGCLASS "Deco" +#define HACK_INIT init_deco +#define HACK_DRAW draw_deco +#define deco_opts xlockmore_opts +#define DEFAULTS "*delay: 1000000 \n" \ + "*count: -30 \n" \ + "*cycles: 2 \n" \ + "*size: -10 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_deco + +ModeSpecOpt deco_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct deco_description = +{"deco", "init_deco", "draw_deco", "release_deco", + "init_deco", "init_deco", NULL, &deco_opts, + 1000000, -30, 2, -10, 64, 0.6, "", + "Shows art as ugly as sin", 0, NULL}; + +#endif + +#define MINSIZE 2 +#define MINDEPTH 1 + +typedef struct { + int max_depth; + int min_height; + int min_width; + int time; + int colorindex; + unsigned long bordercolor; +} decostruct; + +static decostruct *decos = NULL; + +static void +deco(ModeInfo * mi, int x, int y, int w, int h, int depth) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + decostruct *dp = &decos[MI_SCREEN(mi)]; + + if ((NRAND(dp->max_depth) + 1 < depth) || + (w < dp->min_width) || (h < dp->min_height)) { + if (w > 2 && h > 2) { + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, dp->colorindex)); + if (++dp->colorindex >= MI_NPIXELS(mi)) + dp->colorindex = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XFillRectangle(display, window, gc, x + 1, y + 1, w - 2, h - 2); + } + } else { + if (LRAND() & 1) { + deco(mi, x, y, w / 2, h, depth + 1); + deco(mi, x + w / 2, y, w - w / 2, h, depth + 1); + } else { + deco(mi, x, y, w, h / 2, depth + 1); + deco(mi, x, y + h / 2, w, h - h / 2, depth + 1); + } + } +} + +void +init_deco(ModeInfo * mi) +{ + decostruct *dp; + int depth = MI_COUNT(mi); + int size = MI_SIZE(mi); + + if (decos == NULL) { + if ((decos = (decostruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (decostruct))) == NULL) + return; + } + dp = &decos[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) > 2) { + dp->bordercolor = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + dp->colorindex = NRAND(MI_NPIXELS(mi)); + } else + dp->bordercolor = MI_BLACK_PIXEL(mi); + if (depth < -MINDEPTH) + dp->max_depth = NRAND(-depth - MINDEPTH + 1) + MINDEPTH; + else if (depth < MINDEPTH) + dp->max_depth = MINDEPTH; + else + dp->max_depth = depth; + if (size < -MINSIZE) { + dp->min_width = NRAND(-size - MINSIZE + 1) + MINSIZE; + dp->min_height = NRAND(-size - MINSIZE + 1) + MINSIZE; + } else if (size < MINDEPTH) + dp->min_width = dp->min_height = MINSIZE; + else + dp->min_width = dp->min_height = size; + dp->time = 0; +} + +void +draw_deco(ModeInfo * mi) +{ + decostruct *dp = &decos[MI_SCREEN(mi)]; + + if (dp->time == 0) { + /* This fills up holes */ + MI_CLEARWINDOWCOLOR(mi, dp->bordercolor); +#ifdef SOLARIS2 + /* + * if this is not done the first rectangle is sometimes messed up on + * Solaris2 with 24 bit TrueColor (Ultra2) + */ + XDrawRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + 0, 0, MI_WIDTH(mi) / 2 + 1, MI_HEIGHT(mi) / 2 + 1); +#endif + deco(mi, 0, 0, MI_WIDTH(mi), MI_HEIGHT(mi), 0); + } + if (++dp->time > MI_CYCLES(mi)) + init_deco(mi); + + MI_IS_DRAWN(mi) = True; + +} + +void +release_deco(ModeInfo * mi) +{ + if (decos != NULL) { + (void) free((void *) decos); + decos = NULL; + } +} + +#endif /* MODE_deco */ diff --git a/modes/demon.c b/modes/demon.c new file mode 100644 index 00000000..041d6a43 --- /dev/null +++ b/modes/demon.c @@ -0,0 +1,903 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* demon --- David Griffeath's cellular automata */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)demon.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 16-Apr-97: -neighbors 3, 9 (not sound mathematically), 12, and 8 added + * 30-May-96: Ron Hitchens + * Fixed memory management that caused leaks + * 14-Apr-96: -neighbors 6 runtime-time option added + * 21-Aug-95: Coded from A.K. Dewdney's "Computer Recreations", Scientific + * American Magazine" Aug 1989 pp 102-105. Also very similar to + * hodgepodge machine described in A.K. Dewdney's "Computer + * Recreations", Scientific American Magazine" Aug 1988 pp 104-107. + * also used life.c as a guide. + */ + +/*- + * A cellular universe of 4 phases debris, droplets, defects, and demons. + */ + +/*- + Grid Number of Neigbors + ---- ------------------ + Square 4 or 8 + Hexagon 6 + Triangle 3, 9, or 12 +*/ + +#ifdef STANDALONE +#define PROGCLASS "Demon" +#define HACK_INIT init_demon +#define HACK_DRAW draw_demon +#define demon_opts xlockmore_opts +#define DEFAULTS "*delay: 50000 \n" \ + "*count: 0 \n" \ + "*cycles: 1000 \n" \ + "*size: -7 \n" \ + "*ncolors: 64 \n" \ + "*neighbors: 0 \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_demon + +/*- + * neighbors of 0 randomizes it between 3, 4, 6, 8, 9, and 12. + */ +extern int neighbors; + +ModeSpecOpt demon_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct demon_description = +{"demon", "init_demon", "draw_demon", "release_demon", + "refresh_demon", "init_demon", NULL, &demon_opts, + 50000, 0, 1000, -7, 64, 1.0, "", + "Shows Griffeath's cellular automata", 0, NULL}; + +#endif + +#define DEMONBITS(n,w,h)\ + dp->pixmaps[dp->init_bits++]=\ + XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1) + +#define REDRAWSTEP 2000 /* How many cells to draw per cycle */ +#define MINSTATES 2 +#define MINGRIDSIZE 24 +#define MINSIZE 4 +#define NEIGHBORKINDS 6 + +/* Singly linked list */ +typedef struct _CellList { + XPoint pt; + struct _CellList *next; +} CellList; + +typedef struct { + int generation; + int xs, ys; + int xb, yb; + int nrows, ncols; + int width, height; + int states; + int state; + int redrawing, redrawpos; + int *ncells; + CellList **cellList; + unsigned char *oldcell, *newcell; + int neighbors; + int init_bits; + GC stippledGC; + Pixmap pixmaps[NUMSTIPPLES - 1]; + union { + XPoint hexagon[6]; + XPoint triangle[2][3]; + } shape; +} demonstruct; + +static char plots[2][NEIGHBORKINDS] = +{ + {3, 4, 6, 8, 9, 12}, /* Neighborhoods */ + {12, 16, 18, 20, 22, 24} /* Number of states */ +}; + +static demonstruct *demons = NULL; + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned char state) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + GC gc; + + if (!state) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + gc = MI_GC(mi); + } else if (MI_NPIXELS(mi) >= NUMSTIPPLES) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), + MI_PIXEL(mi, (((int) state - 1) * MI_NPIXELS(mi) / + (dp->states - 1)) % MI_NPIXELS(mi))); + gc = MI_GC(mi); + } else { + XGCValues gcv; + + gcv.stipple = dp->pixmaps[(state - 1) % (NUMSTIPPLES - 1)]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), dp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = dp->stippledGC; + } + if (dp->neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + dp->shape.hexagon[0].x = dp->xb + ccol * dp->xs; + dp->shape.hexagon[0].y = dp->yb + crow * dp->ys; + if (dp->xs == 1 && dp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), + gc, dp->shape.hexagon[0].x, dp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + dp->shape.hexagon, 6, Convex, CoordModePrevious); + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + dp->xb + dp->xs * col, dp->yb + dp->ys * row, + dp->xs - (dp->xs > 3), dp->ys - (dp->ys > 3)); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + dp->shape.triangle[orient][0].x = dp->xb + col * dp->xs; + dp->shape.triangle[orient][0].y = dp->yb + row * dp->ys; + if (dp->xs <= 3 || dp->ys <= 3) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ((orient) ? -1 : 1) + dp->shape.triangle[orient][0].x, + dp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + dp->shape.triangle[orient][0].x += (dp->xs / 2 - 1); + else + dp->shape.triangle[orient][0].x -= (dp->xs / 2 - 1); + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + dp->shape.triangle[orient], 3, Convex, CoordModePrevious); + + } + } +} + +static void +addtolist(ModeInfo * mi, int col, int row, unsigned char state) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + CellList *current; + + current = dp->cellList[state]; + dp->cellList[state] = (CellList *) malloc(sizeof (CellList)); + dp->cellList[state]->pt.x = col; + dp->cellList[state]->pt.y = row; + dp->cellList[state]->next = current; + dp->ncells[state]++; +} + +#ifdef DEBUG +static void +print_state(ModeInfo * mi, int state) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + CellList *locallist; + int i = 0; + + locallist = dp->cellList[state]; + (void) printf("state %d\n", state); + while (locallist) { + (void) printf("%d x %d, y %d\n", i, + locallist->pt.x, locallist->pt.y); + locallist = locallist->next; + i++; + } +} + +#endif + +static void +free_state(demonstruct * dp, int state) +{ + CellList *current; + + while (dp->cellList[state]) { + current = dp->cellList[state]; + dp->cellList[state] = dp->cellList[state]->next; + (void) free((void *) current); + } + dp->cellList[state] = NULL; + if (dp->ncells) + dp->ncells[state] = 0; +} + + +static void +free_list(demonstruct * dp) +{ + int state; + + for (state = 0; state < dp->states; state++) + free_state(dp, state); + (void) free((void *) dp->cellList); + dp->cellList = NULL; +} + +static void +free_struct(demonstruct * dp) +{ + if (dp->cellList != NULL) { + free_list(dp); + } + if (dp->ncells != NULL) { + (void) free((void *) dp->ncells); + dp->ncells = NULL; + } + if (dp->oldcell != NULL) { + (void) free((void *) dp->oldcell); + dp->oldcell = NULL; + } + if (dp->newcell != NULL) { + (void) free((void *) dp->newcell); + dp->newcell = NULL; + } +} + +static void +draw_state(ModeInfo * mi, int state) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + GC gc; + XRectangle *rects; + CellList *current; + + if (!state) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_BLACK_PIXEL(mi)); + gc = MI_GC(mi); + } else if (MI_NPIXELS(mi) >= NUMSTIPPLES) { + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), + MI_PIXEL(mi, (((int) state - 1) * MI_NPIXELS(mi) / + (dp->states - 1)) % MI_NPIXELS(mi))); + gc = MI_GC(mi); + } else { + XGCValues gcv; + + gcv.stipple = dp->pixmaps[(state - 1) % (NUMSTIPPLES - 1)]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), dp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = dp->stippledGC; + } + if (dp->neighbors == 6) { /* Draw right away, slow */ + current = dp->cellList[state]; + while (current) { + int col, row, ccol, crow; + + col = current->pt.x; + row = current->pt.y; + ccol = 2 * col + !(row & 1), crow = 2 * row; + dp->shape.hexagon[0].x = dp->xb + ccol * dp->xs; + dp->shape.hexagon[0].y = dp->yb + crow * dp->ys; + if (dp->xs == 1 && dp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), + gc, dp->shape.hexagon[0].x, dp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + dp->shape.hexagon, 6, Convex, CoordModePrevious); + current = current->next; + } + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + /* Take advantage of XDrawRectangles */ + int ncells = 0; + + /* Create Rectangle list from part of the cellList */ + rects = (XRectangle *) malloc(dp->ncells[state] * sizeof (XRectangle)); + current = dp->cellList[state]; + while (current) { + rects[ncells].x = dp->xb + current->pt.x * dp->xs; + rects[ncells].y = dp->yb + current->pt.y * dp->ys; + rects[ncells].width = dp->xs - (dp->xs > 3); + rects[ncells].height = dp->ys - (dp->ys > 3); + current = current->next; + ncells++; + } + /* Finally get to draw */ + XFillRectangles(MI_DISPLAY(mi), MI_WINDOW(mi), gc, rects, ncells); + /* Free up rects list and the appropriate part of the cellList */ + (void) free((void *) rects); + } else { /* TRI */ + current = dp->cellList[state]; + while (current) { + int col, row, orient; + + col = current->pt.x; + row = current->pt.y; + orient = (col + row) % 2; /* O left 1 right */ + dp->shape.triangle[orient][0].x = dp->xb + col * dp->xs; + dp->shape.triangle[orient][0].y = dp->yb + row * dp->ys; + if (dp->xs <= 3 || dp->ys <= 3) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ((orient) ? -1 : 1) + dp->shape.triangle[orient][0].x, + dp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + dp->shape.triangle[orient][0].x += (dp->xs / 2 - 1); + else + dp->shape.triangle[orient][0].x -= (dp->xs / 2 - 1); + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + dp->shape.triangle[orient], 3, Convex, CoordModePrevious); + } + current = current->next; + } + } + free_state(dp, state); + XFlush(MI_DISPLAY(mi)); +} + +static void +RandomSoup(ModeInfo * mi) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + int row, col, mrow = 0; + + for (row = 0; row < dp->nrows; ++row) { + for (col = 0; col < dp->ncols; ++col) { + dp->oldcell[col + mrow] = + (unsigned char) LRAND() % ((unsigned char) dp->states); + addtolist(mi, col, row, dp->oldcell[col + mrow]); + } + mrow += dp->ncols; + } +} + +void +init_demon(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int size = MI_SIZE(mi), nk; + demonstruct *dp; + + if (demons == NULL) { + if ((demons = (demonstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (demonstruct))) == NULL) + return; + } + dp = &demons[MI_SCREEN(mi)]; + dp->generation = 0; + dp->redrawing = 0; + if (MI_NPIXELS(mi) < NUMSTIPPLES) { + if (dp->stippledGC == None) { + XGCValues gcv; + + gcv.fill_style = FillOpaqueStippled; + dp->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv); + } + if (dp->init_bits == 0) { + int i; + + for (i = 1; i < NUMSTIPPLES; i++) + DEMONBITS(stipples[i], STIPPLESIZE, STIPPLESIZE); + } + } + free_struct(dp); + + for (nk = 0; nk < NEIGHBORKINDS; nk++) { + if (neighbors == plots[0][nk]) { + dp->neighbors = plots[0][nk]; + break; + } + if (nk == NEIGHBORKINDS - 1) { + nk = NRAND(NEIGHBORKINDS); + dp->neighbors = plots[0][nk]; + break; + } + } + + dp->states = MI_COUNT(mi); + if (dp->states < -MINSTATES) + dp->states = NRAND(-dp->states - MINSTATES + 1) + MINSTATES; + else if (dp->states < MINSTATES) + dp->states = plots[1][nk]; + dp->cellList = (CellList **) calloc(dp->states, sizeof (CellList *)); + dp->ncells = (int *) calloc(dp->states, sizeof (int)); + + dp->state = 0; + + dp->width = MI_WIDTH(mi); + dp->height = MI_HEIGHT(mi); + + if (dp->neighbors == 6) { + int nccols, ncrows, i; + + if (dp->width < 2) + dp->width = 2; + if (dp->height < 4) + dp->height = 4; + if (size < -MINSIZE) + dp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + dp->ys = MAX(MINSIZE, MIN(dp->width, dp->height) / MINGRIDSIZE); + else + dp->ys = MINSIZE; + } else + dp->ys = MIN(size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)); + dp->xs = dp->ys; + nccols = MAX(dp->width / dp->xs - 2, 2); + ncrows = MAX(dp->height / dp->ys - 1, 2); + dp->ncols = nccols / 2; + dp->nrows = 2 * (ncrows / 4); + dp->xb = (dp->width - dp->xs * nccols) / 2 + dp->xs / 2; + dp->yb = (dp->height - dp->ys * (ncrows / 2) * 2) / 2 + dp->ys; + for (i = 0; i < 6; i++) { + dp->shape.hexagon[i].x = (dp->xs - 1) * hexagonUnit[i].x; + dp->shape.hexagon[i].y = ((dp->ys - 1) * hexagonUnit[i].y / 2) * 4 / 3; + } + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + if (size < -MINSIZE) + dp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + dp->ys = MAX(MINSIZE, MIN(dp->width, dp->height) / MINGRIDSIZE); + else + dp->ys = MINSIZE; + } else + dp->ys = MIN(size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)); + dp->xs = dp->ys; + dp->ncols = MAX(dp->width / dp->xs, 2); + dp->nrows = MAX(dp->height / dp->ys, 2); + dp->xb = (dp->width - dp->xs * dp->ncols) / 2; + dp->yb = (dp->height - dp->ys * dp->nrows) / 2; + } else { /* TRI */ + int orient, i; + + if (dp->width < 2) + dp->width = 2; + if (dp->height < 2) + dp->height = 2; + if (size < -MINSIZE) + dp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + dp->ys = MAX(MINSIZE, MIN(dp->width, dp->height) / MINGRIDSIZE); + else + dp->ys = MINSIZE; + } else + dp->ys = MIN(size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)); + dp->xs = (int) (1.52 * dp->ys); + dp->ncols = (MAX(dp->width / dp->xs - 1, 2) / 2) * 2; + dp->nrows = (MAX(dp->height / dp->ys - 1, 2) / 2) * 2; + dp->xb = (dp->width - dp->xs * dp->ncols) / 2 + dp->xs / 2; + dp->yb = (dp->height - dp->ys * dp->nrows) / 2 + dp->ys / 2; + for (orient = 0; orient < 2; orient++) { + for (i = 0; i < 3; i++) { + dp->shape.triangle[orient][i].x = + (dp->xs - 2) * triangleUnit[orient][i].x; + dp->shape.triangle[orient][i].y = + (dp->ys - 2) * triangleUnit[orient][i].y; + } + } + } + + MI_CLEARWINDOW(mi); + + dp->oldcell = (unsigned char *) + malloc(dp->ncols * dp->nrows * sizeof (unsigned char)); + + dp->newcell = (unsigned char *) + malloc(dp->ncols * dp->nrows * sizeof (unsigned char)); + + RandomSoup(mi); +} + +void +draw_demon(ModeInfo * mi) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + int i, j, k, l, mj = 0, ml; + + MI_IS_DRAWN(mi) = True; + + if (dp->state >= dp->states) { + (void) memcpy((char *) dp->newcell, (char *) dp->oldcell, + dp->ncols * dp->nrows * sizeof (unsigned char)); + + if (dp->neighbors == 6) { + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) { + /* NE */ + if (!(j & 1)) + k = (i + 1 == dp->ncols) ? 0 : i + 1; + else + k = i; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* E */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SE */ + if (!(j & 1)) + k = (i + 1 == dp->ncols) ? 0 : i + 1; + else + k = i; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SW */ + if (j & 1) + k = (!i) ? dp->ncols - 1 : i - 1; + else + k = i; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* W */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* NW */ + if (j & 1) + k = (!i) ? dp->ncols - 1 : i - 1; + else + k = i; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + mj += dp->ncols; + } + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) { + /* N */ + k = i; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* E */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* S */ + k = i; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* W */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + mj += dp->ncols; + } + if (dp->neighbors == 8) { + mj = 0; + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) { + /* NE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SW */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* NW */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + mj += dp->ncols; + } + } + } else if (dp->neighbors == 3 || dp->neighbors == 9 || + dp->neighbors == 12) { + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) { + if ((i + j) % 2) { /* right */ + /* W */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } else { /* left */ + /* E */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + /* N */ + k = i; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* S */ + k = i; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + mj += dp->ncols; + } + if (dp->neighbors == 9 || dp->neighbors == 12) { + mj = 0; + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) { + /* NN */ + k = i; + if (!j) + l = dp->nrows - 2; + else if (!(j - 1)) + l = dp->nrows - 1; + else + l = j - 2; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SS */ + k = i; + if (j + 1 == dp->nrows) + l = 1; + else if (j + 2 == dp->nrows) + l = 0; + else + l = j + 2; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* NW */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* NE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = (!j) ? dp->nrows - 1 : j - 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SW */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = (j + 1 == dp->nrows) ? 0 : j + 1; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + mj += dp->ncols; + } + if (dp->neighbors == 12) { + mj = 0; + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) { + if ((i + j) % 2) { /* right */ + /* NNW */ + k = (!i) ? dp->ncols - 1 : i - 1; + if (!j) + l = dp->nrows - 2; + else if (!(j - 1)) + l = dp->nrows - 1; + else + l = j - 2; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SSW */ + k = (!i) ? dp->ncols - 1 : i - 1; + if (j + 1 == dp->nrows) + l = 1; + else if (j + 2 == dp->nrows) + l = 0; + else + l = j + 2; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* EE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } else { /* left */ + /* NNE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + if (!j) + l = dp->nrows - 2; + else if (!(j - 1)) + l = dp->nrows - 1; + else + l = j - 2; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* SSE */ + k = (i + 1 == dp->ncols) ? 0 : i + 1; + if (j + 1 == dp->nrows) + l = 1; + else if (j + 2 == dp->nrows) + l = 0; + else + l = j + 2; + ml = l * dp->ncols; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + /* WW */ + k = (!i) ? dp->ncols - 1 : i - 1; + l = j; + ml = mj; + if (dp->oldcell[k + ml] == + (int) (dp->oldcell[i + mj] + 1) % dp->states) + dp->newcell[i + mj] = dp->oldcell[k + ml]; + } + } + mj += dp->ncols; + } + } + } + } + mj = 0; + for (j = 0; j < dp->nrows; j++) { + for (i = 0; i < dp->ncols; i++) + if (dp->oldcell[i + mj] != dp->newcell[i + mj]) { + dp->oldcell[i + mj] = dp->newcell[i + mj]; + addtolist(mi, i, j, dp->oldcell[i + mj]); + } + mj += dp->ncols; + } + if (++dp->generation > MI_CYCLES(mi)) + init_demon(mi); + dp->state = 0; + } else { + if (dp->ncells[dp->state]) + draw_state(mi, dp->state); + dp->state++; + } + if (dp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + if (dp->oldcell[dp->redrawpos]) { + drawcell(mi, dp->redrawpos % dp->ncols, dp->redrawpos / dp->ncols, + dp->oldcell[dp->redrawpos]); + } + if (++(dp->redrawpos) >= dp->ncols * dp->nrows) { + dp->redrawing = 0; + break; + } + } + } +} +void +release_demon(ModeInfo * mi) +{ + if (demons != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + demonstruct *dp = &demons[screen]; + int shade; + + if (dp->stippledGC != None) { + XFreeGC(MI_DISPLAY(mi), dp->stippledGC); + } + for (shade = 0; shade < dp->init_bits; shade++) + XFreePixmap(MI_DISPLAY(mi), dp->pixmaps[shade]); + free_struct(dp); + } + (void) free((void *) demons); + demons = NULL; + } +} void + +refresh_demon(ModeInfo * mi) +{ + demonstruct *dp = &demons[MI_SCREEN(mi)]; + + dp->redrawing = 1; + dp->redrawpos = 0; +} + +#endif /* MODE_demon */ diff --git a/modes/dilemma.c b/modes/dilemma.c new file mode 100644 index 00000000..c161c0e6 --- /dev/null +++ b/modes/dilemma.c @@ -0,0 +1,936 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* dilemma --- Lloyd's Prisoner's Dilemma Simulation */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)dilemma.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1997 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 20-Oct-97: Computing Bouts of the Prisoner's Dilemma by Alun L. Lloyd + * Scientific American Magazine June 1995 + * Used voters.c as a guide. + */ + +/*- + * Opponent's Strategy + * + * Cooperate Defect + * ----------------------- + * | | | + * Cooperate | 1 | 0 | + * Player's | | | + * Strategy |-----------+-----------| + * | | | + * Defect | b | 0 | + * | | | + * ----------------------- + * + * The Payoff Matrix + * + * An interesting value of "b" for a 8 neighbor grid is 1.85 + * What does b stand for? "bonus"? + * Cells get 1 if they and their opponent cooperates. + * Cells get b if they cheat and their opponent cooperates. + * Cells get 0 in the 2 other cases. + * If b is greater then a cell should always cheat except + * they have to live with their neighbor... so on the next go around + * their neighbor might not see any benefit in cooperating. + * Cells add up the previous results of their neighbors + * and decide if its their best strategy is to cheat or not to cheat. + * + * I have noticed round off errors I have not as yet tracked them down. + * Try + * -bonus 1.99 -neighbors 12 -size 10 + * -bonus 241 -neighbors 6 -size 8 + * -bonus 1.71 -neighbors 4 -size 4 + */ + +#ifdef STANDALONE +#define PROGCLASS "Dilemma" +#define HACK_INIT init_dilemma +#define HACK_DRAW draw_dilemma +#define dilemma_opts xlockmore_opts +#define DEFAULTS "*delay: 200000 \n" \ + "*batchcount: -2 \n" \ + "*cycles: 1000 \n" \ + "*size: 0 \n" \ + "*ncolors: 6 \n" \ + "*neighbors: 0 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#define SMOOTH_COLORS +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_dilemma + +/*- + * neighbors of 0 randomizes it between 3, 4, 6, 8, 9, and 12. + */ +extern int neighbors; + +#define DEF_BONUS "1.85" +#define DEF_CONSCIOUS "True" + +static float bonus; +static Bool conscious; + +static XrmOptionDescRec opts[] = +{ + {"-bonus", ".dilemma.bonus", XrmoptionSepArg, (caddr_t) NULL}, + {"-conscious", ".dilemma.conscious", XrmoptionNoArg, (caddr_t) "on"}, + {"+conscious", ".dilemma.conscious", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & bonus, "bonus", "Bonus", DEF_BONUS, t_Float}, + {(caddr_t *) & conscious, "conscious", "Conscious", DEF_CONSCIOUS, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-bonus value", "bonus for cheating... between 1.0 and 4.0"}, + {"-/+conscious", "turn on/off self-awareness"} +}; + +ModeSpecOpt dilemma_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct dilemma_description = +{"dilemma", "init_dilemma", "draw_dilemma", "release_dilemma", + "refresh_dilemma", "init_dilemma", NULL, &dilemma_opts, + 200000, -2, 1000, 0, 64, 1.0, "", + "Shows Lloyd's Prisoner's Dilemma simulation", 0, NULL}; + +#endif + +/* Better bitmaps needed :) */ +#include "bitmaps/cooperat.xbm" /* age > 1 then blue, age = 1 then green */ +#include "bitmaps/defect.xbm" /* age > 1 then red, age = 1 then yellow */ + +#define DEFECTOR 0 +#define COOPERATOR 1 +#define COLORS 4 +#define BLUE (45 * MI_NPIXELS(mi) / 64) /* COOPERATING, was cooperating */ +#define GREEN (23 * MI_NPIXELS(mi) / 64) /* COOPERATING, was defecting */ +#define YELLOW (MI_NPIXELS(mi) / 6) /* DEFECTING, was cooperating */ +#define RED 0 /* DEFECTING, was defecting */ +#define MINDEFECT 1 +#define BITMAPS 2 +#define MINGRIDSIZE 16 +#define MINSIZE 10 +#define FACTOR 10 +#define NEIGHBORKINDS 6 +#define REDRAWSTEP 2000 /* How many cells to draw per cycle */ +#define ROUND_FLOAT(x,a) ((float) ((int) ((x) / (a) + 0.5)) * (a)) + +static XImage logo[BITMAPS] = +{ + {0, 0, 0, XYBitmap, (char *) cooperat_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) defect_bits, LSBFirst, 8, LSBFirst, 8, 1}, +}; + +/* Dilemma data */ + +/* Singly linked list */ +typedef struct _CellList { + XPoint pt; + struct _CellList *next; +} CellList; + +typedef struct { + int defectors; /* portion of defectors */ + float pm[2][2]; /* payoff matrix */ + unsigned long colors[2][2]; + CellList *cellList[COLORS]; + char *s, *sn; /* cell strategies */ + float *payoff; + int initialized; + int xs, ys; /* Size of cooperators and defectors */ + int xb, yb; /* Bitmap offset for cooperators and defectors */ + int state; + int redrawing, redrawpos; + int pixelmode; + int generation; + int ncols, nrows; + int npositions; + int width, height; + int neighbors; + union { + XPoint hexagon[6]; + XPoint triangle[2][3]; + } shape; +} dilemmastruct; + +static char plots[NEIGHBORKINDS] = +{ + 3, 4, 6, 8, 9, 12 /* Neighborhoods */ +}; + +static dilemmastruct *dilemmas = NULL; +static int icon_width, icon_height; + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned long color, int bitmap, + Bool firstChange) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + dilemmastruct *dp = &dilemmas[MI_SCREEN(mi)]; + unsigned long colour = (MI_NPIXELS(mi) >= COLORS) ? + color : MI_WHITE_PIXEL(mi); + + XSetForeground(display, gc, colour); + if (dp->neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + dp->shape.hexagon[0].x = dp->xb + ccol * dp->xs; + dp->shape.hexagon[0].y = dp->yb + crow * dp->ys; + if (dp->xs == 1 && dp->ys == 1) + XFillRectangle(display, window, gc, + dp->shape.hexagon[0].x, dp->shape.hexagon[0].y, 1, 1); + else if (bitmap == BITMAPS - 1) + XFillPolygon(display, window, gc, + dp->shape.hexagon, 6, Convex, CoordModePrevious); + else { + if (firstChange) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, + dp->shape.hexagon, 6, Convex, CoordModePrevious); + XSetForeground(display, gc, colour); + } + if (dp->xs <= 6 || dp->ys <= 2) + XFillRectangle(display, window, gc, + dp->shape.hexagon[0].x - 3 * dp->xs / 4, + dp->shape.hexagon[0].y + dp->ys / 4, dp->xs, dp->ys); + else + XFillArc(display, window, gc, + dp->xb + dp->xs * ccol - 3 * dp->xs / 4, + dp->yb + dp->ys * crow + dp->ys / 4, + 2 * dp->xs - 6, 2 * dp->ys - 2, + 0, 23040); + } + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + if (dp->pixelmode) { + if (bitmap == BITMAPS - 1 || (dp->xs <= 2 || dp->ys <= 2)) + XFillRectangle(display, window, gc, + dp->xb + dp->xs * col, dp->yb + dp->ys * row, + dp->xs - (dp->xs > 3), dp->ys - (dp->ys > 3)); + else { + if (firstChange) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, + dp->xb + dp->xs * col, dp->yb + dp->ys * row, + dp->xs, dp->ys); + XSetForeground(display, gc, colour); + } + XFillArc(display, window, gc, + dp->xb + dp->xs * col, dp->yb + dp->ys * row, + dp->xs - 1, dp->ys - 1, + 0, 23040); + } + } else + (void) XPutImage(display, window, gc, + &logo[bitmap], 0, 0, + dp->xb + dp->xs * col, dp->yb + dp->ys * row, + icon_width, icon_height); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + dp->shape.triangle[orient][0].x = dp->xb + col * dp->xs; + dp->shape.triangle[orient][0].y = dp->yb + row * dp->ys; + if (dp->xs <= 3 || dp->ys <= 3) + XFillRectangle(display, window, gc, + ((orient) ? -1 : 1) + dp->shape.triangle[orient][0].x, + dp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + dp->shape.triangle[orient][0].x += (dp->xs / 2 - 1); + else + dp->shape.triangle[orient][0].x -= (dp->xs / 2 - 1); + if (bitmap == BITMAPS - 1) + XFillPolygon(display, window, gc, + dp->shape.triangle[orient], 3, Convex, CoordModePrevious); + else { + if (firstChange) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, + dp->shape.triangle[orient], 3, Convex, CoordModePrevious); + XSetForeground(display, gc, colour); + } + XFillArc(display, window, gc, + dp->xb + dp->xs * col - 4 * dp->xs / 5 + + ((orient) ? dp->xs / 3 : 3 * dp->xs / 5), + dp->yb + dp->ys * row - dp->ys / 2 + 1, dp->ys - 3, dp->ys - 3, + 0, 23040); + } + } + } +} + +static void +addtolist(ModeInfo * mi, int col, int row, int state) +{ + dilemmastruct *dp = &dilemmas[MI_SCREEN(mi)]; + CellList *current; + + current = dp->cellList[state]; + dp->cellList[state] = (CellList *) malloc(sizeof (CellList)); + dp->cellList[state]->pt.x = col; + dp->cellList[state]->pt.y = row; + dp->cellList[state]->next = current; +} + +#ifdef DEBUG +static void +print_state(ModeInfo * mi, int state) +{ + dilemmastruct *dp = &dilemmas[MI_SCREEN(mi)]; + CellList *locallist; + int i = 0; + + locallist = dp->cellList[state]; + (void) printf("state %d\n", state); + while (locallist) { + (void) printf("%d x %d, y %d\n", i, + locallist->pt.x, locallist->pt.y); + locallist = locallist->next; + i++; + } +} + +#endif + +static void +free_state(dilemmastruct * dp, int state) +{ + CellList *current; + + while (dp->cellList[state]) { + current = dp->cellList[state]; + dp->cellList[state] = dp->cellList[state]->next; + (void) free((void *) current); + } + dp->cellList[state] = NULL; +} + + +static void +free_list(dilemmastruct * dp) +{ + int state; + + for (state = 0; state < COLORS; state++) + free_state(dp, state); +} + +static void +free_struct(dilemmastruct * dp) +{ + free_list(dp); + if (dp->sn != NULL) { + (void) free((void *) dp->sn); + dp->sn = NULL; + } + if (dp->s != NULL) { + (void) free((void *) dp->s); + dp->s = NULL; + } +} + +static int +neighbor_position(dilemmastruct * dp, int col, int row, int dir) +{ + if (dp->neighbors == 6) { + switch (dir) { + case 0: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + break; + case 60: + if (!(row & 1)) + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 120: + if (row & 1) + col = (!col) ? dp->ncols - 1 : col - 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? dp->ncols - 1 : col - 1; + break; + case 240: + if (row & 1) + col = (!col) ? dp->ncols - 1 : col - 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 300: + if (!(row & 1)) + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + switch (dir) { + case 0: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + break; + case 45: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 90: + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 135: + col = (!col) ? dp->ncols - 1 : col - 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? dp->ncols - 1 : col - 1; + break; + case 225: + col = (!col) ? dp->ncols - 1 : col - 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 270: + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 315: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = (!col) ? dp->ncols - 1 : col - 1; + break; + case 30: + case 40: + col = (!col) ? dp->ncols - 1 : col - 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 60: + col = (!col) ? dp->ncols - 1 : col - 1; + if (row + 1 == dp->nrows) + row = 1; + else if (row + 2 == dp->nrows) + row = 0; + else + row = row + 2; + break; + case 80: + case 90: + if (row + 1 == dp->nrows) + row = 1; + else if (row + 2 == dp->nrows) + row = 0; + else + row = row + 2; + break; + case 120: + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 150: + case 160: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 180: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + break; + case 200: + case 210: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 240: + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 270: + case 280: + if (!row) + row = dp->nrows - 2; + else if (!(row - 1)) + row = dp->nrows - 1; + else + row = row - 2; + + break; + case 300: + col = (!col) ? dp->ncols - 1 : col - 1; + if (!row) + row = dp->nrows - 2; + else if (!(row - 1)) + row = dp->nrows - 1; + else + row = row - 2; + break; + case 320: + case 330: + col = (!col) ? dp->ncols - 1 : col - 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + break; + case 30: + case 40: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 60: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + if (!row) + row = dp->nrows - 2; + else if (row == 1) + row = dp->nrows - 1; + else + row = row - 2; + break; + case 80: + case 90: + if (!row) + row = dp->nrows - 2; + else if (row == 1) + row = dp->nrows - 1; + else + row = row - 2; + break; + case 120: + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 150: + case 160: + col = (!col) ? dp->ncols - 1 : col - 1; + row = (!row) ? dp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? dp->ncols - 1 : col - 1; + break; + case 200: + case 210: + col = (!col) ? dp->ncols - 1 : col - 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 240: + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + case 270: + case 280: + if (row + 1 == dp->nrows) + row = 1; + else if (row + 2 == dp->nrows) + row = 0; + else + row = row + 2; + break; + case 300: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + if (row + 1 == dp->nrows) + row = 1; + else if (row + 2 == dp->nrows) + row = 0; + else + row = row + 2; + break; + case 320: + case 330: + col = (col + 1 == dp->ncols) ? 0 : col + 1; + row = (row + 1 == dp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + + return row * dp->ncols + col; +} + +static void +draw_state(ModeInfo * mi, int state) +{ + dilemmastruct *dp = &dilemmas[MI_SCREEN(mi)]; + CellList *current; + + + current = dp->cellList[state]; + while (current) { + int col = current->pt.x; + int row = current->pt.y; + int colrow = col + row * dp->ncols; + + drawcell(mi, col, row, + dp->colors[(int) dp->sn[colrow]][(int) dp->s[colrow]], + dp->sn[colrow], 1); + if (dp->s[colrow] && !dp->sn[colrow]) + dp->defectors--; + if (!dp->s[colrow] && dp->sn[colrow]) + dp->defectors++; + dp->s[colrow] = dp->sn[colrow]; + current = current->next; + } + free_state(dp, state); + XFlush(MI_DISPLAY(mi)); +} + +void +init_dilemma(ModeInfo * mi) +{ + int size = MI_SIZE(mi); + dilemmastruct *dp; + int i, col, row, colrow, mrow; + + if (dilemmas == NULL) { + if ((dilemmas = (dilemmastruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (dilemmastruct))) == NULL) + return; + } + dp = &dilemmas[MI_SCREEN(mi)]; + + dp->generation = 0; + dp->redrawing = 0; + dp->state = 0; + free_struct(dp); + + if (!dp->initialized) { /* Genesis */ + icon_width = cooperat_width; + icon_height = cooperat_height; + dp->initialized = 1; + for (i = 0; i < BITMAPS; i++) { + logo[i].width = icon_width; + logo[i].height = icon_height; + logo[i].bytes_per_line = (icon_width + 7) / 8; + } + } + dp->width = MI_WIDTH(mi); + dp->height = MI_HEIGHT(mi); + + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + dp->neighbors = neighbors; + break; + } + if (i == NEIGHBORKINDS - 1) { +#if 0 + dp->neighbors = plots[NRAND(NEIGHBORKINDS)]; + dp->neighbors = (LRAND() & 1) ? 4 : 8; +#else + dp->neighbors = 8; +#endif + break; + } + } + + if (dp->neighbors == 6) { + int nccols, ncrows, sides; + + if (dp->width < 2) + dp->width = 2; + if (dp->height < 4) + dp->height = 4; + if (size < -MINSIZE) + dp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + dp->ys = MAX(MINSIZE, MIN(dp->width, dp->height) / MINGRIDSIZE); + else + dp->ys = MINSIZE; + } else + dp->ys = MIN(size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)); + dp->xs = dp->ys; + dp->pixelmode = True; + nccols = MAX(dp->width / dp->xs - 2, 2); + ncrows = MAX(dp->height / dp->ys - 1, 2); + dp->ncols = nccols / 2; + dp->nrows = 2 * (ncrows / 4); + dp->xb = (dp->width - dp->xs * nccols) / 2 + dp->xs / 2; + dp->yb = (dp->height - dp->ys * (ncrows / 2) * 2) / 2 + dp->ys; + for (sides = 0; sides < 6; sides++) { + dp->shape.hexagon[sides].x = (dp->xs - 1) * hexagonUnit[sides].x; + dp->shape.hexagon[sides].y = + ((dp->ys - 1) * hexagonUnit[sides].y / 2) * 4 / 3; + } + } else if (dp->neighbors == 4 || dp->neighbors == 8) { + if (dp->width < 2) + dp->width = 2; + if (dp->height < 2) + dp->height = 2; + if (size == 0 || + MINGRIDSIZE * size > dp->width || MINGRIDSIZE * size > dp->height) { + if (dp->width > MINGRIDSIZE * icon_width && + dp->height > MINGRIDSIZE * icon_height) { + dp->pixelmode = False; + dp->xs = icon_width; + dp->ys = icon_height; + } else { + dp->pixelmode = True; + dp->xs = dp->ys = MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE); + } + } else { + dp->pixelmode = True; + if (size < -MINSIZE) + dp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + dp->ys = MINSIZE; + else + dp->ys = MIN(size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)); + dp->xs = dp->ys; + } + dp->ncols = MAX(dp->width / dp->xs, 2); + dp->nrows = MAX(dp->height / dp->ys, 2); + dp->xb = (dp->width - dp->xs * dp->ncols) / 2; + dp->yb = (dp->height - dp->ys * dp->nrows) / 2; + } else { /* TRI */ + int orient, sides; + + if (dp->width < 2) + dp->width = 2; + if (dp->height < 2) + dp->height = 2; + if (size < -MINSIZE) + dp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + dp->ys = MAX(MINSIZE, MIN(dp->width, dp->height) / MINGRIDSIZE); + else + dp->ys = MINSIZE; + } else + dp->ys = MIN(size, MAX(MINSIZE, MIN(dp->width, dp->height) / + MINGRIDSIZE)); + dp->xs = (int) (1.52 * dp->ys); + dp->pixelmode = True; + dp->ncols = (MAX(dp->width / dp->xs - 1, 2) / 2) * 2; + dp->nrows = (MAX(dp->height / dp->ys - 1, 2) / 2) * 2; + dp->xb = (dp->width - dp->xs * dp->ncols) / 2 + dp->xs / 2; + dp->yb = (dp->height - dp->ys * dp->nrows) / 2 + dp->ys / 2; + for (orient = 0; orient < 2; orient++) { + for (sides = 0; sides < 3; sides++) { + dp->shape.triangle[orient][sides].x = + (dp->xs - 2) * triangleUnit[orient][sides].x; + dp->shape.triangle[orient][sides].y = + (dp->ys - 2) * triangleUnit[orient][sides].y; + } + } + } + + dp->npositions = dp->ncols * dp->nrows; + + dp->pm[0][0] = 1, dp->pm[0][1] = 0; + if (bonus < 1.0 || bonus > 4.0) + dp->pm[1][0] = 1.85; + else + dp->pm[1][0] = bonus; + dp->pm[1][1] = 0; + + if (MI_NPIXELS(mi) >= COLORS) { + + dp->colors[0][0] = MI_PIXEL(mi, BLUE); /* COOPERATING, was cooperating */ + dp->colors[0][1] = MI_PIXEL(mi, GREEN); /* COOPERATING, was defecting */ + dp->colors[1][0] = MI_PIXEL(mi, YELLOW); /* DEFECTING, was cooperating */ + dp->colors[1][1] = MI_PIXEL(mi, RED); /* DEFECTING, was defecting */ + } else { + dp->colors[0][0] = MI_WHITE_PIXEL(mi); + dp->colors[0][1] = MI_WHITE_PIXEL(mi); + dp->colors[1][0] = MI_WHITE_PIXEL(mi); + dp->colors[1][1] = MI_WHITE_PIXEL(mi); + } + if (dp->s != NULL) + (void) free((void *) dp->s); + dp->s = (char *) calloc(dp->npositions, sizeof (char)); + + if (dp->sn != NULL) + (void) free((void *) dp->sn); + dp->sn = (char *) calloc(dp->npositions, sizeof (char)); + + if (dp->payoff != NULL) + (void) free((void *) dp->payoff); + dp->payoff = (float *) calloc(dp->npositions, sizeof (float)); + + MI_CLEARWINDOW(mi); + + dp->defectors = MI_COUNT(mi); + if (dp->defectors < -MINDEFECT) { + dp->defectors = NRAND(-dp->defectors - MINDEFECT + 1) + MINDEFECT; + } else if (dp->defectors < MINDEFECT) + dp->defectors = MINDEFECT; + if (dp->defectors > dp->npositions) + dp->defectors = dp->npositions; + + for (i = 0; i < dp->defectors; i++) { + do { + colrow = NRAND(dp->npositions); + } while (dp->sn[colrow]); + dp->sn[colrow] = 1; + } +#if 0 /* if p was a float... */ + mrow = 0; + for (row = 0; row < dp->nrows; row++) { + for (col = 0; col < dp->ncols; col++) { + dp->sn[col + mrow] = ((float) LRAND() / MAXRAND < dp->p); + } + mrow += dp->ncols; + } +#endif + + dp->defectors = 0; + + /* Show initial state... real important for debugging */ + mrow = 0; + for (row = 0; row < dp->nrows; ++row) { + for (col = 0; col < dp->ncols; ++col) { + addtolist(mi, col, row, + dp->sn[col + mrow] * BITMAPS + dp->s[col + mrow]); + } + mrow += dp->ncols; + } +} + +void +draw_dilemma(ModeInfo * mi) +{ + dilemmastruct *dp = &dilemmas[MI_SCREEN(mi)]; + int col, row, mrow, colrow, n, i; + + MI_IS_DRAWN(mi) = True; + + if (dp->state >= 2 * COLORS) { + + for (col = 0; col < dp->ncols; col++) { + for (row = 0; row < dp->nrows; row++) { + colrow = col + row * dp->ncols; + if (conscious) + dp->payoff[colrow] = + dp->pm[(int) dp->s[colrow]][(int) dp->s[colrow]]; + else + dp->payoff[colrow] = 0.0; + for (n = 0; n < dp->neighbors; n++) + dp->payoff[colrow] += + dp->pm[(int) dp->s[colrow]][(int) + dp->s[neighbor_position(dp, + col, row, n * 360 / dp->neighbors)]]; + + } + } + for (row = 0; row < dp->nrows; row++) { + for (col = 0; col < dp->ncols; col++) { + float hp; + int position; + + colrow = col + row * dp->ncols; + hp = dp->payoff[colrow]; + dp->sn[colrow] = dp->s[colrow]; + for (n = 0; n < dp->neighbors; n++) { + position = neighbor_position(dp, col, row, n * 360 / dp->neighbors); + if (ROUND_FLOAT(dp->payoff[position], 0.001) > + ROUND_FLOAT(hp, 0.001)) { + hp = dp->payoff[position]; + dp->sn[colrow] = dp->s[position]; + } + } + } + } + mrow = 0; + for (row = 0; row < dp->nrows; row++) { + for (col = 0; col < dp->ncols; col++) { + addtolist(mi, col, row, + dp->sn[col + mrow] * BITMAPS + dp->s[col + mrow]); + } + mrow += dp->ncols; + } + + if (++dp->generation > MI_CYCLES(mi) || + dp->defectors == dp->npositions || dp->defectors == 0) + init_dilemma(mi); + dp->state = 0; + } else { + if (dp->state < COLORS) { + draw_state(mi, dp->state); + } + dp->state++; + } +#if 1 + if (dp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + drawcell(mi, dp->redrawpos % dp->ncols, dp->redrawpos / dp->ncols, + dp->colors[(int) dp->sn[dp->redrawpos]][(int) dp->s[dp->redrawpos]], + dp->sn[dp->redrawpos], 1); + if (++(dp->redrawpos) >= dp->npositions) { + dp->redrawing = 0; + break; + } + } + } +#endif +} + +void +release_dilemma(ModeInfo * mi) +{ + if (dilemmas != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + dilemmastruct *dp = &dilemmas[screen]; + + free_struct(dp); + if (dp->s != NULL) + (void) free((void *) dp->s); + if (dp->sn != NULL) + (void) free((void *) dp->sn); + if (dp->payoff != NULL) + (void) free((void *) dp->payoff); + } + (void) free((void *) dilemmas); + dilemmas = NULL; + } +} + +void +refresh_dilemma(ModeInfo * mi) +{ + dilemmastruct *dp = &dilemmas[MI_SCREEN(mi)]; + + dp->redrawing = 1; + dp->redrawpos = 0; +} + +#endif /* MODE_dilemma */ diff --git a/modes/discrete.c b/modes/discrete.c new file mode 100644 index 00000000..992d00fb --- /dev/null +++ b/modes/discrete.c @@ -0,0 +1,411 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* discrete --- chaotic mappings */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)discrete.c 4.10 98/04/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by Tim Auckland + * + * 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. + * + * "discrete" shows a number of fractals based on the "discrete map" + * type of dynamical systems. They include a different way of looking + * at the HOPALONG system, an inverse julia-set iteration, the "Standard + * Map" and the "Bird in a Thornbush" fractal. + * + * Revision History: + * 31-Jul-97: Ported to xlockmore-4 + * 08-Aug-96: Adapted from hop.c Copyright (c) 1991 by Patrick J. Naughton. + */ + +#ifdef STANDALONE +#define PROGCLASS "Discrete" +#define HACK_INIT init_discrete +#define HACK_DRAW draw_discrete +#define discrete_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*count: 4096 \n" \ + "*cycles: 2500 \n" \ + "*ncolors: 100 \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_discrete + +ModeSpecOpt discrete_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct discrete_description = +{"discrete", "init_discrete", "draw_discrete", "release_discrete", + "refresh_discrete", "init_discrete", NULL, &discrete_opts, + 1000, 4096, 2500, 1, 64, 1.0, "", + "Shows various discrete maps", 0, NULL}; + +#endif + +enum ftypes { + SQRT, BIRDIE, STANDARD, TRIG, CUBIC, HENON, AILUJ, HSHOE, DELOG +}; + +/*#define TEST STANDARD */ + +#define BIASES 18 +static enum ftypes bias[BIASES] = +{ + STANDARD, STANDARD, STANDARD, STANDARD, + SQRT, SQRT, SQRT, SQRT, + BIRDIE, BIRDIE, BIRDIE, + AILUJ, AILUJ, AILUJ, + TRIG, TRIG, + CUBIC, + HENON, +}; + +typedef struct { + int maxx; + int maxy; /* max of the screen */ + double a; + double b; + double c; + double d; + double e; + double i; + double j; /* discrete parameters */ + double ic; + double jc; + double is; + double js; + int inc; + int pix; + enum ftypes op; + int count; + XPoint *pointBuffer; /* pointer for XDrawPoints */ +} discretestruct; + +static discretestruct *discretes = NULL; + +void +init_discrete(ModeInfo * mi) +{ + double range; + discretestruct *hp; + + if (discretes == NULL) { + if ((discretes = + (discretestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (discretestruct))) == NULL) + return; + } + hp = &discretes[MI_SCREEN(mi)]; + + + hp->maxx = MI_WIDTH(mi); + hp->maxy = MI_HEIGHT(mi); +#ifdef TEST + hp->op = TEST; +#else + hp->op = bias[LRAND() % BIASES]; +#endif + switch (hp->op) { + case HSHOE: + hp->ic = 0; + hp->jc = 0; + hp->is = hp->maxx / (4); + hp->js = hp->maxy / (4); + hp->a = 0.5; + hp->b = 0.5; + hp->c = 0.2; + hp->d = -1.25; + hp->e = 1; + hp->i = hp->j = 0.0; + break; + case DELOG: + hp->ic = 0.5; + hp->jc = 0.3; + hp->is = hp->maxx / 1.5; + hp->js = hp->maxy / 1.5; + hp->a = 2.176399; + hp->i = hp->j = 0.01; + break; + case HENON: + hp->jc = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.4; + hp->ic = 1.3 * (1 - (hp->jc * hp->jc) / (0.4 * 0.4)); + hp->is = hp->maxx; + hp->js = hp->maxy * 1.5; + hp->a = 1; + hp->b = 1.4; + hp->c = 0.3; + hp->i = hp->j = 0; + break; + case SQRT: + hp->ic = 0; + hp->jc = 0; + hp->is = 1; + hp->js = 1; + range = sqrt((double) hp->maxx * 2 * hp->maxx * 2 + + (double) hp->maxy * 2 * hp->maxy * 2) / + (10.0 + LRAND() % 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() % 2)) + hp->c = 0.0; + hp->i = hp->j = 0.0; + break; + case STANDARD: + hp->ic = M_PI; + hp->jc = M_PI; + hp->is = hp->maxx / (M_PI * 2); + hp->js = hp->maxy / (M_PI * 2); + hp->a = 0; /* decay */ + hp->b = (LRAND() / MAXRAND) * 2.0; + hp->c = 0; + hp->i = M_PI; + hp->j = M_PI; + break; + case BIRDIE: + hp->ic = 0; + hp->jc = 0; + hp->is = hp->maxx / 2; + hp->js = hp->maxy / 2; + hp->a = 1.99 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.2; + hp->b = 0; + hp->c = 0.8 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.1; + hp->i = hp->j = 0; + break; + case TRIG: + hp->a = 5; + hp->b = 0.5 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.3; + hp->ic = hp->a; + hp->jc = 0; + hp->is = hp->maxx / (hp->b * 20); + hp->js = hp->maxy / (hp->b * 20); + hp->i = hp->j = 0; + break; + case CUBIC: + hp->a = 2.77; + hp->b = 0.1 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.1; + hp->ic = 0; + hp->jc = 0; + hp->is = hp->maxx / 4; + hp->js = hp->maxy / 4; + hp->i = hp->j = 0.1; + break; + case AILUJ: + { + int i; + double x, y, xn, yn; + + hp->ic = 0; + hp->jc = 0; + hp->is = hp->maxx / 4; + hp->js = hp->maxx / 4; + do { + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 1.5 - 0.5; + hp->b = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 1.5; + x = y = 0; +#define MAXITER 10 + for (i = 0; i < MAXITER && x * x + y * y < 13; i++) { /* 'Brot calc */ + xn = x * x - y * y + hp->a; + yn = 2 * x * y + hp->b; + x = xn; + y = yn; + } + } while (i < MAXITER); /* wait for a connected set */ + hp->i = hp->j = 0.1; + break; + } + } + hp->pix = 0; + hp->inc = 0; + + if (hp->pointBuffer == NULL) + hp->pointBuffer = (XPoint *) malloc(sizeof (XPoint) * MI_COUNT(mi)); + + /* Clear the background. */ + MI_CLEARWINDOW(mi); + + hp->count = 0; +} + + +void +draw_discrete(ModeInfo * mi) +{ + Display *dsp = MI_DISPLAY(mi); + Window win = MI_WINDOW(mi); + double oldj, oldi; + int count = MI_COUNT(mi); + int cycles = MI_CYCLES(mi); + int k; + XPoint *xp; + GC gc = MI_GC(mi); + discretestruct *hp = &discretes[MI_SCREEN(mi)]; + + k = count; + xp = hp->pointBuffer; + + hp->inc++; + + MI_IS_DRAWN(mi) = True; + + if (MI_NPIXELS(mi) > 2) { + XSetForeground(dsp, gc, MI_PIXEL(mi, hp->pix)); + if (++hp->pix >= MI_NPIXELS(mi)) + hp->pix = 0; + } + while (k--) { + oldj = hp->j; + oldi = hp->i; + switch (hp->op) { + case HSHOE: + { + int i; + +#if 0 + if (!k) { + XSetForeground(dsp, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(dsp, win, gc, 0, 0, hp->maxx, hp->maxy); + XSetForeground(dsp, gc, MI_PIXEL(mi, hp->pix)); + } else +#endif +#define HD +#ifdef HD + if (k < count / 4) { + hp->i = ((double) k / count) * 8 - 1; + hp->j = 1; + } else if (k < count / 2) { + hp->i = 1; + hp->j = 3 - ((double) k / count) * 8; + } else if (k < 3 * count / 4) { + hp->i = 5 - ((double) k / count) * 8; + hp->j = -1; + } else { + hp->i = -1; + hp->j = ((double) k / count) * 8 - 7; + } + for (i = 1; i < (hp->inc % 15); i++) { + oldj = hp->j; + oldi = hp->i; +#endif + hp->i = (hp->a * oldi + hp->b) * oldj; + hp->j = (hp->e - hp->d + hp->c * oldi) * oldj * oldj - hp->c * oldi + hp->d; +#ifdef HD + } +#endif + break; + } + case DELOG: + hp->j = oldi; + hp->i = hp->a * oldi * (1 - oldj); + break; + case HENON: + hp->i = oldj + hp->a - hp->b * oldi * oldi; + hp->j = hp->c * oldi; + break; + case SQRT: + if (k) { + hp->j = hp->a + hp->i; + hp->i = -oldj + (hp->i < 0 + ? sqrt(fabs(hp->b * (hp->i - hp->c))) + : -sqrt(fabs(hp->b * (hp->i - hp->c)))); + } else { + static int s = 1; + + hp->i = s * hp->inc * hp->maxx / cycles / 2; + hp->j = hp->a + hp->i; + s = -s; + } + break; + case STANDARD: + if (k) { + hp->j = (1 - hp->a) * oldj + hp->b * sin(oldi) + hp->a * hp->c; + hp->j = fmod(hp->j + 2 * M_PI, 2 * M_PI); + hp->i = oldi + hp->j; + hp->i = fmod(hp->i + 2 * M_PI, 2 * M_PI); + } else { + static int s = 1; + + hp->j = M_PI + fmod(s * hp->inc * 2 * M_PI / (cycles - 0.5), M_PI); + hp->i = M_PI; + s = -s; + } + break; + case BIRDIE: + hp->j = oldi; + hp->i = (1 - hp->c) * cos(M_PI * hp->a * oldj) + hp->c * hp->b; + hp->b = oldj; + break; + case TRIG: + { + double r2 = oldi * oldi + oldj * oldj; + + hp->i = hp->a + hp->b * (oldi * cos(r2) - oldj * sin(r2)); + hp->j = hp->b * (oldj * cos(r2) + oldi * sin(r2)); + } + break; + case CUBIC: + hp->i = oldj; + hp->j = hp->a * oldj - oldj * oldj * oldj - hp->b * oldi; + break; + case AILUJ: + hp->i = ((LRAND() < MAXRAND / 2) ? -1 : 1) * + sqrt(((oldi - hp->a) + + sqrt((oldi - hp->a) * (oldi - hp->a) + (oldj - hp->b) * (oldj - hp->b))) / 2); + if (hp->i < 0.00000001 && hp->i > -0.00000001) + hp->i = (hp->i > 0.0) ? 0.00000001 : -0.00000001; + hp->j = (oldj - hp->b) / (2 * hp->i); + break; + } + xp->x = hp->maxx / 2 + (int) ((hp->i - hp->ic) * hp->is); + xp->y = hp->maxy / 2 - (int) ((hp->j - hp->jc) * hp->js); + xp++; + } + XDrawPoints(dsp, win, gc, hp->pointBuffer, count, CoordModeOrigin); + if (++hp->count > cycles) { + init_discrete(mi); + } +} + +void +release_discrete(ModeInfo * mi) +{ + if (discretes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + discretestruct *hp = &discretes[screen]; + + if (hp->pointBuffer != NULL) + (void) free((void *) hp->pointBuffer); + } + (void) free((void *) discretes); + discretes = NULL; + } +} + +void +refresh_discrete(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_discrete */ diff --git a/modes/drift.c b/modes/drift.c new file mode 100644 index 00000000..046784ac --- /dev/null +++ b/modes/drift.c @@ -0,0 +1,648 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* drift --- drifting recursive fractal cosmic flames */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)drift.c 4.07 97/11/24 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: Jamie Zawinski compatible with xscreensaver + * 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 + */ + +#ifdef STANDALONE +#define PROGCLASS "Drift" +#define HACK_INIT init_drift +#define HACK_DRAW draw_drift +#define drift_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 30 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_drift + +#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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct drift_description = +{"drift", "init_drift", "draw_drift", "release_drift", + "refresh_drift", "init_drift", NULL, &drift_opts, + 10000, 30, 1, 1, 64, 1.0, "", + "Shows cosmic drifting flame fractals", 0, NULL}; + +#endif + +#define MAXBATCH1 200 /* mono */ +#define MAXBATCH2 20 /* color */ +#define FUSE 10 /* discard this many initial iterations */ +#define NMAJORVARS 7 +#define MAXLEV 10 + +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; + XPoint *cpts; + + double x, y, c; + int liss_time; + Bool grow, liss; + + short lasthalf; + long saved_random_bits; + int nbits; +} driftstruct; + +static driftstruct *drifts = NULL; + +static short +halfrandom(driftstruct * dp, int mv) +{ + unsigned long r; + + if (dp->lasthalf) { + r = dp->lasthalf; + dp->lasthalf = 0; + } else { + r = LRAND(); + dp->lasthalf = (short) (r >> 16); + } + r = r % mv; + return r; +} + +static int +frandom(driftstruct * dp, int n) +{ + int result; + + if (3 > dp->nbits) { + dp->saved_random_bits = LRAND(); + dp->nbits = 31; + } + switch (n) { + case 2: + result = (int) (dp->saved_random_bits & 1); + dp->saved_random_bits >>= 1; + dp->nbits -= 1; + return result; + + case 3: + result = (int) (dp->saved_random_bits & 3); + dp->saved_random_bits >>= 2; + dp->nbits -= 2; + if (3 == result) + return frandom(dp, 3); + return result; + + case 4: + result = (int) (dp->saved_random_bits & 3); + dp->saved_random_bits >>= 2; + dp->nbits -= 2; + return result; + + case 5: + result = (int) (dp->saved_random_bits & 7); + dp->saved_random_bits >>= 3; + dp->nbits -= 3; + if (4 < result) + return frandom(dp, 5); + return result; + default: + (void) fprintf(stderr, "bad arg to frandom\n"); + } + return 0; +} + +#define DISTRIB_A (halfrandom(dp, 7000) + 9000) +#define DISTRIB_B ((frandom(dp, 3) + 1) * (frandom(dp, 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(dp, 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(dp, 8)) { + dp->nfractals = halfrandom(dp, 30) + 5; + dp->fractal_len = DISTRIB_A; + } else { + dp->nfractals = halfrandom(dp, 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_COUNT(mi)) / 20; + + MI_CLEARWINDOW(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(dp, 1000) / 500.0 - 1.0); + r += dp->df[j][k][i] * dp->df[j][k][i]; + } + r = (3 + halfrandom(dp, 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->ncpoints) + dp->ncpoints = (int *) malloc(sizeof (int) * MI_NCOLORS(mi)); + + if (!dp->cpts) + dp->cpts = (XPoint *) malloc(MAXBATCH2 * sizeof (XPoint) * MI_NCOLORS(mi)); + if (dp->rainbow) + for (i = 0; i < MI_NPIXELS(mi); i++) + dp->ncpoints[i] = 0; + else + dp->npoints = 0; + dp->nxforms = halfrandom(dp, 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(dp, 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(dp, 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(dp, 1000) / 500.0 - 1.0); + } + } + if (dp->color) + dp->pixcol = MI_PIXEL(mi, halfrandom(dp, MI_NPIXELS(mi))); + else + dp->pixcol = MI_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_WIDTH(mi); + dp->height = MI_HEIGHT(mi); + dp->color = MI_NPIXELS(mi) > 2; + + if (MI_IS_FULLRANDOM(mi)) { + if (NRAND(3) == 0) + dp->grow = True; + else { + dp->grow = False; + dp->liss = (Bool) (LRAND() & 1); + } + } 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, 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(dp, 1000) / 500.0 - 1.0; + ny = halfrandom(dp, 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 * MAXBATCH2 + n].x = fixed_x; + dp->cpts[c * MAXBATCH2 + n].y = fixed_y; + if (++dp->ncpoints[c] == MAXBATCH2) { + XSetForeground(display, gc, MI_PIXEL(mi, c)); + XDrawPoints(display, d, gc, &(dp->cpts[c * MAXBATCH2]), + 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 * MAXBATCH2]), + 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; + + MI_IS_DRAWN(mi) = True; + + 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(dp, 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) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + driftstruct *dp = &drifts[screen]; + + (void) free((void *) dp->ncpoints); + (void) free((void *) dp->cpts); + } + (void) free((void *) drifts); + drifts = NULL; + } +} + +void +refresh_drift(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_drift */ diff --git a/modes/eyes.c b/modes/eyes.c new file mode 100644 index 00000000..eea5f76f --- /dev/null +++ b/modes/eyes.c @@ -0,0 +1,1045 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* eyes --- follow the bouncing Grelb */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)eyes.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright 1996 by Ron Hitchens + * + * Adapted from the ubiquitous xeyes demo supplied by MIT with the + * X Window System. + * That code is Copyright 1991 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. + * + * 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: + * 04-Sep-97: Added interactive frobbing with mouse (copied from julia.c) + * 10-May-97: Compatible with xscreensaver + * 18-Mar-96: Changes for new hook calling conventions. Keep per-screen + * state information. Remove global accesses. + * 21-Feb-96: Recoded to keep an off-screen image for each pair of eyes, + * and to only paint the changed parts to the screen. + * Allow the Grelb to enter from either side. + * 18-Feb-96: Got the code into mostly working condition. + * 15-Feb-96: Had a brainwave, started hacking the xeyes code. + */ + +#ifdef STANDALONE +#define PROGCLASS "Eyes" +#define HACK_INIT init_eyes +#define HACK_DRAW draw_eyes +#define eyes_opts xlockmore_opts +#define DEFAULTS "*delay: 20000 \n" \ + "*count: -8 \n" \ + "*cycles: 5 \n" \ + "*ncolors: 200 \n" \ + "*bitmap: \n" \ + "*mouse: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ + +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_eyes + +ModeSpecOpt eyes_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct eyes_description = +{"eyes", "init_eyes", "draw_eyes", "release_eyes", + "refresh_eyes", "init_eyes", NULL, &eyes_opts, + 20000, -8, 5, 1, 64, 1.0, "", + "Shows eyes following a bouncing grelb", 0, NULL}; + +#endif + +/* definitions for the xlock version of xeyes */ +#define MAX_EYES 200 /* limit or uses too much memory */ +#define MIN_EYE_SIZE 50 /* smallest size eyes can be */ +#define FLY_ICON_SIZE 5 /* the size of a fly when iconic */ +#define FLY_MAX_SPEED 10 /* max (slowest) delay between steps */ +#define FLY_SIDE_LEFT 0 /* enter and leave by left side */ +#define FLY_SIDE_RIGHT 1 /* enter and leave by right side */ +#define LIFE_MIN 100 /* shortest life, cycles */ +#define LIFE_RANGE 1000 /* range of possible lifetimes */ +#define MAX_CYCLES 10 /* max value of cycles */ +#define FRICTION 24 /* affects bounciness */ + +/* definitions from the original MIT xeyes code */ +#define NUM_EYES 2 +#define EYE_X(n) ((n) * 2.0) +#define EYE_Y(n) (0.0) +#define EYE_OFFSET (0.1) /* padding between eyes */ +#define EYE_THICK (0.175) /* thickness of eye rim */ +#define BALL_WIDTH (0.3) +#define BALL_PAD (0.05) +#define EYE_WIDTH (2.0 - (EYE_THICK + EYE_OFFSET) * 2) +#define EYE_HEIGHT EYE_WIDTH +#define EYE_HWIDTH (EYE_WIDTH / 2.0) +#define EYE_HHEIGHT (EYE_HEIGHT / 2.0) +#define BALL_HEIGHT BALL_WIDTH +#define BALL_DIST ((EYE_WIDTH - BALL_WIDTH) / 2.0 - BALL_PAD) +#define W_MIN_X (-1.0 + EYE_OFFSET) +#define W_MAX_X (3.0 - EYE_OFFSET) +#define W_MIN_Y (-1.0 + EYE_OFFSET) +#define W_MAX_Y (1.0 - EYE_OFFSET) + +/* ---------------------------------------------------------------------- */ + +/* definitions of matrix math code used by xeyes */ + +#define TPointEqual(a, b) ((a).x == (b).x && (a).y == (b).y) +#define XPointEqual(a, b) ((a).x == (b).x && (a).y == (b).y) + +typedef struct _transform { + double mx, bx; + double my, by; +} Transform; + +typedef struct _TPoint { + double x, y; +} TPoint; + +#define Xx(x,y,t) ((int)((t)->mx * (x) + (t)->bx + 0.5)) +#define Xy(x,y,t) ((int)((t)->my * (y) + (t)->by + 0.5)) +#define Xwidth(w,h,t) ((int)((t)->mx * (w) + 0.5)) +#define Xheight(w,h,t) ((int)((t)->my * (h) + 0.5)) +#define Tx(x,y,t) ((((double) (x)) - (t)->bx) / (t)->mx) +#define Ty(x,y,t) ((((double) (y)) - (t)->by) / (t)->my) +#define Twidth(w,h,t) (((double) (w)) / (t)->mx) +#define Theight(w,h,t) (((double) (h)) / (t)->my) + +/* ---------------------------------------------------------------------- */ + +/* aliases for vars defined in the bitmap file */ +#define FLY_WIDTH image_width +#define FLY_HEIGHT image_height +#define FLY_BITS image_bits + +#include "eyes.xbm" + +typedef struct { /* info about a "fly" */ + int x, y; + int oldx, oldy; + int width, height; + int vx, vy; + int side; + unsigned long pixel; + int zero_y; +} Fly; + +typedef struct { /* info about a pair of eyes */ + int x, y; + int width; + int height; + int xoff, yoff; + int rectw, recth; + int painted; + unsigned long time_to_die; + unsigned long eyelid_pixel, eyeball_pixel, pupil_pixel; + Pixmap pixmap; + XRectangle bbox; + Transform transform; + TPoint pupil[2]; + TPoint last_pupil[2]; +} Eyes; + +typedef struct { /* per-screen info */ + Pixmap flypix; + int flywidth, flyheight; + int graphics_format; + GC eyeGC; + GC flyGC; + int num_eyes; + Eyes *eyes; + Fly fly; + Cursor cursor; + unsigned long time; +} EyeScrInfo; + +/* ---------------------------------------------------------------------- */ + +static EyeScrInfo *eye_info = NULL; + +static int stuff_alloced = False; /* is stuff here alloced */ + +/* ---------------------------------------------------------------------- */ + +/*- + * Fill an arc, using a tranformation matrix. Lifted from xeyes. + * The code to return the bounding box is a local addition. + */ + +static void +TFillArc(register Display * dpy, Drawable d, GC gc, Transform * t, double x, double y, double width, double height, int angle1, int angle2, XRectangle * rect) +{ + int xx, xy, xw, xh; + + xx = Xx(x, y, t); + xy = Xy(x, y, t); + xw = Xwidth(width, height, t); + xh = Xheight(width, height, t); + if (xw < 0) { + xx += xw; + xw = -xw; + } + if (xh < 0) { + xy += xh; + xh = -xh; + } + XFillArc(dpy, d, gc, xx, xy, xw, xh, angle1, angle2); + + if (rect != NULL) { + rect->x = xx; + rect->y = xy; + rect->width = xw; + rect->height = xh; + } +} + + +/*- + * Set a tranform matrix from the given arguments. Lifted from xeyes. + */ + +static void +SetTransform(Transform * t, int xx1, int xx2, int xy1, int xy2, double tx1, double tx2, double ty1, double ty2) +{ + t->mx = ((double) xx2 - xx1) / (tx2 - tx1); + t->bx = ((double) xx1) - t->mx * tx1; + t->my = ((double) xy2 - xy1) / (ty2 - ty1); + t->by = ((double) xy1) - t->my * ty1; +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Given two rectangles, return the rectangle which encloses both. + * Used to clculate "damage" when the pupil moves, to minimize the + * number of pixels which must be copied out to the screen. + */ + +static void +join_rects(XRectangle * r1, XRectangle * r2, XRectangle * ret) +{ + XRectangle tmp; + int n1, n2; + + /* find min x and min y */ + tmp.x = (r1->x <= r2->x) ? r1->x : r2->x; + tmp.y = (r1->y <= r2->y) ? r1->y : r2->y; + /* find max x, plus one (just past the right side) */ + n1 = r1->x + r1->width; + n2 = r2->x + r2->width; + /* compute width, relative to min x (left side) */ + tmp.width = ((n1 > n2) ? n1 : n2) - tmp.x; + /* same for y */ + n1 = r1->y + r1->height; + n2 = r2->y + r2->height; + tmp.height = ((n1 > n2) ? n1 : n2) - tmp.y; + *ret = tmp; /* copy out result rectangle */ +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Do the math to figure out where the pupil should be drawn. + * This code lifted intact from the xeyes widget. + */ + +#if defined( SVR4 ) || defined( SYSV ) && defined( SYSV386 ) +extern double hypot(double, double); + +#endif + +static void +computePupil(int num, TPoint mouse, TPoint *ret) +{ + double cx, cy; + double dist; + double angle; + double x, y; + double h; + double dx, dy; + double cosa, sina; + + dx = mouse.x - EYE_X(num); + dy = mouse.y - EYE_Y(num); + if (dx == 0 && dy == 0) { + cx = EYE_X(num); + cy = EYE_Y(num); + } else { + /* Avoid atan2: DOMAIN error message */ + if (dx == 0.0 && dy == 0.0) + angle = 0.0; + else + angle = atan2((double) dy, (double) dx); + cosa = cos(angle); + sina = sin(angle); + h = hypot(EYE_HHEIGHT * cosa, EYE_HWIDTH * sina); + x = (EYE_HWIDTH * EYE_HHEIGHT) * cosa / h; + y = (EYE_HWIDTH * EYE_HHEIGHT) * sina / h; + dist = BALL_DIST * hypot(x, y); + if (dist > hypot((double) dx, (double) dy)) { + cx = dx + EYE_X(num); + cy = dy + EYE_Y(num); + } else { + cx = dist * cosa + EYE_X(num); + cy = dist * sina + EYE_Y(num); + } + } + (*ret).x = cx; + (*ret).y = cy; +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Create the eye image, using the data in the structure pointed + * to by "e", in the Drawable "d". The "full" flag indicates + * whether to create the full eye image, or to just paint the + * pupil in a new position. + */ + +static void +make_eye(ModeInfo * mi, Drawable d, Eyes * e, int n, int full) +{ + EyeScrInfo *ep = &eye_info[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + GC gc = ep->eyeGC; + XRectangle *bbox = &e->bbox; + XRectangle tmp1, tmp2; + + if (full) { + /* draw the outer (eyelid) oval */ + XSetForeground(display, gc, e->eyelid_pixel); + TFillArc(display, d, gc, &e->transform, + EYE_X(n) - EYE_HWIDTH - EYE_THICK, + EYE_Y(n) - EYE_HHEIGHT - EYE_THICK, + EYE_WIDTH + EYE_THICK * 2.0, + EYE_HEIGHT + EYE_THICK * 2.0, + 90 * 64, 360 * 64, &tmp1); + + /* draw the inner (eyeball) oval */ + XSetForeground(display, gc, e->eyeball_pixel); + TFillArc(display, d, gc, &e->transform, + EYE_X(n) - EYE_HWIDTH, EYE_Y(n) - EYE_HHEIGHT, + EYE_WIDTH, EYE_HEIGHT, 90 * 64, 360 * 64, &tmp2); + + join_rects(&tmp1, &tmp2, &tmp1); + + /* draw the pupil on top of the eyeball oval */ + XSetForeground(display, gc, e->pupil_pixel); + TFillArc(display, d, gc, &e->transform, + e->pupil[n].x - BALL_WIDTH / 2.0, + e->pupil[n].y - BALL_HEIGHT / 2.0, + BALL_WIDTH, BALL_HEIGHT, 90 * 64, 360 * 64, &tmp2); + + join_rects(&tmp1, &tmp2, bbox); + } else { + /* undraw the pupil */ + XSetForeground(display, gc, e->eyeball_pixel); + TFillArc(display, d, gc, &e->transform, + e->last_pupil[n].x - BALL_WIDTH / 2.0, + e->last_pupil[n].y - BALL_HEIGHT / 2.0, + BALL_WIDTH, BALL_HEIGHT, 90 * 64, 360 * 64, &tmp1); + + /* draw the pupil on top of the eyeball oval */ + XSetForeground(display, gc, e->pupil_pixel); + TFillArc(display, d, gc, &e->transform, + e->pupil[n].x - BALL_WIDTH / 2.0, + e->pupil[n].y - BALL_HEIGHT / 2.0, + BALL_WIDTH, BALL_HEIGHT, 90 * 64, 360 * 64, &tmp2); + + join_rects(&tmp1, &tmp2, bbox); + } +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Check to see if the flyer touches this pair of eyes. + */ + +static Bool +fly_touches(Fly * f, Eyes * e, int old) +{ + int x = (old) ? f->oldx : f->x; + int y = (old) ? f->oldy : f->y; + + if ((x + f->width) <= e->x) + return (False); + if (x >= (e->x + e->width)) + return (False); + if ((y + f->height) <= e->y) + return (False); + if (y >= (e->y + e->height)) + return (False); + return (True); +} + +static Bool +fly_touches_eye(Fly * f, Eyes * e) +{ + if (fly_touches(f, e, True) || fly_touches(f, e, False)) { + return (True); + } + return (False); +} + +/*- + * Check to see if two pairs of eyes overlap. + */ + +static Bool +eyes_overlap(Eyes * e1, Eyes * e2) +{ + if ((e1->x + e1->width) < e2->x) + return (False); + if (e1->x >= (e2->x + e2->width)) + return (False); + if ((e1->y + e1->height) < e2->y) + return (False); + if (e1->y >= (e2->y + e2->height)) + return (False); + return (True); +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Initialize the flyer. Called when the window changes, and + * whenever she bounces off the screen. + * In the first version, the eyes followed a "fly", which was + * just a flickering spot that moved at random. That didn't + * work so well. It was replaced with a bouncing gelb, but the + * name "fly" has yet to be purged. + */ + +static void +init_fly(ModeInfo * mi, Fly * f) +{ + EyeScrInfo *ep = &eye_info[MI_SCREEN(mi)]; + int win_width = MI_WIDTH(mi); + int win_height = MI_HEIGHT(mi); + + (void) memset((char *) f, 0, sizeof (Fly)); /* clear everything to zero */ + + f->side = FLY_SIDE_LEFT; + + if (MI_IS_ICONIC(mi)) { + /* image is just a dot when iconic */ + f->width = f->height = FLY_ICON_SIZE; + f->vx = NRAND(4) + 1; /* slower when iconic */ + } else { + f->width = ep->flywidth; + f->height = ep->flyheight; + f->vx = NRAND(15) + 1; /* random horiz velocity */ + } + + f->y = NRAND(win_height); + if (f->y > (win_height / 2)) { + f->side = FLY_SIDE_RIGHT; /* change to right side */ + f->y -= win_height / 2; /* start in top half */ + f->x = win_width - f->width; /* move to right of screen */ + f->vx = -(f->vx); /* flip direction */ + } + f->oldx = -(f->width); /* prevent undraw 1st time */ + + if (MI_NPIXELS(mi) <= 2) { + f->pixel = MI_WHITE_PIXEL(mi); /* always white when mono */ + } else { + f->pixel = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + } +} + +/*- + * Unpaint the flyer by painting the image in black. + */ + +static void +unpaint_fly(ModeInfo * mi, Fly * f) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + + if (MI_IS_ICONIC(mi)) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillArc(display, window, gc, f->oldx, f->oldy, + f->width, f->height, 90 * 64, 360 * 64); + } else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); +#ifdef FLASH + XFillRectangle(display, window, gc, + f->oldx, f->oldy, f->width, f->height); +#else + ERASE_IMAGE(display, window, gc, f->x, f->y, + f->oldx, f->oldy, f->width, f->height); +#endif + } +} + +/*- + * Paint the bouncing grelb on the screen. If not in iconic + * mode, unpaint the previous image. When iconic, the fly + * doesn't need to be undrawn, because it will always be on top + * of the eyes, which are repainted before the fly is painted. + */ + +static void +paint_fly(ModeInfo * mi, Fly * f) +{ + EyeScrInfo *ep = &eye_info[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int x = f->x, y = f->y; + + if (MI_IS_ICONIC(mi)) { + /* don't need to unpaint when iconic + * ep->flyGC has stipple set, don't use when iconic + */ + XSetForeground(display, MI_GC(mi), f->pixel); + XFillArc(display, window, MI_GC(mi), x, y, + f->width, f->height, 90 * 64, 360 * 64); + } else { + unpaint_fly(mi, f); + XSetForeground(display, ep->flyGC, f->pixel); + XSetTSOrigin(display, ep->flyGC, x, y); +#ifdef FLASH + XSetFillStyle(display, ep->flyGC, FillStippled); +#else + XSetFillStyle(display, ep->flyGC, FillOpaqueStippled); +#endif + XFillRectangle(display, window, ep->flyGC, + x, y, f->width, f->height); + XFlush(display); + } +} + +/*- + * Compute the new position of the fly. The bouncy-boinginess + * algorithm is borrowed from the "bounce" (soccer ball) mode. + */ + +static void +move_fly(ModeInfo * mi, Fly * f) +{ + int win_width = MI_WIDTH(mi); + int win_height = MI_HEIGHT(mi); + int left = (f->side == FLY_SIDE_LEFT) ? -(f->width) : 0; + int right = (f->side == FLY_SIDE_RIGHT) ? win_width : + win_width - f->width; + Bool track_p = MI_IS_MOUSE(mi); + int cx, cy; + + + f->oldx = f->x; /* remember position before moving, */ + f->oldy = f->y; /* for unpainting previous image */ + + if (track_p) { + Window r, c; + int rx, ry; + unsigned int m; + + (void) XQueryPointer(MI_DISPLAY(mi), MI_WINDOW(mi), + &r, &c, &rx, &ry, &cx, &cy, &m); + if (cx <= 0 || cy <= 0 || + cx >= MI_WIDTH(mi) - f->width - 1 || + cy >= MI_HEIGHT(mi) - f->width - 1) + track_p = False; + } + if (track_p) { + f->x = cx; + f->y = cy; + return; + } + f->x += f->vx; /* apply x velocity */ + + if (f->x > right) { + if (f->side == FLY_SIDE_RIGHT) { + unpaint_fly(mi, f); /* went off the edge, reset */ + init_fly(mi, f); + } else { + /* Bounce off the right edge */ + f->x = 2 * (win_width - f->width) - f->x; + f->vx = -f->vx + f->vx / FRICTION; + } + } else if (f->x < left) { + if (f->side == FLY_SIDE_LEFT) { + unpaint_fly(mi, f); /* went off the edge, reset */ + init_fly(mi, f); + } else { + /* Bounce off the left edge */ + f->x = -f->x; + f->vx = -f->vx + f->vx / FRICTION; + } + } + f->vy++; /* gravity, accelerate in y direction */ + f->y += f->vy; /* apply y velocity */ + + if (f->y >= (win_height - f->height)) { + /* Bounce off the bottom edge */ + f->y = (win_height - f->height); + f->vy = -f->vy + f->vy / FRICTION; + /* every once in a while, go apeshit to clean "high lurkers" */ + if (NRAND(50) == 0) { + f->vy *= 4; + } + } else if (f->y < 0) { + /* Bounce off the top edge */ + f->y = -f->y; + f->vy = -f->vy + f->vy / FRICTION; + } + /* if he settles to the bottom, move him off quick */ + if (abs(f->vy) < 2) { + if ((f->zero_y++) > 10) { + f->vx += (f->side == FLY_SIDE_LEFT) ? -1 : 1; + } + } else { + f->zero_y = 0; /* still bouncing */ + } +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Initialize one pair of eyes + */ + +static void +create_eyes(ModeInfo * mi, Eyes * e, Eyes * eyes, int num_eyes) +{ + EyeScrInfo *ep = &eye_info[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int win_width = MI_WIDTH(mi); + int win_height = MI_HEIGHT(mi); + unsigned long black_pixel = MI_BLACK_PIXEL(mi); + unsigned long white_pixel = MI_WHITE_PIXEL(mi); + Bool iconic = MI_IS_ICONIC(mi); + Pixmap pix = e->pixmap; /* preserve pixmap handle */ + int w = e->width; /* remember last w/h */ + int h = e->height; + int npixels = MI_NPIXELS(mi); /* num colors in colormap */ + int cycs = MI_CYCLES(mi); /* affects eye lifetime */ + int maxw = win_width / 2; /* widest eyes can be */ + int color, lid_color; + int i; + + (void) memset((char *) e, 0, sizeof (Eyes)); /* wipe everything */ + e->pixmap = pix; /* remember Pixmap handle */ + + /* sanity check the cycles value */ + if (cycs < 1) + cycs = 1; + if (cycs > MAX_CYCLES) + cycs = MAX_CYCLES; + e->time_to_die = (unsigned long) LIFE_MIN + NRAND(LIFE_RANGE); + e->time_to_die *= (unsigned long) cycs; /* multiply life by cycles */ + e->time_to_die += ep->time; + + e->pupil_pixel = black_pixel; /* pupil is always black */ + + if (MI_NPIXELS(mi) <= 2) { + /* TODO: stipple the eyelid? */ + e->eyelid_pixel = black_pixel; + e->eyeball_pixel = white_pixel; + } else { + lid_color = color = NRAND(npixels); + e->eyelid_pixel = MI_PIXEL(mi, lid_color); + + while ((color = NRAND(npixels + 5)) == lid_color) { + /* empty */ + } + if (color >= npixels) { + /* give white a little better chance */ + e->eyeball_pixel = white_pixel; + } else { + e->eyeball_pixel = MI_PIXEL(mi, color); + } + } + + if (iconic) { + /* only one pair of eyes, fills entire window */ + e->width = win_width; + e->height = win_height; + } else { + if (maxw - MIN_EYE_SIZE > MIN_EYE_SIZE) + e->width = NRAND(maxw - MIN_EYE_SIZE) + MIN_EYE_SIZE; + else + e->width = NRAND(MIN_EYE_SIZE) + MIN_EYE_SIZE; + e->x = (win_width - e->width > 0) ? NRAND(win_width - e->width) : 0; + e->height = NRAND(e->width * 3 / 4) + (e->width / 4); + e->y = (win_height - e->height > 0) ? NRAND(win_height - e->height) : 0; + + /* check for overlap with other eyes */ + for (i = 0; i < num_eyes; i++) { + if (&eyes[i] == e) { /* that's me */ + continue; + } + if (eyes_overlap(e, &eyes[i])) { + /* collision, force retry on next cycle */ + e->time_to_die = 0; + break; + } + } + } + + /* If the Pixmap is smaller than the new size, make it bigger */ + if ((e->width > w) || (e->height > h)) { + if (e->pixmap != None) { + XFreePixmap(display, e->pixmap); + } + e->pixmap = XCreatePixmap(display, window, + e->width, e->height, MI_DEPTH(mi)); + if (e->pixmap == None) { + e->width = e->height = 0; + return; + } + } + /* Set the transformation matrix for this set of eyes + * If iconic, make the eyes image one pixel shorter and + * skinnier, they seem to fit in the icon box better that way. + */ + SetTransform(&e->transform, 0, (iconic) ? e->width - 1 : e->width, + (iconic) ? e->height - 1 : e->height, 0, + W_MIN_X, W_MAX_X, W_MIN_Y, W_MAX_Y); + + /* clear the offscreen pixmap to background color */ + XSetForeground(display, ep->eyeGC, black_pixel); + XFillRectangle(display, e->pixmap, ep->eyeGC, 0, 0, e->width, e->height); + + /* make the full eye images in the offscreen Pixmap */ + make_eye(mi, e->pixmap, e, 0, True); + make_eye(mi, e->pixmap, e, 1, True); +} + + +/*- + * Paint an eye pair onto the screen. + * This is normally only the change rectangles for each pupil, + * unless in iconic mode, which always repaints the full image. + */ + +static void +paint_eyes(ModeInfo * mi, Eyes * e, Fly * f, Eyes * eyes, int num_eyes) +{ + EyeScrInfo *ep = &eye_info[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = ep->eyeGC; + Bool iconic = MI_IS_ICONIC(mi); + int focusx = (f->x + (f->width / 2)) - e->x; + int focusy = (f->y + (f->height / 2)) - e->y; + Pixmap pix = e->pixmap; + TPoint point; + int i; + + if (pix == None) { + e->time_to_die = 0; /* "should not happen" */ + } + if (ep->time >= e->time_to_die) { + /* Sorry Bud, your time is up */ + if (e->painted) { + /* only unpaint it if previously painted */ + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, e->x, e->y, e->width, e->height); + } + /* randomly place the eyes elsewhere */ + create_eyes(mi, e, eyes, num_eyes); + pix = e->pixmap; /* pixmap may have changed */ + } + /* If the bouncer would intersect this pair of eyes, force the + * eyes to move. This simplifies the code, because we do not + * have to deal with drawing the bouncer on top of the eyes. + * When trying to do so, there was too much annoying flashing + * and ghost images from the undraw. I decided to observe the + * KISS principle and keep it simple. I think the effect is + * better also. + * We must draw the flyer on the eyes when iconic, but that is + * easy because the eyes repaint the whole box each time. + */ + if ((!iconic) && (fly_touches_eye(f, e))) { + e->time_to_die = 0; + } + if (e->time_to_die == 0) { + return; /* collides with something */ + } + /* set the point to look at and compute the pupil position */ + point.x = Tx(focusx, focusy, &e->transform); + point.y = Ty(focusx, focusy, &e->transform); + computePupil(0, point, &(e->pupil[0])); + computePupil(1, point, &(e->pupil[1])); + + if (e->painted) { + /* if still looking at the same point, do nothing further */ + if (TPointEqual(e->pupil[0], e->last_pupil[0]) && + TPointEqual(e->pupil[1], e->last_pupil[1])) { + return; + } + } + for (i = 0; i < 2; i++) { + /* update the eye, calculates the changed rectangle */ + make_eye(mi, pix, e, i, False); + + /* Only blit the change if the full image has been painted */ + if (e->painted) { + /* copy the changed rectangle out to the screen */ + XCopyArea(display, pix, window, gc, + e->bbox.x, e->bbox.y, + (int) e->bbox.width, (int) e->bbox.height, + e->x + e->bbox.x, e->y + e->bbox.y); + } + /* remember where we're looking, for the next time around */ + e->last_pupil[i] = e->pupil[i]; + } + + /* always do full paint when iconic, eliminates need to track fly */ + if (iconic || (!e->painted)) { + XCopyArea(display, pix, window, gc, 0, 0, + e->width, e->height, e->x, e->y); + } + /* when iconic, pretend to never paint, causes full paint each time */ + if (!iconic) { + e->painted++; /* note that a paint has been done */ + } +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Initialization that only needs to be done once. If the + * release hook is called, this stuff may be freed and this + * function will have to allocate it again next time the + * init hook is called. + */ + +static void +one_time_init(ModeInfo * mi) +{ + if (stuff_alloced) { + return; /* only once, dude */ + } + if (eye_info == NULL) { + if ((eye_info = (EyeScrInfo *) calloc(MI_NUM_SCREENS(mi), + sizeof (EyeScrInfo))) == NULL) + return; + } + stuff_alloced = True; +} + +static void +free_eyes(Display * display, EyeScrInfo * ep) +{ + int en; + + if (ep->eyes) { + for (en = 0; en < ep->num_eyes; en++) + if (ep->eyes[en].pixmap != None) + XFreePixmap(display, ep->eyes[en].pixmap); + (void) free((void *) ep->eyes); + ep->eyes = NULL; + } +} + +/*- + * Initialize them eyes. Called each time the window changes. + */ + +void +init_eyes(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + EyeScrInfo *ep; + int i; + + one_time_init(mi); + + if (!stuff_alloced) { + /* if an alloc failed in one_time_init(), quit */ + return; + } + ep = &eye_info[MI_SCREEN(mi)]; + + if (ep->flypix == None) { + getPixmap(mi, window, FLY_WIDTH, FLY_HEIGHT, FLY_BITS, + &(ep->flywidth), &(ep->flyheight), &(ep->flypix), + &(ep->graphics_format)); + if (ep->flypix == None) { + return; + } + } + if (ep->flyGC == None) { + XGCValues gcv; + + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + if ((ep->flyGC = XCreateGC(display, window, + GCForeground | GCBackground, &gcv)) == None) + return; + XSetStipple(display, ep->flyGC, ep->flypix); + XSetFillStyle(display, ep->flyGC, FillStippled); + } + if (ep->eyeGC == None) { + if ((ep->eyeGC = XCreateGC(display, window, + (unsigned long) 0, (XGCValues *) NULL)) == None) { + return; + } + } + ep->time = 0; + /* don't want any exposure events from XCopyArea */ + XSetGraphicsExposures(display, ep->eyeGC, False); + + free_eyes(display, ep); + if (MI_IS_ICONIC(mi)) + ep->num_eyes = 1; + else { + ep->num_eyes = MI_COUNT(mi); + /* MAX_EYES is used or one may quickly run out of memory */ + if (ep->num_eyes > MAX_EYES) + ep->num_eyes = MAX_EYES; + if (ep->num_eyes < 0) { + if (ep->num_eyes < -MAX_EYES) + ep->num_eyes = NRAND(MAX_EYES) + 1; + else + ep->num_eyes = NRAND(-ep->num_eyes) + 1; /* Add 1 so its not too boring */ + } + } + if (!ep->eyes) + ep->eyes = (Eyes *) calloc(ep->num_eyes, sizeof (Eyes)); + + for (i = 0; i < ep->num_eyes; i++) { /* place each eye pair */ + /* don't assume None == 0 */ + ep->eyes[i].pixmap = None; + create_eyes(mi, &(ep->eyes[i]), ep->eyes, ep->num_eyes); + } + + init_fly(mi, &(ep->fly)); /* init the bouncer */ + + if (MI_IS_MOUSE(mi) && !ep->cursor) { /* Create an invisible cursor */ + Pixmap bit; + XColor black; + + black.red = 0; + black.green = 0; + black.blue = 0; + black.flags = DoRed | DoGreen | DoBlue; + bit = XCreatePixmapFromBitmapData(display, window, "\000", 1, 1, + MI_BLACK_PIXEL(mi), + MI_BLACK_PIXEL(mi), 1); + ep->cursor = XCreatePixmapCursor(display, bit, bit, &black, &black, + 0, 0); + XFreePixmap(display, bit); + } + XDefineCursor(display, window, ep->cursor); + + MI_CLEARWINDOW(mi); +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Called by the mainline code periodically to update the display. + */ + +void +draw_eyes(ModeInfo * mi) +{ + EyeScrInfo *ep = &eye_info[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + if (!stuff_alloced) { + /* if startup init didn't finish, do nothing */ + return; + } + move_fly(mi, &(ep->fly)); + ep->time++; + for (i = 0; i < ep->num_eyes; i++) { + paint_eyes(mi, &(ep->eyes[i]), &(ep->fly), ep->eyes, ep->num_eyes); + } + + paint_fly(mi, &(ep->fly)); +} + +/* ---------------------------------------------------------------------- */ + +/*- + * The display is being taken away from us. Free up malloc'ed + * memory and X resources that we've alloc'ed. Only called + * once, we must zap everything for every screen. + */ + +void +release_eyes(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + + if (eye_info != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + EyeScrInfo *ep = &eye_info[screen]; + + if (ep->flyGC != None) + XFreeGC(display, ep->flyGC); + if (ep->eyeGC != None) + XFreeGC(display, ep->eyeGC); + if (ep->flypix != None) + XFreePixmap(display, ep->flypix); + free_eyes(display, ep); + if (ep->cursor) + XFreeCursor(display, ep->cursor); + } + (void) free((void *) eye_info); + } + eye_info = NULL; + stuff_alloced = False; +} + +/* ---------------------------------------------------------------------- */ + +/*- + * Called when the mainline xlock code notices possible window + * damage. This hook should take steps to repaint the entire + * window (no specific damage area information is provided). + */ + +void +refresh_eyes(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + int i; + + if (!stuff_alloced) { + return; /* paranoia */ + } + MI_CLEARWINDOW(mi); + + /* simply flag all the eyes as not painted, will repaint next time */ + for (i = 0; i < eye_info[screen].num_eyes; i++) { + eye_info[screen].eyes[i].painted = False; + } +} + +#endif /* MODE_eyes */ diff --git a/modes/fadeplot.c b/modes/fadeplot.c new file mode 100644 index 00000000..64f7f46b --- /dev/null +++ b/modes/fadeplot.c @@ -0,0 +1,208 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* fadeplot --- a fading plot of sine squared */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)fadeplot.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Some easy plotting stuff, by Bas van Gaalen, Holland, PD + * + * Copyright (c) 1996 by 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. + * + * 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 +#define PROGCLASS "Fadeplot" +#define HACK_INIT init_fadeplot +#define HACK_DRAW draw_fadeplot +#define fadeplot_opts xlockmore_opts +#define DEFAULTS "*delay: 30000 \n" \ + "*count: 10 \n" \ + "*cycles: 1500 \n" \ + "*ncolors: 64 \n" +#define BRIGHT_COLORS +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_fadeplot + +ModeSpecOpt fadeplot_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct fadeplot_description = +{"fadeplot", "init_fadeplot", "draw_fadeplot", "release_fadeplot", + "refresh_fadeplot", "init_fadeplot", NULL, &fadeplot_opts, + 30000, 10, 1500, 1, 64, 0.6, "", + "Shows a fading plot of sine squared", 0, NULL}; + +#endif + +#define MINSTEPS 1 + +typedef struct { + XPoint speed, step, factor, st; + int temps, maxpts, nbstep; + int min; + int width, height; + int pix; + int angles; + int *stab; + XPoint *pts; +} fadeplotstruct; + +static fadeplotstruct *fadeplots = NULL; + +static void +initSintab(ModeInfo * mi) +{ + fadeplotstruct *fp = &fadeplots[MI_SCREEN(mi)]; + int i; + float x; + + fp->angles = NRAND(950) + 250; + fp->stab = (int *) malloc(fp->angles * sizeof (int)); + + for (i = 0; i < fp->angles; i++) { + x = SINF(2.0 * M_PI * i / fp->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_WIDTH(mi); + fp->height = MI_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_COUNT(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)); + + if (fp->stab != NULL) + (void) free((void *) fp->stab); + initSintab(mi); + + MI_CLEARWINDOW(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, temp; + + MI_IS_DRAWN(mi) = True; + + XSetForeground(display, gc, MI_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_WHITE_PIXEL(mi)); + + temp = 0; + for (j = 0; j < fp->nbstep; j++) { + for (i = 0; i < fp->maxpts / fp->nbstep; i++) { + fp->pts[temp].x = + fp->stab[(fp->st.x + fp->speed.x * j + i * fp->step.x) % fp->angles] * + fp->factor.x + fp->width / 2 - fp->min; + fp->pts[temp].y = + fp->stab[(fp->st.y + fp->speed.y * j + i * fp->step.y) % fp->angles] * + fp->factor.y + fp->height / 2 - fp->min; + temp++; + } + } + XDrawPoints(display, window, gc, fp->pts, temp, CoordModeOrigin); + XFlush(display); + fp->st.x = (fp->st.x + fp->speed.x) % fp->angles; + fp->st.y = (fp->st.y + fp->speed.y) % fp->angles; + fp->temps++; + if ((fp->temps % (fp->angles / 2)) == 0) { + fp->temps = fp->temps % fp->angles * 5; + if ((fp->temps % (fp->angles)) == 0) + fp->speed.y = (fp->speed.y++) % 30 + 1; + if ((fp->temps % (fp->angles * 2)) == 0) + fp->speed.x = (fp->speed.x) % 20; + if ((fp->temps % (fp->angles * 3)) == 0) + fp->step.y = (fp->step.y++) % 2 + 1; + + MI_CLEARWINDOW(mi); + } +} +void +refresh_fadeplot(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +void +release_fadeplot(ModeInfo * mi) +{ + if (fadeplots != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + fadeplotstruct *fp = &fadeplots[screen]; + + (void) free((void *) fp->pts); + (void) free((void *) fp->stab); + } + (void) free((void *) fadeplots); + fadeplots = NULL; + } +} + +#endif /* MODE_fadeplot */ diff --git a/modes/flag.c b/modes/flag.c new file mode 100644 index 00000000..51c9dfc5 --- /dev/null +++ b/modes/flag.c @@ -0,0 +1,585 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* flag --- a waving flag of your operating system */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)flag.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by Charles Vidal + * http://www.chez.com/vidalc + * + * Thanks to Bas van Gaalen, Holland, PD, for his Pascal source + * + * 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: + * 24-Oct-97: xpm and ras capability added. + * 13-May-97: jwz@jwz.org: turned into a standalone program. + * Made it able to animate arbitrary (runtime) text or bitmaps + * 15-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" \ + "*bitmap: \n" \ + "*font: \n" \ + "*text: \n" \ + "*fullrandom: True \n" +#define BRIGHT_COLORS +#define UNIFORM_COLORS +#define DEF_FONT "-*-helvetica-bold-r-*-240-*" +#define DEF_TEXT "" +#include "xlockmore.h" /* in xscreensaver distribution */ + +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ + +/* This makes me laugh :) */ +#ifdef JWZ +/*- + * 22-Jan-98: jwz: made the flag wigglier; added xpm support. + * (I tried to do this by re-porting from xlockmore, but the + * current xlockmore version is completely inscrutable.) + */ + +#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 /* HAVE_XMU */ + +#include "images/bob.xbm" +#include +#include +#else +#include "iostuff.h" +#endif + +#ifdef MODE_flag + +#define DEF_INVERT "False" + +static Bool invert; + +static XrmOptionDescRec opts[] = +{ + {"-invert", ".flag.invert", XrmoptionNoArg, (caddr_t) "on"}, + {"+invert", ".flag.invert", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & invert, "invert", "Invert", DEF_INVERT, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+invert", "turn on/off inverting of flag"} +}; + +ModeSpecOpt flag_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct flag_description = +{"flag", "init_flag", "draw_flag", "release_flag", + "refresh_flag", "init_flag", NULL, &flag_opts, + 50000, 1, 1000, -7, 64, 1.0, "", + "Shows a waving flag of your operating system", 0, NULL}; + +#endif + +/* aliases for vars defined in the bitmap file */ +#define FLAG_WIDTH image_width +#define FLAG_HEIGHT image_height +#define FLAG_BITS image_bits + +#include "flag.xbm" + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#define FLAG_NAME image_name +#include "flag.xpm" +#define DEFAULT_XPM 0 +#endif + +#if !defined( VMS ) || ( __VMS_VER >= 70000000 ) +#include +#else +#if USE_XVMSUTILS +#if 0 +#include "../xvmsutils/utsname.h" +#else +#include +#endif +#endif /* USE_XVMSUTILS */ +#endif + +#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 + 2 * (fp)->sofs) +#define MAXH(fp) (MAXSCALE * (fp)->image->height+ 2 * MAXAMP + (fp)->pointsize + 2 * (fp)->sofs) +#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 +#define IMAGE_FLAG 0 +#define MESSAGE_FLAG 1 + +typedef struct { + int samp; + int sofs; + int sidx; + int x_flag, y_flag; + int timer; + int stab[ANGLES]; + Pixmap cache; + int width, height; + int pointsize; + float size; + float inctaille; + int startcolor; + int choice; + XImage *image; + XImage *logo; + Colormap cmap; + unsigned long black; + int graphics_format; + GC backGC; +} flagstruct; + +static XFontStruct *messagefont = None; + +static flagstruct *flags = NULL; + +extern XFontStruct *getFont(Display * display); + +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; + + /*- + * change the periodicity of the sin formula : the maximum of the + * periocity seem to be 16 ( 2^4 ), after the drawing isn't good looking + */ + int periodicity = random_num(4); + int puissance = 1; + + /* for (i=0;istab[i] = (int) (SINF(i * puissance * 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 (MI_NPIXELS(mi) <= 2 || fp->graphics_format < IS_XPM || + fp->choice == MESSAGE_FLAG) { + if (((int) !invert) ^ XGetPixel(fp->image, x, y)) + XSetForeground(display, fp->backGC, fp->black); + else if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, fp->backGC, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, fp->backGC, + MI_PIXEL(mi, (y + x + fp->sidx + fp->startcolor) % + MI_NPIXELS(mi))); + } else { + XSetForeground(display, fp->backGC, XGetPixel(fp->image, x, y)); + } + if (fp->pointsize <= 1) + XDrawPoint(display, fp->cache, fp->backGC, xp, yp); + else +#ifndef NOTHREED_EFFECT + XFillRectangle(display, fp->cache, fp->backGC, xp, yp, + fp->pointsize, fp->pointsize); +#else + if (fp->pointsize < 6) + XFillRectangle(display, fp->cache, fp->backGC, xp, yp, + fp->pointsize, fp->pointsize); + else + XFillArc(display, fp->cache, fp->backGC, xp, yp, + fp->pointsize, fp->pointsize, 0, 360 * 64); +#endif + } +} + +extern char *message; + +static void +getText(ModeInfo * mi, XImage ** image) +{ + Display *display = MI_DISPLAY(mi); + char *text1, *text2; + char *line, *token; + int width, height; + int lines; + int margin = 2; + XCharStruct overall; + XGCValues gcv; + GC gc; + Pixmap text_pixmap; + + + if (!message || !*message) { +#if !defined( VMS ) || ( __VMS_VER >= 70000000 ) || defined( USE_XVMSUTILS ) + struct utsname uts; + + if (uname(&uts) < 0) { + text1 = (char *) strdup("uname() failed"); + } else { + char *s; + + if ((s = strchr(uts.nodename, '.'))) + *s = 0; + text1 = (char *) malloc(strlen(uts.nodename) + + strlen(uts.sysname) + + strlen(uts.release) + 10); +#ifdef AIXV3 + (void) sprintf(text1, "%s\n%s %s", + uts.nodename, uts.sysname, "3"); +#else + (void) sprintf(text1, "%s\n%s %s", + uts.nodename, uts.sysname, uts.release); +#endif + } +#else + text1 = (char *) strdup("OpenVMS"); /* It says release 0 in my utsname.h */ +#endif + } else { + text1 = (char *) strdup(message); + } + while (*text1 && (text1[strlen(text1) - 1] == '\r' || + text1[strlen(text1) - 1] == '\n')) + text1[strlen(text1) - 1] = 0; + text2 = (char *) strdup(text1); + + + if (messagefont == None) + messagefont = getFont(display); + + (void) memset(&overall, 0, sizeof (overall)); + token = text1; + lines = 0; + while ((line = strtok(token, "\r\n"))) { + XCharStruct o2; + int ascent, descent, direction; + + token = 0; + (void) XTextExtents(messagefont, 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 = ((messagefont->ascent + messagefont->descent) * lines) + + margin + margin; + + text_pixmap = XCreatePixmap(display, MI_WINDOW(mi), width, height, 1); + + gcv.font = messagefont->fid; + gcv.foreground = 0; + gcv.background = 0; + gc = XCreateGC(display, text_pixmap, + GCFont | GCForeground | GCBackground, &gcv); + XFillRectangle(display, text_pixmap, gc, 0, 0, width, height); + XSetForeground(display, gc, 1); + + token = text2; + lines = 0; + while ((line = strtok(token, "\r\n"))) { + XCharStruct o2; + int ascent, descent, direction, xoff; + + token = 0; + + (void) XTextExtents(messagefont, line, strlen(line), + &direction, &ascent, &descent, &o2); + xoff = ((overall.lbearing + overall.rbearing) - + (o2.lbearing + o2.rbearing)) / 2; + + (void) XDrawString(display, text_pixmap, gc, + overall.lbearing + margin + xoff, + ((messagefont->ascent * (lines + 1)) + + (messagefont->descent * lines) + margin), + line, strlen(line)); + lines++; + } + (void) free((void *) text1); + (void) free((void *) text2); + /*XUnloadFont(display, messagefont->fid); */ + XFreeGC(display, gc); + + *image = XGetImage(display, text_pixmap, 0, 0, width, height, + 1L, XYPixmap); + XFreePixmap(display, text_pixmap); +} + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + flagstruct *fp = &flags[MI_SCREEN(mi)]; + + if (!fp->logo) + getImage(mi, &fp->logo, FLAG_WIDTH, FLAG_HEIGHT, FLAG_BITS, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + DEFAULT_XPM, FLAG_NAME, +#endif + &fp->graphics_format, &fp->cmap, &fp->black); +#ifndef STANDALONE + if (fp->cmap != None) { + setColormap(display, window, fp->cmap, MI_IS_INWINDOW(mi)); + if (fp->backGC == None) { + XGCValues xgcv; + + xgcv.background = fp->black; + fp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* STANDALONE */ + { + fp->black = MI_BLACK_PIXEL(mi); + fp->backGC = MI_GC(mi); + } +} + +static void +free_stuff(Display * display, flagstruct * fp) +{ + if (fp->cmap != None) { + XFreeColormap(display, fp->cmap); + if (fp->backGC != None) { + XFreeGC(display, fp->backGC); + fp->backGC = None; + } + fp->cmap = None; + } else + fp->backGC = None; + destroyImage(&fp->logo, &fp->graphics_format); +} + +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)]; + + init_stuff(mi); + + fp->width = MI_WIDTH(mi); + fp->height = MI_HEIGHT(mi); + + if (fp->image) { + if (fp->graphics_format == IS_XBM) + XFree(fp->image); + else + (void) XDestroyImage(fp->image); + fp->image = NULL; + } + if (MI_IS_FULLRANDOM(mi) || + (MI_BITMAP(mi) && *(MI_BITMAP(mi)) && message && *message) || + ((!(MI_BITMAP(mi)) || !*(MI_BITMAP(mi))) && (!message || !*message))) + fp->choice = (int) (LRAND() & 1); + else if (MI_BITMAP(mi) && *(MI_BITMAP(mi))) + fp->choice = IMAGE_FLAG; + else + fp->choice = MESSAGE_FLAG; + if (fp->choice == MESSAGE_FLAG) { + getText(mi, &fp->image); + } else { + int depth = MI_DEPTH(mi); + + if (depth >= 24 && depth < 32) + depth = 32; + if (fp->graphics_format < IS_XPM) + depth = 1; + fp->image = XCreateImage(display, MI_VISUAL(mi), depth, + (fp->graphics_format < IS_XPM) ? XYBitmap : ZPixmap, + 0, fp->logo->data, + (fp->graphics_format == IS_RASTERFILE && (fp->logo->width & 1)) ? + fp->logo->width + 1 : fp->logo->width, fp->logo->height, 8, 0); + fp->image->byte_order = LSBFirst; + fp->image->bitmap_bit_order = LSBFirst; + } + 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->cache) { + XFreePixmap(display, fp->cache); + } + if (!(fp->cache = XCreatePixmap(display, MI_WINDOW(mi), + MAXW(fp), MAXH(fp), MI_DEPTH(mi)))) { + return; + } + XSetForeground(display, fp->backGC, fp->black); + XSetBackground(display, fp->backGC, fp->black); + XFillRectangle(display, fp->cache, fp->backGC, + 0, 0, MAXW(fp), MAXH(fp)); + /* don't want any exposure events from XCopyArea */ + XSetGraphicsExposures(display, fp->backGC, 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); + + MI_CLEARWINDOWCOLORMAP(mi, fp->backGC, fp->black); +} + +void +draw_flag(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + flagstruct *fp = &flags[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (fp->width <= MAXW(fp) || fp->height <= MAXH(fp)) { + fp->size = MININITSIZE; + /* fp->pointsize = MINPOINTSIZE; */ + XCopyArea(display, fp->cache, window, fp->backGC, + 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, fp->backGC, + 0, 0, MAXW(fp), MAXH(fp), fp->x_flag, fp->y_flag); + } + XSetForeground(MI_DISPLAY(mi), fp->backGC, fp->black); + XFillRectangle(display, fp->cache, fp->backGC, + 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++) { + flagstruct *fp = &flags[screen]; + Display *display = MI_DISPLAY(mi); + + if (fp->cache) + XFreePixmap(display, fp->cache); + if (fp->image) { + if (fp->choice == IMAGE_FLAG && (fp->graphics_format == IS_XBM || + fp->graphics_format == IS_XBMDONE)) + XFree((caddr_t) fp->image); /* Do not destroy data */ + else + (void) XDestroyImage(fp->image); + } + free_stuff(display, fp); + } + (void) free((void *) flags); + flags = NULL; + } + if (messagefont != None) { + XFreeFont(MI_DISPLAY(mi), messagefont); + messagefont = None; + } +} + +void +refresh_flag(ModeInfo * mi) +{ + flagstruct *fp = &flags[MI_SCREEN(mi)]; + + MI_CLEARWINDOWCOLORMAP(mi, fp->backGC, fp->black); +} + +#endif /* MODE_flag */ diff --git a/modes/flame.c b/modes/flame.c new file mode 100644 index 00000000..68426ac3 --- /dev/null +++ b/modes/flame.c @@ -0,0 +1,348 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* flame --- recursive fractal cosmic flames */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)flame.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 11-Aug-95: Got rid of polyominal since it was crashing xlock on some + * machines. + * 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 + */ + +#ifdef STANDALONE +#define PROGCLASS "Flame" +#define HACK_INIT init_flame +#define HACK_DRAW draw_flame +#define flame_opts xlockmore_opts +#define DEFAULTS "*delay: 750000 \n" \ + "*count: 20 \n" \ + "*cycles: 10000 \n" \ + "*ncolors: 200 \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_flame + +ModeSpecOpt flame_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct flame_description = +{"flame", "init_flame", "draw_flame", "release_flame", + "refresh_flame", "init_flame", NULL, &flame_opts, + 750000, 20, 10000, 1, 64, 1.0, "", + "Shows cosmic flame fractals", 0, NULL}; + +#endif + +#define MAXLEV 4 +#define MAXKINDS 9 +#define MAXBATCH 12 + +typedef struct { + double f[2][3][MAXLEV]; /* three non-homogeneous transforms */ + int variation; + int max_levels; + int cur_level; + int snum; + int anum; + int width, height; + int num_points; + int total_points; + int pixcol; + int cycles; + int alt; + XPoint pts[MAXBATCH]; + short lasthalf; +} flamestruct; + +static flamestruct *flames = NULL; + +static short +halfrandom(flamestruct * fp, int mv) +{ + unsigned long r; + + if (fp->lasthalf) { + r = fp->lasthalf; + fp->lasthalf = 0; + } else { + r = LRAND(); + fp->lasthalf = (short) (r >> 16); + } + return r % mv; +} + +static Bool +recurse(ModeInfo * mi, flamestruct * fp, + register double x, register double y, register int l) +{ + int i; + double nx, ny; + + if (l == fp->max_levels) { + fp->total_points++; + if (fp->total_points > fp->cycles) /* how long each fractal runs */ + return False; + + if (x > -1.0 && x < 1.0 && y > -1.0 && y < 1.0) { + fp->pts[fp->num_points].x = (int) ((fp->width / 2) * (x + 1.0)); + fp->pts[fp->num_points].y = (int) ((fp->height / 2) * (y + 1.0)); + fp->num_points++; + if (fp->num_points >= MAXBATCH) { /* point buffer size */ + XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), fp->pts, + fp->num_points, CoordModeOrigin); + fp->num_points = 0; + } + } + } else { + for (i = 0; i < fp->snum; i++) { + nx = fp->f[0][0][i] * x + fp->f[0][1][i] * y + fp->f[0][2][i]; + ny = fp->f[1][0][i] * x + fp->f[1][1][i] * y + fp->f[1][2][i]; + if (i < fp->anum) { + switch (fp->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, + 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(mi, fp, nx, ny, l + 1)) + return False; + } + } + return True; +} + +void +init_flame(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + flamestruct *fp; + + if (flames == NULL) { + if ((flames = (flamestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (flamestruct))) == NULL) + return; + } + fp = &flames[MI_SCREEN(mi)]; + + fp->width = MI_WIDTH(mi); + fp->height = MI_HEIGHT(mi); + + fp->max_levels = MI_COUNT(mi); + fp->cycles = MI_CYCLES(mi); + + MI_CLEARWINDOW(mi); + + if (MI_NPIXELS(mi) > 2) { + fp->pixcol = halfrandom(fp, MI_NPIXELS(mi)); + XSetForeground(display, gc, MI_PIXEL(mi, fp->pixcol)); + } else { + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + } + fp->variation = NRAND(MAXKINDS); +} + +void +draw_flame(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + flamestruct *fp = &flames[MI_SCREEN(mi)]; + int i, j, k; + + if (!(fp->cur_level++ % fp->max_levels)) { + MI_CLEARWINDOW(mi); + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, MI_GC(mi), MI_WHITE_PIXEL(mi)); + fp->alt = !fp->alt; + } else { + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, MI_GC(mi), MI_PIXEL(mi, fp->pixcol)); + if (--fp->pixcol < 0) + fp->pixcol = MI_NPIXELS(mi) - 1; + } + } + + MI_IS_DRAWN(mi) = True; + + /* number of functions */ + fp->snum = 2 + (fp->cur_level % (MAXLEV - 1)); + + /* how many of them are of alternate form */ + if (fp->alt) + fp->anum = 0; + else + fp->anum = halfrandom(fp, fp->snum) + 2; + + /* 6 coefs per function */ + for (k = 0; k < fp->snum; k++) { + for (i = 0; i < 2; i++) + for (j = 0; j < 3; j++) + fp->f[i][j][k] = ((double) (LRAND() & 1023) / 512.0 - 1.0); + } + fp->num_points = 0; + fp->total_points = 0; + (void) recurse(mi, fp, 0.0, 0.0, 0); + XDrawPoints(display, MI_WINDOW(mi), MI_GC(mi), + fp->pts, fp->num_points, CoordModeOrigin); +} + +void +release_flame(ModeInfo * mi) +{ + if (flames != NULL) { + (void) free((void *) flames); + flames = NULL; + } +} + +void +refresh_flame(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_flame */ diff --git a/modes/flow.c b/modes/flow.c new file mode 100644 index 00000000..1c33340e --- /dev/null +++ b/modes/flow.c @@ -0,0 +1,590 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* flow --- flow of strange bees */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)flow.c 4.13 99/02/04 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by Tim Auckland + * + * 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. + * + * "flow" shows a variety of continuous phase-space flows around strange + * attractors. It includes the well-known Lorentz mask (the "Butterfly" + * of chaos fame), two forms of Rossler's "Folded Band" and Poincare' + * sections of the "Birkhoff Bagel" and Duffing's forced occilator. + * + * Revision History: + * 28-Jan-98: This change catches 'lost' bees in flow.c and disables them. + * I chose to disable them rather than reinitialise them because + * reinitialising can produce fake attractors. + * This has allowed me to relax some of the parameters and initial + * conditions slightly to catch some of the more extreme cases. As a + * result you may see some bees fly away at the start - these are the ones + * that 'missed' the attractor. If the bee with the camera should fly + * away the mode will restart :-) + * 31-Nov-98: [TDA] Added Duffing (what a strange day that was :) DAB) + * Duffing's forced oscillator has been added to the formula list and + * the parameters section has been updated to display it in Poincare' + * section. + * 30-Nov-98: [TDA] Added travelling perspective option + * A more exciting point-of-view has been added to all autonomous flows. + * This views the flow as seen by a particle moving with the flow. In the + * metaphor of the original code, I've attached a camera to one of the + * trained bees! + * 30-Nov-98: [TDA] Much code cleanup. + * 09-Apr-97: [TDA] Ported to xlockmore-4 + * 18-Jul-96: Adapted from swarm.c Copyright (c) 1991 by Patrick J. Naughton. + * 31-Aug-90: Adapted from xswarm by Jeff Butterworth. (butterwo@ncsc.org) + */ + +#ifdef STANDALONE +#define PROGCLASS "Flow" +#define HACK_INIT init_flow +#define HACK_DRAW draw_flow +#define flow_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ +"*count: 1024 \n" \ +"*cycles: 3000 \n" \ +"*ncolors: 200 \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_flow + +ModeSpecOpt flow_opts = { 0, NULL, 0, NULL, NULL }; + +#ifdef USE_MODULES +ModStruct flow_description = { + "flow", "init_flow", "draw_flow", "release_flow", + "refresh_flow", "init_flow", NULL, &flow_opts, + 1000, 1024, 3000, 1, 64, 1.0, "", + "Shows dynamic strange attractors", 0, NULL +}; + +#endif + +typedef struct { + double x; + double y; + double z; +} dvector; + +typedef struct { + double a, b, c; +} Par; + +/* Macros */ +#define X(t,b) (sp->p[t][b].x) +#define Y(t,b) (sp->p[t][b].y) +#define Z(t,b) (sp->p[t][b].z) +#define balance_rand(v) ((LRAND()/MAXRAND*(v))-((v)/2)) /* random around 0 */ +#define SCALE_X(A) (sp->width/2+sp->width/sp->size*(A)) +#define SCALE_Y(A) (sp->height/2+sp->height/sp->size*(A)) +#define LOST_IN_SPACE (sp->size * 10) +#define LOST_IN_TIME 1E+40 + +typedef struct { + int width; + int height; + int count; + double size; + + int beecount; /* number of bees */ + XSegment *csegs; /* bee lines */ + int *cnsegs; + XSegment *old_segs; /* old bee lines */ + int nold_segs; + double step; + dvector centre; /* centre */ + struct { + double depth; + double height; + } view; + dvector *p[2]; /* bee positions x[time][bee#] */ + struct { + double theta; + double dtheta; + double phi; + double dphi; + } tumble; + dvector (*ODE) (Par par, double x, double y, double z); + Par par; +} flowstruct; + +static flowstruct *flows = NULL; + +static dvector +Lorentz(Par par, double x, double y, double z) +{ + dvector d; + + d.x = par.a * (y - x); + d.y = x * (par.b - z) - y; + d.z = x * y - par.c * z; + return d; +} + +static dvector +Rossler(Par par, double x, double y, double z) +{ + dvector d; + + d.x = -(y + par.a * z); + d.y = x + y * par.b; + d.z = par.c + z * (x - 5.7); + return d; +} + +static dvector +RosslerCone(Par par, double x, double y, double z) +{ + dvector d; + + d.x = -(y + par.a * z); + d.y = x + y * par.b - z * z * par.c; + d.z = 0.2 + z * (x - 5.7); + return d; +} + +static dvector +Birkhoff(Par par, double x, double y, double z) +{ + dvector d; + + d.x = -y + par.b * sin(z); + d.y = 0.7 * x + par.a * y * (0.1 - x * x); + d.z = par.c; + return d; +} + +static dvector +Duffing(Par par, double x, double y, double z) +{ + dvector d; + + d.x = -par.a * x - y/2 - y * y * y/8 + par.b * cos(z); + d.y = 2*x; + d.z = par.c; + return d; +} + +void +init_flow(ModeInfo * mi) +{ + flowstruct *sp; + int b; + double beemult = 1; + dvector range; + static int allocated = 0; + + if (flows == NULL) { + if ((flows = (flowstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (flowstruct))) == NULL) + return; + } + sp = &flows[MI_SCREEN(mi)]; + + sp->count = 0; + + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + + sp->tumble.theta = balance_rand(M_PI); + sp->tumble.phi = balance_rand(M_PI); + sp->tumble.dtheta = 0.002; + sp->tumble.dphi = 0.001; + sp->view.height = 0; + sp->view.depth = 0; /* no perspective view */ + + switch (NRAND(8)) { + case 0: + sp->view.depth = 10; + sp->view.height = 0.2; + beemult = 3; + case 1: + sp->ODE = Lorentz; + sp->step = 0.02; + sp->size = 60; + sp->centre.x = 0; + sp->centre.y = 0; + sp->centre.z = 24; + range.x = 5; + range.y = 5; + range.z = 1; + sp->par.a = 10 + balance_rand(5); + sp->par.b = 28 + balance_rand(5); + sp->par.c = 2 + balance_rand(1); + break; + case 2: + sp->view.depth = 10; + sp->view.height = 0.1; + beemult = 4; + case 3: + sp->ODE = Rossler; + sp->step = 0.05; + sp->size = 24; + sp->centre.x = 0; + sp->centre.y = 0; + sp->centre.z = 3; + range.x = 6; + range.y = 6; + range.z = 5; + sp->par.a = 2 + balance_rand(1); + sp->par.b = 0.2 + balance_rand(0.1); + sp->par.c = 0.2 + balance_rand(0.1); + break; + case 4: + sp->view.depth = 10; + sp->view.height = 0.1; + beemult = 3; + case 5: + sp->ODE = RosslerCone; + sp->step = 0.05; + sp->size = 24; + sp->centre.x = 0; + sp->centre.y = 0; + sp->centre.z = 3; + range.x = 6; + range.y = 6; + range.z = 6; + sp->par.a = 2; + sp->par.b = 0.2; + sp->par.c = 0.331 + balance_rand(0.01); + break; + case 6: + sp->ODE = Birkhoff; + sp->step = 0.04; + sp->size = 2.6; + sp->centre.x = 0; + sp->centre.y = 0; + sp->centre.z = 0; + range.x = 3; + range.y = 4; + range.z = 0; + sp->par.a = 10 + balance_rand(5); + sp->par.b = 0.35 + balance_rand(0.25); + sp->par.c = 1.57; + sp->tumble.theta = 0; + sp->tumble.phi = 0; + sp->tumble.dtheta = 0; + sp->tumble.dphi = 0; + break; + case 7: + default: + sp->ODE = Duffing; + sp->step = 0.02; + sp->size = 30; + sp->centre.x = 0; + sp->centre.y = 0; + sp->centre.z = 0; + range.x = 20; + range.y = 20; + range.z = 0; + sp->par.a = 0.2 + balance_rand(0.1); + sp->par.b = 27.0 + balance_rand(3.0); + sp->par.c = 1.33; + sp->tumble.theta = 0; + sp->tumble.phi = 0; + sp->tumble.dtheta = -NRAND(2)*sp->par.c*sp->step; + sp->tumble.dphi = 0; + beemult = 0.5; + break; + } + + sp->beecount = beemult * MI_COUNT(mi); + if (sp->beecount < 0) /* random variations */ + sp->beecount = NRAND(-sp->beecount) + 1; /* Minimum 1 */ + + /* Clear the background. */ + MI_CLEARWINDOW(mi); + + if(!allocated || sp->beecount != allocated){ /* reallocate */ + if (sp->csegs != NULL) { + (void) free((void *) sp->csegs); + sp->csegs = NULL; + } + if (sp->cnsegs != NULL) { + (void) free((void *) sp->cnsegs); + sp->cnsegs = NULL; + } + if (sp->old_segs != NULL) { + (void) free((void *) sp->old_segs); + sp->old_segs = NULL; + } + if (sp->p[0] != NULL) { + (void) free((void *) sp->p[0]); + sp->p[0] = NULL; + } + if (sp->p[1] != NULL) { + (void) free((void *) sp->p[1]); + sp->p[1] = NULL; + } + } + + /* Allocate memory. */ + + if (!sp->csegs) { + sp->csegs = (XSegment *) malloc(sizeof (XSegment) * sp->beecount + * MI_NPIXELS(mi)); + sp->cnsegs = (int *) malloc(sizeof (int) * MI_NPIXELS(mi)); + + sp->old_segs = (XSegment *) malloc(sizeof (XSegment) * sp->beecount); + sp->p[0] = (dvector *) malloc(sizeof (dvector) * sp->beecount); + sp->p[1] = (dvector *) malloc(sizeof (dvector) * sp->beecount); + } + + /* Initialize point positions, velocities, etc. */ + + for (b = 0; b < sp->beecount; b++) { + X(1, b) = X(0, b) = balance_rand(range.x); + Y(1, b) = Y(0, b) = balance_rand(range.y); + Z(1, b) = Z(0, b) = balance_rand(range.z); + } +} + +void +draw_flow(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + flowstruct *sp = &flows[MI_SCREEN(mi)]; + int b, c, i; + int col, ix; + double M[3][3]; /* transformation matrix */ + + if(!sp->view.depth){ /* simple 3D tumble */ + double sint, cost, sinp, cosp; + sp->tumble.theta += sp->tumble.dtheta; + sp->tumble.phi += sp->tumble.dphi; + sint = sin(sp->tumble.theta); + cost = cos(sp->tumble.theta); + sinp = sin(sp->tumble.phi); + cosp = cos(sp->tumble.phi); + M[0][0]= cost; M[0][1]=-sint*cosp; M[0][2]= sint*sinp; + M[1][0]= sint; M[1][1]= cost*cosp; M[1][2]=-cost*sinp; + M[2][0]= 0; M[2][1]= 0; M[2][2]= 1; + } else { /* initialize matrix */ + M[0][0]= 0; M[0][1]= 0; M[0][2]= 0; + M[1][0]= 0; M[1][1]= 0; M[1][2]= 0; + M[2][0]= 0; M[2][1]= 0; M[2][2]= 0; + + } + + for (col = 0; col < MI_NPIXELS(mi); col++) + sp->cnsegs[col] = 0; + + MI_IS_DRAWN(mi) = True; + + /* <=- Bees -=> */ + for (b = 0; b < sp->beecount; b++) { + if(fabs(X(0, b)) > LOST_IN_SPACE || + fabs(Y(0, b)) > LOST_IN_SPACE || + /* if z is always invisible it's probably time */ + fabs(Z(0, b)) > ((sp->tumble.dphi!=0 || + sp->tumble.phi!=0)?LOST_IN_SPACE:LOST_IN_TIME)){ + if(sp->view.depth && b==0){ /* lost camera - reset */ + init_flow(mi); + return; + } + continue; + } + /* Age the arrays. */ + X(1, b) = X(0, b); + Y(1, b) = Y(0, b); + Z(1, b) = Z(0, b); + + /* 2nd order Kunge Kutta */ + { + dvector k1, k2; + + k1 = sp->ODE(sp->par, X(1, b), Y(1, b), Z(1, b)); + k1.x *= sp->step; + k1.y *= sp->step; + k1.z *= sp->step; + k2 = sp->ODE(sp->par, X(1, b) + k1.x, Y(1, b) + k1.y, Z(1, b) + k1.z); + k2.x *= sp->step; + k2.y *= sp->step; + k2.z *= sp->step; + X(0, b) = X(1, b) + (k1.x + k2.x) / 2.0; + Y(0, b) = Y(1, b) + (k1.y + k2.y) / 2.0; + Z(0, b) = Z(1, b) + (k1.z + k2.z) / 2.0; + } + + /* Colour according to bee */ + col = b % (MI_NPIXELS(mi) - 1); + ix = col * sp->beecount + sp->cnsegs[col]; + + /* Fill the segment lists. */ + + if(sp->view.depth) /* perspective view has special points */ + if(b==0){ /* point of view */ + sp->centre.x=X(0, b); + sp->centre.y=Y(0, b); + sp->centre.z=Z(0, b); + }else if(b==1){ /* neighbour: used to compute local axes */ + double x[3], p[3], x2=0, xp=0; + int j; + + /* forward */ + x[0] = X(0, 0) - X(1, 0); + x[1] = Y(0, 0) - Y(1, 0); + x[2] = Z(0, 0) - Z(1, 0); + + /* neighbour */ + p[0] = X(0, 1) - X(1, 0); + p[1] = Y(0, 1) - Y(1, 0); + p[2] = Z(0, 1) - Z(1, 0); + + for(i=0; i<3; i++){ + x2+= x[i]*x[i]; /* X . X */ + xp+= x[i]*p[i]; /* X . P */ + M[0][i] = x[i]; /* X */ + } + + for(i=0; i<3; i++) /* (X x P) x X */ + M[1][i] = x2*p[i] - xp*x[i]; /* == (X . X) P - (X . P) X */ + + M[2][0] = x[1]*p[2] - x[2]*p[1]; /* X x P */ + M[2][1] = -x[0]*p[2] + x[2]*p[0]; + M[2][2] = x[0]*p[1] - x[1]*p[0]; + + /* normalise axes */ + for(j=0; j<3; j++){ + double A=0; + for(i=0; i<3; i++) A+=M[j][i]*M[j][i]; /* sum squares */ + A=sqrt(A); + for(i=0; i<3; i++) M[j][i]/=A; + } + + X(0, 1)=X(0, 0)+M[1][0]; /* adjust neighbour */ + Y(0, 1)=Y(0, 0)+M[1][1]; + Z(0, 1)=Z(0, 0)+M[1][2]; + +#if 0 /* display local axes for testing */ + X(1, b)=X(0, 0); + Y(1, b)=Y(0, 0); + Z(1, b)=Z(0, 0); + }else if(b==2){ + X(0, b)=X(0, 0)+0.5*M[0][0]; + Y(0, b)=Y(0, 0)+0.5*M[0][1]; + Z(0, b)=Z(0, 0)+0.5*M[0][2]; + X(1, b)=X(0, 0); + Y(1, b)=Y(0, 0); + Z(1, b)=Z(0, 0); + }else if(b==3){ + X(0, b)=X(0, 0)+1.5*M[2][0]; + Y(0, b)=Y(0, 0)+1.5*M[2][1]; + Z(0, b)=Z(0, 0)+1.5*M[2][2]; + X(1, b)=X(0, 0); + Y(1, b)=Y(0, 0); + Z(1, b)=Z(0, 0); +#endif + } + + for(i=0; i<2; i++){ + double x=X(i,b)-sp->centre.x; + double y=Y(i,b)-sp->centre.y; + double z=Z(i,b)-sp->centre.z; + double X=M[0][0]*x + M[0][1]*y + M[0][2]*z; + double Y=M[1][0]*x + M[1][1]*y + M[1][2]*z; + double Z=M[2][0]*x + M[2][1]*y + M[2][2]*z+sp->view.height; + double absx, absy; + if(sp->view.depth){ + if(X <= 0) break; + absx=SCALE_X(sp->view.depth*Y/X); + absy=SCALE_Y(sp->view.depth*Z/X); + if(absx < -sp->width || absx > 2*sp->width || + absy < -sp->height || absy > 2*sp->height) + break; + }else{ + absx=SCALE_X(X); + absy=SCALE_Y(Y); + } + if(i){ + sp->csegs[ix].x1 = (short) absx; + sp->csegs[ix].y1 = (short) absy; + }else{ + sp->csegs[ix].x2 = (short) absx; + sp->csegs[ix].y2 = (short) absy; + } + } + if(i == 2) /* both assigned */ + sp->cnsegs[col]++; + } + if (sp->count) { /* erase */ + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawSegments(display, window, gc, sp->old_segs, sp->nold_segs); + } + + if (MI_NPIXELS(mi) > 2){ /* render colour */ + for (col = 0; col < MI_NPIXELS(mi); col++) + if (sp->cnsegs[col] > 0) { + XSetForeground(display, gc, MI_PIXEL(mi, col)); + XDrawSegments(display, window, gc, + sp->csegs + col * sp->beecount, sp->cnsegs[col]); + } + } else { /* render mono */ + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XDrawSegments(display, window, gc, + sp->csegs + col * sp->beecount, sp->cnsegs[col]); + } + + /* Copy to erase-list */ + for (col = 0, c = 0; col < MI_NPIXELS(mi); col++) + for (b = 0; b < sp->cnsegs[col]; b++) + sp->old_segs[c++] = (sp->csegs + col * sp->beecount)[b]; + sp->nold_segs = c; + + if (++sp->count > MI_CYCLES(mi)) /* pick a new flow */ + init_flow(mi); +} + +void +release_flow(ModeInfo * mi) +{ + if (flows != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + flowstruct *sp = &flows[screen]; + + if (sp->csegs != NULL) + (void) free((void *) sp->csegs); + if (sp->cnsegs != NULL) + (void) free((void *) sp->cnsegs); + if (sp->old_segs != NULL) + (void) free((void *) sp->old_segs); + if (sp->p[0] != NULL) + (void) free((void *) sp->p[0]); + if (sp->p[1] != NULL) + (void) free((void *) sp->p[1]); + } + (void) free((void *) flows); + flows = NULL; + } +} + +void +refresh_flow(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_flow */ diff --git a/modes/forest.c b/modes/forest.c new file mode 100644 index 00000000..08f81f1a --- /dev/null +++ b/modes/forest.c @@ -0,0 +1,221 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* forest --- binary trees in a fractal forest */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)forest.c 4.07 97/11/24 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 "*delay: 400000 \n" \ + "*count: 100 \n" \ + "*cycles: 200 \n" \ + "*ncolors: 100 \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_forest + +ModeSpecOpt forest_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct forest_description = +{"forest", "init_forest", "draw_forest", "release_forest", + "refresh_forest", "init_forest", NULL, &forest_opts, + 400000, 100, 200, 1, 64, 1.0, "", + "Shows binary trees of a fractal forest", 0, NULL}; + +#endif + +#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_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_WIDTH(mi); + fp->height = MI_HEIGHT(mi); + fp->time = 0; + + fp->ntrees = MI_COUNT(mi); + if (fp->ntrees < -MINTREES) + fp->ntrees = NRAND(-fp->ntrees - MINTREES + 1) + MINTREES; + else if (fp->ntrees < MINTREES) + fp->ntrees = MINTREES; + + MI_CLEARWINDOW(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; + + MI_IS_DRAWN(mi) = True; + + 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_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) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_forest */ diff --git a/modes/galaxy.c b/modes/galaxy.c new file mode 100644 index 00000000..69310b9c --- /dev/null +++ b/modes/galaxy.c @@ -0,0 +1,491 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* galaxy --- spinning galaxies */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)galaxy.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Originally done by Uli Siegmund on Amiga + * for EGS in Cluster + * Port from Cluster/EGS to C/Intuition by Harald Backert + * Port to X11 and incorporation into xlockmore by Hubert Feyrer + * + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 18-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 "*delay: 100 \n" \ + "*count: -5 \n" \ + "*cycles: 250 \n" \ + "*size: -3 \n" \ + "*ncolors: 64 \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_galaxy + +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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct galaxy_description = +{"galaxy", "init_galaxy", "draw_galaxy", "release_galaxy", + "refresh_galaxy", "init_galaxy", NULL, &galaxy_opts, + 100, -5, 250, -3, 64, 1.0, "", + "Shows crashing spiral galaxies", 0, NULL}; + +#endif + +#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.00000001 +#define sqrt_EPSILON 0.0001 + +#define DELTAT (MAX_IDELTAT * 0.0001) +#define GALAXYRANGESIZE 0.1 +#define GALAXYMINSIZE 0.1 +#define QCONS 0.001 + +/*- + * The following is enabled, it does not look that good for some. + * (But it looks great for me.) Maybe velocities should be measured + * relative to their galaxy-centers instead of absolute. + */ +#if 0 +#undef NO_VELOCITY_COLORING */ /* different colors for different speeds */ +#endif + +#define COLORBASE (MI_NPIXELS(mi) / COLORS) /* Colors for stars start here */ +#define GREEN (22 * MI_NPIXELS(mi) / 64) /* Do green stars exist? */ +#define NOTGREEN (7 * MI_NPIXELS(mi) / 64) +#define COLORS 8 + +#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) + +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 */ + 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 = (int) 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_COUNT(mi) < -MINGALAXIES) + free_galaxies(gp); + gp->ngalaxies = MI_COUNT(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; + + if (MI_NPIXELS(mi) >= COLORS) + do { + gt->galcol = NRAND(COLORBASE) * COLORS; + } while (gt->galcol + COLORBASE / 2 < GREEN + NOTGREEN && + gt->galcol + COLORBASE / 2 > GREEN - NOTGREEN); + else + gt->galcol = 0; + /* 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] * DELTAT * + gp->f_hititerations + FLOATRAND - 0.5; + gt->pos[1] = -gt->vel[1] * DELTAT * + gp->f_hititerations + FLOATRAND - 0.5; + gt->pos[2] = -gt->vel[2] * 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->vel[0] *= DELTAT; + st->vel[1] *= DELTAT; + st->vel[2] *= DELTAT; + + 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; + } + } + + MI_CLEARWINDOW(mi); + +#if 0 + (void) printf("ngalaxies=%d, f_hititerations=%d\n", + gp->ngalaxies, gp->f_hititerations); + (void) printf("f_deltat=%g\n", DELTAT); + (void) printf("Screen: "); + (void) printf("%dx%d pixel (%d-%d, %d-%d)\n", + (gp->clip.right - gp->clip.left), (gp->clip.bottom - gp->clip.top), + 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->clip.left = 0; + gp->clip.top = 0; + gp->clip.right = MI_WIDTH(mi); + gp->clip.bottom = MI_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 */ + + MI_IS_DRAWN(mi) = True; + + 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]; + double v0 = st->vel[0]; + double v1 = st->vel[1]; + double v2 = st->vel[2]; + + for (k = 0; k < gp->ngalaxies; ++k) { + Galaxy *gtk = &gp->galaxies[k]; + double d0 = gtk->pos[0] - st->pos[0]; + double d1 = gtk->pos[1] - st->pos[1]; + double d2 = gtk->pos[2] - st->pos[2]; + + d = d0 * d0 + d1 * d1 + d2 * d2; + if (d > EPSILON) + d = gt->mass / (d * sqrt(d)) * DELTAT * DELTAT * QCONS; + else + d = gt->mass / (EPSILON * sqrt_EPSILON) * DELTAT * DELTAT * QCONS; + v0 += d0 * d; + v1 += d1 * d; + v2 += d2 * d; + } + + st->vel[0] = v0; + st->vel[1] = v1; + st->vel[2] = v2; + +#ifndef NO_VELOCITY_COLORING + d = (v0 * v0 + v1 * v1 + v2 * v2) / (3.0 * DELTAT * DELTAT); + if (d > (double) COLORBASE) + st->color = gt->galcol + COLORBASE - 1; + else + st->color = gt->galcol + ((int) d) % COLORBASE; +#endif + st->pos[0] += v0; + st->pos[1] += v1; + st->pos[2] += v2; + + if (st->px >= gp->clip.left && + st->px <= gp->clip.right - st->size && + st->py >= gp->clip.top && + st->py <= gp->clip.bottom - st->size) { + XSetForeground(display, gc, MI_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) >= COLORS) +#ifdef NO_VELOCITY_COLORING + XSetForeground(display, gc, MI_PIXEL(mi, gt->galcol)); +#else + XSetForeground(display, gc, MI_PIXEL(mi, st->color)); +#endif + else + XSetForeground(display, gc, MI_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]; + double d0 = gtk->pos[0] - gt->pos[0]; + double d1 = gtk->pos[1] - gt->pos[1]; + double d2 = gtk->pos[2] - gt->pos[2]; + + d = d0 * d0 + d1 * d1 + d2 * d2; + if (d > EPSILON) + d = gt->mass * gt->mass / (d * sqrt(d)) * DELTAT * QCONS; + else + d = gt->mass * gt->mass / (EPSILON * sqrt_EPSILON) * DELTAT * QCONS; + d0 *= d; + d1 *= d; + d2 *= d; + gt->vel[0] += d0 / gt->mass; + gt->vel[1] += d1 / gt->mass; + gt->vel[2] += d2 / gt->mass; + gtk->vel[0] -= d0 / gtk->mass; + gtk->vel[1] -= d1 / gtk->mass; + gtk->vel[2] -= d2 / gtk->mass; + } + gt->pos[0] += gt->vel[0] * DELTAT; + gt->pos[1] += gt->vel[1] * DELTAT; + gt->pos[2] += gt->vel[2] * 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) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_galaxy */ diff --git a/modes/glx/Imakefile b/modes/glx/Imakefile new file mode 100644 index 00000000..cb3d4c4b --- /dev/null +++ b/modes/glx/Imakefile @@ -0,0 +1,59 @@ +#ifndef XCOMM +#define XCOMM /**/# +#endif +XCOMM @(#)Sub Imakefile xlockmore +XCOMM + +#include "../../iconfig.h" + +UTILDIR = $(top_srcdir)/xlock/ +MODEDIR = $(top_srcdir)/modes/ +GLDIR = $(top_srcdir)/modes/glx/ +UTILOBJDIR = ../../xlock/ +MODEOBJDIR = ../ +GLOBJDIR = ./ + +DM = +DU = $(UTILDIR) +DOU = $(UTILOBJDIR) +DG = $(GLDIR) +DOG = $(GLOBJDIR) +OM = $(O)$(S)$(DM) +OU = $(O)$(S)$(DOU) +OG = $(O)$(S)$(DOG) +CM = $(C) $(DM) +CU = $(C) $(DU) +CG = $(C) $(DG) + +XCOMM List of object files +#ifdef GLLibrary +#ifdef XpmLibrary +#ifdef Unstable +XLOCKUNSTABLEGLOBJS = $(DOG)lament$(O) +#endif +#endif +XLOCKGLOBJS = $(DOG)cage$(OG)gears$(O)$(S)\ +$(DOG)moebius$(OG)morph3d$(O)$(S)\ +$(DOG)rubik$(OG)stairs$(OG)superquadrics$(O)$(S)\ +$(DOG)buildlwo$(OG)pipes$(OG)pipeobjs$(O)$(S)\ +$(DOG)sproingies$(OG)sproingiewrap$(OG)s1_b$(O)$(S)\ +$(DOG)s1_1$(OG)s1_2$(OG)s1_3$(OG)s1_4$(OG)s1_5$(OG)s1_6$(O)$(S)\ +$(DOG)atlantis$(OG)dolphin$(OG)shark$(OG)swim$(OG)whale$(O)$(S)\ +$(DOG)bubble3d$(OG)b_draw$(OG)b_sphere$(OG)b_lockglue$(O)$(S)\ +$(XLOCKUNSTABLEGLOBJS) +#endif + +XCOMM default target +all:: $(XLOCKGLOBJS) + +DependTarget() + +XLOCKINC = -I. -I../.. -I../../xlock + +DependTarget() +LintTarget() + +distclean:: clean + $(RM) Makefile config.status config.cache config.log config.h + +clean.all:: distclean diff --git a/modes/glx/Makefile.in b/modes/glx/Makefile.in new file mode 100644 index 00000000..33fe9915 --- /dev/null +++ b/modes/glx/Makefile.in @@ -0,0 +1,417 @@ +# $Id : Makefile.in 4.04 1997/07/10 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +# @SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ +PIXMAPDIR = @PIXMAPDIR@/ +UTILDIR = $(top_srcdir)/xlock/ +MODEDIR = $(top_srcdir)/modes/ +GLDIR = $(top_srcdir)/modes/glx/ +UTILOBJDIR = ../../xlock/ +MODEOBJDIR = ../ +GLOBJDIR = ./ + +N = +O = .o +#O = .obj +C = .c +CX = .cc +S = $(N) $(N) +#S = , + +DU = $(UTILDIR) +DOU = $(UTILOBJDIR) +DG = $(GLDIR) +DOG = $(GLOBJDIR) +OU = $(O)$(S)$(DOU) +OG = $(O)$(S)$(DOG) +CU = $(C) $(DU) +CG = $(C) $(DG) +CXG = $(CX) $(DG) + +# please define +# C as the C source code extension +# CX as the C++ source code extension +# O as the object extension +# S as the separator for object code + +@GL@XLOCKGLOBJS = $(DOG)cage$(OG)gears$(O)$(S)\ +@GL@$(DOG)moebius$(OG)morph3d$(O)$(S)\ +@GL@$(DOG)rubik$(OG)stairs$(OG)superquadrics$(O)$(S)\ +@GL@$(DOG)buildlwo$(OG)pipes$(OG)pipeobjs$(O)$(S)\ +@GL@$(DOG)sproingies$(OG)sproingiewrap$(OG)s1_b$(O)$(S)\ +@GL@$(DOG)s1_1$(OG)s1_2$(OG)s1_3$(OG)s1_4$(OG)s1_5$(OG)s1_6$(O)$(S)\ +@GL@$(DOG)atlantis$(OG)dolphin$(OG)shark$(OG)swim$(OG)whale$(O)$(S)\ +@GL@$(DOG)bubble3d$(OG)b_draw$(OG)b_sphere$(OG)b_lockglue$(O) +@XPM@@GL@XLOCKXPMGLOBJS = $(DOG)lament$(O) +@CCC@@GL@XLOCKCPPGLOBJS = $(DOG)invert$(OG)i_figureeight$(OG)i_linkage$(O)$(S)\ +@CCC@@GL@$(DOG)i_sphere$(OG)i_spline$(O)$(S)\ +@CCC@@GL@$(DOG)i_threejet$(OG)i_threejetvec$(O)$(S)\ +@CCC@@GL@$(DOG)i_twojet$(OG)i_twojetvec$(O) +@UNSTABLE@@GL@XLOCKUNSTABLEGLOBJS = +@UNSTABLE@@CCC@@GL@@GLTT@XLOCKUNSTABLETEXTGLOBJS = $(DOG)text3d$(O) +@GL@XLOCKGLSRCS = $(DG)cage$(CG)gears$(C) \ +@GL@$(DG)text3d$(CXG)lament$(CG)moebius$(CG)morph3d$(C) \ +@GL@$(DG)rubik$(CG)stairs$(CG)superquadrics$(C) \ +@GL@$(DG)buildlwo$(CG)pipes$(CG)pipeobjs$(C) \ +@GL@$(DG)sproingies$(CG)sproingiewrap$(CG)s1_b$(C) \ +@GL@$(DG)s1_1$(CG)s1_2$(CG)s1_3$(CG)s1_4$(CG)s1_5$(CG)s1_6$(C) \ +@GL@$(DG)atlantis$(CG)dolphin$(CG)shark$(CG)swim$(CG)whale$(C) \ +@GL@$(DG)bubble3d$(CG)b_draw$(CG)b_sphere$(CG)b_lockglue$(CG)text3d$(CX) \ +@GL@$(DG)invert$(CG)i_figureeight$(CXG)i_linkage$(CX) \ +@GL@$(DG)i_sphere$(CXG)i_spline$(CX) \ +@GL@$(DG)i_threejet$(CXG)i_threejetvec$(CX) \ +@GL@$(DG)i_twojet$(CXG)i_twojetvec$(CX) +# default target +all : $(XLOCKGLOBJS) $(XLOCKXPMGLOBJS) $(XLOCKCPPGLOBJS) $(XLOCKUNSTABLEGLOBJS) $(XLOCKUNSTABLETEXTGLOBJS) + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@/man1 +xapploaddir = @APPDEFAULTS@ + +#CC = cc -g +#CC = cc -Ac -g +#CC = cc -Xc -g +#CC = acc -g +#CC = CC -g +#CC = gcc -g -Wall -ansi -pedantic +#CC = gcc -g -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes +#CC = g++ -g -Wall +CC = @CC@ +CXX = @CXX@ + +LINT = lint +#LINT = alint + +#DEPEND = makedepend +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +LN_S = @LN_S@ +RM = rm -f +RM_S = $(RM) +ECHO = echo + +#BLN_S = set file/enter=[] +#RM = delete/noconfirm/nolog +#RM_S = set file/remove/nolog +#ECHO = write sys$output + +DEFINES = -DDEF_FILESEARCHPATH=\"$(xapploaddir)/%N%C%S:$(xapploaddir)/%N%S\" +DEFS = @DEFS@ $(DEFINES) +XLOCKINC = -I. -I.. -I../.. -I$(UTILDIR) -I../../.. @XLOCKINC@ +CFLAGS = @CFLAGS@ +CXXFLAGS = @CXXFLAGS@ +#CXXFLAGS = $(CPPFLAGS) $(DEFS) $(XLOCKINC) $(CFLAGS) # Why ???? The rule doesn't +#CFLAGS = -O +#CFLAGS = -g + +#If you have purify, and want to use it, uncomment this definition or +# run the make as `make PURIFY=purify' +# or run configure with the --with-purify argument. +PURIFY = @PURIFY@ + +.SUFFIXES : $(C) $(CX) $(O) + +$(C)$(O) : + $(CC) -c -o $@ $(CPPFLAGS) $(DEFS) $(XLOCKINC) $(CFLAGS) $< + +$(CX)$(O) : + $(CXX) -c -o $@ $(CPPFLAGS) $(DEFS) $(XLOCKINC) $(CXXFLAGS) $< + +install : + +install-program : + +install-man : + +install-ad : + +uninstall : + +uninstall-program : + +uninstall-man : + +uninstall-ad : + +lint : + +xrdb : + +man : + +html : + +hlp : + +clean : + $(RM) *.o *.xlk core *~ *% *.bak *.orig *.rej make.log MakeOut + +distclean : clean + $(RM) Makefile + +clean.all : distclean + +# Adds all current dependencies to Makefile +depend : + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(XLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XLOCKGLSRCS) + +# 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) -- \ + $(XLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XLOCKGLSRCS) | \ + ( \ + awk '/^#.*Id : Makefile.in/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@^\.\./\.\./modes/glx@$$(GLOBJDIR)@' \ + -e 's@\.\./\.\./pixmaps@$$(PIXMAPDIR)@g' \ + -e 's@\.\./\.\./xlock@$$(UTILDIR)@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +$(GLOBJDIR)/cage.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/cage.o: ../../config.h +$(GLOBJDIR)/cage.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/cage.o: $(UTILDIR)/random.h +$(GLOBJDIR)/cage.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/cage.o: e_textures.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/gears.o: ../../config.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/random.h +$(GLOBJDIR)/gears.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/text3d.o: ../../config.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/text3d.o: text3d.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/lament.o: ../../config.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/random.h +$(GLOBJDIR)/lament.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/moebius.o: ../../config.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/random.h +$(GLOBJDIR)/moebius.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/moebius.o: e_textures.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/morph3d.o: ../../config.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/morph3d.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/rubik.o: ../../config.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/random.h +$(GLOBJDIR)/rubik.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/stairs.o: ../../config.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/random.h +$(GLOBJDIR)/stairs.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/stairs.o: e_textures.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/superquadrics.o: ../../config.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/random.h +$(GLOBJDIR)/superquadrics.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/buildlwo.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/buildlwo.o: ../../config.h +$(GLOBJDIR)/buildlwo.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/buildlwo.o: $(UTILDIR)/random.h +$(GLOBJDIR)/buildlwo.o: buildlwo.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/pipes.o: ../../config.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/random.h +$(GLOBJDIR)/pipes.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/pipes.o: buildlwo.h +$(GLOBJDIR)/pipeobjs.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/pipeobjs.o: ../../config.h +$(GLOBJDIR)/pipeobjs.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/pipeobjs.o: $(UTILDIR)/random.h +$(GLOBJDIR)/pipeobjs.o: buildlwo.h +$(GLOBJDIR)/sproingies.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/sproingies.o: ../../config.h +$(GLOBJDIR)/sproingies.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/sproingies.o: $(UTILDIR)/random.h +$(GLOBJDIR)/sproingies.o: buildlwo.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/sproingiewrap.o: ../../config.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/random.h +$(GLOBJDIR)/sproingiewrap.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/s1_b.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_b.o: ../../config.h +$(GLOBJDIR)/s1_b.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_b.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_b.o: buildlwo.h +$(GLOBJDIR)/s1_1.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_1.o: ../../config.h +$(GLOBJDIR)/s1_1.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_1.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_1.o: buildlwo.h +$(GLOBJDIR)/s1_2.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_2.o: ../../config.h +$(GLOBJDIR)/s1_2.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_2.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_2.o: buildlwo.h +$(GLOBJDIR)/s1_3.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_3.o: ../../config.h +$(GLOBJDIR)/s1_3.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_3.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_3.o: buildlwo.h +$(GLOBJDIR)/s1_4.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_4.o: ../../config.h +$(GLOBJDIR)/s1_4.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_4.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_4.o: buildlwo.h +$(GLOBJDIR)/s1_5.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_5.o: ../../config.h +$(GLOBJDIR)/s1_5.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_5.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_5.o: buildlwo.h +$(GLOBJDIR)/s1_6.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/s1_6.o: ../../config.h +$(GLOBJDIR)/s1_6.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/s1_6.o: $(UTILDIR)/random.h +$(GLOBJDIR)/s1_6.o: buildlwo.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/atlantis.o: ../../config.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/random.h +$(GLOBJDIR)/atlantis.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/atlantis.o: atlantis.h +$(GLOBJDIR)/dolphin.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/dolphin.o: ../../config.h +$(GLOBJDIR)/dolphin.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/dolphin.o: $(UTILDIR)/random.h +$(GLOBJDIR)/dolphin.o: atlantis.h +$(GLOBJDIR)/shark.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/shark.o: ../../config.h +$(GLOBJDIR)/shark.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/shark.o: $(UTILDIR)/random.h +$(GLOBJDIR)/shark.o: atlantis.h +$(GLOBJDIR)/swim.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/swim.o: ../../config.h +$(GLOBJDIR)/swim.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/swim.o: $(UTILDIR)/random.h +$(GLOBJDIR)/swim.o: atlantis.h +$(GLOBJDIR)/whale.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/whale.o: ../../config.h +$(GLOBJDIR)/whale.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/whale.o: $(UTILDIR)/random.h +$(GLOBJDIR)/whale.o: atlantis.h +$(GLOBJDIR)/bubble3d.o: bubble3d.h +$(GLOBJDIR)/bubble3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/bubble3d.o: ../../config.h +$(GLOBJDIR)/bubble3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/bubble3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_draw.o: bubble3d.h +$(GLOBJDIR)/b_draw.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/b_draw.o: ../../config.h +$(GLOBJDIR)/b_draw.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/b_draw.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_sphere.o: bubble3d.h +$(GLOBJDIR)/b_sphere.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/b_sphere.o: ../../config.h +$(GLOBJDIR)/b_sphere.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/b_sphere.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_lockglue.o: bubble3d.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/b_lockglue.o: ../../config.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/random.h +$(GLOBJDIR)/b_lockglue.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/text3d.o: ../../config.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/random.h +$(GLOBJDIR)/text3d.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/text3d.o: text3d.h +$(GLOBJDIR)/invert.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/invert.o: ../../config.h +$(GLOBJDIR)/invert.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/invert.o: $(UTILDIR)/random.h +$(GLOBJDIR)/invert.o: $(UTILDIR)/vis.h +$(GLOBJDIR)/invert.o: i_linkage.h +$(GLOBJDIR)/i_figureeight.o: i_figureeight.h +$(GLOBJDIR)/i_figureeight.o: i_threejetvec.h +$(GLOBJDIR)/i_figureeight.o: i_threejet.h +$(GLOBJDIR)/i_figureeight.o: i_twojet.h +$(GLOBJDIR)/i_figureeight.o: i_twojetvec.h +$(GLOBJDIR)/i_linkage.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/i_linkage.o: ../../config.h +$(GLOBJDIR)/i_linkage.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/i_linkage.o: $(UTILDIR)/random.h +$(GLOBJDIR)/i_linkage.o: i_linkage.h +$(GLOBJDIR)/i_linkage.o: i_threejetvec.h +$(GLOBJDIR)/i_linkage.o: i_threejet.h +$(GLOBJDIR)/i_linkage.o: i_twojet.h +$(GLOBJDIR)/i_linkage.o: i_twojetvec.h +$(GLOBJDIR)/i_linkage.o: i_figureeight.h +$(GLOBJDIR)/i_linkage.o: i_spline.h +$(GLOBJDIR)/i_linkage.o: i_sphere.h +$(GLOBJDIR)/i_sphere.o: i_threejetvec.h +$(GLOBJDIR)/i_sphere.o: i_threejet.h +$(GLOBJDIR)/i_sphere.o: i_twojet.h +$(GLOBJDIR)/i_sphere.o: i_twojetvec.h +$(GLOBJDIR)/i_sphere.o: i_figureeight.h +$(GLOBJDIR)/i_sphere.o: i_spline.h +$(GLOBJDIR)/i_sphere.o: i_sphere.h +$(GLOBJDIR)/i_spline.o: $(UTILDIR)/xlock.h +$(GLOBJDIR)/i_spline.o: ../../config.h +$(GLOBJDIR)/i_spline.o: $(UTILDIR)/mode.h +$(GLOBJDIR)/i_spline.o: $(UTILDIR)/random.h +$(GLOBJDIR)/i_spline.o: i_spline.h +$(GLOBJDIR)/i_spline.o: i_threejetvec.h +$(GLOBJDIR)/i_spline.o: i_threejet.h +$(GLOBJDIR)/i_spline.o: i_twojet.h +$(GLOBJDIR)/i_spline.o: i_twojetvec.h +$(GLOBJDIR)/i_spline.o: i_evert.h +$(GLOBJDIR)/i_threejet.o: i_threejet.h +$(GLOBJDIR)/i_threejet.o: i_twojet.h +$(GLOBJDIR)/i_threejetvec.o: i_threejetvec.h +$(GLOBJDIR)/i_threejetvec.o: i_threejet.h +$(GLOBJDIR)/i_threejetvec.o: i_twojet.h +$(GLOBJDIR)/i_threejetvec.o: i_twojetvec.h +$(GLOBJDIR)/i_twojet.o: i_twojet.h +$(GLOBJDIR)/i_twojetvec.o: i_twojetvec.h +$(GLOBJDIR)/i_twojetvec.o: i_twojet.h + diff --git a/modes/glx/atlantis.c b/modes/glx/atlantis.c new file mode 100644 index 00000000..04e78925 --- /dev/null +++ b/modes/glx/atlantis.c @@ -0,0 +1,444 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)atlantis.c 1.3 98/06/18 xlockmore"; + +#endif + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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 original code for this mode was written by Mark J. Kilgard + * as a demo for openGL programming. + * + * Porting it to xlock was possible by comparing the original Mesa's morph3d + * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna + * (look at morph3d.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (May-13-1998) + * + * REVISION HISTORY: + * + * David A. Bagley - 98/06/17 : Add whalespeed option. Global options to + * initialize local variables are now: + * XLock.atlantis.cycles: 100 ! SharkSpeed + * XLock.atlantis.batchcount: 4 ! SharkNum + * XLock.atlantis.whalespeed: 250 ! WhaleSpeed + * XLock.atlantis.size: 6000 ! SharkSize + * Add random direction for whales/dolphins + * + * E.Lassauge - 98/06/16: Use the following global options to initialize + * local variables : + * XLock.atlantis.delay: 100 ! SharkSpeed + * XLock.atlantis.batchcount: 4 ! SharkNum + * XLock.atlantis.cycles: 250 ! WhaleSpeed + * XLock.atlantis.size: 6000 ! SharkSize + * Add support for -/+ wireframe (t'was so easy to do!) + * + * TODO : + * - add a sort of background image or random bg color + * - better handling of sizes and speeds + * - test standalone and module modes + * - purify it (!) + */ + +/* Copyright (c) Mark J. Kilgard, 1994. */ + +/** + * (c) Copyright 1993, 1994, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * Permission to use, copy, modify, and distribute this software for + * any purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies and that both the copyright notice + * and this permission notice appear in supporting documentation, and that + * the name of Silicon Graphics, Inc. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. + * + * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" + * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, + * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY + * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, + * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF + * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + * + * US Government Users Restricted Rights + * Use, duplication, or disclosure by the Government is subject to + * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph + * (c)(1)(ii) of the Rights in Technical Data and Computer Software + * clause at DFARS 252.227-7013 and/or in similar or successor + * clauses in the FAR or the DOD or NASA FAR Supplement. + * Unpublished-- rights reserved under the copyright laws of the + * United States. Contractor/manufacturer is Silicon Graphics, + * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. + * + * OpenGL(TM) is a trademark of Silicon Graphics, Inc. + */ + +#ifdef STANDALONE +#define PROGCLASS "Atlantis" +#define HACK_INIT init_atlantis +#define HACK_DRAW draw_atlantis +#define atlantis_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*count: 4 \n" \ + "*cycles: 100 \n" \ + "*size: 6000 \n" \ + "*whalespeed: 250\n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_atlantis + +#include "atlantis.h" +#include + +#define DEF_WHALESPEED "250" +static int whalespeed; +static XrmOptionDescRec opts[] = +{ + {"-whalespeed", ".atlantis.whalespeed", XrmoptionSepArg, (caddr_t) NULL} +}; + +static argtype vars[] = +{ +{(caddr_t *) & whalespeed, "whalespeed", "WhaleSpeed", DEF_WHALESPEED, t_Int} +}; + +static OptionStruct desc[] = +{ + {"-whalespeed num", "speed of whales and the dolphin"} +}; + +ModeSpecOpt atlantis_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct atlantis_description = +{"atlantis", "init_atlantis", "draw_atlantis", "release_atlantis", + "refresh_atlantis", "change_atlantis", NULL, &atlantis_opts, + 1000, NUM_SHARKS, SHARKSPEED, SHARKSIZE, 64, 1.0, "", + "Shows moving sharks/whales/dolphin", 0, NULL}; + +#endif + +static atlantisstruct *atlantis = NULL; + +static void +InitFishs(atlantisstruct * ap) +{ + int i; + + for (i = 0; i < ap->num_sharks; i++) { + ap->sharks[i].x = 70000.0 + NRAND(ap->sharksize); + ap->sharks[i].y = NRAND(ap->sharksize); + ap->sharks[i].z = NRAND(ap->sharksize); + ap->sharks[i].psi = NRAND(360) - 180.0; + ap->sharks[i].v = 1.0; + } + + /* Random whae direction */ + ap->whaledir = LRAND() & 1; + + ap->dolph.x = 30000.0; + ap->dolph.y = 0.0; + ap->dolph.z = (float) (ap->sharksize); + ap->dolph.psi = (ap->whaledir) ? 90.0 : -90.0; + ap->dolph.theta = 0.0; + ap->dolph.v = 6.0; + + ap->momWhale.x = 70000.0; + ap->momWhale.y = 0.0; + ap->momWhale.z = 0.0; + ap->momWhale.psi = (ap->whaledir) ? 90.0 : -90.0; + ap->momWhale.theta = 0.0; + ap->momWhale.v = 3.0; + + ap->babyWhale.x = 60000.0; + ap->babyWhale.y = -2000.0; + ap->babyWhale.z = -2000.0; + ap->babyWhale.psi = (ap->whaledir) ? 90.0 : -90.0; + ap->babyWhale.theta = 0.0; + ap->babyWhale.v = 3.0; +} + +static void +Init(atlantisstruct * ap) +{ + static float ambient[] = + {0.1, 0.1, 0.1, 1.0}; + static float diffuse[] = + {1.0, 1.0, 1.0, 1.0}; + static float position[] = + {0.0, 1.0, 0.0, 0.0}; + static float mat_shininess[] = + {90.0}; + static float mat_specular[] = + {0.8, 0.8, 0.8, 1.0}; + static float mat_diffuse[] = + {0.46, 0.66, 0.795, 1.0}; + static float mat_ambient[] = + {0.0, 0.1, 0.2, 1.0}; + static float lmodel_ambient[] = + {0.4, 0.4, 0.4, 1.0}; + static float lmodel_localviewer[] = + {0.0}; + float fblue = 0.0, fgreen; + + glFrontFace(GL_CW); + + glDepthFunc(GL_LEQUAL); + glEnable(GL_DEPTH_TEST); + + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); + glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); + glLightfv(GL_LIGHT0, GL_POSITION, position); + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); + glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_localviewer); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse); + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient); + + InitFishs(ap); + + /* Add a little randomness */ + fblue = ((float) (NRAND(50)) / 100.0) + 0.50; + fgreen = fblue * 0.56; + glClearColor(0.0, fgreen, fblue, 0.0); +} + +static void +Reshape(ModeInfo * mi, int width, int height) +{ + atlantisstruct *ap = &atlantis[MI_SCREEN(mi)]; + + glViewport(0, 0, ap->WinW = (GLint) width, ap->WinH = (GLint) height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(400.0, (GLdouble) width / (GLdouble) height, 1.0, 2000000.0); + glMatrixMode(GL_MODELVIEW); +} + +static void +Animate(atlantisstruct * ap) +{ + int i; + + for (i = 0; i < ap->num_sharks; i++) { + SharkPilot(&(ap->sharks[i]), ap->sharkspeed); + SharkMiss(ap, i); + } + WhalePilot(&(ap->dolph), ap->whalespeed, ap->whaledir); + ap->dolph.phi++; + WhalePilot(&(ap->momWhale), ap->whalespeed, ap->whaledir); + ap->momWhale.phi++; + WhalePilot(&(ap->babyWhale), ap->whalespeed, ap->whaledir); + ap->babyWhale.phi++; +} + +static void +AllDisplay(atlantisstruct * ap) +{ + int i; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + for (i = 0; i < ap->num_sharks; i++) { + glPushMatrix(); + FishTransform(&(ap->sharks[i])); + DrawShark(&(ap->sharks[i]), ap->wire); + glPopMatrix(); + } + + glPushMatrix(); + FishTransform(&(ap->dolph)); + DrawDolphin(&(ap->dolph), ap->wire); + glPopMatrix(); + + glPushMatrix(); + FishTransform(&(ap->momWhale)); + DrawWhale(&(ap->momWhale), ap->wire); + glPopMatrix(); + + glPushMatrix(); + FishTransform(&(ap->babyWhale)); + glScalef(0.45, 0.45, 0.3); + DrawWhale(&(ap->babyWhale), ap->wire); + glPopMatrix(); +} + +/* + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + * Xlock hooks. + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + */ + +/* + *----------------------------------------------------------------------------- + * Initialize atlantis. Called each time the window changes. + *----------------------------------------------------------------------------- + */ + +void +init_atlantis(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + atlantisstruct *ap; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + if (atlantis == NULL) { + if ((atlantis = (atlantisstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (atlantisstruct))) == NULL) + return; + } + ap = &atlantis[screen]; + ap->num_sharks = MI_COUNT(mi); + if (ap->sharks == NULL) { + if ((ap->sharks = (fishRec *) calloc(ap->num_sharks, + sizeof (fishRec))) == NULL) { + /* free everything up to now */ + (void) free((void *) atlantis); + atlantis = NULL; + return; + } + } + ap->sharkspeed = MI_CYCLES(mi); /* has influence on the "width" + of the movement */ + ap->sharksize = MI_SIZE(mi); /* has influence on the "distance" + of the sharks */ + ap->whalespeed = whalespeed; + ap->wire = MI_IS_WIREFRAME(mi); + + if (MI_IS_DEBUG(mi)) { + (void) fprintf(stderr, + "%s:\n\tnum_sharks=%d\n\tsharkspeed=%.1f\n\tsharksize=%d\n\twhalespeed=%.1f\n\twireframe=%s\n", + MI_NAME(mi), + ap->num_sharks, + ap->sharkspeed, + ap->sharksize, + ap->whalespeed, + ap->wire ? "yes" : "no" + ); + } + if ((ap->glx_context = init_GL(mi)) != NULL) { + + Reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + glDrawBuffer(GL_BACK); + Init(ap); + AllDisplay(ap); + glXSwapBuffers(display, window); + + } else { + MI_CLEARWINDOW(mi); + } +} + +/* + *----------------------------------------------------------------------------- + * Called by the mainline code periodically to update the display. + *----------------------------------------------------------------------------- + */ +void +draw_atlantis(ModeInfo * mi) +{ + atlantisstruct *ap = &atlantis[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!ap->glx_context) + return; + + glXMakeCurrent(display, window, *(ap->glx_context)); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + AllDisplay(ap); + Animate(ap); + + glXSwapBuffers(display, window); +} + + +/* + *----------------------------------------------------------------------------- + * The display is being taken away from us. Free up malloc'ed + * memory and X resources that we've alloc'ed. Only called + * once, we must zap everything for every screen. + *----------------------------------------------------------------------------- + */ + +void +release_atlantis(ModeInfo * mi) +{ + int screen; + + if (atlantis != NULL) { + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + atlantisstruct *ap = &atlantis[screen]; + + if (ap->sharks) + (void) free((void *) ap->sharks); + } + (void) free((void *) atlantis); + atlantis = NULL; + } + FreeAllGL(mi); +} + +void +refresh_atlantis(ModeInfo * mi) +{ +} + +void +change_atlantis(ModeInfo * mi) +{ + atlantisstruct *ap = &atlantis[MI_SCREEN(mi)]; + + if (!ap->glx_context) + return; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(ap->glx_context)); + Init(ap); +} + +#endif /* MODE_atlantis */ diff --git a/modes/glx/atlantis.h b/modes/glx/atlantis.h new file mode 100644 index 00000000..413b48b8 --- /dev/null +++ b/modes/glx/atlantis.h @@ -0,0 +1,109 @@ +/* atlantis --- Shows moving 3D sea animals */ + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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 original code for this mode was written by Mark J. Kilgard + * as a demo for openGL programming. + * + * Porting it to xlock was possible by comparing the original Mesa's morph3d + * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna + * (look at morph3d.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (May-13-1998) + * + */ + +/** + * (c) Copyright 1993, 1994, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * Permission to use, copy, modify, and distribute this software for + * any purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies and that both the copyright notice + * and this permission notice appear in supporting documentation, and that + * the name of Silicon Graphics, Inc. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. + * + * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" + * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, + * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY + * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, + * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF + * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + * + * US Government Users Restricted Rights + * Use, duplication, or disclosure by the Government is subject to + * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph + * (c)(1)(ii) of the Rights in Technical Data and Computer Software + * clause at DFARS 252.227-7013 and/or in similar or successor + * clauses in the FAR or the DOD or NASA FAR Supplement. + * Unpublished-- rights reserved under the copyright laws of the + * United States. Contractor/manufacturer is Silicon Graphics, + * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. + * + * OpenGL(TM) is a trademark of Silicon Graphics, Inc. + */ +#include +#include + +#define RAD 57.295 +#define RRAD 0.01745 + +/* default values */ +#define NUM_SHARKS 4 +#define SHARKSPEED 100 +#define SHARKSIZE 6000 + +typedef struct _fishRec { + float x, y, z, phi, theta, psi, v; + float xt, yt, zt; + float htail, vtail; + float dtheta; + int spurt, attack; +} fishRec; + +typedef struct { + GLint WinH, WinW; + GLXContext *glx_context; + int num_sharks; + float sharkspeed, whalespeed; + int sharksize; + int wire; + Bool whaledir; + fishRec *sharks; + fishRec momWhale; + fishRec babyWhale; + fishRec dolph; +} atlantisstruct; + +extern void FishTransform(fishRec *); +extern void WhalePilot(fishRec *, float, Bool); +extern void SharkPilot(fishRec *, float); +extern void SharkMiss(atlantisstruct *, int); +extern void DrawWhale(fishRec *, int); +extern void DrawShark(fishRec *, int); +extern void DrawDolphin(fishRec *, int); diff --git a/modes/glx/b_draw.c b/modes/glx/b_draw.c new file mode 100644 index 00000000..18c89d9a --- /dev/null +++ b/modes/glx/b_draw.c @@ -0,0 +1,260 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)b_draw.c 4.11 98/06/16 xlockmore"; + +#endif + +/*- + * BUBBLE3D (C) 1998 Richard W.M. Jones. + * b_draw.c: This code creates new bubbles, manages them and controls + * them as they are drawn on the screen. + */ + +#include "bubble3d.h" + +typedef struct draw_context { + /* The list of bubbles currently on the screen. */ + void **bubble_list; + int nr_bubbles; + + /* When was the last time we created a new bubble? */ + int bubble_count; +} draw_context; + +void * +glb_draw_init(void) +{ + draw_context *c; + + GLfloat mat_specular[] = + {1, 1, 1, 1}; + GLfloat mat_emission[] = + {0, 0, 0, 1}; + GLfloat mat_shininess[] = + {100}; + GLfloat ambient[] = + {0.5, 0.5, 0.5, 1.0}; + GLfloat light_position[][4] = + { + {0, -1, 0, 0}, + {1, 1, 0, 0}, + {-1, 0, 1, 0}}; + GLfloat light_diffuse[][4] = + { + {1, 1, 1, 1}, + {1, 1, 1, 1}, + {1, 1, 1, 1}}; + GLfloat light_specular[][4] = + { + {1, 1, 1, 1}, + {1, 1, 1, 1}, + {1, 1, 1, 1}}; + + /* Initialize the context. */ + c = (struct draw_context *) malloc(sizeof (struct draw_context)); + + if (c == 0) + return 0; + c->bubble_list = 0; + c->nr_bubbles = 0; + c->bubble_count = glb_config.create_bubbles_every; + + /* Do some GL initialization. */ + glClearColor(glb_config.bg_colour[0], + glb_config.bg_colour[1], + glb_config.bg_colour[2], + glb_config.bg_colour[3]); +#if 0 + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, glb_config.bubble_colour); +#else + { + /* + * E. Lassauge - 98/06/29 + * Yeahh, cool ! Now that I know how to have random colors I + * patch this pretty beautiful mode too !! + */ + GLfloat fred, fgreen, fblue; + GLfloat params[4]; + + fred = ((float) (NRAND(100)) / 100.0); + fgreen = ((float) (NRAND(100)) / 100.0); + /* I keep more blue */ + fblue = ((float) (NRAND(50)) / 100.0) + 0.50; + + params[0] = fred; + params[1] = fgreen; + params[2] = fblue; + /* For the moment don't play with ALPHA channel */ + params[3] = glb_config.bubble_colour[3]; + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, params); + } +#endif + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, mat_emission); + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess); + +#if GLB_USE_BLENDING + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +#endif + + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_LIGHT1); + glEnable(GL_LIGHT2); +#if GLB_USE_BLENDING + glEnable(GL_BLEND); +#else + glEnable(GL_DEPTH_TEST); +#endif + glEnable(GL_AUTO_NORMAL); + glEnable(GL_NORMALIZE); + +#if GLB_USE_BLENDING + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); +#endif + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient); + glLightfv(GL_LIGHT0, GL_POSITION, light_position[0]); + glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse[0]); + glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular[0]); + glLightfv(GL_LIGHT1, GL_POSITION, light_position[1]); + glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse[1]); + glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular[1]); + glLightfv(GL_LIGHT2, GL_POSITION, light_position[2]); + glLightfv(GL_LIGHT2, GL_DIFFUSE, light_diffuse[2]); + glLightfv(GL_LIGHT2, GL_SPECULAR, light_specular[2]); + + return c; +} + +static void +delete_bubble(draw_context * c, int j) +{ + int i; + + glb_bubble_delete(c->bubble_list[j]); + + for (i = j; i < c->nr_bubbles - 1; ++i) + c->bubble_list[i] = c->bubble_list[i + 1]; + + c->nr_bubbles--; +} + +void +glb_draw_end(void *cc) +{ + draw_context *c = (draw_context *) cc; + int i; + + for (i = 0; i < c->nr_bubbles; ++i) { + delete_bubble(c, i); + i--; + } + (void) free((void *) c->bubble_list); + (void) free((void *) c); +} + +static int +create_new_bubbles(draw_context * c) +{ + int n, i; + double r = glb_drand(); + GLfloat size, speed, scale_incr, x, y, z; + void *b[4]; + void **old_bubble_list; + + /* How many bubbles to make? */ + if (r < glb_config.p_bubble_group[0]) + n = 1; + else if (r < glb_config.p_bubble_group[1]) + n = 2; + else if (r < glb_config.p_bubble_group[2]) + n = 3; + else + n = 4; + + /* Initial position of top-most bubble in group. */ + x = glb_drand() * 4 - 2; + y = glb_config.screen_bottom; + z = glb_drand() * 2 - 2; + + /* What size? */ + size = glb_config.min_size + + glb_drand() * (glb_config.max_size - glb_config.min_size); + + /* What speed? */ + speed = glb_config.min_speed + + glb_drand() * (glb_config.max_speed - glb_config.min_speed); + + /* Work out the scaling increment. Bubbles should increase by scale_factor + * as they go from bottom to top of screen. + */ + scale_incr = (size * glb_config.scale_factor - size) + / ((glb_config.screen_top - glb_config.screen_bottom) / speed); + + /* Create the bubble(s). */ + for (i = 0; i < n; ++i) { + if ((b[i] = glb_bubble_new(x, y, z, size, speed, scale_incr)) == 0) { + /* Out of memory - recover. */ + i--; + while (i >= 0) + glb_bubble_delete(b[i]); + return 0; + } + /* Create the next bubble below the last bubble. */ + y -= size * 3; + } + + /* Add the bubbles to the list. */ + c->nr_bubbles += n; + old_bubble_list = c->bubble_list; + if (c->bubble_list == 0) { + c->bubble_list = (void **) malloc(c->nr_bubbles * sizeof (void *)); + } else { + c->bubble_list = (void **) realloc(c->bubble_list, + c->nr_bubbles * sizeof (void *)); + } + + if (c->bubble_list == 0) { + /* Out of memory - recover. */ + for (i = 0; i < n; ++i) + glb_bubble_delete(b[i]); + c->bubble_list = old_bubble_list; + c->nr_bubbles -= n; + return 0; + } + for (i = 0; i < n; ++i) + c->bubble_list[c->nr_bubbles - i - 1] = b[i]; + + return 1; +} + +void +glb_draw_step(void *cc) +{ + draw_context *c = (draw_context *) cc; + int i; + + /* Consider creating a new bubble or bubbles. */ + if (c->nr_bubbles < glb_config.max_bubbles && + c->bubble_count++ > glb_config.create_bubbles_every) { + if (create_new_bubbles(c)) + c->bubble_count = 0; + } + /* Clear the display. */ + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + /* XXX Draw the background here ... */ + + /* Draw all the bubbles on the display. */ + for (i = 0; i < c->nr_bubbles; ++i) { + void *b = c->bubble_list[i]; + + glb_bubble_step(b); + glb_bubble_draw(b); + + /* Has the bubble reached the top of the screen? */ + if (glb_bubble_get_y(b) >= glb_config.screen_top) { + delete_bubble(c, i); + i--; + } + } +} diff --git a/modes/glx/b_lockglue.c b/modes/glx/b_lockglue.c new file mode 100644 index 00000000..36723b01 --- /dev/null +++ b/modes/glx/b_lockglue.c @@ -0,0 +1,180 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)b_lockglue.c 4.11 98/06/16 xlockmore"; + +#endif + +/*- + * BUBBLE3D (C) 1998 Richard W.M. Jones. + * b_lockglue.c: Glue to make this all work with xlockmore. + */ + +#include "bubble3d.h" + +/* XXX This lot should eventually be made configurable using the + * options stuff below. + */ +struct glb_config glb_config = +{ +#if GLB_SLOW_GL + 2, /* subdivision_depth */ +#else + 3, /* subdivision_depth */ +#endif + 5, /* nr_nudge_axes */ + 0.3, /* nudge_angle_factor */ + 0.15, /* nudge_factor */ + 0.1, /* rotation_factor */ + 8, /* create_bubbles_every */ + 8, /* max_bubbles */ + {0.7, 0.8, 0.9, 1.0}, /* p_bubble_group */ + 0.5, /* max_size */ + 0.1, /* min_size */ + 0.1, /* max_speed */ + 0.03, /* min_speed */ + 1.5, /* scale_factor */ + -4, /* screen_bottom */ + 4, /* screen_top */ +#if 0 + {0.1, 0.0, 0.4, 0.0}, /* bg_colour */ +#else + {0.0, 0.0, 0.0, 0.0}, /* bg_colour */ +#endif +#if 0 + {0.7, 0.7, 0.0, 0.3} /* bubble_colour */ +#else + {0.0, 0.0, 0.7, 0.3} /* bubble_colour */ +#endif +}; + +#ifdef STANDALONE +#define PROGCLASS "Bubble3D" +#define HACK_INIT init_bubble3d +#define HACK_DRAW draw_bubble3d +#define bubble3d_opts xlockmore_opts +#include "xlockmore.h" +#else +#include "xlock.h" +#include "vis.h" +#endif + +#ifdef MODE_bubble3d + +ModeSpecOpt bubble3d_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct bubbles3d_description = +{"bubbles3d", + "init_bubble3d", + "draw_bubble3d", + "release_bubble3d", + "change_bubble3d", + "init_bubble3d", + NULL, + &bubble3d_opts, + 1000, 1, 2, 1, 64, 1.0, "", + "Richard Jones's GL bubbles", + 0, + NULL +}; + +#endif /* USE_MODULES */ + +struct context { + GLXContext *glx_context; + void *draw_context; +}; + +static struct context *contexts = 0; + +static void +init(struct context *c) +{ + glb_sphere_init(); + c->draw_context = glb_draw_init(); +} + +static void +reshape(int w, int h) +{ + glViewport(0, 0, (GLsizei) w, (GLsizei) h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(45, (GLdouble) w / (GLdouble) h, 3, 8); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0, 0, -5); +} + +static void +do_display(struct context *c) +{ + glb_draw_step(c->draw_context); +} + +void +init_bubble3d(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int screen = MI_SCREEN(mi); + struct context *c; + + if (contexts == 0) { + contexts = (struct context *) malloc(sizeof (struct context) * MI_NUM_SCREENS(mi)); + + if (contexts == 0) + return; + } + c = &contexts[screen]; + c->glx_context = init_GL(mi); + if (c->glx_context != 0) { + init(c); + reshape(MI_WIDTH(mi), MI_HEIGHT(mi)); + do_display(c); + glFinish(); + glXSwapBuffers(display, window); + } else + MI_CLEARWINDOW(mi); +} + +void +draw_bubble3d(ModeInfo * mi) +{ + struct context *c = &contexts[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!c->glx_context) + return; + + glXMakeCurrent(display, window, *(c->glx_context)); + + do_display(c); + + glFinish(); + glXSwapBuffers(display, window); +} + +void +change_bubble3d(ModeInfo * mi) +{ + /* nothing */ +} + +void +release_bubble3d(ModeInfo * mi) +{ + struct context *c = &contexts[MI_SCREEN(mi)]; + + if (contexts != 0) { + glb_draw_end(c->draw_context); + (void) free((void *) contexts); + contexts = 0; + } + FreeAllGL(mi); +} + +#endif /* MODE_bubble3d */ diff --git a/modes/glx/b_sphere.c b/modes/glx/b_sphere.c new file mode 100644 index 00000000..2f8b25f6 --- /dev/null +++ b/modes/glx/b_sphere.c @@ -0,0 +1,231 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)b_sphere.c 4.11 98/06/16 xlockmore"; + +#endif + +/*- + * BUBBLE3D (C) 1998 Richard W.M. Jones. + * b_sphere.c: Create a list of vertices and triangles in a + * normalized sphere, which is then later used as the basic shape + * for all bubbles. This code is run once when the program starts + * up. + */ + +#include "bubble3d.h" + +/* The list of vertices created. */ +typedef glb_vertex vertex; +static vertex *vertices = 0; +static int nr_vertices = 0, nr_vertices_allocated = 0; + +/* The list of triangles created. */ +typedef glb_triangle triangle; +static triangle *triangles = 0; +static int nr_triangles = 0, nr_triangles_allocated = 0; + +/* Have we initialized the lists yet? */ +static int initialized = 0; + +#define EPSILON GLB_VERTICES_EPSILON + +/* Should be taken care of already... but just in case */ +#if !defined( __GNUC__ ) && !defined(__cplusplus) && !defined(c_plusplus) +#undef inline +#define inline /* */ +#endif +static inline int +close_enough(GLfloat * v1, GLfloat * v2) +{ + return fabs((double) (v1[0] - v2[0])) <= EPSILON && + fabs((double) (v1[1] - v2[1])) <= EPSILON && + fabs((double) (v1[2] - v2[2])) <= EPSILON; +} + +#define INCR(n) ((n == 0) ? (n = 1) : (n *= 2)) +#define INCR_ALLOCATION(a, n, t) (a = (t *) realloc (a, INCR (n) * sizeof (t))) + +static inline GLuint +save_vertex(GLfloat * v) +{ + int i; + + /* Inefficient, but we only do this a few times. Check to see if there's + * an existing vertex which is `close enough' to this one. + */ + for (i = 0; i < nr_vertices; ++i) + if (close_enough(v, vertices[i])) + return i; + + if (nr_vertices_allocated <= nr_vertices) { + if (vertices == 0) { + vertices = (vertex *) malloc(INCR(nr_vertices_allocated) * sizeof (vertex)); + } else { + INCR_ALLOCATION(vertices, nr_vertices_allocated, vertex); + } + } + vertices[nr_vertices][0] = v[0]; + vertices[nr_vertices][1] = v[1]; + vertices[nr_vertices][2] = v[2]; + return nr_vertices++; +} + +static inline GLuint +save_triangle(GLuint v1, GLuint v2, GLuint v3) +{ + if (nr_triangles_allocated <= nr_triangles) { + if (triangles == 0) { + triangles = (triangle *) malloc(INCR(nr_triangles_allocated) * sizeof (triangle)); + } else { + INCR_ALLOCATION(triangles, nr_triangles_allocated, triangle); + } + } + triangles[nr_triangles][0] = v1; + triangles[nr_triangles][1] = v2; + triangles[nr_triangles][2] = v3; + return nr_triangles++; +} + +static inline void +normalize(GLfloat v[3]) +{ + GLfloat d = (GLfloat) sqrt((double) (v[0] * v[0] + v[1] * v[1] + v[2] * v[2])); + + if (d != 0) { + v[0] /= d; + v[1] /= d; + v[2] /= d; + } else { + v[0] = v[1] = v[2] = 0; + } +} + +static void +subdivide(GLfloat * v1, GLuint vi1, + GLfloat * v2, GLuint vi2, + GLfloat * v3, GLuint vi3, + int depth) +{ + int i; + + if (depth == 0) { + save_triangle(vi1, vi2, vi3); + } else { + GLuint vi12, vi23, vi31; + GLfloat v12[3], v23[3], v31[3]; + + for (i = 0; i < 3; ++i) { + v12[i] = v1[i] + v2[i]; + v23[i] = v2[i] + v3[i]; + v31[i] = v3[i] + v1[i]; + } + normalize(v12); + vi12 = save_vertex(v12); + normalize(v23); + vi23 = save_vertex(v23); + normalize(v31); + vi31 = save_vertex(v31); + subdivide(v1, vi1, v12, vi12, v31, vi31, depth - 1); + subdivide(v2, vi2, v23, vi23, v12, vi12, depth - 1); + subdivide(v3, vi3, v31, vi31, v23, vi23, depth - 1); + subdivide(v12, vi12, v23, vi23, v31, vi31, depth - 1); + } +} + +#define ICO_X 0.525731112119133606 +#define ICO_Z 0.850650808352039932 + +static GLfloat vdata[12][3] = +{ + {-ICO_X, 0, ICO_Z}, + {ICO_X, 0, ICO_Z}, + {-ICO_X, 0, -ICO_Z}, + {ICO_X, 0, -ICO_Z}, + {0, ICO_Z, ICO_X}, + {0, ICO_Z, -ICO_X}, + {0, -ICO_Z, ICO_X}, + {0, -ICO_Z, -ICO_X}, + {ICO_Z, ICO_X, 0}, + {-ICO_Z, ICO_X, 0}, + {ICO_Z, -ICO_X, 0}, + {-ICO_Z, -ICO_X, 0} +}; + +static GLuint tindices[20][3] = +{ + {0, 4, 1}, + {0, 9, 4}, + {9, 5, 4}, + {4, 5, 8}, + {4, 8, 1}, + {8, 10, 1}, + {8, 3, 10}, + {5, 3, 8}, + {5, 2, 3}, + {2, 7, 3}, + {7, 10, 3}, + {7, 6, 10}, + {7, 11, 6}, + {11, 0, 6}, + {0, 1, 6}, + {6, 1, 10}, + {9, 0, 11}, + {9, 11, 2}, + {9, 2, 5}, + {7, 2, 11} +}; + +/* Public interface: Create the sphere. */ +void +glb_sphere_init(void) +{ + int i; + + if (initialized) + return; + + for (i = 0; i < 20; ++i) { + subdivide(vdata[tindices[i][0]], save_vertex(vdata[tindices[i][0]]), + vdata[tindices[i][1]], save_vertex(vdata[tindices[i][1]]), + vdata[tindices[i][2]], save_vertex(vdata[tindices[i][2]]), + glb_config.subdivision_depth); + } + + initialized = 1; +} + +/* Return the vertices list. */ +glb_vertex * +glb_sphere_get_vertices(int *nr_vertices_ptr) +{ + glb_sphere_init(); + *nr_vertices_ptr = nr_vertices; + return vertices; +} + +/* Return the triangles list. */ +glb_triangle * +glb_sphere_get_triangles(int *nr_triangles_ptr) +{ + glb_sphere_init(); + *nr_triangles_ptr = nr_triangles; + return triangles; +} + +/* Free up memory. */ +#if 0 +void +glb_sphere_end(void) +{ + initialized = 0; + + (void) free((void *) vertices); + (void) free((void *) triangles); + + vertices = 0; + nr_vertices = nr_vertices_allocated = 0; + + triangles = 0; + nr_triangles = nr_triangles_allocated = 0; +} + +#endif diff --git a/modes/glx/bubble3d.c b/modes/glx/bubble3d.c new file mode 100644 index 00000000..dd5b68e4 --- /dev/null +++ b/modes/glx/bubble3d.c @@ -0,0 +1,264 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* bubble3d.c - 3D bubbles */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)bubble3d.c 4.11 98/06/16 xlockmore"; + +#endif + +/*- + * BUBBLE3D (C) 1998 Richard W.M. Jones. + * 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: + * 16-Jun-98: Written. + * + * bubble.c: This code is responsible for creating and managing + * bubbles over their lifetime. + * The bubbles may be drawn inside out. + */ + +#include "bubble3d.h" + +typedef struct bubble { + GLfloat *contributions; /* List of contributions from each + * nudge to each vertex. This list has + * length nr_vertices * nr_nudge_axes. + */ + GLfloat x, y, z; /* (x,y,z) location of the bubble. */ + GLfloat scale; /* Scaling factor applied to bubble. */ + GLfloat y_incr, scale_incr; /* Change in y and scale each frame. */ + GLfloat rotx, roty, rotz; /* Current rotation. */ + GLfloat rotx_incr, roty_incr, rotz_incr; /* Amount by which we increase + * rotation each step. + */ + GLfloat *nudge_angle; /* Current angle (radians) of each + * nudge. This list has length nr_nudge_axes. + */ + GLfloat *nudge_angle_incr; /* Amount by which we increase each nudge + * angle in each frame. + */ +} bubble; + +/* Should be taken care of already... but just in case */ +#if !defined( __GNUC__ ) && !defined(__cplusplus) && !defined(c_plusplus) +#undef inline +#define inline /* */ +#endif +static inline void +normalize(GLfloat v[3]) +{ + GLfloat d = (GLfloat) sqrt((double) (v[0] * v[0] + v[1] * v[1] + + v[2] * v[2])); + + if (d != 0) { + v[0] /= d; + v[1] /= d; + v[2] /= d; + } else { + v[0] = v[1] = v[2] = 0; + } +} + +static inline GLfloat +dotprod(GLfloat * v1, GLfloat * v2) +{ + return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2]; +} + +static inline GLfloat +max(GLfloat a, GLfloat b) +{ + return a > b ? a : b; +} + +/* Create a new bubble. */ +void * +glb_bubble_new(GLfloat x, GLfloat y, GLfloat z, GLfloat scale, + GLfloat y_incr, GLfloat scale_incr) +{ + int i, j; + + /* GLfloat axes [glb_config.nr_nudge_axes][3]; */ + GLfloat axes[5][3]; /* HARD CODED for SunCC */ + int nr_vertices; + glb_vertex *vertices = glb_sphere_get_vertices(&nr_vertices); + + bubble *b = (bubble *) malloc(sizeof *b); + + if (b == 0) + return 0; + + b->contributions = (GLfloat *) malloc(sizeof (GLfloat) * nr_vertices * + glb_config.nr_nudge_axes); + if (b->contributions == 0) { + (void) free((void *) b); + return 0; + } + b->nudge_angle = (GLfloat *) malloc(sizeof (GLfloat) * glb_config.nr_nudge_axes); + if (b->nudge_angle == 0) { + (void) free((void *) b->contributions); + (void) free((void *) b); + return 0; + } + b->nudge_angle_incr = (GLfloat *) malloc(sizeof (GLfloat) * glb_config.nr_nudge_axes); + if (b->nudge_angle_incr == 0) { + (void) free((void *) b->nudge_angle); + (void) free((void *) b->contributions); + (void) free((void *) b); + return 0; + } + /* Initialize primitive elements. */ + b->x = x; + b->y = y; + b->z = z; + b->scale = scale; + b->y_incr = y_incr; + b->scale_incr = scale_incr; + b->rotx = b->roty = b->rotz = 0; + b->rotx_incr = glb_drand() * glb_config.rotation_factor * 2 + - glb_config.rotation_factor; + b->roty_incr = glb_drand() * glb_config.rotation_factor * 2 + - glb_config.rotation_factor; + b->rotz_incr = glb_drand() * glb_config.rotation_factor * 2 + - glb_config.rotation_factor; + + /* Initialize the nudge angle arrays. */ + for (i = 0; i < glb_config.nr_nudge_axes; ++i) { + b->nudge_angle[i] = 0; + b->nudge_angle_incr[i] = glb_drand() * glb_config.nudge_angle_factor; + } + + /* Choose some random nudge axes. */ + for (i = 0; i < glb_config.nr_nudge_axes; ++i) { + axes[i][0] = glb_drand() * 2 - 1; + axes[i][1] = glb_drand() * 2 - 1; + axes[i][2] = glb_drand() * 2 - 1; + normalize(axes[i]); + } + + /* Calculate the contribution that each nudge axis has on each vertex. */ + for (i = 0; i < nr_vertices; ++i) + for (j = 0; j < glb_config.nr_nudge_axes; ++j) + b->contributions[i * glb_config.nr_nudge_axes + j] + = max(0, dotprod(vertices[i], axes[j])); + + return (void *) b; +} + +/* Delete a bubble and free up all memory. */ +void +glb_bubble_delete(void *bb) +{ + bubble *b = (bubble *) bb; + + if (b != NULL) { + if (b->nudge_angle_incr) { + (void) free((void *) b->nudge_angle_incr); + b->nudge_angle_incr = NULL; + } + if (b->nudge_angle) { + (void) free((void *) b->nudge_angle); + b->nudge_angle = NULL; + } + if (b->contributions) { + (void) free((void *) b->contributions); + b->contributions = NULL; + } + (void) free((void *) b); + b = NULL; + } +} + +/* Rotate and wobble a bubble by a single step. */ +void +glb_bubble_step(void *bb) +{ + int i; + bubble *b = (bubble *) bb; + + /* Update the rotation. */ + b->rotx += b->rotx_incr; + b->roty += b->roty_incr; + b->rotz += b->rotz_incr; + + /* Update the nudge angles. */ + for (i = 0; i < glb_config.nr_nudge_axes; ++i) + b->nudge_angle[i] += b->nudge_angle_incr[i]; + + /* Move it upwards & outwards. */ + b->y += b->y_incr; + b->scale += b->scale_incr; +} + +/* Draw a bubble. */ +void +glb_bubble_draw(void *bb) +{ + int i, j; + bubble *b = (bubble *) bb; + int nr_vertices; + glb_vertex *vertices = glb_sphere_get_vertices(&nr_vertices); + int nr_triangles; + glb_triangle *triangles = glb_sphere_get_triangles(&nr_triangles); + glb_vertex *new_vertices; + + new_vertices = (glb_vertex *) malloc(sizeof (glb_vertex) * nr_vertices); + /* Calculate the vertices of this bubble, factoring in each nudge axis. */ + for (i = 0; i < nr_vertices; ++i) { + GLfloat s = 0; + + for (j = 0; j < glb_config.nr_nudge_axes; ++j) + s += ((GLfloat) cos((double) (b->nudge_angle[j])) * + glb_config.nudge_factor - glb_config.nudge_factor / 2) * + b->contributions[i * glb_config.nr_nudge_axes + j]; + + new_vertices[i][0] = vertices[i][0] * (s + 1); + new_vertices[i][1] = vertices[i][1] * (s + 1); + new_vertices[i][2] = vertices[i][2] * (s + 1); + } + + glPushMatrix(); + + /* Apply translation, rotation and scalings. */ + glTranslatef(b->x, b->y, b->z); + + glRotatef(b->rotx, 1, 0, 0); + glRotatef(b->roty, 0, 1, 0); + glRotatef(b->rotz, 0, 0, 1); + + glScalef(b->scale, b->scale, b->scale); + + /* Draw the bubble. */ + glBegin(GL_TRIANGLES); + for (i = 0; i < nr_triangles; ++i) { + glNormal3fv(new_vertices[triangles[i][0]]); + glVertex3fv(new_vertices[triangles[i][0]]); + glNormal3fv(new_vertices[triangles[i][1]]); + glVertex3fv(new_vertices[triangles[i][1]]); + glNormal3fv(new_vertices[triangles[i][2]]); + glVertex3fv(new_vertices[triangles[i][2]]); + } + glEnd(); + glPopMatrix(); + (void) free((void *) new_vertices); +} + +/* Return y value. */ +GLfloat +glb_bubble_get_y(void *bb) +{ + bubble *b = (bubble *) bb; + + return b->y; +} diff --git a/modes/glx/bubble3d.h b/modes/glx/bubble3d.h new file mode 100644 index 00000000..f2112ea8 --- /dev/null +++ b/modes/glx/bubble3d.h @@ -0,0 +1,82 @@ +/* GLBUBBLES (C) 1998 Richard W.M. Jones. */ + +#ifndef __bubbles3d_h__ +#define __bubbles3d_h__ + +#include "xlock.h" +#include +#include + +/* Static configuration. */ +#define GLB_SLOW_GL 1 /* Set this if you have a slow GL + * implementation. If you have an accelerated + * graphics card, set this to 0. + */ +#define GLB_USE_BLENDING 0 /* Use alpha feature to create see-through + * bubbles. + */ +#define GLB_VERTICES_EPSILON 0.0005 /* How close are identical vertices? */ + +/* Configuration structure. */ +struct glb_config { + int subdivision_depth; /* Controls how many triangles are in + * each bubble. 2 and 3 are good values. + */ + int nr_nudge_axes; /* Number of directions in which each + * bubble gets stretched. Values between + * 3 and 7 seem to produce good results. + */ + GLfloat nudge_angle_factor; /* Max. amount of rotation in nudge angles. + * Controls the amount of `wobble' we see, + * and 0.3 seems to work well. + */ + GLfloat nudge_factor; /* Max. displacement of any single nudge. + * Controls the amount of the wobble. Depends + * on NR_NUDGE_AXES, and must not exceed + * 1 / NR_NUDGE_AXES. 0.1 is good. + */ + GLfloat rotation_factor; /* Max. amount by which bubbles rotate. */ + int create_bubbles_every; /* How often to create new bubbles. */ + int max_bubbles; /* Max. number of bubbles to create. */ + double p_bubble_group[4]; /* Probabilities of creating 1, 2, 3, 4 + * bubbles in a group. Cumulative. + */ + GLfloat max_size; /* Max. size. */ + GLfloat min_size; /* Min. size of bubbles. */ + GLfloat max_speed; /* Max. speed. */ + GLfloat min_speed; /* Min. speed of bubbles. */ + GLfloat scale_factor; /* Factor by which bubbles scale from bottom + * of screen to top. 1.5 - 2.0 are OK. + */ + GLfloat screen_bottom; /* Bottom of screen. */ + GLfloat screen_top; /* Top of screen. */ + GLfloat bg_colour[4]; /* Background colour. */ + GLfloat bubble_colour[4]; /* Colour of the bubbles. */ +}; + +extern struct glb_config glb_config; + +#define glb_drand() ((double)LRAND() / (double)MAXRAND) + +/*-- From glb_sphere.c. --*/ +typedef GLfloat glb_vertex[3]; +typedef GLuint glb_triangle[3]; +extern void glb_sphere_init(void); +extern glb_vertex *glb_sphere_get_vertices(int *nr_vertices); +extern glb_triangle *glb_sphere_get_triangles(int *nr_triangles); +extern void glb_sphere_end(void); + +/*-- From glb_bubble.c. --*/ +extern void *glb_bubble_new(GLfloat x, GLfloat y, GLfloat z, GLfloat scale, + GLfloat y_incr, GLfloat scale_incr); +extern void glb_bubble_delete(void *); +extern void glb_bubble_step(void *); +extern void glb_bubble_draw(void *); +extern GLfloat glb_bubble_get_y(void *); + +/*-- From glb_draw.c. --*/ +extern void *glb_draw_init(void); +extern void glb_draw_step(void *); +extern void glb_draw_end(void *); + +#endif /* __bubbles3d_h__ */ diff --git a/modes/glx/buildlwo.c b/modes/glx/buildlwo.c new file mode 100644 index 00000000..56c82daa --- /dev/null +++ b/modes/glx/buildlwo.c @@ -0,0 +1,100 @@ +#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.netaxs.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/modes/glx/buildlwo.h b/modes/glx/buildlwo.h new file mode 100644 index 00000000..fd9f027e --- /dev/null +++ b/modes/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/modes/glx/cage.c b/modes/glx/cage.c new file mode 100644 index 00000000..797ac864 --- /dev/null +++ b/modes/glx/cage.c @@ -0,0 +1,452 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* cage --- the Impossible Cage, an Escher like scene. */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)cage.c 4.07 98/01/04 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 grammatical + * mistake. + * + * My e-mail address is + * m-vianna@usa.net + * + * Marcelo F. Vianna (Jun-01-1997) + * + * Revision History: + * 01-Jan-98: Mode separated from escher and renamed + * 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 Moebius 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 "Cage" +#define HACK_INIT init_cage +#define HACK_DRAW draw_cage +#define cage_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*wireframe: False \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" + +#endif /* !STANDALONE */ + +#ifdef MODE_cage + + +#include +#include "e_textures.h" + +ModeSpecOpt cage_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct cage_description = +{"cage", "init_cage", "draw_cage", "release_cage", + "draw_cage", "change_cage", NULL, &cage_opts, + 1000, 1, 1, 1, 1.0, 4, "", + "Shows the Impossible Cage, an Escher-like GL scene", 0, NULL}; + +#endif + +#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; + int AreObjectsDefined[1]; + GLXContext *glx_context; +} cagestruct; + +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 MaterialWhite[] = +{0.7, 0.7, 0.7, 1.0}; + +static cagestruct *cage = NULL; +static GLuint objects; + +#define ObjWoodPlank 0 + +#define PlankWidth 3.0 +#define PlankHeight 0.35 +#define PlankThickness 0.15 + +static void +draw_woodplank(cagestruct * cp) +{ + if (!cp->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(); + cp->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(cagestruct * cp) +{ + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankHeight - PlankWidth, -PlankThickness - PlankWidth); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankWidth - PlankThickness); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankWidth - PlankHeight, -PlankThickness - PlankWidth); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankWidth - PlankHeight, 3 * PlankThickness - PlankWidth); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankWidth - PlankThickness); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankWidth - 3 * PlankThickness); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankHeight - PlankWidth, 3 * PlankThickness - PlankWidth); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankThickness - PlankWidth); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankWidth - 3 * PlankThickness); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankHeight - PlankWidth, PlankWidth + PlankThickness); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 0, 1); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankThickness - PlankWidth); + draw_woodplank(cp); + glPopMatrix(); + glPushMatrix(); + glRotatef(90, 0, 1, 0); + glTranslatef(0.0, PlankWidth - PlankHeight, PlankWidth + PlankThickness); + draw_woodplank(cp); + glPopMatrix(); +} + +static void +reshape(ModeInfo * mi, int width, int height) +{ + cagestruct *cp = &cage[MI_SCREEN(mi)]; + + glViewport(0, 0, cp->WindW = (GLint) width, cp->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); + } + cp->AreObjectsDefined[ObjWoodPlank] = 0; +} + +static void +pinit(void) +{ + 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); + + /* cage */ + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + glShadeModel(GL_FLAT); + glDisable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_CULL_FACE); + + 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_cage(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + cagestruct *cp; + + if (cage == NULL) { + if ((cage = (cagestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (cagestruct))) == NULL) + return; + } + cp = &cage[screen]; + cp->step = NRAND(90); + + if ((cp->glx_context = init_GL(mi)) != NULL) { + + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + glDrawBuffer(GL_BACK); + if (!glIsList(objects)) + objects = glGenLists(1); + pinit(); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_cage(ModeInfo * mi) +{ + cagestruct *cp = &cage[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!cp->glx_context) + return; + + glXMakeCurrent(display, window, *(cp->glx_context)); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + glTranslatef(0.0, 0.0, -10.0); + + if (!MI_IS_ICONIC(mi)) { + glScalef(Scale4Window * cp->WindH / cp->WindW, Scale4Window, Scale4Window); + } else { + glScalef(Scale4Iconic * cp->WindH / cp->WindW, Scale4Iconic, Scale4Iconic); + } + + /* cage */ + glRotatef(cp->step * 100, 0, 0, 1); + glRotatef(25 + cos(cp->step * 5) * 6, 1, 0, 0); + glRotatef(204.5 - sin(cp->step * 5) * 8, 0, 1, 0); + draw_impossiblecage(cp); + + glPopMatrix(); + + glFlush(); + + glXSwapBuffers(display, window); + + cp->step += 0.025; +} + +void +change_cage(ModeInfo * mi) +{ + cagestruct *cp = &cage[MI_SCREEN(mi)]; + + if (!cp->glx_context) + return; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(cp->glx_context)); + pinit(); +} + +void +release_cage(ModeInfo * mi) +{ + if (cage != NULL) { + (void) free((void *) cage); + cage = NULL; + } + if (glIsList(objects)) { + glDeleteLists(objects, 1); + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/dolphin.c b/modes/glx/dolphin.c new file mode 100644 index 00000000..b809ff6e --- /dev/null +++ b/modes/glx/dolphin.c @@ -0,0 +1,2069 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)dolphin.c 1.2 98/06/16 xlockmore"; + +#endif + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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 original code for this mode was written by Mark J. Kilgard + * as a demo for openGL programming. + * + * Porting it to xlock was possible by comparing the original Mesa's morph3d + * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna + * (look at morph3d.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (May-13-1998) + * + */ + +/** + * (c) Copyright 1993, 1994, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * Permission to use, copy, modify, and distribute this software for + * any purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies and that both the copyright notice + * and this permission notice appear in supporting documentation, and that + * the name of Silicon Graphics, Inc. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. + * + * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" + * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, + * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY + * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, + * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF + * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + * + * US Government Users Restricted Rights + * Use, duplication, or disclosure by the Government is subject to + * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph + * (c)(1)(ii) of the Rights in Technical Data and Computer Software + * clause at DFARS 252.227-7013 and/or in similar or successor + * clauses in the FAR or the DOD or NASA FAR Supplement. + * Unpublished-- rights reserved under the copyright laws of the + * United States. Contractor/manufacturer is Silicon Graphics, + * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. + * + * OpenGL(TM) is a trademark of Silicon Graphics, Inc. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef MODE_atlantis + +#ifdef STANDALONE +#include +#endif + +#include "atlantis.h" +/* *INDENT-OFF* */ +static float N001[3] = {-0.005937 ,-0.101998 ,-0.994767}; +static float N002[3] = {0.936780 ,-0.200803 ,0.286569}; +static float N003[3] = {-0.233062 ,0.972058 ,0.028007}; +#if 0 +static float N004[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N005[3] = {0.898117 ,0.360171 ,0.252315}; +static float N006[3] = {-0.915437 ,0.348456 ,0.201378}; +static float N007[3] = {0.602263 ,-0.777527 ,0.180920}; +static float N008[3] = {-0.906912 ,-0.412015 ,0.088061}; +#if 0 +static float N009[3] = {-0.015623 ,0.999878 ,0.000000}; +static float N010[3] = {0.000000 ,-0.992278 ,0.124035}; +static float N011[3] = {0.000000 ,-0.936329 ,-0.351123}; +#endif +static float N012[3] = {0.884408 ,-0.429417 ,-0.182821}; +static float N013[3] = {0.921121 ,0.311084 ,-0.234016}; +static float N014[3] = {0.382635 ,0.877882 ,-0.287948}; +static float N015[3] = {-0.380046 ,0.888166 ,-0.258316}; +static float N016[3] = {-0.891515 ,0.392238 ,-0.226607}; +static float N017[3] = {-0.901419 ,-0.382002 ,-0.203763}; +static float N018[3] = {-0.367225 ,-0.911091 ,-0.187243}; +static float N019[3] = {0.339539 ,-0.924846 ,-0.171388}; +static float N020[3] = {0.914706 ,-0.378617 ,-0.141290}; +static float N021[3] = {0.950662 ,0.262713 ,-0.164994}; +static float N022[3] = {0.546359 ,0.801460 ,-0.243218}; +static float N023[3] = {-0.315796 ,0.917068 ,-0.243431}; +static float N024[3] = {-0.825687 ,0.532277 ,-0.186875}; +static float N025[3] = {-0.974763 ,-0.155232 ,-0.160435}; +static float N026[3] = {-0.560596 ,-0.816658 ,-0.137119}; +static float N027[3] = {0.380210 ,-0.910817 ,-0.160786}; +static float N028[3] = {0.923772 ,-0.358322 ,-0.135093}; +static float N029[3] = {0.951202 ,0.275053 ,-0.139859}; +static float N030[3] = {0.686099 ,0.702548 ,-0.188932}; +static float N031[3] = {-0.521865 ,0.826719 ,-0.210220}; +static float N032[3] = {-0.923820 ,0.346739 ,-0.162258}; +static float N033[3] = {-0.902095 ,-0.409995 ,-0.134646}; +static float N034[3] = {-0.509115 ,-0.848498 ,-0.144404}; +static float N035[3] = {0.456469 ,-0.880293 ,-0.129305}; +static float N036[3] = {0.873401 ,-0.475489 ,-0.105266}; +static float N037[3] = {0.970825 ,0.179861 ,-0.158584}; +static float N038[3] = {0.675609 ,0.714187 ,-0.183004}; +static float N039[3] = {-0.523574 ,0.830212 ,-0.191360}; +static float N040[3] = {-0.958895 ,0.230808 ,-0.165071}; +static float N041[3] = {-0.918285 ,-0.376803 ,-0.121542}; +static float N042[3] = {-0.622467 ,-0.774167 ,-0.114888}; +static float N043[3] = {0.404497 ,-0.908807 ,-0.102231}; +static float N044[3] = {0.930538 ,-0.365155 ,-0.027588}; +static float N045[3] = {0.921920 ,0.374157 ,-0.100345}; +static float N046[3] = {0.507346 ,0.860739 ,0.041562}; +static float N047[3] = {-0.394646 ,0.918815 ,-0.005730}; +static float N048[3] = {-0.925411 ,0.373024 ,-0.066837}; +static float N049[3] = {-0.945337 ,-0.322309 ,-0.049551}; +static float N050[3] = {-0.660437 ,-0.750557 ,-0.022072}; +static float N051[3] = {0.488835 ,-0.871950 ,-0.027261}; +static float N052[3] = {0.902599 ,-0.421397 ,0.087969}; +static float N053[3] = {0.938636 ,0.322606 ,0.122020}; +static float N054[3] = {0.484605 ,0.871078 ,0.079878}; +static float N055[3] = {-0.353607 ,0.931559 ,0.084619}; +static float N056[3] = {-0.867759 ,0.478564 ,0.134054}; +static float N057[3] = {-0.951583 ,-0.296030 ,0.082794}; +static float N058[3] = {-0.672355 ,-0.730209 ,0.121384}; +static float N059[3] = {0.528336 ,-0.842452 ,0.105525}; +static float N060[3] = {0.786913 ,-0.564760 ,0.248627}; +#if 0 +static float N061[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N062[3] = {0.622098 ,0.765230 ,0.165584}; +static float N063[3] = {-0.631711 ,0.767816 ,0.106773}; +static float N064[3] = {-0.687886 ,0.606351 ,0.398938}; +static float N065[3] = {-0.946327 ,-0.281623 ,0.158598}; +static float N066[3] = {-0.509549 ,-0.860437 ,0.002776}; +static float N067[3] = {0.462594 ,-0.876692 ,0.131977}; +#if 0 +static float N068[3] = {0.000000 ,-0.992278 ,0.124035}; +static float N069[3] = {0.000000 ,-0.970143 ,-0.242536}; +static float N070[3] = {0.015502 ,0.992159 ,-0.124020}; +#endif +static float N071[3] = {0.000000 ,1.000000 ,0.000000}; +#if 0 +static float N072[3] = {0.000000 ,1.000000 ,0.000000}; +static float N073[3] = {0.000000 ,1.000000 ,0.000000}; +static float N074[3] = {0.000000 ,-1.000000 ,0.000000}; +static float N075[3] = {-0.242536 ,0.000000 ,-0.970143}; +static float N076[3] = {-0.010336 ,-0.992225 ,-0.124028}; +#endif +static float N077[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N078[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N079[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N080[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N081[3] = {-0.571197 ,0.816173 ,0.087152}; +static float N082[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N083[3] = {-0.571197 ,0.816173 ,0.087152}; +static float N084[3] = {-0.571197 ,0.816173 ,0.087152}; +static float N085[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N086[3] = {-0.571197 ,0.816173 ,0.087152}; +static float N087[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N088[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N089[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N090[3] = {-0.880770 ,0.461448 ,0.106351}; +static float N091[3] = {0.000000 ,1.000000 ,0.000000}; +static float N092[3] = {0.000000 ,1.000000 ,0.000000}; +static float N093[3] = {0.000000 ,1.000000 ,0.000000}; +static float N094[3] = {1.000000 ,0.000000 ,0.000000}; +static float N095[3] = {-1.000000 ,0.000000 ,0.000000}; +#if 0 +static float N096[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N097[3] = {-0.697296 ,0.702881 ,0.140491}; +static float N098[3] = {0.918864 ,0.340821 ,0.198819}; +static float N099[3] = {-0.932737 ,0.201195 ,0.299202}; +static float N100[3] = {0.029517 ,0.981679 ,0.188244}; +#if 0 +static float N101[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N102[3] = {0.813521 ,-0.204936 ,0.544229}; +#if 0 +static float N103[3] = {0.000000 ,1.000000 ,0.000000}; +static float N104[3] = {0.000000 ,1.000000 ,0.000000}; +static float N105[3] = {0.000000 ,1.000000 ,0.000000}; +static float N106[3] = {0.000000 ,1.000000 ,0.000000}; +static float N107[3] = {0.000000 ,1.000000 ,0.000000}; +static float N108[3] = {0.000000 ,1.000000 ,0.000000}; +static float N109[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N110[3] = {-0.781480 ,-0.384779 ,0.491155}; +static float N111[3] = {-0.722243 ,0.384927 ,0.574627}; +static float N112[3] = {-0.752278 ,0.502679 ,0.425901}; +static float N113[3] = {0.547257 ,0.367910 ,0.751766}; +static float N114[3] = {0.725949 ,-0.232568 ,0.647233}; +static float N115[3] = {-0.747182 ,-0.660786 ,0.071280}; +static float N116[3] = {0.931519 ,0.200748 ,0.303270}; +static float N117[3] = {-0.828928 ,0.313757 ,0.463071}; +static float N118[3] = {0.902554 ,-0.370967 ,0.218587}; +static float N119[3] = {-0.879257 ,-0.441851 ,0.177973}; +static float N120[3] = {0.642327 ,0.611901 ,0.461512}; +static float N121[3] = {0.964817 ,-0.202322 ,0.167910}; +static float N122[3] = {0.000000 ,1.000000 ,0.000000}; +#if 0 +static float N123[3] = {-0.980734 ,0.041447 ,0.190900}; +static float N124[3] = {-0.980734 ,0.041447 ,0.190900}; +static float N125[3] = {-0.980734 ,0.041447 ,0.190900}; +static float N126[3] = {0.000000 ,1.000000 ,0.000000}; +static float N127[3] = {0.000000 ,1.000000 ,0.000000}; +static float N128[3] = {0.000000 ,1.000000 ,0.000000}; +static float N129[3] = {0.963250 ,0.004839 ,0.268565}; +static float N130[3] = {0.963250 ,0.004839 ,0.268565}; +static float N131[3] = {0.963250 ,0.004839 ,0.268565}; +static float N132[3] = {0.000000 ,1.000000 ,0.000000}; +static float N133[3] = {0.000000 ,1.000000 ,0.000000}; +static float N134[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float P001[3] = {5.68, -300.95, 1324.70}; +static float P002[3] = {338.69, -219.63, 9677.03}; +static float P003[3] = {12.18, 474.59, 9138.14}; +#if 0 +static float P004[3] = {-7.49, -388.91, 10896.74}; +#endif +static float P005[3] = {487.51, 198.05, 9350.78}; +static float P006[3] = {-457.61, 68.74, 9427.85}; +static float P007[3] = {156.52, -266.72, 10311.68}; +static float P008[3] = {-185.56, -266.51, 10310.47}; +static float P009[3] = {124.39, -261.46, 1942.34}; +static float P010[3] = {-130.05, -261.46, 1946.03}; +static float P011[3] = {141.07, -320.11, 1239.38}; +static float P012[3] = {156.48, -360.12, 2073.41}; +static float P013[3] = {162.00, -175.88, 2064.44}; +static float P014[3] = {88.16, -87.72, 2064.02}; +static float P015[3] = {-65.21, -96.13, 2064.02}; +static float P016[3] = {-156.48, -180.96, 2064.44}; +static float P017[3] = {-162.00, -368.93, 2082.39}; +static float P018[3] = {-88.16, -439.22, 2082.39}; +static float P019[3] = {65.21, -440.32, 2083.39}; +static float P020[3] = {246.87, -356.02, 2576.95}; +static float P021[3] = {253.17, -111.15, 2567.15}; +static float P022[3] = {132.34, 51.41, 2559.84}; +static float P023[3] = {-97.88, 40.44, 2567.15}; +static float P024[3] = {-222.97, -117.49, 2567.15}; +static float P025[3] = {-252.22, -371.53, 2569.92}; +static float P026[3] = {-108.44, -518.19, 2586.75}; +static float P027[3] = {97.88, -524.79, 2586.75}; +static float P028[3] = {370.03, -421.19, 3419.70}; +static float P029[3] = {351.15, -16.98, 3423.17}; +static float P030[3] = {200.66, 248.46, 3430.37}; +static float P031[3] = {-148.42, 235.02, 3417.91}; +static float P032[3] = {-360.21, -30.27, 3416.84}; +static float P033[3] = {-357.90, -414.89, 3407.04}; +static float P034[3] = {-148.88, -631.35, 3409.90}; +static float P035[3] = {156.38, -632.59, 3419.70}; +static float P036[3] = {462.61, -469.21, 4431.51}; +static float P037[3] = {466.60, 102.25, 4434.98}; +static float P038[3] = {243.05, 474.34, 4562.02}; +static float P039[3] = {-191.23, 474.40, 4554.42}; +static float P040[3] = {-476.12, 111.05, 4451.11}; +static float P041[3] = {-473.36, -470.74, 4444.78}; +static float P042[3] = {-266.95, -748.41, 4447.78}; +static float P043[3] = {211.14, -749.91, 4429.73}; +static float P044[3] = {680.57, -370.27, 5943.46}; +static float P045[3] = {834.01, 363.09, 6360.63}; +static float P046[3] = {371.29, 804.51, 6486.26}; +static float P047[3] = {-291.43, 797.22, 6494.28}; +static float P048[3] = {-784.13, 370.75, 6378.01}; +static float P049[3] = {-743.29, -325.82, 5943.46}; +static float P050[3] = {-383.24, -804.77, 5943.46}; +static float P051[3] = {283.47, -846.09, 5943.46}; +static float iP001[3] = {5.68, -300.95, 1324.70}; +#if 0 +static float iP002[3] = {338.69, -219.63, 9677.03}; +static float iP003[3] = {12.18, 624.93, 8956.39}; +static float iP004[3] = {-7.49, -388.91, 10896.74}; +static float iP005[3] = {487.51, 198.05, 9350.78}; +static float iP006[3] = {-457.61, 199.04, 9353.01}; +static float iP007[3] = {156.52, -266.72, 10311.68}; +static float iP008[3] = {-185.56, -266.51, 10310.47}; +#endif +static float iP009[3] = {124.39, -261.46, 1942.34}; +static float iP010[3] = {-130.05, -261.46, 1946.03}; +static float iP011[3] = {141.07, -320.11, 1239.38}; +static float iP012[3] = {156.48, -360.12, 2073.41}; +static float iP013[3] = {162.00, -175.88, 2064.44}; +static float iP014[3] = {88.16, -87.72, 2064.02}; +static float iP015[3] = {-65.21, -96.13, 2064.02}; +static float iP016[3] = {-156.48, -180.96, 2064.44}; +static float iP017[3] = {-162.00, -368.93, 2082.39}; +static float iP018[3] = {-88.16, -439.22, 2082.39}; +static float iP019[3] = {65.21, -440.32, 2083.39}; +static float iP020[3] = {246.87, -356.02, 2576.95}; +static float iP021[3] = {253.17, -111.15, 2567.15}; +static float iP022[3] = {132.34, 51.41, 2559.84}; +static float iP023[3] = {-97.88, 40.44, 2567.15}; +static float iP024[3] = {-222.97, -117.49, 2567.15}; +static float iP025[3] = {-252.22, -371.53, 2569.92}; +static float iP026[3] = {-108.44, -518.19, 2586.75}; +static float iP027[3] = {97.88, -524.79, 2586.75}; +static float iP028[3] = {370.03, -421.19, 3419.70}; +static float iP029[3] = {351.15, -16.98, 3423.17}; +static float iP030[3] = {200.66, 248.46, 3430.37}; +static float iP031[3] = {-148.42, 235.02, 3417.91}; +static float iP032[3] = {-360.21, -30.27, 3416.84}; +static float iP033[3] = {-357.90, -414.89, 3407.04}; +static float iP034[3] = {-148.88, -631.35, 3409.90}; +static float iP035[3] = {156.38, -632.59, 3419.70}; +static float iP036[3] = {462.61, -469.21, 4431.51}; +static float iP037[3] = {466.60, 102.25, 4434.98}; +static float iP038[3] = {243.05, 474.34, 4562.02}; +static float iP039[3] = {-191.23, 474.40, 4554.42}; +static float iP040[3] = {-476.12, 111.05, 4451.11}; +static float iP041[3] = {-473.36, -470.74, 4444.78}; +static float iP042[3] = {-266.95, -748.41, 4447.78}; +static float iP043[3] = {211.14, -749.91, 4429.73}; +static float iP044[3] = {680.57, -370.27, 5943.46}; +static float iP045[3] = {834.01, 363.09, 6360.63}; +static float iP046[3] = {371.29, 804.51, 6486.26}; +static float iP047[3] = {-291.43, 797.22, 6494.28}; +static float iP048[3] = {-784.13, 370.75, 6378.01}; +static float iP049[3] = {-743.29, -325.82, 5943.46}; +static float iP050[3] = {-383.24, -804.77, 5943.46}; +static float iP051[3] = {283.47, -846.09, 5943.46}; +static float P052[3] = {599.09, -300.15, 7894.03}; +static float P053[3] = {735.48, 306.26, 7911.92}; +static float P054[3] = {246.22, 558.53, 8460.50}; +static float P055[3] = {-230.41, 559.84, 8473.23}; +static float P056[3] = {-698.66, 320.83, 7902.59}; +static float P057[3] = {-643.29, -299.16, 7902.59}; +static float P058[3] = {-341.47, -719.30, 7902.59}; +static float P059[3] = {252.57, -756.12, 7902.59}; +static float P060[3] = {458.39, -265.31, 9355.44}; +#if 0 +static float P061[3] = {433.38, -161.90, 9503.03}; +#endif +static float P062[3] = {224.04, 338.75, 9450.30}; +static float P063[3] = {-165.71, 341.04, 9462.35}; +static float P064[3] = {-298.11, 110.13, 10180.37}; +static float P065[3] = {-473.99, -219.71, 9355.44}; +static float P066[3] = {-211.97, -479.87, 9355.44}; +static float P067[3] = {192.86, -491.45, 9348.73}; +static float P068[3] = {-136.29, -319.84, 1228.73}; +static float P069[3] = {1111.17, -314.14, 1314.19}; +static float P070[3] = {-1167.34, -321.61, 1319.45}; +static float P071[3] = {1404.86, -306.66, 1235.45}; +static float P072[3] = {-1409.73, -314.14, 1247.66}; +static float P073[3] = {1254.01, -296.87, 1544.58}; +static float P074[3] = {-1262.09, -291.70, 1504.26}; +static float P075[3] = {965.71, -269.26, 1742.65}; +static float P076[3] = {-900.97, -276.74, 1726.07}; +static float iP068[3] = {-136.29, -319.84, 1228.73}; +static float iP069[3] = {1111.17, -314.14, 1314.19}; +static float iP070[3] = {-1167.34, -321.61, 1319.45}; +static float iP071[3] = {1404.86, -306.66, 1235.45}; +static float iP072[3] = {-1409.73, -314.14, 1247.66}; +static float iP073[3] = {1254.01, -296.87, 1544.58}; +static float iP074[3] = {-1262.09, -291.70, 1504.26}; +static float iP075[3] = {965.71, -269.26, 1742.65}; +static float iP076[3] = {-900.97, -276.74, 1726.07}; +static float P077[3] = {1058.00, -448.81, 8194.66}; +static float P078[3] = {-1016.51, -456.43, 8190.62}; +static float P079[3] = {-1515.96, -676.45, 7754.93}; +static float P080[3] = {1856.75, -830.34, 7296.56}; +static float P081[3] = {1472.16, -497.38, 7399.68}; +static float P082[3] = {-1775.26, -829.51, 7298.46}; +static float P083[3] = {911.09, -252.51, 7510.99}; +static float P084[3] = {-1451.94, -495.62, 7384.30}; +static float P085[3] = {1598.75, -669.26, 7769.90}; +static float P086[3] = {-836.53, -250.08, 7463.25}; +static float P087[3] = {722.87, -158.18, 8006.41}; +static float P088[3] = {-688.86, -162.28, 7993.89}; +static float P089[3] = {-626.92, -185.30, 8364.98}; +static float P090[3] = {647.72, -189.46, 8354.99}; +static float P091[3] = {0.00, 835.01, 5555.62}; +static float P092[3] = {0.00, 1350.18, 5220.86}; +static float P093[3] = {0.00, 1422.94, 5285.27}; +static float P094[3] = {0.00, 1296.75, 5650.19}; +static float P095[3] = {0.00, 795.63, 6493.88}; +static float iP091[3] = {0.00, 835.01, 5555.62}; +static float iP092[3] = {0.00, 1350.18, 5220.86}; +static float iP093[3] = {0.00, 1422.94, 5285.27}; +static float iP094[3] = {0.00, 1296.75, 5650.19}; +static float iP095[3] = {0.00, 795.63, 6493.88}; +#if 0 +static float P096[3] = {-447.38, -165.99, 9499.60}; +#endif +static float P097[3] = {-194.91, -357.14, 10313.32}; +static float P098[3] = {135.35, -357.66, 10307.94}; +static float iP097[3] = {-194.91, -357.14, 10313.32}; +static float iP098[3] = {135.35, -357.66, 10307.94}; +static float P099[3] = {-380.53, -221.14, 9677.98}; +static float P100[3] = {0.00, 412.99, 9629.33}; +#if 0 +static float P101[3] = {5.70, 567.00, 7862.98}; +#endif +static float P102[3] = {59.51, -412.55, 10677.58}; +static float iP102[3] = {59.51, -412.55, 10677.58}; +static float P103[3] = {6.50, 484.74, 9009.94}; +#if 0 +static float P104[3] = {-9.86, 567.62, 7858.65}; +#endif +static float P105[3] = {-41.86, 476.51, 9078.17}; +#if 0 +static float P106[3] = {22.75, 568.13, 7782.83}; +static float P107[3] = {58.93, 568.42, 7775.94}; +#endif +static float P108[3] = {49.20, 476.83, 9078.24}; +#if 0 +static float P109[3] = {99.21, 566.00, 7858.65}; +#endif +static float P110[3] = {-187.62, -410.04, 10674.12}; +static float iP110[3] = {-187.62, -410.04, 10674.12}; +static float P111[3] = {-184.25, -318.70, 10723.88}; +static float iP111[3] = {-184.25, -318.70, 10723.88}; +static float P112[3] = {-179.61, -142.81, 10670.26}; +static float P113[3] = {57.43, -147.94, 10675.26}; +static float P114[3] = {54.06, -218.90, 10712.44}; +static float P115[3] = {-186.35, -212.09, 10713.76}; +static float P116[3] = {205.90, -84.61, 10275.97}; +static float P117[3] = {-230.96, -83.26, 10280.09}; +static float iP118[3] = {216.78, -509.17, 10098.94}; +static float iP119[3] = {-313.21, -510.79, 10102.62}; +static float P118[3] = {216.78, -509.17, 10098.94}; +static float P119[3] = {-313.21, -510.79, 10102.62}; +static float P120[3] = {217.95, 96.34, 10161.62}; +static float P121[3] = {71.99, -319.74, 10717.70}; +static float iP121[3] = {71.99, -319.74, 10717.70}; +static float P122[3] = {0.00, 602.74, 5375.84}; +static float iP122[3] = {0.00, 602.74, 5375.84}; +static float P123[3] = {-448.94, -203.14, 9499.60}; +static float P124[3] = {-442.64, -185.20, 9528.07}; +static float P125[3] = {-441.07, -148.05, 9528.07}; +static float P126[3] = {-443.43, -128.84, 9499.60}; +static float P127[3] = {-456.87, -146.78, 9466.67}; +static float P128[3] = {-453.68, -183.93, 9466.67}; +static float P129[3] = {428.43, -124.08, 9503.03}; +static float P130[3] = {419.73, -142.14, 9534.56}; +static float P131[3] = {419.92, -179.96, 9534.56}; +static float P132[3] = {431.20, -199.73, 9505.26}; +static float P133[3] = {442.28, -181.67, 9475.96}; +static float P134[3] = {442.08, -143.84, 9475.96}; +/* *INDENT-ON* */ + + + +static void +Dolphin001(GLenum cap) +{ + glNormal3fv(N071); + glBegin(cap); + glVertex3fv(P001); + glVertex3fv(P068); + glVertex3fv(P010); + glEnd(); + glBegin(cap); + glVertex3fv(P068); + glVertex3fv(P076); + glVertex3fv(P010); + glEnd(); + glBegin(cap); + glVertex3fv(P068); + glVertex3fv(P070); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glVertex3fv(P076); + glVertex3fv(P070); + glVertex3fv(P074); + glEnd(); + glBegin(cap); + glVertex3fv(P070); + glVertex3fv(P072); + glVertex3fv(P074); + glEnd(); + glNormal3fv(N119); + glBegin(cap); + glVertex3fv(P072); + glVertex3fv(P070); + glVertex3fv(P074); + glEnd(); + glBegin(cap); + glVertex3fv(P074); + glVertex3fv(P070); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glVertex3fv(P070); + glVertex3fv(P068); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glVertex3fv(P076); + glVertex3fv(P068); + glVertex3fv(P010); + glEnd(); + glBegin(cap); + glVertex3fv(P068); + glVertex3fv(P001); + glVertex3fv(P010); + glEnd(); +} + +static void +Dolphin002(GLenum cap) +{ + glNormal3fv(N071); + glBegin(cap); + glVertex3fv(P011); + glVertex3fv(P001); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glVertex3fv(P075); + glVertex3fv(P011); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glVertex3fv(P069); + glVertex3fv(P011); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glVertex3fv(P069); + glVertex3fv(P075); + glVertex3fv(P073); + glEnd(); + glBegin(cap); + glVertex3fv(P071); + glVertex3fv(P069); + glVertex3fv(P073); + glEnd(); + glNormal3fv(N119); + glBegin(cap); + glVertex3fv(P001); + glVertex3fv(P011); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glVertex3fv(P009); + glVertex3fv(P011); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glVertex3fv(P011); + glVertex3fv(P069); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glVertex3fv(P069); + glVertex3fv(P073); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glVertex3fv(P069); + glVertex3fv(P071); + glVertex3fv(P073); + glEnd(); +} + +static void +Dolphin003(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(cap); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N015); + glVertex3fv(P015); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N013); + glVertex3fv(P013); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N014); + glVertex3fv(P014); + glEnd(); +} + +static void +Dolphin004(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N022); + glVertex3fv(P022); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N023); + glVertex3fv(P023); + glEnd(); + glBegin(cap); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N024); + glVertex3fv(P024); + glEnd(); + glBegin(cap); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N025); + glVertex3fv(P025); + glEnd(); + glBegin(cap); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(cap); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N020); + glVertex3fv(P020); + glEnd(); + glBegin(cap); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N027); + glVertex3fv(P027); + glEnd(); +} + +static void +Dolphin005(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(cap); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(cap); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(cap); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(cap); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(cap); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(cap); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N035); + glVertex3fv(P035); + glEnd(); + glBegin(cap); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N033); + glVertex3fv(P033); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); + glBegin(cap); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); +} + +static void +Dolphin006(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(cap); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(cap); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N095); + glVertex3fv(P095); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(cap); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glNormal3fv(N095); + glVertex3fv(P095); + glEnd(); + glBegin(cap); + glNormal3fv(N122); + glVertex3fv(P122); + glNormal3fv(N095); + glVertex3fv(P095); + glNormal3fv(N091); + glVertex3fv(P091); + glEnd(); + glBegin(cap); + glNormal3fv(N122); + glVertex3fv(P122); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N095); + glVertex3fv(P095); + glEnd(); +} + +static void +Dolphin007(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(cap); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(cap); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(cap); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(cap); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(cap); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(cap); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(cap); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); + glBegin(cap); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N039); + glVertex3fv(P039); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(cap); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); +} + +static void +Dolphin008(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(cap); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N051); + glVertex3fv(P051); + glEnd(); + glBegin(cap); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(cap); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(cap); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(cap); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(cap); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(cap); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N046); + glVertex3fv(P046); + glEnd(); +} + +static void +Dolphin009(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(cap); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(cap); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(cap); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(cap); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(cap); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(cap); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(cap); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(cap); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(cap); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); +} + +static void +Dolphin010(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); + glBegin(cap); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); +} + +static void +Dolphin011(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(cap); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(cap); + glNormal3fv(N079); + glVertex3fv(P079); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(cap); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(cap); + glNormal3fv(N089); + glVertex3fv(P089); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(cap); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); +} + +static void +Dolphin012(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N066); + glVertex3fv(P066); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N067); + glVertex3fv(P067); + glEnd(); + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N006); + glVertex3fv(P006); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(cap); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N005); + glVertex3fv(P005); + glEnd(); + glBegin(cap); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); +} + +static void +Dolphin013(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N116); + glVertex3fv(P116); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N112); + glVertex3fv(P112); + glNormal3fv(N113); + glVertex3fv(P113); + glEnd(); + glBegin(cap); + glNormal3fv(N114); + glVertex3fv(P114); + glNormal3fv(N113); + glVertex3fv(P113); + glNormal3fv(N112); + glVertex3fv(P112); + glNormal3fv(N115); + glVertex3fv(P115); + glEnd(); + glBegin(cap); + glNormal3fv(N114); + glVertex3fv(P114); + glNormal3fv(N116); + glVertex3fv(P116); + glNormal3fv(N113); + glVertex3fv(P113); + glEnd(); + glBegin(cap); + glNormal3fv(N114); + glVertex3fv(P114); + glNormal3fv(N007); + glVertex3fv(P007); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(cap); + glNormal3fv(N007); + glVertex3fv(P007); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(cap); + glVertex3fv(P002); + glVertex3fv(P007); + glVertex3fv(P008); + glVertex3fv(P099); + glEnd(); + glBegin(cap); + glVertex3fv(P007); + glVertex3fv(P114); + glVertex3fv(P115); + glVertex3fv(P008); + glEnd(); + glBegin(cap); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(cap); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N112); + glVertex3fv(P112); + glEnd(); + glBegin(cap); + glNormal3fv(N112); + glVertex3fv(P112); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N115); + glVertex3fv(P115); + glEnd(); +} + +static void +Dolphin014(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N111); + glVertex3fv(P111); + glNormal3fv(N110); + glVertex3fv(P110); + glNormal3fv(N102); + glVertex3fv(P102); + glNormal3fv(N121); + glVertex3fv(P121); + glEnd(); + glBegin(cap); + glNormal3fv(N111); + glVertex3fv(P111); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N110); + glVertex3fv(P110); + glEnd(); + glBegin(cap); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N119); + glVertex3fv(P119); + glNormal3fv(N110); + glVertex3fv(P110); + glEnd(); + glBegin(cap); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N119); + glVertex3fv(P119); + glEnd(); + glBegin(cap); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N119); + glVertex3fv(P119); + glEnd(); + glBegin(cap); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N119); + glVertex3fv(P119); + glEnd(); + glBegin(cap); + glVertex3fv(P098); + glVertex3fv(P097); + glVertex3fv(P111); + glVertex3fv(P121); + glEnd(); + glBegin(cap); + glVertex3fv(P002); + glVertex3fv(P099); + glVertex3fv(P097); + glVertex3fv(P098); + glEnd(); + glBegin(cap); + glNormal3fv(N110); + glVertex3fv(P110); + glNormal3fv(N119); + glVertex3fv(P119); + glNormal3fv(N118); + glVertex3fv(P118); + glNormal3fv(N102); + glVertex3fv(P102); + glEnd(); + glBegin(cap); + glNormal3fv(N119); + glVertex3fv(P119); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N118); + glVertex3fv(P118); + glEnd(); + glBegin(cap); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(cap); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N118); + glVertex3fv(P118); + glEnd(); + glBegin(cap); + glNormal3fv(N118); + glVertex3fv(P118); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N098); + glVertex3fv(P098); + glEnd(); + glBegin(cap); + glNormal3fv(N118); + glVertex3fv(P118); + glNormal3fv(N098); + glVertex3fv(P098); + glNormal3fv(N102); + glVertex3fv(P102); + glEnd(); + glBegin(cap); + glNormal3fv(N102); + glVertex3fv(P102); + glNormal3fv(N098); + glVertex3fv(P098); + glNormal3fv(N121); + glVertex3fv(P121); + glEnd(); +} + +static void +Dolphin015(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N100); + glVertex3fv(P100); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(cap); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N062); + glVertex3fv(P062); + glEnd(); + glBegin(cap); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N120); + glVertex3fv(P120); + glEnd(); + glBegin(cap); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N064); + glVertex3fv(P064); + glEnd(); + glBegin(cap); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N064); + glVertex3fv(P064); + glEnd(); + glBegin(cap); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(cap); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N117); + glVertex3fv(P117); + glEnd(); + glBegin(cap); + glNormal3fv(N120); + glVertex3fv(P120); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(cap); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(cap); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N120); + glVertex3fv(P120); + glEnd(); + glBegin(cap); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N120); + glVertex3fv(P120); + glEnd(); + glBegin(cap); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N120); + glVertex3fv(P120); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N120); + glVertex3fv(P120); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(cap); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); +} + +static void +Dolphin016(GLenum cap) +{ + + glDisable(GL_DEPTH_TEST); + glBegin(cap); + glVertex3fv(P123); + glVertex3fv(P124); + glVertex3fv(P125); + glVertex3fv(P126); + glVertex3fv(P127); + glVertex3fv(P128); + glEnd(); + glBegin(cap); + glVertex3fv(P129); + glVertex3fv(P130); + glVertex3fv(P131); + glVertex3fv(P132); + glVertex3fv(P133); + glVertex3fv(P134); + glEnd(); + glBegin(cap); + glVertex3fv(P103); + glVertex3fv(P105); + glVertex3fv(P108); + glEnd(); + glEnable(GL_DEPTH_TEST); +} + +void +DrawDolphin(fishRec * fish, int wire) +{ + float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7; + float pitch, thrash, chomp; + GLenum cap; + + fish->htail = (int) (fish->htail - (int) (10.0 * fish->v)) % 360; + + thrash = 70.0 * fish->v; + + seg0 = 1.0 * thrash * sin((fish->htail) * RRAD); + seg3 = 1.0 * thrash * sin((fish->htail) * RRAD); + seg1 = 2.0 * thrash * sin((fish->htail + 4.0) * RRAD); + seg2 = 3.0 * thrash * sin((fish->htail + 6.0) * RRAD); + seg4 = 4.0 * thrash * sin((fish->htail + 10.0) * RRAD); + seg5 = 4.5 * thrash * sin((fish->htail + 15.0) * RRAD); + seg6 = 5.0 * thrash * sin((fish->htail + 20.0) * RRAD); + seg7 = 6.0 * thrash * sin((fish->htail + 30.0) * RRAD); + + pitch = fish->v * sin((fish->htail + 180.0) * RRAD); + + if (fish->v > 2.0) { + chomp = -(fish->v - 2.0) * 200.0; + } + chomp = 100.0; + + P012[1] = iP012[1] + seg5; + P013[1] = iP013[1] + seg5; + P014[1] = iP014[1] + seg5; + P015[1] = iP015[1] + seg5; + P016[1] = iP016[1] + seg5; + P017[1] = iP017[1] + seg5; + P018[1] = iP018[1] + seg5; + P019[1] = iP019[1] + seg5; + + P020[1] = iP020[1] + seg4; + P021[1] = iP021[1] + seg4; + P022[1] = iP022[1] + seg4; + P023[1] = iP023[1] + seg4; + P024[1] = iP024[1] + seg4; + P025[1] = iP025[1] + seg4; + P026[1] = iP026[1] + seg4; + P027[1] = iP027[1] + seg4; + + P028[1] = iP028[1] + seg2; + P029[1] = iP029[1] + seg2; + P030[1] = iP030[1] + seg2; + P031[1] = iP031[1] + seg2; + P032[1] = iP032[1] + seg2; + P033[1] = iP033[1] + seg2; + P034[1] = iP034[1] + seg2; + P035[1] = iP035[1] + seg2; + + P036[1] = iP036[1] + seg1; + P037[1] = iP037[1] + seg1; + P038[1] = iP038[1] + seg1; + P039[1] = iP039[1] + seg1; + P040[1] = iP040[1] + seg1; + P041[1] = iP041[1] + seg1; + P042[1] = iP042[1] + seg1; + P043[1] = iP043[1] + seg1; + + P044[1] = iP044[1] + seg0; + P045[1] = iP045[1] + seg0; + P046[1] = iP046[1] + seg0; + P047[1] = iP047[1] + seg0; + P048[1] = iP048[1] + seg0; + P049[1] = iP049[1] + seg0; + P050[1] = iP050[1] + seg0; + P051[1] = iP051[1] + seg0; + + P009[1] = iP009[1] + seg6; + P010[1] = iP010[1] + seg6; + P075[1] = iP075[1] + seg6; + P076[1] = iP076[1] + seg6; + + P001[1] = iP001[1] + seg7; + P011[1] = iP011[1] + seg7; + P068[1] = iP068[1] + seg7; + P069[1] = iP069[1] + seg7; + P070[1] = iP070[1] + seg7; + P071[1] = iP071[1] + seg7; + P072[1] = iP072[1] + seg7; + P073[1] = iP073[1] + seg7; + P074[1] = iP074[1] + seg7; + + P091[1] = iP091[1] + seg3; + P092[1] = iP092[1] + seg3; + P093[1] = iP093[1] + seg3; + P094[1] = iP094[1] + seg3; + P095[1] = iP095[1] + seg3; + P122[1] = iP122[1] + seg3 * 1.5; + + P097[1] = iP097[1] + chomp; + P098[1] = iP098[1] + chomp; + P102[1] = iP102[1] + chomp; + P110[1] = iP110[1] + chomp; + P111[1] = iP111[1] + chomp; + P121[1] = iP121[1] + chomp; + P118[1] = iP118[1] + chomp; + P119[1] = iP119[1] + chomp; + + glPushMatrix(); + + glRotatef(pitch, 1.0, 0.0, 0.0); + + glTranslatef(0.0, 0.0, 7000.0); + + glRotatef(180.0, 0.0, 1.0, 0.0); + + glEnable(GL_CULL_FACE); + cap = wire ? GL_LINE_LOOP : GL_POLYGON; + Dolphin014(cap); + Dolphin010(cap); + Dolphin009(cap); + Dolphin012(cap); + Dolphin013(cap); + Dolphin006(cap); + Dolphin002(cap); + Dolphin001(cap); + Dolphin003(cap); + Dolphin015(cap); + Dolphin004(cap); + Dolphin005(cap); + Dolphin007(cap); + Dolphin008(cap); + Dolphin011(cap); + Dolphin016(cap); + glDisable(GL_CULL_FACE); + + glPopMatrix(); +} +#endif diff --git a/modes/glx/e_textures.h b/modes/glx/e_textures.h new file mode 100644 index 00000000..7f9457e3 --- /dev/null +++ b/modes/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/modes/glx/gears.c b/modes/glx/gears.c new file mode 100644 index 00000000..001cebbd --- /dev/null +++ b/modes/glx/gears.c @@ -0,0 +1,518 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* gears --- 3D gear wheels */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)gears.c 4.07 97/11/24 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: + * 10-May-97: Compatible with xscreensaver + * 22-Mar-97: Added support for -mono mode, and monochrome X servers. + * Ed Mackey, emackey@netaxs.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. + */ + +/*- + * 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 "*delay: 1000 \n" \ + "*cycles: 2 \n" \ + "*wireframe: False \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_cage + +ModeSpecOpt gears_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct gears_description = +{"gears", "init_gears", "draw_gears", "release_gears", + "draw_gears", "init_gears", NULL, &gears_opts, + 1000, 1, 2, 1, 4, 1.0, "", + "Shows GL's gears", 0, NULL}; + +#endif + +typedef struct { + GLfloat view_rotx, view_roty, view_rotz; + GLuint gear1, gear2, gear3; + GLfloat angle; + GLXContext *glx_context; + Window window; +#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_IS_WIREFRAME(mi); + + 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}; + static GLfloat gray[4] = + {0.5, 0.5, 0.5, 1.0}; + static GLfloat white[4] = + {1.0, 1.0, 1.0, 1.0}; + int wire = MI_IS_WIREFRAME(mi); + int mono = MI_IS_MONO(mi); + + 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_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) { + if (mono) + glColor4fv(white); + else + glColor4fv(red); + } else { + if (mono) + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray); + else + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + } + gear(1.0, 4.0, 1.0, 20, 0.7, wire); + glEndList(); + + gp->gear2 = glGenLists(1); + glNewList(gp->gear2, GL_COMPILE); + if (wire) { + if (mono) + glColor4fv(white); + else + glColor4fv(green); + } else { + if (mono) + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray); + else + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + } + gear(0.5, 2.0, 2.0, 10, 0.7, wire); + glEndList(); + + gp->gear3 = glGenLists(1); + glNewList(gp->gear3, GL_COMPILE); + if (wire) { + if (mono) + glColor4fv(white); + else + glColor4fv(blue); + } else { + if (mono) + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray); + else + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + } + gear(1.3, 2.0, 0.5, 10, 0.7, wire); + glEndList(); + if (!wire) + glEnable(GL_NORMALIZE); +} + +void +init_gears(ModeInfo * mi) +{ + 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]; + + gp->window = MI_WINDOW(mi); + gp->view_rotx = NRAND(360); + gp->view_roty = NRAND(360); + gp->view_rotz = NRAND(360); + gp->angle = NRAND(360); + + if ((gp->glx_context = init_GL(mi)) != NULL) { + reshape(MI_WIDTH(mi), MI_HEIGHT(mi)); + pinit(mi); + } else { + MI_CLEARWINDOW(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_COUNT(mi) ? MI_COUNT(mi) : 1; + + MI_IS_DRAWN(mi) = True; + + if (!gp->glx_context) + return; + + 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]; + + if (gp->glx_context) { + /* Display lists MUST be freed while their glXContext is current. */ + glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(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); + + } + } + (void) free((void *) gears); + gears = NULL; + } + FreeAllGL(mi); +} + + +/*********************************************************/ + +#endif diff --git a/modes/glx/i_evert.h b/modes/glx/i_evert.h new file mode 100644 index 00000000..2490ea1b --- /dev/null +++ b/modes/glx/i_evert.h @@ -0,0 +1,8 @@ +#include +#include + +extern double scale; +extern double width; +extern int sphere; +extern int torscene; +extern double corrstart, pushstart, twiststart, untwiststart, uncorrstart; diff --git a/modes/glx/i_figure8.cc b/modes/glx/i_figure8.cc new file mode 100644 index 00000000..60359f38 --- /dev/null +++ b/modes/glx/i_figure8.cc @@ -0,0 +1,34 @@ +#include "figureeight.h" + +extern n_strips; + +TwoJetVec FigureEight( + TwoJetVec w, TwoJetVec h, TwoJetVec bend, TwoJet form, TwoJet v +) { + TwoJet height; + v %= 1; + height = (Cos (v*2) + -1) * (-1); + if (v > 0.25 && v < 0.75) + height = height*-1 + 4; + height = height*0.6; + h = h + bend*(height*height*(1/64.)); + return + w*Sin (v*2) + (h) * (Interpolate((Cos (v) + -1) * (-2), height, form)) + ; +} + +TwoJetVec AddFigureEight(ThreeJetVec p, ThreeJet u, TwoJet v, ThreeJet form, ThreeJet scale) +{ + ThreeJet size = form*scale; + form = form*2 + form*form*-1; + TwoJetVec dv = AnnihilateVec(D(p, 1), 1); + p = AnnihilateVec(p, 1); + TwoJetVec du = Normalize(D(p, 0)); + TwoJetVec h = Normalize(Cross(du, dv))*TwoJet(size); + TwoJetVec w = Normalize(Cross(h, du))*(TwoJet(size)*1.1); + return RotateZ( + TwoJetVec(p) + + FigureEight(w, h, du*D(size, 0)*(D(u, 0)^(-1)), form, v), + v*(1./n_strips) + ); +} diff --git a/modes/glx/i_figure8.h b/modes/glx/i_figure8.h new file mode 100644 index 00000000..7eba58fd --- /dev/null +++ b/modes/glx/i_figure8.h @@ -0,0 +1,14 @@ +#ifndef __FIGUREEIGHT +#define __FIGUREEIGHT +#include "threejetvec.h" +#include "twojetvec.h" + +#define N_STRIPS 8 + +TwoJetVec FigureEight( + TwoJetVec w, TwoJetVec h, TwoJetVec bend, + TwoJet form, TwoJet v +); +TwoJetVec AddFigureEight(ThreeJetVec p, ThreeJet u, TwoJet v, ThreeJet form, ThreeJet scale); + +#endif diff --git a/modes/glx/i_figureeight.cc b/modes/glx/i_figureeight.cc new file mode 100644 index 00000000..b3b79de2 --- /dev/null +++ b/modes/glx/i_figureeight.cc @@ -0,0 +1,34 @@ +#include "i_figureeight.h" + +extern n_strips; + +TwoJetVec FigureEight( + TwoJetVec w, TwoJetVec h, TwoJetVec bend, TwoJet form, TwoJet v +) { + TwoJet height; + v %= 1; + height = (Cos (v*2) + -1) * (-1); + if (v > 0.25 && v < 0.75) + height = height*-1 + 4; + height = height*0.6; + h = h + bend*(height*height*(1/64.)); + return + w*Sin (v*2) + (h) * (Interpolate((Cos (v) + -1) * (-2), height, form)) + ; +} + +TwoJetVec AddFigureEight(ThreeJetVec p, ThreeJet u, TwoJet v, ThreeJet form, ThreeJet scale) +{ + ThreeJet size = form*scale; + form = form*2 + form*form*-1; + TwoJetVec dv = AnnihilateVec(D(p, 1), 1); + p = AnnihilateVec(p, 1); + TwoJetVec du = Normalize(D(p, 0)); + TwoJetVec h = Normalize(Cross(du, dv))*TwoJet(size); + TwoJetVec w = Normalize(Cross(h, du))*(TwoJet(size)*1.1); + return RotateZ( + TwoJetVec(p) + + FigureEight(w, h, du*D(size, 0)*(D(u, 0)^(-1)), form, v), + v*(1./n_strips) + ); +} diff --git a/modes/glx/i_figureeight.h b/modes/glx/i_figureeight.h new file mode 100644 index 00000000..6079e771 --- /dev/null +++ b/modes/glx/i_figureeight.h @@ -0,0 +1,14 @@ +#ifndef __FIGUREEIGHT +#define __FIGUREEIGHT +#include "i_threejetvec.h" +#include "i_twojetvec.h" + +#define N_STRIPS 8 + +TwoJetVec FigureEight( + TwoJetVec w, TwoJetVec h, TwoJetVec bend, + TwoJet form, TwoJet v +); +TwoJetVec AddFigureEight(ThreeJetVec p, ThreeJet u, TwoJet v, ThreeJet form, ThreeJet scale); + +#endif diff --git a/modes/glx/i_linkage.cc b/modes/glx/i_linkage.cc new file mode 100644 index 00000000..9bff4651 --- /dev/null +++ b/modes/glx/i_linkage.cc @@ -0,0 +1,115 @@ +#include +#include "xlock.h" + +#include "i_linkage.h" +#include "i_threejetvec.h" +#include "i_figureeight.h" +#include "i_spline.h" +#include "i_sphere.h" + +char *parse_parts(char *parts); +#define PART_POS 0x1 +#define PART_NEG 0x2 + +double scale = M_PI; +int scene = 0; +int bezier = 0; +char *parts = NULL; +int n_strips = N_STRIPS; + +void +invert_draw(spherestruct * gp) +{ + double umin, vmin, umax, vmax; + double du, dv; + double time = 0.0; + double corrstart, pushstart, twiststart, unpushstart, uncorrstart; + double bendtime; + int binary = 0; + int j, k; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_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); + + /* default parameters */ + + corrstart = 0; + pushstart = .1; + twiststart = .23; + unpushstart = .6; + uncorrstart = .93; + + vmin = 0.0; + umin = 0.0; + vmax = 1.0; + umax = 1.0; + du = dv = 1./12.; + + /* Simple inversion fits our needs perfectly... */ + + du = 0.04; + dv = 0.04; + umax = 2.0; + parts = "+0+1+2+3+4+5+6+7"; + time = (cos((M_PI*gp->time)/gp->numsteps)+1.0)/2.0; + binary = 0; + + /* draw it here */ + + if (gp->partlist == NULL) + gp->partlist = parse_parts(parts); + + /* Need to compute */ + + if (gp->construction) { + glNewList(gp->frames+gp->time, GL_COMPILE); + + if (time >= uncorrstart && uncorrstart >= 0) + printScene(UnCorrugate, umin, umax, du, vmin, vmax, dv, + (time - uncorrstart) / (1.0 - uncorrstart), binary); + else if (time >= unpushstart && unpushstart >= 0) + printScene(UnPush, umin, umax, du, vmin, vmax, dv, + (time - unpushstart) / + (((uncorrstart < 0) ? 1.0 : uncorrstart) - unpushstart), binary); + else if (time >= twiststart && twiststart >= 0) + printScene(Twist, umin, umax, du, vmin, vmax, dv, + (time - twiststart) / + (((unpushstart < 0) ? 1.0 : unpushstart) - twiststart), binary); + else if (time >= pushstart && pushstart >= 0) + printScene(PushThrough, umin, umax, du, vmin, vmax, dv, + (time - pushstart) / + (((twiststart < 0) ? 1.0 : twiststart) - pushstart), binary); + else if (time >= corrstart && corrstart >= 0) + printScene(Corrugate, umin, umax, du, vmin, vmax, dv, + (time - corrstart) / + (((pushstart < 0) ? 1.0 : pushstart) - corrstart), binary); + glEndList(); + } + + for(j = -1; j <= 1; j += 2) { + for(k = 0; k < n_strips; k++) { + if(gp->partlist[k] & (j<0 ? PART_NEG : PART_POS)) { + double t = 2*M_PI * (j < 0 ? n_strips-1-k : k) / n_strips; + double s = sin(t), c = cos(t); + + GLdouble m[16]; + m[0] = j*c; m[4] = -s; m[8] = 0; m[12] = 0; + m[1] = j*s; m[5] = c; m[9] = 0, m[13] = 0; + m[2] = 0; m[6] = 0; m[10] = j; m[14] = 0; + m[3] = 0; m[7] = 0; m[11] = 0; m[15] = 1; + + glPushMatrix(); + glMultMatrixd(m); + glCallList(gp->frames+gp->time); + glPopMatrix(); + } + } + } + + glPopMatrix(); +} + diff --git a/modes/glx/i_linkage.h b/modes/glx/i_linkage.h new file mode 100644 index 00000000..788bcb3b --- /dev/null +++ b/modes/glx/i_linkage.h @@ -0,0 +1,22 @@ +#include +#include + +typedef struct { + GLfloat view_rotx, view_roty, view_rotz; + GLXContext *glx_context; + GLuint frames; + int numsteps; + int construction; + int time; + char *partlist; + int forwards; +} spherestruct; + + +#ifdef __cplusplus +extern "C" { +#endif + void invert_draw(spherestruct *gp); +#ifdef __cplusplus +} +#endif diff --git a/modes/glx/i_sphere.cc b/modes/glx/i_sphere.cc new file mode 100644 index 00000000..09d24e9d --- /dev/null +++ b/modes/glx/i_sphere.cc @@ -0,0 +1,155 @@ +#include "i_threejetvec.h" +#include "i_figureeight.h" +#include "i_spline.h" +#include "i_sphere.h" + +ThreeJetVec Arc(ThreeJet u, ThreeJet v, double xsize, double ysize, double zsize) { + ThreeJetVec result; + u = u*0.25; + result.x = Sin (u) * Sin (v) * xsize; + result.y = Sin (u) * Cos (v) * ysize; + result.z = Cos (u) * zsize; + return result; +} + +ThreeJetVec Straight(ThreeJet u, ThreeJet v, double xsize, double ysize, double zsize) { + ThreeJetVec result; + u = u*0.25; +#if 0 + u = (u) * (-0.15915494) + 1; /* 1/2pi */ +#endif + result.x = Sin (v) * xsize; + result.y = Cos (v) * ysize; + result.z = Cos (u) * zsize; + return result; +} + +ThreeJet Param1(ThreeJet x) { + double offset = 0; + x %= 4; + if (x > 2) { x = x+(-2); offset = 2; } + if (x <= 1) return x*2 + (x^2)*(-1) + offset; + else return (x^2) + x*(-2) + (2 + offset); +} + +ThreeJet Param2(ThreeJet x) { + double offset = 0; + x %= 4; + if (x > 2) { x = x+(-2); offset = 2; } + if (x <= 1) return (x^2) + offset; + else return (x^2)*(-1) + x*4 + (-2 + offset); +} + +static inline ThreeJet TInterp(double x) { + return ThreeJet(x,0,0); +} + +ThreeJet UInterp(ThreeJet x) { + x %= 2; + if (x > 1) + x = x*(-1) + 2; + return (x^2)*3 + (x^3) * (-2); +} + +#define FFPOW 3 +ThreeJet FFInterp(ThreeJet x) { + x %= 2; + if (x > 1) + x = x*(-1) + 2; + x = x*1.06 + -0.05; + if (x < 0) return ThreeJet(0, 0, 0); + else if (x > 1) return ThreeJet(0, 0, 0) + 1; + else return (x ^ (FFPOW-1)) * (FFPOW) + (x^FFPOW) * (-FFPOW+1); +} + +#define FSPOW 3 +ThreeJet FSInterp(ThreeJet x) { + x %= 2; + if (x > 1) + x = x*(-1) + 2; + return ((x ^ (FSPOW-1)) * (FSPOW) + (x^FSPOW) * (-FSPOW+1)) * (-0.2); +} + +ThreeJetVec Stage0(ThreeJet u, ThreeJet v) { + return Straight(u, v, 1, 1, 1); +} + +ThreeJetVec Stage1(ThreeJet u, ThreeJet v) { + return Arc(u, v, 1, 1, 1); +} + +ThreeJetVec Stage2(ThreeJet u, ThreeJet v) { + return InterpolateVec( + Arc(Param1(u), v, 0.9, 0.9, -1), + Arc(Param2(u), v, 1, 1, 0.5), + UInterp(u)); +} + +ThreeJetVec Stage3(ThreeJet u, ThreeJet v) { + return InterpolateVec( + Arc(Param1(u), v,-0.9,-0.9,-1), + Arc(Param2(u), v,-1, 1,-0.5), + UInterp(u)); +} + +ThreeJetVec Stage4(ThreeJet u, ThreeJet v) { + return Arc(u, v, -1,-1, -1); +} + +ThreeJetVec Scene01(ThreeJet u, ThreeJet v, double t) { + return InterpolateVec(Stage0(u,v), Stage1(u,v), TInterp(t)); +} + +ThreeJetVec Scene12(ThreeJet u, ThreeJet v, double t) { + return InterpolateVec(Stage1(u,v), Stage2(u,v), TInterp(t)); +} + +ThreeJetVec Scene23(ThreeJet u, ThreeJet v, double t) { + t = TInterp(t) * 0.5; + double tt = (u <= 1) ? t : -t; + return InterpolateVec( + RotateZ(Arc(Param1(u), v, 0.9, 0.9,-1), ThreeJet(tt,0,0)), + RotateY(Arc(Param2(u), v, 1, 1, 0.5), ThreeJet(t,0,0)), + UInterp(u) + ); +} + +ThreeJetVec Scene34(ThreeJet u, ThreeJet v, double t) { + return InterpolateVec(Stage3(u,v), Stage4(u,v), TInterp(t)); +} + +TwoJetVec BendIn(ThreeJet u, ThreeJet v, double t) { + t = TInterp(t); + return AddFigureEight( + Scene01(u, ThreeJet(0, 0, 1), t), + u, v, ThreeJet(0, 0, 0), FSInterp(u)); +} +TwoJetVec Corrugate(ThreeJet u, ThreeJet v, double t) { + t = TInterp(t); + return AddFigureEight( + Stage1(u, ThreeJet(0, 0, 1)), + u, v, FFInterp(u) * ThreeJet(t,0,0), FSInterp(u)); +} +TwoJetVec PushThrough(ThreeJet u, ThreeJet v, double t) { + return AddFigureEight( + Scene12(u,ThreeJet(0, 0, 1),t), + u, v, FFInterp(u), FSInterp(u)); +} +TwoJetVec Twist(ThreeJet u, ThreeJet v, double t) { + return AddFigureEight( + Scene23(u,ThreeJet(0, 0, 1),t), + u, v, FFInterp(u), FSInterp(u)); +} + +TwoJetVec UnPush(ThreeJet u, ThreeJet v, double t) { + return AddFigureEight( + Scene34(u,ThreeJet(0, 0, 1),t), + u, v, FFInterp(u), FSInterp(u)); +} + +TwoJetVec UnCorrugate(ThreeJet u, ThreeJet v, double t) { + t = TInterp((t) * (-1) + 1); + return AddFigureEight( + Stage4(u,ThreeJet(0, 0, 1)), + u, v, FFInterp(u) * ThreeJet(t,0,0), FSInterp(u)); +} diff --git a/modes/glx/i_sphere.h b/modes/glx/i_sphere.h new file mode 100644 index 00000000..804076f4 --- /dev/null +++ b/modes/glx/i_sphere.h @@ -0,0 +1,8 @@ +#include "i_twojetvec.h" +#include "i_threejetvec.h" +TwoJetVec Corrugate(ThreeJet u, ThreeJet v, double t); +TwoJetVec PushThrough(ThreeJet u, ThreeJet v, double t); +TwoJetVec Twist(ThreeJet u, ThreeJet v, double t); +TwoJetVec UnPush(ThreeJet u, ThreeJet v, double t); +TwoJetVec UnCorrugate(ThreeJet u, ThreeJet v, double t); +TwoJetVec BendIn(ThreeJet u, ThreeJet v, double t); diff --git a/modes/glx/i_spline.cc b/modes/glx/i_spline.cc new file mode 100644 index 00000000..dcc62033 --- /dev/null +++ b/modes/glx/i_spline.cc @@ -0,0 +1,308 @@ +#define XLOCK 1 +#ifdef XLOCK +#include "xlock.h" +#endif + +#include "i_spline.h" +#include "i_evert.h" +extern "C" { +#include +} + +extern int bezier; +extern char *parts; +extern int n_strips; + +void print_point (FILE *fp, TwoJetVec p, double ps, double pus, double pvs, double puvs, int binary) +{ + if(bezier) { + float xyz[3]; + xyz[0] = double(p.x)*ps + p.x.df_du()*pus/3. + p.x.df_dv()*pvs/3. + + p.x.d2f_dudv()*puvs/9.; + xyz[1] = double(p.y)*ps + p.y.df_du()*pus/3. + p.y.df_dv()*pvs/3. + + p.y.d2f_dudv()*puvs/9.; + xyz[2] = double(p.z)*ps + p.z.df_du()*pus/3. + p.z.df_dv()*pvs/3. + + p.z.d2f_dudv()*puvs/9.; + if (binary) { + fwrite(&xyz, sizeof(float), 3, fp); + } else { + fprintf(fp, "%g %g %g\n", xyz[0], xyz[1], xyz[2]); + } + } + else{ + double x= double(p.x)*ps ; + double y= double(p.y)*ps ; + double z= double(p.z)*ps ; + double nx= p.y.df_du()*p.z.df_dv()-p.z.df_du()*p.y.df_dv(); + double ny= p.z.df_du()*p.x.df_dv()-p.x.df_du()*p.z.df_dv(); + double nz= p.x.df_du()*p.y.df_dv()-p.y.df_du()*p.x.df_dv(); + double s = nx*nx + ny*ny + nz*nz; + if(s > 0) s = sqrt(1/s); + fprintf(fp, "%f %f %f %f %f %f\n", x, y, z, nx*s, ny*s, nz*s); + } +} + +void printMesh(FILE *fp, TwoJetVec p, int binary) +{ + double x= double(p.x) ; + double y= double(p.y) ; + double z= double(p.z) ; + double nx= p.y.df_du()*p.z.df_dv()-p.z.df_du()*p.y.df_dv(); + double ny= p.z.df_du()*p.x.df_dv()-p.x.df_du()*p.z.df_dv(); + double nz= p.x.df_du()*p.y.df_dv()-p.y.df_du()*p.x.df_dv(); + double s = nx*nx + ny*ny + nz*nz; + if(s > 0) s = sqrt(1/s); +#ifdef XLOCK + glNormal3d(nx*s, ny*s, nz*s); + glVertex3d(x, y, z); +#else + fprintf(fp, "%f %f %f %f %f %f\n", x, y, z, nx*s, ny*s, nz*s); +#endif +} + +void printSpline(FILE *fp, TwoJetVec v00, TwoJetVec v01, + TwoJetVec v10, TwoJetVec v11, + double us, double vs, + double s0, double s1, double t0, double t1, int binary) { + if (bezier) { + print_point(fp, v00, 1, 0, 0, 0, binary); + print_point(fp, v00, 1, us, 0, 0, binary); + print_point(fp, v10, 1,-us, 0, 0, binary); + print_point(fp, v10, 1, 0, 0, 0, binary); + + print_point(fp, v00, 1, 0, vs, 0, binary); + print_point(fp, v00, 1, us, vs, us*vs, binary); + print_point(fp, v10, 1,-us, vs,-us*vs, binary); + print_point(fp, v10, 1, 0, vs, 0, binary); + + print_point(fp, v01, 1, 0,-vs, 0, binary); + print_point(fp, v01, 1, us,-vs,-us*vs, binary); + print_point(fp, v11, 1,-us,-vs, us*vs, binary); + print_point(fp, v11, 1, 0,-vs, 0, binary); + + print_point(fp, v01, 1, 0, 0, 0, binary); + print_point(fp, v01, 1, us, 0, 0, binary); + print_point(fp, v11, 1,-us, 0, 0, binary); + print_point(fp, v11, 1, 0, 0, 0, binary); + + if (binary) { + float sts[8] = {s0,t0, s1,t0, s0,t1, s1,t1}; + fwrite(&sts, sizeof(float), 8, fp); + } else { + fprintf(fp, "%g %g %g %g %g %g %g %g\n\n", + s0,t0, s1,t0, s0,t1, s1,t1); + } + } + else { + print_point(fp, v00, 1, us, vs, us*vs, binary); + print_point(fp, v10, 1, us, vs, us*vs, binary); + print_point(fp, v11, 1, us, vs, us*vs, binary); + print_point(fp, v01, 1, us, vs, us*vs, binary); + if(!binary) + fputc('\n', fp); + } +} + +static inline double sqr(double x) { + return x*x; +} +static inline double calcSpeedV(TwoJetVec v) { + return sqrt(sqr(v.x.df_dv()) + sqr(v.y.df_dv()) + sqr(v.z.df_dv())); +} +static inline double calcSpeedU(TwoJetVec v) { + return sqrt(sqr(v.x.df_du()) + sqr(v.y.df_du()) + sqr(v.z.df_du())); +} + +#define PART_POS 0x1 +#define PART_NEG 0x2 + +char *parse_parts(char *parts) +{ + /* Construct matrices to replicate standard unit (u=0..1, v=0..1) into + * complete sphere. + */ + char *partlist = (char *)calloc(n_strips, sizeof(char)); + char *cp, *ncp, sign; + int bits, j; + + for(cp = parts; *cp; ) { + while((sign = *cp++) == ' ' || sign == ',') + ; + if(sign == '+') + bits = PART_POS; + else if(sign == '-') + bits = PART_NEG; + else { + bits = PART_POS|PART_NEG; + cp--; + } + if(*cp == '*') { + for(j = 0; j < n_strips; j++) + partlist[j] |= bits; + cp++; + } else { + j = strtol(cp, &ncp, 0); + if(cp == ncp) { + fprintf(stderr, +"evert -parts: expected string with alternating signs and strip numbers\n"); + return NULL; + } + if(j < 0 || j >= n_strips) { + fprintf(stderr, +"evert -parts: bad strip number %d; must be in range 0..%d\n", j, n_strips-1); + return NULL; + } + partlist[j] |= bits; + cp = ncp; + } + } + return partlist; +} + +void printScene( + SurfaceTimeFunction *func, + double umin, double umax, double adu, + double vmin, double vmax, double adv, + double t, int binary + ) + +{ + static TwoJetVec **values; + int j, k; + int jmax = (int) (fabs(umax-umin)/adu+.5); + int kmax = (int) (fabs(vmax-vmin)/adv+.5); + double u, v, du, dv; + FILE *fp = stdout; + + if(jmax == 0) jmax = 1; + du = (umax-umin) / jmax; + if(kmax == 0) kmax = 1; + dv = (vmax-vmin) / kmax; + values = (TwoJetVec **) calloc(jmax+1, sizeof(TwoJetVec *)); + double *speedv = (double *) calloc(jmax+1, sizeof(double)); + double **speedu = (double **) calloc(jmax+1, sizeof(double *)); + for (j = 0; j <= jmax; j++) { + u = umin + j*du; + values[j] = (TwoJetVec *) calloc(kmax+1, sizeof(TwoJetVec)); + speedu[j] = (double *) calloc(kmax+1, sizeof(double)); + speedv[j] = calcSpeedV((*func)(ThreeJet(u, 1, 0), ThreeJet(0, 0, 1), t)); + if(speedv[j] == 0) { + /* Perturb a bit, hoping to avoid degeneracy */ + u += (u<1) ? 1e-9 : -1e-9; + speedv[j] = calcSpeedV((*func)(ThreeJet(u, 1, 0), ThreeJet(0, 0, 1), t)); + } + for (k = 0; k <= kmax; k++) { + v = vmin + k*dv; + values[j][k] = (*func)( + ThreeJet(u, 1, 0), + ThreeJet(v, 0, 1), + t + ); + speedu[j][k] = calcSpeedU(values[j][k]); + } + } +/* + fprintf(fp, "Declare \"speeds\" \"varying float\"\n"); + fprintf(fp, "Declare \"speedt\" \"varying float\"\n"); +*/ +#ifndef XLOCK + if(parts != NULL) { + /* Construct matrices to replicate standard unit (u=0..1, v=0..1) into + * complete sphere. + */ + char *partlist = parse_parts(parts); + + if(partlist == NULL) + return; + + fprintf(fp, "{ INST transforms { TLIST\n"); + for(j = -1; j <= 1; j += 2) { + for(k = 0; k < n_strips; k++) { + if(partlist[k] & (j<0 ? PART_NEG : PART_POS)) { + double t = 2*M_PI * (j < 0 ? n_strips-1-k : k) / n_strips; + double s = sin(t), c = cos(t); + + fprintf(fp, "# %c%d of %d\n", j<0 ? '-' : '+', k, n_strips); + fprintf(fp, "\t%10f %10f %10f %10f\n", j*c, -s, 0., 0.); + fprintf(fp, "\t%10f %10f %10f %10f\n", j*s, c, 0., 0.); + fprintf(fp, "\t%10f %10f %10f %10f\n", 0., 0., (double)j, 0.); + fprintf(fp, "\t%10f %10f %10f %10f\n", 0., 0., 0., 1.); + } + } + } + fprintf(fp, "}\ngeom "); + } +#endif + + if(bezier) { + fprintf(fp, "{ STBBP%s\n", binary ? " BINARY" : ""); + for (j = 0; j < jmax; j++) { + u = umin + j*du; + for (k = 0; k < kmax; k++) { + v = vmin + k*dv; + printSpline(fp, values[j][k], values[j][k+1], + values[j+1][k], values[j+1][k+1], + du, dv, + umin+j*du, umin+(j+1)*du, vmin+k*dv, vmin+(k+1)*dv, binary); + } + } + } + else { + int nu = kmax+1, nv = jmax+1; +#ifndef XLOCK + fprintf(fp, "{ NMESH%s\n", binary ? " BINARY" : ""); + + if(binary) { + fwrite(&nu, sizeof(int), 1, stdout); + fwrite(&nv, sizeof(int), 1, stdout); + } else { + fprintf(fp, "%d %d\n", nu, nv); + } +#endif + +#ifdef XLOCK + for(j = 1; j <= jmax; j++) { + glBegin(GL_QUAD_STRIP); + for(k = 0; k <= kmax; k++) { + printMesh(fp, values[j-1][k], binary); + printMesh(fp, values[j][k], binary); + } + glEnd(); +#else + for(j = 0; j <= jmax; j++) { + for(k = 0; k <= kmax; k++) + printMesh(fp, values[j][k], binary); + + if(!binary) + fputc('\n', fp); +#endif + + } + } + +#ifndef XLOCK + if(parts) + fprintf(fp, " }\n"); + fprintf(fp, "}\n"); +#endif + + for (j = 0; j <= jmax; j++) { + if (values[j] != NULL) { + (void) free((void *) values[j]); + values[j] = NULL; + } + if (speedu[j] != NULL) { + (void) free((void *) speedu[j]); + speedu[j] = NULL; + } + } + (void) free((void *) values); + (void) free((void *) speedu); + (void) free((void *) speedv); +} + +void impossible(char *msg) { + fprintf(stderr, "%s\n", msg); + exit(1); +} + diff --git a/modes/glx/i_spline.h b/modes/glx/i_spline.h new file mode 100644 index 00000000..c91ab8c5 --- /dev/null +++ b/modes/glx/i_spline.h @@ -0,0 +1,17 @@ +#ifndef __SPLINE +#define __SPLINE +#include "i_threejetvec.h" +#include "i_twojetvec.h" + +typedef TwoJetVec SurfaceTimeFunction(ThreeJet u, ThreeJet v, double t); + +void print_point (FILE *fp, TwoJetVec p, double ps, double pus, double pvs, double puvs); +void printSpline(FILE *fp, TwoJetVec v00, TwoJetVec v01, TwoJetVec v10, TwoJetVec v11, double us, double vs, double s0,double s1,double t0,double t1); +void printScene( + SurfaceTimeFunction *func, + double umin, double umax, double du, + double vmin, double vmax, double dv, + double t, int binary +); +void impossible(char *msg); +#endif diff --git a/modes/glx/i_threejet.cc b/modes/glx/i_threejet.cc new file mode 100644 index 00000000..586ca404 --- /dev/null +++ b/modes/glx/i_threejet.cc @@ -0,0 +1,140 @@ +#include "i_threejet.h" + +ThreeJet operator+(const ThreeJet x, const ThreeJet y) { + ThreeJet result; + result.f = x.f + y.f; + result.fu = x.fu + y.fu; + result.fv = x.fv + y.fv; + result.fuu = x.fuu + y.fuu; + result.fuv = x.fuv + y.fuv; + result.fvv = x.fvv + y.fvv; + result.fuuv = x.fuuv + y.fuuv; + result.fuvv = x.fuvv + y.fuvv; + return result; +} + +ThreeJet operator*(const ThreeJet x, const ThreeJet y) { + ThreeJet result; + result.f = x.f*y.f; + result.fu = x.f*y.fu + x.fu*y.f; + result.fv = x.f*y.fv + x.fv*y.f; + result.fuu = x.f*y.fuu + 2*x.fu*y.fu + x.fuu*y.f; + result.fuv = x.f*y.fuv + x.fu*y.fv + x.fv*y.fu + x.fuv*y.f; + result.fvv = x.f*y.fvv + 2*x.fv*y.fv + x.fvv*y.f; + result.fuuv = x.f*y.fuuv + 2*x.fu*y.fuv + x.fv*y.fuu + + 2*x.fuv*y.fu + x.fuu*y.fv + x.fuuv*y.f; + result.fuvv = x.f*y.fuvv + 2*x.fv*y.fuv + x.fu*y.fvv + + 2*x.fuv*y.fv + x.fvv*y.fu + x.fuvv*y.f; + return result; +} + +ThreeJet operator+(const ThreeJet x, double d) { + ThreeJet result; + result = x; + result.f += d; + return result; +} + +ThreeJet operator*(const ThreeJet x, double d) { + ThreeJet result; + result.f = d*x.f; + result.fu = d*x.fu; + result.fv = d*x.fv; + result.fuu = d*x.fuu; + result.fuv = d*x.fuv; + result.fvv = d*x.fvv; + result.fuuv = d*x.fuuv; + result.fuvv = d*x.fuvv; + return result; +} + +ThreeJet Sin(const ThreeJet x) { + ThreeJet result; + ThreeJet t = x*double(2*M_PI); + double s = sin(t.f); + double c = cos(t.f); + result.f = s; + result.fu = c*t.fu; + result.fv = c*t.fv; + result.fuu = c*t.fuu - s*t.fu*t.fu; + result.fuv = c*t.fuv - s*t.fu*t.fv; + result.fvv = c*t.fvv - s*t.fv*t.fv; + result.fuuv = c*t.fuuv - s*(2*t.fu*t.fuv + t.fv*t.fuu) - c*t.fu*t.fu*t.fv; + result.fuvv = c*t.fuvv - s*(2*t.fv*t.fuv + t.fu*t.fvv) - c*t.fu*t.fv*t.fv; + return result; +} + +ThreeJet Cos(const ThreeJet x) { + ThreeJet result; + ThreeJet t = x*double(2*M_PI); + double s = cos(t.f); + double c = -sin(t.f); + result.f = s; + result.fu = c*t.fu; + result.fv = c*t.fv; + result.fuu = c*t.fuu - s*t.fu*t.fu; + result.fuv = c*t.fuv - s*t.fu*t.fv; + result.fvv = c*t.fvv - s*t.fv*t.fv; + result.fuuv = c*t.fuuv - s*(2*t.fu*t.fuv + t.fv*t.fuu) - c*t.fu*t.fu*t.fv; + result.fuvv = c*t.fuvv - s*(2*t.fv*t.fuv + t.fu*t.fvv) - c*t.fu*t.fv*t.fv; + return result; +} + +ThreeJet operator^(const ThreeJet x, double n) { + double x0 = pow(x.f, n); + double x1 = (x.f == 0) ? 0 : n * x0/x.f; + double x2 = (x.f == 0) ? 0 : (n-1) * x1/x.f; + double x3 = (x.f == 0) ? 0 : (n-2) * x2/x.f; + ThreeJet result; + result.f = x0; + result.fu = x1*x.fu; + result.fv = x1*x.fv; + result.fuu = x1*x.fuu + x2*x.fu*x.fu; + result.fuv = x1*x.fuv + x2*x.fu*x.fv; + result.fvv = x1*x.fvv + x2*x.fv*x.fv; + result.fuuv = x1*x.fuuv + x2*(2*x.fu*x.fuv + x.fv*x.fuu) + x3*x.fu*x.fu*x.fv; + result.fuvv = x1*x.fuvv + x2*(2*x.fv*x.fuv + x.fu*x.fvv) + x3*x.fu*x.fv*x.fv; + return result; +} + +TwoJet D(const ThreeJet x, int index) { + TwoJet result; + if (index == 0) { + result.f = x.fu; + result.fu = x.fuu; + result.fv = x.fuv; + result.fuv = x.fuuv; + } else if (index == 1) { + result.f = x.fv; + result.fu = x.fuv; + result.fv = x.fvv; + result.fuv = x.fuvv; + } else { + result.f = result.fu = result.fv = + result.fuv = 0; + } + return result; +} + +ThreeJet Annihilate(const ThreeJet x, int index) { + ThreeJet result = ThreeJet(x.f,0,0); + if (index == 0) { + result.fv = x.fv; + result.fvv = x.fvv; + } else if (index == 1) { + result.fu = x.fu; + result.fuu = x.fuu; + } + return result; +} + +ThreeJet Interpolate(const ThreeJet v1, const ThreeJet v2, const ThreeJet weight) { + return (v1) * ((weight) * (-1) + 1) + v2*weight; +} + +void printJet(const ThreeJet v) { + printf("%f (%f %f)\n", + v.f, + v.fu, v.fv + ); +} diff --git a/modes/glx/i_threejet.h b/modes/glx/i_threejet.h new file mode 100644 index 00000000..59e4672b --- /dev/null +++ b/modes/glx/i_threejet.h @@ -0,0 +1,46 @@ +#ifndef __THREEJET +#define __THREEJET +#include "i_twojet.h" + +#define DIM 2 +class ThreeJet { + double f; + double fu, fv; + double fuu, fuv, fvv; + double fuuv, fuvv; + + ThreeJet(double d, double du, double dv, double duu, double duv, double dvv, + double duuv, double duvv) + { f = d; fu = du; fv = dv; fuu = duu; fuv = duv; fvv = dvv; + fuuv = duuv; fuvv = duvv; } + public: + ThreeJet() {} + ThreeJet(double d, double du, double dv) + { f = d; fu = du; fv = dv; fuu = fuv = fvv = fuuv = fuvv = 0;} + operator TwoJet() { return TwoJet(f, fu, fv, fuv); } + operator double() { return f; } + operator<(double d) { return f < d; } + operator<(int d) { return f < d; } + operator>(double d) { return f > d; } + operator>(int d) { return f > d; } + operator<=(double d) { return f <= d; } + operator<=(int d) { return f <= d; } + operator>=(double d) { return f >= d; } + void operator %=(double d) + { f = fmod(f, d); if (f < 0) f += d; } + friend ThreeJet operator+(const ThreeJet x, const ThreeJet y); + friend ThreeJet operator*(const ThreeJet x, const ThreeJet y); + friend ThreeJet operator+(const ThreeJet x, double d); + friend ThreeJet operator+(const ThreeJet x, int d) {return x+double(d);} + friend ThreeJet operator*(const ThreeJet x, double d); + friend ThreeJet operator*(const ThreeJet x, int d) {return x*double(d);} + friend ThreeJet Sin(const ThreeJet x); + friend ThreeJet Cos(const ThreeJet x); + friend ThreeJet operator^(const ThreeJet x, double n); + friend ThreeJet Annihilate(const ThreeJet x, int index); + friend ThreeJet Interpolate(const ThreeJet v1, const ThreeJet v2, const ThreeJet weight); + friend void printJet(const ThreeJet); + friend class TwoJet D(const class ThreeJet x, int index); +}; + +#endif diff --git a/modes/glx/i_threejetvec.cc b/modes/glx/i_threejetvec.cc new file mode 100644 index 00000000..9cfcf351 --- /dev/null +++ b/modes/glx/i_threejetvec.cc @@ -0,0 +1,104 @@ +#include "i_threejetvec.h" +ThreeJetVec operator+(ThreeJetVec v, ThreeJetVec w) { + ThreeJetVec result; + result.x = v.x + w.x; + result.y = v.y + w.y; + result.z = v.z + w.z; + return result; +} + +ThreeJetVec operator*(ThreeJetVec v, ThreeJet a) { + ThreeJetVec result; + result.x = v.x*a; + result.y = v.y*a; + result.z = v.z*a; + return result; +} + +ThreeJetVec operator*(ThreeJetVec v, double a) { + ThreeJetVec result; + result.x = v.x*a; + result.y = v.y*a; + result.z = v.z*a; + return result; +} + +ThreeJetVec AnnihilateVec(ThreeJetVec v, int index) { + ThreeJetVec result; + result.x = Annihilate(v.x, index); + result.y = Annihilate(v.y, index); + result.z = Annihilate(v.z, index); + return result; +} + +TwoJetVec D(ThreeJetVec x, int index) { + TwoJetVec result; + result.x = D(x.x, index); + result.y = D(x.y, index); + result.z = D(x.z, index); + return result; +} + +ThreeJetVec Cross(ThreeJetVec v, ThreeJetVec w) { + ThreeJetVec result; + result.x = v.y*w.z + v.z*w.y*-1; + result.y = v.z*w.x + v.x*w.z*-1; + result.z = v.x*w.y + v.y*w.x*-1; + return result; +} + +ThreeJet Dot(ThreeJetVec v, ThreeJetVec w) { + return v.x*w.x + v.y*w.y + v.z*w.z; +} + +ThreeJetVec Normalize(ThreeJetVec v) { + ThreeJet a; + a = Dot(v,v); + if (a > 0) + a = a^-0.5; + else + a = ThreeJet(0, 0, 0); + return v*a; +} + +ThreeJetVec RotateZ(ThreeJetVec v, ThreeJet angle) { + ThreeJetVec result; + ThreeJet s,c; + s = Sin (angle); + c = Cos (angle); + result.x = v.x*c + v.y*s; + result.y = v.x*s*-1 + v.y*c; + result.z = v.z; + return result; +} + +ThreeJetVec RotateY(ThreeJetVec v, ThreeJet angle) { + ThreeJetVec result; + ThreeJet s, c; + s = Sin (angle); + c = Cos (angle); + result.x = v.x*c + v.z*s*-1; + result.y = v.y; + result.z = v.x*s + v.z*c ; + return result; +} + +ThreeJetVec RotateX(ThreeJetVec v, ThreeJet angle) { + ThreeJetVec result; + ThreeJet s,c; + s = Sin (angle); + c = Cos (angle); + result.x = v.x; + result.y = v.y*c + v.z*s; + result.z = v.y*s*-1 + v.z*c; + return result; +} + +ThreeJetVec InterpolateVec(ThreeJetVec v1, ThreeJetVec v2, ThreeJet weight) { + return (v1) * (weight*-1 + 1) + v2*weight; +} + +ThreeJet Length(ThreeJetVec v) +{ + return (v.x^2 + v.y^2) ^ (.5); +} diff --git a/modes/glx/i_threejetvec.h b/modes/glx/i_threejetvec.h new file mode 100644 index 00000000..a57bde12 --- /dev/null +++ b/modes/glx/i_threejetvec.h @@ -0,0 +1,25 @@ +#ifndef __THREEJETVEC +#define __THREEJETVEC +#include "i_threejet.h" +#include "i_twojetvec.h" +struct ThreeJetVec { + ThreeJet x; + ThreeJet y; + ThreeJet z; + operator TwoJetVec() { return TwoJetVec(x,y,z); } +}; + +ThreeJetVec operator+(ThreeJetVec v, ThreeJetVec w); +ThreeJetVec operator*(ThreeJetVec v, ThreeJet a); +ThreeJetVec operator*(ThreeJetVec v, double a); +ThreeJetVec AnnihilateVec(ThreeJetVec v, int index); +ThreeJetVec Cross(ThreeJetVec v, ThreeJetVec w); +ThreeJet Dot(ThreeJetVec v, ThreeJetVec w); +TwoJetVec D(ThreeJetVec x, int index); +ThreeJetVec Normalize(ThreeJetVec v); +ThreeJetVec RotateZ(ThreeJetVec v, ThreeJet angle); +ThreeJetVec RotateY(ThreeJetVec v, ThreeJet angle); +ThreeJetVec RotateX(ThreeJetVec v, ThreeJet angle); +ThreeJetVec InterpolateVec(ThreeJetVec v1, ThreeJetVec v2, ThreeJet weight); +ThreeJet Length(ThreeJetVec v); +#endif diff --git a/modes/glx/i_twojet.cc b/modes/glx/i_twojet.cc new file mode 100644 index 00000000..c11bda89 --- /dev/null +++ b/modes/glx/i_twojet.cc @@ -0,0 +1,58 @@ +#include "i_twojet.h" + +TwoJet operator+(const TwoJet x, const TwoJet y) { + return TwoJet(x.f+y.f, x.fu+y.fu, x.fv+y.fv, x.fuv + y.fuv); +} + +TwoJet operator*(const TwoJet x, const TwoJet y) { + return TwoJet( + x.f*y.f, + x.f*y.fu + x.fu*y.f, + x.f*y.fv + x.fv*y.f, + x.f*y.fuv + x.fu*y.fv + x.fv*y.fu + x.fuv*y.f + ); +} + +TwoJet operator+(const TwoJet x, double d) { + return TwoJet( x.f + d, x.fu, x.fv, x.fuv); +} + +TwoJet operator*(const TwoJet x, double d) { + return TwoJet( d*x.f, d*x.fu, d*x.fv, d*x.fuv); +} + +TwoJet Sin(const TwoJet x) { + TwoJet t = x*double(2*M_PI); + double s = sin(t.f); + double c = cos(t.f); + return TwoJet(s, c*t.fu, c*t.fv, c*t.fuv - s*t.fu*t.fv); +} + +TwoJet Cos(const TwoJet x) { + TwoJet t = x*double(2*M_PI); + double s = cos(t.f); + double c = -sin(t.f); + return TwoJet(s, c*t.fu, c*t.fv, c*t.fuv - s*t.fu*t.fv); +} + +TwoJet operator^(const TwoJet x, double n) { + double x0 = pow(x.f, n); + double x1 = (x.f == 0) ? 0 : n * x0/x.f; + double x2 = (x.f == 0) ? 0 : (n-1)*x1/x.f; + return TwoJet(x0, x1*x.fu, x1*x.fv, x1*x.fuv + x2*x.fu*x.fv); +} + +TwoJet Annihilate(const TwoJet x, int index) { + return TwoJet(x.f, index == 1 ? x.fu : 0, index == 0 ? x.fv : 0, 0); +} + +TwoJet Interpolate(const TwoJet v1, const TwoJet v2, const TwoJet weight) { + return (v1) * ((weight) * (-1) + 1) + v2*weight; +} + +void printJet(const TwoJet v) { + printf("%f (%f %f)\n", + v.f, + v.fu, v.fv + ); +} diff --git a/modes/glx/i_twojet.h b/modes/glx/i_twojet.h new file mode 100644 index 00000000..f2936c16 --- /dev/null +++ b/modes/glx/i_twojet.h @@ -0,0 +1,89 @@ +#ifndef __TWOJET +#define __TWOJET +#include +extern "C" { +#include +#include +} + +class ThreeJet; +class TwoJet D(const class ThreeJet x, int index); +class TwoJet { + public: /* this is a hack, but needed for now */ + double f; + double fu, fv; + double fuv; + + TwoJet() {} + TwoJet(double d, double du, double dv) + { f = d; fu = du; fv = dv; fuv = 0; } + TwoJet(double d, double du, double dv, double duv) + { f = d; fu = du; fv = dv; fuv = duv; } + operator double() { return f; } + operator<(double d) { return f < d; } + operator>(double d) { return f > d; } + operator>(int d) { return f > d; } + operator<=(double d) { return f <= d; } + operator>=(double d) { return f >= d; } + double df_du() { return fu; } + double df_dv() { return fv; } + double d2f_dudv() { return fuv; } + void operator +=(TwoJet x) + { f += x.f; fu += x.fu; fv += x.fv; fuv += x.fuv; } + void operator +=(double d) + { f += d; } + void operator *=(TwoJet x) + { + fuv = f*x.fuv + fu*x.fv + fv*x.fu + fuv*x.f; + fu = f*x.fu + fu*x.f; + fv = f*x.fv + fv*x.f; + f *= x.f; + } + void operator *=(double d) + { f *= d; fu *= d; fv *= d; fuv *= d; } + void operator %=(double d) + { f = fmod(f, d); if (f < 0) f += d; } + void operator ^=(double n) + { + if (f > 0) { + double x0 = pow(f, n); + double x1 = n * x0/f; + double x2 = (n-1)*x1/f; + fuv = x1*fuv + x2*fu*fv; + fu = x1*fu; + fv = x1*fv; + f = x0; + } + } + void Annihilate(int index) + { if (index == 0) fu = 0; + else if (index == 1) fv = 0; + fuv = 0; + } + void TakeSin() { + *this *= 2*M_PI; + double s = sin(f), c = cos(f); + f = s; fu = fu*c; fv = fv*c; fuv = c*fuv - s*fu*fv; + } + void TakeCos() { + *this *= 2*M_PI; + double s = cos(f), c = -sin(f); + f = s; fu = fu*c; fv = fv*c; fuv = c*fuv - s*fu*fv; + } + + friend TwoJet operator+(const TwoJet x, const TwoJet y); + friend TwoJet operator*(const TwoJet x, const TwoJet y); + friend TwoJet operator+(const TwoJet x, double d); + friend TwoJet operator+(const TwoJet x, int d) {return x+double(d);} + friend TwoJet operator*(const TwoJet x, double d); + friend TwoJet operator*(const TwoJet x, int d) {return x*double(d);} + friend TwoJet Sin(const TwoJet x); + friend TwoJet Cos(const TwoJet x); + friend TwoJet operator^(const TwoJet x, double n); + friend TwoJet Annihilate(const TwoJet x, int index); + friend TwoJet Interpolate(const TwoJet v1, const TwoJet v2, const TwoJet weight); + friend void printJet(const TwoJet); + friend class TwoJet D(const class ThreeJet x, int index); +}; + +#endif diff --git a/modes/glx/i_twojetvec.cc b/modes/glx/i_twojetvec.cc new file mode 100644 index 00000000..48e05b00 --- /dev/null +++ b/modes/glx/i_twojetvec.cc @@ -0,0 +1,96 @@ +#include "i_twojetvec.h" +TwoJetVec operator+(TwoJetVec v, TwoJetVec w) { + TwoJetVec result; + result.x = v.x + w.x; + result.y = v.y + w.y; + result.z = v.z + w.z; + return result; +} + +TwoJetVec operator*(TwoJetVec v, TwoJet a) { + TwoJetVec result; + result.x = v.x*a; + result.y = v.y*a; + result.z = v.z*a; + return result; +} + +TwoJetVec operator*(TwoJetVec v, double a) { + TwoJetVec result; + result.x = v.x*a; + result.y = v.y*a; + result.z = v.z*a; + return result; +} + +TwoJetVec AnnihilateVec(TwoJetVec v, int index) { + TwoJetVec result; + result.x = Annihilate(v.x, index); + result.y = Annihilate(v.y, index); + result.z = Annihilate(v.z, index); + return result; +} + +TwoJetVec Cross(TwoJetVec v, TwoJetVec w) { + TwoJetVec result; + result.x = v.y*w.z + v.z*w.y*-1; + result.y = v.z*w.x + v.x*w.z*-1; + result.z = v.x*w.y + v.y*w.x*-1; + return result; +} + +TwoJet Dot(TwoJetVec v, TwoJetVec w) { + return v.x*w.x + v.y*w.y + v.z*w.z; +} + +TwoJetVec Normalize(TwoJetVec v) { + TwoJet a; + a = Dot(v,v); + if (a > 0) + a = a^-0.5; + else + a = TwoJet(0, 0, 0); + return v*a; +} + +TwoJetVec RotateZ(TwoJetVec v, TwoJet angle) { + TwoJetVec result; + TwoJet s,c; + s = Sin (angle); + c = Cos (angle); + result.x = v.x*c + v.y*s; + result.y = v.x*s*-1 + v.y*c; + result.z = v.z; + return result; +} + +TwoJetVec RotateY(TwoJetVec v, TwoJet angle) { + TwoJetVec result; + TwoJet s, c; + s = Sin (angle); + c = Cos (angle); + result.x = v.x*c + v.z*s*-1; + result.y = v.y; + result.z = v.x*s + v.z*c ; + return result; +} + +TwoJetVec RotateX(TwoJetVec v, TwoJet angle) { + TwoJetVec result; + TwoJet s,c; + s = Sin (angle); + c = Cos (angle); + result.x = v.x; + result.y = v.y*c + v.z*s; + result.z = v.y*s*-1 + v.z*c; + return result; +} + +TwoJetVec InterpolateVec(TwoJetVec v1, TwoJetVec v2, TwoJet weight) { + return (v1) * (weight*-1 + 1) + v2*weight; +} + +TwoJet Length(TwoJetVec v) +{ + return (v.x^2 + v.y^2) ^ (.5); +} diff --git a/modes/glx/i_twojetvec.h b/modes/glx/i_twojetvec.h new file mode 100644 index 00000000..e578fa4a --- /dev/null +++ b/modes/glx/i_twojetvec.h @@ -0,0 +1,24 @@ +#ifndef __TWOJETVEC +#define __TWOJETVEC +#include "i_twojet.h" +struct TwoJetVec { + TwoJet x; + TwoJet y; + TwoJet z; + TwoJetVec() {} + TwoJetVec(TwoJet a, TwoJet b, TwoJet c) { x = a; y = b; z = c; } +}; + +TwoJetVec operator+(TwoJetVec v, TwoJetVec w); +TwoJetVec operator*(TwoJetVec v, TwoJet a); +TwoJetVec operator*(TwoJetVec v, double a); +TwoJetVec AnnihilateVec(TwoJetVec v, int index); +TwoJetVec Cross(TwoJetVec v, TwoJetVec w); +TwoJet Dot(TwoJetVec v, TwoJetVec w); +TwoJetVec Normalize(TwoJetVec v); +TwoJetVec RotateZ(TwoJetVec v, TwoJet angle); +TwoJetVec RotateY(TwoJetVec v, TwoJet angle); +TwoJetVec RotateX(TwoJetVec v, TwoJet angle); +TwoJetVec InterpolateVec(TwoJetVec v1, TwoJetVec v2, TwoJet weight); +TwoJet Length(TwoJetVec v); +#endif diff --git a/modes/glx/invert.c b/modes/glx/invert.c new file mode 100644 index 00000000..3059d2c7 --- /dev/null +++ b/modes/glx/invert.c @@ -0,0 +1,185 @@ +/*- + * invert.c - Sphere inversion + * + * See xlock.c for copying information. + * + * Revision History: + * + * Tim Rowley (code from the Geometry Center + * + * This is a sphere eversion of William P. Thurston which was the subject + * of the Geometry Center film "Outside In". The code is based on the + * software which was used to create the RIB files for the film. + * Trying to figure it out from the full eversion is difficult. If you get + * a chance to look at the original film, it leads up the eversion nicely. + * There is more information about the eversion, including the script from + * the film, at: http://www.geom.umn.edu/docs/outreach/oi/ + * + * Demonstration of turning a sphere inside out without creating + * any kinks (two surfaces can occupy the same space at the same time). + * + */ + +/*- + * 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 "xlock.h" +#include "vis.h" + +#ifdef MODE_invert + +#include "i_linkage.h" +#define STEPS 75 + +ModeSpecOpt invert_opts = +{0, NULL, 0, NULL, NULL}; + +static spherestruct *spheres = NULL; + +/* 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, -10.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) +{ +/* + GLfloat front_mat[] = {.8, .7, .4, 1.0}; + GLfloat back_mat[] = {.508, .333, .774, 1.0}; + */ + + GLfloat front_ambient[] = {.16, .14, .08, 1.0}; + GLfloat front_diffuse[] = {.56, .49, .28, 1.0}; + GLfloat front_specular[] = {1, 1, 0.8, 1.0}; + + GLfloat back_ambient[] = {.1016, .0666, .1548, 1.0}; + GLfloat back_diffuse[] = {.254, .166, .387, 1.0}; + GLfloat back_specular[] = {.4, .2, .5, 1.0}; + + /* spherestruct *gp = &spheres[MI_SCREEN(mi)]; */ + static GLfloat pos[4] = + {5.0, 5.0, 10.0, 0.0}; + + glLightfv(GL_LIGHT0, GL_POSITION, pos); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + glShadeModel(GL_SMOOTH); + + glMaterialfv(GL_FRONT, GL_AMBIENT, front_ambient); + glMaterialfv(GL_FRONT, GL_DIFFUSE, front_diffuse); + glMaterialfv(GL_FRONT, GL_SPECULAR, front_specular); + glMaterialf(GL_FRONT, GL_SHININESS, 32.0); + + glMaterialfv(GL_BACK, GL_AMBIENT, back_ambient); + glMaterialfv(GL_BACK, GL_DIFFUSE, back_diffuse); + glMaterialfv(GL_BACK, GL_SPECULAR, back_specular); + glMaterialf(GL_BACK, GL_SHININESS, 38.0); +} + +void +init_invert(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + + spherestruct *gp; + + if (spheres == NULL) { + if ((spheres = (spherestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (spherestruct))) == NULL) + return; + } + + gp = &spheres[screen]; + gp->time = 0; + gp->construction = 1; + gp->partlist = NULL; + gp->numsteps = STEPS; + gp->view_rotx = NRAND(360); + gp->view_roty = NRAND(360); + gp->view_rotz = NRAND(360); + gp->glx_context = init_GL(mi); + gp->frames = glGenLists(STEPS); + + reshape(MI_WIDTH(mi), MI_HEIGHT(mi)); + pinit(mi); +} + +void +draw_invert(ModeInfo * mi) +{ + spherestruct *gp = &spheres[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_COUNT(mi) ? MI_COUNT(mi) : 1; + + glDrawBuffer(GL_BACK); + + glXMakeCurrent(display, window, *(gp->glx_context)); + invert_draw(gp); + + /* let's do something so we don't get bored */ + if (gp->time == STEPS-1) + gp->construction = 0; + if (gp->time == STEPS-1) + gp->forwards = 0; + if (gp->time == 0) + gp->forwards = 1; + if (gp->forwards) + gp->time++; + else + gp->time--; + 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_invert(ModeInfo * mi) +{ + if (spheres != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + spherestruct *gp = &spheres[screen]; + + /* Display lists MUST be freed while their glXContext is current. */ + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context)); + + glDeleteLists(gp->frames, STEPS); + free(gp->partlist); + /* Don't destroy the glXContext. init_GL does that. */ + } + (void) free((void *) spheres); + spheres = NULL; + } +} + + +/*********************************************************/ + +#endif /* MODE_invert */ diff --git a/modes/glx/lament.c b/modes/glx/lament.c new file mode 100644 index 00000000..b6d02119 --- /dev/null +++ b/modes/glx/lament.c @@ -0,0 +1,2503 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* lament --- Shows Lemarchand's Box */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lament.c 4.12 98/09/15 xlockmore"; + +#endif + +/* xscreensaver, Copyright (c) 1998 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. + */ + +/* Animates Lemarchand's Box, the Lament Configuration. By jwz, 25-Jul-98. + + TODO: + + * The "gold" color isn't quite right; it looks more like "yellow" than + "gold" to me. + + * For some reason, the interior surfaces are shinier than the exterior + surfaces. I don't understand why, but this should be remedied. + + * Perhaps use a slightly-bumpy or oily texture for the interior surfaces? + + * Some of the edges don't line up perfectly (since the images are not + perfectly symetrical.) Something should be done about this; either + making the edges overlap slightly (instead of leaving gaps) or fixing + the images so that the edges may be symmetrical. + + * I want the gold leaf to seem to be raised up from the surface, but I + think this isn't possible with OpenGL. Supposedly, OpenGL only + supports Gouraud shading (interpolating edge normals from face normals, + and shading smoothly) but bump-maps only work with Phong shading + (computing a normal for each rendered pixel.) + + * As far as I can tell, OpenGL doesn't do shadows. As a result, the + forward-facing interior walls are drawn bright, not dark. If it was + casting shadows properly, it wouldn't matter so much that the edges + don't quite line up, because the lines would be black, and thus not + visible. But the edges don't match up, and so the bright interior + faces show through, and that sucks. + + But apparently there are tricky ways around this: + http://reality.sgi.com/opengl/tips/rts/ + I think these techniques require GLUT, however, which isn't + (currently) required by any other xscreensaver hacks. + + * There should be strange lighting effects playing across the surface: + electric sparks, or little glittery blobs of light. + http://reality.sgi.com/opengl/tips/lensflare/ might provide guidance. + + * Need to add some more modes, to effect the transition from the cube + shapes to the "spike" or "leviathan" shapes. I have extensive notes + on how these transformations occur, but unfortunately, due to camera + trickery, the transitions require dematerializations which do not + preserve object volume. But I suppose that's allowed, in + non-Euclidian or hyperdimensional spaces (since the extra mass could + simply be rotated along the axis to which one cannot point.) + + The other hard thing about this is that the "leviathan" shapes contain + a much larger number of facets, and I modelled this whole thing by + hand, since I don't have any 3d-object-editing tools that I know how + to use (or that look like they would take any less than several months + to become even marginally proficient with...) + + * Perhaps there should be a table top, on which it casts a shadow? + And then multiple light sources (for multiple shadows)? + + * Needs music. ("Hellraiser Themes" by Coil: TORSO CD161; also + duplicated on the "Unnatural History 2" compilation, WORLN M04699.) + + * I'm not totally happy with the spinning motion; I like the + acceleration and deceleration, but it often feels like it's going too + fast, or not naturally enough, or something. + + * However, the motion is better than that used by gears, superquadrics, + etc.; so maybe I should make them all share the same motion code. + */ + +#include + +#ifdef STANDALONE +#define PROGCLASS "Lament" +#define HACK_INIT init_lament +#define HACK_DRAW draw_lament +#define lament_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*wireframe: False \n" \ + "*texture: True \n" +#include "xlockmore.h" +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_lament + +#undef HAVE_XPM +#define HAVE_XPM +#undef countof +#define countof(x) ((int)(sizeof((x))/sizeof((*x)))) + +#define DEF_TEXTURE "True" + +static Bool do_texture; + +static XrmOptionDescRec opts[] = +{ + {"-texture", ".lament.texture", XrmoptionNoArg, (caddr_t) "on"}, + {"+texture", ".lament.texture", XrmoptionNoArg, (caddr_t) "off"}, +}; + +static argtype vars[] = +{ + {(caddr_t *) & do_texture, "texture", "Texture", DEF_TEXTURE, t_Bool}, +}; + +static OptionStruct desc[] = +{ + {"-/+texture", "turn on/off texturing"} +}; + +ModeSpecOpt lament_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + + +#if USE_XPMINC +#include +#else +#include /* Normal spot */ +#endif +#ifdef STANDALONE +#include "../images/lament.xpm" +#else +#include "pixmaps/lament.xpm" +#endif + + +#define RANDSIGN() ((LRAND() & 1) ? 1 : -1) +#define FLOATRAND(a) (((double)LRAND() / (double)MAXRAND) * a) + +typedef enum { + LAMENT_BOX, + + LAMENT_STAR_OUT, + LAMENT_STAR_ROT, + LAMENT_STAR_ROT_IN, + LAMENT_STAR_ROT_OUT, + LAMENT_STAR_UNROT, + LAMENT_STAR_IN, + + LAMENT_TETRA_UNE, + LAMENT_TETRA_USW, + LAMENT_TETRA_DWN, + LAMENT_TETRA_DSE, + + LAMENT_LID_OPEN, + LAMENT_LID_CLOSE, + LAMENT_LID_ZOOM, + + LAMENT_TASER_OUT, + LAMENT_TASER_SLIDE, + LAMENT_TASER_SLIDE_IN, + LAMENT_TASER_IN + +} lament_type; + +static GLfloat exterior_color[] = +{0.70, 0.60, 0.00, 1.00}; +static GLfloat interior_color[] = +{0.25, 0.25, 0.20, 1.00}; + + +typedef struct { + GLXContext *glx_context; + + GLuint box; /* display list IDs */ + GLuint star1, star2; + GLuint tetra_une, tetra_usw, tetra_dwn, tetra_dse, tetra_mid; + GLuint lid_0, lid_1, lid_2, lid_3, lid_4; + GLuint taser_base, taser_lifter, taser_slider; + + GLfloat rotx, roty, rotz; /* current object rotation */ + GLfloat dx, dy, dz; /* current rotational velocity */ + GLfloat ddx, ddy, ddz; /* current rotational acceleration */ + GLfloat d_max; /* max velocity */ + XImage *texture; /* image bits */ + GLuint texids[6]; /* texture map IDs */ + lament_type type; /* which mode of the object is current */ + + int anim_pause; /* countdown before animating again */ + GLfloat anim_r, anim_y, anim_z; /* relative position during anims */ + +} lament_configuration; + +static lament_configuration *lcs = NULL; + +#define FACE_N 3 +#define FACE_S 2 +#define FACE_E 0 +#define FACE_W 4 +#define FACE_U 5 +#define FACE_D 1 + +#ifdef HAVE_XPM +static Bool +bigendian(void) +{ + union { + int i; + char c[sizeof (int)]; + } u; + + u.i = 1; + return !u.c[0]; +} +#endif /* HAVE_XPM */ + + +static void +parse_image_data(ModeInfo * mi) +{ +#ifdef HAVE_XPM + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + + /* All we want to do is get RGB data out of the XPM file built in to this + program. This is a pain, because there is no way (as of XPM version + 4.6, at least) to get libXpm to make an XImage without also allocating + colors with XAllocColor. So, instead, we create an XpmImage and parse + out the RGB values of the pixels ourselves; and construct an XImage + by hand. Regardless of the depth of the visual we're using, this + XImage will have 32 bits per pixel, 8 each per R, G, and B. We put + 0xFF in the fourth slot, as GL will interpret that as "alpha". + */ + XpmImage xpm_image; + XpmInfo *xpm_info = NULL; + int result; + int x, y, i; + int bpl, wpl; + XColor colors[255]; + + result = XpmCreateXpmImageFromData(lament_faces, &xpm_image, xpm_info); + if (result != XpmSuccess) { + (void) fprintf(stderr, "unable to parse xpm data (%d).\n", result); + return; + } + lc->texture = XCreateImage(MI_DISPLAY(mi), MI_VISUAL(mi), 32, ZPixmap, 0, 0, + xpm_image.width, xpm_image.height, 32, 0); + + bpl = lc->texture->bytes_per_line; + wpl = bpl / 4; + + lc->texture->data = (char *) malloc(xpm_image.height * bpl); + + /* Parse the colors in the XPM into RGB values. */ + for (i = 0; i < xpm_image.ncolors; i++) + if (!XParseColor(MI_DISPLAY(mi), MI_COLORMAP(mi), + xpm_image.colorTable[i].c_color, + &colors[i])) { + (void) fprintf(stderr, "unparsable color: %s\n", + xpm_image.colorTable[i].c_color); + return; + } + /* Translate the XpmImage to an RGB XImage. */ + { + int rpos, gpos, bpos, apos; /* bitfield positions */ + + /* Note that unlike X, which is endianness-agnostic (since any XImage + can have its own specific bit ordering, with the server reversing + things as necessary) OpenGL pretends everything is client-side, so + we need to pack things in the right order for the client machine. + */ + if (bigendian()) + rpos = 24, gpos = 16, bpos = 8, apos = 0; + else + rpos = 0, gpos = 8, bpos = 16, apos = 24; + + for (y = 0; y < xpm_image.height; y++) { + int y2 = (xpm_image.height - 1 - y); /* Texture maps are upside down. */ + + unsigned int *oline = (unsigned int *) (lc->texture->data + (y * bpl)); + unsigned int *iline = (unsigned int *) (xpm_image.data + (y2 * wpl)); + + for (x = 0; x < xpm_image.width; x++) { + XColor *c = &colors[iline[x]]; + + /* pack it as RGBA */ + oline[x] = (((c->red >> 8) << rpos) | + ((c->green >> 8) << gpos) | + ((c->blue >> 8) << bpos) | + (0xFF << apos)); + } + } + } + + /* I sure hope these only free the contents, and not the args. */ + XpmFreeXpmImage(&xpm_image); + XpmFreeXpmInfo(xpm_info); + +#else /* !HAVE_XPM */ + (void) fprintf(stderr, "not compiled with XPM support.\n"); + return; +#endif /* !HAVE_XPM */ +} + + + +/* Computing normal vectors (thanks to Nat Friedman ) + */ + +typedef struct vector { + GLfloat x, y, z; +} vector; + +typedef struct plane { + vector p1, p2, p3; +} plane; + +static void +vector_set(vector * v, GLfloat x, GLfloat y, GLfloat z) +{ + v->x = x; + v->y = y; + v->z = z; +} + +static void +vector_cross(vector v1, vector v2, vector * v3) +{ + v3->x = (v1.y * v2.z) - (v1.z * v2.y); + v3->y = (v1.z * v2.x) - (v1.x * v2.z); + v3->z = (v1.x * v2.y) - (v1.y * v2.x); +} + +static void +vector_subtract(vector v1, vector v2, vector * res) +{ + res->x = v1.x - v2.x; + res->y = v1.y - v2.y; + res->z = v1.z - v2.z; +} + +static void +plane_normal(plane p, vector * n) +{ + vector v1, v2; + + vector_subtract(p.p1, p.p2, &v1); + vector_subtract(p.p1, p.p3, &v2); + vector_cross(v2, v1, n); +} + +static void +do_normal(GLfloat x1, GLfloat y1, GLfloat z1, + GLfloat x2, GLfloat y2, GLfloat z2, + GLfloat x3, GLfloat y3, GLfloat z3) +{ + plane plane; + vector n; + + vector_set(&plane.p1, x1, y1, z1); + vector_set(&plane.p2, x2, y2, z2); + vector_set(&plane.p3, x3, y3, z3); + plane_normal(plane, &n); + n.x = -n.x; + n.y = -n.y; + n.z = -n.z; + + glNormal3f(n.x, n.y, n.z); + +#ifdef DEBUG + /* Draw a line in the direction of this face's normal. */ + { + GLfloat ax = n.x > 0 ? n.x : -n.x; + GLfloat ay = n.y > 0 ? n.y : -n.y; + GLfloat az = n.z > 0 ? n.z : -n.z; + GLfloat mx = (x1 + x2 + x3) / 3; + GLfloat my = (y1 + y2 + y3) / 3; + GLfloat mz = (z1 + z2 + z3) / 3; + GLfloat xx, yy, zz; + + GLfloat max = ax > ay ? ax : ay; + + if (az > max) + max = az; + max *= 2; + xx = n.x / max; + yy = n.y / max; + zz = n.z / max; + + glBegin(GL_LINE_LOOP); + glVertex3f(mx, my, mz); + glVertex3f(mx + xx, my + yy, mz + zz); + glEnd(); + } +#endif /* DEBUG */ +} + + + +/* Shorthand utilities for making faces, with proper normals. + */ + +static void +face3(GLint texture, GLfloat * color, Bool wire, + GLfloat s1, GLfloat t1, GLfloat x1, GLfloat y1, GLfloat z1, + GLfloat s2, GLfloat t2, GLfloat x2, GLfloat y2, GLfloat z2, + GLfloat s3, GLfloat t3, GLfloat x3, GLfloat y3, GLfloat z3) +{ +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, texture); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color); + do_normal(x1, y1, z1, x2, y2, z2, x3, y3, z3); + glBegin(wire ? GL_LINE_LOOP : GL_TRIANGLES); + glTexCoord2f(s1, t1); + glVertex3f(x1, y1, z1); + glTexCoord2f(s2, t2); + glVertex3f(x2, y2, z2); + glTexCoord2f(s3, t3); + glVertex3f(x3, y3, z3); + glEnd(); +} + +static void +face4(GLint texture, GLfloat * color, Bool wire, + GLfloat s1, GLfloat t1, GLfloat x1, GLfloat y1, GLfloat z1, + GLfloat s2, GLfloat t2, GLfloat x2, GLfloat y2, GLfloat z2, + GLfloat s3, GLfloat t3, GLfloat x3, GLfloat y3, GLfloat z3, + GLfloat s4, GLfloat t4, GLfloat x4, GLfloat y4, GLfloat z4) +{ +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, texture); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color); + do_normal(x1, y1, z1, x2, y2, z2, x3, y3, z3); + glBegin(wire ? GL_LINE_LOOP : GL_QUADS); + glTexCoord2f(s1, t1); + glVertex3f(x1, y1, z1); + glTexCoord2f(s2, t2); + glVertex3f(x2, y2, z2); + glTexCoord2f(s3, t3); + glVertex3f(x3, y3, z3); + glTexCoord2f(s4, t4); + glVertex3f(x4, y4, z4); + glEnd(); +} + +static void +face5(GLint texture, GLfloat * color, Bool wire, + GLfloat s1, GLfloat t1, GLfloat x1, GLfloat y1, GLfloat z1, + GLfloat s2, GLfloat t2, GLfloat x2, GLfloat y2, GLfloat z2, + GLfloat s3, GLfloat t3, GLfloat x3, GLfloat y3, GLfloat z3, + GLfloat s4, GLfloat t4, GLfloat x4, GLfloat y4, GLfloat z4, + GLfloat s5, GLfloat t5, GLfloat x5, GLfloat y5, GLfloat z5) +{ +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, texture); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color); + do_normal(x1, y1, z1, x2, y2, z2, x3, y3, z3); + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + glTexCoord2f(s1, t1); + glVertex3f(x1, y1, z1); + glTexCoord2f(s2, t2); + glVertex3f(x2, y2, z2); + glTexCoord2f(s3, t3); + glVertex3f(x3, y3, z3); + glTexCoord2f(s4, t4); + glVertex3f(x4, y4, z4); + glTexCoord2f(s5, t5); + glVertex3f(x5, y5, z5); + glEnd(); +} + + + +/* Creating object models + */ + +static void +box(ModeInfo * mi, Bool wire) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + + glNewList(lc->box, GL_COMPILE); + glShadeModel(GL_SMOOTH); + + /* N */ + face4(lc->texids[FACE_N], exterior_color, wire, + 0.0, 0.0, -0.5, 0.5, 0.5, + 1.0, 0.0, 0.5, 0.5, 0.5, + 1.0, 1.0, 0.5, 0.5, -0.5, + 0.0, 1.0, -0.5, 0.5, -0.5); + + /* S */ + face4(lc->texids[FACE_S], exterior_color, wire, + 0.0, 0.0, -0.5, -0.5, -0.5, + 1.0, 0.0, 0.5, -0.5, -0.5, + 1.0, 1.0, 0.5, -0.5, 0.5, + 0.0, 1.0, -0.5, -0.5, 0.5); + + /* E */ + face4(lc->texids[FACE_E], exterior_color, wire, + 0.0, 0.0, 0.5, -0.5, -0.5, + 1.0, 0.0, 0.5, 0.5, -0.5, + 1.0, 1.0, 0.5, 0.5, 0.5, + 0.0, 1.0, 0.5, -0.5, 0.5); + + /* W */ + face4(lc->texids[FACE_W], exterior_color, wire, + 1.0, 1.0, -0.5, -0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, 0.5, -0.5, + 1.0, 0.0, -0.5, -0.5, -0.5); + + /* U */ + face4(lc->texids[FACE_U], exterior_color, wire, + 1.0, 0.0, 0.5, -0.5, 0.5, + 1.0, 1.0, 0.5, 0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, 0.5); + + /* D */ + face4(lc->texids[FACE_D], exterior_color, wire, + 0.0, 1.0, -0.5, -0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, -0.5, + 1.0, 0.0, 0.5, 0.5, -0.5, + 1.0, 1.0, 0.5, -0.5, -0.5); + + glEndList(); +} + + +static void +star(ModeInfo * mi, Bool top, Bool wire) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + int i; + + int points[][2] = + { + { 77, 74 }, { 60, 98 }, { 0, 71 }, { 0, 0 }, /* L1 */ + { 60, 98 }, { 55, 127 }, { 0, 127 }, { 0, 71 }, /* L2 */ + { 55, 127 }, { 60, 154 }, { 0, 179 }, { 0, 127 }, /* L3 */ + { 60, 154 }, { 76, 176 }, { 0, 255 }, { 0, 179 }, /* L4 */ + { 76, 176 }, { 100, 193 }, { 74, 255 }, { 0, 255 }, /* B1 */ + { 100, 193 }, { 127, 198 }, { 127, 255 }, { 74, 255 }, /* B2 */ + { 127, 198 }, { 151, 193 }, { 180, 255 }, { 127, 255 }, /* B3 */ + { 151, 193 }, { 178, 177 }, { 255, 255 }, { 180, 255 }, /* B4 */ + { 178, 177 }, { 193, 155 }, { 255, 181 }, { 255, 255 }, /* R4 */ + { 193, 155 }, { 199, 127 }, { 255, 127 }, { 255, 181 }, /* R3 */ + { 199, 127 }, { 194, 99 }, { 255, 74 }, { 255, 127 }, /* R2 */ + { 194, 99 }, { 179, 76 }, { 255, 0 }, { 255, 74 }, /* R1 */ + { 179, 76 }, { 155, 60 }, { 180, 0 }, { 255, 0 }, /* T4 */ + { 155, 60 }, { 126, 55 }, { 126, 0 }, { 180, 0 }, /* T3 */ + { 126, 55 }, { 100, 60 }, { 75, 0 }, { 126, 0 }, /* T2 */ + { 100, 60 }, { 77, 74 }, { 0, 0 }, { 75, 0 }, /* T1 */ + }; + + for (i = 0; i < countof(points); i++) + points[i][1] = 255 - points[i][1]; + + if (top) + glNewList(lc->star1, GL_COMPILE); + else + glNewList(lc->star2, GL_COMPILE); + + if (!top) + glRotatef(-180.0, 1.0, 0.0, 0.0); + + for (i = 0; i < countof(points) / 4; i += 2) { + int j, k; + + /* Top face. + */ + + GLfloat s[4], t[4], x[4], y[4], z[4]; + + for (j = 3, k = 0; j >= 0; j--, k++) { + GLfloat xx = points[(i * 4) + j][0] / 255.0L; + GLfloat yy = points[(i * 4) + j][1] / 255.0L; + + s[k] = xx; + t[k] = yy; + x[k] = xx - 0.5; + y[k] = yy - 0.5; + z[k] = 0.5; + } + face4(lc->texids[top ? FACE_U : FACE_D], exterior_color, wire, + s[0], t[0], x[0], y[0], z[0], + s[1], t[1], x[1], y[1], z[1], + s[2], t[2], x[2], y[2], z[2], + s[3], t[3], x[3], y[3], z[3]); + + /* Bottom face. + */ + for (j = 0, k = 0; j < 4; j++, k++) { + GLfloat xx = points[(i * 4) + j][0] / 255.0L; + GLfloat yy = points[(i * 4) + j][1] / 255.0L; + + s[k] = xx; + t[k] = 1.0 - yy; + x[k] = xx - 0.5; + y[k] = yy - 0.5; + z[k] = -0.5; + } + face4(lc->texids[top ? FACE_U : FACE_D], exterior_color, wire, + s[0], t[0], x[0], y[0], z[0], + s[1], t[1], x[1], y[1], z[1], + s[2], t[2], x[2], y[2], z[2], + s[3], t[3], x[3], y[3], z[3]); + + /* Connecting faces. + */ + for (j = 3; j >= 0; j--) { + int l = (j == 0 ? 3 : j - 1); + Bool front_p = (j == 3); + GLfloat x1 = points[(i * 4) + j][0] / 255.0L; + GLfloat y1 = points[(i * 4) + j][1] / 255.0L; + GLfloat x2 = points[(i * 4) + l][0] / 255.0L; + GLfloat y2 = points[(i * 4) + l][1] / 255.0L; + + GLfloat tx1 = 0.0, tx2 = 1.0, ty1 = 0.0, ty2 = 1.0; + + int texture = 0; + int facing = i / 4; + + facing = (facing + j + 5) % 4; + + switch (facing) { + case 0: + texture = FACE_W; + if (top) { + tx1 = 1.0 - y1; + tx2 = 1.0 - y2; + ty1 = 0.0; + ty2 = 1.0; + } else { + tx1 = y1; + tx2 = y2; + ty1 = 1.0; + ty2 = 0.0; + } + break; + case 1: + texture = top ? FACE_S : FACE_N; + tx1 = x1; + tx2 = x2; + ty1 = 0.0; + ty2 = 1.0; + break; + case 2: + texture = FACE_E; + if (top) { + tx1 = y1; + tx2 = y2; + ty1 = 0.0; + ty2 = 1.0; + } else { + tx1 = 1.0 - y1; + tx2 = 1.0 - y2; + ty1 = 1.0; + ty2 = 0.0; + } + break; + case 3: + texture = top ? FACE_N : FACE_S; + tx1 = x1; + tx2 = x2; + ty1 = 1.0; + ty2 = 0.0; + break; + } + + x1 -= 0.5; + x2 -= 0.5; + y1 -= 0.5; + y2 -= 0.5; + + face4(front_p ? lc->texids[texture] : 0, + front_p ? exterior_color : interior_color, + wire, + tx1, ty2, x1, y1, 0.5, + tx1, ty1, x1, y1, -0.5, + tx2, ty1, x2, y2, -0.5, + tx2, ty2, x2, y2, 0.5); + } + } + + + /* Central core top cap. + */ +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, lc->texids[top ? FACE_U : FACE_D]); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, exterior_color); + + i = 1; + do_normal(points[i + 0][0], points[i + 0][1], 0, + points[i + 4][0], points[i + 4][1], 0, + points[i + 8][0], points[i + 8][1], 0); + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + for (i = 1; i < countof(points); i += 4) { + GLfloat x = points[i][0] / 255.0L; + GLfloat y = points[i][1] / 255.0L; + + glTexCoord2f(x, y); + glVertex3f(x - 0.5, y - 0.5, 0.5); + } + glEnd(); + + + /* Central core bottom cap. + */ +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, 0); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, interior_color); + +/* Range changed from "countof(points) - 3" to avoid Stack array bounds read */ + i = countof(points) - 9; + do_normal(points[i + 0][0], points[i + 0][1], 0, + points[i + 4][0], points[i + 4][1], 0, + points[i + 8][0], points[i + 8][1], 0); + + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + for (i = countof(points) - 3; i >= 0; i -= 4) { + GLfloat x = points[i][0] / 255.0L; + GLfloat y = points[i][1] / 255.0L; + + glVertex3f(x - 0.5, y - 0.5, 0); + } + glEnd(); + + + /* Central core walls. + */ + for (i = 1; i < countof(points); i += 4) { + + GLfloat x1 = points[i - 1][0] / 255.0L; + GLfloat y1 = points[i - 1][1] / 255.0L; + GLfloat x2 = points[i][0] / 255.0L; + GLfloat y2 = points[i][1] / 255.0L; + + face4(0, interior_color, wire, + 0.0, 0.0, x1 - 0.5, y1 - 0.5, 0.5, + 0.0, 0.0, x1 - 0.5, y1 - 0.5, 0.0, + 0.0, 0.0, x2 - 0.5, y2 - 0.5, 0.0, + 0.0, 0.0, x2 - 0.5, y2 - 0.5, 0.5); + } + + glEndList(); +} + + +static void +tetra(ModeInfo * mi, Bool wire) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + + glNewList(lc->tetra_une, GL_COMPILE); + { + glShadeModel(GL_SMOOTH); + + /* Ua */ + face3(lc->texids[FACE_U], exterior_color, wire, + 1.0, 0.0, 0.5, -0.5, 0.5, + 1.0, 1.0, 0.5, 0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5); + + /* Na */ + face3(lc->texids[FACE_N], exterior_color, wire, + 0.0, 0.0, -0.5, 0.5, 0.5, + 1.0, 0.0, 0.5, 0.5, 0.5, + 1.0, 1.0, 0.5, 0.5, -0.5); + + /* Eb */ + face3(lc->texids[FACE_E], exterior_color, wire, + 1.0, 0.0, 0.5, 0.5, -0.5, + 1.0, 1.0, 0.5, 0.5, 0.5, + 0.0, 1.0, 0.5, -0.5, 0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, 0.5, -0.5, 0.5, + 0.0, 0.0, -0.5, 0.5, 0.5); + } + glEndList(); + + glNewList(lc->tetra_usw, GL_COMPILE); + { + /* Ub */ + face3(lc->texids[FACE_U], exterior_color, wire, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, 0.5, + 1.0, 0.0, 0.5, -0.5, 0.5); + + /* Sb */ + face3(lc->texids[FACE_S], exterior_color, wire, + 1.0, 1.0, 0.5, -0.5, 0.5, + 0.0, 1.0, -0.5, -0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, -0.5); + + /* Wb */ + face3(lc->texids[FACE_W], exterior_color, wire, + 1.0, 0.0, -0.5, -0.5, -0.5, + 1.0, 1.0, -0.5, -0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, -0.5, -0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, 0.5, + 0.0, 0.0, 0.5, -0.5, 0.5); + } + glEndList(); + + glNewList(lc->tetra_dwn, GL_COMPILE); + { + /* Db */ + face3(lc->texids[FACE_D], exterior_color, wire, + 0.0, 1.0, -0.5, -0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, -0.5, + 1.0, 0.0, 0.5, 0.5, -0.5); + + /* Wa */ + face3(lc->texids[FACE_W], exterior_color, wire, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, 0.5, -0.5, + 1.0, 0.0, -0.5, -0.5, -0.5); + + /* Nb */ + face3(lc->texids[FACE_N], exterior_color, wire, + 1.0, 1.0, 0.5, 0.5, -0.5, + 0.0, 1.0, -0.5, 0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, 0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, -0.5); + } + glEndList(); + + glNewList(lc->tetra_dse, GL_COMPILE); + { + /* Sa */ + face3(lc->texids[FACE_S], exterior_color, wire, + 0.0, 0.0, -0.5, -0.5, -0.5, + 1.0, 0.0, 0.5, -0.5, -0.5, + 1.0, 1.0, 0.5, -0.5, 0.5); + + /* Ea */ + face3(lc->texids[FACE_E], exterior_color, wire, + 0.0, 1.0, 0.5, -0.5, 0.5, + 0.0, 0.0, 0.5, -0.5, -0.5, + 1.0, 0.0, 0.5, 0.5, -0.5); + + /* Da */ + face3(lc->texids[FACE_D], exterior_color, wire, + 1.0, 0.0, 0.5, 0.5, -0.5, + 1.0, 1.0, 0.5, -0.5, -0.5, + 0.0, 1.0, -0.5, -0.5, -0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, 0.5, -0.5, 0.5, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, -0.5, -0.5, -0.5); + } + glEndList(); + + glNewList(lc->tetra_mid, GL_COMPILE); + { + face3(0, interior_color, wire, + 0.0, 0.0, 0.5, -0.5, 0.5, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, 0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, -0.5, + 0.0, 0.0, 0.5, -0.5, 0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, -0.5, 0.5, 0.5, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, -0.5, -0.5, -0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, 0.5, -0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, -0.5); + + face3(0, interior_color, wire, + 0.0, 0.0, 0.5, -0.5, 0.5, + 0.0, 0.0, 0.5, 0.5, -0.5, + 0.0, 0.0, -0.5, -0.5, -0.5); + } + glEndList(); + +} + +static void +lid(ModeInfo * mi, Bool wire) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + int i; + + int points[][2] = + { + {128, 20}, + {21, 129}, + {0, 129}, + {0, 0}, + {128, 0}, /* L1 */ + {21, 129}, + {127, 234}, + {127, 255}, + {0, 255}, + {0, 129}, /* L2 */ + {127, 234}, + {233, 127}, + {255, 127}, + {255, 255}, + {127, 255}, /* R2 */ + {233, 127}, + {128, 20}, + {128, 0}, + {255, 0}, + {255, 127}, /* R1 */ + }; + + for (i = 0; i < countof(points); i++) + points[i][1] = 255 - points[i][1]; + + glNewList(lc->lid_0, GL_COMPILE); + glShadeModel(GL_SMOOTH); + + /* N */ + face4(lc->texids[FACE_N], exterior_color, wire, + 0.0, 0.0, -0.5, 0.5, 0.5, + 1.0, 0.0, 0.5, 0.5, 0.5, + 1.0, 1.0, 0.5, 0.5, -0.5, + 0.0, 1.0, -0.5, 0.5, -0.5); + + /* S */ + face4(lc->texids[FACE_S], exterior_color, wire, + 0.0, 0.0, -0.5, -0.5, -0.5, + 1.0, 0.0, 0.5, -0.5, -0.5, + 1.0, 1.0, 0.5, -0.5, 0.5, + 0.0, 1.0, -0.5, -0.5, 0.5); + + /* E */ + face4(lc->texids[FACE_E], exterior_color, wire, + 0.0, 0.0, 0.5, -0.5, -0.5, + 1.0, 0.0, 0.5, 0.5, -0.5, + 1.0, 1.0, 0.5, 0.5, 0.5, + 0.0, 1.0, 0.5, -0.5, 0.5); + + /* U */ + face4(lc->texids[FACE_U], exterior_color, wire, + 1.0, 0.0, 0.5, -0.5, 0.5, + 1.0, 1.0, 0.5, 0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, 0.5); + + /* D */ + face4(lc->texids[FACE_D], exterior_color, wire, + 0.0, 1.0, -0.5, -0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, -0.5, + 1.0, 0.0, 0.5, 0.5, -0.5, + 1.0, 1.0, 0.5, -0.5, -0.5); + + /* W -- lid_0 */ + for (i = 0; i < countof(points) / 5; i++) { + int j; + GLfloat s[5], t[5], x[5], y[5], z[5]; + + for (j = 0; j < 5; j++) { + GLfloat xx = points[(i * 5) + j][0] / 255.0L; + GLfloat yy = points[(i * 5) + j][1] / 255.0L; + + s[j] = 1.0 - xx; + t[j] = yy; + x[j] = -0.5; + y[j] = xx - 0.5; + z[j] = yy - 0.5; + } + face5(lc->texids[FACE_W], exterior_color, wire, + s[0], t[0], x[0], y[0], z[0], + s[1], t[1], x[1], y[1], z[1], + s[2], t[2], x[2], y[2], z[2], + s[3], t[3], x[3], y[3], z[3], + s[4], t[4], x[4], y[4], z[4]); + } + glEndList(); + + + /* W -- lid_1 through lid_4 */ + for (i = 0; i < 4; i++) { + GLfloat x1, y1, x2, y2, x3, y3; + + glNewList(lc->lid_1 + i, GL_COMPILE); + glShadeModel(GL_SMOOTH); + + x1 = points[(i * 5) + 1][0] / 255.0L; + y1 = points[(i * 5) + 1][1] / 255.0L; + x2 = points[(i * 5)][0] / 255.0L; + y2 = points[(i * 5)][1] / 255.0L; + x3 = 0.5; + y3 = 0.5; + + /* Outer surface */ + face3(lc->texids[FACE_W], exterior_color, wire, + 1.0 - x1, y1, -0.5, x1 - 0.5, y1 - 0.5, + 1.0 - x2, y2, -0.5, x2 - 0.5, y2 - 0.5, + 1.0 - x3, y3, -0.5, x3 - 0.5, y3 - 0.5); + + /* Inner surface */ + face3(0, interior_color, wire, + 0.0, 0.0, -0.48, x2 - 0.5, y2 - 0.5, + 0.0, 0.0, -0.48, x1 - 0.5, y1 - 0.5, + 0.0, 0.0, -0.48, x3 - 0.5, y3 - 0.5); + + /* Lip 1 */ + face4(0, interior_color, wire, + 0.0, 0.0, -0.5, x1 - 0.5, y1 - 0.5, + 0.0, 0.0, -0.5, x3 - 0.5, y3 - 0.5, + 0.0, 0.0, -0.48, x3 - 0.5, y3 - 0.5, + 0.0, 0.0, -0.48, x1 - 0.5, y1 - 0.5); + + /* Lip 2 */ + face4(0, interior_color, wire, + 0.0, 0.0, -0.48, x2 - 0.5, y2 - 0.5, + 0.0, 0.0, -0.48, x3 - 0.5, y3 - 0.5, + 0.0, 0.0, -0.5, x3 - 0.5, y3 - 0.5, + 0.0, 0.0, -0.5, x2 - 0.5, y2 - 0.5); + + glEndList(); + } +} + +static void +taser(ModeInfo * mi, Bool wire) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + int i; + + int slider_face_points[][2] = + { + {86, 58}, + {38, 106}, + {70, 106}, + {118, 58}, + {-1, -1}, /* a */ + {136, 58}, + {184, 106}, + {216, 106}, + {168, 58}, + {-1, -1}, /* b */ + {38, 106}, + {0, 144}, + {0, 190}, + {60, 190}, + {108, 106}, /* c */ + {144, 106}, + {194, 190}, + {254, 190}, + {254, 144}, + {216, 106}, /* d */ + {98, 124}, + {60, 190}, + {92, 190}, + {126, 158}, + {126, 124}, /* e */ + {126, 124}, + {126, 158}, + {160, 190}, + {194, 190}, + {154, 124}, /* f */ + {22, 190}, + {22, 254}, + {60, 254}, + {60, 190}, + {-1, -1}, /* g */ + {194, 190}, + {194, 254}, + {230, 254}, + {230, 190}, + {-1, -1}, /* h */ + {60, 190}, + {60, 210}, + {92, 210}, + {92, 190}, + {-1, -1}, /* i */ + {160, 190}, + {160, 210}, + {194, 210}, + {194, 190}, + {-1, -1}, /* j */ + {110, 172}, + {92, 190}, + {110, 190}, + {-1, -1}, + {-1, -1}, /* k */ + {140, 172}, + {140, 190}, + {160, 190}, + {-1, -1}, + {-1, -1}, /* l */ + {110, 172}, + {140, 172}, + {126, 156}, + {-1, -1}, + {-1, -1}, /* m */ + }; + + int body_face_points[][2] = + { + {0, 0}, + {0, 58}, + {254, 58}, + {254, 0}, + {-1, -1}, /* A */ + {0, 58}, + {0, 144}, + {86, 58}, + {-1, -1}, + {-1, -1}, /* B */ + {168, 58}, + {254, 144}, + {254, 58}, + {-1, -1}, + {-1, -1}, /* C */ + {118, 58}, + {70, 106}, + {184, 106}, + {136, 58}, + {-1, -1}, /* F */ + {108, 106}, + {98, 124}, + {154, 124}, + {144, 106}, + {-1, -1}, /* G */ + }; + + int lifter_face_points[][2] = + { + {0, 190}, + {0, 254}, + {22, 254}, + {22, 190}, + {-1, -1}, /* D */ + {230, 190}, + {230, 254}, + {254, 254}, + {254, 190}, + {-1, -1}, /* E */ + {60, 210}, + {60, 254}, + {194, 254}, + {194, 210}, + {-1, -1}, /* H */ + {92, 190}, + {92, 210}, + {160, 210}, + {160, 190}, + {-1, -1}, /* I */ + {110, 172}, + {110, 190}, + {140, 190}, + {140, 172}, + {-1, -1}, /* J */ + }; + + int body_perimiter_points[][2] = + { + {0, 144}, + {86, 59}, + {119, 58}, + {71, 107}, + {108, 107}, + {98, 124}, + {155, 124}, + {144, 107}, + {185, 106}, + {136, 59}, + {169, 59}, + {255, 145}, + {255, 0}, + {0, 0}, + }; + + int slider_perimiter_points[][2] = + { + {86, 58}, + {0, 144}, + {0, 190}, + {22, 190}, + {22, 254}, + {60, 254}, + {60, 210}, + {92, 210}, + {92, 190}, + {110, 190}, + {110, 172}, + {140, 172}, + {140, 190}, + {160, 190}, + {160, 210}, + {194, 210}, + {194, 254}, + {230, 254}, + {230, 190}, + {254, 190}, + {254, 144}, + {168, 58}, + {136, 58}, + {184, 106}, + {144, 106}, + {154, 124}, + {98, 124}, + {108, 106}, + {70, 106}, + {118, 58}, + }; + + int lifter_perimiter_points_1[][2] = + { + {0, 189}, + {0, 254}, + {22, 255}, + {23, 190}, + }; + + int lifter_perimiter_points_2[][2] = + { + {230, 254}, + {255, 255}, + {254, 190}, + {230, 190}, + }; + + int lifter_perimiter_points_3[][2] = + { + {60, 254}, + {194, 254}, + {194, 211}, + {160, 210}, + {160, 190}, + {140, 191}, + {141, 172}, + {111, 172}, + {110, 190}, + {93, 190}, + {92, 210}, + {60, 211}, + }; + + for (i = 0; i < countof(slider_face_points); i++) + slider_face_points[i][1] = 255 - slider_face_points[i][1]; + for (i = 0; i < countof(body_face_points); i++) + body_face_points[i][1] = 255 - body_face_points[i][1]; + for (i = 0; i < countof(lifter_face_points); i++) + lifter_face_points[i][1] = 255 - lifter_face_points[i][1]; + for (i = 0; i < countof(body_perimiter_points); i++) + body_perimiter_points[i][1] = 255 - body_perimiter_points[i][1]; + for (i = 0; i < countof(slider_perimiter_points); i++) + slider_perimiter_points[i][1] = 255 - slider_perimiter_points[i][1]; + for (i = 0; i < countof(lifter_perimiter_points_1); i++) + lifter_perimiter_points_1[i][1] = 255 - lifter_perimiter_points_1[i][1]; + for (i = 0; i < countof(lifter_perimiter_points_2); i++) + lifter_perimiter_points_2[i][1] = 255 - lifter_perimiter_points_2[i][1]; + for (i = 0; i < countof(lifter_perimiter_points_3); i++) + lifter_perimiter_points_3[i][1] = 255 - lifter_perimiter_points_3[i][1]; + + /* -------------------------------------------------------------------- */ + + glNewList(lc->taser_base, GL_COMPILE); + glShadeModel(GL_SMOOTH); + + /* N */ + face4(lc->texids[FACE_N], exterior_color, wire, + 0.0, 0.0, -0.5, 0.5, 0.5, + 0.75, 0.0, 0.25, 0.5, 0.5, + 0.75, 0.75, 0.25, 0.5, -0.25, + 0.0, 0.75, -0.5, 0.5, -0.25); + + /* S */ + face4(lc->texids[FACE_S], exterior_color, wire, + 0.0, 0.25, -0.5, -0.5, -0.25, + 0.75, 0.25, 0.25, -0.5, -0.25, + 0.75, 1.0, 0.25, -0.5, 0.5, + 0.0, 1.0, -0.5, -0.5, 0.5); + + /* interior E */ + face4(0, interior_color, wire, + 0.0, 0.0, 0.25, -0.5, -0.25, + 1.0, 0.0, 0.25, 0.5, -0.25, + 1.0, 1.0, 0.25, 0.5, 0.5, + 0.0, 1.0, 0.25, -0.5, 0.5); + + /* W */ + face4(lc->texids[FACE_W], exterior_color, wire, + 1.0, 1.0, -0.5, -0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.25, -0.5, 0.5, -0.25, + 1.0, 0.25, -0.5, -0.5, -0.25); + + /* U */ + face4(lc->texids[FACE_U], exterior_color, wire, + 0.75, 0.0, 0.25, -0.5, 0.5, + 0.75, 1.0, 0.25, 0.5, 0.5, + 0.0, 1.0, -0.5, 0.5, 0.5, + 0.0, 0.0, -0.5, -0.5, 0.5); + + /* interior D */ + face4(0, interior_color, wire, + 0.0, 1.0, -0.5, -0.5, -0.25, + 0.0, 0.0, -0.5, 0.5, -0.25, + 1.0, 0.0, 0.25, 0.5, -0.25, + 1.0, 1.0, 0.25, -0.5, -0.25); + + /* Top face */ + for (i = 0; i < countof(body_face_points) / 5; i++) { + int j; + +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, lc->texids[FACE_E]); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, exterior_color); + + do_normal(0, body_face_points[(i * 5) + 0][0], body_face_points[(i * 5) + 0][1], + 0, body_face_points[(i * 5) + 1][0], body_face_points[(i * 5) + 1][1], + 0, body_face_points[(i * 5) + 2][0], body_face_points[(i * 5) + 2][1] + ); + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + for (j = 0; j < 5; j++) { + int ix = body_face_points[(i * 5) + j][0]; + int iy = body_face_points[(i * 5) + j][1]; + GLfloat x, y; + + if (ix == -1) /* these are padding: ignore them */ + continue; + x = ix / 255.0L; + y = iy / 255.0L; + glTexCoord2f(x, y); + glVertex3f(0.5, x - 0.5, y - 0.5); + } + glEnd(); + } + + /* Side walls */ + for (i = 0; i < countof(body_perimiter_points); i++) { + int j = (i + 1 >= countof(body_perimiter_points) ? 0 : i + 1); + GLfloat x1 = body_perimiter_points[i][0] / 255.0; + GLfloat y1 = body_perimiter_points[i][1] / 255.0; + GLfloat x2 = body_perimiter_points[j][0] / 255.0; + GLfloat y2 = body_perimiter_points[j][1] / 255.0; + int texture = -1; + GLfloat s1 = 0, t1 = 0, s2 = 0, t2 = 0, s3 = 0, t3 = 0, + s4 = 0, t4 = 0; + + if (i == 11) { + texture = lc->texids[FACE_N]; + s1 = 1.0; + t1 = 0.0; + s2 = 1.0; + t2 = 0.568; + s3 = 0.75, t3 = 0.568; + s4 = 0.75; + t4 = 0.0; + } else if (i == 12) { + texture = lc->texids[FACE_U]; + s1 = 1.0; + t1 = 0.0; + s2 = 1.0; + t2 = 1.0; + s3 = 0.75, t3 = 1.0; + s4 = 0.75; + t4 = 0.0; + } else if (i == 13) { + texture = lc->texids[FACE_S]; + s1 = 1.0; + t1 = 0.437; + s2 = 1.0; + t2 = 1.0; + s3 = 0.75; + t3 = 1.0; + s4 = 0.75; + t4 = 0.437; + } + face4((texture == -1 ? 0 : texture), + (texture == -1 ? interior_color : exterior_color), + wire, + s1, t1, 0.5, x2 - 0.5, y2 - 0.5, + s2, t2, 0.5, x1 - 0.5, y1 - 0.5, + s3, t3, 0.25, x1 - 0.5, y1 - 0.5, + s4, t4, 0.25, x2 - 0.5, y2 - 0.5); + } + + glEndList(); + + /* -------------------------------------------------------------------- */ + + glNewList(lc->taser_lifter, GL_COMPILE); + glShadeModel(GL_SMOOTH); + + /* N */ + face4(lc->texids[FACE_N], exterior_color, wire, + 0.0, 0.75, -0.5, 0.5, -0.25, + 0.75, 0.75, 0.25, 0.5, -0.25, + 0.75, 1.0, 0.25, 0.5, -0.5, + 0.0, 1.0, -0.5, 0.5, -0.5); + + /* S */ + face4(lc->texids[FACE_S], exterior_color, wire, + 0.0, 0.0, -0.5, -0.5, -0.5, + 0.75, 0.0, 0.25, -0.5, -0.5, + 0.75, 0.25, 0.25, -0.5, -0.25, + 0.0, 0.25, -0.5, -0.5, -0.25); + + /* interior E */ + face4(0, interior_color, wire, + 0.0, 1.0, 0.25, -0.5, -0.5, + 1.0, 1.0, 0.25, 0.5, -0.5, + 1.0, 0.0, 0.25, 0.5, -0.25, + 0.0, 0.0, 0.25, -0.5, -0.25); + + /* W */ + face4(lc->texids[FACE_W], exterior_color, wire, + 1.0, 0.25, -0.5, -0.5, -0.25, + 0.0, 0.25, -0.5, 0.5, -0.25, + 0.0, 0.0, -0.5, 0.5, -0.5, + 1.0, 0.0, -0.5, -0.5, -0.5); + + /* interior U */ + face4(0, interior_color, wire, + 1.0, 0.0, 0.25, -0.5, -0.25, + 1.0, 1.0, 0.25, 0.5, -0.25, + 0.0, 1.0, -0.5, 0.5, -0.25, + 0.0, 0.0, -0.5, -0.5, -0.25); + + /* D */ + face4(lc->texids[FACE_D], exterior_color, wire, + 0.0, 1.0, -0.5, -0.5, -0.5, + 0.0, 0.0, -0.5, 0.5, -0.5, + 0.75, 0.0, 0.25, 0.5, -0.5, + 0.75, 1.0, 0.25, -0.5, -0.5); + + + /* Top face */ + for (i = 0; i < countof(lifter_face_points) / 5; i++) { + int j; + +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, lc->texids[FACE_E]); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, exterior_color); + + do_normal( + 0, lifter_face_points[(i * 5) + 0][0], lifter_face_points[(i * 5) + 0][1], + 0, lifter_face_points[(i * 5) + 1][0], lifter_face_points[(i * 5) + 1][1], + 0, lifter_face_points[(i * 5) + 2][0], lifter_face_points[(i * 5) + 2][1]); + + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + for (j = 0; j < 5; j++) { + int ix = lifter_face_points[(i * 5) + j][0]; + int iy = lifter_face_points[(i * 5) + j][1]; + GLfloat x, y; + + if (ix == -1) /* these are padding: ignore them */ + continue; + x = ix / 255.0L; + y = iy / 255.0L; + glTexCoord2f(x, y); + glVertex3f(0.5, x - 0.5, y - 0.5); + } + glEnd(); + } + + /* Side walls */ + for (i = 0; i < countof(lifter_perimiter_points_1); i++) { + int j = (i + 1 >= countof(lifter_perimiter_points_1) ? 0 : i + 1); + GLfloat x1 = lifter_perimiter_points_1[i][0] / 255.0; + GLfloat y1 = lifter_perimiter_points_1[i][1] / 255.0; + GLfloat x2 = lifter_perimiter_points_1[j][0] / 255.0; + GLfloat y2 = lifter_perimiter_points_1[j][1] / 255.0; + int texture = -1; + GLfloat s1 = 0, t1 = 0, s2 = 0, t2 = 0, s3 = 0, t3 = 0, + s4 = 0, t4 = 0; + + if (i == 0) { + texture = lc->texids[FACE_S]; + s1 = 1.0; + t1 = 0.0; + s2 = 1.0; + t2 = 0.26; + s3 = 0.75, t3 = 0.26; + s4 = 0.75; + t4 = 0.0; + } else if (i == 1) { + texture = lc->texids[FACE_D]; + s1 = 1.0; + t1 = 0.914; + s2 = 1.0; + t2 = 1.0; + s3 = 0.75; + t3 = 1.0; + s4 = 0.75; + t4 = 0.914; + } + face4((texture == -1 ? 0 : texture), + (texture == -1 ? interior_color : exterior_color), + wire, + s1, t1, 0.5, x2 - 0.5, y2 - 0.5, + s2, t2, 0.5, x1 - 0.5, y1 - 0.5, + s3, t3, 0.25, x1 - 0.5, y1 - 0.5, + s4, t4, 0.25, x2 - 0.5, y2 - 0.5); + } + + for (i = 0; i < countof(lifter_perimiter_points_2); i++) { + int j = (i + 1 >= countof(lifter_perimiter_points_2) ? 0 : i + 1); + GLfloat x1 = lifter_perimiter_points_2[i][0] / 255.0; + GLfloat y1 = lifter_perimiter_points_2[i][1] / 255.0; + GLfloat x2 = lifter_perimiter_points_2[j][0] / 255.0; + GLfloat y2 = lifter_perimiter_points_2[j][1] / 255.0; + int texture = -1; + GLfloat s1 = 0, t1 = 0, s2 = 0, t2 = 0, s3 = 0, t3 = 0, + s4 = 0, t4 = 0; + + if (i == 0) { + texture = lc->texids[FACE_D]; + s1 = 1.0; + t1 = 0.0; + s2 = 1.0; + t2 = 0.095; + s3 = 0.75; + t3 = 0.095; + s4 = 0.75; + t4 = 0.0; + } else if (i == 1) { + texture = lc->texids[FACE_N]; + s1 = 1.0; + t1 = 0.745; + s2 = 1.0; + t2 = 1.0; + s3 = 0.75; + t3 = 1.0; + s4 = 0.75; + t4 = 0.745; + } + face4((texture == -1 ? 0 : texture), + (texture == -1 ? interior_color : exterior_color), + wire, + s1, t1, 0.5, x2 - 0.5, y2 - 0.5, + s2, t2, 0.5, x1 - 0.5, y1 - 0.5, + s3, t3, 0.25, x1 - 0.5, y1 - 0.5, + s4, t4, 0.25, x2 - 0.5, y2 - 0.5); + } + + for (i = 0; i < countof(lifter_perimiter_points_3); i++) { + int j = (i + 1 >= countof(lifter_perimiter_points_3) ? 0 : i + 1); + GLfloat x1 = lifter_perimiter_points_3[i][0] / 255.0; + GLfloat y1 = lifter_perimiter_points_3[i][1] / 255.0; + GLfloat x2 = lifter_perimiter_points_3[j][0] / 255.0; + GLfloat y2 = lifter_perimiter_points_3[j][1] / 255.0; + int texture = -1; + GLfloat s1 = 0, t1 = 0, s2 = 0, t2 = 0, s3 = 0, t3 = 0, + s4 = 0, t4 = 0; + + if (i == 0) { + texture = lc->texids[FACE_D]; + s1 = 1.0; + t1 = 0.235; + s2 = 1.0; + t2 = 0.765; + s3 = 0.75; + t3 = 0.765; + s4 = 0.75; + t4 = 0.235; + } + face4((texture == -1 ? 0 : texture), + (texture == -1 ? interior_color : exterior_color), + wire, + s1, t1, 0.5, x2 - 0.5, y2 - 0.5, + s2, t2, 0.5, x1 - 0.5, y1 - 0.5, + s3, t3, 0.25, x1 - 0.5, y1 - 0.5, + s4, t4, 0.25, x2 - 0.5, y2 - 0.5); + } + + glEndList(); + + /* -------------------------------------------------------------------- */ + + glNewList(lc->taser_slider, GL_COMPILE); + glShadeModel(GL_SMOOTH); + + /* Top face */ + for (i = 0; i < countof(slider_face_points) / 5; i++) { + int j; + +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, lc->texids[FACE_E]); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, exterior_color); + + do_normal( + 0, slider_face_points[(i * 5) + 0][0], slider_face_points[(i * 5) + 0][1], + 0, slider_face_points[(i * 5) + 1][0], slider_face_points[(i * 5) + 1][1], + 0, slider_face_points[(i * 5) + 2][0], slider_face_points[(i * 5) + 2][1]); + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + for (j = 0; j < 5; j++) { + int ix = slider_face_points[(i * 5) + j][0]; + int iy = slider_face_points[(i * 5) + j][1]; + GLfloat x, y; + + if (ix == -1) /* these are padding: ignore them */ + continue; + x = ix / 255.0L; + y = iy / 255.0L; + glTexCoord2f(x, y); + glVertex3f(0.5, x - 0.5, y - 0.5); + } + glEnd(); + } + + /* Bottom face */ + for (i = countof(slider_face_points) / 5 - 1; i >= 0; i--) { + int j; + +#ifdef HAVE_GLBINDTEXTURE + glBindTexture(GL_TEXTURE_2D, 0); +#endif /* HAVE_GLBINDTEXTURE */ + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, interior_color); + + do_normal( + 0, slider_face_points[(i * 5) + 2][0], slider_face_points[(i * 5) + 2][1], + 0, slider_face_points[(i * 5) + 1][0], slider_face_points[(i * 5) + 1][1], + 0, slider_face_points[(i * 5) + 0][0], slider_face_points[(i * 5) + 0][1]); + glBegin(wire ? GL_LINE_LOOP : GL_POLYGON); + for (j = 4; j >= 0; j--) { + int ix = slider_face_points[(i * 5) + j][0]; + int iy = slider_face_points[(i * 5) + j][1]; + GLfloat x, y; + + if (ix == -1) /* these are padding: ignore them */ + continue; + x = ix / 255.0L; + y = iy / 255.0L; + glTexCoord2f(x, y); + glVertex3f(0.25, x - 0.5, y - 0.5); + } + glEnd(); + } + + /* Side walls */ + for (i = 0; i < countof(slider_perimiter_points); i++) { + int j = (i + 1 >= countof(slider_perimiter_points) ? 0 : i + 1); + GLfloat x1 = slider_perimiter_points[i][0] / 255.0; + GLfloat y1 = slider_perimiter_points[i][1] / 255.0; + GLfloat x2 = slider_perimiter_points[j][0] / 255.0; + GLfloat y2 = slider_perimiter_points[j][1] / 255.0; + int texture = -1; + GLfloat s1 = 0, t1 = 0, s2 = 0, t2 = 0, s3 = 0, t3 = 0, + s4 = 0, t4 = 0; + + if (i == 1) { + texture = lc->texids[FACE_S]; + s1 = 1.0; + t1 = 0.255; + s2 = 1.0; + t2 = 0.435; + s3 = 0.75; + t3 = 0.435; + s4 = 0.75; + t4 = 0.255; + } else if (i == 4) { + texture = lc->texids[FACE_D]; + s1 = 1.0; + t1 = 0.758; + s2 = 1.0; + t2 = 0.915; + s3 = 0.75; + t3 = 0.915; + s4 = 0.75; + t4 = 0.758; + } else if (i == 16) { + texture = lc->texids[FACE_D]; + s1 = 1.0; + t1 = 0.095; + s2 = 1.0; + t2 = 0.24; + s3 = 0.75; + t3 = 0.24; + s4 = 0.75; + t4 = 0.095; + } else if (i == 19) { + texture = lc->texids[FACE_N]; + s1 = 1.0; + t1 = 0.568; + s2 = 1.0; + t2 = 0.742; + s3 = 0.75; + t3 = 0.742; + s4 = 0.75; + t4 = 0.568; + } + face4((texture == -1 ? 0 : texture), + (texture == -1 ? interior_color : exterior_color), + wire, + s1, t1, 0.5, x2 - 0.5, y2 - 0.5, + s2, t2, 0.5, x1 - 0.5, y1 - 0.5, + s3, t3, 0.25, x1 - 0.5, y1 - 0.5, + s4, t4, 0.25, x2 - 0.5, y2 - 0.5); + } + + glEndList(); +} + + + +/* Rendering and animating object models + */ + +static void +draw(ModeInfo * mi) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + Bool wire = MI_IS_WIREFRAME(mi); + + if (!wire) + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + else + glClear(GL_COLOR_BUFFER_BIT); + + glPushMatrix(); + { + GLfloat x = lc->rotx; + GLfloat y = lc->roty; + GLfloat z = lc->rotz; + +#if 0 + x = 0.75; + y = 0; + z = 0; +#endif + + if (x < 0) + x = 1 - (x + 1); + if (y < 0) + y = 1 - (y + 1); + if (z < 0) + z = 1 - (z + 1); + + /* Make into the screen be +Y right be +X, and up be +Z. */ + glRotatef(-90.0, 1.0, 0.0, 0.0); + + /* Scale it up. */ + glScalef(4.0, 4.0, 4.0); + +#ifdef DEBUG + glPushMatrix(); + { + /* Shift to the upper left, and draw the vanilla box. */ + glTranslatef(-0.6, 0.0, 0.6); + + /* Apply rotation to the object. */ + glRotatef(x * 360, 1.0, 0.0, 0.0); + glRotatef(y * 360, 0.0, 1.0, 0.0); + glRotatef(z * 360, 0.0, 0.0, 1.0); + + /* Draw it. */ + glCallList(lc->box); + } + glPopMatrix(); + + /* Shift to the lower right, and draw the animated object. */ + glTranslatef(0.6, 0.0, -0.6); +#endif /* DEBUG */ + + + glPushMatrix(); + { + /* Apply rotation to the object. */ + glRotatef(x * 360, 1.0, 0.0, 0.0); + glRotatef(y * 360, 0.0, 1.0, 0.0); + glRotatef(z * 360, 0.0, 0.0, 1.0); + + switch (lc->type) { + case LAMENT_BOX: + glCallList(lc->box); + break; + + case LAMENT_STAR_OUT: + case LAMENT_STAR_ROT: + case LAMENT_STAR_ROT_IN: + case LAMENT_STAR_ROT_OUT: + case LAMENT_STAR_UNROT: + case LAMENT_STAR_IN: + glTranslatef(0.0, 0.0, lc->anim_z / 2); + glRotatef(lc->anim_r / 2, 0.0, 0.0, 1.0); + glCallList(lc->star1); + + glTranslatef(0.0, 0.0, -lc->anim_z); + glRotatef(-lc->anim_r, 0.0, 0.0, 1.0); + glCallList(lc->star2); + break; + + case LAMENT_TETRA_UNE: + case LAMENT_TETRA_USW: + case LAMENT_TETRA_DWN: + case LAMENT_TETRA_DSE: + { + unsigned int magic; + GLfloat tx, ty, tz; + + switch (lc->type) { + case LAMENT_TETRA_UNE: + magic = lc->tetra_une; + tx = 1.0; + ty = 1.0; + tz = 1.0; + break; + case LAMENT_TETRA_USW: + magic = lc->tetra_usw; + tx = 1.0; + ty = 1.0; + tz = -1.0; + break; + case LAMENT_TETRA_DWN: + magic = lc->tetra_dwn; + tx = 1.0; + ty = -1.0; + tz = 1.0; + break; + case LAMENT_TETRA_DSE: + magic = lc->tetra_dse; + tx = -1.0; + ty = 1.0; + tz = 1.0; + break; + default: + abort(); + break; + } + glCallList(lc->tetra_mid); + if (magic != lc->tetra_une) + glCallList(lc->tetra_une); + if (magic != lc->tetra_usw) + glCallList(lc->tetra_usw); + if (magic != lc->tetra_dwn) + glCallList(lc->tetra_dwn); + if (magic != lc->tetra_dse) + glCallList(lc->tetra_dse); + glRotatef(lc->anim_r, tx, ty, tz); + glCallList(magic); + } + break; + + case LAMENT_LID_OPEN: + case LAMENT_LID_CLOSE: + case LAMENT_LID_ZOOM: + { + GLfloat d = 0.417; + + glTranslatef(lc->anim_z, 0.0, 0.0); + + glCallList(lc->lid_0); + + glPushMatrix(); + glTranslatef(-0.5, -d, 0.0); + glRotatef(-lc->anim_r, 0.0, -1.0, -1.0); + glTranslatef(0.5, d, 0.0); + glCallList(lc->lid_1); + glPopMatrix(); + glPushMatrix(); + glTranslatef(-0.5, -d, 0.0); + glRotatef(lc->anim_r, 0.0, -1.0, 1.0); + glTranslatef(0.5, d, 0.0); + glCallList(lc->lid_2); + glPopMatrix(); + glPushMatrix(); + glTranslatef(-0.5, d, 0.0); + glRotatef(lc->anim_r, 0.0, -1.0, -1.0); + glTranslatef(0.5, -d, 0.0); + glCallList(lc->lid_3); + glPopMatrix(); + glPushMatrix(); + glTranslatef(-0.5, d, 0.0); + glRotatef(-lc->anim_r, 0.0, -1.0, 1.0); + glTranslatef(0.5, -d, 0.0); + glCallList(lc->lid_4); + glPopMatrix(); + } + break; + + case LAMENT_TASER_OUT: + case LAMENT_TASER_SLIDE: + case LAMENT_TASER_SLIDE_IN: + case LAMENT_TASER_IN: + + glTranslatef(-lc->anim_z / 2, 0.0, 0.0); + glCallList(lc->taser_base); + + glTranslatef(lc->anim_z, 0.0, 0.0); + glCallList(lc->taser_lifter); + + glTranslatef(0.0, 0.0, lc->anim_y); + glCallList(lc->taser_slider); + break; + + default: + abort(); + break; + } + } + glPopMatrix(); + + } + glPopMatrix(); +} + + +static void +animate(ModeInfo * mi) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + int pause1 = 10; + +/* int pause2 = 60; */ + int pause3 = 120; + + switch (lc->type) { + case LAMENT_BOX: + { + /* Rather than just picking states randomly, pick an ordering randomly, + do it, and then re-randomize. That way one can be assured of seeing + all states in a short time period, though not always in the same + order (it's frustrating to see it pick the same state 5x in a row.) + */ + static lament_type states[] = + { + LAMENT_STAR_OUT, LAMENT_STAR_OUT, + LAMENT_TETRA_UNE, LAMENT_TETRA_USW, + LAMENT_TETRA_DWN, LAMENT_TETRA_DSE, + LAMENT_LID_OPEN, LAMENT_LID_OPEN, LAMENT_LID_OPEN, + LAMENT_TASER_OUT, LAMENT_TASER_OUT, + LAMENT_BOX, LAMENT_BOX, LAMENT_BOX, LAMENT_BOX, LAMENT_BOX, + LAMENT_BOX, LAMENT_BOX, LAMENT_BOX, LAMENT_BOX, LAMENT_BOX, + }; + static int state = countof(states); + + if (state < countof(states)) { + lc->type = states[state++]; + } else { + int i; + + state = 0; + for (i = 0; i < countof(states); i++) { + int a = LRAND() % countof(states); + lament_type swap = states[a]; + + states[a] = states[i]; + states[i] = swap; + } + } + + if (lc->type == LAMENT_BOX) + lc->anim_pause = pause3; + + lc->anim_r = 0.0; + lc->anim_y = 0.0; + lc->anim_z = 0.0; + } + break; + + /* -------------------------------------------------------------- */ + + case LAMENT_STAR_OUT: + lc->anim_z += 0.01; + if (lc->anim_z >= 1.0) { + lc->anim_z = 1.0; + lc->type = LAMENT_STAR_ROT; + lc->anim_pause = pause1; + } + break; + + case LAMENT_STAR_ROT: + lc->anim_r += 1.0; + if (lc->anim_r >= 45.0) { + lc->anim_r = 45.0; + lc->type = LAMENT_STAR_ROT_IN; + lc->anim_pause = pause1; + } + break; + + case LAMENT_STAR_ROT_IN: + lc->anim_z -= 0.01; + if (lc->anim_z <= 0.0) { + lc->anim_z = 0.0; + lc->type = LAMENT_STAR_ROT_OUT; + lc->anim_pause = pause3 * (1 + (LRAND() % 4) + (LRAND() % 4)); + } + break; + + case LAMENT_STAR_ROT_OUT: + lc->anim_z += 0.01; + if (lc->anim_z >= 1.0) { + lc->anim_z = 1.0; + lc->type = LAMENT_STAR_UNROT; + lc->anim_pause = pause1; + } + break; + + case LAMENT_STAR_UNROT: + lc->anim_r -= 1.0; + if (lc->anim_r <= 0.0) { + lc->anim_r = 0.0; + lc->type = LAMENT_STAR_IN; + lc->anim_pause = pause1; + } + break; + + case LAMENT_STAR_IN: + lc->anim_z -= 0.01; + if (lc->anim_z <= 0.0) { + lc->anim_z = 0.0; + lc->type = LAMENT_BOX; + lc->anim_pause = pause3; + } + break; + + /* -------------------------------------------------------------- */ + + case LAMENT_TETRA_UNE: + case LAMENT_TETRA_USW: + case LAMENT_TETRA_DWN: + case LAMENT_TETRA_DSE: + + lc->anim_r += 1.0; + if (lc->anim_r >= 360.0) { + lc->anim_r = 0.0; + lc->type = LAMENT_BOX; + lc->anim_pause = pause3; + } else if (lc->anim_r > 119.0 && lc->anim_r <= 120.0) { + lc->anim_r = 120.0; + lc->anim_pause = pause1; + } else if (lc->anim_r > 239.0 && lc->anim_r <= 240.0) { + lc->anim_r = 240.0; + lc->anim_pause = pause1; + } + break; + + /* -------------------------------------------------------------- */ + + case LAMENT_LID_OPEN: + lc->anim_r += 1.0; + + if (lc->anim_r >= 112.0) { + GLfloat hysteresis = 0.05; + + lc->anim_r = 112.0; + lc->anim_z = 0.0; + lc->anim_pause = pause3; + + if (lc->rotx >= -hysteresis && + lc->rotx <= hysteresis && + ((lc->rotz >= (0.25 - hysteresis) && + lc->rotz <= (0.25 + hysteresis)) || + (lc->rotz >= (-0.25 - hysteresis) && + lc->rotz <= (-0.25 + hysteresis)))) { + lc->type = LAMENT_LID_ZOOM; + lc->rotx = 0.00; + lc->rotz = (lc->rotz < 0 ? -0.25 : 0.25); + } else { + lc->type = LAMENT_LID_CLOSE; + } + } + break; + + case LAMENT_LID_CLOSE: + lc->anim_r -= 1.0; + if (lc->anim_r <= 0.0) { + lc->anim_r = 0.0; + lc->type = LAMENT_BOX; + lc->anim_pause = pause3; + } + break; + + case LAMENT_LID_ZOOM: + lc->anim_z -= 0.1; + if (lc->anim_z < -50.0) { + lc->anim_r = 0.0; + lc->anim_z = 0.0; + lc->rotx = FLOATRAND(1.0) * RANDSIGN(); + lc->roty = FLOATRAND(1.0) * RANDSIGN(); + lc->rotz = FLOATRAND(1.0) * RANDSIGN(); + lc->type = LAMENT_BOX; + } + break; + + /* -------------------------------------------------------------- */ + + case LAMENT_TASER_OUT: + lc->anim_z += 0.0025; + if (lc->anim_z >= 0.25) { + lc->anim_z = 0.25; + lc->type = LAMENT_TASER_SLIDE; + lc->anim_pause = pause1 * (1 + (LRAND() % 5) + (LRAND() % 5)); + } + break; + + case LAMENT_TASER_SLIDE: + lc->anim_y += 0.0025; + if (lc->anim_y >= 0.23) { + lc->anim_y = 0.23; + lc->type = LAMENT_TASER_SLIDE_IN; + lc->anim_pause = pause3 * (1 + (LRAND() % 5) + (LRAND() % 5)); + } + break; + + case LAMENT_TASER_SLIDE_IN: + lc->anim_y -= 0.0025; + if (lc->anim_y <= 0.0) { + lc->anim_y = 0.0; + lc->type = LAMENT_TASER_IN; + lc->anim_pause = pause1; + } + break; + + case LAMENT_TASER_IN: + lc->anim_z -= 0.0025; + if (lc->anim_z <= 0.0) { + lc->anim_z = 0.0; + lc->type = LAMENT_BOX; + lc->anim_pause = pause3; + } + break; + + default: + abort(); + break; + } +} + + +static void +rotate(GLfloat * pos, GLfloat * v, GLfloat * dv, GLfloat max_v) +{ + double ppos = *pos; + + /* tick position */ + if (ppos < 0) + ppos = -(ppos + *v); + else + ppos += *v; + + if (ppos > 1.0) + ppos -= 1.0; + else if (ppos < 0) + ppos += 1.0; + + if (ppos < 0) + abort(); + if (ppos > 1.0) + abort(); + *pos = (*pos > 0 ? ppos : -ppos); + + /* accelerate */ + *v += *dv; + + /* clamp velocity */ + if (*v > max_v || *v < -max_v) { + *dv = -*dv; + } + /* If it stops, start it going in the other direction. */ + else if (*v < 0) { + if (LRAND() % 4) { + *v = 0; + + /* keep going in the same direction */ + if (LRAND() % 2) + *dv = 0; + else if (*dv < 0) + *dv = -*dv; + } else { + /* reverse gears */ + *v = -*v; + *dv = -*dv; + *pos = -*pos; + } + } + /* Alter direction of rotational acceleration randomly. */ + if (!(LRAND() % 120)) + *dv = -*dv; + + /* Change acceleration very occasionally. */ + if (!(LRAND() % 200)) { + if (*dv == 0) + *dv = 0.00001; + else if (LRAND() & 1) + *dv *= 1.2; + else + *dv *= 0.8; + } +} + + + +/* Window management, etc + */ + +static void +reshape(int width, int height) +{ + int target_size = 180; + int win_size = (width > height ? height : width); + GLfloat h = (GLfloat) height / (GLfloat) width; + + glViewport(0, 0, (GLint) width, (GLint) height); + +/* glViewport(-600, -600, 1800, 1800); */ + + 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); + + /* This scale makes the box take up most of the window */ + glScalef(2.0, 2.0, 2.0); + + /* But if the window is more than a little larger than our target size, + scale the object back down, so that the bits drawn on the screen end + up rougly target_size across (actually it ends up a little larger.) + Note that the image-map bits we have are 128x128. Therefore, if the + image is magnified a lot, it looks pretty blocky. So it's better to + have a 128x128 animation on a 1280x1024 screen that looks good, than + a 1024x1024 animation that looks really pixellated. + */ + if (win_size > target_size * 1.5) { + GLfloat ratio = ((GLfloat) target_size / (GLfloat) win_size); + + ratio *= 2.0; + glScalef(ratio, ratio, ratio); + } + /* 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 +gl_init(ModeInfo * mi) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + Bool wire = MI_IS_WIREFRAME(mi); + + if (wire) + do_texture = False; + + if (!wire) { + static GLfloat pos0[] = + {-4.0, 2.0, 5.0, 1.0}; + static GLfloat pos1[] = + {12.0, 5.0, 1.0, 1.0}; + static GLfloat local[] = + {0.0}; + static GLfloat ambient[] = + {0.3, 0.3, 0.3, 1.0}; + static GLfloat spec[] = + {1.0, 1.0, 1.0, 1.0}; + static GLfloat shine[] = + {100.0}; + + glLightfv(GL_LIGHT0, GL_POSITION, pos0); + glLightfv(GL_LIGHT1, GL_POSITION, pos1); + + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); + glLightfv(GL_LIGHT1, GL_AMBIENT, ambient); + + glLightfv(GL_LIGHT0, GL_SPECULAR, spec); + glLightfv(GL_LIGHT1, GL_SPECULAR, spec); + + glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, exterior_color); + glMaterialfv(GL_FRONT, GL_SPECULAR, spec); + glMaterialfv(GL_FRONT, GL_SHININESS, shine); + + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_LIGHT1); + glDisable(GL_LIGHT1); + + glEnable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_NORMALIZE); + glEnable(GL_CULL_FACE); + } + if (do_texture) { +#ifdef HAVE_GLBINDTEXTURE + int i; +#ifdef MESA + /* E.Lassauge - 11/23/98 + * It looks like there's a bug in MESA (up to 3.1beta1) for the + * "Default" texture (named '0'). For this texture + * I added a glBindTexture and the same glTexParameteri + * as for the specific textures. Now it does'nt core + * anymore. + */ + glBindTexture(GL_TEXTURE_2D, 0); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, interior_color); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); +#endif /* MESA */ + + for (i = 0; i < 6; i++) + glGenTextures(1, &lc->texids[i]); + + parse_image_data(mi); + + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + glPixelStorei(GL_UNPACK_ROW_LENGTH, lc->texture->width); + + for (i = 0; i < 6; i++) { + int height = lc->texture->width; /* assume square */ + + glBindTexture(GL_TEXTURE_2D, lc->texids[i]); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, exterior_color); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, + lc->texture->width, height, 0, + GL_RGBA, GL_UNSIGNED_BYTE, + (lc->texture->data + + (lc->texture->bytes_per_line * height * i))); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); + } + +#else /* !HAVE_GLBINDTEXTURE */ + (void) fprintf(stderr, + "this version of GL does not support multiple texture maps.\n" + "\tGet OpenGL 1.1.\n"); + return; +#endif /* !HAVE_GLBINDTEXTURE */ + } + lc->box = glGenLists(16); + lc->star1 = lc->box + 1; + lc->star2 = lc->box + 2; + lc->tetra_une = lc->box + 3; + lc->tetra_usw = lc->box + 4; + lc->tetra_dwn = lc->box + 5; + lc->tetra_dse = lc->box + 6; + lc->tetra_mid = lc->box + 7; + lc->lid_0 = lc->box + 8; + lc->lid_1 = lc->box + 9; + lc->lid_2 = lc->box + 10; + lc->lid_3 = lc->box + 11; + lc->lid_4 = lc->box + 12; + lc->taser_base = lc->box + 13; + lc->taser_lifter = lc->box + 14; + lc->taser_slider = lc->box + 15; + + box(mi, wire); + star(mi, True, wire); + star(mi, False, wire); + tetra(mi, wire); + lid(mi, wire); + taser(mi, wire); +} + + +void +init_lament(ModeInfo * mi) +{ + lament_configuration *lc; + + if (!lcs) { + lcs = (lament_configuration *) + calloc(MI_NUM_SCREENS(mi), sizeof (lament_configuration)); + if (!lcs) { + (void) fprintf(stderr, "out of memory\n"); + return; + } + } + lc = &lcs[MI_SCREEN(mi)]; + + lc->rotx = FLOATRAND(1.0) * RANDSIGN(); + lc->roty = FLOATRAND(1.0) * RANDSIGN(); + lc->rotz = FLOATRAND(1.0) * RANDSIGN(); + + /* bell curve from 0-1.5 degrees, avg 0.75 */ + lc->dx = (FLOATRAND(1) + FLOATRAND(1) + FLOATRAND(1)) / (360 * 2); + lc->dy = (FLOATRAND(1) + FLOATRAND(1) + FLOATRAND(1)) / (360 * 2); + lc->dz = (FLOATRAND(1) + FLOATRAND(1) + FLOATRAND(1)) / (360 * 2); + + lc->d_max = lc->dx * 2; + + lc->ddx = 0.00006 + FLOATRAND(0.00003); + lc->ddy = 0.00006 + FLOATRAND(0.00003); + lc->ddz = 0.00006 + FLOATRAND(0.00003); + + lc->ddx = 0.00001; + lc->ddy = 0.00001; + lc->ddz = 0.00001; + + lc->type = LAMENT_BOX; + lc->anim_pause = 300 + (LRAND() % 100); + + if ((lc->glx_context = init_GL(mi)) != NULL) { + reshape(MI_WIDTH(mi), MI_HEIGHT(mi)); + gl_init(mi); + } +} + + +void +draw_lament(ModeInfo * mi) +{ + static int tick = 0; + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + if (!lc->glx_context) + return; + + glDrawBuffer(GL_BACK); + + glXMakeCurrent(display, window, *(lc->glx_context)); + draw(mi); + glFinish(); + glXSwapBuffers(display, window); + + if (lc->type != LAMENT_LID_ZOOM) { + rotate(&lc->rotx, &lc->dx, &lc->ddx, lc->d_max); + rotate(&lc->roty, &lc->dy, &lc->ddy, lc->d_max); + rotate(&lc->rotz, &lc->dz, &lc->ddz, lc->d_max); + } + if (lc->anim_pause) + lc->anim_pause--; + else + animate(mi); + + if (++tick > 500) { + tick = 0; + reshape(MI_WIDTH(mi), MI_HEIGHT(mi)); + } +} + +void +change_lament(ModeInfo * mi) +{ + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + + if (!lc->glx_context) + return; + /* probably something needs to be added here */ +} + +void +release_lament(ModeInfo * mi) +{ + if (lcs != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + lament_configuration *lc = &lcs[MI_SCREEN(mi)]; + + if (lc->texture) + XDestroyImage(lc->texture); + if (lc->glx_context) { + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lc->glx_context)); + + if (glIsList(lc->box)) + glDeleteLists(lc->box, 16); + } + } + (void) free((void *) lcs); + lcs = NULL; + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/moebius.c b/modes/glx/moebius.c new file mode 100644 index 00000000..b9d3ecfd --- /dev/null +++ b/modes/glx/moebius.c @@ -0,0 +1,709 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* moebius --- Moebius Strip II, an Escher-like GL scene with ants. */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)moebius.c 4.08 97/01/04 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 grammatical + * mistake. + * + * My e-mail address is + * m-vianna@usa.net + * + * Marcelo F. Vianna (Jun-01-1997) + * + * Revision History: + * 01-Jan-98: Mode separated from escher and renamed + * 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 Moebius 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 "Moebius" +#define HACK_INIT init_moebius +#define HACK_DRAW draw_moebius +#define moebius_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_moebius + + +#include +#include "e_textures.h" + +#define DEF_SOLIDMOEBIUS "False" +#define DEF_NOANTS "False" + +static int solidmoebius; +static int noants; + +static XrmOptionDescRec opts[] = +{ + {"-solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "on"}, + {"+solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "off"}, + {"-noants", ".moebius.noants", XrmoptionNoArg, (caddr_t) "on"}, + {"+noants", ".moebius.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 moebius_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct moebius_description = +{"moebius", "init_moebius", "draw_moebius", "release_moebius", + "draw_moebius", "change_moebius", NULL, &moebius_opts, + 1000, 1, 1, 1, 4, 1.0, "", + "Shows Moebius Strip II, an Escher-like GL scene with ants", 0, NULL}; + +#endif + +#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 AreObjectsDefined[2]; + GLXContext *glx_context; +} moebiusstruct; + +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 float MaterialGray5[] = +{0.5, 0.5, 0.5, 1.0}; +static float MaterialGray6[] = +{0.6, 0.6, 0.6, 1.0}; +static float MaterialGray8[] = +{0.8, 0.8, 0.8, 1.0}; + +static moebiusstruct *moebius = NULL; +static GLuint objects; + +#define NUM_SCENES 2 + +#define ObjMoebiusStrip 0 +#define ObjAntBody 1 + +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_moebius_ant(moebiusstruct * mp, float *Material, int mono) +{ + 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); + + if (mono) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray5); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Material); + if (!mp->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(); + mp->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); + if (mono) + glColor3fv(MaterialGray5); + else + glColor3fv(Material); + glVertex3f(0.00, 0.30, 0.00); + glColor3fv(MaterialGray); + glVertex3f(0.40, 0.70, 0.40); + if (mono) + glColor3fv(MaterialGray5); + else + glColor3fv(Material); + glVertex3f(0.00, 0.30, 0.00); + glColor3fv(MaterialGray); + glVertex3f(0.40, 0.70, -0.40); + glEnd(); + glBegin(GL_POINTS); + if (mono) + glColor3fv(MaterialGray6); + else + glColor3fv(MaterialRed); + glVertex3f(0.40, 0.70, 0.40); + glVertex3f(0.40, 0.70, -0.40); + glEnd(); + + /* LEFT-FRONT ARM */ + glBegin(GL_LINE_STRIP); + if (mono) + glColor3fv(MaterialGray5); + else + 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); + if (mono) + glColor3fv(MaterialGray5); + else + 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); + if (mono) + glColor3fv(MaterialGray5); + else + 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); + if (mono) + glColor3fv(MaterialGray5); + else + 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); + if (mono) + glColor3fv(MaterialGray5); + else + 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); + if (mono) + glColor3fv(MaterialGray5); + else + 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); + if (mono) + glColor3fv(MaterialGray8); + else + 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_strip(ModeInfo * mi) +{ + GLfloat Phi, Theta; + GLfloat cPhi, sPhi; + moebiusstruct *mp = &moebius[MI_SCREEN(mi)]; + int i, j; + int mono = MI_IS_MONO(mi); + + float Cx, Cy, Cz; + + if (!mp->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 (mono) + 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); + + 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 || mono) + 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 || mono) + 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(); + mp->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(mp->ant_position + 180, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(mp->ant_position / 2 + 90, 0, 1, 0); + glTranslatef(0.28, 0, -0.45); + draw_moebius_ant(mp, MaterialYellow, mono); + glPopMatrix(); + + /* DRAW YELLOW ANT */ + glPushMatrix(); + glRotatef(mp->ant_position, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(mp->ant_position / 2, 0, 1, 0); + glTranslatef(0.28, 0, -0.45); + draw_moebius_ant(mp, MaterialBlue, mono); + glPopMatrix(); + + /* DRAW GREEN ANT */ + glPushMatrix(); + glRotatef(-mp->ant_position, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(-mp->ant_position / 2, 0, 1, 0); + glTranslatef(0.28, 0, 0.45); + glRotatef(180, 1, 0, 0); + draw_moebius_ant(mp, MaterialGreen, mono); + glPopMatrix(); + + /* DRAW CYAN ANT */ + glPushMatrix(); + glRotatef(-mp->ant_position + 180, 0, 0, 1); + glTranslatef(3, 0, 0); + glRotatef(-mp->ant_position / 2 + 90, 0, 1, 0); + glTranslatef(0.28, 0, 0.45); + glRotatef(180, 1, 0, 0); + draw_moebius_ant(mp, MaterialCyan, mono); + glPopMatrix(); + } + mp->ant_position += 1; +} +#undef MoebiusDivisions +#undef MoebiusTransversals + +static void +reshape(ModeInfo * mi, int width, int height) +{ + moebiusstruct *mp = &moebius[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); + if (width >= 1024) { + glLineWidth(3); + glPointSize(3); + } else if (width >= 512) { + glLineWidth(2); + glPointSize(2); + } else { + glLineWidth(1); + glPointSize(1); + } + mp->AreObjectsDefined[ObjMoebiusStrip] = 0; + mp->AreObjectsDefined[ObjAntBody] = 0; +} + +static void +pinit(void) +{ + 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); + + /* moebius */ + glShadeModel(GL_SMOOTH); + glEnable(GL_DEPTH_TEST); + glDisable(GL_TEXTURE_2D); + glDisable(GL_CULL_FACE); + + 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_moebius(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + moebiusstruct *mp; + + if (moebius == NULL) { + if ((moebius = (moebiusstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (moebiusstruct))) == NULL) + return; + } + mp = &moebius[screen]; + mp->step = NRAND(90); + mp->ant_position = NRAND(90); + + if ((mp->glx_context = init_GL(mi)) != NULL) { + + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + glDrawBuffer(GL_BACK); + if (!glIsList(objects)) + objects = glGenLists(3); + pinit(); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_moebius(ModeInfo * mi) +{ + moebiusstruct *mp = &moebius[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!mp->glx_context) + return; + + 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_IS_ICONIC(mi)) { + glScalef(Scale4Window * mp->WindH / mp->WindW, Scale4Window, Scale4Window); + } else { + glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic); + } + + /* moebius */ + glRotatef(mp->step * 100, 1, 0, 0); + glRotatef(mp->step * 95, 0, 1, 0); + glRotatef(mp->step * 90, 0, 0, 1); + draw_moebius_strip(mi); + + glPopMatrix(); + + glFlush(); + + glXSwapBuffers(display, window); + + mp->step += 0.025; +} + +void +change_moebius(ModeInfo * mi) +{ + moebiusstruct *mp = &moebius[MI_SCREEN(mi)]; + + if (!mp->glx_context) + return; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(mp->glx_context)); + pinit(); +} + +void +release_moebius(ModeInfo * mi) +{ + if (moebius != NULL) { + (void) free((void *) moebius); + moebius = NULL; + } + if (glIsList(objects)) { + glDeleteLists(objects, 3); + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/morph3d.c b/modes/glx/morph3d.c new file mode 100644 index 00000000..a4888222 --- /dev/null +++ b/modes/glx/morph3d.c @@ -0,0 +1,891 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* morph3d --- Shows 3D morphing objects */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)morph3d.c 4.07 97/11/24 xlockmore"; + +#endif + +#undef DEBUG_CULL_FACE + +/*- + * 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 original code for this mode was written by Marcelo Fernandes Vianna + * (me...) and was inspired on a WindowsNT(R)'s screen saver (Flower Box). + * 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 grammatical + * mistake. + * + * My e-mail address is + * m-vianna@usa.net + * + * 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 */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_moebius + +ModeSpecOpt morph3d_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct morph3d_description = +{"morph3d", "init_morph3d", "draw_morph3d", "release_morph3d", + "draw_morph3d", "change_morph3d", NULL, &morph3d_opts, + 1000, 0, 1, 1, 4, 1.0, "", + "Shows GL morphing polyhedra", 0, NULL}; + +#endif + +#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.5, 0.5, 0.5, 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); +} + +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_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; + + if ((mp->glx_context = init_GL(mi)) != NULL) { + + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + mp->object = MI_COUNT(mi); + if (mp->object <= 0 || mp->object > 5) + mp->object = NRAND(5) + 1; + pinit(mi); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_morph3d(ModeInfo * mi) +{ + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!mp->glx_context) + return; + + 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_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; +} + +void +change_morph3d(ModeInfo * mi) +{ + morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + + if (!mp->glx_context) + return; + + mp->object = (mp->object) % 5 + 1; + pinit(mi); +} + +void +release_morph3d(ModeInfo * mi) +{ + if (morph3d != NULL) { + (void) free((void *) morph3d); + morph3d = NULL; + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/pipeobjs.c b/modes/glx/pipeobjs.c new file mode 100644 index 00000000..3e2179ee --- /dev/null +++ b/modes/glx/pipeobjs.c @@ -0,0 +1,3267 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)pipeobjs.c 4.04 97/07/28 xlockmore"; + +#endif + +/*- + * Points, polygons, and normal vectors to render objects for pipes. + * + * Generated by lw2ogl. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef MODE_pipes + +#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 /* MODE_pipes */ + +/* End of pipeobjs.c */ diff --git a/modes/glx/pipes.c b/modes/glx/pipes.c new file mode 100644 index 00000000..35af28ab --- /dev/null +++ b/modes/glx/pipes.c @@ -0,0 +1,1037 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* pipes --- 3D selfbuiding pipe system */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)pipes.c 4.07 97/11/24 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 grammatical + * mistake. + * + * My e-mail addresses is + * m-vianna@usa.net + * + * 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 "*delay: 1000 \n" \ + "*count: 2 \n" \ + "*cycles: 5 \n" \ + "*size: 500 \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 */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_pipes + +#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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct pipes_description = +{"pipes", "init_pipes", "draw_pipes", "release_pipes", +#if defined( MESA ) && defined( SLOW ) + "draw_pipes", +#else + "change_pipes", +#endif + "change_pipes", NULL, &pipes_opts, + 1000, 2, 5, 500, 4, 1.0, "", + "Shows a selfbuilding pipe system", 0, NULL}; + +#endif + +#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; + Window window; + 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 */ + + if (!(direction & 4)) { + glRotatef(90.0, (direction & 2) ? 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_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 +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_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->window = MI_WINDOW(mi); + if ((pp->glx_context = init_GL(mi)) != NULL) { + + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + pp->initial_rotation = -10.0; + pinit(mi, 1); + + if (factory > 0) { + pp->valve = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_BigValve); + pp->bolts = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_Bolts3D); + pp->betweenbolts = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_PipeBetweenBolts); + + pp->elbowbolts = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_ElbowBolts); + pp->elbowcoins = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_ElbowCoins); + + pp->guagehead = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_GuageHead); + pp->guageface = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_GuageFace); + pp->guagedial = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_GuageDial); + pp->guageconnector = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_GuageConnector); + } + /* else they are all 0, thanks to calloc(). */ + + if (MI_COUNT(mi) < 1 || MI_COUNT(mi) > NofSysTypes + 1) { + pp->system_type = NRAND(NofSysTypes) + 1; + } else { + pp->system_type = MI_COUNT(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); + } + } else { + MI_CLEARWINDOW(mi); + } +} + +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; + + MI_IS_DRAWN(mi) = True; + + if (!pp->glx_context) + return; + + 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_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 +} + +void +change_pipes(ModeInfo * mi) +{ + pipesstruct *pp = &pipes[MI_SCREEN(mi)]; + + if (!pp->glx_context) + return; + + 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]; + + if (pp->glx_context) { + + /* Display lists MUST be freed while their glXContext is current. */ + glXMakeCurrent(MI_DISPLAY(mi), pp->window, *(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); + } + } + + (void) free((void *) pipes); + pipes = NULL; + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/rubik.c b/modes/glx/rubik.c new file mode 100644 index 00000000..77747151 --- /dev/null +++ b/modes/glx/rubik.c @@ -0,0 +1,1861 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* rubik --- Shows a auto-solving Rubik's cube */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)rubik.c 4.07 97/11/24 xlockmore"; + +#endif + +#undef DEBUG_LISTS +#undef LMN + +/*- + * 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 an auto-solving rubik's cube "puzzle". If somebody + * intends to make a game or something based on this code, please let me + * know first, my e-mail address is provided in this comment. Marcelo. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * Since I'm not a native English speaker, my apologies for any grammatical + * mistake. + * + * My e-mail address is + * m-vianna@usa.net + * + * Marcelo F. Vianna (Jul-31-1997) + * + * Revision History: + * 26-Sep-98: Added some more movement (the cube do not stays in the screen + * center anymore. Also fixed the scale problem imediatelly after + * shuffling when the puzzle is solved. + * 08-Aug-97: Now has some internals from xrubik by David Bagley + * This should make it easier to add features. + * 02-Aug-97: Now behaves more like puzzle.c: first show the cube being + * shuffled and then being solved. A mode specific option was added: + * "+/-hideshuffling" to provide the original behavior (in which + * 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 the day off). + * There was not much to do since I could not leave home... :) + * + */ + +/*- + * Color labels mapping: + * ===================== + * + * +------------+ + * |0--> | + * || | + * |v | + * | TOP(0) | + * | | + * | | + * | 8| + * +-----------+------------+-----------+ + * |0--> |0--> |0--> | + * || || || | + * |v |v |v | + * | LEFT(1) | FRONT(2) | RIGHT(3) | + * | | | | + * | | | | + * | 8| 8| 8| + * +-----------+------------+-----------+ + * |0--> | + * || | + * |v | + * | BOTTOM(4) | rp->faces[N][X+AVSIZE*Y]= + * | | rp->cubeLoc[N][X+AVSIZE*Y]= + * | | + * | 8| +---+---+---+ + * +------------+ | | | | + * |0--> | | 0 | 1 | 2 | + * || | |---+---+---+ + * |v | | xxxxx(N) | + * | BACK(5) | | 3 | 4 | 5 | + * | | +---+---+---+ + * | | | | | | + * | 8| | 6 | 7 | 8 | + * +------------+ +---+---+---+ + * + * Map to 3d + * 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 + +#ifdef STANDALONE +#define PROGCLASS "Rubik" +#define HACK_INIT init_rubik +#define HACK_DRAW draw_rubik +#define rubik_opts xlockmore_opts +#define DEFAULTS "*delay: 40000 \n" \ + "*count: -30 \n" \ + "*cycles: 5 \n" \ + "*size: -6 \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_rubik + +#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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct rubik_description = +{"rubik", "init_rubik", "draw_rubik", "release_rubik", + "draw_rubik", "change_rubik", NULL, &rubik_opts, + 10000, -30, 5, -6, 4, 1.0, "", + "Shows an auto-solving Rubik's Cube", 0, NULL}; + +#endif + +#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 ACTION_SOLVE 1 +#define ACTION_SHUFFLE 0 + +#define DELAY_AFTER_SHUFFLING 5 +#define DELAY_AFTER_SOLVING 20 + +/*************************************************************************/ + +#define MINSIZE 2 +#ifdef LMN /* LxMxN not completed yet... */ +#define MAXSIZEX (rp->sizex) +#define MAXSIZEY (rp->sizey) +#define MAXSIZEZ (rp->sizez) +#define AVSIZE (rp->avsize) +#define MAXSIZE (rp->maxsize) +#define AVSIZESQ (rp->avsizeSq) +#define MAXSIZESQ (rp->maxsizeSq) +#else +#define MAXSIZEX (rp->size) +#define MAXSIZEY (rp->size) +#define MAXSIZEZ (rp->size) +#define AVSIZE (rp->size) +#define MAXSIZE (rp->size) +#define AVSIZESQ (rp->sizeSq) +#define MAXSIZESQ (rp->sizeSq) +#endif +#define MAXSIZEXY (MAXSIZEX*MAXSIZEY) +#define MAXSIZEZY (MAXSIZEZ*MAXSIZEY) +#define MAXSIZEXZ (MAXSIZEX*MAXSIZEZ) +#define LASTX (MAXSIZEX-1) +#define LASTY (MAXSIZEY-1) +#define LASTZ (MAXSIZEZ-1) +/* These are not likely to change but... */ +#define FIRSTX 0 +#define FIRSTY 0 +#define FIRSTZ 0 + +#define Scale4Window (0.9/AVSIZE) +#define Scale4Iconic (2.1/AVSIZE) + +#define MAXORIENT 4 /* Number of orientations of a square */ +#define MAXFACES 6 /* Number of faces */ + +/* Directions relative to the face of a cubie */ +#define TOP 0 +#define RIGHT 1 +#define BOTTOM 2 +#define LEFT 3 +#define CW (MAXORIENT+1) +#define CCW (2*MAXORIENT-1) + +#define TOP_FACE 0 +#define LEFT_FACE 1 +#define FRONT_FACE 2 +#define RIGHT_FACE 3 +#define BOTTOM_FACE 4 +#define BACK_FACE 5 +#define NO_FACE (MAXFACES) +#define NO_ROTATION (2*MAXORIENT) +#define NO_DEPTH MAXSIZE + +#define REVX(a) (MAXSIZEX - a - 1) +#define REVY(a) (MAXSIZEY - a - 1) +#define REVZ(a) (MAXSIZEZ - a - 1) + +typedef struct _RubikLoc { + int face; + int rotation; /* Not used yet */ +} RubikLoc; + +typedef struct _RubikRowNext { + int face, direction, sideFace; +} RubikRowNext; + +typedef struct _RubikMove { + int face, direction; + int position; +} RubikMove; + +typedef struct _RubikSlice { + int face, rotation; + int depth; +} RubikSlice; + +/*- + * Pick a face and a direction on face the next face and orientation + * is then known. + */ +static RubikLoc slideNextRow[MAXFACES][MAXORIENT] = +{ + { + {5, TOP}, + {3, RIGHT}, + {2, TOP}, + {1, LEFT}}, + { + {0, RIGHT}, + {2, TOP}, + {4, LEFT}, + {5, BOTTOM}}, + { + {0, TOP}, + {3, TOP}, + {4, TOP}, + {1, TOP}}, + { + {0, LEFT}, + {5, BOTTOM}, + {4, RIGHT}, + {2, TOP}}, + { + {2, TOP}, + {3, LEFT}, + {5, TOP}, + {1, RIGHT}}, + { + {4, TOP}, + {3, BOTTOM}, + {0, TOP}, + {1, BOTTOM}} +}; + +/*- + * Examine cubie 0 on each face, its 4 movements (well only 2 since the + * other 2 will be opposites) and translate it into slice movements). + * Beware.. using this for NxNxN makes some assumptions that referenced + * cubes are along the diagonal top-left to bottom-right. + * CW = DEEP Depth CCW == SHALLOW Depth with reference to faces 0, 1, and 2 + */ +static RubikLoc rotateSlice[MAXFACES][MAXORIENT / 2] = +{ + { + {1, CCW}, + {2, CW}, + }, + { + {2, CW}, + {0, CCW}, + }, + { + {1, CCW}, + {0, CCW}, + }, + { + {2, CCW}, + {0, CCW}, + }, + { + {1, CCW}, + {2, CCW}, + }, + { + {1, CCW}, + {0, CW}, + } +}; + +/*- + * Rotate face clockwise by a number of orients, then the top of the + * face then points to this face + */ +static int rowToRotate[MAXFACES][MAXORIENT] = +{ + {3, 2, 1, 5}, + {2, 4, 5, 0}, + {3, 4, 1, 0}, + {5, 4, 2, 0}, + {3, 5, 1, 2}, + {3, 0, 1, 4} +}; + +/* + * This translates a clockwise move to something more manageable + */ +static RubikRowNext rotateToRow[MAXFACES] = /*CW to min face */ +{ + {1, LEFT, TOP}, + {0, BOTTOM, LEFT}, + {0, RIGHT, BOTTOM}, + {0, TOP, RIGHT}, + {1, RIGHT, BOTTOM}, + {0, LEFT, TOP} +}; + +typedef struct { + GLint WindH, WindW; + GLfloat step; + RubikMove *moves; + int storedmoves; + int shufflingmoves; +#ifdef LMN /* Under construction */ + int sizex, sizey, sizez; + int avsize, maxsize; + int avsizeSq, maxsizeSq; +#else + int size, sizeSq; +#endif + int action; + int done; + GLfloat anglestep; + RubikLoc *cubeLoc[MAXFACES]; + RubikLoc *rowLoc[MAXORIENT]; + RubikMove movement; + GLfloat rotatestep; + GLfloat PX, PY, VX, VY; + 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[] = +{0.9, 0.45, 0.36, 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 float MaterialGray3[] = +{0.3, 0.3, 0.3, 1.0}; +static float MaterialGray4[] = +{0.4, 0.4, 0.4, 1.0}; +static float MaterialGray5[] = +{0.5, 0.5, 0.5, 1.0}; +static float MaterialGray6[] = +{0.6, 0.6, 0.6, 1.0}; +static float MaterialGray7[] = +{0.7, 0.7, 0.7, 1.0}; + +static rubikstruct *rubik = NULL; +static GLuint objects = 0; + +#define ObjCubit 0 + +static void +pickcolor(int C, int mono) +{ + switch (C) { + case TOP_FACE: + if (mono) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray3); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialRed); + break; + case LEFT_FACE: + if (mono) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray6); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialYellow); + break; + case FRONT_FACE: + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + break; + case RIGHT_FACE: + if (mono) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray4); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGreen); + break; + case BOTTOM_FACE: + if (mono) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray7); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialOrange); + break; + case BACK_FACE: + if (mono) + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray5); + else + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialBlue); + break; +#if 0 + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialCyan); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialMagenta); +#endif + } +} + + +static void +draw_cubit(ModeInfo * mi, + int back, int front, int left, int right, int bottom, int top) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + int mono = MI_IS_MONO(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 != NO_FACE) { + glBegin(GL_POLYGON); + pickcolor(back, mono); + 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 != NO_FACE) { + glBegin(GL_POLYGON); + pickcolor(front, mono); + 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 != NO_FACE) { + glBegin(GL_POLYGON); + pickcolor(left, mono); + 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 != NO_FACE) { + glBegin(GL_POLYGON); + pickcolor(right, mono); + 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 != NO_FACE) { + glBegin(GL_POLYGON); + pickcolor(bottom, mono); + 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 != NO_FACE) { + glBegin(GL_POLYGON); + pickcolor(top, mono); + 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(); + } +} + + +static void +convertMove(rubikstruct * rp, RubikMove move, RubikSlice * slice) +{ + RubikLoc plane; + + plane = rotateSlice[(int) move.face][move.direction % 2]; + (*slice).face = plane.face; + (*slice).rotation = plane.rotation; + if ((*slice).rotation == CW) /* I just know this to be true... */ + (*slice).depth = AVSIZESQ - 1 - move.position; + else + (*slice).depth = move.position; + (*slice).depth = (*slice).depth / AVSIZE; + /* If (*slice).depth = 0 then face 0, face 1, or face 2 moves */ + if (move.direction / 2) + (*slice).rotation = (plane.rotation == CW) ? CCW : CW; +} + +/* Assume for the moment that the size is at least 2 */ +static void +draw_cube(ModeInfo * mi) +{ +#define S1 1 +#define SX ((GLint)S1*(MAXSIZEX-1)) +#define SY ((GLint)S1*(MAXSIZEY-1)) +#define SZ ((GLint)S1*(MAXSIZEZ-1)) +#define HALFX (((GLfloat)MAXSIZEX-1.0)/2.0) +#define HALFY (((GLfloat)MAXSIZEY-1.0)/2.0) +#define HALFZ (((GLfloat)MAXSIZEZ-1.0)/2.0) +#define MIDX(a) (((GLfloat)(2*a-MAXSIZEX+1))/2.0) +#define MIDY(a) (((GLfloat)(2*a-MAXSIZEY+1))/2.0) +#define MIDZ(a) (((GLfloat)(2*a-MAXSIZEZ+1))/2.0) + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + RubikSlice slice; + GLfloat rotatestep; + int i, j, k; + + if (rp->movement.face == NO_FACE) { + slice.face = NO_FACE; + slice.rotation = NO_ROTATION; + slice.depth = NO_DEPTH; + } else { + convertMove(rp, rp->movement, &slice); + } + rotatestep = (slice.rotation == CCW) ? rp->rotatestep : -rp->rotatestep; + + +/*- + * The glRotatef() routine transforms the coordinate system for every future + * vertex specification (this is not so simple, but by now comprehending this + * is sufficient). So if you want to rotate the inner slice, you can draw + * one slice, rotate the anglestep for the centerslice, draw the inner slice, + * rotate reversely and draw the other slice. + * There is a sequence for drawing cubies for each axis being moved... + */ + switch (slice.face) { + case NO_FACE: + case TOP_FACE: /* BOTTOM_FACE too */ + glPushMatrix(); + if (slice.depth == MAXSIZEY - 1) + glRotatef(rotatestep, 0, HALFY, 0); + + glTranslatef(-HALFX, -HALFY, -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * LASTZ].face, NO_FACE); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * REVZ(k)].face, NO_FACE); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * LASTY].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, -SZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * FIRSTY].face, NO_FACE, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * LASTZ].face, NO_FACE); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * REVZ(k)].face, NO_FACE); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * LASTY].face, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * FIRSTZ].face, NO_FACE); + } + glTranslatef(1, 0, -SZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * LASTZ].face, NO_FACE); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * REVZ(k)].face, NO_FACE); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * LASTY].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * FIRSTZ].face, NO_FACE); + glPopMatrix(); + for (j = 1; j < MAXSIZEY - 1; j++) { + glPushMatrix(); + if (slice.depth == REVY(j)) + glRotatef(rotatestep, 0, HALFY, 0); + glTranslatef(-HALFX, MIDY(j), -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * j].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * REVY(j)].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(1, 0, -SZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * j].face, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE); + /* Center */ + glTranslatef(0, 0, SZ); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * REVY(j)].face, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(S1, 0, -SZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * j].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * REVY(j)].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + glPopMatrix(); + } + if (slice.depth == 0) + glRotatef(rotatestep, 0, HALFY, 0); + + glTranslatef(-HALFX, HALFY, -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * LASTY].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * k].face); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * LASTZ].face); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, -SZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * LASTY].face, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * FIRSTZ].face); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * k].face); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * FIRSTY].face, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * LASTZ].face); + } + glTranslatef(S1, 0, -SZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * LASTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * FIRSTZ].face); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * k].face); + } + glTranslatef(0, 0, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * FIRSTY].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * LASTZ].face); + break; + case LEFT_FACE: /* RIGHT_FACE too */ + /* rotatestep is negative because the RIGHT face is the default here */ + glPushMatrix(); + if (slice.depth == 0) + glRotatef(-rotatestep, HALFX, 0, 0); + + glTranslatef(-HALFX, -HALFY, -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * LASTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * j].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * LASTY].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, -SY, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * REVZ(k)].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * k].face); + } + glTranslatef(0, -SY, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * LASTY].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * REVY(j)].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * LASTZ].face); + glPopMatrix(); + for (i = 1; i < MAXSIZEX - 1; i++) { + glPushMatrix(); + if (slice.depth == i) + glRotatef(-rotatestep, HALFX, 0, 0); + glTranslatef(MIDX(i), -HALFY, -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * FIRSTY].face, NO_FACE, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * LASTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * j].face, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * LASTY].face, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * FIRSTZ].face); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, -SY, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * REVZ(k)].face, NO_FACE); + /* Center */ + glTranslatef(0, SY, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * k].face); + } + glTranslatef(0, -SY, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * LASTY].face, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * FIRSTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * REVY(j)].face, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * FIRSTY].face, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * LASTZ].face); + glPopMatrix(); + } + if (slice.depth == MAXSIZEX - 1) + glRotatef(-rotatestep, HALFX, 0, 0); + glTranslatef(HALFX, -HALFY, -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * LASTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * j].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * LASTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * FIRSTZ].face); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glTranslatef(0, -SY, S1); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * REVZ(k)].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * k].face); + } + glTranslatef(0, -SY, S1); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * LASTY].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * FIRSTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * REVY(j)].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(0, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * FIRSTY].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * LASTZ].face); + break; + case FRONT_FACE: /* BACK_FACE too */ + glPushMatrix(); + if (slice.depth == MAXSIZEZ - 1) + glRotatef(rotatestep, 0, 0, HALFZ); + + glTranslatef(-HALFX, -HALFY, -HALFZ); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * LASTZ].face, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * FIRSTY].face, NO_FACE, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * LASTZ].face, NO_FACE); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * LASTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(-SX, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * j].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * j].face, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * j].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(-SX, S1, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][FIRSTX + MAXSIZEX * LASTY].face, NO_FACE, + rp->cubeLoc[LEFT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][i + MAXSIZEX * LASTY].face, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * FIRSTZ].face); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + rp->cubeLoc[BACK_FACE][LASTX + MAXSIZEX * LASTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * FIRSTZ].face); + glPopMatrix(); + for (k = 1; k < MAXSIZEZ - 1; k++) { + glPushMatrix(); + if (slice.depth == REVZ(k)) + glRotatef(rotatestep, 0, 0, HALFZ); + glTranslatef(-HALFX, -HALFY, MIDZ(k)); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * REVZ(k)].face, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * REVZ(k)].face, NO_FACE); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * REVZ(k)].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(-SX, S1, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + /* Center */ + glTranslatef(SX, 0, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(-SX, S1, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + rp->cubeLoc[LEFT_FACE][k + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * k].face); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * k].face); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[RIGHT_FACE][REVZ(k) + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * k].face); + glPopMatrix(); + } + if (slice.depth == 0) + glRotatef(rotatestep, 0, 0, HALFZ); + glTranslatef(-HALFX, -HALFY, HALFZ); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * LASTY].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * LASTY].face, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][FIRSTX + MAXSIZEX * FIRSTZ].face, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * LASTY].face, + NO_FACE, NO_FACE, + rp->cubeLoc[BOTTOM_FACE][i + MAXSIZEX * FIRSTZ].face, NO_FACE); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * LASTY].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * LASTY].face, + rp->cubeLoc[BOTTOM_FACE][LASTX + MAXSIZEX * FIRSTZ].face, NO_FACE); + for (j = 1; j < MAXSIZEY - 1; j++) { + glTranslatef(-SX, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * REVY(j)].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * REVY(j)].face, NO_FACE, + NO_FACE, NO_FACE); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * REVY(j)].face, + NO_FACE, NO_FACE, + NO_FACE, NO_FACE); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * REVY(j)].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * REVY(j)].face, + NO_FACE, NO_FACE); + } + glTranslatef(-SX, S1, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][FIRSTX + MAXSIZEX * FIRSTY].face, + rp->cubeLoc[LEFT_FACE][LASTZ + MAXSIZEZ * FIRSTY].face, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][FIRSTX + MAXSIZEX * LASTZ].face); + for (i = 1; i < MAXSIZEX - 1; i++) { + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][i + MAXSIZEX * FIRSTY].face, + NO_FACE, NO_FACE, + NO_FACE, rp->cubeLoc[TOP_FACE][i + MAXSIZEX * LASTZ].face); + } + glTranslatef(S1, 0, 0); + draw_cubit(mi, + NO_FACE, rp->cubeLoc[FRONT_FACE][LASTX + MAXSIZEX * FIRSTY].face, + NO_FACE, rp->cubeLoc[RIGHT_FACE][FIRSTZ + MAXSIZEZ * FIRSTY].face, + NO_FACE, rp->cubeLoc[TOP_FACE][LASTX + MAXSIZEX * LASTZ].face); + break; + } +#undef S1 +} + +/* From David Bagley's xrubik. Used by permission. ;) */ +static void +readRC(rubikstruct * rp, int face, int dir, int h, int orient, int size) +{ + int g; + + if (dir == TOP || dir == BOTTOM) + for (g = 0; g < size; g++) + rp->rowLoc[orient][g] = + rp->cubeLoc[face][g * size + h]; + else /* dir == RIGHT || dir == LEFT */ + for (g = 0; g < size; g++) + rp->rowLoc[orient][g] = + rp->cubeLoc[face][h * size + g]; +} + +static void +rotateRC(rubikstruct * rp, int rotate, int orient, int size) +{ + int g; + + for (g = 0; g < size; g++) + rp->rowLoc[orient][g].rotation = + (rp->rowLoc[orient][g].rotation + rotate) % MAXORIENT; +} + +static void +reverseRC(rubikstruct * rp, int orient, int size) +{ + int g; + RubikLoc temp; + + for (g = 0; g < size / 2; g++) { + temp = rp->rowLoc[orient][size - 1 - g]; + rp->rowLoc[orient][size - 1 - g] = rp->rowLoc[orient][g]; + rp->rowLoc[orient][g] = temp; + } +} + +static void +writeRC(rubikstruct * rp, int face, int dir, int h, int orient, int size) +{ + int g, position; + + if (dir == TOP || dir == BOTTOM) { + for (g = 0; g < size; g++) { + position = g * size + h; + rp->cubeLoc[face][position] = rp->rowLoc[orient][g]; + /* DrawSquare(face, position); */ + } + } else { /* dir == RIGHT || dir == LEFT */ + for (g = 0; g < size; g++) { + position = h * size + g; + rp->cubeLoc[face][position] = rp->rowLoc[orient][g]; + /* DrawSquare(face, position); */ + } + } +} + +static void +rotateFace(rubikstruct * rp, int face, int direction) +{ + int position, i, j; + RubikLoc *faceLoc = NULL; + + if ((faceLoc = (RubikLoc *) malloc(AVSIZESQ * sizeof (RubikLoc))) == NULL) + (void) fprintf(stderr, + "Could not allocate memory for rubik face position info\n"); + /* Read Face */ + for (position = 0; position < AVSIZESQ; position++) + faceLoc[position] = rp->cubeLoc[face][position]; + /* Write Face */ + for (position = 0; position < AVSIZESQ; position++) { + i = position % AVSIZE; + j = position / AVSIZE; + rp->cubeLoc[face][position] = (direction == CW) ? + faceLoc[(AVSIZE - i - 1) * AVSIZE + j] : + faceLoc[i * AVSIZE + AVSIZE - j - 1]; + rp->cubeLoc[face][position].rotation = + (rp->cubeLoc[face][position].rotation + direction - MAXORIENT) % + MAXORIENT; + /* DrawSquare(face, position); */ + } + if (faceLoc != NULL) + (void) free((void *) faceLoc); +} + +static void +moveRubik(rubikstruct * rp, int face, int direction, int position) +{ + int newFace, newDirection, rotate, reverse = False; + int h, k, newH = 0; + int i, j; + + if (direction == CW || direction == CCW) { + direction = (direction == CCW) ? + (rotateToRow[face].direction + 2) % MAXORIENT : + rotateToRow[face].direction; + i = j = (rotateToRow[face].sideFace == RIGHT || + rotateToRow[face].sideFace == BOTTOM) ? AVSIZE - 1 : 0; + face = rotateToRow[face].face; + position = j * AVSIZE + i; + } + i = position % AVSIZE; + j = position / AVSIZE; + h = (direction == TOP || direction == BOTTOM) ? i : j; + /* rotate sides CW or CCW */ + if (h == AVSIZE - 1) { + newDirection = (direction == TOP || direction == BOTTOM) ? + TOP : RIGHT; + if (direction == TOP || direction == RIGHT) + rotateFace(rp, rowToRotate[face][newDirection], CW); + else /* direction == BOTTOM || direction == LEFT */ + rotateFace(rp, rowToRotate[face][newDirection], CCW); + } + if (h == 0) { + newDirection = (direction == TOP || direction == BOTTOM) ? + BOTTOM : LEFT; + if (direction == TOP || direction == RIGHT) + rotateFace(rp, rowToRotate[face][newDirection], CCW); + else /* direction == BOTTOM || direction == LEFT */ + rotateFace(rp, rowToRotate[face][newDirection], CW); + } + /* Slide rows */ + readRC(rp, face, direction, h, 0, AVSIZE); + for (k = 1; k <= MAXORIENT; k++) { + newFace = slideNextRow[face][direction].face; + rotate = slideNextRow[face][direction].rotation; + newDirection = (rotate + direction) % MAXORIENT; + switch (rotate) { + case TOP: + newH = h; + reverse = False; + break; + case RIGHT: + if (newDirection == TOP || newDirection == BOTTOM) { + newH = AVSIZE - 1 - h; + reverse = False; + } else { /* newDirection == RIGHT || newDirection == LEFT */ + newH = h; + reverse = True; + } + break; + case BOTTOM: + newH = AVSIZE - 1 - h; + reverse = True; + break; + case LEFT: + if (newDirection == TOP || newDirection == BOTTOM) { + newH = h; + reverse = True; + } else { /* newDirection == RIGHT || newDirection == LEFT */ + newH = AVSIZE - 1 - h; + reverse = False; + } + break; + default: + (void) printf("moveRubik: rotate %d\n", rotate); + } + if (k != MAXORIENT) + readRC(rp, newFace, newDirection, newH, k, AVSIZE); + rotateRC(rp, rotate, k - 1, AVSIZE); + if (reverse == True) + reverseRC(rp, k - 1, AVSIZE); + writeRC(rp, newFace, newDirection, newH, k - 1, AVSIZE); + face = newFace; + direction = newDirection; + h = newH; + } +} + +#ifdef DEBUG +void +printCube(rubikstruct * rp) +{ + int face, position; + + for (face = 0; face < MAXFACES; face++) { + for (position = 0; position < AVSIZESQ; position++) { + (void) printf("%d %d ", rp->cubeLoc[face][position].face, + rp->cubeLoc[face][position].rotation); + if (!((position + 1) % AVSIZE)) + (void) printf("\n"); + } + (void) printf("\n"); + } + (void) printf("\n"); +} + +#endif + +static void +evalmovement(ModeInfo * mi, RubikMove movement) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + +#ifdef DEBUG + printCube(rp); +#endif + if (movement.face < 0 || movement.face >= MAXFACES) + return; + + moveRubik(rp, movement.face, movement.direction, movement.position); + +} + +static Bool +compare_moves(rubikstruct * rp, RubikMove move1, RubikMove move2, Bool opp) +{ + RubikSlice slice1, slice2; + + convertMove(rp, move1, &slice1); + convertMove(rp, move2, &slice2); + if (slice1.face == slice2.face && + slice1.depth == slice2.depth) { + if (slice1.rotation == slice2.rotation) { /* CW or CCW */ + if (!opp) + return True; + } else { + if (opp) + return True; + } + } + return False; +} + +static void +shuffle(ModeInfo * mi) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + int i, face, position; + RubikMove move; + + AVSIZE = MI_SIZE(mi); + if (AVSIZE < -MINSIZE) + AVSIZE = NRAND(-AVSIZE - MINSIZE + 1) + MINSIZE; + else if (AVSIZE < MINSIZE) + AVSIZE = MINSIZE; + /* Let me waste a little space for the moment */ + /* Future cube to be LxMxN and not just NxNxN, but not done yet */ + AVSIZESQ = AVSIZE * AVSIZE; +#ifdef LMN + MAXSIZEX = AVSIZE; + MAXSIZEY = AVSIZE; + MAXSIZEZ = AVSIZE; + MAXSIZE = AVSIZE; + MAXSIZESQ = AVSIZESQ; +#endif + + for (face = 0; face < MAXFACES; face++) { + if (rp->cubeLoc[face] != NULL) + (void) free((void *) rp->cubeLoc[face]); + if ((rp->cubeLoc[face] = + (RubikLoc *) malloc(AVSIZESQ * sizeof (RubikLoc))) == NULL) + (void) fprintf(stderr, + "Could not allocate memory for rubik cube position info\n"); + for (position = 0; position < AVSIZESQ; position++) { + rp->cubeLoc[face][position].face = face; + rp->cubeLoc[face][position].rotation = TOP; + } + } + for (i = 0; i < MAXORIENT; i++) { + if (rp->rowLoc[i] != NULL) + (void) free((void *) rp->rowLoc[i]); + if ((rp->rowLoc[i] = + (RubikLoc *) malloc(AVSIZE * sizeof (RubikLoc))) == NULL) + (void) fprintf(stderr, + "Could not allocate memory for rubik row position info\n"); + } + rp->storedmoves = MI_COUNT(mi); + if (rp->storedmoves < 0) { + if (rp->moves != NULL) + (void) free((void *) rp->moves); + rp->moves = NULL; + rp->storedmoves = NRAND(-rp->storedmoves) + 1; + } + if ((rp->storedmoves) && (rp->moves == NULL)) + if ((rp->moves = + (RubikMove *) calloc(rp->storedmoves + 1, sizeof (RubikMove))) == NULL) + (void) fprintf(stderr, + "Could not allocate memory for rubik move buffer\n"); + + if (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 { + move.face = NRAND(6); + move.direction = NRAND(4); /* Exclude CW and CCW, its ok */ + /* + * Randomize position along diagonal, each plane gets an equal chance. + * This trick will only work for NxNxN cubes + * draw_cube DEPENDS on that they are chosen this way. + */ + move.position = NRAND(AVSIZE) * (AVSIZE + 1); + + + condition = 1; + + if (i > 0) /* avoid immediate undoing moves */ + if (compare_moves(rp, move, rp->moves[i - 1], True)) + condition = 0; + if (i > 1) /* avoid 3 consecutive identical moves */ + if (compare_moves(rp, move, rp->moves[i - 1], False) && + compare_moves(rp, move, rp->moves[i - 2], False)) + condition = 0; + /* + * Still some silly moves being made.... + */ + } while (!condition); + if (hideshuffling) + evalmovement(mi, move); + rp->moves[i] = move; + } + rp->VX = 0.05; + if (NRAND(100) < 50) + rp->VX *= -1; + rp->VY = 0.05; + if (NRAND(100) < 50) + rp->VY *= -1; + rp->movement.face = NO_FACE; + rp->rotatestep = 0; + rp->action = hideshuffling ? ACTION_SOLVE : ACTION_SHUFFLE; + rp->shufflingmoves = 0; + rp->done = 0; +} + +static void +reshape(ModeInfo * mi, int width, int height) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + + glViewport(0, 0, rp->WindW = (GLint) width, rp->WindH = (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); + glMatrixMode(GL_MODELVIEW); + + rp->AreObjectsDefined[ObjCubit] = 0; +} + +static void +pinit(ModeInfo * mi) +{ + glClearDepth(1.0); + glClearColor(0.0, 0.0, 0.0, 1.0); + glColor3f(1.0, 1.0, 1.0); + + glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); + glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); + glLightfv(GL_LIGHT0, GL_POSITION, position0); + glLightfv(GL_LIGHT1, GL_AMBIENT, ambient); + glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse); + glLightfv(GL_LIGHT1, GL_POSITION, position1); + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); + glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_LIGHT1); + glEnable(GL_DEPTH_TEST); + glEnable(GL_NORMALIZE); + glEnable(GL_CULL_FACE); + + glShadeModel(GL_FLAT); + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular); + + shuffle(mi); +} + +void +init_rubik(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + rubikstruct *rp; + + if (rubik == NULL) { + if ((rubik = (rubikstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (rubikstruct))) == NULL) + return; + } + rp = &rubik[screen]; + rp->step = NRAND(90); + rp->PX = ((float) LRAND() / (float) MAXRAND) * 2.0 - 1.0; + rp->PY = ((float) LRAND() / (float) MAXRAND) * 2.0 - 1.0; + + if ((rp->glx_context = init_GL(mi)) != NULL) { + + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + objects = glGenLists(1); + pinit(mi); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_rubik(ModeInfo * mi) +{ + int bounced = 0; + + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!rp->glx_context) + return; + + 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); + + rp->PX += rp->VX; + rp->PY += rp->VY; + + if (rp->PY < -1) { + rp->PY += (-1) - (rp->PY); + rp->VY = -rp->VY; + bounced = 1; + } + if (rp->PY > 1) { + rp->PY -= (rp->PY) - 1; + rp->VY = -rp->VY; + bounced = 1; + } + if (rp->PX < -1) { + rp->PX += (-1) - (rp->PX); + rp->VX = -rp->VX; + bounced = 1; + } + if (rp->PX > 1) { + rp->PX -= (rp->PX) - 1; + rp->VX = -rp->VX; + bounced = 1; + } + if (bounced) { + rp->VX += ((float) LRAND() / (float) MAXRAND) * 0.02 - 0.01; + rp->VX += ((float) LRAND() / (float) MAXRAND) * 0.02 - 0.01; + if (rp->VX > 0.06) + rp->VX = 0.06; + if (rp->VY > 0.06) + rp->VY = 0.06; + if (rp->VX < -0.06) + rp->VX = -0.06; + if (rp->VY < -0.06) + rp->VY = -0.06; + } + if (!MI_IS_ICONIC(mi)) { + glTranslatef(rp->PX, rp->PY, 0); + 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); + + draw_cube(mi); + glXSwapBuffers(display, window); + + if (rp->action == ACTION_SHUFFLE) { + if (rp->done) { + if (++rp->rotatestep > DELAY_AFTER_SHUFFLING) { + rp->movement.face = NO_FACE; + rp->rotatestep = 0; + rp->action = ACTION_SOLVE; + rp->done = 0; + } + } else { + if (rp->movement.face == NO_FACE) { + if (rp->shufflingmoves < rp->storedmoves) { + rp->rotatestep = 0; + rp->movement = rp->moves[rp->shufflingmoves]; + } else { + rp->rotatestep = 0; + rp->done = 1; + } + } else { + rp->rotatestep += rp->anglestep; + if (rp->rotatestep > 90) { + evalmovement(mi, rp->movement); + rp->shufflingmoves++; + rp->movement.face = NO_FACE; + } + } + } + } else { + if (rp->done) { + if (++rp->rotatestep > DELAY_AFTER_SOLVING) + shuffle(mi); + } else { + if (rp->movement.face == NO_FACE) { + if (rp->storedmoves > 0) { + rp->rotatestep = 0; + rp->movement = rp->moves[rp->storedmoves - 1]; + rp->movement.direction = (rp->movement.direction + (MAXORIENT / 2)) % + MAXORIENT; + } else { + rp->rotatestep = 0; + rp->done = 1; + } + } else { + rp->rotatestep += rp->anglestep; + if (rp->rotatestep > 90) { + evalmovement(mi, rp->movement); + rp->storedmoves--; + rp->movement.face = NO_FACE; + } + } + } + } + + glPopMatrix(); + + glFlush(); + + rp->step += 0.05; +} + +void +change_rubik(ModeInfo * mi) +{ + rubikstruct *rp = &rubik[MI_SCREEN(mi)]; + + if (!rp->glx_context) + return; + 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]; + int i; + + for (i = 0; i < MAXFACES; i++) + if (rp->cubeLoc[i] != NULL) + (void) free((void *) rp->cubeLoc[i]); + for (i = 0; i < MAXORIENT; i++) + if (rp->rowLoc[i] != NULL) + (void) free((void *) rp->rowLoc[i]); + if (rp->moves != NULL) + (void) free((void *) rp->moves); + } + (void) free((void *) rubik); + rubik = NULL; + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/s1_1.c b/modes/glx/s1_1.c new file mode 100644 index 00000000..fb3001fc --- /dev/null +++ b/modes/glx/s1_1.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_1.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_1.c */ diff --git a/modes/glx/s1_2.c b/modes/glx/s1_2.c new file mode 100644 index 00000000..1517acf1 --- /dev/null +++ b/modes/glx/s1_2.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_2.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_2.c */ diff --git a/modes/glx/s1_3.c b/modes/glx/s1_3.c new file mode 100644 index 00000000..8bf30398 --- /dev/null +++ b/modes/glx/s1_3.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_3.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_3.c */ diff --git a/modes/glx/s1_4.c b/modes/glx/s1_4.c new file mode 100644 index 00000000..cfff3a62 --- /dev/null +++ b/modes/glx/s1_4.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_4.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_4.c */ diff --git a/modes/glx/s1_5.c b/modes/glx/s1_5.c new file mode 100644 index 00000000..f858d662 --- /dev/null +++ b/modes/glx/s1_5.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_5.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_5.c */ diff --git a/modes/glx/s1_6.c b/modes/glx/s1_6.c new file mode 100644 index 00000000..cdd589f2 --- /dev/null +++ b/modes/glx/s1_6.c @@ -0,0 +1,1057 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_6.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_6.c */ diff --git a/modes/glx/s1_b.c b/modes/glx/s1_b.c new file mode 100644 index 00000000..73a5fefd --- /dev/null +++ b/modes/glx/s1_b.c @@ -0,0 +1,537 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)s1_b.c 4.04 97/07/28 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 MODE_sproingies + +#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 /* MODE_sproingies */ + +/* End of s1_b.c */ diff --git a/modes/glx/shark.c b/modes/glx/shark.c new file mode 100644 index 00000000..f51aa892 --- /dev/null +++ b/modes/glx/shark.c @@ -0,0 +1,1403 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)shark.c 1.2 98/06/16 xlockmore"; + +#endif + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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 original code for this mode was written by Mark J. Kilgard + * as a demo for openGL programming. + * + * Porting it to xlock was possible by comparing the original Mesa's morph3d + * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna + * (look at morph3d.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (May-13-1998) + * + */ + +/** + * (c) Copyright 1993, 1994, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * Permission to use, copy, modify, and distribute this software for + * any purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies and that both the copyright notice + * and this permission notice appear in supporting documentation, and that + * the name of Silicon Graphics, Inc. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. + * + * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" + * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, + * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY + * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, + * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF + * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + * + * US Government Users Restricted Rights + * Use, duplication, or disclosure by the Government is subject to + * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph + * (c)(1)(ii) of the Rights in Technical Data and Computer Software + * clause at DFARS 252.227-7013 and/or in similar or successor + * clauses in the FAR or the DOD or NASA FAR Supplement. + * Unpublished-- rights reserved under the copyright laws of the + * United States. Contractor/manufacturer is Silicon Graphics, + * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. + * + * OpenGL(TM) is a trademark of Silicon Graphics, Inc. + */ + +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef MODE_atlantis + +#ifdef STANDALONE +#include +#endif + +#include "atlantis.h" +/* *INDENT-OFF* */ +#if 0 +static float N001[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N002[3] = {0.000077 ,-0.020611 ,0.999788}; +static float N003[3] = {0.961425 ,0.258729 ,-0.093390}; +static float N004[3] = {0.510811 ,-0.769633 ,-0.383063}; +static float N005[3] = {0.400123 ,0.855734 ,-0.328055}; +static float N006[3] = {-0.770715 ,0.610204 ,-0.183440}; +static float N007[3] = {-0.915597 ,-0.373345 ,-0.149316}; +static float N008[3] = {-0.972788 ,0.208921 ,-0.100179}; +static float N009[3] = {-0.939713 ,-0.312268 ,-0.139383}; +static float N010[3] = {-0.624138 ,-0.741047 ,-0.247589}; +static float N011[3] = {0.591434 ,-0.768401 ,-0.244471}; +static float N012[3] = {0.935152 ,-0.328495 ,-0.132598}; +static float N013[3] = {0.997102 ,0.074243 ,-0.016593}; +static float N014[3] = {0.969995 ,0.241712 ,-0.026186}; +static float N015[3] = {0.844539 ,0.502628 ,-0.184714}; +static float N016[3] = {-0.906608 ,0.386308 ,-0.169787}; +static float N017[3] = {-0.970016 ,0.241698 ,-0.025516}; +static float N018[3] = {-0.998652 ,0.050493 ,-0.012045}; +static float N019[3] = {-0.942685 ,-0.333051 ,-0.020556}; +static float N020[3] = {-0.660944 ,-0.750276 ,0.015480}; +static float N021[3] = {0.503549 ,-0.862908 ,-0.042749}; +static float N022[3] = {0.953202 ,-0.302092 ,-0.012089}; +static float N023[3] = {0.998738 ,0.023574 ,0.044344}; +static float N024[3] = {0.979297 ,0.193272 ,0.060202}; +static float N025[3] = {0.798300 ,0.464885 ,0.382883}; +static float N026[3] = {-0.756590 ,0.452403 ,0.472126}; +static float N027[3] = {-0.953855 ,0.293003 ,0.065651}; +static float N028[3] = {-0.998033 ,0.040292 ,0.048028}; +static float N029[3] = {-0.977079 ,-0.204288 ,0.059858}; +static float N030[3] = {-0.729117 ,-0.675304 ,0.111140}; +static float N031[3] = {0.598361 ,-0.792753 ,0.116221}; +static float N032[3] = {0.965192 ,-0.252991 ,0.066332}; +static float N033[3] = {0.998201 ,-0.002790 ,0.059892}; +static float N034[3] = {0.978657 ,0.193135 ,0.070207}; +static float N035[3] = {0.718815 ,0.680392 ,0.142733}; +static float N036[3] = {-0.383096 ,0.906212 ,0.178936}; +static float N037[3] = {-0.952831 ,0.292590 ,0.080647}; +static float N038[3] = {-0.997680 ,0.032417 ,0.059861}; +static float N039[3] = {-0.982629 ,-0.169881 ,0.074700}; +static float N040[3] = {-0.695424 ,-0.703466 ,0.146700}; +static float N041[3] = {0.359323 ,-0.915531 ,0.180805}; +static float N042[3] = {0.943356 ,-0.319387 ,0.089842}; +static float N043[3] = {0.998272 ,-0.032435 ,0.048993}; +static float N044[3] = {0.978997 ,0.193205 ,0.065084}; +static float N045[3] = {0.872144 ,0.470094 ,-0.135565}; +static float N046[3] = {-0.664282 ,0.737945 ,-0.119027}; +static float N047[3] = {-0.954508 ,0.288570 ,0.075107}; +static float N048[3] = {-0.998273 ,0.032406 ,0.048993}; +static float N049[3] = {-0.979908 ,-0.193579 ,0.048038}; +static float N050[3] = {-0.858736 ,-0.507202 ,-0.072938}; +static float N051[3] = {0.643545 ,-0.763887 ,-0.048237}; +static float N052[3] = {0.955580 ,-0.288954 ,0.058068}; +#if 0 +static float N053[3] = {0.000000 ,1.000000 ,0.000000}; +static float N054[3] = {0.000000 ,1.000000 ,0.000000}; +static float N055[3] = {0.000000 ,1.000000 ,0.000000}; +static float N056[3] = {0.000000 ,1.000000 ,0.000000}; +static float N057[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N058[3] = {0.000050 ,0.793007 ,-0.609213}; +static float N059[3] = {0.913510 ,0.235418 ,-0.331779}; +static float N060[3] = {-0.807970 ,0.495000 ,-0.319625}; +static float N061[3] = {0.000000 ,0.784687 ,-0.619892}; +static float N062[3] = {0.000000 ,-1.000000 ,0.000000}; +static float N063[3] = {0.000000 ,1.000000 ,0.000000}; +static float N064[3] = {0.000000 ,1.000000 ,0.000000}; +static float N065[3] = {0.000000 ,1.000000 ,0.000000}; +static float N066[3] = {-0.055784 ,0.257059 ,0.964784}; +#if 0 +static float N067[3] = {0.000000 ,1.000000 ,0.000000}; +static float N068[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N069[3] = {-0.000505 ,-0.929775 ,-0.368127}; +static float N070[3] = {0.000000 ,1.000000 ,0.000000}; +#if 0 +static float N071[3] = {-0.987102 ,0.131723 ,-0.090984}; +static float N072[3] = {-0.987102 ,0.131723 ,-0.090984}; +static float N073[3] = {-0.987102 ,0.131723 ,-0.090984}; +static float N074[3] = {0.000000 ,1.000000 ,0.000000}; +static float N075[3] = {0.000000 ,1.000000 ,0.000000}; +static float N076[3] = {0.000000 ,1.000000 ,0.000000}; +static float N077[3] = {0.995210 ,0.071962 ,-0.066168}; +static float N078[3] = {0.995210 ,0.071962 ,-0.066168}; +static float N079[3] = {0.995210 ,0.071962 ,-0.066168}; +static float N080[3] = {0.000000 ,1.000000 ,0.000000}; +static float N081[3] = {0.000000 ,1.000000 ,0.000000}; +static float N082[3] = {0.000000 ,1.000000 ,0.000000}; +static float P001[3] = {0.00, 0.00, 0.00}; +#endif +static float P002[3] = {0.00, -36.59, 5687.72}; +static float P003[3] = {90.00, 114.73, 724.38}; +static float P004[3] = {58.24, -146.84, 262.35}; +static float P005[3] = {27.81, 231.52, 510.43}; +static float P006[3] = {-27.81, 230.43, 509.76}; +static float P007[3] = {-46.09, -146.83, 265.84}; +static float P008[3] = {-90.00, 103.84, 718.53}; +static float P009[3] = {-131.10, -165.92, 834.85}; +static float P010[3] = {-27.81, -285.31, 500.00}; +static float P011[3] = {27.81, -285.32, 500.00}; +static float P012[3] = {147.96, -170.89, 845.50}; +static float P013[3] = {180.00, 0.00, 2000.00}; +static float P014[3] = {145.62, 352.67, 2000.00}; +static float P015[3] = {55.62, 570.63, 2000.00}; +static float P016[3] = {-55.62, 570.64, 2000.00}; +static float P017[3] = {-145.62, 352.68, 2000.00}; +static float P018[3] = {-180.00, 0.01, 2000.00}; +static float P019[3] = {-178.20, -352.66, 2001.61}; +static float P020[3] = {-55.63, -570.63, 2000.00}; +static float P021[3] = {55.62, -570.64, 2000.00}; +static float P022[3] = {179.91, -352.69, 1998.39}; +static float P023[3] = {150.00, 0.00, 3000.00}; +static float P024[3] = {121.35, 293.89, 3000.00}; +static float P025[3] = {46.35, 502.93, 2883.09}; +static float P026[3] = {-46.35, 497.45, 2877.24}; +static float P027[3] = {-121.35, 293.90, 3000.00}; +static float P028[3] = {-150.00, 0.00, 3000.00}; +static float P029[3] = {-152.21, -304.84, 2858.68}; +static float P030[3] = {-46.36, -475.52, 3000.00}; +static float P031[3] = {46.35, -475.53, 3000.00}; +static float P032[3] = {155.64, -304.87, 2863.50}; +static float P033[3] = {90.00, 0.00, 4000.00}; +static float P034[3] = {72.81, 176.33, 4000.00}; +static float P035[3] = {27.81, 285.32, 4000.00}; +static float P036[3] = {-27.81, 285.32, 4000.00}; +static float P037[3] = {-72.81, 176.34, 4000.00}; +static float P038[3] = {-90.00, 0.00, 4000.00}; +static float P039[3] = {-72.81, -176.33, 4000.00}; +static float P040[3] = {-27.81, -285.31, 4000.00}; +static float P041[3] = {27.81, -285.32, 4000.00}; +static float P042[3] = {72.81, -176.34, 4000.00}; +static float P043[3] = {30.00, 0.00, 5000.00}; +static float P044[3] = {24.27, 58.78, 5000.00}; +static float P045[3] = {9.27, 95.11, 5000.00}; +static float P046[3] = {-9.27, 95.11, 5000.00}; +static float P047[3] = {-24.27, 58.78, 5000.00}; +static float P048[3] = {-30.00, 0.00, 5000.00}; +static float P049[3] = {-24.27, -58.78, 5000.00}; +static float P050[3] = {-9.27, -95.10, 5000.00}; +static float P051[3] = {9.27, -95.11, 5000.00}; +static float P052[3] = {24.27, -58.78, 5000.00}; +#if 0 +static float P053[3] = {0.00, 0.00, 0.00}; +static float P054[3] = {0.00, 0.00, 0.00}; +static float P055[3] = {0.00, 0.00, 0.00}; +static float P056[3] = {0.00, 0.00, 0.00}; +static float P057[3] = {0.00, 0.00, 0.00}; +#endif +static float P058[3] = {0.00, 1212.72, 2703.08}; +static float P059[3] = {50.36, 0.00, 108.14}; +static float P060[3] = {-22.18, 0.00, 108.14}; +static float P061[3] = {0.00, 1181.61, 6344.65}; +static float P062[3] = {516.45, -887.08, 2535.45}; +static float P063[3] = {-545.69, -879.31, 2555.63}; +static float P064[3] = {618.89, -1005.64, 2988.32}; +static float P065[3] = {-635.37, -1014.79, 2938.68}; +static float P066[3] = {0.00, 1374.43, 3064.18}; +#if 0 +static float P067[3] = {158.49, -11.89, 1401.56}; +static float P068[3] = {-132.08, -17.90, 1394.31}; +#endif +static float P069[3] = {0.00, -418.25, 5765.04}; +static float P070[3] = {0.00, 1266.91, 6629.60}; +static float P071[3] = {-139.12, -124.96, 997.98}; +static float P072[3] = {-139.24, -110.18, 1020.68}; +static float P073[3] = {-137.33, -94.52, 1022.63}; +static float P074[3] = {-137.03, -79.91, 996.89}; +static float P075[3] = {-135.21, -91.48, 969.14}; +static float P076[3] = {-135.39, -110.87, 968.76}; +static float P077[3] = {150.23, -78.44, 995.53}; +static float P078[3] = {152.79, -92.76, 1018.46}; +static float P079[3] = {154.19, -110.20, 1020.55}; +static float P080[3] = {151.33, -124.15, 993.77}; +static float P081[3] = {150.49, -111.19, 969.86}; +static float P082[3] = {150.79, -92.41, 969.70}; +static float iP002[3] = {0.00, -36.59, 5687.72}; +static float iP004[3] = {58.24, -146.84, 262.35}; +static float iP007[3] = {-46.09, -146.83, 265.84}; +static float iP010[3] = {-27.81, -285.31, 500.00}; +static float iP011[3] = {27.81, -285.32, 500.00}; +static float iP023[3] = {150.00, 0.00, 3000.00}; +static float iP024[3] = {121.35, 293.89, 3000.00}; +static float iP025[3] = {46.35, 502.93, 2883.09}; +static float iP026[3] = {-46.35, 497.45, 2877.24}; +static float iP027[3] = {-121.35, 293.90, 3000.00}; +static float iP028[3] = {-150.00, 0.00, 3000.00}; +static float iP029[3] = {-121.35, -304.84, 2853.86}; +static float iP030[3] = {-46.36, -475.52, 3000.00}; +static float iP031[3] = {46.35, -475.53, 3000.00}; +static float iP032[3] = {121.35, -304.87, 2853.86}; +static float iP033[3] = {90.00, 0.00, 4000.00}; +static float iP034[3] = {72.81, 176.33, 4000.00}; +static float iP035[3] = {27.81, 285.32, 4000.00}; +static float iP036[3] = {-27.81, 285.32, 4000.00}; +static float iP037[3] = {-72.81, 176.34, 4000.00}; +static float iP038[3] = {-90.00, 0.00, 4000.00}; +static float iP039[3] = {-72.81, -176.33, 4000.00}; +static float iP040[3] = {-27.81, -285.31, 4000.00}; +static float iP041[3] = {27.81, -285.32, 4000.00}; +static float iP042[3] = {72.81, -176.34, 4000.00}; +static float iP043[3] = {30.00, 0.00, 5000.00}; +static float iP044[3] = {24.27, 58.78, 5000.00}; +static float iP045[3] = {9.27, 95.11, 5000.00}; +static float iP046[3] = {-9.27, 95.11, 5000.00}; +static float iP047[3] = {-24.27, 58.78, 5000.00}; +static float iP048[3] = {-30.00, 0.00, 5000.00}; +static float iP049[3] = {-24.27, -58.78, 5000.00}; +static float iP050[3] = {-9.27, -95.10, 5000.00}; +static float iP051[3] = {9.27, -95.11, 5000.00}; +static float iP052[3] = {24.27, -58.78, 5000.00}; +#if 0 +static float iP053[3] = {0.00, 0.00, 0.00}; +#endif +static float iP061[3] = {0.00, 1181.61, 6344.65}; +static float iP069[3] = {0.00, -418.25, 5765.04}; +static float iP070[3] = {0.00, 1266.91, 6629.60}; +/* *INDENT-ON* */ + + + +static void +Fish001(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N006); + glVertex3fv(P006); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(cap); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(cap); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(cap); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N017); + glVertex3fv(P017); + glEnd(); + glBegin(cap); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(cap); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(cap); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glNormal3fv(N007); + glVertex3fv(P007); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(cap); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(cap); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(cap); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N020); + glVertex3fv(P020); + glEnd(); + glBegin(cap); + glNormal3fv(N004); + glVertex3fv(P004); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N007); + glVertex3fv(P007); + glEnd(); + glBegin(cap); + glNormal3fv(N004); + glVertex3fv(P004); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N011); + glVertex3fv(P011); + glEnd(); + glBegin(cap); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N011); + glVertex3fv(P011); + glEnd(); + glBegin(cap); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N015); + glVertex3fv(P015); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N003); + glVertex3fv(P003); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(cap); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N003); + glVertex3fv(P003); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(cap); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N003); + glVertex3fv(P003); + glEnd(); + glBegin(cap); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(cap); + glVertex3fv(P071); + glVertex3fv(P072); + glVertex3fv(P073); + glVertex3fv(P074); + glVertex3fv(P075); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glVertex3fv(P077); + glVertex3fv(P078); + glVertex3fv(P079); + glVertex3fv(P080); + glVertex3fv(P081); + glVertex3fv(P082); + glEnd(); +} + +static void +Fish002(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N023); + glVertex3fv(P023); + glEnd(); + glBegin(cap); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N024); + glVertex3fv(P024); + glEnd(); + glBegin(cap); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(cap); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N027); + glVertex3fv(P027); + glEnd(); + glBegin(cap); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(cap); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N022); + glVertex3fv(P022); + glEnd(); + glBegin(cap); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(cap); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(cap); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); +} + +static void +Fish003(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(cap); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); + glBegin(cap); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N033); + glVertex3fv(P033); + glEnd(); + glBegin(cap); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); + glBegin(cap); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(cap); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N035); + glVertex3fv(P035); + glEnd(); + glBegin(cap); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(cap); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(cap); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(cap); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N039); + glVertex3fv(P039); + glEnd(); +} + +static void +Fish004(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(cap); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N051); + glVertex3fv(P051); + glEnd(); + glBegin(cap); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(cap); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(cap); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N046); + glVertex3fv(P046); + glEnd(); + glBegin(cap); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(cap); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(cap); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N061); + glVertex3fv(P061); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(cap); + glNormal3fv(N061); + glVertex3fv(P061); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(cap); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N061); + glVertex3fv(P061); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N061); + glVertex3fv(P061); + glNormal3fv(N070); + glVertex3fv(P070); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N061); + glVertex3fv(P061); + glEnd(); +} + +static void +Fish005(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(cap); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N069); + glVertex3fv(P069); + glEnd(); + glBegin(cap); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N069); + glVertex3fv(P069); + glEnd(); + glBegin(cap); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); +} + +static void +Fish006(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N025); + glVertex3fv(P025); + glEnd(); + glBegin(cap); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(cap); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N066); + glVertex3fv(P066); + glEnd(); + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); +} + +static void +Fish007(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N064); + glVertex3fv(P064); + glEnd(); + glBegin(cap); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); +} + +static void +Fish008(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(cap); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); +} + +static void +Fish009(GLenum cap) +{ + glBegin(cap); + glVertex3fv(P059); + glVertex3fv(P012); + glVertex3fv(P009); + glVertex3fv(P060); + glEnd(); + glBegin(cap); + glVertex3fv(P012); + glVertex3fv(P004); + glVertex3fv(P007); + glVertex3fv(P009); + glEnd(); +} + +static void +Fish_1(GLenum cap) +{ + Fish004(cap); + Fish005(cap); + Fish003(cap); + Fish007(cap); + Fish006(cap); + Fish002(cap); + Fish008(cap); + Fish009(cap); + Fish001(cap); +} + +static void +Fish_2(GLenum cap) +{ + Fish005(cap); + Fish004(cap); + Fish003(cap); + Fish008(cap); + Fish006(cap); + Fish002(cap); + Fish007(cap); + Fish009(cap); + Fish001(cap); +} + +static void +Fish_3(GLenum cap) +{ + Fish005(cap); + Fish004(cap); + Fish007(cap); + Fish003(cap); + Fish002(cap); + Fish008(cap); + Fish009(cap); + Fish001(cap); + Fish006(cap); +} + +static void +Fish_4(GLenum cap) +{ + Fish005(cap); + Fish004(cap); + Fish008(cap); + Fish003(cap); + Fish002(cap); + Fish007(cap); + Fish009(cap); + Fish001(cap); + Fish006(cap); +} + +static void +Fish_5(GLenum cap) +{ + Fish009(cap); + Fish006(cap); + Fish007(cap); + Fish001(cap); + Fish002(cap); + Fish003(cap); + Fish008(cap); + Fish004(cap); + Fish005(cap); +} + +static void +Fish_6(GLenum cap) +{ + Fish009(cap); + Fish006(cap); + Fish008(cap); + Fish001(cap); + Fish002(cap); + Fish007(cap); + Fish003(cap); + Fish004(cap); + Fish005(cap); +} + +static void +Fish_7(GLenum cap) +{ + Fish009(cap); + Fish001(cap); + Fish007(cap); + Fish005(cap); + Fish002(cap); + Fish008(cap); + Fish003(cap); + Fish004(cap); + Fish006(cap); +} + +static void +Fish_8(GLenum cap) +{ + Fish009(cap); + Fish008(cap); + Fish001(cap); + Fish002(cap); + Fish007(cap); + Fish003(cap); + Fish005(cap); + Fish004(cap); + Fish006(cap); +} + +void +DrawShark(fishRec * fish, int wire) +{ + float mat[4][4]; + int n; + float seg1, seg2, seg3, seg4, segup; + float thrash, chomp; + GLenum cap; + + fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360; + + thrash = 50.0 * fish->v; + + seg1 = 0.6 * thrash * sin(fish->htail * RRAD); + seg2 = 1.8 * thrash * sin((fish->htail + 45.0) * RRAD); + seg3 = 3.0 * thrash * sin((fish->htail + 90.0) * RRAD); + seg4 = 4.0 * thrash * sin((fish->htail + 110.0) * RRAD); + + chomp = 0.0; + if (fish->v > 2.0) { + chomp = -(fish->v - 2.0) * 200.0; + } + P004[1] = iP004[1] + chomp; + P007[1] = iP007[1] + chomp; + P010[1] = iP010[1] + chomp; + P011[1] = iP011[1] + chomp; + + P023[0] = iP023[0] + seg1; + P024[0] = iP024[0] + seg1; + P025[0] = iP025[0] + seg1; + P026[0] = iP026[0] + seg1; + P027[0] = iP027[0] + seg1; + P028[0] = iP028[0] + seg1; + P029[0] = iP029[0] + seg1; + P030[0] = iP030[0] + seg1; + P031[0] = iP031[0] + seg1; + P032[0] = iP032[0] + seg1; + P033[0] = iP033[0] + seg2; + P034[0] = iP034[0] + seg2; + P035[0] = iP035[0] + seg2; + P036[0] = iP036[0] + seg2; + P037[0] = iP037[0] + seg2; + P038[0] = iP038[0] + seg2; + P039[0] = iP039[0] + seg2; + P040[0] = iP040[0] + seg2; + P041[0] = iP041[0] + seg2; + P042[0] = iP042[0] + seg2; + P043[0] = iP043[0] + seg3; + P044[0] = iP044[0] + seg3; + P045[0] = iP045[0] + seg3; + P046[0] = iP046[0] + seg3; + P047[0] = iP047[0] + seg3; + P048[0] = iP048[0] + seg3; + P049[0] = iP049[0] + seg3; + P050[0] = iP050[0] + seg3; + P051[0] = iP051[0] + seg3; + P052[0] = iP052[0] + seg3; + P002[0] = iP002[0] + seg4; + P061[0] = iP061[0] + seg4; + P069[0] = iP069[0] + seg4; + P070[0] = iP070[0] + seg4; + + fish->vtail += ((fish->dtheta - fish->vtail) * 0.1); + + if (fish->vtail > 0.5) { + fish->vtail = 0.5; + } else if (fish->vtail < -0.5) { + fish->vtail = -0.5; + } + segup = thrash * fish->vtail; + + P023[1] = iP023[1] + segup; + P024[1] = iP024[1] + segup; + P025[1] = iP025[1] + segup; + P026[1] = iP026[1] + segup; + P027[1] = iP027[1] + segup; + P028[1] = iP028[1] + segup; + P029[1] = iP029[1] + segup; + P030[1] = iP030[1] + segup; + P031[1] = iP031[1] + segup; + P032[1] = iP032[1] + segup; + P033[1] = iP033[1] + segup * 5.0; + P034[1] = iP034[1] + segup * 5.0; + P035[1] = iP035[1] + segup * 5.0; + P036[1] = iP036[1] + segup * 5.0; + P037[1] = iP037[1] + segup * 5.0; + P038[1] = iP038[1] + segup * 5.0; + P039[1] = iP039[1] + segup * 5.0; + P040[1] = iP040[1] + segup * 5.0; + P041[1] = iP041[1] + segup * 5.0; + P042[1] = iP042[1] + segup * 5.0; + P043[1] = iP043[1] + segup * 12.0; + P044[1] = iP044[1] + segup * 12.0; + P045[1] = iP045[1] + segup * 12.0; + P046[1] = iP046[1] + segup * 12.0; + P047[1] = iP047[1] + segup * 12.0; + P048[1] = iP048[1] + segup * 12.0; + P049[1] = iP049[1] + segup * 12.0; + P050[1] = iP050[1] + segup * 12.0; + P051[1] = iP051[1] + segup * 12.0; + P052[1] = iP052[1] + segup * 12.0; + P002[1] = iP002[1] + segup * 17.0; + P061[1] = iP061[1] + segup * 17.0; + P069[1] = iP069[1] + segup * 17.0; + P070[1] = iP070[1] + segup * 17.0; + + glPushMatrix(); + + glTranslatef(0.0, 0.0, -3000.0); + + glGetFloatv(GL_MODELVIEW_MATRIX, &mat[0][0]); + n = 0; + if (mat[0][2] >= 0.0) { + n += 1; + } + if (mat[1][2] >= 0.0) { + n += 2; + } + if (mat[2][2] >= 0.0) { + n += 4; + } + glScalef(2.0, 1.0, 1.0); + + glEnable(GL_CULL_FACE); + cap = wire ? GL_LINE_LOOP : GL_POLYGON; + switch (n) { + case 0: + Fish_1(cap); + break; + case 1: + Fish_2(cap); + break; + case 2: + Fish_3(cap); + break; + case 3: + Fish_4(cap); + break; + case 4: + Fish_5(cap); + break; + case 5: + Fish_6(cap); + break; + case 6: + Fish_7(cap); + break; + case 7: + Fish_8(cap); + break; + } + glDisable(GL_CULL_FACE); + + glPopMatrix(); +} +#endif diff --git a/modes/glx/sproingies.c b/modes/glx/sproingies.c new file mode 100644 index 00000000..8c328a54 --- /dev/null +++ b/modes/glx/sproingies.c @@ -0,0 +1,827 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* sproingies.c - 3D sproingies */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sproingies.c 4.04 97/07/28 xlockmore"; + +#endif + +/*- + * sproingies.c - Copyright 1996 by Ed Mackey, 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. + * + * Revision History: + * 07-Dec-96: Written. + */ + +#ifdef STANDALONE +#include "xlockmoreI.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef MODE_sproingies + +#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/modes/glx/sproingiewrap.c b/modes/glx/sproingiewrap.c new file mode 100644 index 00000000..2eed4e07 --- /dev/null +++ b/modes/glx/sproingiewrap.c @@ -0,0 +1,247 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* sproingiewrap.c - sproingies wrapper */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sproingiewrap.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * sproingiewrap.c - Copyright 1996 Sproingie Technologies Incorporated. + * + * 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.netaxs.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. + */ + +/*- + * 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 "*delay: 100 \n" \ + "*count: 5 \n" \ + "*cycles: 0 \n" \ + "*size: 0 \n" \ + "*wireframe: False \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_sproingies + +ModeSpecOpt sproingies_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct sproingies_description = +{"sproingies", "init_sproingies", "draw_sproingies", "release_sproingies", + "refresh_sproingies", "init_sproingies", NULL, &sproingies_opts, + 1000, 5, 0, 400, 4, 1.0, "", + "Shows Sproingies! Nontoxic. Safe for pets and small children", 0, NULL}; + +#endif + +#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; + Window window; +} sproingiesstruct; + +static sproingiesstruct *sproingies = NULL; + +static Display *swap_display; +static Window swap_window; + +void +SproingieSwap(void) +{ + glFinish(); + glXSwapBuffers(swap_display, swap_window); +} + + +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 count = MI_COUNT(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_IS_MONO(mi) ? 1 : 0); + sp->window = window; + if ((sp->glx_context = init_GL(mi)) != NULL) { + + if ((cycles & 1) || MI_IS_WIREFRAME(mi)) + wfmode = 1; + grnd = (cycles >> 1); + if (grnd > 2) + grnd = 2; + + mspr = count; + 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_WIDTH(mi); + h = MI_HEIGHT(mi); + } else if (size < MINSIZE) { + w = MINSIZE; + h = MINSIZE; + } else { + w = (size > MI_WIDTH(mi)) ? MI_WIDTH(mi) : size; + h = (size > MI_HEIGHT(mi)) ? MI_HEIGHT(mi) : size; + } + + glViewport((MI_WIDTH(mi) - w) / 2, (MI_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)); + } else { + MI_CLEARWINDOW(mi); + } +} + +/* ARGSUSED */ +void +draw_sproingies(ModeInfo * mi) +{ + sproingiesstruct *sp = &sproingies[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!sp->glx_context) + return; + + 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]; + + if (sp->glx_context) { + + glXMakeCurrent(MI_DISPLAY(mi), sp->window, *(sp->glx_context)); + CleanupSproingies(MI_SCREEN(mi)); + } + } + + (void) free((void *) sproingies); + sproingies = NULL; + } + FreeAllGL(mi); +} + +#endif + +/* End of sproingiewrap.c */ diff --git a/modes/glx/stairs.c b/modes/glx/stairs.c new file mode 100644 index 00000000..e96b91fa --- /dev/null +++ b/modes/glx/stairs.c @@ -0,0 +1,487 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* stairs --- Infinite Stairs, and Escher-like scene. */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)stairs.c 4.07 97/11/24 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 some interesting scenes that are impossible OR very + * weird to build in the real universe. Much of the scenes are inspirated + * on Mauritz Cornelis stairs'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 grammatical + * mistake. + * + * My e-mail address is + * m-vianna@usa.net + * + * Marcelo F. Vianna (Jun-01-1997) + * + * Revision History: + * 07-Jan-98: This would be a scene for the escher mode, but now escher mode + * was splitted in different modes for each scene. This is the + * initial release and is not working yet. + * 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 "stairs" +#define HACK_INIT init_stairs +#define HACK_DRAW draw_stairs +#define stairs_opts xlockmore_opts +#define DEFAULTS "*delay: 200000 \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_stairs + +#include +#include "e_textures.h" + +ModeSpecOpt stairs_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct stairs_description = +{"stairs", "init_stairs", "draw_stairs", "release_stairs", + "draw_stairs", "change_stairs", NULL, &stairs_opts, + 1000, 1, 1, 1, 4, 1.0, "", + "Shows Infinite Stairs, an Escher-like scene", 0, NULL}; + +#endif + +#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; + Bool direction; + int AreObjectsDefined[1]; + int sphere_position; + GLXContext *glx_context; +} stairsstruct; + +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}; + +#if 0 +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 MaterialMagenta[] = +{0.6, 0.2, 0.5, 1.0}; +static float MaterialGray[] = +{0.2, 0.2, 0.2, 1.0}; +static float MaterialGray5[] = +{0.5, 0.5, 0.5, 1.0}; +static float MaterialGray6[] = +{0.6, 0.6, 0.6, 1.0}; +static float MaterialGray8[] = +{0.8, 0.8, 0.8, 1.0}; + +#endif +static float MaterialYellow[] = +{0.7, 0.7, 0.0, 1.0}; +static float MaterialWhite[] = +{0.7, 0.7, 0.7, 1.0}; + +static float positions[] = +{ + -2.5, 4.0, 0.0, /* First one is FUDGED :) */ + -3.0, 3.25, 1.0, + -3.0, 4.4, 1.5, + -3.0, 3.05, 2.0, + -3.0, 4.2, 2.5, + + -3.0, 2.85, 3.0, + -2.5, 4.0, 3.0, + -2.0, 2.75, 3.0, + -1.5, 3.9, 3.0, + -1.0, 2.65, 3.0, + -0.5, 3.8, 3.0, + 0.0, 2.55, 3.0, + 0.5, 3.7, 3.0, + 1.0, 2.45, 3.0, + 1.5, 3.6, 3.0, + 2.0, 2.35, 3.0, + + 2.0, 3.5, 2.5, + 2.0, 2.25, 2.0, + 2.0, 3.4, 1.5, + 2.0, 2.15, 1.0, + 2.0, 3.3, 0.5, + 2.0, 2.05, 0.0, + 2.0, 3.2, -0.5, + 2.0, 1.95, -1.0, + 2.0, 3.1, -1.5, + 2.0, 1.85, -2.0, + + 1.5, 2.9, -2.0, + 1.0, 1.65, -2.0, + 0.5, 2.7, -2.0, + 0.0, 1.55, -2.0, + -0.5, 2.5, -2.0, + -1.0, 1.45, -2.0, +}; + +#define NPOSITIONS ((sizeof positions) / (sizeof positions[0])) + +static stairsstruct *stairs = NULL; +static GLuint objects; + +#define ObjSphere 0 + +#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 +draw_block(GLfloat width, GLfloat height, GLfloat thickness) +{ + glBegin(GL_QUADS); + glNormal3f(0, 0, 1); + glTexCoord2f(0, 0); + glVertex3f(-width, -height, thickness); + glTexCoord2f(1, 0); + glVertex3f(width, -height, thickness); + glTexCoord2f(1, 1); + glVertex3f(width, height, thickness); + glTexCoord2f(0, 1); + glVertex3f(-width, height, thickness); + glNormal3f(0, 0, -1); + glTexCoord2f(0, 0); + glVertex3f(-width, height, -thickness); + glTexCoord2f(1, 0); + glVertex3f(width, height, -thickness); + glTexCoord2f(1, 1); + glVertex3f(width, -height, -thickness); + glTexCoord2f(0, 1); + glVertex3f(-width, -height, -thickness); + glNormal3f(0, 1, 0); + glTexCoord2f(0, 0); + glVertex3f(-width, height, thickness); + glTexCoord2f(1, 0); + glVertex3f(width, height, thickness); + glTexCoord2f(1, 1); + glVertex3f(width, height, -thickness); + glTexCoord2f(0, 1); + glVertex3f(-width, height, -thickness); + glNormal3f(0, -1, 0); + glTexCoord2f(0, 0); + glVertex3f(-width, -height, -thickness); + glTexCoord2f(1, 0); + glVertex3f(width, -height, -thickness); + glTexCoord2f(1, 1); + glVertex3f(width, -height, thickness); + glTexCoord2f(0, 1); + glVertex3f(-width, -height, thickness); + glNormal3f(1, 0, 0); + glTexCoord2f(0, 0); + glVertex3f(width, -height, thickness); + glTexCoord2f(1, 0); + glVertex3f(width, -height, -thickness); + glTexCoord2f(1, 1); + glVertex3f(width, height, -thickness); + glTexCoord2f(0, 1); + glVertex3f(width, height, thickness); + glNormal3f(-1, 0, 0); + glTexCoord2f(0, 0); + glVertex3f(-width, height, thickness); + glTexCoord2f(1, 0); + glVertex3f(-width, height, -thickness); + glTexCoord2f(1, 1); + glVertex3f(-width, -height, -thickness); + glTexCoord2f(0, 1); + glVertex3f(-width, -height, thickness); + glEnd(); +} + +static void +draw_stairs_internal(ModeInfo * mi) +{ + stairsstruct *sp = &stairs[MI_SCREEN(mi)]; + GLfloat X; + + glPushMatrix(); + glPushMatrix(); + glTranslatef(-3.0, 0.1, 2.0); + for (X = 0; X < 2; X++) { + draw_block(0.5, 2.7 + 0.1 * X, 0.5); + glTranslatef(0.0, 0.1, -1.0); + } + glPopMatrix(); + glTranslatef(-3.0, 0.0, 3.0); + glPushMatrix(); + + for (X = 0; X < 6; X++) { + draw_block(0.5, 2.6 - 0.1 * X, 0.5); + glTranslatef(1.0, -0.1, 0.0); + } + glTranslatef(-1.0, -0.9, -1.0); + for (X = 0; X < 5; X++) { + draw_block(0.5, 3.0 - 0.1 * X, 0.5); + glTranslatef(0.0, 0.0, -1.0); + } + glTranslatef(-1.0, -1.1, 1.0); + for (X = 0; X < 3; X++) { + draw_block(0.5, 3.5 - 0.1 * X, 0.5); + glTranslatef(-1.0, -0.1, 0.0); + } + glPopMatrix(); + glPopMatrix(); + + glPushMatrix(); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialYellow); + + glTranslatef((GLfloat) positions[sp->sphere_position], + (GLfloat) positions[sp->sphere_position + 1], + (GLfloat) positions[sp->sphere_position + 2]); + if (sp->sphere_position == 0) /* FUDGE soo its not so obvious */ + mySphere(0.48); + else + mySphere(0.5); + glPopMatrix(); + sp->sphere_position += 3; + if (sp->sphere_position >= (int) NPOSITIONS) + sp->sphere_position = 0; +} + +static void +reshape(ModeInfo * mi, int width, int height) +{ + stairsstruct *sp = &stairs[MI_SCREEN(mi)]; + + glViewport(0, 0, sp->WindW = (GLint) width, sp->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); + } +} + +static void +pinit(void) +{ + 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); + + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + glShadeModel(GL_FLAT); + glEnable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_CULL_FACE); + + 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_stairs(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + stairsstruct *sp; + + if (stairs == NULL) { + if ((stairs = (stairsstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (stairsstruct))) == NULL) + return; + } + sp = &stairs[screen]; + sp->step = 0.0; + sp->direction = LRAND() & 1; + sp->sphere_position = NRAND(NPOSITIONS / 3) * 3; + + if ((sp->glx_context = init_GL(mi)) != NULL) { + + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + glDrawBuffer(GL_BACK); + if (!glIsList(objects)) + objects = glGenLists(1); + pinit(); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_stairs(ModeInfo * mi) +{ + stairsstruct *sp = &stairs[MI_SCREEN(mi)]; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!sp->glx_context) + return; + + glXMakeCurrent(display, window, *(sp->glx_context)); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + glTranslatef(0.0, 0.0, -10.0); + + if (!MI_IS_ICONIC(mi)) { + glScalef(Scale4Window * sp->WindH / sp->WindW, Scale4Window, Scale4Window); + } else { + glScalef(Scale4Iconic * sp->WindH / sp->WindW, Scale4Iconic, Scale4Iconic); + } + + glRotatef(44.5, 1, 0, 0); + glRotatef(50 + ((sp->direction) ? 1 : -1) * + ((sp->step * 100 > 120) ? sp->step * 100 - 120 : 0), 0, 1, 0); + if (sp->step * 100 >= 360 + 120) { /* stop showing secrets */ + sp->step = 0; + sp->direction = LRAND() & 1; + } + draw_stairs_internal(mi); + + glPopMatrix(); + + glFlush(); + + glXSwapBuffers(display, window); + + sp->step += 0.025; +} + +void +change_stairs(ModeInfo * mi) +{ + stairsstruct *sp = &stairs[MI_SCREEN(mi)]; + + if (!sp->glx_context) + return; + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sp->glx_context)); + pinit(); +} + +void +release_stairs(ModeInfo * mi) +{ + if (stairs != NULL) { + (void) free((void *) stairs); + stairs = NULL; + } + if (glIsList(objects)) { + glDeleteLists(objects, 1); + } + FreeAllGL(mi); +} + +#endif diff --git a/modes/glx/superquadrics.c b/modes/glx/superquadrics.c new file mode 100644 index 00000000..3612bd1e --- /dev/null +++ b/modes/glx/superquadrics.c @@ -0,0 +1,781 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* superquadrics --- 3D mathematical shapes */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)superquadrics.c 4.07 97/11/24 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 "*delay: 100 \n" \ + "*count: 25 \n" \ + "*cycles: 40 \n" \ + "*wireframe: False \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" +#endif /* !STANDALONE */ + +#ifdef MODE_superquadrics + +/*- + * 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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct superquadrics_description = +{"superquadrics", "init_superquadrics", "draw_superquadrics", "release_superquadrics", + "refresh_superquadrics", "init_superquadrics", NULL, &superquadrics_opts, + 1000, 25, 40, 1, 4, 1.0, "", + "Shows 3D mathematical shapes", 0, NULL}; + +#endif + +#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) { + if (sp->wireframe) { + b = g = r = 1.0; + b2 = g2 = r2 = 1.0; + } else { + 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_IS_MONO(mi) ? 1 : 0); + + if ((sp->glx_context = init_GL(mi)) != NULL) { + + InitSuperquadrics(MI_IS_WIREFRAME(mi), 0, + MI_COUNT(mi), MI_CYCLES(mi), spinspeed, sp); + ReshapeSuperquadrics(MI_WIDTH(mi), MI_HEIGHT(mi)); + + DisplaySuperquadrics(sp); + glFinish(); + glXSwapBuffers(display, window); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_superquadrics(ModeInfo * mi) +{ + superquadricsstruct *sp = &superquadrics[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (!sp->glx_context) + return; + + glXMakeCurrent(display, window, *(sp->glx_context)); + + NextSuperquadricDisplay(sp); + + glFinish(); + glXSwapBuffers(display, window); +} + +void +refresh_superquadrics(ModeInfo * mi) +{ + /* Nothing happens here */ +} + +void +release_superquadrics(ModeInfo * mi) +{ + if (superquadrics != NULL) { + (void) free((void *) superquadrics); + superquadrics = NULL; + } + FreeAllGL(mi); +} + + +#endif + +/* End of superquadrics.c */ diff --git a/modes/glx/swim.c b/modes/glx/swim.c new file mode 100644 index 00000000..b726965b --- /dev/null +++ b/modes/glx/swim.c @@ -0,0 +1,233 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)swim.c 1.3 98/06/18 xlockmore"; + +#endif + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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 original code for this mode was written by Mark J. Kilgard + * as a demo for openGL programming. + * + * Porting it to xlock was possible by comparing the original Mesa's morph3d + * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna + * (look at morph3d.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (May-13-1998) + * + */ + +/** + * (c) Copyright 1993, 1994, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * Permission to use, copy, modify, and distribute this software for + * any purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies and that both the copyright notice + * and this permission notice appear in supporting documentation, and that + * the name of Silicon Graphics, Inc. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. + * + * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" + * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, + * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY + * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, + * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF + * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + * + * US Government Users Restricted Rights + * Use, duplication, or disclosure by the Government is subject to + * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph + * (c)(1)(ii) of the Rights in Technical Data and Computer Software + * clause at DFARS 252.227-7013 and/or in similar or successor + * clauses in the FAR or the DOD or NASA FAR Supplement. + * Unpublished-- rights reserved under the copyright laws of the + * United States. Contractor/manufacturer is Silicon Graphics, + * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. + * + * OpenGL(TM) is a trademark of Silicon Graphics, Inc. + */ + +#ifdef STANDALONE +#include "xlockmoreI.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef MODE_atlantis + +#include "atlantis.h" + +void +FishTransform(fishRec * fish) +{ + + glTranslatef(fish->y, fish->z, -fish->x); + glRotatef(-fish->psi, 0.0, 1.0, 0.0); + glRotatef(fish->theta, 1.0, 0.0, 0.0); + glRotatef(-fish->phi, 0.0, 0.0, 1.0); +} + +void +WhalePilot(fishRec * fish, float whalespeed, Bool whaledir) +{ + + fish->phi = -20.0; + fish->theta = 0.0; + fish->psi += ((whaledir) ? -0.5 : 0.5); + + fish->x += whalespeed * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD); + fish->y += whalespeed * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD); + fish->z += whalespeed * fish->v * sin(fish->theta / RAD); +} + +void +SharkPilot(fishRec * fish, float sharkspeed) +{ + static int sign = 1; + float X, Y, Z, tpsi, ttheta, thetal; + + fish->xt = 60000.0; + fish->yt = 0.0; + fish->zt = 0.0; + + X = fish->xt - fish->x; + Y = fish->yt - fish->y; + Z = fish->zt - fish->z; + + thetal = fish->theta; + + ttheta = RAD * atan(Z / (sqrt(X * X + Y * Y))); + + if (ttheta > fish->theta + 0.25) { + fish->theta += 0.5; + } else if (ttheta < fish->theta - 0.25) { + fish->theta -= 0.5; + } + if (fish->theta > 90.0) { + fish->theta = 90.0; + } + if (fish->theta < -90.0) { + fish->theta = -90.0; + } + fish->dtheta = fish->theta - thetal; + + tpsi = RAD * atan2(Y, X); + + fish->attack = 0; + + if (fabs(tpsi - fish->psi) < 10.0) { + fish->attack = 1; + } else if (fabs(tpsi - fish->psi) < 45.0) { + if (fish->psi > tpsi) { + fish->psi -= 0.5; + if (fish->psi < -180.0) { + fish->psi += 360.0; + } + } else if (fish->psi < tpsi) { + fish->psi += 0.5; + if (fish->psi > 180.0) { + fish->psi -= 360.0; + } + } + } else { + if (NRAND(100) > 98) { + sign = 1 - sign; + } + fish->psi += sign; + if (fish->psi > 180.0) { + fish->psi -= 360.0; + } + if (fish->psi < -180.0) { + fish->psi += 360.0; + } + } + + if (fish->attack) { + if (fish->v < 1.1) { + fish->spurt = 1; + } + if (fish->spurt) { + fish->v += 0.2; + } + if (fish->v > 5.0) { + fish->spurt = 0; + } + if ((fish->v > 1.0) && (!fish->spurt)) { + fish->v -= 0.2; + } + } else { + if (!(NRAND(400)) && (!fish->spurt)) { + fish->spurt = 1; + } + if (fish->spurt) { + fish->v += 0.05; + } + if (fish->v > 3.0) { + fish->spurt = 0; + } + if ((fish->v > 1.0) && (!fish->spurt)) { + fish->v -= 0.05; + } + } + + fish->x += sharkspeed * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD); + fish->y += sharkspeed * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD); + fish->z += sharkspeed * fish->v * sin(fish->theta / RAD); +} + +void +SharkMiss(atlantisstruct * ap, int i) +{ + int j; + float avoid, thetal; + float X, Y, Z, R; + + for (j = 0; j < ap->num_sharks; j++) { + if (j != i) { + X = ap->sharks[j].x - ap->sharks[i].x; + Y = ap->sharks[j].y - ap->sharks[i].y; + Z = ap->sharks[j].z - ap->sharks[i].z; + + R = sqrt(X * X + Y * Y + Z * Z); + + avoid = 1.0; + thetal = ap->sharks[i].theta; + + if (R < ap->sharksize) { + if (Z > 0.0) { + ap->sharks[i].theta -= avoid; + } else { + ap->sharks[i].theta += avoid; + } + } + ap->sharks[i].dtheta += (ap->sharks[i].theta - thetal); + } + } +} +#endif diff --git a/modes/glx/text3d.cc b/modes/glx/text3d.cc new file mode 100644 index 00000000..9416ffc1 --- /dev/null +++ b/modes/glx/text3d.cc @@ -0,0 +1,956 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* text3d --- Shows moving 3D texts */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)text3d.cc 1.2 98/10/01 xlockmore"; + +#endif + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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 module is based on a demo of the gltt graphics library + * Copyright (C) 1998 Stephane Rehel. + * + * See the gltt Official Site at http://home.worldnet.fr/~rehel/gltt/gltt.html + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (August-18-1998) + * + * REVISION HISTORY: + * 08/23/98: add better handling of "faulty" fontfile and randomize + * fontfile if '-ttfont' value is a directory. + * Minor changes for AIX from Jouk Jansen (joukj@hrem.stm.tudelft.nl). + * + * TODO : + * I've still not really decided how to "move" the 3Dtext. + * Function Animate needs still a lot of work! Help welcome !! + * + */ + +#ifdef STANDALONE +#define PROGCLASS "Text3d" +#define HACK_INIT init_text3d +#define HACK_DRAW draw_text3d +#define text3d_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*ncolors: 64 \n" \ + "*font: \n" \ + "*text: \n" \ + "*filename: \n" \ + "*fortunefile: \n" \ + "*program: \n" + +extern "C" { +#include "xlockmore.h" /* from the xscreensaver distribution */ +} +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#include "vis.h" + +#endif /* !STANDALONE */ + +#ifdef MODE_text3d + +#if 1 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#else +#include "FTEngine.h" +#include "FTFace.h" +#include "FTInstance.h" +#include "FTGlyph.h" +#include "FTFont.h" +#include "GLTTOutlineFont.h" +#include "GLTTFont.h" +#include "GLTTGlyphPolygonizer.h" +#include "GLTTGlyphTriangulator.h" +#endif + +#include "text3d.h" +#include + +#define USE_BLANK +#ifdef USE_BLANK /* if the module cannot create the font struct + * then use blank mode instead + */ +extern "C" {void init_blank(ModeInfo * mi);} +extern "C" {void draw_blank(ModeInfo * mi);} +extern "C" {void release_blank(ModeInfo * mi);} +extern "C" {void refresh_blank(ModeInfo * mi);} +#endif + +/* Yes, it's an ugly mix of 'C' and 'C++' functions */ +extern "C" {void init_text3d(ModeInfo * mi);} +extern "C" {void draw_text3d(ModeInfo * mi);} +extern "C" {void change_text3d(ModeInfo * mi);} +extern "C" {void release_text3d(ModeInfo * mi);} +extern "C" {void refresh_text3d(ModeInfo * mi);} + +/* Manage Option vars */ +/* I found this font on NT in c:\WINDOWS\SYSTEM\ARIAL.TTF can also be found + on Windows95 in c:\windows\fonts\arial.ttf */ +#define DEF_FONT "arial.ttf" +#define DEF_EXTRUSION "25.0" +#define DEF_ROTAMPL "1.0" +#define DEF_ROTFREQ "0.001" +#define DEF_FONTSIZE 220 +static float extrusion; +static float rampl; +static float rfreq; +static char *mode_font; + +static XrmOptionDescRec opts[] = +{ + {"-ttfont", ".text3d.ttfont", XrmoptionSepArg, (caddr_t) NULL}, + {"-extrusion", ".text3d.extrusion", XrmoptionSepArg, (caddr_t) NULL}, + {"-rot_amplitude", ".text3d.rot_amplitude", XrmoptionSepArg, (caddr_t) NULL}, + {"-rot_frequency", ".text3d.rot_frequency", XrmoptionSepArg, (caddr_t) NULL} +}; + +static argtype vars[] = +{ +{(caddr_t *) & mode_font, "ttfont", "TTFont", DEF_FONT, t_String}, +{(caddr_t *) & extrusion, "extrusion", "Extrusion", DEF_EXTRUSION, t_Float}, +{(caddr_t *) & rampl, "rot_amplitude", "RotationAmplitude", DEF_ROTAMPL, t_Float}, +{(caddr_t *) & rfreq, "rot_frequency", "RotationFrequency", DEF_ROTFREQ, t_Float}, +}; + +static OptionStruct desc[] = +{ + {"-ttfont filename", "Text3d TrueType font file name"}, + {"-extrusion float", "Text3d extrusion length"}, + {"-rot_amplitude float", "Text3d rotation amplitude"}, + {"-rot_frequency float", "Text3d rotation frequency"} +}; + +ModeSpecOpt text3d_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct text3d_description = +{"text3d", "init_text3d", "draw_text3d", "release_text3d", + "refresh_text3d", "change_text3d", NULL, &text3d_opts, + 100000, 1, 1, 1, 64, 1.0, "", + "Shows 3D texts", 0, NULL}; +#endif + +static double camera_dist= 0.0; /* could it be a per screen variable ? */ +static double ref_camera_dist= 0.0; /* could it be a per screen variable ? */ +static text3dstruct *text3d = (text3dstruct*) NULL; + +/* Hacks to use $TOP/xlock/util.c and iostuff.c functions */ +extern "C" {char *getWords(int screen, int screens);} +extern "C" {FILE *my_fopen(char *filename, char *type);} + +#if HAVE_DIRENT_H +#define sel_font sel_image /* "rename" the sel_image function */ + +extern "C" {void get_dir(char *fullpath, char *dir, char *filename);} +extern "C" {int sel_font(struct dirent *name);} +extern "C" {int scan_dir(const char *directoryname, + struct dirent ***namelist, + int (*select) (struct dirent *), + int (*compare) (const void *, const void *));} +#endif /* HAVE_DIRENT_H */ + +/* + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + * Mode funcs. + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + */ + +/* + *----------------------------------------------------------------------------- + * Utils. + *----------------------------------------------------------------------------- + */ + +static int +readable(char *filename) +{ + FILE *fp; + + if ((fp = my_fopen(filename, "r")) == NULL) + return False; + (void) fclose(fp); + return True; +} +#ifdef AIXV3 +extern "C" long int lrand48(void); /*Seems to missing in xlC for AIX3.2.5*/ +#endif + + /*-------------------------------------------------------------*/ +#if HAVE_DIRENT_H + +#ifdef AIXV3 +extern "C" long int lrand48(void); /*Seems to missing in xlC for AIX3.2.5*/ +#endif + +static void +randomFileFromList(char *directory, + struct dirent **filelist, int numfiles, char *file_local) +{ + int num; + + num = NRAND(numfiles); + if (strlen(directory) + strlen(filelist[num]->d_name) + 1 < 256) { + (void) sprintf(file_local, "%s%s", + directory, filelist[num]->d_name); + } +} + + /*-------------------------------------------------------------*/ +static void +getRandomFontFile(char *randomfile, char *randomfile_local) +{ + /* mimic getRandomImageFile from $TOP/xlock/iostuff.c */ + char directory_r[DIRBUF]; + struct dirent ***fonts_list; + struct dirent **font_list = (dirent**) NULL; + int num_list; + + /* extern char 'stolen' from $TOP/xlock/resource.c */ + extern char filename_r[MAXNAMLEN]; + + get_dir(randomfile, directory_r, filename_r); + + fonts_list = (struct dirent ***) malloc(sizeof (struct dirent **)); + + num_list = scan_dir(directory_r, fonts_list, sel_font, (int(*)(const + void*,const void*)) NULL); + font_list = *fonts_list; + (void) free((void *) fonts_list); + if (num_list > 0) { + randomFileFromList(directory_r, font_list, num_list, randomfile_local); + } +} +#endif /* HAVE_DIRENT_H */ + + /*-------------------------------------------------------------*/ + +#ifdef DIFFUSE_COLOR +static void hsv_to_rgb( double h, double s, double v, + double* r, double* g, double* b ) +{ + double xh = fmod( h*360., 360 ) / 60.0, + i = floor(xh), + f = xh - i, + p1 = v * (1 - s), + p2 = v * (1 -(s * f)), + p3 = v * (1 -(s * (1 - f))); + + switch( (int) i ) + { + case 0: *r= v; *g= p3; *b= p1; break; + case 1: *r= p2; *g= v; *b= p1; break; + case 2: *r= p1; *g= v; *b= p3; break; + case 3: *r= p1; *g= p2; *b= v; break; + case 4: *r= p3; *g= p1; *b= v; break; + case 5: *r= v; *g= p1; *b= p2; break; + } +} +#endif /* DIFFUSE_COLOR */ + + /*-------------------------------------------------------------*/ +static void spheric_camera( text3dstruct * tp, + float center_x, float center_y, float center_z, + float phi, float theta, float radius ) +{ + float x= center_x + cos(phi) * cos(theta) * radius; + float y= center_y + sin(phi) * cos(theta) * radius; + float z= center_z + sin(theta) * radius; + + float vx= -cos(phi) * sin(theta) * radius; + float vy= -sin(phi) * sin(theta) * radius; + float vz= cos(theta) * radius; + + glViewport(0, 0, tp->WinW, tp->WinH); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective( 60, GLfloat(tp->WinW)/GLfloat(tp->WinH), 10, 10000 ); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + gluLookAt( x, y, z, center_x, center_y, center_z, vx, vy, vz ); +} + + /*-------------------------------------------------------------*/ +class GLTTGlyphTriangles: public GLTTGlyphTriangulator +{ +public: + struct Triangle + { + FTGlyphVectorizer::POINT* p1; + FTGlyphVectorizer::POINT* p2; + FTGlyphVectorizer::POINT* p3; + }; + + Triangle* triangles; + int nTriangles; + + GLTTboolean count_them; + + GLTTGlyphTriangles( FTGlyphVectorizer* vectorizer ): + GLTTGlyphTriangulator(vectorizer) + { + triangles= 0; + nTriangles= 0; + count_them= GLTT_TRUE; + } + virtual ~GLTTGlyphTriangles() + { + delete [] triangles; + triangles= 0; + } + void alloc() + { + delete triangles; + triangles= new Triangle [ nTriangles + 1 ]; + } + virtual void triangle( FTGlyphVectorizer::POINT* p1, + FTGlyphVectorizer::POINT* p2, + FTGlyphVectorizer::POINT* p3 ) + { + if( count_them ) + { + ++nTriangles; + return; + } + triangles[nTriangles].p1= p1; + triangles[nTriangles].p2= p2; + triangles[nTriangles].p3= p3; + ++nTriangles; + } +}; + +/* + *----------------------------------------------------------------------------- + * "Main" local funcs. + *----------------------------------------------------------------------------- + */ + +static void +Reshape(ModeInfo * mi, int width, int height) +{ + text3dstruct *tp = &text3d[MI_SCREEN(mi)]; + + glViewport(0, 0, tp->WinW = (GLint) width, tp->WinH = (GLint) height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(60.0, (GLdouble) width / (GLdouble) height, 10, 10000); + glMatrixMode(GL_MODELVIEW); +} + + /*-------------------------------------------------------------*/ +static void +Animate(text3dstruct * tp) +{ +#ifdef FUNNY_ANIMATE + const double angle_speed= 2.5/180.0*M_PI; + int key = NRAND(32); + switch (key) + { + case 0:case 1: case 2: case 3: + tp->theta+= angle_speed; + break; + case 4: case 5: case 6: case 7: + tp->theta-= angle_speed; + break; + case 8: case 9: case 10 : case 11: + tp->phi-= angle_speed; + break; + case 12: case 13: case 14: case 15: + tp->phi+= angle_speed; + + case 16: case 17: + if (camera_dist / 1.05 > ref_camera_dist) + camera_dist /= 1.05; + break; + case 18: case 19: + if (camera_dist * 1.05 < (ref_camera_dist * 2.0)) + camera_dist *= 1.05; + break; + case 20: + if ( (tp->extrusion - 5.0) > 25) + tp->extrusion -= 5.0; + break; + case 21: + if ( (tp->extrusion + 5.0) < 75) + tp->extrusion += 5.0; + break; + case 22:case 23: + tp->rampl /= 1.15; + break; + case 24:case 25: + tp->rampl *= 1.15; + break; + case 26:case 27: + tp->rfreq *= 1.15; + break; + case 28:case 29: + tp->rfreq /= 1.15; + break; + } +#else /* !FUNNY_ANIMATE */ + const double angle_speed= 2.5/180.0*M_PI; + + tp->phi-= angle_speed; + tp->theta-= angle_speed; +#endif +} + + /*-------------------------------------------------------------*/ +static void +Draw(text3dstruct * tp, + Display *display, + Window window) +{ + const int text_length= strlen(tp->words); + + GLTTFont font(tp->face); + + if( ! font.create(DEF_FONTSIZE) ) + return; + + FTGlyphVectorizer* vec= new FTGlyphVectorizer [ text_length ]; + GLTTGlyphTriangles** tri= new GLTTGlyphTriangles* [ text_length ]; + + int i; + for( i= 0; i < text_length; ++i ) + tri[i]= new GLTTGlyphTriangles( vec + i ); + + if (camera_dist == 0.0) + ref_camera_dist = camera_dist = font.getWidth(tp->words) * 0.75; + double min_y= 1e20; + double max_y=-1e20; + double size_x= 0.0; + + for( i= 0; i < text_length; ++i ) + { + int ch= (unsigned char)tp->words[i]; + + FTGlyph* g= font.getFont()->getGlyph(ch); + if( g == 0 ) + continue; + FTGlyphVectorizer& v= vec[i]; + v.setPrecision(14.); + if( ! v.init(g) ) + continue; + + size_x+= v.getAdvance(); + + if( ! v.vectorize() ) + continue; + + for( int c= 0; c < v.getNContours(); ++c ) + { + FTGlyphVectorizer::Contour* contour= v.getContour(c); + if( contour == 0 ) + continue; + for( int j= 0; j < contour->nPoints; ++j ) + { + FTGlyphVectorizer::POINT* point= contour->points + j; + if( point->y < min_y ) min_y= point->y; + if( point->y > max_y ) max_y= point->y; + point->data= (void*) new double [ 6 ]; + } + } + GLTTGlyphTriangles* t= tri[i]; + + if( ! t->init(g) ) + continue; + + t->count_them= GLTT_TRUE; + t->nTriangles= 0; + t->triangulate(); + + t->count_them= GLTT_FALSE; + t->alloc(); + t->nTriangles= 0; + t->triangulate(); + } + + if( size_x == 0.0 ) + { + fprintf(stderr,"Please give something to draw !\n"); + return; + } + + double y_delta= (min_y+max_y)/2. + min_y + 50; + for( i= 0; i < text_length; ++i ) + { + FTGlyphVectorizer& v= vec[i]; + + for( int c= 0; c < v.getNContours(); ++c ) + { + FTGlyphVectorizer::Contour* contour= v.getContour(c); + if( contour == 0 ) + continue; + for( int j= 0; j < contour->nPoints; ++j ) + { + FTGlyphVectorizer::POINT* point= contour->points + j; + point->y -= y_delta; + } + } + } + +#define LIGHTY + float front_emission[4]= { 0.,0.,0.,0 }; + float front_ambient[4]= { 0.2,0.2,0.2,0 }; + float front_diffuse[4]= { 0.95,0.95,0.8,0 }; + float back_diffuse[4]= { 0.6,0.6,0.95,0 }; + float front_specular[4]= { 0.6,0.6,0.6,0 }; + glMaterialfv(GL_FRONT,GL_EMISSION,front_emission); + glMaterialfv(GL_FRONT,GL_AMBIENT,front_ambient); + glMaterialfv(GL_FRONT,GL_DIFFUSE,front_diffuse); + glMaterialfv(GL_FRONT,GL_SPECULAR,front_specular); + glMaterialf(GL_FRONT,GL_SHININESS,32.); +#ifdef LIGHTY + float light1_ambient[4]= { 0.2,0.2,0.2,1 }; + float light1_diffuse[4]= { 0.9,0.9,0.9,1 }; /* A "white" light */ + float light1_specular[4]= { 0.7,0.7,0.7,1 }; + float light1_position[4]= { -1,1,1,0 }; + glLightfv(GL_LIGHT1,GL_AMBIENT,light1_ambient); + glLightfv(GL_LIGHT1,GL_DIFFUSE,light1_diffuse); + glLightfv(GL_LIGHT1,GL_SPECULAR,light1_specular); + glLightfv(GL_LIGHT1,GL_POSITION,light1_position); + glEnable(GL_LIGHT1); + + float light2_ambient[4]= { 0.1,0.1,0.1,1 }; + float light2_diffuse[4]= { 0.8,0.2,0.2,1 }; /* A "red" light */ + float light2_specular[4]= { 0.5,0.5,0.5,1 }; + float light2_position[4]= { 1,-1,-1,0 }; + glLightfv(GL_LIGHT2,GL_AMBIENT,light2_ambient); + glLightfv(GL_LIGHT2,GL_DIFFUSE,light2_diffuse); + glLightfv(GL_LIGHT2,GL_SPECULAR,light2_specular); + glLightfv(GL_LIGHT2,GL_POSITION,light2_position); + glEnable(GL_LIGHT2); + +#else + GLfloat pos[4] = { -1.0,1.0,1.0,0.0 }; + glLightfv(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_LIGHT0); +#endif + + float back_color[4]= { 0.2,0.2,0.6,0 }; + glMaterialfv(GL_BACK,GL_DIFFUSE,back_color); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,GL_FALSE); + glCullFace(GL_BACK); + glFrontFace(GL_CCW); + glEnable(GL_CULL_FACE); + + glColorMaterial(GL_FRONT,GL_DIFFUSE); + glEnable(GL_COLOR_MATERIAL); + + spheric_camera( tp, tp->center_x, + tp->center_y + size_x/2., + 0, + tp->phi, tp->theta+M_PI/2, camera_dist ); + glClearColor(0,0,0,0); + glEnable(GL_DEPTH_TEST); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glShadeModel(GL_SMOOTH); + glEnable(GL_NORMALIZE); + + double base_x= 0.; + for( i= 0; i < text_length; ++i ) + { + FTGlyphVectorizer& v= vec[i]; + + int c; + for( c= 0; c < v.getNContours(); ++c ) + { + FTGlyphVectorizer::Contour* contour= v.getContour(c); + if( contour == 0 ) + continue; + + for( int j= 0; j < contour->nPoints; ++j ) + { + FTGlyphVectorizer::POINT* point= contour->points + j; + double cx= -point->y; + double cy= base_x+point->x; + double phi= sin(cy*tp->rfreq)* tp->rampl * M_PI/2.; + double rcx= cx * cos(phi); + double rcz= cx * sin(phi); + + double* p= (double*) point->data; + double* n= p + 3; + + p[0]= rcx; + p[1]= cy; + p[2]= rcz; + + n[0]= -sin(phi); + n[1]= 0.; + n[2]= cos(phi); + } + } + + GLTTGlyphTriangles::Triangle* triangles= tri[i]->triangles; + int nTriangles= tri[i]->nTriangles; + + glBegin(GL_TRIANGLES); + + for( int j= 0; j < nTriangles; ++j ) + { + GLTTGlyphTriangles::Triangle& t= triangles[j]; + + double* p1= ((double*) t.p1->data); + double* p2= ((double*) t.p2->data); + double* p3= ((double*) t.p3->data); + double* n1= p1 + 3; + double* n2= p2 + 3; + double* n3= p3 + 3; + +#ifdef LIGHTY + glColor4fv(front_diffuse); +#endif + + glNormal3dv( n1 ); + glVertex3dv( p1 ); + glNormal3dv( n2 ); + glVertex3dv( p2 ); + glNormal3dv( n3 ); + glVertex3dv( p3 ); + + glColor4fv(back_diffuse); + + glNormal3d( -n3[0], 0., -n3[2] ); + glVertex3d( p3[0]-n3[0]*tp->extrusion, + p3[1], + p3[2]-n3[2]*tp->extrusion ); + glNormal3d( -n2[0], 0., -n2[2] ); + glVertex3d( p2[0]-n2[0]*tp->extrusion, + p2[1], + p2[2]-n2[2]*tp->extrusion ); + glNormal3d( -n1[0], 0., -n1[2] ); + glVertex3d( p1[0]-n1[0]*tp->extrusion, + p1[1], + p1[2]-n1[2]*tp->extrusion ); + } + glEnd(); + + for( c= 0; c < v.getNContours(); ++c ) + { + FTGlyphVectorizer::Contour* contour= v.getContour(c); + if( contour == 0 ) + continue; + glBegin(GL_QUAD_STRIP); + for( int j= 0; j <= contour->nPoints; ++j ) + { + int j1= (j < contour->nPoints) ? j : 0; + int j0= (j1==0) ? (contour->nPoints-1) : (j1-1); + + FTGlyphVectorizer::POINT* point0= contour->points + j0; + FTGlyphVectorizer::POINT* point1= contour->points + j1; + double* p0= (double*) point0->data; + double* p1= (double*) point1->data; + double* e= p0 + 3; + double vx= p1[0] - p0[0]; + double vy= p1[1] - p0[1]; + double vz= p1[2] - p0[2]; + double nx= - vy * e[2]; + double ny= e[2] * vx - vz * e[0]; + double nz= e[0] * vy ; + +#ifdef DIFFUSE_COLOR + double u= double( (j*2) % contour->nPoints ) + / double(contour->nPoints); + + double r, g, b; + hsv_to_rgb(u,0.7,0.7,&r,&g,&b); + + glColor4f(r,g,b,1); // diffuse color of material +#else + GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0}; + glColor4fv(blue); +#endif + + glNormal3f(nx,ny,nz); + glVertex3f( p0[0]-e[0]*tp->extrusion, + p0[1], + p0[2]-e[2]*tp->extrusion ); + glNormal3f(nx,ny,nz); + glVertex3f( p0[0], p0[1], p0[2] ); + } + glEnd(); + } + + base_x += v.getAdvance(); + } + + glDisable(GL_NORMALIZE); + glDisable(GL_LIGHTING); + glShadeModel(GL_FLAT); + glPopMatrix(); + + glXSwapBuffers(display, window); + + for( i= 0; i < text_length; ++i ) + { + delete tri[i]; + + FTGlyphVectorizer& v= vec[i]; + for( int c= 0; c < v.getNContours(); ++c ) + { + FTGlyphVectorizer::Contour* contour= v.getContour(c); + if( contour == 0 ) + continue; + for( int j= 0; j < contour->nPoints; ++j ) + { + FTGlyphVectorizer::POINT* point= contour->points + j; + delete [] point->data; + point->data= 0; + } + } + } + + delete [] tri; + delete [] vec; +} + +/* + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + * Xlock hooks. + *----------------------------------------------------------------------------- + *----------------------------------------------------------------------------- + */ + +/* + *----------------------------------------------------------------------------- + * Initialize text3d. Called each time the window changes. + *----------------------------------------------------------------------------- + */ + +void +init_text3d(ModeInfo * mi) +{ + int screen = MI_SCREEN(mi); + text3dstruct *tp; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + char *fontfile = (char *)NULL; + + if (text3d == NULL) { + if ((text3d = (text3dstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (text3dstruct))) == NULL) + return; + } + tp = &text3d[screen]; + tp->wire = MI_IS_WIREFRAME(mi); + tp->extrusion = extrusion; + tp->rampl = rampl; + tp->rfreq = rfreq; + + /* Get fontfile from mode_font (it can be a dir name) */ + if (mode_font && strlen(mode_font)) + { + fontfile = (char *) malloc(256); + (void) strncpy(fontfile, mode_font, 256); +#if HAVE_DIRENT_H + getRandomFontFile(mode_font, fontfile); +#endif + } + + /* Check if fontfile exists */ + if (!fontfile || !strlen(fontfile) || (fontfile && !readable(fontfile))) + { + (void) fprintf(stderr, + "%s: could not read file \"%s\" !\n", MI_NAME(mi),fontfile); + (void) free((void *) text3d); + text3d = (text3dstruct*) NULL; +#ifdef USE_BLANK + (void) fprintf(stderr, + "%s: jumping to 'blank' mode.\n", MI_NAME(mi)); + init_blank(mi); +#endif + return; + } + + tp->face= new FTFace; + if( ! tp->face->open(fontfile) ) + { + fprintf( stderr, "%s: unable to open True Type font %s !\n", MI_NAME(mi), fontfile); + delete tp->face; + (void) free((void *) text3d); + text3d = (text3dstruct*) NULL; +#ifdef USE_BLANK + (void) fprintf(stderr, + "%s: jumping to 'blank' mode.\n", MI_NAME(mi)); + init_blank(mi); +#endif + return; + } + if (MI_IS_DEBUG(mi)) { + (void) fprintf(stderr, + "%s:\n\tfontfile=%s .\n", + MI_NAME(mi), + fontfile + ); + } + free(fontfile); + + tp->words = getWords(MI_SCREEN(mi), MI_NUM_SCREENS(mi)); + + if ((tp->glx_context = init_GL(mi)) != NULL) { + + Reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + glDrawBuffer(GL_BACK); + if (MI_IS_DEBUG(mi)) { + (void) fprintf(stderr, + "%s:\n\tcamera_dist=%.1f\n\ttheta=%.1f\n\tphi=%.1f\n\textrusion=%.1f\n\trampl=%.1f.\n", + MI_NAME(mi), + camera_dist, + tp->theta, + tp->phi, + tp->extrusion, + tp->rampl + ); + } + glXSwapBuffers(display, window); + + } else { + MI_CLEARWINDOW(mi); + } +} + +/* + *----------------------------------------------------------------------------- + * Called by the mainline code periodically to update the display. + *----------------------------------------------------------------------------- + */ +void +draw_text3d(ModeInfo * mi) +{ + text3dstruct *tp = (text3dstruct *) NULL; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + MI_IS_DRAWN(mi) = True; + + if (text3d) + tp = &text3d[MI_SCREEN(mi)]; +#ifdef USE_BLANK + if (!tp) + { + draw_blank(mi); + return; + } +#else + if (!tp || !tp->glx_context) + return; +#endif + glXMakeCurrent(display, window, *(tp->glx_context)); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + Draw(tp,display,window); + Animate(tp); + if (MI_IS_DEBUG(mi)) { + (void) fprintf(stderr, + "%s:\n\tcamera_dist=%.1f\n\ttheta=%.1f\n\tphi=%.1f\n\textrusion=%.1f\n\trampl=%.1f\n", + MI_NAME(mi), + camera_dist, + tp->theta, + tp->phi, + tp->extrusion, + tp->rampl + ); + } + + glXSwapBuffers(display, window); +} + + +/* + *----------------------------------------------------------------------------- + * The display is being taken away from us. Free up malloc'ed + * memory and X resources that we've alloc'ed. Only called + * once, we must zap everything for every screen. + *----------------------------------------------------------------------------- + */ + +void +release_text3d(ModeInfo * mi) +{ + int screen; + + if (text3d != NULL) { + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + text3dstruct *tp = &text3d[screen]; + + if (tp->face) + delete tp->face; + } + (void) free((void *) text3d); + text3d = (text3dstruct*) NULL; + } +#ifdef USE_BLANK + else + release_blank(mi); +#endif + FreeAllGL(mi); +} + +void +refresh_text3d(ModeInfo * mi) +{ + /* Do nothing, it will refresh by itself :) */ +} + +void +change_text3d(ModeInfo * mi) +{ + text3dstruct *tp = (text3dstruct *) NULL; + + if (text3d) + tp = &text3d[MI_SCREEN(mi)]; + +#ifdef USE_BLANK + if (!tp) + { + refresh_blank(mi); + return; + } +#else + if (!tp || !tp->glx_context) + return; +#endif + + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(tp->glx_context)); +} + +#endif /* MODE_text3d */ diff --git a/modes/glx/text3d.h b/modes/glx/text3d.h new file mode 100644 index 00000000..a3afe74d --- /dev/null +++ b/modes/glx/text3d.h @@ -0,0 +1,41 @@ +/* text3d --- Shows moving 3D texts */ + +/* Copyright (c) E. Lassauge, 1998. */ + +/* + * 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. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (August-18-1998) + * + */ + +extern "C" { +#include +#include +} typedef struct { + + /* global Parameters */ + int wire; + float extrusion; + float rampl; + float rfreq; + char *words; + /* per Screen variables */ + GLint WinH, WinW; + GLXContext *glx_context; + FTFace *face; + float center_x, center_y, center_z; + float phi, theta, radius; +} text3dstruct; diff --git a/modes/glx/whale.c b/modes/glx/whale.c new file mode 100644 index 00000000..31bbf461 --- /dev/null +++ b/modes/glx/whale.c @@ -0,0 +1,1894 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)whale.c 1.3 98/06/18 xlockmore"; + +#endif + +/* Copyright (c) E. Lassauge, 1998. */ + +/*- + * 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 original code for this mode was written by Mark J. Kilgard + * as a demo for openGL programming. + * + * Porting it to xlock was possible by comparing the original Mesa's morph3d + * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna + * (look at morph3d.c) for his indirect help. + * + * Thanks goes also to Brian Paul for making it possible and inexpensive + * to use OpenGL at home. + * + * My e-mail address is lassauge@sagem.fr + * + * Eric Lassauge (May-13-1998) + * + */ + +/*- + * (c) Copyright 1993, 1994, Silicon Graphics, Inc. + * ALL RIGHTS RESERVED + * Permission to use, copy, modify, and distribute this software for + * any purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies and that both the copyright notice + * and this permission notice appear in supporting documentation, and that + * the name of Silicon Graphics, Inc. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. + * + * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" + * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, + * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY + * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, + * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF + * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN + * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE + * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + * + * US Government Users Restricted Rights + * Use, duplication, or disclosure by the Government is subject to + * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph + * (c)(1)(ii) of the Rights in Technical Data and Computer Software + * clause at DFARS 252.227-7013 and/or in similar or successor + * clauses in the FAR or the DOD or NASA FAR Supplement. + * Unpublished-- rights reserved under the copyright laws of the + * United States. Contractor/manufacturer is Silicon Graphics, + * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. + * + * OpenGL(TM) is a trademark of Silicon Graphics, Inc. + */ +#ifndef STANDALONE +#include "xlock.h" +#endif + +#ifdef MODE_atlantis + +#ifdef STANDALONE +#include +#endif + +#include "atlantis.h" +/* *INDENT-OFF* */ +static float N001[3] = {0.019249 ,0.011340 ,-0.999750}; +static float N002[3] = {-0.132579 ,0.954547 ,0.266952}; +static float N003[3] = {-0.196061 ,0.980392 ,-0.019778}; +static float N004[3] = {0.695461 ,0.604704 ,0.388158}; +static float N005[3] = {0.870600 ,0.425754 ,0.246557}; +static float N006[3] = {-0.881191 ,0.392012 ,0.264251}; +#if 0 +static float N007[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N008[3] = {-0.341437 ,0.887477 ,0.309523}; +static float N009[3] = {0.124035 ,-0.992278 ,0.000000}; +static float N010[3] = {0.242536 ,0.000000 ,-0.970143}; +static float N011[3] = {0.588172 ,0.000000 ,0.808736}; +static float N012[3] = {0.929824 ,-0.340623 ,-0.139298}; +static float N013[3] = {0.954183 ,0.267108 ,-0.134865}; +static float N014[3] = {0.495127 ,0.855436 ,-0.151914}; +static float N015[3] = {-0.390199 ,0.906569 ,-0.160867}; +static float N016[3] = {-0.923605 ,0.354581 ,-0.145692}; +static float N017[3] = {-0.955796 ,-0.260667 ,-0.136036}; +static float N018[3] = {-0.501283 ,-0.853462 ,-0.142540}; +static float N019[3] = {0.405300 ,-0.901974 ,-0.148913}; +static float N020[3] = {0.909913 ,-0.392746 ,-0.133451}; +static float N021[3] = {0.936494 ,0.331147 ,-0.115414}; +static float N022[3] = {0.600131 ,0.793724 ,-0.099222}; +static float N023[3] = {-0.231556 ,0.968361 ,-0.093053}; +static float N024[3] = {-0.844369 ,0.525330 ,-0.105211}; +static float N025[3] = {-0.982725 ,-0.136329 ,-0.125164}; +static float N026[3] = {-0.560844 ,-0.822654 ,-0.093241}; +static float N027[3] = {0.263884 ,-0.959981 ,-0.093817}; +static float N028[3] = {0.842057 ,-0.525192 ,-0.122938}; +static float N029[3] = {0.921620 ,0.367565 ,-0.124546}; +static float N030[3] = {0.613927 ,0.784109 ,-0.090918}; +static float N031[3] = {-0.448754 ,0.888261 ,-0.098037}; +static float N032[3] = {-0.891865 ,0.434376 ,-0.126077}; +static float N033[3] = {-0.881447 ,-0.448017 ,-0.149437}; +static float N034[3] = {-0.345647 ,-0.922057 ,-0.174183}; +static float N035[3] = {0.307998 ,-0.941371 ,-0.137688}; +static float N036[3] = {0.806316 ,-0.574647 ,-0.140124}; +static float N037[3] = {0.961346 ,0.233646 ,-0.145681}; +static float N038[3] = {0.488451 ,0.865586 ,-0.110351}; +static float N039[3] = {-0.374290 ,0.921953 ,-0.099553}; +static float N040[3] = {-0.928504 ,0.344533 ,-0.138485}; +static float N041[3] = {-0.918419 ,-0.371792 ,-0.135189}; +static float N042[3] = {-0.520666 ,-0.833704 ,-0.183968}; +static float N043[3] = {0.339204 ,-0.920273 ,-0.195036}; +static float N044[3] = {0.921475 ,-0.387382 ,-0.028636}; +static float N045[3] = {0.842465 ,0.533335 ,-0.076204}; +static float N046[3] = {0.380110 ,0.924939 ,0.002073}; +static float N047[3] = {-0.276128 ,0.961073 ,-0.009579}; +static float N048[3] = {-0.879684 ,0.473001 ,-0.049250}; +static float N049[3] = {-0.947184 ,-0.317614 ,-0.044321}; +static float N050[3] = {-0.642059 ,-0.764933 ,-0.051363}; +static float N051[3] = {0.466794 ,-0.880921 ,-0.077990}; +static float N052[3] = {0.898509 ,-0.432277 ,0.076279}; +static float N053[3] = {0.938985 ,0.328141 ,0.103109}; +static float N054[3] = {0.442420 ,0.895745 ,0.043647}; +static float N055[3] = {-0.255163 ,0.966723 ,0.018407}; +static float N056[3] = {-0.833769 ,0.540650 ,0.111924}; +static float N057[3] = {-0.953653 ,-0.289939 ,0.080507}; +static float N058[3] = {-0.672357 ,-0.730524 ,0.119461}; +static float N059[3] = {0.522249 ,-0.846652 ,0.102157}; +static float N060[3] = {0.885868 ,-0.427631 ,0.179914}; +#if 0 +static float N061[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N062[3] = {0.648942 ,0.743116 ,0.163255}; +static float N063[3] = {-0.578967 ,0.807730 ,0.111219}; +#if 0 +static float N064[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float N065[3] = {-0.909864 ,-0.352202 ,0.219321}; +static float N066[3] = {-0.502541 ,-0.818090 ,0.279610}; +static float N067[3] = {0.322919 ,-0.915358 ,0.240504}; +static float N068[3] = {0.242536 ,0.000000 ,-0.970143}; +static float N069[3] = {0.000000 ,1.000000 ,0.000000}; +static float N070[3] = {0.000000 ,1.000000 ,0.000000}; +static float N071[3] = {0.000000 ,1.000000 ,0.000000}; +static float N072[3] = {0.000000 ,1.000000 ,0.000000}; +static float N073[3] = {0.000000 ,1.000000 ,0.000000}; +static float N074[3] = {0.000000 ,1.000000 ,0.000000}; +static float N075[3] = {0.031220 ,0.999025 ,-0.031220}; +static float N076[3] = {0.000000 ,1.000000 ,0.000000}; +static float N077[3] = {0.446821 ,0.893642 ,0.041889}; +static float N078[3] = {0.863035 ,-0.100980 ,0.494949}; +static float N079[3] = {0.585597 ,-0.808215 ,0.062174}; +static float N080[3] = {0.000000 ,1.000000 ,0.000000}; +static float N081[3] = {1.000000 ,0.000000 ,0.000000}; +static float N082[3] = {0.000000 ,1.000000 ,0.000000}; +static float N083[3] = {-1.000000 ,0.000000 ,0.000000}; +static float N084[3] = {-0.478893 ,0.837129 ,-0.264343}; +static float N085[3] = {0.000000 ,1.000000 ,0.000000}; +static float N086[3] = {0.763909 ,0.539455 ,-0.354163}; +static float N087[3] = {0.446821 ,0.893642 ,0.041889}; +static float N088[3] = {0.385134 ,-0.908288 ,0.163352}; +static float N089[3] = {-0.605952 ,0.779253 ,-0.159961}; +static float N090[3] = {0.000000 ,1.000000 ,0.000000}; +static float N091[3] = {0.000000 ,1.000000 ,0.000000}; +static float N092[3] = {0.000000 ,1.000000 ,0.000000}; +static float N093[3] = {0.000000 ,1.000000 ,0.000000}; +static float N094[3] = {1.000000 ,0.000000 ,0.000000}; +static float N095[3] = {-1.000000 ,0.000000 ,0.000000}; +static float N096[3] = {0.644444 ,-0.621516 ,0.445433}; +static float N097[3] = {-0.760896 ,-0.474416 ,0.442681}; +static float N098[3] = {0.636888 ,-0.464314 ,0.615456}; +static float N099[3] = {-0.710295 ,0.647038 ,0.277168}; +static float N100[3] = {0.009604 ,0.993655 ,0.112063}; +#if 0 +static float N101[3] = {0.000000 ,1.000000 ,0.000000}; +static float N102[3] = {0.000000 ,1.000000 ,0.000000}; +static float N103[3] = {0.000000 ,1.000000 ,0.000000}; +static float N104[3] = {0.031837 ,0.999285 ,0.020415}; +static float N105[3] = {0.031837 ,0.999285 ,0.020415}; +static float N106[3] = {0.031837 ,0.999285 ,0.020415}; +static float N107[3] = {0.014647 ,0.999648 ,0.022115}; +static float N108[3] = {0.014647 ,0.999648 ,0.022115}; +static float N109[3] = {0.014647 ,0.999648 ,0.022115}; +static float N110[3] = {-0.985141 ,0.039475 ,0.167149}; +static float N111[3] = {-0.985141 ,0.039475 ,0.167149}; +static float N112[3] = {-0.985141 ,0.039475 ,0.167149}; +static float N113[3] = {0.000000 ,1.000000 ,0.000000}; +static float N114[3] = {0.000000 ,1.000000 ,0.000000}; +static float N115[3] = {0.000000 ,1.000000 ,0.000000}; +static float N116[3] = {0.000000 ,1.000000 ,0.000000}; +static float N117[3] = {0.000000 ,1.000000 ,0.000000}; +static float N118[3] = {0.000000 ,1.000000 ,0.000000}; +static float N119[3] = {0.000000 ,1.000000 ,0.000000}; +static float N120[3] = {0.000000 ,1.000000 ,0.000000}; +static float N121[3] = {0.000000 ,1.000000 ,0.000000}; +#endif +static float iP001[3] = {18.74, 13.19, 3.76}; +static float P001[3] = {18.74, 13.19, 3.76}; +static float P002[3] = {0.00, 390.42, 10292.57}; +static float P003[3] = {55.80, 622.31, 8254.35}; +static float P004[3] = {20.80, 247.66, 10652.13}; +static float P005[3] = {487.51, 198.05, 9350.78}; +static float P006[3] = {-457.61, 199.04, 9353.01}; +#if 0 +static float P007[3] = {0.00, 259.00, 10276.27}; +#endif +static float P008[3] = {-34.67, 247.64, 10663.71}; +static float iP009[3] = {97.46, 67.63, 593.82}; +static float iP010[3] = {-84.33, 67.63, 588.18}; +static float iP011[3] = {118.69, 8.98, -66.91}; +static float P009[3] = {97.46, 67.63, 593.82}; +static float P010[3] = {-84.33, 67.63, 588.18}; +static float P011[3] = {118.69, 8.98, -66.91}; +static float iP012[3] = {156.48, -31.95, 924.54}; +static float iP013[3] = {162.00, 110.22, 924.54}; +static float iP014[3] = {88.16, 221.65, 924.54}; +static float iP015[3] = {-65.21, 231.16, 924.54}; +static float iP016[3] = {-156.48, 121.97, 924.54}; +static float iP017[3] = {-162.00, -23.93, 924.54}; +static float iP018[3] = {-88.16, -139.10, 924.54}; +static float iP019[3] = {65.21, -148.61, 924.54}; +static float iP020[3] = {246.87, -98.73, 1783.04}; +static float iP021[3] = {253.17, 127.76, 1783.04}; +static float iP022[3] = {132.34, 270.77, 1783.04}; +static float iP023[3] = {-97.88, 285.04, 1783.04}; +static float iP024[3] = {-222.97, 139.80, 1783.04}; +static float iP025[3] = {-225.29, -86.68, 1783.04}; +static float iP026[3] = {-108.44, -224.15, 1783.04}; +static float iP027[3] = {97.88, -221.56, 1783.04}; +static float iP028[3] = {410.55, -200.66, 3213.87}; +static float iP029[3] = {432.19, 148.42, 3213.87}; +static float iP030[3] = {200.66, 410.55, 3213.87}; +static float iP031[3] = {-148.42, 432.19, 3213.87}; +static float iP032[3] = {-407.48, 171.88, 3213.87}; +static float iP033[3] = {-432.19, -148.42, 3213.87}; +static float iP034[3] = {-148.88, -309.74, 3213.87}; +static float iP035[3] = {156.38, -320.17, 3213.87}; +static float iP036[3] = {523.39, -303.81, 4424.57}; +static float iP037[3] = {574.66, 276.84, 4424.57}; +static float iP038[3] = {243.05, 492.50, 4424.57}; +static float iP039[3] = {-191.23, 520.13, 4424.57}; +static float iP040[3] = {-523.39, 304.01, 4424.57}; +static float iP041[3] = {-574.66, -231.83, 4424.57}; +static float iP042[3] = {-266.95, -578.17, 4424.57}; +static float iP043[3] = {211.14, -579.67, 4424.57}; +static float iP044[3] = {680.57, -370.27, 5943.46}; +static float iP045[3] = {834.01, 363.09, 5943.46}; +static float iP046[3] = {371.29, 614.13, 5943.46}; +static float iP047[3] = {-291.43, 621.86, 5943.46}; +static float iP048[3] = {-784.13, 362.60, 5943.46}; +static float iP049[3] = {-743.29, -325.82, 5943.46}; +static float iP050[3] = {-383.24, -804.77, 5943.46}; +static float iP051[3] = {283.47, -846.09, 5943.46}; +static float P012[3] = {156.48, -31.95, 924.54}; +static float P013[3] = {162.00, 110.22, 924.54}; +static float P014[3] = {88.16, 221.65, 924.54}; +static float P015[3] = {-65.21, 231.16, 924.54}; +static float P016[3] = {-156.48, 121.97, 924.54}; +static float P017[3] = {-162.00, -23.93, 924.54}; +static float P018[3] = {-88.16, -139.10, 924.54}; +static float P019[3] = {65.21, -148.61, 924.54}; +static float P020[3] = {246.87, -98.73, 1783.04}; +static float P021[3] = {253.17, 127.76, 1783.04}; +static float P022[3] = {132.34, 270.77, 1783.04}; +static float P023[3] = {-97.88, 285.04, 1783.04}; +static float P024[3] = {-222.97, 139.80, 1783.04}; +static float P025[3] = {-225.29, -86.68, 1783.04}; +static float P026[3] = {-108.44, -224.15, 1783.04}; +static float P027[3] = {97.88, -221.56, 1783.04}; +static float P028[3] = {410.55, -200.66, 3213.87}; +static float P029[3] = {432.19, 148.42, 3213.87}; +static float P030[3] = {200.66, 410.55, 3213.87}; +static float P031[3] = {-148.42, 432.19, 3213.87}; +static float P032[3] = {-407.48, 171.88, 3213.87}; +static float P033[3] = {-432.19, -148.42, 3213.87}; +static float P034[3] = {-148.88, -309.74, 3213.87}; +static float P035[3] = {156.38, -320.17, 3213.87}; +static float P036[3] = {523.39, -303.81, 4424.57}; +static float P037[3] = {574.66, 276.84, 4424.57}; +static float P038[3] = {243.05, 492.50, 4424.57}; +static float P039[3] = {-191.23, 520.13, 4424.57}; +static float P040[3] = {-523.39, 304.01, 4424.57}; +static float P041[3] = {-574.66, -231.83, 4424.57}; +static float P042[3] = {-266.95, -578.17, 4424.57}; +static float P043[3] = {211.14, -579.67, 4424.57}; +static float P044[3] = {680.57, -370.27, 5943.46}; +static float P045[3] = {834.01, 363.09, 5943.46}; +static float P046[3] = {371.29, 614.13, 5943.46}; +static float P047[3] = {-291.43, 621.86, 5943.46}; +static float P048[3] = {-784.13, 362.60, 5943.46}; +static float P049[3] = {-743.29, -325.82, 5943.46}; +static float P050[3] = {-383.24, -804.77, 5943.46}; +static float P051[3] = {283.47, -846.09, 5943.46}; +static float P052[3] = {599.09, -332.24, 7902.59}; +static float P053[3] = {735.48, 306.26, 7911.92}; +static float P054[3] = {321.55, 558.53, 7902.59}; +static float P055[3] = {-260.54, 559.84, 7902.59}; +static float P056[3] = {-698.66, 320.83, 7902.59}; +static float P057[3] = {-643.29, -299.16, 7902.59}; +static float P058[3] = {-341.47, -719.30, 7902.59}; +static float P059[3] = {252.57, -756.12, 7902.59}; +static float P060[3] = {458.39, -265.31, 9355.44}; +static float iP061[3] = {353.63, 138.70, 10214.20}; +static float P061[3] = {353.63, 138.70, 10214.20}; +static float P062[3] = {224.04, 438.98, 9364.77}; +static float P063[3] = {-165.71, 441.27, 9355.44}; +static float iP064[3] = {-326.40, 162.04, 10209.54}; +static float P064[3] = {-326.40, 162.04, 10209.54}; +static float P065[3] = {-473.99, -219.71, 9355.44}; +static float P066[3] = {-211.97, -479.87, 9355.44}; +static float P067[3] = {192.86, -504.03, 9355.44}; +static float iP068[3] = {-112.44, 9.25, -64.42}; +static float iP069[3] = {1155.63, 0.00, -182.46}; +static float iP070[3] = {-1143.13, 0.00, -181.54}; +static float iP071[3] = {1424.23, 0.00, -322.09}; +static float iP072[3] = {-1368.01, 0.00, -310.38}; +static float iP073[3] = {1255.57, 2.31, 114.05}; +static float iP074[3] = {-1149.38, 0.00, 117.12}; +static float iP075[3] = {718.36, 0.00, 433.36}; +static float iP076[3] = {-655.90, 0.00, 433.36}; +static float P068[3] = {-112.44, 9.25, -64.42}; +static float P069[3] = {1155.63, 0.00, -182.46}; +static float P070[3] = {-1143.13, 0.00, -181.54}; +static float P071[3] = {1424.23, 0.00, -322.09}; +static float P072[3] = {-1368.01, 0.00, -310.38}; +static float P073[3] = {1255.57, 2.31, 114.05}; +static float P074[3] = {-1149.38, 0.00, 117.12}; +static float P075[3] = {718.36, 0.00, 433.36}; +static float P076[3] = {-655.90, 0.00, 433.36}; +static float P077[3] = {1058.00, -2.66, 7923.51}; +static float P078[3] = {-1016.51, -15.47, 7902.87}; +static float P079[3] = {-1363.99, -484.50, 7593.38}; +static float P080[3] = {1478.09, -861.47, 7098.12}; +static float P081[3] = {1338.06, -284.68, 7024.15}; +static float P082[3] = {-1545.51, -860.64, 7106.60}; +static float P083[3] = {1063.19, -70.46, 7466.60}; +static float P084[3] = {-1369.18, -288.11, 7015.34}; +static float P085[3] = {1348.44, -482.50, 7591.41}; +static float P086[3] = {-1015.45, -96.80, 7474.86}; +static float P087[3] = {731.04, 148.38, 7682.58}; +static float P088[3] = {-697.03, 151.82, 7668.81}; +static float P089[3] = {-686.82, 157.09, 7922.29}; +static float P090[3] = {724.73, 147.75, 7931.39}; +static float iP091[3] = {0.00, 327.10, 2346.55}; +static float iP092[3] = {0.00, 552.28, 2311.31}; +static float iP093[3] = {0.00, 721.16, 2166.41}; +static float iP094[3] = {0.00, 693.42, 2388.80}; +static float iP095[3] = {0.00, 389.44, 2859.97}; +static float P091[3] = {0.00, 327.10, 2346.55}; +static float P092[3] = {0.00, 552.28, 2311.31}; +static float P093[3] = {0.00, 721.16, 2166.41}; +static float P094[3] = {0.00, 693.42, 2388.80}; +static float P095[3] = {0.00, 389.44, 2859.97}; +static float iP096[3] = {222.02, -183.67, 10266.89}; +static float iP097[3] = {-128.90, -182.70, 10266.89}; +static float iP098[3] = {41.04, 88.31, 10659.36}; +static float iP099[3] = {-48.73, 88.30, 10659.36}; +static float P096[3] = {222.02, -183.67, 10266.89}; +static float P097[3] = {-128.90, -182.70, 10266.89}; +static float P098[3] = {41.04, 88.31, 10659.36}; +static float P099[3] = {-48.73, 88.30, 10659.36}; +static float P100[3] = {0.00, 603.42, 9340.68}; +#if 0 +static float P101[3] = {5.70, 567.00, 7862.98}; +static float P102[3] = {521.61, 156.61, 9162.34}; +static float P103[3] = {83.68, 566.67, 7861.26}; +#endif +static float P104[3] = {-9.86, 567.62, 7858.65}; +static float P105[3] = {31.96, 565.27, 7908.46}; +static float P106[3] = {22.75, 568.13, 7782.83}; +static float P107[3] = {58.93, 568.42, 7775.94}; +static float P108[3] = {55.91, 565.59, 7905.86}; +static float P109[3] = {99.21, 566.00, 7858.65}; +static float P110[3] = {-498.83, 148.14, 9135.10}; +static float P111[3] = {-495.46, 133.24, 9158.48}; +static float P112[3] = {-490.82, 146.23, 9182.76}; +static float P113[3] = {-489.55, 174.11, 9183.66}; +static float P114[3] = {-492.92, 189.00, 9160.28}; +static float P115[3] = {-497.56, 176.02, 9136.00}; +static float P116[3] = {526.54, 169.68, 9137.70}; +static float P117[3] = {523.49, 184.85, 9161.42}; +static float P118[3] = {518.56, 171.78, 9186.06}; +static float P119[3] = {516.68, 143.53, 9186.98}; +static float P120[3] = {519.73, 128.36, 9163.26}; +static float P121[3] = {524.66, 141.43, 9138.62}; +/* *INDENT-ON* */ + + + +static void +Whale001(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); + glBegin(cap); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N076); + glVertex3fv(P076); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); + glBegin(cap); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N076); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glNormal3fv(N076); + glVertex3fv(P076); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N074); + glVertex3fv(P074); + glEnd(); + glBegin(cap); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N072); + glVertex3fv(P072); + glNormal3fv(N074); + glVertex3fv(P074); + glEnd(); + glBegin(cap); + glNormal3fv(N072); + glVertex3fv(P072); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N074); + glVertex3fv(P074); + glEnd(); + glBegin(cap); + glNormal3fv(N074); + glVertex3fv(P074); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N076); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N076); + glVertex3fv(P076); + glEnd(); + glBegin(cap); + glNormal3fv(N076); + glVertex3fv(P076); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); + glBegin(cap); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); +} + +static void +Whale002(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glNormal3fv(N075); + glVertex3fv(P075); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N075); + glVertex3fv(P075); + glNormal3fv(N073); + glVertex3fv(P073); + glEnd(); + glBegin(cap); + glNormal3fv(N071); + glVertex3fv(P071); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N073); + glVertex3fv(P073); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(cap); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N073); + glVertex3fv(P073); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(cap); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N071); + glVertex3fv(P071); + glNormal3fv(N073); + glVertex3fv(P073); + glEnd(); +} + +static void +Whale003(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(cap); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N015); + glVertex3fv(P015); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N013); + glVertex3fv(P013); + glEnd(); + glBegin(cap); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N014); + glVertex3fv(P014); + glEnd(); +} + +static void +Whale004(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N022); + glVertex3fv(P022); + glEnd(); + glBegin(cap); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N023); + glVertex3fv(P023); + glEnd(); + glBegin(cap); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N024); + glVertex3fv(P024); + glEnd(); + glBegin(cap); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N025); + glVertex3fv(P025); + glEnd(); + glBegin(cap); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(cap); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N020); + glVertex3fv(P020); + glEnd(); + glBegin(cap); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(cap); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N027); + glVertex3fv(P027); + glEnd(); +} + +static void +Whale005(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(cap); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(cap); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(cap); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(cap); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(cap); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(cap); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(cap); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(cap); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N035); + glVertex3fv(P035); + glEnd(); + glBegin(cap); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N033); + glVertex3fv(P033); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); + glBegin(cap); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); +} + +static void +Whale006(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(cap); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(cap); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N095); + glVertex3fv(P095); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(cap); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glNormal3fv(N095); + glVertex3fv(P095); + glEnd(); +} + +static void +Whale007(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(cap); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(cap); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(cap); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(cap); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(cap); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(cap); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(cap); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(cap); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); + glBegin(cap); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N039); + glVertex3fv(P039); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(cap); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); +} + +static void +Whale008(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(cap); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N051); + glVertex3fv(P051); + glEnd(); + glBegin(cap); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(cap); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(cap); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(cap); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(cap); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(cap); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(cap); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(cap); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(cap); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N046); + glVertex3fv(P046); + glEnd(); +} + +static void +Whale009(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(cap); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(cap); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(cap); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(cap); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(cap); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(cap); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(cap); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(cap); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(cap); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); +} + +static void +Whale010(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); + glBegin(cap); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(cap); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(cap); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); +} + +static void +Whale011(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(cap); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(cap); + glNormal3fv(N079); + glVertex3fv(P079); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(cap); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(cap); + glNormal3fv(N089); + glVertex3fv(P089); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(cap); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(cap); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); +} + +static void +Whale012(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N066); + glVertex3fv(P066); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); + glBegin(cap); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N067); + glVertex3fv(P067); + glEnd(); + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(cap); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N006); + glVertex3fv(P006); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(cap); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(cap); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N005); + glVertex3fv(P005); + glEnd(); + glBegin(cap); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(cap); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); + glBegin(cap); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); +} + +static void +Whale013(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N096); + glVertex3fv(P096); + glNormal3fv(N097); + glVertex3fv(P097); + glEnd(); + glBegin(cap); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N096); + glVertex3fv(P096); + glNormal3fv(N098); + glVertex3fv(P098); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(cap); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N097); + glVertex3fv(P097); + glEnd(); + glBegin(cap); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N096); + glVertex3fv(P096); + glEnd(); + glBegin(cap); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N096); + glVertex3fv(P096); + glEnd(); + glBegin(cap); + glNormal3fv(N096); + glVertex3fv(P096); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N098); + glVertex3fv(P098); + glEnd(); + glBegin(cap); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N097); + glVertex3fv(P097); + glEnd(); + glBegin(cap); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(cap); + glVertex3fv(P005); + glVertex3fv(P006); + glVertex3fv(P099); + glVertex3fv(P098); + glEnd(); +} + +static void +Whale014(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N004); + glVertex3fv(P004); + glNormal3fv(N005); + glVertex3fv(P005); + glEnd(); + glBegin(cap); + glVertex3fv(P006); + glVertex3fv(P005); + glVertex3fv(P004); + glVertex3fv(P008); + glEnd(); + glBegin(cap); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(cap); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N004); + glVertex3fv(P004); + glEnd(); + glBegin(cap); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N004); + glVertex3fv(P004); + glEnd(); +} + +static void +Whale015(GLenum cap) +{ + glBegin(cap); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N100); + glVertex3fv(P100); + glEnd(); + glBegin(cap); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(cap); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N062); + glVertex3fv(P062); + glEnd(); + glBegin(cap); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(cap); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N062); + glVertex3fv(P062); + glEnd(); +} + +static void +Whale016(GLenum cap) +{ + glBegin(cap); + glVertex3fv(P104); + glVertex3fv(P105); + glVertex3fv(P106); + glEnd(); + glBegin(cap); + glVertex3fv(P107); + glVertex3fv(P108); + glVertex3fv(P109); + glEnd(); + glBegin(cap); + glVertex3fv(P110); + glVertex3fv(P111); + glVertex3fv(P112); + glVertex3fv(P113); + glVertex3fv(P114); + glVertex3fv(P115); + glEnd(); + glBegin(cap); + glVertex3fv(P116); + glVertex3fv(P117); + glVertex3fv(P118); + glVertex3fv(P119); + glVertex3fv(P120); + glVertex3fv(P121); + glEnd(); +} + +void +DrawWhale(fishRec * fish, int wire) +{ + float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7; + float pitch, thrash, chomp; + GLenum cap; + + fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360; + + thrash = 70.0 * fish->v; + + seg0 = 1.5 * thrash * sin((fish->htail) * RRAD); + seg1 = 2.5 * thrash * sin((fish->htail + 10.0) * RRAD); + seg2 = 3.7 * thrash * sin((fish->htail + 15.0) * RRAD); + seg3 = 4.8 * thrash * sin((fish->htail + 23.0) * RRAD); + seg4 = 6.0 * thrash * sin((fish->htail + 28.0) * RRAD); + seg5 = 6.5 * thrash * sin((fish->htail + 35.0) * RRAD); + seg6 = 6.5 * thrash * sin((fish->htail + 40.0) * RRAD); + seg7 = 6.5 * thrash * sin((fish->htail + 55.0) * RRAD); + + pitch = fish->v * sin((fish->htail - 160.0) * RRAD); + + chomp = 0.0; + if (fish->v > 2.0) { + chomp = -(fish->v - 2.0) * 200.0; + } + P012[1] = iP012[1] + seg5; + P013[1] = iP013[1] + seg5; + P014[1] = iP014[1] + seg5; + P015[1] = iP015[1] + seg5; + P016[1] = iP016[1] + seg5; + P017[1] = iP017[1] + seg5; + P018[1] = iP018[1] + seg5; + P019[1] = iP019[1] + seg5; + + P020[1] = iP020[1] + seg4; + P021[1] = iP021[1] + seg4; + P022[1] = iP022[1] + seg4; + P023[1] = iP023[1] + seg4; + P024[1] = iP024[1] + seg4; + P025[1] = iP025[1] + seg4; + P026[1] = iP026[1] + seg4; + P027[1] = iP027[1] + seg4; + + P028[1] = iP028[1] + seg2; + P029[1] = iP029[1] + seg2; + P030[1] = iP030[1] + seg2; + P031[1] = iP031[1] + seg2; + P032[1] = iP032[1] + seg2; + P033[1] = iP033[1] + seg2; + P034[1] = iP034[1] + seg2; + P035[1] = iP035[1] + seg2; + + P036[1] = iP036[1] + seg1; + P037[1] = iP037[1] + seg1; + P038[1] = iP038[1] + seg1; + P039[1] = iP039[1] + seg1; + P040[1] = iP040[1] + seg1; + P041[1] = iP041[1] + seg1; + P042[1] = iP042[1] + seg1; + P043[1] = iP043[1] + seg1; + + P044[1] = iP044[1] + seg0; + P045[1] = iP045[1] + seg0; + P046[1] = iP046[1] + seg0; + P047[1] = iP047[1] + seg0; + P048[1] = iP048[1] + seg0; + P049[1] = iP049[1] + seg0; + P050[1] = iP050[1] + seg0; + P051[1] = iP051[1] + seg0; + + P009[1] = iP009[1] + seg6; + P010[1] = iP010[1] + seg6; + P075[1] = iP075[1] + seg6; + P076[1] = iP076[1] + seg6; + + P001[1] = iP001[1] + seg7; + P011[1] = iP011[1] + seg7; + P068[1] = iP068[1] + seg7; + P069[1] = iP069[1] + seg7; + P070[1] = iP070[1] + seg7; + P071[1] = iP071[1] + seg7; + P072[1] = iP072[1] + seg7; + P073[1] = iP073[1] + seg7; + P074[1] = iP074[1] + seg7; + + P091[1] = iP091[1] + seg3 * 1.1; + P092[1] = iP092[1] + seg3; + P093[1] = iP093[1] + seg3; + P094[1] = iP094[1] + seg3; + P095[1] = iP095[1] + seg3 * 0.9; + + P099[1] = iP099[1] + chomp; + P098[1] = iP098[1] + chomp; + P064[1] = iP064[1] + chomp; + P061[1] = iP061[1] + chomp; + P097[1] = iP097[1] + chomp; + P096[1] = iP096[1] + chomp; + + glPushMatrix(); + + glRotatef(pitch, 1.0, 0.0, 0.0); + + glTranslatef(0.0, 0.0, 8000.0); + + glRotatef(180.0, 0.0, 1.0, 0.0); + + glScalef(3.0, 3.0, 3.0); + + glEnable(GL_CULL_FACE); + + cap = wire ? GL_LINE_LOOP : GL_POLYGON; + Whale001(cap); + Whale002(cap); + Whale003(cap); + Whale004(cap); + Whale005(cap); + Whale006(cap); + Whale007(cap); + Whale008(cap); + Whale009(cap); + Whale010(cap); + Whale011(cap); + Whale012(cap); + Whale013(cap); + Whale014(cap); + Whale015(cap); + Whale016(cap); + + glDisable(GL_CULL_FACE); + + glPopMatrix(); +} +#endif diff --git a/modes/goop.c b/modes/goop.c new file mode 100644 index 00000000..404d0a0c --- /dev/null +++ b/modes/goop.c @@ -0,0 +1,591 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* goop --- goop from a lava lamp */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)goop.c 4.10 98/03/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1997 by Jamie Zawinski + * + * 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: + * 24-Mar-98: xlock version David Bagley + * 1997: xscreensaver version Jamie Zawinski + */ + +/*- + * original copyright + * 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 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... + */ + +#ifdef STANDALONE +#define PROGCLASS "Goop" +#define HACK_INIT init_goop +#define HACK_DRAW draw_goop +#define goop_opts xlockmore_opts +#define DEFAULTS "*delay: 40000 \n" \ + "*count: 100 \n" +/*- Come back to this. + "*delay: 12000", +"*transparent: true", +"*additive: true", +"*xor: false", +"*count: 0", +"*planes: 0", +"*thickness: 5", +"*torque: 0.0075", +"*elasticity: 1.8", +"*maxVelocity: 1.2", + */ +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ +#include + +#ifdef MODE_goop + +ModeSpecOpt goop_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct goop_description = +{"goop", "init_goop", "draw_goop", "release_goop", + "refresh_goop", "init_goop", NULL, &goop_opts, + 10000, -5, 1, 1, 64, 1.0, "", + "Shows goop from a lava lamp", 0, NULL}; + +#endif + + +#define SCALE 10000 /* fixed-point math, for sub-pixel motion */ +#define DEF_COUNT 12 /* When planes and count are 0, how many blobs. */ + + +#define RANDSIGN() ((LRAND() & 1) ? 1 : -1) + +typedef struct { + 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 *splines; +} blob; + +typedef struct { + int nblobs; /* number of blops per plane */ + blob *blobs; + Pixmap pixmap; + unsigned long pixel; + GC gc; +} layer; + +enum goop_mode { + transparent, + opaque, + xor, + outline +}; + +typedef struct { + enum goop_mode mode; + int width, height; + int nlayers; + layer *layers; + unsigned long background; + Pixmap pixmap; + GC pixmap_gc; +} goopstruct; + +static goopstruct *goops = NULL; + +static void +make_blob(blob * b, int maxx, int maxy, int size) +{ + int i; + long 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 = 0.0075; /* torque init */ + b->elasticity = (long) (SCALE * 1.8); /* elasticity init */ + b->max_velocity = (long) (SCALE * 1.2); /* max_velocity init */ + + b->x = NRAND(maxx); + b->y = NRAND(maxy); + + b->dx = NRAND(b->max_velocity) * RANDSIGN(); + b->dy = NRAND(b->max_velocity) * RANDSIGN(); + b->th = (2.0 * M_PI) * LRAND() / MAXRAND * RANDSIGN(); + b->npoints = (int) (LRAND() % 5) + 5; + + b->splines = make_spline(b->npoints); + b->r = (long *) malloc(sizeof (*b->r) * b->npoints); + for (i = 0; i < b->npoints; i++) + b->r[i] = ((LRAND() % mid) + (mid / 2)) * RANDSIGN(); +} + +static void +throb_blob(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 + (long) (ra * cos(i * frac + th)); + y = b->y + (long) (ra * sin(i * frac + th)); + + b->splines->control_x[i] = x / SCALE; + b->splines->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 += (NRAND(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 (!(LRAND() % 50)) + r = -r; + + b->r[i] = r; + } +} + +static void +move_blob(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 (!(LRAND() % 10)) { + b->dx += (NRAND(b->max_velocity / 2) * RANDSIGN()); + b->dy += (NRAND(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 : (b->torque) * LRAND() / MAXRAND); + + 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 (!(LRAND() % 100)) + b->th *= -1; +} + + +static void +draw_blob(Display * display, Drawable drawable, GC gc, blob * b, + Bool fill_p) +{ + compute_closed_spline(b->splines); +#ifdef DEBUG + { + int i; + + for (i = 0; i < b->npoints; i++) + XDrawLine(display, drawable, gc, b->x / SCALE, b->y / SCALE, + b->splines->control_x[i], b->splines->control_y[i]); + } +#else + if (fill_p) + XFillPolygon(display, drawable, gc, b->splines->points, b->splines->n_points, + Nonconvex, CoordModeOrigin); + else +#endif + XDrawLines(display, drawable, gc, b->splines->points, b->splines->n_points, + CoordModeOrigin); +} + +static void +make_layer(ModeInfo * mi, layer * l, int nblobs) +{ + int i; + int blob_min, blob_max; + XGCValues gcv; + int width = MI_WIDTH(mi), height = MI_HEIGHT(mi); + + l->nblobs = nblobs; + + l->blobs = (blob *) calloc(l->nblobs, sizeof (blob)); + + blob_max = (width < height ? width : height) / 2; + blob_min = (blob_max * 2) / 3; + for (i = 0; i < l->nblobs; i++) + make_blob(&(l->blobs[i]), width, height, + (int) (LRAND() % (blob_max - blob_min)) + blob_min); + + l->pixmap = XCreatePixmap(MI_DISPLAY(mi), MI_WINDOW(mi), width, height, 1); + l->gc = XCreateGC(MI_DISPLAY(mi), l->pixmap, 0, &gcv); +} + +static void +draw_layer_plane(Display * display, layer * layer_plane, int width, int height) +{ + int i; + + XSetForeground(display, layer_plane->gc, 1L); + XFillRectangle(display, layer_plane->pixmap, layer_plane->gc, + 0, 0, width, height); + XSetForeground(display, layer_plane->gc, 0L); + for (i = 0; i < layer_plane->nblobs; i++) { + throb_blob(&(layer_plane->blobs[i])); + move_blob(&(layer_plane->blobs[i]), width, height); + draw_blob(display, layer_plane->pixmap, layer_plane->gc, + &(layer_plane->blobs[i]), True); + } +} + + +static void +draw_layer_blobs(Display * display, Drawable drawable, GC gc, + layer * layer_plane, int width, int height, + Bool fill_p) +{ + int i; + + for (i = 0; i < layer_plane->nblobs; i++) { + throb_blob(&(layer_plane->blobs[i])); + move_blob(&(layer_plane->blobs[i]), width, height); + draw_blob(display, drawable, gc, &(layer_plane->blobs[i]), fill_p); + } +} + +static void +free_goop(Display * display, goopstruct * gp) +{ + int l; + + if (gp->layers) { + for (l = 0; l < gp->nlayers; l++) { + if (gp->layers[l].blobs) { + int b; + + for (b = 0; b < gp->layers[l].nblobs; b++) { + if (gp->layers[l].blobs[b].r) + (void) free((void *) gp->layers[l].blobs[b].r); + free_spline(gp->layers[l].blobs[b].splines); + } + (void) free((void *) gp->layers[l].blobs); + } + if (gp->layers[l].gc != None) + XFreeGC(display, gp->layers[l].gc); + if (gp->layers[l].pixmap != None) + XFreePixmap(display, gp->layers[l].pixmap); + } + if (gp->pixmap_gc != None) { + XFreeGC(display, gp->pixmap_gc); + gp->pixmap_gc = None; + } + if (gp->pixmap != None) { + XFreePixmap(display, gp->pixmap); + gp->pixmap = None; + } + (void) free((void *) gp->layers); + gp->layers = NULL; + } +} + +void +init_goop(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + goopstruct *gp; + int i; + XGCValues gcv; + int nblobs; + + unsigned long *plane_masks = 0; + unsigned long base_pixel = 0; + + if (goops == NULL) { + if ((goops = (goopstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (goopstruct))) == NULL) + return; + } + gp = &goops[MI_SCREEN(mi)]; + + + gp->mode = (False /* xor init */ ? xor + : (True /* transparent init */ ? transparent : opaque)); + + gp->width = MI_WIDTH(mi); + gp->height = MI_HEIGHT(mi); + + free_goop(display, gp); + + gp->nlayers = 0; /* planes init */ + if (gp->nlayers <= 0) + gp->nlayers = (int) (LRAND() % (MI_DEPTH(mi) - 2)) + 2; + gp->layers = (layer *) calloc(gp->nlayers, sizeof (layer)); + + + if ((MI_NPIXELS(mi) < 2) && gp->mode == transparent) + gp->mode = opaque; + + /* Try to allocate some color planes before committing to nlayers. + */ +#if 0 + if (gp->mode == transparent) { + Bool additive_p = True; /* additive init */ + int nplanes = gp->nlayers; + + /* allocate_alpha_colors (display, MI_COLORMAP(mi), &nplanes, additive_p, &plane_masks, + &base_pixel); *//* COME BACK */ + if (nplanes > 1) + gp->nlayers = nplanes; + else { + (void) fprintf(stderr, + "could not allocate any color planes; turning transparency off.\n"); + gp->mode = opaque; + } + } +#else + if (gp->mode == transparent) + gp->mode = opaque; +#endif + + nblobs = MI_COUNT(mi); + if (nblobs < 0) { + nblobs = NRAND(-nblobs) + 1; /* Add 1 so its not too boring */ + } { + int lblobs[32]; + int total = DEF_COUNT; + + /* What does this do? DAB */ + if (nblobs <= 0) + while (total) + for (i = 0; total && i < gp->nlayers; i++) + lblobs[i]++, total--; + for (i = 0; i < gp->nlayers; i++) + make_layer(mi, &(gp->layers[i]), + (nblobs > 0 ? nblobs : lblobs[i])); + } + + if (gp->mode == transparent && plane_masks) { + for (i = 0; i < gp->nlayers; i++) + gp->layers[i].pixel = base_pixel | plane_masks[i]; + gp->background = base_pixel; + } + if (plane_masks) + (void) free((void *) plane_masks); + + if (gp->mode != transparent) { + XColor color; + + color.flags = DoRed | DoGreen | DoBlue; + + gp->background = 0; /* init */ + + for (i = 0; i < gp->nlayers; i++) { + if (MI_NPIXELS(mi) > 2) + gp->layers[i].pixel = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + gp->layers[i].pixel = MI_WHITE_PIXEL(mi); + } + } + gp->pixmap = XCreatePixmap(display, window, MI_WIDTH(mi), MI_HEIGHT(mi), + (gp->mode == xor ? 1 : MI_DEPTH(mi))); + + gcv.background = gp->background; + gcv.foreground = 255; /* init */ + gcv.line_width = 5; /* thickness init */ + gp->pixmap_gc = XCreateGC(display, gp->pixmap, GCLineWidth, &gcv); + MI_CLEARWINDOW(mi); +} + +void +draw_goop(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + goopstruct *gp = &goops[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + switch (gp->mode) { + case transparent: + + for (i = 0; i < gp->nlayers; i++) + draw_layer_plane(display, &(gp->layers[i]), gp->width, gp->height); + + XSetForeground(display, gp->pixmap_gc, gp->background); + XSetPlaneMask(display, gp->pixmap_gc, AllPlanes); + XFillRectangle(display, gp->pixmap, gp->pixmap_gc, 0, 0, + gp->width, gp->height); + XSetForeground(display, gp->pixmap_gc, ~0L); + for (i = 0; i < gp->nlayers; i++) { + XSetPlaneMask(display, gp->pixmap_gc, gp->layers[i].pixel); +/* + XSetForeground (display, gp->pixmap_gc, ~0L); + XFillRectangle (display, gp->pixmap, gp->pixmap_gc, 0, 0, + gp->width, gp->height); + XSetForeground (display, gp->pixmap_gc, 0L); + */ + draw_layer_blobs(display, gp->pixmap, gp->pixmap_gc, + &(gp->layers[i]), gp->width, gp->height, + True); + } + XCopyArea(display, gp->pixmap, window, MI_GC(mi), 0, 0, + gp->width, gp->height, 0, 0); + break; + + case xor: + XSetFunction(display, gp->pixmap_gc, GXcopy); + XSetForeground(display, gp->pixmap_gc, 0); + XFillRectangle(display, gp->pixmap, gp->pixmap_gc, 0, 0, + gp->width, gp->height); + XSetFunction(display, gp->pixmap_gc, GXxor); + XSetForeground(display, gp->pixmap_gc, 1); + for (i = 0; i < gp->nlayers; i++) + draw_layer_blobs(display, gp->pixmap, gp->pixmap_gc, + &(gp->layers[i]), gp->width, gp->height, + (gp->mode != outline)); + XCopyPlane(display, gp->pixmap, window, MI_GC(mi), 0, 0, + gp->width, gp->height, 0, 0, 1L); + break; + + case opaque: + case outline: + XSetForeground(display, gp->pixmap_gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, gp->pixmap, gp->pixmap_gc, 0, 0, + gp->width, gp->height); + for (i = 0; i < gp->nlayers; i++) { + XSetForeground(display, gp->pixmap_gc, gp->layers[i].pixel); + draw_layer_blobs(display, gp->pixmap, gp->pixmap_gc, + &(gp->layers[i]), gp->width, gp->height, + (gp->mode != outline)); + } + XCopyArea(display, gp->pixmap, window, MI_GC(mi), 0, 0, + gp->width, gp->height, 0, 0); + break; + + default: + abort(); + break; + } +} + +void +release_goop(ModeInfo * mi) +{ + if (goops != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + goopstruct *gp = &goops[screen]; + + free_goop(MI_DISPLAY(mi), gp); + } + (void) free((void *) goops); + goops = NULL; + } +} + +#endif /* MODE_goop */ diff --git a/modes/grav.c b/modes/grav.c new file mode 100644 index 00000000..4f65ad3c --- /dev/null +++ b/modes/grav.c @@ -0,0 +1,341 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* grav --- planets spinning around a pulsar */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)grav.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1993 by Greg Boewring + * + * 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 + * 11-Jul-94: color version + * 06-Oct-93: Written 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 "*delay: 10000 \n" \ + "*count: -12 \n" \ + "*ncolors: 64 \n" +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_grav + +#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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct grav_description = +{"grav", "init_grav", "draw_grav", "release_grav", + "refresh_grav", "init_grav", NULL, &grav_opts, + 10000, -12, 1, 1, 64, 1.0, "", + "Shows orbiting planets", 0, NULL}; + +#endif + +#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))) + +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_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_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_WIDTH(mi); + gp->height = MI_HEIGHT(mi); + + gp->sr = STARRADIUS; + + gp->nplanets = MI_COUNT(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)); + + MI_CLEARWINDOW(mi); + + if (MI_NPIXELS(mi) > 2) + gp->starcolor = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + gp->starcolor = MI_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; + + MI_IS_DRAWN(mi) = True; + + /* Mask centrepoint */ + XSetForeground(display, gc, MI_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) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_grav */ diff --git a/modes/helix.c b/modes/helix.c new file mode 100644 index 00000000..b65bf581 --- /dev/null +++ b/modes/helix.c @@ -0,0 +1,373 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* helix --- string art */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)helix.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1992 by Jamie Zawinski + * + * 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 + * 06-Apr-97: new ellipse code from Dan Stromberg + * 11-Aug-95: found some typos, looks more interesting now + * 08-Aug-95: speed up thanks to Heath A. Kehoe + * 17-Jun-95: removed sleep statements + * 2-Sep-93: xlock version David Bagley + * 1992: xscreensaver version Jamie Zawinski + */ + +/*- + * original copyright + * 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. + */ + +#ifdef STANDALONE +#define PROGCLASS "Helix" +#define HACK_INIT init_helix +#define HACK_DRAW draw_helix +#define helix_opts xlockmore_opts +#define DEFAULTS "*delay: 25000 \n" \ + "*cycles: 100 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_helix + +#define DEF_ELLIPSE "False" + +static Bool ellipse; + +static XrmOptionDescRec opts[] = +{ + {"-ellipse", ".helix.ellipse", XrmoptionNoArg, (caddr_t) "on"}, + {"+ellipse", ".helix.ellipse", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & ellipse, "ellipse", "Ellipse", DEF_ELLIPSE, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+ellipse", "turn on/off ellipse format"} +}; + +ModeSpecOpt helix_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct helix_description = +{"helix", "init_helix", "draw_helix", "release_helix", + "refresh_helix", "init_helix", NULL, &helix_opts, + 25000, 1, 100, 1, 64, 1.0, "", + "Shows string art", 0, NULL}; + +#endif + +#define ANGLES 360 + +static double cos_array[ANGLES], sin_array[ANGLES]; + +typedef struct { + Bool painted; + int width, height; + int xmid, ymid; + int color; + int time; + int radius1, radius2, d_angle, factor1, factor2, factor3, + factor4; + int redraw; + + Bool ellipse; + int d_angle_offset, dir; + int offset; + int density; + int count; +} helixstruct; + +static helixstruct *helixes = NULL; + +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(ModeInfo * mi, int radius1, int radius2, int d_angle, + int factor1, int factor2, int factor3, int factor4) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + helixstruct *hp = &helixes[MI_SCREEN(mi)]; + int x_1, y_1, x_2, y_2, angle, limit; + int i; + + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, hp->color)); + if (++hp->color >= MI_NPIXELS(mi)) + hp->color = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + x_1 = hp->xmid; + y_1 = hp->ymid + radius2; + x_2 = hp->xmid; + y_2 = hp->ymid + radius1; + angle = 0; + limit = 1 + (ANGLES / gcd(ANGLES, d_angle)); + + for (i = 0; i < limit; i++) { + int tmp; + +#define pmod(x,y) (tmp=((x)%(y)),(tmp>=0?tmp:tmp+y)) + x_1 = hp->xmid + (int) (((double) radius1) * + sin_array[pmod((angle * factor1), ANGLES)]); + y_1 = hp->ymid + (int) (((double) radius2) * + cos_array[pmod((angle * factor2), ANGLES)]); + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, hp->color)); + if (++hp->color >= MI_NPIXELS(mi)) + hp->color = 0; + } + XDrawLine(display, window, gc, x_1, y_1, x_2, y_2); + x_2 = hp->xmid + (int) (((double) radius2) * + sin_array[pmod((angle * factor3), ANGLES)]); + y_2 = hp->ymid + (int) (((double) radius1) * + cos_array[pmod((angle * factor4), ANGLES)]); + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, hp->color)); + if (++hp->color >= MI_NPIXELS(mi)) + hp->color = 0; + } + XDrawLine(display, window, gc, x_1, y_1, x_2, y_2); + angle += d_angle; + } +} + +static void +trig(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + helixstruct *hp = &helixes[MI_SCREEN(mi)]; + int x1, y1, x2, y2; + int tmp, angle; + + +#define pmod(x,y) (tmp=((x)%(y)),(tmp>=0?tmp:tmp+y)) + + while (ABS(hp->d_angle) <= ANGLES) { + angle = hp->d_angle + hp->d_angle_offset; + x1 = (int) (sin_array[pmod(angle * hp->factor1, ANGLES)] * hp->xmid) + + hp->xmid; + y1 = (int) (cos_array[pmod(angle * hp->factor1, ANGLES)] * hp->ymid) + + hp->ymid; + x2 = (int) (sin_array[pmod(angle * hp->factor2 + hp->offset, ANGLES)] * + hp->xmid) + hp->xmid; + y2 = (int) (cos_array[pmod(angle * hp->factor2 + hp->offset, ANGLES)] * + hp->ymid) + hp->ymid; + XDrawLine(display, MI_WINDOW(mi), gc, x1, y1, x2, y2); + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, hp->color)); + if (++hp->color >= MI_NPIXELS(mi)) + hp->color = 0; + } + tmp = (int) ANGLES / (2 * hp->density * hp->factor1 * hp->factor2); + if (tmp == 0) /* Do not want it getting stuck... */ + tmp = 1; /* Would not need if floating point */ + hp->d_angle += hp->dir * tmp; + } +} + +static void +random_helix(ModeInfo * mi) +{ + helixstruct *hp = &helixes[MI_SCREEN(mi)]; + int radius; + double divisor; + + radius = MIN(hp->xmid, hp->ymid); + + hp->d_angle = 0; + hp->factor1 = 2; + hp->factor2 = 2; + hp->factor3 = 2; + hp->factor4 = 2; + + divisor = ((LRAND() / MAXRAND * 3.0 + 1) * (((LRAND() & 1) * 2) - 1)); + + if ((LRAND() & 1) == 0) { + hp->radius1 = radius; + hp->radius2 = (int) ((double) radius / divisor); + } else { + hp->radius2 = radius; + hp->radius1 = (int) ((double) radius / divisor); + } + + while (gcd(ANGLES, hp->d_angle) >= 2) + hp->d_angle = NRAND(ANGLES); + +#define random_factor() \ + (int) (((NRAND(7)) ? ((LRAND() & 1) + 1) : 3) * (((LRAND() & 1) * 2) - 1)) + + while (gcd(gcd(gcd(hp->factor1, hp->factor2), hp->factor3), hp->factor4) + != 1) { + hp->factor1 = random_factor(); + hp->factor2 = random_factor(); + hp->factor3 = random_factor(); + hp->factor4 = random_factor(); + } + + helix(mi, hp->radius1, hp->radius2, hp->d_angle, + hp->factor1, hp->factor2, hp->factor3, hp->factor4); +} + +static void +random_trig(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + helixstruct *hp = &helixes[MI_SCREEN(mi)]; + + hp->d_angle = 0; + hp->factor1 = NRAND(8) + 1; + do + hp->factor2 = NRAND(8) + 1; + while (hp->factor1 == hp->factor2); + hp->dir = (LRAND() & 1) ? 1 : -1; + hp->d_angle_offset = NRAND(ANGLES); + hp->offset = (NRAND(ANGLES / 4 - 1) + 1) / 4; + hp->density = 1 << (NRAND(4) + 4); /* Higher density, higher ANGLES */ + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, hp->color)); + if (++hp->color >= MI_NPIXELS(mi)) + hp->color = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + trig(mi); +} + +void +init_helix(ModeInfo * mi) +{ + helixstruct *hp; + int i; + static int first = 1; + + if (helixes == NULL) { + if ((helixes = (helixstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (helixstruct))) == NULL) + return; + } + hp = &helixes[MI_SCREEN(mi)]; + + if (first) { + first = 0; + for (i = 0; i < ANGLES; i++) { + cos_array[i] = cos((((double) i) / (double) (ANGLES / 2)) * M_PI); + sin_array[i] = sin((((double) i) / (double) (ANGLES / 2)) * M_PI);; + } + } + hp->ellipse = ellipse; + if (MI_IS_FULLRANDOM(mi)) + hp->ellipse = (Bool) (!NRAND(5)); /* 1:5 chance of running ellipse stuff */ + + hp->width = MI_WIDTH(mi); + hp->height = MI_HEIGHT(mi); + hp->xmid = hp->width / 2; + hp->ymid = hp->height / 2; + hp->redraw = 0; + + MI_CLEARWINDOW(mi); + hp->painted = False; + + if (MI_NPIXELS(mi) > 2) + hp->color = NRAND(MI_NPIXELS(mi)); + hp->time = 0; + + if (hp->ellipse) { + random_trig(mi); + } else + random_helix(mi); +} + +void +draw_helix(ModeInfo * mi) +{ + helixstruct *hp = &helixes[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (++hp->time > MI_CYCLES(mi)) + init_helix(mi); + else + hp->painted = True; + if (hp->redraw) { + if (hp->ellipse) { + trig(mi); + } else { + helix(mi, hp->radius1, hp->radius2, hp->d_angle, + hp->factor1, hp->factor2, hp->factor3, hp->factor4); + } + hp->redraw = 0; + } +} + +void +release_helix(ModeInfo * mi) +{ + if (helixes != NULL) { + (void) free((void *) helixes); + helixes = NULL; + } +} + +void +refresh_helix(ModeInfo * mi) +{ + helixstruct *hp = &helixes[MI_SCREEN(mi)]; + + if (hp->painted) { + MI_CLEARWINDOW(mi); + helix(mi, hp->radius1, hp->radius2, hp->d_angle, + hp->factor1, hp->factor2, hp->factor3, hp->factor4); + hp->painted = False; + } +} + +#endif /* MODE_helix */ diff --git a/modes/hop.c b/modes/hop.c new file mode 100644 index 00000000..53a97a11 --- /dev/null +++ b/modes/hop.c @@ -0,0 +1,552 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* hop --- real plane fractals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)hop.c 4.07 97/11/24 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: + * Changes in xlockmore distribution + * 24-Jun-97: EJK and RR functions stolen from xmartin2.2 + * Ed Kubaitis ejk functions and xmartin + * Renaldo Recuerdo rr function, generalized exponent version + * of the Barry Martin's square root function + * 10-May-97: Compatible with xscreensaver + * 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 Barry Martin's sine hop + * Changes in original xlock + * 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. + * Hopalong was attributed to Barry Martin of Aston University + * (Birmingham, England) + */ + + +#ifdef STANDALONE +#define PROGCLASS "Hop" +#define HACK_INIT init_hop +#define HACK_DRAW draw_hop +#define hop_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 1000 \n" \ + "*cycles: 2500 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_hop + +#define DEF_MARTIN "False" +#define DEF_POPCORN "False" +#define DEF_EJK1 "False" +#define DEF_EJK2 "False" +#define DEF_EJK3 "False" +#define DEF_EJK4 "False" +#define DEF_EJK5 "False" +#define DEF_EJK6 "False" +#define DEF_RR "False" +#define DEF_JONG "False" +#define DEF_SINE "False" + +static Bool martin; +static Bool popcorn; +static Bool ejk1; +static Bool ejk2; +static Bool ejk3; +static Bool ejk4; +static Bool ejk5; +static Bool ejk6; +static Bool rr; +static Bool jong; +static Bool sine; + +static XrmOptionDescRec opts[] = +{ + {"-martin", ".hop.martin", XrmoptionNoArg, (caddr_t) "on"}, + {"+martin", ".hop.martin", XrmoptionNoArg, (caddr_t) "off"}, + {"-popcorn", ".hop.popcorn", XrmoptionNoArg, (caddr_t) "on"}, + {"+popcorn", ".hop.popcorn", XrmoptionNoArg, (caddr_t) "off"}, + {"-ejk1", ".hop.ejk1", XrmoptionNoArg, (caddr_t) "on"}, + {"+ejk1", ".hop.ejk1", XrmoptionNoArg, (caddr_t) "off"}, + {"-ejk2", ".hop.ejk2", XrmoptionNoArg, (caddr_t) "on"}, + {"+ejk2", ".hop.ejk2", XrmoptionNoArg, (caddr_t) "off"}, + {"-ejk3", ".hop.ejk3", XrmoptionNoArg, (caddr_t) "on"}, + {"+ejk3", ".hop.ejk3", XrmoptionNoArg, (caddr_t) "off"}, + {"-ejk4", ".hop.ejk4", XrmoptionNoArg, (caddr_t) "on"}, + {"+ejk4", ".hop.ejk4", XrmoptionNoArg, (caddr_t) "off"}, + {"-ejk5", ".hop.ejk5", XrmoptionNoArg, (caddr_t) "on"}, + {"+ejk5", ".hop.ejk5", XrmoptionNoArg, (caddr_t) "off"}, + {"-ejk6", ".hop.ejk6", XrmoptionNoArg, (caddr_t) "on"}, + {"+ejk6", ".hop.ejk6", XrmoptionNoArg, (caddr_t) "off"}, + {"-rr", ".hop.rr", XrmoptionNoArg, (caddr_t) "on"}, + {"+rr", ".hop.rr", XrmoptionNoArg, (caddr_t) "off"}, + {"-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 *) & martin, "martin", "Martin", DEF_MARTIN, t_Bool}, + {(caddr_t *) & popcorn, "popcorn", "Popcorn", DEF_POPCORN, t_Bool}, + {(caddr_t *) & ejk1, "ejk1", "EJK1", DEF_EJK1, t_Bool}, + {(caddr_t *) & ejk2, "ejk2", "EJK2", DEF_EJK2, t_Bool}, + {(caddr_t *) & ejk3, "ejk3", "EJK3", DEF_EJK3, t_Bool}, + {(caddr_t *) & ejk4, "ejk4", "EJK4", DEF_EJK4, t_Bool}, + {(caddr_t *) & ejk5, "ejk5", "EJK5", DEF_EJK5, t_Bool}, + {(caddr_t *) & ejk6, "ejk6", "EJK6", DEF_EJK6, t_Bool}, + {(caddr_t *) & rr, "rr", "RR", DEF_RR, t_Bool}, + {(caddr_t *) & jong, "jong", "Jong", DEF_JONG, t_Bool}, + {(caddr_t *) & sine, "sine", "Sine", DEF_SINE, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+martin", "turn on/off sqrt format"}, + {"-/+popcorn", "turn on/off Clifford A. Pickover's popcorn format"}, + {"-/+ejk1", "turn on/off ejk1 format"}, + {"-/+ejk2", "turn on/off ejk2 format"}, + {"-/+ejk3", "turn on/off ejk3 format"}, + {"-/+ejk4", "turn on/off ejk4 format"}, + {"-/+ejk5", "turn on/off ejk5 format"}, + {"-/+ejk6", "turn on/off ejk6 format"}, + {"-/+rr", "turn on/off rr format"}, + {"-/+jong", "turn on/off jong format"}, + {"-/+sine", "turn on/off sine format"} +}; + +ModeSpecOpt hop_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct hop_description = +{"hop", "init_hop", "draw_hop", "release_hop", + "refresh_hop", "init_hop", NULL, &hop_opts, + 10000, 1000, 2500, 1, 64, 1.0, "", + "Shows real plane iterated fractals", 0, NULL}; + +#endif + +#define MARTIN 0 +#define POPCORN 7 +#define SINE 8 +#define EJK1 1 +#define EJK2 2 +#define EJK3 9 +#define EJK4 3 +#define EJK5 4 +#define EJK6 10 +#define RR 5 +#define JONG 6 +#ifdef OFFENDING +#define OPS 8 /* 8, 9, 10 might be too close to a swastika for some... */ +#else +#define OPS 11 +#endif + +typedef struct { + int centerx, centery; /* center of the screen */ + double a, b, c, d; + double i, j; /* hopalong parameters */ + int inc; + int pix; + int op; + int count; + int bufsize; + XPoint *pointBuffer; /* pointer for XDrawPoints */ +} hopstruct; + +static hopstruct *hops = NULL; + +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_WIDTH(mi) / 2; + hp->centery = MI_HEIGHT(mi) / 2; + /* Make the other operations less common since they are less interesting */ + if (MI_IS_FULLRANDOM(mi)) { + hp->op = NRAND(OPS); + } else { + if (martin) + hp->op = MARTIN; + else if (popcorn) + hp->op = POPCORN; + else if (ejk1) + hp->op = EJK1; + else if (ejk2) + hp->op = EJK2; + else if (ejk3) + hp->op = EJK3; + else if (ejk4) + hp->op = EJK4; + else if (ejk5) + hp->op = EJK5; + else if (ejk6) + hp->op = EJK6; + else if (rr) + hp->op = RR; + else if (jong) + hp->op = JONG; + else if (sine) + hp->op = SINE; + else + hp->op = NRAND(OPS); + } + + range = sqrt((double) hp->centerx * hp->centerx + + (double) hp->centery * hp->centery) / (1.0 + LRAND() / MAXRAND); + hp->i = hp->j = 0.0; + hp->inc = (int) ((LRAND() / MAXRAND) * 200) - 100; +#undef XMARTIN + switch (hp->op) { + case MARTIN: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 1500.0 + 40.0; + hp->b = (LRAND() / MAXRAND) * 17.0 + 3.0; + hp->c = (LRAND() / MAXRAND) * 3000.0 + 100.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 20.0; + hp->b = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 20.0; + if (LRAND() & 1) + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 20.0; + else + hp->c = 0.0; +#endif + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "sqrt a=%g, b=%g, c=%g\n", hp->a, hp->b, hp->c); + break; + case EJK1: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 500.0; + hp->c = (LRAND() / MAXRAND) * 100.0 + 10.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 30.0; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 40.0; +#endif + hp->b = (LRAND() / MAXRAND) * 0.4; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "ejk1 a=%g, b=%g, c=%g\n", hp->a, hp->b, hp->c); + break; + case EJK2: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 500.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 30.0; +#endif + hp->b = pow(10.0, 6.0 + (LRAND() / MAXRAND) * 24.0); + if (LRAND() & 1) + hp->b = -hp->b; + hp->c = pow(10.0, (LRAND() / MAXRAND) * 9.0); + if (LRAND() & 1) + hp->c = -hp->c; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "ejk2 a=%g, b=%g, c=%g\n", hp->a, hp->b, hp->c); + break; + case EJK3: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 500.0; + hp->c = (LRAND() / MAXRAND) * 80.0 + 30.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 30.0; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 70.0; +#endif + hp->b = (LRAND() / MAXRAND) * 0.35 + 0.5; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "ejk3 a=%g, b=%g, c=%g\n", hp->a, hp->b, hp->c); + break; + case EJK4: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 1000.0; + hp->c = (LRAND() / MAXRAND) * 40.0 + 30.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 2.0; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 200.0; +#endif + hp->b = (LRAND() / MAXRAND) * 9.0 + 1.0; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "ejk4 a=%g, b=%g, c=%g\n", hp->a, hp->b, hp->c); + break; + case EJK5: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 600.0; + hp->c = (LRAND() / MAXRAND) * 90.0 + 20.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 2.0; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 200.0; +#endif + hp->b = (LRAND() / MAXRAND) * 0.3 + 0.1; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "ejk5 a=%g, b=%g, c=%g\n", hp->a, hp->b, hp->c); + break; + case EJK6: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 100.0 + 550.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 30.0; +#endif + hp->b = (LRAND() / MAXRAND) + 0.5; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "ejk6 a=%g, b=%g\n", hp->a, hp->b); + break; + case RR: +#ifdef XMARTIN + hp->a = (LRAND() / MAXRAND) * 100.0; + hp->b = (LRAND() / MAXRAND) * 20.0; + hp->c = (LRAND() / MAXRAND) * 200.0; +#else + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 40.0; + hp->b = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 200.0; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * range / 20.0; +#endif + hp->d = (LRAND() / MAXRAND) * 0.9; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "rr a=%g, b=%g, c=%g, d=%g\n", + hp->a, hp->b, hp->c, hp->d); + break; + case POPCORN: + hp->a = 0.0; + hp->b = 0.0; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.24 + 0.25; + hp->inc = 100; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "popcorn a=%g, b=%g, c=%g, d=%g\n", + hp->a, hp->b, hp->c, hp->d); + break; + case JONG: + hp->a = ((LRAND() / MAXRAND) * 2.0 - 1.0) * M_PI; + hp->b = ((LRAND() / MAXRAND) * 2.0 - 1.0) * M_PI; + hp->c = ((LRAND() / MAXRAND) * 2.0 - 1.0) * M_PI; + hp->d = ((LRAND() / MAXRAND) * 2.0 - 1.0) * M_PI; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "jong a=%g, b=%g, c=%g, d=%g\n", + hp->a, hp->b, hp->c, hp->d); + break; + case SINE: /* MARTIN2 */ +#ifdef XMARTIN + hp->a = M_PI + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.07; +#else + hp->a = M_PI + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.7; +#endif + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "sine a=%g\n", hp->a); + break; + } + if (MI_NPIXELS(mi) > 2) + hp->pix = NRAND(MI_NPIXELS(mi)); + hp->bufsize = MI_COUNT(mi); + + if (!hp->pointBuffer) + hp->pointBuffer = (XPoint *) malloc(hp->bufsize * sizeof (XPoint)); + + MI_CLEARWINDOW(mi); + + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + hp->count = 0; +} + + +void +draw_hop(ModeInfo * mi) +{ + hopstruct *hp = &hops[MI_SCREEN(mi)]; + double oldj, oldi; + XPoint *xp = hp->pointBuffer; + int k = hp->bufsize; + + MI_IS_DRAWN(mi) = True; + + 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 MARTIN: /* SQRT, MARTIN1 */ + 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 EJK1: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - ((hp->i > 0) ? (hp->b * oldi - hp->c) : + -(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 EJK2: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - ((hp->i < 0) ? log(fabs(hp->b * oldi - hp->c)) : + -log(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 EJK3: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - ((hp->i > 0) ? sin(hp->b * oldi) - hp->c : + -sin(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 EJK4: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - ((hp->i > 0) ? sin(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 EJK5: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - ((hp->i > 0) ? sin(hp->b * oldi) - hp->c : + -(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 EJK6: + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - asin((hp->b * oldi) - (long) (hp->b * oldi)); + xp->x = hp->centerx + (int) (hp->i + hp->j); + xp->y = hp->centery - (int) (hp->i - hp->j); + break; + case RR: /* RR1 */ + oldi = hp->i + hp->inc; + hp->j = hp->a - hp->i; + hp->i = oldj - ((hp->i < 0) ? -pow(fabs(hp->b * oldi - hp->c), hp->d) : + pow(fabs(hp->b * oldi - hp->c), hp->d)); + xp->x = hp->centerx + (int) (hp->i + hp->j); + xp->y = hp->centery - (int) (hp->i - hp->j); + break; + case POPCORN: +#define HVAL 0.05 +#define INCVAL 50 + { + double tempi, tempj; + + if (hp->inc >= 100) + hp->inc = 0; + if (hp->inc == 0) { + if (hp->a++ >= INCVAL) { + hp->a = 0; + if (hp->b++ >= INCVAL) + hp->b = 0; + } + hp->i = (-hp->c * INCVAL / 2 + hp->c * hp->a) * M_PI / 180.0; + hp->j = (-hp->c * INCVAL / 2 + hp->c * hp->b) * M_PI / 180.0; + } + tempi = hp->i - HVAL * sin(hp->j + tan(3.0 * hp->j)); + tempj = hp->j - HVAL * sin(hp->i + tan(3.0 * hp->i)); + xp->x = hp->centerx + (int) (MI_WIDTH(mi) / 40 * tempi); + xp->y = hp->centery + (int) (MI_HEIGHT(mi) / 40 * tempj); + hp->i = tempi; + hp->j = tempj; + } + 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: /* MARTIN2 */ + 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), + hp->pointBuffer, hp->bufsize, CoordModeOrigin); + if (++hp->count > MI_CYCLES(mi)) { + init_hop(mi); + } +} + +void +release_hop(ModeInfo * mi) +{ + if (hops != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + hopstruct *hp = &hops[screen]; + + if (hp->pointBuffer) + (void) free((void *) hp->pointBuffer); + } + + (void) free((void *) hops); + hops = NULL; + } +} + +void +refresh_hop(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_hop */ diff --git a/modes/hyper.c b/modes/hyper.c new file mode 100644 index 00000000..b16eb190 --- /dev/null +++ b/modes/hyper.c @@ -0,0 +1,1184 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* hyper --- spinning hypercubes, not just for tesseracts any more */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)hyper.c 4.12 98/08/04 xlockmore"; + +#endif + +/*- + * hyper.c (nee multidico) + * Copyright (C) 1992,1998 John Heidemann + * + * 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. + * + *** + * + * hyper (then called multidico) was originally written for + * xscreensaver in 1992. Unfortunately it didn't make it into that + * code because Jamie Zawinski was implementing his own tesseract and + * preferred his version (optimized for speed) to my version + * (with support for more than 4 dimesnions). + * + * In 1998 I finally got around to porting it to xlockmore and sending + * it off. + * + * (The implementation is independent of jwz's---I started with ico.) + * + * Editor's Note... (DAB) + * Removed all original Color stuff. Replaced it so it could do xoring + * effectively.... Took move_line from jwz's version.... to make it legal... + * + * Copyright (c) 1992 by Jamie Zawinski + * + * 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. + * + * Check out A.K. Dewdney's "Computer Recreations", Scientific American + * Magazine" Apr 1986 pp 14-25 for more info. + * Idea on 3d taken from there but does not work yet. Also a small number of + * random chosen planes drawn may be nice. + * + * Revision History: + * 04-Aug-98: Added "3d" support from Scientific American + */ + +#ifdef STANDALONE +#define PROGCLASS "Hyper" +#define HACK_INIT init_hyper +#define HACK_DRAW draw_hyper +#define HACK_CHANGE change_hyper +#define hyper_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: -6 \n" \ + "*cycles: 300 \n" \ + "*ncolors: 200 \n" \ + "*use3d: False \n" \ + "*delta3d: 1.5 \n" \ + "*right3d: red \n" \ + "*left3d: blue \n" \ + "*both3d: magenta \n" \ + "*none3d: black \n" \ + "*spinDelay: 2 \n" \ + "*showAxes: false \n" \ + "*randomStart: false \n" \ + "*debug: false \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_hyper + +static Bool random_start; +static Bool show_axes; +static Bool show_planes; +static int spin_delay; + +extern XFontStruct *getFont(Display * display); + +static XrmOptionDescRec opts[] = +{ + {"-randomstart", ".hyper.randomStart", XrmoptionNoArg, "on"}, + {"+randomstart", ".hyper.randomStart", XrmoptionNoArg, "off"}, + {"-showaxes", ".hyper.showAxes", XrmoptionNoArg, "on"}, + {"+showaxes", ".hyper.showAxes", XrmoptionNoArg, "off"}, + {"-showplanes", ".hyper.showPlanes", XrmoptionNoArg, "on"}, + {"+showplanes", ".hyper.showPlanes", XrmoptionNoArg, "off"}, + {"-spindelay", ".hyper.spinDelay", XrmoptionSepArg, 0}, +}; +static argtype vars[] = +{ + {(caddr_t *) & random_start, "randomStart", "RandomStart", "True", t_Bool}, + {(caddr_t *) & show_axes, "showAxes", "ShowAxes", "True", t_Bool}, + {(caddr_t *) & show_planes, "showPlanes", "ShowPlanes", "False", t_Bool}, + {(caddr_t *) & spin_delay, "spinDelay", "SpinDelay", "2", t_Int}, +}; +static OptionStruct desc[] = +{ + {"-/+randomstart", "turn on/off begining with random rotations"}, + {"-/+showaxes", "turn on/off showing the axes"}, + {"-/+showplanes", "turn on/off showing the planes"}, + {"-spindelay num", "delay in seconds before chaning spin speed"}, +}; + +ModeSpecOpt hyper_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct hyper_description = +{"hyper", "init_hyper", "draw_hyper", "release_hyper", + "refresh_hyper", "change_hyper", NULL, &hyper_opts, + 100000, -6, 300, 1, 64, 1.0, "", + "Shows spinning n-dimensional hypercubes", 0, NULL}; + +#endif + +typedef struct { + double x, y; +} dpoint; + +typedef double vector; /* Was an array of size (MAX_D + 1) */ +typedef double matrix; /* Was a double array of size (MAX_D + 1) ^ 2 */ + +#define MIN_D 2 +#define MAX_D 10 /* Memory use goes up exponentially */ + +/* Normally DELTA3D is not in degrees, but it works here, so why fight it? */ +#define DELDEG (MI_DELTA3D(mi)*M_PI/180.0) + +typedef struct { + int from, to; + long color; +} line_segment; + +typedef struct { + int a, b, c, d; + long color; +} plane_section; + + +typedef struct hyper { + GC gc; + Bool redrawing; + Bool painted; + XFontStruct *font; + + int show_axes; + int show_planes; + + int maxx, maxy; + int delay; + int spinDelay; + Bool normxor; + + /* + * Data storage. + */ + int num_d; /* number of dimensions */ + int num_mat; + int num_matmat; + + /* there are C(num_d,2) planes */ + int num_planes; /* #define max_planes 40 */ + XPoint *rotation_planes; + + /* Formerly max_planes arrays */ + double *rotations; /* where we are in each dimension */ + double *d_rotations; /* change in rotation */ + double *dd_rotations; /* change in change in rotation */ + int *cdd_rotations; /* how many turns to apply dd_rotations */ + matrix *Trotations; + matrix *Trotationsleft; + + matrix *Tall; + matrix *Tallleft; + + int num_points; + vector *points; + vector *pointsleft; + int num_lines; + line_segment *lines; + plane_section *planes; + + int point_set; /* which bank of points are we using */ + XPoint *xpoints[2]; + XPoint *xpointsleft[2]; + + int num_axis_points; + + /* Formerly an array of (MAX_D + 1) */ + int *axis_points; + + /* + * Inter-step state: + */ + int this_set; + Bool stationary; +} hyperstruct; + + +static hyperstruct *hypers = NULL; + +#define allocarray(ELTYPE,N) ((ELTYPE*)malloc((N)*sizeof(ELTYPE))) +#define callocarray(ELTYPE,N) ((ELTYPE*)calloc(N,sizeof(ELTYPE))) + +/* + * Matrix handling & 3d transformation routines + */ + +static void +MatMult(matrix * a, matrix * b, matrix * c, int n) + /* c = a * b for n x n matricies */ +{ + register int i, j, k; + double temp; + + /* Strassen' method... what's that? */ + for (i = 0; i < n; i++) /* go through a's rows */ + for (j = 0; j < n; j++) { /* go through b's columns */ + temp = 0.0; + for (k = 0; k < n; k++) + temp += a[i * n + k] * b[k * n + j]; + c[i * n + j] = temp; + } +} + +static void +MatVecMult(matrix * a, vector * b, vector * c, int n) + /* c = a * b for a n x n, b&c 1 x n */ +{ + register int i, k; + double temp; + + for (i = 0; i < n; i++) { /* go through a's rows */ + temp = 0.0; + for (k = 0; k < n; k++) + temp += a[i * n + k] * b[k]; + c[i] = temp; + } +} + +static void +MatCopy(matrix * a, matrix * b, int n) + /* b <- a */ +{ + register int i, j; + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + b[i * n + j] = a[i * n + j]; +} + +static void +MatZero(matrix * a, int n) + /* a = 0 */ +{ + register int i, j; + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + a[i * n + j] = 0.0; +} + +static void +MatIdent(matrix * a, int n) + /* a = I */ +{ + register int i; + + MatZero(a, n); + for (i = 0; i < n; i++) + a[i * n + i] = 1.0; +} + +static void +ZeroMultiCounter(int *c, int n) +{ + int i; + + for (i = 0; i < n; i++) + c[i] = 0; +} + + +static int +RealIncMultiCounter(int *c, int n, int place) +{ +#define BASE 2 + if (place >= n) + return 0; + else if (++c[place] >= BASE) { + c[place] = 0; + return RealIncMultiCounter(c, n, place + 1); + } else + return 1; +} + + +static int +IncMultiCounter(int *c, int n) +{ + return RealIncMultiCounter(c, n, 0); +} + + +static int +figure_num_points(int d) +{ + return 1 << d; /* (int)pow(2.0, (double)d); */ +} + +static int +figure_num_lines(int d) +{ + return d * figure_num_points(d - 1); +} + +static int +figure_num_planes(int d) +{ + return ((d - 1) * d) / 2; +} + +static void +figure_points(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + int i, j, k, n, d, pix = 0; + int *c; + + /* + * First, figure out the points. + */ + hp->num_points = figure_num_points(hp->num_d); + /* assert(num_points <= max_points); */ + hp->points = allocarray(vector, hp->num_points * hp->num_mat); + hp->xpoints[0] = allocarray(XPoint, hp->num_points); + hp->xpoints[1] = allocarray(XPoint, hp->num_points); + if (MI_IS_USE3D(mi)) { + hp->pointsleft = allocarray(vector, hp->num_points * hp->num_mat); + hp->xpointsleft[0] = allocarray(XPoint, hp->num_points); + hp->xpointsleft[1] = allocarray(XPoint, hp->num_points); + } + c = allocarray(int, hp->num_points); /* will be lost, sigh */ + + ZeroMultiCounter(c, hp->num_d); + n = 0; + do { + for (i = 0; i < hp->num_d; i++) { + hp->points[n * hp->num_mat + i] = c[i]; + if (MI_IS_USE3D(mi)) + hp->pointsleft[n * hp->num_mat + i] = c[i]; + } + n++; + } while (IncMultiCounter(c, hp->num_d)); + (void) free((void *) c); +#if 0 + assert(hp->num_points == n); +#endif + /* + * Next connect them. + * We could do this more intelligently, but why bother? + * + * Connect points that differ by only one coordinate. + */ + if (MI_NPIXELS(mi) > 2) + pix = NRAND(MI_NPIXELS(mi)); + + hp->num_lines = figure_num_lines(hp->num_d); + /* assert(hp->num_lines <= hp->max_lines); */ + hp->lines = (line_segment *) malloc(hp->num_lines * sizeof (line_segment)); + for (n = i = 0; i < hp->num_points; i++) { + for (j = i + 1; j < hp->num_points; j++) { + for (d = k = 0; k < hp->num_d; k++) { + if (hp->points[i * hp->num_mat + k] != hp->points[j * hp->num_mat + k]) + d++; + } + if (d == 1) { + hp->lines[n].from = i; + hp->lines[n].to = j; + /* (void) printf ("from %x to %x ", i, j); */ + if (MI_NPIXELS(mi) > 2) { + hp->lines[n].color = MI_PIXEL(mi, pix); + if (++pix >= MI_NPIXELS(mi)) + pix = 0; + } else + hp->lines[n].color = MI_WHITE_PIXEL(mi); + n++; + } + } + } +#if 0 + assert(hp->num_lines == n); +#endif + + /* + * Now determine the planes of rotation. + */ + hp->num_planes = figure_num_planes(hp->num_d); +#if 0 + assert(hp->num_planes <= max_planes); +#endif + hp->show_planes = show_planes; + + if (hp->show_planes) { + hp->planes = (plane_section *) + malloc(hp->num_planes * sizeof (plane_section)); + + /* Keeping it simple and just drawing planes that touch the + * axes. Still not the simple, have to figure out which pt c is + * furthest away and draw it first... yuck. + */ + + for (n = i = 0; i < hp->num_d; i++) { + for (j = i + 1; j < hp->num_d; j++) { + hp->planes[n].a = 0; + hp->planes[n].b = 1 << i; + hp->planes[n].d = 1 << j; + hp->planes[n].c = hp->planes[n].b + hp->planes[n].d; + /*(void) printf ("a %d, b %d, c %d, d %d\n", + 0, 1 << i, (1 << i) + (1 << j), 1 << j);*/ + if (MI_NPIXELS(mi) > 2) { + hp->planes[n].color = MI_PIXEL(mi, pix); + if (++pix >= MI_NPIXELS(mi)) + pix = 0; + } else + hp->planes[n].color = MI_WHITE_PIXEL(mi); + n++; + } + } + } + + hp->axis_points = allocarray(int, hp->num_d + 1); + + hp->rotations = allocarray(double, hp->num_planes); + hp->d_rotations = callocarray(double, hp->num_planes); + hp->dd_rotations = callocarray(double, hp->num_planes); + hp->cdd_rotations = callocarray(int, hp->num_planes); + + hp->Trotations = allocarray(matrix, hp->num_planes * hp->num_matmat); + hp->Tall = allocarray(matrix, hp->num_matmat); + + if (MI_IS_USE3D(mi)) { + hp->Trotationsleft = allocarray(matrix, hp->num_planes * hp->num_matmat); + hp->Tallleft = allocarray(matrix, hp->num_matmat); + } + hp->rotation_planes = allocarray(XPoint, hp->num_planes); + + for (n = i = 0; i < hp->num_d; i++) + for (j = i + 1; j < hp->num_d; j++) { + hp->rotation_planes[n].x = i; + hp->rotation_planes[n].y = j; + n++; + } +#if 0 + assert(hp->num_planes == n); +#endif + /* + * Potential random initial rotations. + */ +#define FRAC (1024*16) + if (random_start) { + for (i = 0; i < hp->num_planes; i++) + hp->rotations[i] = 2.0 * NRAND(FRAC) * M_PI / FRAC; + } +} + +static void +figure_axis_points(hyperstruct * hp) +{ + int i, j, num_set; + + hp->show_axes = show_axes; + for (hp->num_axis_points = i = 0; i < hp->num_points; i++) { + for (num_set = j = 0; j < hp->num_d; j++) + if (hp->points[i * hp->num_mat + j] != 0.0) + num_set++; + if (num_set <= 1) + hp->axis_points[hp->num_axis_points++] = i; + } +} + +static void +free_hyper(hyperstruct * hp) +{ + if (hp->axis_points) { + (void) free((void *) hp->axis_points); + hp->axis_points = NULL; + } + if (hp->points) { + (void) free((void *) hp->points); + hp->points = NULL; + } + if (hp->pointsleft) { + (void) free((void *) hp->pointsleft); + hp->pointsleft = NULL; + } + if (hp->lines) { + XFree(hp->lines); + hp->lines = NULL; + } + if (hp->planes) { + XFree(hp->planes); + hp->planes = NULL; + } + if (hp->rotation_planes) { + XFree(hp->rotation_planes); + hp->rotation_planes = NULL; + } + if (hp->rotations) { + (void) free((void *) hp->rotations); + hp->rotations = NULL; + } + if (hp->d_rotations) { + (void) free((void *) hp->d_rotations); + hp->d_rotations = NULL; + } + if (hp->dd_rotations) { + (void) free((void *) hp->dd_rotations); + hp->dd_rotations = NULL; + } + if (hp->cdd_rotations) { + (void) free((void *) hp->cdd_rotations); + hp->cdd_rotations = NULL; + } + if (hp->Trotations) { + (void) free((void *) hp->Trotations); + hp->Trotations = NULL; + } + if (hp->Trotationsleft) { + (void) free((void *) hp->Trotationsleft); + hp->Trotationsleft = NULL; + } + if (hp->Tall) { + (void) free((void *) hp->Tall); + hp->Tall = NULL; + } + if (hp->Tallleft) { + (void) free((void *) hp->Tallleft); + hp->Tallleft = NULL; + } + if (hp->xpoints[0]) { + XFree(hp->xpoints[0]); + hp->xpoints[0] = NULL; + } + if (hp->xpoints[1]) { + XFree(hp->xpoints[1]); + hp->xpoints[1] = NULL; + } + if (hp->xpointsleft[0]) { + XFree(hp->xpointsleft[0]); + hp->xpointsleft[0] = NULL; + } + if (hp->xpointsleft[1]) { + XFree(hp->xpointsleft[1]); + hp->xpointsleft[1] = NULL; + } +} + +static void +init_x_stuff(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + XGCValues gcv; + + hp->maxx = MI_WIDTH(mi); + hp->maxy = MI_HEIGHT(mi); + + + hp->spinDelay = 10 * spin_delay; + if (hp->spinDelay < 0) + hp->spinDelay = 0; + + free_hyper(hp); + hp->num_d = MI_COUNT(mi); + if (hp->num_d < -MAX_D) + hp->num_d = -MAX_D; + if (hp->num_d > MAX_D) + hp->num_d = MAX_D; + else if (hp->num_d < -MIN_D) { + hp->num_d = NRAND(-hp->num_d - MIN_D + 1) + MIN_D; + } else if (hp->num_d < MIN_D) + hp->num_d = MIN_D; + + hp->num_mat = hp->num_d + 1; + hp->num_matmat = hp->num_mat * hp->num_mat; + + if (!hp->font) + hp->font = getFont(MI_DISPLAY(mi)); + + if (MI_NPIXELS(mi) <= 2 || MI_IS_USE3D(mi)) + hp->normxor = False; + if (!hp->gc && (MI_NPIXELS(mi) <= 2 || !MI_IS_USE3D(mi))) { + long options; + + if (hp->normxor) { + options = GCForeground | GCFont | GCFunction; + gcv.foreground = MI_WHITE_PIXEL(mi) ^ MI_BLACK_PIXEL(mi); + gcv.function = GXxor; + } else { + options = GCForeground | GCBackground | GCFont; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + } + gcv.font = hp->font->fid; + hp->gc = XCreateGC(MI_DISPLAY(mi), MI_WINDOW(mi), options, &gcv); + } +} + +static void +move_line(ModeInfo * mi, int from, int to, int set, long color) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) <= 2 || !MI_IS_USE3D(mi)) + gc = hp->gc; + if (hp->normxor) { + XSetForeground(display, gc, color); + if (!hp->redrawing) + XDrawLine(display, window, gc, + hp->xpoints[!set][from].x, hp->xpoints[!set][from].y, + hp->xpoints[!set][to].x, hp->xpoints[!set][to].y); + XDrawLine(display, window, gc, + hp->xpoints[set][from].x, hp->xpoints[set][from].y, + hp->xpoints[set][to].x, hp->xpoints[set][to].y); + } else { + if (!hp->redrawing) { + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawLine(display, window, gc, + hp->xpoints[set][from].x, hp->xpoints[set][from].y, + hp->xpoints[set][to].x, hp->xpoints[set][to].y); + if (MI_IS_USE3D(mi)) + XDrawLine(display, window, gc, + hp->xpointsleft[set][from].x, hp->xpointsleft[set][from].y, + hp->xpointsleft[set][to].x, hp->xpointsleft[set][to].y); + } + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) { + XSetFunction(display, gc, GXor); + } + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + } else if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, color); + XDrawLine(display, window, gc, + hp->xpoints[!set][from].x, hp->xpoints[!set][from].y, + hp->xpoints[!set][to].x, hp->xpoints[!set][to].y); + if (MI_IS_USE3D(mi)) { + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XDrawLine(display, window, gc, + hp->xpointsleft[!set][from].x, hp->xpointsleft[!set][from].y, + hp->xpointsleft[!set][to].x, hp->xpointsleft[!set][to].y); + if (MI_IS_INSTALL(mi)) { + XSetFunction(display, gc, GXcopy); + } + } + } +} + +static void +move_plane(ModeInfo * mi, int a, int b, int c, int d, int set, long color) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + XPoint rect[4]; + + if (MI_NPIXELS(mi) <= 2 || !MI_IS_USE3D(mi)) + gc = hp->gc; + if (hp->normxor) { + XSetForeground(display, gc, color); + if (!hp->redrawing) { + rect[0].x = hp->xpoints[!set][a].x; + rect[0].y = hp->xpoints[!set][a].y; + rect[1].x = hp->xpoints[!set][b].x; + rect[1].y = hp->xpoints[!set][b].y; + rect[2].x = hp->xpoints[!set][c].x; + rect[2].y = hp->xpoints[!set][c].y; + rect[3].x = hp->xpoints[!set][d].x; + rect[3].y = hp->xpoints[!set][d].y; + XFillPolygon(display, window, gc, rect, 4, Convex, CoordModeOrigin); + } + rect[0].x = hp->xpoints[set][a].x; + rect[0].y = hp->xpoints[set][a].y; + rect[1].x = hp->xpoints[set][b].x; + rect[1].y = hp->xpoints[set][b].y; + rect[2].x = hp->xpoints[set][c].x; + rect[2].y = hp->xpoints[set][c].y; + rect[3].x = hp->xpoints[set][d].x; + rect[3].y = hp->xpoints[set][d].y; + XFillPolygon(display, window, gc, rect, 4, Convex, CoordModeOrigin); + } else { + if (!hp->redrawing) { + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + rect[0].x = hp->xpoints[set][a].x; + rect[0].y = hp->xpoints[set][a].y; + rect[1].x = hp->xpoints[set][b].x; + rect[1].y = hp->xpoints[set][b].y; + rect[2].x = hp->xpoints[set][c].x; + rect[2].y = hp->xpoints[set][c].y; + rect[3].x = hp->xpoints[set][d].x; + rect[3].y = hp->xpoints[set][d].y; + XFillPolygon(display, window, gc, rect, 4, Convex, CoordModeOrigin); + if (MI_IS_USE3D(mi)) { + rect[0].x = hp->xpointsleft[set][a].x; + rect[0].y = hp->xpointsleft[set][a].y; + rect[1].x = hp->xpointsleft[set][b].x; + rect[1].y = hp->xpointsleft[set][b].y; + rect[2].x = hp->xpointsleft[set][c].x; + rect[2].y = hp->xpointsleft[set][c].y; + rect[3].x = hp->xpointsleft[set][d].x; + rect[3].y = hp->xpointsleft[set][d].y; + XFillPolygon(display, window, gc, rect, 4, Convex, CoordModeOrigin); + } + } + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) { + XSetFunction(display, gc, GXor); + } + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + } else if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, color); + rect[0].x = hp->xpoints[!set][a].x; + rect[0].y = hp->xpoints[!set][a].y; + rect[1].x = hp->xpoints[!set][b].x; + rect[1].y = hp->xpoints[!set][b].y; + rect[2].x = hp->xpoints[!set][c].x; + rect[2].y = hp->xpoints[!set][c].y; + rect[3].x = hp->xpoints[!set][d].x; + rect[3].y = hp->xpoints[!set][d].y; + XFillPolygon(display, window, gc, rect, 4, Convex, CoordModeOrigin); + if (MI_IS_USE3D(mi)) { + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + rect[0].x = hp->xpointsleft[!set][a].x; + rect[0].y = hp->xpointsleft[!set][a].y; + rect[1].x = hp->xpointsleft[!set][b].x; + rect[1].y = hp->xpointsleft[!set][b].y; + rect[2].x = hp->xpointsleft[!set][c].x; + rect[2].y = hp->xpointsleft[!set][c].y; + rect[3].x = hp->xpointsleft[!set][d].x; + rect[3].y = hp->xpointsleft[!set][d].y; + XFillPolygon(display, window, gc, rect, 4, Convex, CoordModeOrigin); + if (MI_IS_INSTALL(mi)) { + XSetFunction(display, gc, GXcopy); + } + } + } +} + +static void +move_number(ModeInfo * mi, int axis, char *string, int set, long color) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) <= 2 || !MI_IS_USE3D(mi)) + gc = hp->gc; + if (hp->normxor) { + XSetForeground(display, gc, color); + if (!hp->redrawing) + XDrawString(display, window, gc, + hp->xpoints[!set][axis].x, hp->xpoints[!set][axis].y, + string, strlen(string)); + XDrawString(display, window, gc, + hp->xpoints[set][axis].x, hp->xpoints[set][axis].y, + string, strlen(string)); + } else { + if (!hp->redrawing) { + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawString(display, window, gc, + hp->xpoints[set][axis].x, hp->xpoints[set][axis].y, + string, strlen(string)); + if (MI_IS_USE3D(mi)) + XDrawString(display, window, gc, + hp->xpointsleft[set][axis].x, hp->xpointsleft[set][axis].y, + string, strlen(string)); + } + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) { + XSetFunction(display, gc, GXor); + } + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + } else if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, color); + XDrawString(display, window, gc, + hp->xpoints[!set][axis].x, hp->xpoints[!set][axis].y, + string, strlen(string)); + if (MI_IS_USE3D(mi)) { + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XDrawString(display, window, gc, + hp->xpointsleft[!set][axis].x, hp->xpointsleft[!set][axis].y, + string, strlen(string)); + if (MI_IS_INSTALL(mi)) { + XSetFunction(display, gc, GXcopy); + } + } + } +} + +static void +draw_hyper_step(ModeInfo * mi, int set) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + int i; + char tmps[3]; + + MI_IS_DRAWN(mi) = True; + + if (!hp->stationary || hp->redrawing) { + for (i = 0; i < hp->num_lines; i++) { + move_line(mi, hp->lines[i].from, hp->lines[i].to, + set, hp->lines[i].color); + } + if (hp->show_planes) { + for (i = 0; i < hp->num_planes; i++) { + move_plane(mi, hp->planes[i].a, hp->planes[i].b, hp->planes[i].c, + hp->planes[i].d, set, hp->planes[i].color); + } + } + if (hp->show_axes) { + for (i = 0; i < hp->num_axis_points; i++) { + (void) sprintf(tmps, "%d", i); + move_number(mi, hp->axis_points[i], tmps, set, MI_WHITE_PIXEL(mi)); + } + } + } +} + +static void +move_hyper(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + int i; + +/* NEEDSWORK: These should be resources */ +#define default_cdd_rotation 10 +#define default_dd_rotation (M_PI/1024.0) + int axis, max_axis; + int faster; + + hp->stationary = False; + if (hp->spinDelay-- <= 0) { + + hp->spinDelay = 10 * spin_delay; + /* + * Change rotation? + * + * 66% chance if stationary, 33% if not. + */ + hp->stationary = True; + for (i = 0; i < hp->num_planes; i++) + if (hp->d_rotations[i] != 0.0 || hp->cdd_rotations[i]) { + hp->stationary = False; + break; + } + if (NRAND(3) < 1 + hp->stationary) { + /* Change! But what? */ + max_axis = hp->num_planes; + + if (max_axis > hp->num_planes || max_axis < 0) + max_axis = hp->num_planes; + axis = NRAND(max_axis); + + /* + * And how much? 33% chance faster, 66% slower. + * If stopped, slower doesn't start it moving + * unless we're stationary. + */ + hp->cdd_rotations[axis] = default_cdd_rotation + + NRAND(7) - 3; + faster = (NRAND(3) < 1); + if (faster || hp->dd_rotations[axis] != 0.0 || hp->stationary) + hp->dd_rotations[axis] = default_dd_rotation * + (hp->dd_rotations[axis] >= 0.0 ? 1 : -1) * + (faster ? 1 : -1); + if (MI_IS_DEBUG(mi)) + (void) fprintf(stderr, + "axis %d made %s\n", axis, faster ? "faster" : "slower"); + } + } + /* + * Rotate. + */ + for (i = 0; i < hp->num_planes; i++) { + if (hp->cdd_rotations[i]) { + hp->cdd_rotations[i]--; + hp->d_rotations[i] += hp->dd_rotations[i]; + } + hp->rotations[i] += hp->d_rotations[i]; + } +} + +static void +calc_transformation(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + double cosa, sina; + double cosb = 0.0, sinb = 0.0; + int p1, p2; + matrix *Ttmp; + matrix *Tpre, *Tuser, *Tuserleft = NULL; + matrix *Tpretranspose, *Tscale, *Tposttranspose; + int i; + dpoint scale, range, offset; + double scale_used; + + Ttmp = allocarray(matrix, hp->num_matmat); + Tpre = allocarray(matrix, hp->num_matmat); + Tuser = allocarray(matrix, hp->num_matmat); + if (MI_IS_USE3D(mi)) { + Tuserleft = allocarray(matrix, hp->num_matmat); + } + Tpretranspose = allocarray(matrix, hp->num_matmat); + Tscale = allocarray(matrix, hp->num_matmat); + Tposttranspose = allocarray(matrix, hp->num_matmat); + + /* + * Adjust the data. + * Since the data goes from 0->1 on each axis, + * we shift it by -0.5 here to center the figure. + */ + MatIdent(Tpre, hp->num_mat); + for (i = 0; i < hp->num_d; i++) { + Tpre[i * hp->num_mat + hp->num_d] = -0.5; + } + + + /* + * Figure the rotation. + */ + MatIdent(Tuser, hp->num_mat); + if (MI_IS_USE3D(mi)) { + MatIdent(Tuserleft, hp->num_mat); + } + for (i = 0; i < hp->num_planes; i++) { + p1 = hp->rotation_planes[i].x; + p2 = hp->rotation_planes[i].y; + if (MI_IS_USE3D(mi)) { + sinb = sin(hp->rotations[i] - DELDEG); + cosb = cos(hp->rotations[i] - DELDEG); + sina = sin(hp->rotations[i] + DELDEG); + cosa = cos(hp->rotations[i] + DELDEG); + } else { + sina = sin(hp->rotations[i]); + cosa = cos(hp->rotations[i]); + } + + MatIdent(&hp->Trotations[i * hp->num_matmat], hp->num_mat); + hp->Trotations[i * hp->num_matmat + p1 * hp->num_mat + p1] = + hp->Trotations[i * hp->num_matmat + p2 * hp->num_mat + p2] = cosa; + hp->Trotations[i * hp->num_matmat + p1 * hp->num_mat + p2] = sina; + hp->Trotations[i * hp->num_matmat + p2 * hp->num_mat + p1] = -sina; + MatMult(&hp->Trotations[i * hp->num_matmat], Tuser, Ttmp, hp->num_mat); + MatCopy(Ttmp, Tuser, hp->num_mat); + + if (MI_IS_USE3D(mi)) { + MatIdent(&hp->Trotationsleft[i * hp->num_matmat], hp->num_mat); + hp->Trotationsleft[i * hp->num_matmat + p1 * hp->num_mat + p1] = + hp->Trotationsleft[i * hp->num_matmat + p2 * hp->num_mat + p2] = cosb; + hp->Trotationsleft[i * hp->num_matmat + p1 * hp->num_mat + p2] = sinb; + hp->Trotationsleft[i * hp->num_matmat + p2 * hp->num_mat + p1] = -sinb; + MatMult(&hp->Trotationsleft[i * hp->num_matmat], Tuserleft, Ttmp, hp->num_mat); + MatCopy(Ttmp, Tuserleft, hp->num_mat); + } + } + +/* Now calculate the scaling matrix */ +#if 1 + /* + * Calculate the best scale of the two axes. + * Multiply by 0.9 to use 90% of the display. + * Divide by the sqrt(2.0) because it's bigest when + * rotated by 45 degrees. + * + * This principle generalizes to sqrt(hp->num_d). + */ +#define border_width (0.05) + range.x = sqrt((double) hp->num_d); + range.y = range.x; + scale.x = (1.0 - 2 * border_width) * hp->maxx / range.x; + scale.y = (1.0 - 2 * border_width) * hp->maxy / range.y; + scale_used = ((scale.x < scale.y) ? scale.x : scale.y); + offset.x = hp->maxx / 2.0; + offset.y = hp->maxy / 2.0; + + /* + * Setup & compute the matricies + */ + MatIdent(Tpretranspose, hp->num_mat); + Tpretranspose[0 * hp->num_mat + hp->num_d] = 0; + Tpretranspose[1 * hp->num_mat + hp->num_d] = 0; + + MatIdent(Tscale, hp->num_mat); + Tscale[0 * hp->num_mat + 0] = scale_used; + Tscale[1 * hp->num_mat + 1] = -scale_used; + + MatIdent(Tposttranspose, hp->num_mat); + Tposttranspose[0 * hp->num_mat + hp->num_d] = offset.x; + Tposttranspose[1 * hp->num_mat + hp->num_d] = offset.y; + + MatMult(Tscale, Tpretranspose, Ttmp, hp->num_mat); + MatMult(Tposttranspose, Ttmp, Tscale, hp->num_mat); +#else + MatIdent(Tscale, hp->num_mat); +#endif + (void) free((void *) Tpretranspose); + (void) free((void *) Tposttranspose); + + /* + * Put it all together. + */ + MatMult(Tuser, Tpre, Ttmp, hp->num_mat); + MatMult(Tscale, Ttmp, hp->Tall, hp->num_mat); + (void) free((void *) Tuser); + if (MI_IS_USE3D(mi)) { + MatMult(Tuserleft, Tpre, Ttmp, hp->num_mat); + MatMult(Tscale, Ttmp, hp->Tallleft, hp->num_mat); + (void) free((void *) Tuserleft); + } + (void) free((void *) Tpre); + (void) free((void *) Ttmp); + (void) free((void *) Tscale); +} + + +static void +translate_point(hyperstruct * hp, matrix * Tall, vector * real, XPoint * screen_image) +{ + vector *image; + + image = allocarray(vector, hp->num_mat); + + MatVecMult(Tall, real, image, hp->num_mat); + screen_image->x = (short) image[0]; + screen_image->y = (short) image[1]; + + (void) free((void *) image); +} + +static void +translate_points(ModeInfo * mi, int set) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + int i; + + calc_transformation(mi); + for (i = 0; i < hp->num_points; i++) { + translate_point(hp, hp->Tall, &hp->points[i * hp->num_mat], &hp->xpoints[set][i]); + if (MI_IS_USE3D(mi)) + translate_point(hp, hp->Tallleft, &hp->pointsleft[i * hp->num_mat], &hp->xpointsleft[set][i]); + } +} + +void +refresh_hyper(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + + if (!hp->painted) { + MI_CLEARWINDOW(mi); + hp->redrawing = True; + draw_hyper_step(mi, hp->this_set); + hp->redrawing = False; + hp->painted = True; + } +} + +void +init_hyper(ModeInfo * mi) +{ + hyperstruct *hp; + int i; + + if (hypers == NULL) { + if ((hypers = (hyperstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (hyperstruct))) == NULL) + return; + } + hp = &hypers[MI_SCREEN(mi)]; + + init_x_stuff(mi); + + figure_points(mi); + + /* + * Fix the d+1 coord of all points. + */ + for (i = 0; i < hp->num_points; i++) { + hp->points[i * hp->num_mat + hp->num_d] = 1; + if (MI_IS_USE3D(mi)) + hp->pointsleft[i * hp->num_mat + hp->num_d] = 1; + } + + figure_axis_points(hp); + + hp->this_set = 0; + translate_points(mi, !hp->this_set); + translate_points(mi, hp->this_set); + refresh_hyper(mi); + hp->painted = True; + hp->stationary = True; +} + + +void +draw_hyper(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + + hp->painted = False; + draw_hyper_step(mi, hp->this_set); + + /* Set up next place */ + move_hyper(mi); + translate_points(mi, hp->this_set); + if (!hp->stationary) + hp->this_set = !hp->this_set; +} + +void +change_hyper(ModeInfo * mi) +{ + hyperstruct *hp = &hypers[MI_SCREEN(mi)]; + + /* make it change */ + hp->spinDelay = 0; +} + +void +release_hyper(ModeInfo * mi) +{ + if (hypers != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + hyperstruct *hp = &hypers[screen]; + + if (hp->gc != NULL) + XFreeGC(MI_DISPLAY(mi), hp->gc); + if (hp->font) + XFreeFont(MI_DISPLAY(mi), hp->font); + free_hyper(hp); + } + (void) free((void *) hypers); + hypers = NULL; + } +} + +#endif /* MODE_hyper */ diff --git a/modes/ico.c b/modes/ico.c new file mode 100644 index 00000000..b88ec637 --- /dev/null +++ b/modes/ico.c @@ -0,0 +1,928 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* ico --- bouncing polyhedra */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)ico.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1987 X Consortium + * + * 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 + * 25-Mar-97: David Bagley + * Took ico from the X11R6 distribution. Stripped out + * anything complicated... to be added back in later. + * added dodecahedron, tetrahedron, and star octahedron. + * $XConsortium: ico.c,v 1.47 94/04/17 20:45:15 gildea Exp $ + */ + +/*- +original copyright +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + 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 name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL 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. + +******************************************************************/ +/****************************************************************************** + * Description + * Display a wire-frame rotating icosahedron, with hidden lines removed + *****************************************************************************/ +/*- + * Additions by jimmc@sci: + * faces and colors + * double buffering on the display + * additional polyhedra + * + * multi-thread version by Stephen Gildea, January 1992 + */ + +#ifdef STANDALONE +#define PROGCLASS "Ico" +#define HACK_INIT init_ico +#define HACK_DRAW draw_ico +#define ico_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: 0 \n" \ + "*cycles: 300 \n" \ + "*ncolors: 200 \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_ico + +#define DEF_FACES "False" +#define DEF_EDGES "True" /* Wire frame edges, set true if faces false. */ + +static Bool faces; +static Bool edges; + +static XrmOptionDescRec opts[] = +{ + {"-faces", ".ico.faces", XrmoptionNoArg, (caddr_t) "on"}, + {"+faces", ".ico.faces", XrmoptionNoArg, (caddr_t) "off"}, + {"-edges", ".ico.trail", XrmoptionNoArg, (caddr_t) "on"}, + {"+edges", ".ico.trail", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & faces, "faces", "Faces", DEF_FACES, t_Bool}, + {(caddr_t *) & edges, "edges", "Edges", DEF_EDGES, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+faces", "turn on/off drawing of faces"}, + {"-/+edges", "turn on/off drawing of wireframe"} +}; + +ModeSpecOpt ico_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct ico_description = +{"ico", "init_ico", "draw_ico", "release_ico", + "refresh_ico", "change_ico", NULL, &ico_opts, + 100000, 0, 400, 0, 64, 1.0, "", + "Shows a bouncing polyhedron", 0, NULL}; + +#endif + +#define MINSIZE 5 +#define DEFAULT_DELTAX 13 +#define DEFAULT_DELTAY 9 + +/*- + * This is the description of one polyhedron file + */ + +#define MAXVERTS 120 + /* great rhombicosidodecahedron has 120 vertices */ +#define MAXNV MAXVERTS +#define MAXFACES 30 + /* (hexakis icosahedron has 120 faces) */ +#define MAXEDGES 180 + /* great rhombicosidodecahedron has 180 edges */ +#define MAXEDGESPERPOLY 20 + +typedef struct { + double x, y, z; +} Point3D; + +/* structure of the include files which define the polyhedra */ +typedef struct { +#ifdef DEFUNCT + char *longname; /* long name of object */ + char *shortname; /* short name of object */ + char *dual; /* long name of dual */ +#endif + int numverts; /* number of vertices */ + int numedges; /* number of edges */ + int numfaces; /* number of faces */ + Point3D v[MAXVERTS]; /* the vertices */ + int f[MAXEDGES * 2 + MAXFACES]; /* the faces */ +} Polyinfo; + +/*- + * faces/edges/vert Vertex Config Wythoff Symbol + * tetrahedron 4/6/4 {3,3,3} 3|2 3 + * cube 6/12/8 {4,4,4} 3|2 4 + * octahedron 8/12/6 {3,3,3,3} 4|2 3 + * dodecahedron 12/30/12 {5,5,5} 3|2 5 + * icosahedron 20/30/12 {3,3,3,3,3} 5|2 3 + *Nice additions would be the Kepler-Poinsot Solids: + * small stellated dodecahedron 12/30/12 {5/2,5/2,5/2,5/2,5/2} 5|2 5/2 + * great stellated dodecahedron 12/30/20 {5/2,5/2,5/2} 3|2 5/2 + * great dodecahedron 12/30/12 {5,5,5,5,5}/2 5/2|2 5 + * great icosahedron 20/30/12 {3,3,3,3,3}/2 5/2|2 3 + */ + +static Polyinfo polygons[] = +{ + +/* objtetra - structure values for tetrahedron */ + { +#ifdef DEFUNCT + "tetrahedron", "tetra", /* long and short names */ + "tetrahedron", /* long name of dual */ +#endif + 4, 6, 4, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ +#define T 0.57735 + {T, T, T}, + {T, -T, -T}, + {-T, T, -T}, + {-T, -T, T}, +#undef T + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 3, 2, 1, 0, + 3, 1, 3, 0, + 3, 3, 2, 0, + 3, 2, 3, 1, + } + }, + +/* objcube - structure values for cube */ + + { +#ifdef DEFUNCT + "hexahedron", "cube", /* long and short names */ + "octahedron", /* long name of dual */ +#endif + 8, 12, 6, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ +#define T 0.57735 + {T, T, T}, + {T, T, -T}, + {T, -T, -T}, + {T, -T, T}, + {-T, T, T}, + {-T, T, -T}, + {-T, -T, -T}, + {-T, -T, T}, +#undef T + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 4, 0, 1, 2, 3, + 4, 7, 6, 5, 4, + 4, 1, 0, 4, 5, + 4, 3, 2, 6, 7, + 4, 2, 1, 5, 6, + 4, 0, 3, 7, 4, + } + }, + +/* objocta - structure values for octahedron */ + + { +#ifdef DEFUNCT + "octahedron", "octa", /* long and short names */ + "hexahedron", /* long name of dual */ +#endif + 6, 12, 8, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ +#define T 1.0 + {T, 0, 0}, + {-T, 0, 0}, + {0, T, 0}, + {0, -T, 0}, + {0, 0, T}, + {0, 0, -T}, +#undef T + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 3, 0, 4, 2, + 3, 0, 2, 5, + 3, 0, 5, 3, + 3, 0, 3, 4, + 3, 1, 2, 4, + 3, 1, 5, 2, + 3, 1, 3, 5, + 3, 1, 4, 3, + } + }, + +/* objdodec - structure values for dodecahedron */ + + { +#ifdef DEFUNCT + "dodecahedron", "dodeca", /* long and short names */ + "icosahedron", /* long name of dual */ +#endif + 20, 30, 12, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ + {0.000000, 0.309017, 0.809015}, + {0.000000, -0.309017, 0.809015}, + {0.000000, -0.309017, -0.809015}, + {0.000000, 0.309017, -0.809015}, + {0.809015, 0.000000, 0.309017}, + {-0.809015, 0.000000, 0.309017}, + {-0.809015, 0.000000, -0.309017}, + {0.809015, 0.000000, -0.309017}, + {0.309017, 0.809015, 0.000000}, + {-0.309017, 0.809015, 0.000000}, + {-0.309017, -0.809015, 0.000000}, + {0.309017, -0.809015, 0.000000}, + {0.500000, 0.500000, 0.500000}, + {-0.500000, 0.500000, 0.500000}, + {-0.500000, -0.500000, 0.500000}, + {0.500000, -0.500000, 0.500000}, + {0.500000, -0.500000, -0.500000}, + {0.500000, 0.500000, -0.500000}, + {-0.500000, 0.500000, -0.500000}, + {-0.500000, -0.500000, -0.500000}, + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 5, 12, 8, 17, 7, 4, + 5, 5, 6, 18, 9, 13, + 5, 14, 10, 19, 6, 5, + 5, 12, 4, 15, 1, 0, + 5, 13, 9, 8, 12, 0, + 5, 1, 14, 5, 13, 0, + 5, 16, 7, 17, 3, 2, + 5, 19, 10, 11, 16, 2, + 5, 3, 18, 6, 19, 2, + 5, 15, 11, 10, 14, 1, + 5, 3, 17, 8, 9, 18, + 5, 4, 7, 16, 11, 15, + } + }, + +/* objicosa - structure values for icosahedron */ + + { +#ifdef DEFUNCT + "icosahedron", "icosa", /* long and short names */ + "dodecahedron", /* long name of dual */ +#endif + 12, 30, 20, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ + {0.00000000, 0.00000000, -0.95105650}, + {0.00000000, 0.85065080, -0.42532537}, + {0.80901698, 0.26286556, -0.42532537}, + {0.50000000, -0.68819095, -0.42532537}, + {-0.50000000, -0.68819095, -0.42532537}, + {-0.80901698, 0.26286556, -0.42532537}, + {0.50000000, 0.68819095, 0.42532537}, + {0.80901698, -0.26286556, 0.42532537}, + {0.00000000, -0.85065080, 0.42532537}, + {-0.80901698, -0.26286556, 0.42532537}, + {-0.50000000, 0.68819095, 0.42532537}, + {0.00000000, 0.00000000, 0.95105650} + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 3, 0, 2, 1, + 3, 0, 3, 2, + 3, 0, 4, 3, + 3, 0, 5, 4, + 3, 0, 1, 5, + 3, 1, 6, 10, + 3, 1, 2, 6, + 3, 2, 7, 6, + 3, 2, 3, 7, + 3, 3, 8, 7, + 3, 3, 4, 8, + 3, 4, 9, 8, + 3, 4, 5, 9, + 3, 5, 10, 9, + 3, 5, 1, 10, + 3, 10, 6, 11, + 3, 6, 7, 11, + 3, 7, 8, 11, + 3, 8, 9, 11, + 3, 9, 10, 11 + } + }, + +/* objplane - structure values for plane */ + + { +#ifdef DEFUNCT + "plane", "plane", /* long and short names */ + "plane", /* long name of dual?? */ +#endif + 4, 4, 1, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ +#define T 1.0 + {T, 0, 0}, + {-T, 0, 0}, + {0, T, 0}, + {0, -T, 0}, +#undef T + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 4, 0, 2, 1, 3, + } + }, + +/* objpyr - structure values for pyramid */ + + { +#ifdef DEFUNCT + "pyramid", "pyramid", /* long and short names */ + "pyramid", /* long name of dual */ +#endif + 5, 8, 5, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ +#define T 1.0 + {T, 0, 0}, + {-T, 0, 0}, + {0, T, 0}, + {0, -T, 0}, + {0, 0, T}, + /* { 0, 0, -T }, */ +#undef T + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 3, 0, 4, 2, + /* 3, 0, 2, 5, */ + /* 3, 0, 5, 3, */ + 3, 0, 3, 4, + 3, 1, 2, 4, + /* 3, 1, 5, 2, */ + /* 3, 1, 3, 5, */ + 3, 1, 4, 3, + 4, 0, 2, 1, 3, + } + }, + +#if 0 + /* ico does not draw non-convex polyhedra well. */ +/* objstar - structure values for octahedron star (stellated octahedron?) */ + { +#ifdef DEFUNCT + "star", "star", /* long and short names */ + "star", /* long name of dual */ +#endif + 8, 12, 8, /* number of vertices, edges, and faces */ + { /* vertices (x,y,z) */ + /* all points must be within radius 1 of the origin */ +#define T 0.577 + {T, T, T}, + {T, -T, -T}, + {-T, T, -T}, + {-T, -T, T}, + {-T, -T, -T}, + {-T, T, T}, + {T, -T, T}, + {T, T, -T}, +#undef T + }, + { /* faces (numfaces + indexes into vertices) */ + /* faces must be specified clockwise from the outside */ + 3, 2, 1, 0, + 3, 1, 3, 0, + 3, 3, 2, 0, + 3, 2, 3, 1, + 3, 6, 5, 4, + 3, 5, 7, 4, + 3, 7, 6, 4, + 3, 6, 7, 5, + } + }, + /* Needed 4 other 3-D stars */ +#endif + +}; + +static int polysize = sizeof (polygons) / sizeof (polygons[0]); + + +typedef double Transform3D[4][4]; + +/* variables that need to be per-thread */ + +typedef struct { + int loopcount; + int object; + int width, height; + int color; + Polyinfo *poly; + int polyW, polyH; + int currX, currY; + int prevX, prevY; + int polyDeltaX, polyDeltaY; + int polydeltax2, polydeltay2; + Bool faces, edges; + char drawn[MAXNV][MAXNV]; + int xv_buffer; + Transform3D xform; + Point3D xv[2][MAXNV]; + double wo2, ho2; +} icostruct; + +static icostruct *icos = NULL; + +/*- + * variables that are not set except maybe in initialization before + * any additional threads are created + */ + + +static void +icoClearArea(ModeInfo * mi, int x, int y, int w, int h) +{ + Display *display = MI_DISPLAY(mi); + +#if 1 + /* my monochrome likes this better */ + XSetForeground(display, MI_GC(mi), MI_BLACK_PIXEL(mi)); + XFillRectangle(display, MI_WINDOW(mi), MI_GC(mi), x, y, w, h); +#else + XClearArea(display, MI_WINDOW(mi), x, y, w, h, 0); +#endif +} + +/****************************************************************************** + * Description + * Format a 4x4 identity matrix. + * + * Output + * *m Formatted identity matrix + *****************************************************************************/ +static void +IdentMat(register Transform3D m) +{ + register int i; + register int j; + + for (i = 3; i >= 0; --i) { + for (j = 3; j >= 0; --j) + m[i][j] = 0.0; + m[i][i] = 1.0; + } +} + + + +/****************************************************************************** + * Description + * Format a matrix that will perform a rotation transformation + * about the specified axis. The rotation angle is measured + * counterclockwise about the specified axis when looking + * at the origin from the positive axis. + * + * Input + * axis Axis ('x', 'y', 'z') about which to perform rotation + * angle Angle (in radians) of rotation + * A Pointer to rotation matrix + * + * Output + * *m Formatted rotation matrix + *****************************************************************************/ + +static void +FormatRotateMat(char axis, double angle, register Transform3D m) +{ + double s, c; + + IdentMat(m); + + s = sin(angle); + c = cos(angle); + + switch (axis) { + case 'x': + m[1][1] = m[2][2] = c; + m[1][2] = s; + m[2][1] = -s; + break; + case 'y': + m[0][0] = m[2][2] = c; + m[2][0] = s; + m[0][2] = -s; + break; + case 'z': + m[0][0] = m[1][1] = c; + m[0][1] = s; + m[1][0] = -s; + break; + } +} + + +/****************************************************************************** + * Description + * Concatenate two 4-by-4 transformation matrices. + * + * Input + * l multiplicand (left operand) + * r multiplier (right operand) + * + * Output + * *m Result matrix + *****************************************************************************/ + +static void +ConcatMat(register Transform3D l, register Transform3D r, + register Transform3D m) +{ + register int i; + register int j; + + for (i = 0; i < 4; ++i) + for (j = 0; j < 4; ++j) + m[i][j] = l[i][0] * r[0][j] + + l[i][1] * r[1][j] + + l[i][2] * r[2][j] + + l[i][3] * r[3][j]; +} + +/* Set up points, transforms, etc. */ + +static void +initPoly(ModeInfo * mi, Polyinfo * poly, int icoW, int icoH) +{ + icostruct *ip = &icos[MI_SCREEN(mi)]; + Point3D *vertices = poly->v; + int NV = poly->numverts; + Transform3D r1; + Transform3D r2; + + FormatRotateMat('x', 5 * M_PI / 180.0, r1); + FormatRotateMat('y', 5 * M_PI / 180.0, r2); + ConcatMat(r1, r2, ip->xform); + + (void) memcpy((char *) ip->xv[0], (char *) vertices, NV * sizeof (Point3D)); + ip->xv_buffer = 0; + ip->wo2 = icoW / 2.0; + ip->ho2 = icoH / 2.0; +} + +/****************************************************************************** + * Description + * Perform a partial transform on non-homogeneous points. + * Given an array of non-homogeneous (3-coordinate) input points, + * this routine multiplies them by the 3-by-3 upper left submatrix + * of a standard 4-by-4 transform matrix. The resulting non-homogeneous + * points are returned. + * + * Input + * n number of points to transform + * m 4-by-4 transform matrix + * in array of non-homogeneous input points + * + * Output + * *out array of transformed non-homogeneous output points + *****************************************************************************/ + +static void +PartialNonHomTransform(int n, register Transform3D m, + register Point3D * in, register Point3D * out) +{ + for (; n > 0; --n, ++in, ++out) { + out->x = in->x * m[0][0] + in->y * m[1][0] + in->z * m[2][0]; + out->y = in->x * m[0][1] + in->y * m[1][1] + in->z * m[2][1]; + out->z = in->x * m[0][2] + in->y * m[1][2] + in->z * m[2][2]; + } +} + + +/****************************************************************************** + * Description + * Undraw previous polyhedron (by erasing its bounding box). + * Rotate and draw the new polyhedron. + * + * Input + * poly the polyhedron to draw + * gc X11 graphics context to be used for drawing + * icoX, icoY position of upper left of bounding-box + * icoW, icoH size of bounding-box + * prevX, prevY position of previous bounding-box + *****************************************************************************/ + +static void +drawPoly(ModeInfo * mi, Polyinfo * poly, GC gc, + int icoX, int icoY, int icoW, int icoH, int prevX, int prevY) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + icostruct *ip = &icos[MI_SCREEN(mi)]; + int *f = poly->f; + int NV = poly->numverts; + int NF = poly->numfaces; + + register int p0; + register int p1; + register XPoint *pv2; + XSegment *pe; + register Point3D *pxv; + XPoint v2[MAXNV]; + XSegment edge_segs[MAXEDGES]; + register int i; + int j, k; + register int *pf; + int facecolor; + + int pcount; + double pxvz; + XPoint ppts[MAXEDGESPERPOLY]; + + /* Switch double-buffer and rotate vertices */ + + ip->xv_buffer = !ip->xv_buffer; + PartialNonHomTransform(NV, ip->xform, + ip->xv[!ip->xv_buffer], ip->xv[ip->xv_buffer]); + + + /* Convert 3D coordinates to 2D window coordinates: */ + + pxv = ip->xv[ip->xv_buffer]; + pv2 = v2; + for (i = NV - 1; i >= 0; --i) { + pv2->x = (int) ((pxv->x + 1.0) * ip->wo2) + icoX; + pv2->y = (int) ((pxv->y + 1.0) * ip->ho2) + icoY; + ++pxv; + ++pv2; + } + + + /* Accumulate edges to be drawn, eliminating duplicates for speed: */ + + pxv = ip->xv[ip->xv_buffer]; + pv2 = v2; + pf = f; + pe = edge_segs; + (void) memset(ip->drawn, 0, sizeof (ip->drawn)); + + /* for faces, need to clear before FillPoly */ + if (ip->faces) { /* multibuf uses update background */ + icoClearArea(mi, prevX, prevY, icoW + 1, icoH + 1); + } + for (i = NF - 1; i >= 0; --i, pf += pcount) { + + pcount = *pf++; /* number of edges for this face */ + pxvz = 0.0; + for (j = 0; j < pcount; j++) { + p0 = pf[j]; + pxvz += pxv[p0].z; + } + + /* If facet faces away from viewer, don't consider it: */ + if (pxvz < 0.0) + continue; + + if (ip->faces) { + if (MI_NPIXELS(mi) > 2) + facecolor = i % (MI_NPIXELS(mi)) + 1; + else + facecolor = 1; + + for (j = 0; j < pcount; j++) { + p0 = pf[j]; + ppts[j].x = pv2[p0].x; + ppts[j].y = pv2[p0].y; + } + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_PIXEL(mi, facecolor)); + XFillPolygon(display, window, gc, ppts, pcount, + Convex, CoordModeOrigin); + } + if (ip->edges) { + for (j = 0; j < pcount; j++) { + if (j < pcount - 1) + k = j + 1; + else + k = 0; + p0 = pf[j]; + p1 = pf[k]; + if (!ip->drawn[p0][p1]) { + ip->drawn[p0][p1] = 1; + ip->drawn[p1][p0] = 1; + pe->x1 = pv2[p0].x; + pe->y1 = pv2[p0].y; + pe->x2 = pv2[p1].x; + pe->y2 = pv2[p1].y; + ++pe; + } + } + } + } + + /* Erase previous, draw current icosahedrons; sync for smoothness. */ + + if (ip->edges) { + icoClearArea(mi, prevX, prevY, icoW + 1, icoH + 1); + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else { + ip->color = (ip->color + 1) % MI_NPIXELS(mi); + XSetForeground(display, gc, MI_PIXEL(mi, ip->color)); + } + XDrawSegments(display, window, gc, edge_segs, pe - edge_segs); + } +} + +void +init_ico(ModeInfo * mi) +{ + icostruct *ip; + int size = MI_SIZE(mi); + + if (icos == NULL) { + if ((icos = (icostruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (icostruct))) == NULL) + return; + } + ip = &icos[MI_SCREEN(mi)]; + + ip->width = MI_WIDTH(mi); + ip->height = MI_HEIGHT(mi); + + ip->edges = edges; +#ifdef DEBUG + ip->faces = faces; +#else + ip->faces = faces = 0; +#endif + /*ip->linewidth + if (!ip->faces && !ip->edges) icoFatal("nothing to draw"); */ + + if (size < -MINSIZE) + ip->polyW = NRAND(MIN(-size, MAX(MINSIZE, + MIN(ip->width, ip->height) / 4)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + ip->polyW = MAX(MINSIZE, MIN(ip->width, ip->height) / 4); + else + ip->polyW = MINSIZE; + } else + ip->polyW = MIN(size, MAX(MINSIZE, + MIN(ip->width, ip->height) / 4)); + + ip->polyH = ip->polyW; + ip->polyDeltaX = ip->polyW / DEFAULT_DELTAY + 1; + ip->polyDeltaY = ip->polyH / DEFAULT_DELTAX + 1; + ip->currX = NRAND(ip->width - ip->polyW); + ip->currY = NRAND(ip->height - ip->polyH); + + /* Bounce the box in the window */ + + ip->polydeltax2 = ip->polyDeltaX * 2; + ip->polydeltay2 = ip->polyDeltaY * 2; + + ip->loopcount = 0; + + ip->object = MI_COUNT(mi) - 1; + if (ip->object < 0 || ip->object >= polysize) + ip->object = NRAND(polysize); + ip->poly = polygons + ip->object; + if (MI_NPIXELS(mi) > 2) + ip->color = NRAND(MI_NPIXELS(mi)); + + MI_CLEARWINDOW(mi); + + initPoly(mi, ip->poly, ip->polyW, ip->polyH); +} + +void +draw_ico(ModeInfo * mi) +{ + icostruct *ip = &icos[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (++ip->loopcount > MI_CYCLES(mi)) + init_ico(mi); + + ip->prevX = ip->currX; + ip->prevY = ip->currY; + + ip->currX += ip->polyDeltaX; + if (ip->currX < 0 || ip->currX + ip->polyW > ip->width) { + + ip->currX -= ip->polydeltax2; + ip->polyDeltaX = -ip->polyDeltaX; + ip->polydeltax2 = ip->polyDeltaX * 2; + } + ip->currY += ip->polyDeltaY; + if (ip->currY < 0 || ip->currY + ip->polyH > ip->height) { + ip->currY -= ip->polydeltay2; + ip->polyDeltaY = -ip->polyDeltaY; + ip->polydeltay2 = ip->polyDeltaY * 2; + } + drawPoly(mi, ip->poly, MI_GC(mi), + ip->currX, ip->currY, ip->polyW, ip->polyH, ip->prevX, ip->prevY); +} +void +refresh_ico(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +void +release_ico(ModeInfo * mi) +{ + if (icos != NULL) { + (void) free((void *) icos); + icos = NULL; + } +} + +void +change_ico(ModeInfo * mi) +{ + icostruct *ip = &icos[MI_SCREEN(mi)]; + + ip->object = (ip->object + 1) % polysize; + ip->poly = polygons + ip->object; + ip->loopcount = 0; + + MI_CLEARWINDOW(mi); + + initPoly(mi, ip->poly, ip->polyW, ip->polyH); +} + +#endif /* MODE_ico */ diff --git a/modes/ifs.c b/modes/ifs.c new file mode 100644 index 00000000..b5319188 --- /dev/null +++ b/modes/ifs.c @@ -0,0 +1,485 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* ifs --- modified iterated functions system */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)ifs.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 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. + * + * 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 this mode is weird and you have an old MetroX server, it is buggy. + * There is a free SuSE-enhanced MetroX X server that is fine. + * + * When shown ifs, Diana Rose (4 years old) said, "It looks like dancing." + * + * Revision History: + * 10-May-97: jwz@jwz.org: 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: 1000 \n" \ + "*ncolors: 100 \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_ifs + +ModeSpecOpt ifs_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct ifs_description = +{"ifs", "init_ifs", "draw_ifs", "release_ifs", + "init_ifs", "init_ifs", NULL, &ifs_opts, + 1000, 1, 1, 1, 64, 1.0, "", + "Shows a modified iterated function system", 0, NULL}; + +#endif + +/*****************************************************/ + +typedef float DBL; +typedef 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) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(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->Buffer1 != NULL) { + (void) free((void *) Fractal->Buffer1); + Fractal->Buffer1 = NULL; + } + if (Fractal->Buffer2 != NULL) { + (void) free((void *) Fractal->Buffer2); + Fractal->Buffer2 = NULL; + } + 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)); + Fractal->Buffer2 = (XPoint *) calloc(Fractal->Max_Pt, sizeof (XPoint)); + if (Fractal->Buffer1 == NULL || Fractal->Buffer2 == NULL) { + if (Fractal->Buffer1 != NULL) { + (void) free((void *) Fractal->Buffer1); + Fractal->Buffer1 = NULL; + } + if (Fractal->Buffer2 != NULL) { + (void) free((void *) Fractal->Buffer2); + Fractal->Buffer2 = NULL; + } + Fractal->Max_Pt = 0; + return; + } + Fractal->Speed = 6; + Fractal->Width = MI_WIDTH(mi); + Fractal->Height = MI_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); + + if (Fractal->dbuf) + XFreePixmap(display, Fractal->dbuf); + Fractal->dbuf = XCreatePixmap(display, window, + Fractal->Width, Fractal->Height, 1); + if (Fractal->dbuf) { + XGCValues gcv; + + gcv.foreground = 0; + gcv.background = 0; + gcv.graphics_exposures = False; + gcv.function = GXcopy; + + if (Fractal->dbuf_gc) + XFreeGC(display, Fractal->dbuf_gc); + Fractal->dbuf_gc = XCreateGC(display, Fractal->dbuf, + GCForeground | GCBackground | GCGraphicsExposures | GCFunction, + &gcv); + XFillRectangle(display, Fractal->dbuf, + Fractal->dbuf_gc, 0, 0, Fractal->Width, Fractal->Height); + XSetBackground(display, gc, MI_BLACK_PIXEL(mi)); + XSetFunction(display, gc, GXcopy); + } + MI_CLEARWINDOW(mi); + + /* don't want any exposure events from XCopyPlane */ + XSetGraphicsExposures(display, gc, False); + +} + + +/***************************************************************/ + +/* Should be taken care of already... but just in case */ +#if !defined( __GNUC__ ) && !defined(__cplusplus) && !defined(c_plusplus) +#undef inline +#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(FRACTAL * F, 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 = F->Lx + (x * F->Lx / (UNIT * 2)); + Buf->y = F->Ly - (y * F->Ly / (UNIT * 2)); + Buf++; + Cur_Pt++; + + if (F->Depth && ((x - xo) >> 4) && ((y - yo) >> 4)) { + F->Depth--; + Trace(F, x, y); + F->Depth++; + } + } +} + +static void +Draw_Fractal(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + FRACTAL *F = &Root[MI_SCREEN(mi)]; + 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; + 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(F, x, y); + } + } + + /* Erase previous */ + + if (F->Cur_Pt) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (F->dbuf) { + 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 (MI_NPIXELS(mi) < 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_PIXEL(mi, F->Col % MI_NPIXELS(mi))); + 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 = &Root[MI_SCREEN(mi)]; + DBL u, uu, v, vv, u0, u1, u2, u3; + SIMI *S, *S1, *S2, *S3, *S4; + + 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; + } + + MI_IS_DRAWN(mi) = True; + + Draw_Fractal(mi); + + 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 screen; + + if (Root != NULL) { + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + FRACTAL *Fractal = &Root[screen]; + + if (Fractal->Buffer1 != NULL) + (void) free((void *) Fractal->Buffer1); + if (Fractal->Buffer2 != NULL) + (void) free((void *) Fractal->Buffer2); + if (Fractal->dbuf) + XFreePixmap(MI_DISPLAY(mi), Fractal->dbuf); + if (Fractal->dbuf_gc) + XFreeGC(MI_DISPLAY(mi), Fractal->dbuf_gc); + } + (void) free((void *) Root); + Root = NULL; + } +} + +#endif /* MODE_ifs */ diff --git a/modes/image.c b/modes/image.c new file mode 100644 index 00000000..976d1275 --- /dev/null +++ b/modes/image.c @@ -0,0 +1,252 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* image --- image bouncer */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)image.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 03-Nov-95: Patched to add an arbitrary xpm file. + * 21-Sep-95: Patch if xpm fails to load . + * 17-Jun-95: Pixmap stuff of Skip_Burrell@sterling.com added. + * 07-Dec-94: Icons are now better centered if do not exactly fill an area. + * 29-Jul-90: Written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Image" +#define HACK_INIT init_image +#define HACK_DRAW draw_image +#define image_opts xlockmore_opts +#define DEFAULTS "*delay: 2000000 \n" \ + "*count: -10 \n" \ + "*ncolors: 200 \n" \ + "*bitmap: \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_image + +ModeSpecOpt image_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct image_description = +{"image", "init_image", "draw_image", "release_image", + "refresh_image", "init_image", NULL, &image_opts, + 2000000, -10, 1, 1, 64, 1.0, "", + "Shows randomly appearing logos", 0, NULL}; + +#endif + +/* aliases for vars defined in the bitmap file */ +#define IMAGE_WIDTH image_width +#define IMAGE_HEIGHT image_height +#define IMAGE_BITS image_bits + +#include "image.xbm" + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#define IMAGE_NAME image_name +#include "image.xpm" +#define DEFAULT_XPM 1 +#endif + +#define MINICONS 1 + +typedef struct { + int x, y; + int color; +} imagetype; + +typedef struct { + int width, height; + int nrows, ncols; + XPoint image_offset; + int iconcount; + imagetype *icons; + int graphics_format; + GC backGC; + XImage *logo; + Colormap cmap; + unsigned long black; +} imagestruct; + +static imagestruct *ims = NULL; + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + imagestruct *ip = &ims[MI_SCREEN(mi)]; + + if (!ip->logo) + getImage(mi, &ip->logo, IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_BITS, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + DEFAULT_XPM, IMAGE_NAME, +#endif + &ip->graphics_format, &ip->cmap, &ip->black); +#ifndef STANDALONE + if (ip->cmap != None) { + setColormap(display, window, ip->cmap, MI_IS_INWINDOW(mi)); + if (ip->backGC == None) { + XGCValues xgcv; + + xgcv.background = ip->black; + ip->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* STANDALONE */ + { + ip->black = MI_BLACK_PIXEL(mi); + ip->backGC = MI_GC(mi); + } +} + +static void +free_stuff(Display * display, imagestruct * ip) +{ + if (ip->cmap != None) { + XFreeColormap(display, ip->cmap); + if (ip->backGC != None) { + XFreeGC(display, ip->backGC); + ip->backGC = None; + } + ip->cmap = None; + } else + ip->backGC = None; + destroyImage(&ip->logo, &ip->graphics_format); +} + +void +refresh_image(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + imagestruct *ip = &ims[MI_SCREEN(mi)]; + int i; + + MI_CLEARWINDOWCOLORMAP(mi, ip->backGC, ip->black); + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, ip->backGC, MI_WHITE_PIXEL(mi)); + for (i = 0; i < ip->iconcount; i++) { + if (ip->logo != NULL && ip->icons[i].x >= 0) { + if (MI_NPIXELS(mi) > 2 && ip->graphics_format < IS_XPM) + XSetForeground(display, ip->backGC, MI_PIXEL(mi, ip->icons[i].color)); + (void) XPutImage(display, window, ip->backGC, ip->logo, 0, 0, + ip->logo->width * ip->icons[i].x + ip->image_offset.x, + ip->logo->height * ip->icons[i].y + ip->image_offset.y, + ip->logo->width, ip->logo->height); + } + } +} + +void +init_image(ModeInfo * mi) +{ + imagestruct *ip; + int i; + + if (ims == NULL) { + if ((ims = (imagestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (imagestruct))) == NULL) + return; + } + ip = &ims[MI_SCREEN(mi)]; + + init_stuff(mi); + + ip->width = MI_WIDTH(mi); + ip->height = MI_HEIGHT(mi); + if (ip->width > ip->logo->width) + ip->ncols = ip->width / ip->logo->width; + else + ip->ncols = 1; + if (ip->height > ip->logo->height) + ip->nrows = ip->height / ip->logo->height; + else + ip->nrows = 1; + ip->image_offset.x = (ip->width - ip->ncols * ip->logo->width) / 2; + ip->image_offset.y = (ip->height - ip->nrows * ip->logo->height) / 2; + ip->iconcount = MI_COUNT(mi); + if (ip->iconcount < -MINICONS) + ip->iconcount = NRAND(-ip->iconcount - MINICONS + 1) + MINICONS; + else if (ip->iconcount < MINICONS) + ip->iconcount = MINICONS; + if (ip->iconcount > ip->ncols * ip->nrows) + ip->iconcount = ip->ncols * ip->nrows; + if (ip->icons != NULL) + (void) free((void *) ip->icons); + ip->icons = (imagetype *) malloc(ip->iconcount * sizeof (imagetype)); + for (i = 0; i < ip->iconcount; i++) + ip->icons[i].x = -1; + + MI_CLEARWINDOWCOLORMAP(mi, ip->backGC, ip->black); +} + +void +draw_image(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + imagestruct *ip = &ims[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + XSetForeground(display, ip->backGC, ip->black); + for (i = 0; i < ip->iconcount; i++) { + if ((ip->ncols * ip->nrows > ip->iconcount) && ip->icons[i].x >= 0) + XFillRectangle(display, window, ip->backGC, + ip->logo->width * ip->icons[i].x + ip->image_offset.x, + ip->logo->height * ip->icons[i].y + ip->image_offset.y, + ip->logo->width, ip->logo->height); + ip->icons[i].x = NRAND(ip->ncols); + ip->icons[i].y = NRAND(ip->nrows); + ip->icons[i].color = NRAND(MI_NPIXELS(mi)); + } + refresh_image(mi); +} + +void +release_image(ModeInfo * mi) +{ + if (ims != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + imagestruct *ip = &ims[screen]; + Display *display = MI_DISPLAY(mi); + + if (ip->icons != NULL) + (void) free((void *) ip->icons); + free_stuff(display, ip); + } + (void) free((void *) ims); + ims = NULL; + } +} + +#endif /* MODE_image */ diff --git a/modes/julia.c b/modes/julia.c new file mode 100644 index 00000000..ad3e6fe7 --- /dev/null +++ b/modes/julia.c @@ -0,0 +1,395 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* julia --- continuously varying Julia set */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)julia.c 4.07 97/11/24 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. + * + * Check out A.K. Dewdney's "Computer Recreations", Scientific + * American Magazine" Nov 1987. + * + * Revision History: + * 28-May-97: jwz@jwz.org: added interactive frobbing with the mouse. + * 10-May-97: jwz@jwz.org: 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 "*delay: 10000 \n" \ + "*count: 1000 \n" \ + "*cycles: 20 \n" \ + "*ncolors: 200 \n" \ + "*mouse: False \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ + +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_julia + +ModeSpecOpt julia_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct julia_description = +{"julia", "init_julia", "draw_julia", "release_julia", + "refresh_julia", "init_julia", NULL, &julia_opts, + 10000, 1000, 20, 1, 64, 1.0, "", + "Shows the Julia set", 0, NULL}; + +#endif + +#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; + GC stippledGC; + XPoint **pointBuffer; /* pointer for XDrawPoints */ + Cursor cursor; +} 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 */ + theta = (xi == 0.0 && xr == 0.0) ? 0.0 : 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) +{ + Bool track_p = MI_IS_MOUSE(mi); + int cx, cy; + + if (track_p) { + Window r, c; + int rx, ry; + unsigned int m; + + (void) XQueryPointer(MI_DISPLAY(mi), MI_WINDOW(mi), + &r, &c, &rx, &ry, &cx, &cy, &m); + if (cx <= 0 || cy <= 0 || + cx >= MI_WIDTH(mi) - jp->circsize - 1 || + cy >= MI_HEIGHT(mi) - jp->circsize - 1) + track_p = False; + } + if (track_p) { + jp->cr = ((double) (cx + 2 - jp->centerx)) * 2 / jp->centerx; + jp->ci = ((double) (cy + 2 - jp->centery)) * 2 / jp->centery; + } else { + 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, j; + + if (julias == NULL) { + if ((julias = (juliastruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (juliastruct))) == NULL) + return; + } + jp = &julias[MI_SCREEN(mi)]; + + jp->centerx = MI_WIDTH(mi) / 2; + jp->centery = MI_HEIGHT(mi) / 2; + + jp->depth = MI_COUNT(mi); + if (jp->depth > 10) + jp->depth = 10; + + if (MI_IS_MOUSE(mi) && !jp->cursor) { /* Create an invisible cursor */ + Pixmap bit; + XColor black; + + black.red = 0; + black.green = 0; + black.blue = 0; + black.flags = DoRed | DoGreen | DoBlue; + bit = XCreatePixmapFromBitmapData(display, window, "\000", 1, 1, + MI_BLACK_PIXEL(mi), + MI_BLACK_PIXEL(mi), 1); + jp->cursor = XCreatePixmapCursor(display, bit, bit, &black, &black, + 0, 0); + XFreePixmap(display, bit); + } + XDefineCursor(display, window, jp->cursor); + 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 (!jp->stippledGC) { + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_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 = NRAND(400) - 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]) + jp->pointBuffer[i] = (XPoint *) malloc(numpoints * sizeof (XPoint)); + for (j = 0; j < numpoints; j++) + jp->pointBuffer[i][j].x = jp->pointBuffer[i][j].y = -1; /* move initial point off screen */ + } + jp->buffer = 0; + jp->redrawing = 0; + jp->erase = 0; + + MI_CLEARWINDOW(mi); +} + +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; + + MI_IS_DRAWN(mi) = True; + + 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_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_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_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 = (int) 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)]; + + MI_CLEARWINDOW(mi); + jp->redrawing = 1; + jp->redrawpos = 0; +} + +#endif /* MODE_julia */ diff --git a/modes/kaleid.c b/modes/kaleid.c new file mode 100644 index 00000000..d5f82f40 --- /dev/null +++ b/modes/kaleid.c @@ -0,0 +1,1278 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* kaleid --- Brewster's Kaleidoscope */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)kaleid.c 4.11 98/06/01 xlockmore"; + +#endif + +/*- + * + * kaleid.c - Brewster's Kaleidoscope (Sir David Brewster invented the + * kaleidoscope in 1816 and patented it in 1817.) + * + * Copyright (c) 1998 by Robert Adam, II + * + * 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. + * + * -batchcount n number of pens [default 4] + * + * -cycle n percentage of black in the pattern (0%-95%) + * + * -size n symmetry mode [default -9] + * <0 = random from 0 to -number + * >0 = mirrored (-alternate) + * rotated (+alternate) + * + * + * -/+disconnected turn on/off disconnected pen movement + * + * -/+serial turn on/off sequential allocation of colors + * + * -/+alternate turn on/off alternate display mode + * + * -/+quad turn on/off quad mirrored/rotated mode similar + * to size 4, works with alternate + * + * -/+oct turn on/off oct mirrored/rotated moded similar + * to size 8, works with alternate + * + * -/+linear select Cartesian/Polar coordinate mode. Cartesian + * uses straight lines similar to -oct and -quad + * mode instead of the curved lines of Polar mode. + * [default off] + * + */ + +#include + +#ifdef STANDALONE +#define PROGCLASS "Kaleid" +#define HACK_INIT init_kaleid +#define HACK_DRAW draw_kaleid +#define kaleid_opts xlockmore_opts +#define DEFAULTS "*delay: 80000 \n" \ + "*count: 4 \n" \ + "*cycles: 40 \n" \ + "*size: -9 \n" \ + "*ncolors: 200 \n" \ + "*disconnected: True \n" \ + "*serial: False \n" \ + "*alternate: False \n" \ + "*linear: False \n" \ + "*quad: False \n" \ + "*oct: False \n" +"*fullrandom: False \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_kaleid + +#define DEF_DISCONNECTED "True" +#define DEF_SERIAL "False" +#define DEF_ALTERNATE "False" +#define DEF_QUAD "False" +#define DEF_OCT "False" +#define DEF_LINEAR "False" + +static Bool Disconnected; +static Bool Serial; +static Bool Alternate; +static Bool Quad; +static Bool Oct; +static Bool Linear; + +static XrmOptionDescRec opts[] = +{ + {"-disconnected", ".kaleid.disconnected", XrmoptionNoArg, (caddr_t) "on"}, + {"+disconnected", ".kaleid.disconnected", XrmoptionNoArg, (caddr_t) "off"}, + {"-serial", ".kaleid.serial", XrmoptionNoArg, (caddr_t) "on"}, + {"+serial", ".kaleid.serial", XrmoptionNoArg, (caddr_t) "off"}, + {"-alternate", ".kaleid.alternate", XrmoptionNoArg, (caddr_t) "on"}, + {"+alternate", ".kaleid.alternate", XrmoptionNoArg, (caddr_t) "off"}, + {"-quad", ".kaleid.quad", XrmoptionNoArg, (caddr_t) "on"}, + {"+quad", ".kaleid.quad", XrmoptionNoArg, (caddr_t) "off"}, + {"-oct", ".kaleid.oct", XrmoptionNoArg, (caddr_t) "on"}, + {"+oct", ".kaleid.oct", XrmoptionNoArg, (caddr_t) "off"}, + {"-linear", ".kaleid.linear", XrmoptionNoArg, (caddr_t) "on"}, + {"+linear", ".kaleid.linear", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & Disconnected, "disconnected", "Disconnected", DEF_DISCONNECTED, t_Bool}, + {(caddr_t *) & Serial, "serial", "Serial", DEF_SERIAL, t_Bool}, + {(caddr_t *) & Alternate, "alternate", "Alternate", DEF_ALTERNATE, t_Bool}, + {(caddr_t *) & Quad, "quad", "Quad", DEF_QUAD, t_Bool}, + {(caddr_t *) & Oct, "oct", "Oct", DEF_OCT, t_Bool}, + {(caddr_t *) & Linear, "linear", "Linear", DEF_LINEAR, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-/+disconnected", "turn on/off disconnected pen movement"}, + {"-/+serial", "turn on/off sequential color selection"}, + {"-/+alternate", "turn on/off alternate display mode"}, + {"-/+quad", "turn on/off quad mirrored display mode"}, + {"-/+oct", "turn on/off oct mirrored display mode"}, + {"-/+linear", "select Cartesian/Polar coordinate display mode"} +}; + +ModeSpecOpt kaleid_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct kaleid_description = +{ + "kaleid", "init_kaleid", "draw_kaleid", "release_kaleid", + "refresh_kaleid", "init_kaleid", NULL, &kaleid_opts, + 80000, 4, 40, -9, 64, 0.6, "", + "Shows Brewster's Kaleidoscope", 0, NULL +}; + +#endif + +#define INTRAND(min,max) (NRAND(((max+1)-(min)))+(min)) + +#define MINPENS 1 +#define MINSIZE 1 +#define QUAD (-4) +#define OCT (-8) + +#define MinVelocity 6 +#define MaxVelocity 4 + +#define MinRadialVelocity 6 +#define MaxRadialVelocity 30 + +#define MinAngularVelocity 5 +#define MaxAngularVelocity 3 + +#define WidthPercent 25 +#define ChangeChance 2 + +#define ToRadians 0.017453293 +#define ToDegrees 57.29577951 +#define PolarToCartX(r, t) ((r) * cos((t) * ToRadians)) +#define PolarToCartY(r, t) ((r) * sin((t) * ToRadians)) +#define CartToRadius(x, y) (sqrt(((x)*(x)) + ((y)*(y)))) +#define CartToAngle(x,y) ((((x) == 0.0) && ((y) == 0.0)) ? 0.0 : (atan2((y),(x)) * ToDegrees)) + +typedef struct { + double cx; + double cy; + double ox; + double oy; + double xv; + double yv; + int curlwidth; + int pix; + int White; + Bool RadiusOut; + Bool AngleOut; + Bool DeferredChange; +} penstruct; + +typedef struct { + penstruct *pen; + + + int PercentBlack; + int PenCount; + int maxlwidth; + double width, widthby2; + double height, heightby2; + double radius; + double slice; + int bouncetype; + int modetype; + Bool alternate, disconnected, serial, linear; +} kaleidstruct; + +static kaleidstruct *kaleids = NULL; + +/*- + * + */ +static void +QuadMirrored( + kaleidstruct * kp, + int pn, + XSegment segs[4] +) +{ + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + if (kp->pen[pn].cx < 0.0) { + kp->pen[pn].cx = -kp->pen[pn].cx; + kp->pen[pn].xv = -kp->pen[pn].xv; + } else if (kp->pen[pn].cx >= kp->widthby2) { + kp->pen[pn].cx = (kp->widthby2 - 1.0) + - (kp->pen[pn].cx - kp->widthby2); + kp->pen[pn].xv = -kp->pen[pn].xv; + } + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + if (kp->pen[pn].cy < 0.0) { + kp->pen[pn].cy = -kp->pen[pn].cy; + kp->pen[pn].yv = -kp->pen[pn].yv; + } else if (kp->pen[pn].cy >= kp->heightby2) { + kp->pen[pn].cy = (kp->heightby2 - 1.0) + - (kp->pen[pn].cy - kp->heightby2); + kp->pen[pn].yv = -kp->pen[pn].yv; + } + segs[0].x1 = (int) kp->pen[pn].ox; + segs[0].y1 = (int) kp->pen[pn].oy; + segs[0].x2 = (int) kp->pen[pn].cx; + segs[0].y2 = (int) kp->pen[pn].cy; + + segs[1].x1 = (int) (kp->width - kp->pen[pn].ox); + segs[1].y1 = (int) kp->pen[pn].oy; + segs[1].x2 = (int) (kp->width - kp->pen[pn].cx); + segs[1].y2 = (int) kp->pen[pn].cy; + + segs[2].x1 = (int) (kp->width - kp->pen[pn].ox); + segs[2].y1 = (int) (kp->height - kp->pen[pn].oy); + segs[2].x2 = (int) (kp->width - kp->pen[pn].cx); + segs[2].y2 = (int) (kp->height - kp->pen[pn].cy); + + segs[3].x1 = (int) kp->pen[pn].ox; + segs[3].y1 = (int) (kp->height - kp->pen[pn].oy); + segs[3].x2 = (int) kp->pen[pn].cx; + segs[3].y2 = (int) (kp->height - kp->pen[pn].cy); + +} + +/*- + * + */ +static void +QuadRotated( + kaleidstruct * kp, + int pn, + XSegment segs[4] +) +{ + double oxscaled2y; + double oyscaled2x; + double cxscaled2y; + double cyscaled2x; + + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + if (kp->pen[pn].cx < 0.0) { + kp->pen[pn].cx = -kp->pen[pn].cx; + kp->pen[pn].xv = -kp->pen[pn].xv; + } else if (kp->pen[pn].cx >= kp->widthby2) { + kp->pen[pn].cx = (kp->widthby2 - 1.0) + - (kp->pen[pn].cx - kp->widthby2); + kp->pen[pn].xv = -kp->pen[pn].xv; + } + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + if (kp->pen[pn].cy < 0.0) { + kp->pen[pn].cy = -kp->pen[pn].cy; + kp->pen[pn].yv = -kp->pen[pn].yv; + } else if (kp->pen[pn].cy >= kp->heightby2) { + kp->pen[pn].cy = (kp->heightby2 - 1.0) + - (kp->pen[pn].cy - kp->heightby2); + kp->pen[pn].yv = -kp->pen[pn].yv; + } + segs[0].x1 = (int) kp->pen[pn].ox; + segs[0].y1 = (int) kp->pen[pn].oy; + segs[0].x2 = (int) kp->pen[pn].cx; + segs[0].y2 = (int) kp->pen[pn].cy; + + oxscaled2y = ((kp->pen[pn].ox * kp->heightby2) / kp->widthby2); + oyscaled2x = ((kp->pen[pn].oy * kp->widthby2) / kp->heightby2); + cxscaled2y = ((kp->pen[pn].cx * kp->heightby2) / kp->widthby2); + cyscaled2x = ((kp->pen[pn].cy * kp->widthby2) / kp->heightby2); + + segs[1].x1 = (int) (kp->width - oyscaled2x); + segs[1].y1 = (int) oxscaled2y; + segs[1].x2 = (int) (kp->width - cyscaled2x); + segs[1].y2 = (int) cxscaled2y; + + segs[2].x1 = (int) (kp->width - kp->pen[pn].ox); + segs[2].y1 = (int) (kp->height - kp->pen[pn].oy); + segs[2].x2 = (int) (kp->width - kp->pen[pn].cx); + segs[2].y2 = (int) (kp->height - kp->pen[pn].cy); + + segs[3].x1 = (int) oyscaled2x; + segs[3].y1 = (int) (kp->height - oxscaled2y); + segs[3].x2 = (int) cyscaled2x; + segs[3].y2 = (int) (kp->height - cxscaled2y); + +} + +/*- + * + */ +static void +GeneralPolarMoveAndBounce( + kaleidstruct * kp, + int pn +) +{ + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + if (kp->pen[pn].cx < 0.0) { + kp->pen[pn].cx = -kp->pen[pn].cx; + kp->pen[pn].xv = -kp->pen[pn].xv; + } else if (kp->pen[pn].cx >= kp->radius) { + kp->pen[pn].cx = (kp->radius - 1.0) + - (kp->pen[pn].cx - kp->radius); + kp->pen[pn].xv = -kp->pen[pn].xv; + } + switch (kp->bouncetype) { + case 0: + { + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + break; + } + case 1: + { + kp->pen[pn].cy = kp->pen[pn].cy + + ((kp->pen[pn].yv * kp->pen[pn].cx) / kp->radius); + break; + } + case 2: + { + kp->pen[pn].cy = kp->pen[pn].cy + + ((kp->pen[pn].yv * (kp->radius - kp->pen[pn].cx)) / kp->radius); + break; + } + default: + { + kp->pen[pn].cy = kp->slice / 2.0; + kp->pen[pn].cx = kp->radius / 2.0; + break; + } + } + + if (kp->pen[pn].cy < 0) { + kp->pen[pn].RadiusOut = True; + if (kp->pen[pn].oy >= 0) { + kp->pen[pn].yv = -kp->pen[pn].yv; + } + } else if (kp->pen[pn].cy >= kp->slice) { + kp->pen[pn].RadiusOut = True; + if (kp->pen[pn].oy < kp->slice) { + kp->pen[pn].yv = -kp->pen[pn].yv; + } + } else { + kp->pen[pn].RadiusOut = False; + } + +} + + +/*- + * + */ +static void +GeneralRotated( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double Angle; + int segnum; + + + GeneralPolarMoveAndBounce(kp, pn); + + Angle = 0.0; + for (segnum = 0; segnum < kp->modetype; segnum += 1) { + segs[segnum].x1 = (int) (PolarToCartX(kp->pen[pn].ox, + kp->pen[pn].oy + Angle + ) + kp->widthby2 + ); + segs[segnum].y1 = (int) (PolarToCartY(kp->pen[pn].ox, + kp->pen[pn].oy + Angle + ) + kp->heightby2 + ); + segs[segnum].x2 = (int) (PolarToCartX(kp->pen[pn].cx, + kp->pen[pn].cy + Angle + ) + kp->widthby2 + ); + segs[segnum].y2 = (int) (PolarToCartY(kp->pen[pn].cx, + kp->pen[pn].cy + Angle + ) + kp->heightby2 + ); + + Angle += kp->slice; + } +} + +/*- + * + */ +static void +GeneralMirrored( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double Angle; + int segnum; + + GeneralPolarMoveAndBounce(kp, pn); + + Angle = 0.0; + for (segnum = 0; segnum < kp->modetype; segnum += 2) { + segs[segnum].x1 = (int) (PolarToCartX(kp->pen[pn].ox, + kp->pen[pn].oy + Angle + ) + kp->widthby2 + ); + + segs[segnum].y1 = (int) (PolarToCartY(kp->pen[pn].ox, + kp->pen[pn].oy + Angle + ) + kp->heightby2 + ); + + segs[segnum].x2 = (int) (PolarToCartX(kp->pen[pn].cx, + kp->pen[pn].cy + Angle + ) + kp->widthby2 + ); + + segs[segnum].y2 = (int) (PolarToCartY(kp->pen[pn].cx, + kp->pen[pn].cy + Angle + ) + kp->heightby2 + ); + + Angle += (2.0 * kp->slice); + } + + Angle = 360.0 - kp->slice; + for (segnum = 1; segnum < kp->modetype; segnum += 2) { + segs[segnum].x1 = + (int) (PolarToCartX(kp->pen[pn].ox, + (kp->slice - kp->pen[pn].oy) + Angle + ) + kp->widthby2 + ); + + segs[segnum].y1 = + (int) (PolarToCartY(kp->pen[pn].ox, + (kp->slice - kp->pen[pn].oy) + Angle + ) + kp->heightby2 + ); + + segs[segnum].x2 = + (int) (PolarToCartX(kp->pen[pn].cx, + (kp->slice - kp->pen[pn].cy) + Angle + ) + kp->widthby2 + ); + + segs[segnum].y2 = + (int) (PolarToCartY(kp->pen[pn].cx, + (kp->slice - kp->pen[pn].cy) + Angle + ) + kp->heightby2 + ); + + Angle -= (2.0 * kp->slice); + } +} + +/*- + * + */ +static void +OctMirrored( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double xdiag; + double ydiag; + double oxscaled2y, cxscaled2y; + double oyscaled2x, cyscaled2x; + + /* + * I know that the "bounce" is not really accurate, but I like the way + * it looks. + */ + + xdiag = (kp->widthby2 * kp->pen[pn].oy) / kp->heightby2; + + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + if (kp->pen[pn].cx < xdiag) { + kp->pen[pn].cx = xdiag + (xdiag - kp->pen[pn].cx); + kp->pen[pn].xv = -kp->pen[pn].xv; + } else if (kp->pen[pn].cx >= kp->widthby2) { + kp->pen[pn].cx = (kp->widthby2 - 1.0) + - (kp->pen[pn].cx - kp->widthby2); + kp->pen[pn].xv = -kp->pen[pn].xv; + } + ydiag = (kp->heightby2 * kp->pen[pn].cx) / kp->widthby2; + + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + if (kp->pen[pn].cy < 0.0) { + kp->pen[pn].cy = -kp->pen[pn].cy; + kp->pen[pn].yv = -kp->pen[pn].yv; + } else if (kp->pen[pn].cy > ydiag) { + kp->pen[pn].cy = ydiag - (kp->pen[pn].cy - ydiag); + kp->pen[pn].yv = -kp->pen[pn].yv; + } + segs[0].x1 = (int) kp->pen[pn].ox; + segs[0].y1 = (int) kp->pen[pn].oy; + segs[0].x2 = (int) kp->pen[pn].cx; + segs[0].y2 = (int) kp->pen[pn].cy; + + segs[1].x1 = (int) (kp->width - kp->pen[pn].ox); + segs[1].y1 = (int) kp->pen[pn].oy; + segs[1].x2 = (int) (kp->width - kp->pen[pn].cx); + segs[1].y2 = (int) kp->pen[pn].cy; + + segs[4].x1 = segs[1].x1; + segs[4].y1 = (int) kp->height - segs[0].y1; + segs[4].x2 = segs[1].x2; + segs[4].y2 = (int) kp->height - segs[0].y2; + + segs[5].x1 = segs[0].x1; + segs[5].y1 = (int) kp->height - segs[0].y1; + segs[5].x2 = segs[0].x2; + segs[5].y2 = (int) kp->height - segs[0].y2; + + + oxscaled2y = ((kp->pen[pn].ox * kp->heightby2) / kp->widthby2); + oyscaled2x = ((kp->pen[pn].oy * kp->widthby2) / kp->heightby2); + cxscaled2y = ((kp->pen[pn].cx * kp->heightby2) / kp->widthby2); + cyscaled2x = ((kp->pen[pn].cy * kp->widthby2) / kp->heightby2); + + + segs[7].x1 = (int) oyscaled2x; + segs[7].y1 = (int) oxscaled2y; + segs[7].x2 = (int) cyscaled2x; + segs[7].y2 = (int) cxscaled2y; + + + segs[2].x1 = (int) kp->width - segs[7].x1; + segs[2].y1 = segs[7].y1; + segs[2].x2 = (int) kp->width - segs[7].x2; + segs[2].y2 = segs[7].y2; + + segs[6].x1 = segs[7].x1; + segs[6].y1 = (int) kp->height - segs[7].y1; + segs[6].x2 = segs[7].x2; + segs[6].y2 = (int) kp->height - segs[7].y2; + + segs[3].x1 = (int) kp->width - segs[7].x1; + segs[3].y1 = segs[6].y1; + segs[3].x2 = (int) kp->width - segs[7].x2; + segs[3].y2 = segs[6].y2; + +} + + + +/*- + * + */ +#if 0 +static void +OldOctRotated( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double angle, radius; + double oangle, oradius; + double rv, av; + double perp, para; + int i; + + /* + * I know that the "bounce" is not really accurate, but I like the way + * it looks. + */ + + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + angle = CartToAngle(kp->pen[pn].cx, kp->pen[pn].cy); + radius = CartToRadius(kp->pen[pn].cx, kp->pen[pn].cy); + + oangle = CartToAngle(kp->pen[pn].ox, kp->pen[pn].oy); + oradius = CartToRadius(kp->pen[pn].ox, kp->pen[pn].oy); + + if (radius < 0.0) { + if (kp->pen[pn].xv < 0.0) { + kp->pen[pn].xv = -kp->pen[pn].xv; + } + } else if (radius > kp->radius) { + if (kp->pen[pn].xv > 0.0) { + kp->pen[pn].xv = -kp->pen[pn].xv; + } + } + if (angle < 0.0) { + if (oangle > 0.0) { + kp->pen[pn].yv = -kp->pen[pn].yv; + } + } else if (angle > 45.0) { + if (oangle < 45.0) { + rv = CartToRadius(kp->pen[pn].xv, kp->pen[pn].yv); + av = CartToAngle(kp->pen[pn].xv, kp->pen[pn].yv); + + para = PolarToCartX(rv, av - 45.0); + perp = PolarToCartY(rv, av - 45.0); + + rv = CartToRadius(para, -perp); + av = CartToAngle(para, -perp); + + kp->pen[pn].xv = PolarToCartX(rv, av + 45.0); + kp->pen[pn].yv = PolarToCartY(rv, av + 45.0); + } + } + for (i = 0; i < 8; i += 1) { + segs[i].x1 = (int) (kp->widthby2 + PolarToCartX(oradius, oangle)); + segs[i].y1 = (int) (kp->heightby2 - PolarToCartY(oradius, oangle)); + segs[i].x2 = (int) (kp->widthby2 + PolarToCartX(radius, angle)); + segs[i].y2 = (int) (kp->heightby2 - PolarToCartY(radius, angle)); + + oangle += 45.0; + angle += 45.0; + } +} + +#endif + +/*- + * + */ +static void +OctRotated( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double xdiag; + double ydiag; + double radius, angle; + double oradius, oangle; + double ox, oy, cx, cy; + double offset; + int i; + + /* + * I know that the "bounce" is not really accurate, but I like the way + * it looks. + */ + + xdiag = (kp->widthby2 * kp->pen[pn].oy) / kp->heightby2; + + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + if (kp->pen[pn].cx < xdiag) { + kp->pen[pn].cx = xdiag + (xdiag - kp->pen[pn].cx); + kp->pen[pn].xv = -kp->pen[pn].xv; + } else if (kp->pen[pn].cx >= kp->widthby2) { + kp->pen[pn].cx = (kp->widthby2 - 1.0) + - (kp->pen[pn].cx - kp->widthby2); + kp->pen[pn].xv = -kp->pen[pn].xv; + } + ydiag = (kp->heightby2 * kp->pen[pn].cx) / kp->widthby2; + + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + if (kp->pen[pn].cy < 0.0) { + kp->pen[pn].cy = -kp->pen[pn].cy; + kp->pen[pn].yv = -kp->pen[pn].yv; + } else if (kp->pen[pn].cy > ydiag) { + kp->pen[pn].cy = ydiag - (kp->pen[pn].cy - ydiag); + kp->pen[pn].yv = -kp->pen[pn].yv; + } + offset = CartToRadius(kp->heightby2, kp->widthby2); + ox = (kp->pen[pn].ox * offset) / kp->widthby2; + oy = (kp->pen[pn].oy * offset) / kp->heightby2; + cx = (kp->pen[pn].cx * offset) / kp->widthby2; + cy = (kp->pen[pn].cy * offset) / kp->heightby2; + + angle = CartToAngle(cx - offset, + offset - cy + ) - 90.0; + radius = CartToRadius(cx - offset, + offset - cy + ); + + oangle = CartToAngle(ox - offset, + offset - oy + ) - 90.0; + oradius = CartToRadius(ox - offset, + offset - oy + ); + + + for (i = 0; i < 8; i += 1) { + segs[i].x1 = (int) (kp->widthby2 + PolarToCartX(oradius, oangle)); + segs[i].y1 = (int) (kp->heightby2 - PolarToCartY(oradius, oangle)); + segs[i].x2 = (int) (kp->widthby2 + PolarToCartX(radius, angle)); + segs[i].y2 = (int) (kp->heightby2 - PolarToCartY(radius, angle)); + + oangle += 45.0; + angle += 45.0; + } + +} + +/*- + * + */ +static void +GeneralLinearMoveAndBounce( + kaleidstruct * kp, + int pn, + double *angle, + double *radius, + double *oangle, + double *oradius +) +{ + double rv, av; + double perp, para; + + kp->pen[pn].cx = kp->pen[pn].cx + kp->pen[pn].xv; + kp->pen[pn].cy = kp->pen[pn].cy + kp->pen[pn].yv; + + *angle = CartToAngle(kp->pen[pn].cx, kp->pen[pn].cy); + *radius = CartToRadius(kp->pen[pn].cx, kp->pen[pn].cy); + + *oangle = CartToAngle(kp->pen[pn].ox, kp->pen[pn].oy); + *oradius = CartToRadius(kp->pen[pn].ox, kp->pen[pn].oy); + + if (*radius < 0.0) { + kp->pen[pn].RadiusOut = True; + if (*oradius > 0.0) { + rv = CartToRadius(kp->pen[pn].xv, kp->pen[pn].yv); + av = CartToAngle(kp->pen[pn].xv, kp->pen[pn].yv); + + para = PolarToCartX(rv, av - (*angle + 90.0)); + perp = PolarToCartY(rv, av - (*angle + 90.0)); + + rv = CartToRadius(para, -perp); + av = CartToAngle(para, -perp); + + kp->pen[pn].xv = PolarToCartX(rv, av + (*angle + 90.0)); + kp->pen[pn].yv = PolarToCartY(rv, av + (*angle + 90.0)); + } + } else if (*radius > kp->radius) { + kp->pen[pn].RadiusOut = True; + if (*oradius < kp->radius) { + rv = CartToRadius(kp->pen[pn].xv, kp->pen[pn].yv); + av = CartToAngle(kp->pen[pn].xv, kp->pen[pn].yv); + + para = PolarToCartX(rv, av - (*angle + 90.0)); + perp = PolarToCartY(rv, av - (*angle + 90.0)); + + rv = CartToRadius(para, -perp); + av = CartToAngle(para, -perp); + + kp->pen[pn].xv = PolarToCartX(rv, av + (*angle + 90.0)); + kp->pen[pn].yv = PolarToCartY(rv, av + (*angle + 90.0)); + } + } else { + kp->pen[pn].RadiusOut = False; + } + + + if (*angle < 0.0) { + kp->pen[pn].AngleOut = True; + if (*oangle > 0.0) { + rv = CartToRadius(kp->pen[pn].xv, kp->pen[pn].yv); + av = CartToAngle(kp->pen[pn].xv, kp->pen[pn].yv); + + para = PolarToCartX(rv, av); + perp = PolarToCartY(rv, av); + + rv = CartToRadius(para, -perp); + av = CartToAngle(para, -perp); + + kp->pen[pn].xv = PolarToCartX(rv, av); + kp->pen[pn].yv = PolarToCartY(rv, av); + } + } else if (*angle > kp->slice) { + kp->pen[pn].AngleOut = True; + if (*oangle < kp->slice) { + rv = CartToRadius(kp->pen[pn].xv, kp->pen[pn].yv); + av = CartToAngle(kp->pen[pn].xv, kp->pen[pn].yv); + + para = PolarToCartX(rv, av - kp->slice); + perp = PolarToCartY(rv, av - kp->slice); + + rv = CartToRadius(para, -perp); + av = CartToAngle(para, -perp); + + kp->pen[pn].xv = PolarToCartX(rv, av + kp->slice); + kp->pen[pn].yv = PolarToCartY(rv, av + kp->slice); + } + } else { + kp->pen[pn].AngleOut = False; + } +} + +/*- + * + */ +static void +GeneralLinearRotated( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double angle, radius; + double oangle, oradius; + int i; + + GeneralLinearMoveAndBounce(kp, pn, &angle, &radius, &oangle, &oradius); + + for (i = 0; i < kp->modetype; i += 1) { + segs[i].x1 = (int) (kp->widthby2 + PolarToCartX(oradius, oangle)); + segs[i].y1 = (int) (kp->heightby2 - PolarToCartY(oradius, oangle)); + segs[i].x2 = (int) (kp->widthby2 + PolarToCartX(radius, angle)); + segs[i].y2 = (int) (kp->heightby2 - PolarToCartY(radius, angle)); + + oangle += kp->slice; + angle += kp->slice; + } +} + + + +/*- + * + */ +static void +GeneralLinearMirrored( + kaleidstruct * kp, + int pn, + XSegment * segs +) +{ + double hangle, angle, radius; + double hoangle, oangle, oradius; + int i; + + + GeneralLinearMoveAndBounce(kp, pn, &angle, &radius, &oangle, &oradius); + + hoangle = oangle; + hangle = angle; + + for (i = 0; i < kp->modetype; i += 2) { + segs[i].x1 = (int) (kp->widthby2 + PolarToCartX(oradius, oangle)); + segs[i].y1 = (int) (kp->heightby2 - PolarToCartY(oradius, oangle)); + segs[i].x2 = (int) (kp->widthby2 + PolarToCartX(radius, angle)); + segs[i].y2 = (int) (kp->heightby2 - PolarToCartY(radius, angle)); + + oangle += 2.0 * kp->slice; + angle += 2.0 * kp->slice; + } + + oangle = kp->slice * 2.0; + angle = kp->slice * 2.0; + for (i = 1; i < kp->modetype; i += 2) { + segs[i].x1 = (int) (kp->widthby2 + PolarToCartX(oradius, oangle - hoangle)); + segs[i].y1 = (int) (kp->heightby2 - PolarToCartY(oradius, oangle - hoangle)); + segs[i].x2 = (int) (kp->widthby2 + PolarToCartX(radius, angle - hangle)); + segs[i].y2 = (int) (kp->heightby2 - PolarToCartY(radius, angle - hangle)); + + oangle += 2.0 * kp->slice; + angle += 2.0 * kp->slice; + } +} + +/*- + * + */ +static void +random_velocity(kaleidstruct * kp, int i) +{ + if (kp->modetype > 0) { + kp->pen[i].xv = INTRAND(-MaxRadialVelocity, MaxRadialVelocity); + if (kp->pen[i].xv > 0.0) { + kp->pen[i].xv += MinRadialVelocity; + } else if (kp->pen[i].xv < 0.0) { + kp->pen[i].xv -= MinRadialVelocity; + } + kp->pen[i].yv = INTRAND(-MaxAngularVelocity, MaxAngularVelocity); + if (kp->pen[i].yv > 0.0) { + kp->pen[i].yv += MinAngularVelocity; + } else if (kp->pen[i].yv < 0.0) { + kp->pen[i].yv -= MinAngularVelocity; + } + } else { + kp->pen[i].xv = INTRAND(-MaxVelocity, MaxVelocity); + if (kp->pen[i].xv > 0.0) { + kp->pen[i].xv += MinVelocity; + } else if (kp->pen[i].xv < 0.0) { + kp->pen[i].xv -= MinVelocity; + } + kp->pen[i].yv = INTRAND(-MaxVelocity, MaxVelocity); + if (kp->pen[i].yv > 0.0) { + kp->pen[i].yv += MinVelocity; + } else if (kp->pen[i].yv < 0.0) { + kp->pen[i].yv -= MinVelocity; + } + } +} + + +static void +random_position(kaleidstruct * kp, int i) +{ + + if (kp->modetype >= 0) { + if (kp->linear) { + double radius, angle; + + radius = (double) INTRAND(0, (int) (kp->radius - 1.0)); + angle = (double) INTRAND(0, (int) (kp->slice - 1.0)); + + kp->pen[i].cx = PolarToCartX(radius, angle); + kp->pen[i].cy = PolarToCartY(radius, angle); + } else { + kp->pen[i].cx = (double) INTRAND(0, (int) (kp->radius - 1.0)); + kp->pen[i].cy = (double) INTRAND(0, (int) (kp->slice - 1.0)); + } + } else if (kp->modetype == OCT) { + double radius, angle; + + radius = (double) INTRAND(0, (int) (kp->radius - 1.0)); + angle = (double) INTRAND(0, 44); + + kp->pen[i].cx = PolarToCartX(radius, angle); + kp->pen[i].cy = PolarToCartY(radius, angle); + } else { + kp->pen[i].cx = (double) INTRAND(0, (int) (kp->widthby2 - 1.0)); + kp->pen[i].cy = (double) INTRAND(0, + (int) ((kp->heightby2 * kp->pen[i].cx) / kp->widthby2)); + } +} + + +/*- + * + */ +void +init_kaleid(ModeInfo * mi) +{ + kaleidstruct *kp = &kaleids[MI_SCREEN(mi)]; + int i; + + + if (kaleids == NULL) { + if ((kaleids = (kaleidstruct *) calloc( + MI_NUM_SCREENS(mi), + sizeof (kaleidstruct)) + ) == NULL + ) + return; + } + kp = &kaleids[MI_SCREEN(mi)]; + + kp->PenCount = MI_COUNT(mi); + + if (MI_IS_FULLRANDOM(mi)) { + kp->alternate = (Bool) (LRAND() & 1); + kp->disconnected = (Bool) (LRAND() & 1); + kp->serial = (Bool) (LRAND() & 1); + kp->linear = (Bool) (LRAND() & 1); + } else { + kp->alternate = Alternate; + kp->disconnected = Disconnected; + kp->serial = Serial; + kp->linear = Linear; + } + + if (kp->PenCount < -MINPENS) { + /* if kp->PenCount is random ... the size can change */ + if (kp->pen != NULL) { + (void) free((void *) kp->pen); + kp->pen = NULL; + } + kp->PenCount = NRAND(-kp->PenCount - MINPENS + 1) + MINPENS; + } else if (kp->PenCount < MINPENS) + kp->PenCount = MINPENS; + + if (kp->pen == NULL) + kp->pen = (penstruct *) malloc(kp->PenCount * sizeof (penstruct)); + + if ((MI_SIZE(mi)) > MINSIZE) { + kp->modetype = (!kp->alternate + 1) * MI_SIZE(mi); + } else if ((MI_SIZE(mi)) < -MINSIZE) { + kp->modetype = (!kp->alternate + 1) * (NRAND(-MI_SIZE(mi) + 1) + MINSIZE); + } else { + kp->modetype = (!kp->alternate + 1) * MINSIZE; + } + if (MI_IS_FULLRANDOM(mi)) { + int tmp; + + tmp = NRAND(ABS(MI_SIZE(mi)) + 2); + if (tmp == 0) + kp->modetype = OCT; + else if (tmp == 1) + kp->modetype = QUAD; + } else { + if (Oct) + kp->modetype = OCT; + else if (Quad) + kp->modetype = QUAD; + } + + kp->PercentBlack = (int) MAX(0, MIN(MI_CYCLES(mi), 95)); + + + /* set various size parameters */ + + kp->width = (double) MI_WIDTH(mi); + kp->height = (double) MI_HEIGHT(mi); + + if (kp->width < 2.0) + kp->width = 2.0; + if (kp->height < 2.0) + kp->height = 2.0; + + kp->radius = sqrt(((kp->width * kp->width) + + (kp->height * kp->height) + ) / 4.0 + ); + + + if (kp->modetype >= 0) { + kp->bouncetype = INTRAND(0, 2); + + kp->slice = 360.0 / (double) kp->modetype; + + kp->widthby2 = kp->width / 2.0; + kp->heightby2 = kp->height / 2.0; + } else { + kp->widthby2 = kp->width / 2.0; + kp->heightby2 = kp->height / 2.0; + } + + /* set the maximum pen width */ + if (kp->modetype >= 0) { + if ((kp->slice == 360.0) || (kp->slice == 180.0)) { + kp->maxlwidth = (int) ((((double) MIN(kp->widthby2, kp->heightby2)) * + (double) WidthPercent) / 100.0); + } else { + kp->maxlwidth = (int) (((sin(kp->slice * ToRadians) * + MIN(kp->widthby2, kp->heightby2)) * + (double) WidthPercent) / 100.0); + } + } else { + kp->maxlwidth = (int) ((MIN(kp->widthby2, + kp->heightby2 + ) * (double) WidthPercent + ) / 100.0 + ); + } + + if (kp->maxlwidth <= 0) { + kp->maxlwidth = 1; + } + for (i = 0; i < kp->PenCount; i += 1) { + if (MI_NPIXELS(mi) > 2) { + kp->pen[i].pix = NRAND(MI_NPIXELS(mi)); + kp->pen[i].White = 1; + } else { + kp->pen[i].White = 1; + } + + kp->pen[i].curlwidth = INTRAND(1, kp->maxlwidth); + + kp->pen[i].RadiusOut = False; + kp->pen[i].AngleOut = False; + + random_position(kp, i); + + kp->pen[i].ox = kp->pen[i].cx; + kp->pen[i].oy = kp->pen[i].cy; + kp->pen[i].DeferredChange = False; + + random_velocity(kp, i); + } + MI_CLEARWINDOW(mi); + +} + +/*- + * + */ +static void +set_pen_attributes(ModeInfo * mi, kaleidstruct * kp, int i) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + + if (kp->pen[i].White) { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, kp->pen[i].pix)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + } else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + } + XSetLineAttributes(display, gc, + kp->pen[i].curlwidth, LineSolid, CapRound, JoinRound); +} + +/*- + * + */ +static void +change_pen(ModeInfo * mi, kaleidstruct * kp, int i) +{ + if (INTRAND(0, 100) < kp->PercentBlack) { + kp->pen[i].White = 0; + } else { + kp->pen[i].White = 1; + if (kp->serial) { + if (MI_NPIXELS(mi) > 2) { + if (++kp->pen[i].pix >= MI_NPIXELS(mi)) + kp->pen[i].pix = 0; + } + } else { + if (MI_NPIXELS(mi) > 2) { + kp->pen[i].pix = NRAND(MI_NPIXELS(mi)); + } + } + } + + random_velocity(kp, i); + + kp->pen[i].curlwidth = INTRAND(1, kp->maxlwidth); + + if (kp->modetype >= 0) { + kp->bouncetype = INTRAND(0, 2); + } + if (kp->disconnected) { + random_position(kp, i); + kp->pen[i].ox = kp->pen[i].cx; + kp->pen[i].oy = kp->pen[i].cy; + } +} + +/*- + * + */ +void +draw_kaleid(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + kaleidstruct *kp = &kaleids[MI_SCREEN(mi)]; + XSegment *segs; + int NumberOfSegments = 0; + int i; + + MI_IS_DRAWN(mi) = True; + + if (kp->modetype == QUAD) { + NumberOfSegments = 4; + segs = (XSegment *) malloc(NumberOfSegments * sizeof (XSegment)); + } else if (kp->modetype == OCT) { + NumberOfSegments = 8; + segs = (XSegment *) malloc(NumberOfSegments * sizeof (XSegment)); + } else { /* if (kp->modetype > 0) */ + NumberOfSegments = kp->modetype; + segs = (XSegment *) malloc(NumberOfSegments * sizeof (XSegment)); + } + for (i = 0; i < kp->PenCount; i++) { + set_pen_attributes(mi, kp, i); + + if (kp->modetype == QUAD) { + if (kp->alternate) { + QuadRotated(kp, i, segs); + } else { + QuadMirrored(kp, i, segs); + } + } else if (kp->modetype == OCT) { + if (kp->alternate) { + OctRotated(kp, i, segs); + } else { + OctMirrored(kp, i, segs); + } + } else { + if (kp->alternate) { + if (kp->linear) { + GeneralLinearRotated(kp, i, segs); + } else { + GeneralRotated(kp, i, segs); + } + } else { + if (kp->linear) { + GeneralLinearMirrored(kp, i, segs); + } else { + GeneralMirrored(kp, i, segs); + } + } + } + XDrawSegments( + display, + MI_WINDOW(mi), + gc, + segs, + NumberOfSegments + ); + + kp->pen[i].ox = kp->pen[i].cx; + kp->pen[i].oy = kp->pen[i].cy; + + + if ((INTRAND(0, 100) < ChangeChance) || kp->pen[i].DeferredChange) { + if (!kp->pen[i].AngleOut && !kp->pen[i].RadiusOut) { + kp->pen[i].DeferredChange = False; + change_pen(mi, kp, i); + } else { + kp->pen[i].DeferredChange = True; + } + } + } + + XSetLineAttributes(display, gc, 1, LineSolid, CapRound, JoinRound); + (void) free((void *) segs); +} + +/*- + * + */ +void +release_kaleid(ModeInfo * mi) +{ + if (kaleids != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + kaleidstruct *kp = &kaleids[MI_SCREEN(mi)]; + + if (kp->pen != NULL) + (void) free((void *) kp->pen); + } + (void) free((void *) kaleids); + kaleids = NULL; + } +} + +/*- + * + */ +void +refresh_kaleid(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_kaleid */ diff --git a/modes/kumppa.c b/modes/kumppa.c new file mode 100644 index 00000000..f562bf61 --- /dev/null +++ b/modes/kumppa.c @@ -0,0 +1,742 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* kumppa --- */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)kumppa.c 4.11 98/06/11 xlockmore"; + +#endif + +/*- + Copyright (C) Teemu Suutari (temisu@utu.fi) Feb 1998 + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the X Consortium shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from the X Consortium. + + * Revision History: + * 16-Jul-98: xlockmore version by Jouk Jansen + * Feb 1998 : original xscreensaver version by Teemu Suutari + */ + +/*- + *** This is contest-version. Don't look any further, code is *very* ugly. + */ + + +#include + + +#if 0 +/* commented out since xlockmore does not support (yet) double buffering */ +#ifdef HAVE_XDBE_EXTENSION +#include +#endif /* HAVE_XDBE_EXTENSION */ +#endif + +#ifdef STANDALONE +#define PROGCLASS "kumppa" +#define HACK_INIT init_kumppa +#define HACK_DRAW draw_kumppa +#define kumppa_opts xlockmore_opts +#define DEFAULTS "*delay: 0 \n" \ + "*cycles: 1000 \n" \ + ".background: black\n",\ + "*speed: 0.1",\ +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_kumppa + +#define DEF_COSILINES "True" +#define DEF_SPEED "0.1" + +#if 0 +#ifdef HAVE_XDBE_EXTENSION +#define DEF_USEDOUBLE "False" + +static Bool usedouble; + +#endif /* HAVE_XDBE_EXTENSION */ +#endif + +static Bool cosilines; +static Bool mono_p; +static float speed; + +static XrmOptionDescRec opts[] = +{ + {"-speed", ".kumppa.speed", XrmoptionSepArg, (caddr_t) NULL}, +#if 0 +#ifdef HAVE_XDBE_EXTENSION + {"-dbuf", ".kumppa.dbuf", XrmoptionNoArg, (caddr_t) "on"}, + {"+dbuf", ".kumppa.dbuf", XrmoptionNoArg, (caddr_t) "off"}, +#endif /* HAVE_XDBE_EXTENSION */ +#endif + {"-rrandom", ".kumppa.rrandom", XrmoptionNoArg, (caddr_t) "on"}, + {"+rrandom", ".kumppa.rrandom", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & speed, "speed", "speed", DEF_SPEED, t_Float}, +#if 0 +#ifdef HAVE_XDBE_EXTENSION + {(caddr_t *) & usedouble, "dbuf", "dbuf", DEF_USEDOUBLE, t_Bool}, +#endif /* HAVE_XDBE_EXTENSION */ +#endif + {(caddr_t *) & cosilines, "rrandom", "rrandom", DEF_COSILINES, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-speed num", "Speed"}, +#if 0 +#ifdef HAVE_XDBE_EXTENSION + {"-/+dbuf", "turn on/off double buffering"}, +#endif /* HAVE_XDBE_EXTENSION */ +#endif + {"-/+rrandom", "turn on/off random"} +}; + +ModeSpecOpt kumppa_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct kumppa_description = +{"kumppa", "init_kumppa", "draw_kumppa", "release_kumppa", + "refresh_kumppa", "init_kumppa", NULL, &kumppa_opts, + 10000, 1, 1000, 1, 64, 1.0, "", + "Shows Kumppa", 0, NULL}; + +#endif + +static const unsigned char colors[96] = +{0, 0, 255, 0, 51, 255, 0, 102, 255, 0, 153, 255, 0, 204, 255, + 0, 255, 255, 0, 255, 204, 0, 255, 153, 0, 255, 102, 0, 255, 51, + 0, 255, 0, 51, 255, 0, 102, 255, 0, 153, 255, 0, 204, 255, 0, + 255, 255, 0, 255, 204, 0, 255, 153, 0, 255, 102, 0, 255, 51, 0, + 255, 0, 0, 255, 0, 51, 255, 0, 102, 255, 0, 153, 255, 0, 204, + 255, 0, 255, 219, 0, 255, 182, 0, 255, 146, 0, 255, 109, 0, 255, + 73, 0, 255, 37, 0, 255}; + +static const float cosinus[8][6] = +{ + {-0.07, 0.12, -0.06, 32, 25, 37}, + {0.08, -0.03, 0.05, 51, 46, 32}, + {0.12, 0.07, -0.13, 27, 45, 36}, + {0.05, -0.04, -0.07, 36, 27, 39}, + {-0.02, -0.07, 0.1, 21, 43, 42}, + {-0.11, 0.06, 0.02, 51, 25, 34}, + {0.04, -0.15, 0.02, 42, 32, 25}, + {-0.02, -0.04, -0.13, 34, 20, 15}}; + +static const float acosinus[24] = +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +static const int ocoords[8] = +{0, 0, 0, 0, 0, 0, 0, 0}; + +typedef struct { + Colormap cmap; + float *acosinus; + unsigned long blackpixel, whitepixel, fg, bg; + int coords[8]; + int ocoords[8]; + + GC fgc[33]; + GC cgc; + int sizx, sizy; + int midx, midy; + + int *Xrotations; + int *Yrotations; + int *Xrottable; + int *Yrottable; + + int *rotateX; + int *rotateY; + + int rotsizeX, rotsizeY; + int stateX, stateY; + int dir, time; + int rx, ry; + int c; + long c1; + Bool cosilines; +} kumppastruct; + +static kumppastruct *kumppas = NULL; + + + +static int +Satnum(int maxi) +{ + return (int) (maxi * ((double) NRAND(2500) / 2500.0)); +} + + +static void +palaRotate(ModeInfo * mi, int x, int y) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int ax, ay, bx, by, cx, cy; + kumppastruct *s = &kumppas[MI_SCREEN(mi)]; + + ax = s->rotateX[x]; + ay = s->rotateY[y]; + bx = s->rotateX[x + 1] + 2; + by = s->rotateY[y + 1] + 2; + cx = s->rotateX[x] + (x - s->rx) - s->dir * (y - s->ry); + cy = s->rotateY[y] + s->dir * (x - s->rx) + (y - s->ry); + if (cx < 0) { + ax -= cx; + cx = 0; + } + if (cy < 0) { + ay -= cy; + cy = 0; + } + if (cx + bx - ax > s->sizx) + bx = ax - cx + s->sizx; + if (cy + by - ay > s->sizy) + by = ay - cy + s->sizy; + if (ax < bx && ay < by) { + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XCopyArea(display, window, window, s->cgc, ax, ay, bx - ax, by - ay, cx, cy); + } else { + XCopyArea(display, window, window, MI_GC(mi), ax, ay, bx - ax, by - ay, cx, cy); + } + } +} + + +static void +rotate(ModeInfo * mi) +{ + int x, y; + int dx, dy; + kumppastruct *s = &kumppas[MI_SCREEN(mi)]; + + s->rx = s->Xrottable[s->stateX + 1] - s->Xrottable[s->stateX]; + s->ry = s->Yrottable[s->stateX + 1] - s->Yrottable[s->stateY]; + + + for (x = 0; x <= s->rx; x++) + s->rotateX[x] = (x) ? s->midx - 1 - s->Xrotations[s->Xrottable[s->stateX + 1] - x] : 0; + for (x = 0; x <= s->rx; x++) + s->rotateX[x + s->rx + 1] = (x == s->rx) ? s->sizx - 1 : s->midx + s->Xrotations[s->Xrottable[s->stateX] + x]; + for (y = 0; y <= s->ry; y++) + s->rotateY[y] = (y) ? s->midy - 1 - s->Yrotations[s->Yrottable[s->stateY + 1] - y] : 0; + for (y = 0; y <= s->ry; y++) + s->rotateY[y + s->ry + 1] = (y == s->ry) ? s->sizy - 1 : s->midy + s->Yrotations[s->Yrottable[s->stateY] + y]; + + x = (s->rx > s->ry) ? s->rx : s->ry; + for (dy = 0; dy < (x + 1) << 1; dy++) + for (dx = 0; dx < (x + 1) << 1; dx++) { + y = (s->rx > s->ry) ? s->ry - s->rx : 0; + if (dy + y >= 0 && dy < (s->ry + 1) << 1 && dx < (s->rx + 1) << 1) + if (dy + y + dx <= s->ry + s->rx && dy + y - dx <= s->ry - s->rx) { + palaRotate(mi, (s->rx << 1) + 1 - dx, dy + y); + palaRotate(mi, dx, (s->ry << 1) + 1 - dy - y); + } + y = (s->ry > s->rx) ? s->rx - s->ry : 0; + if (dy + y >= 0 && dx < (s->ry + 1) << 1 && dy < (s->rx + 1) << 1) + if (dy + y + dx <= s->ry + s->rx && dx - dy - y >= s->ry - s->rx) { + palaRotate(mi, dy + y, dx); + palaRotate(mi, (s->rx << 1) + 1 - dy - y, (s->ry << 1) + 1 - dx); + } + } + s->stateX++; + if (s->stateX == s->rotsizeX) + s->stateX = 0; + s->stateY++; + if (s->stateY == s->rotsizeY) + s->stateY = 0; +} + + + +static void +make_rots(ModeInfo * mi, double xspeed, double yspeed) +{ + int a, b, c, f, g, j, k = 0, l; + double m, om, ok; + double d, ix, iy; + int maxi; + kumppastruct *s = &kumppas[MI_SCREEN(mi)]; + + Bool *chks; + + s->rotsizeX = (int) (2 / xspeed + 1); + ix = (double) (s->midx + 1) / (double) (s->rotsizeX); + s->rotsizeY = (int) (2 / yspeed + 1); + iy = (double) (s->midy + 1) / (double) (s->rotsizeY); + + if (s->Xrotations) + (void) free((void *) s->Xrotations); + if (s->Yrotations) + (void) free((void *) s->Yrotations); + + s->Xrotations = (int *) calloc((s->midx + 2), sizeof (int)); + s->Yrotations = (int *) calloc((s->midy + 2), sizeof (int)); + + if (s->Xrottable) + (void) free((void *) s->Xrottable); + if (s->Yrottable) + (void) free((void *) s->Yrottable); + s->Xrottable = (int *) malloc((s->rotsizeX + 1) * sizeof (int)); + s->Yrottable = (int *) malloc((s->rotsizeY + 1) * sizeof (int)); + + chks = (Bool *) malloc(((s->midx > s->midy) ? s->midx : s->midy) * sizeof (Bool)); + + + maxi = 0; + c = 0; + d = 0; + g = 0; + for (a = 0; a < s->midx; a++) + chks[a] = True; + for (a = 0; a < s->rotsizeX; a++) { + s->Xrottable[a] = c; + f = (int) (d + ix) - g; /*viivojen lkm. */ + g += f; + if (g > s->midx) { + f -= g - s->midx; + g = s->midx; + } + for (b = 0; b < f; b++) { + m = 0; + for (j = 0; j < s->midx; j++) { /*testi */ + if (chks[j]) { + om = 0; + ok = 1; + l = 0; + while (j + l < s->midx && om + 12 * ok > m) { + if (j - l >= 0) { + if (chks[j - l]) + om += ok; + } else if (chks[l - j]) + om += ok; + if (chks[j + l]) + om += ok; + ok /= 1.5; + l++; + } + if (om >= m) { + k = j; + m = om; + } + } + } + chks[k] = False; + l = c; + while (l >= s->Xrottable[a]) { + if (l != s->Xrottable[a]) + s->Xrotations[l] = s->Xrotations[l - 1]; + if (k > s->Xrotations[l] || l == s->Xrottable[a]) { + s->Xrotations[l] = k; + c++; + l = s->Xrottable[a]; + } + l--; + } + } + d += ix; + if (maxi < c - s->Xrottable[a]) + maxi = c - s->Xrottable[a]; + } + s->Xrottable[a] = c; + if (s->rotateX) + (void) free((void *) s->rotateX); + s->rotateX = (int *) calloc((maxi + 2) << 1, sizeof (int)); + + maxi = 0; + c = 0; + d = 0; + g = 0; + for (a = 0; a < s->midy; a++) + chks[a] = True; + for (a = 0; a < s->rotsizeY; a++) { + s->Yrottable[a] = c; + f = (int) (d + iy) - g; /*viivojen lkm. */ + g += f; + if (g > s->midy) { + f -= g - s->midy; + g = s->midy; + } + for (b = 0; b < f; b++) { + m = 0; + for (j = 0; j < s->midy; j++) { /*testi */ + if (chks[j]) { + om = 0; + ok = 1; + l = 0; + while (j + l < s->midy && om + 12 * ok > m) { + if (j - l >= 0) { + if (chks[j - l]) + om += ok; + } else if (chks[l - j]) + om += ok; + if (chks[j + l]) + om += ok; + ok /= 1.5; + l++; + } + if (om >= m) { + k = j; + m = om; + } + } + } + chks[k] = False; + l = c; + while (l >= s->Yrottable[a]) { + if (l != s->Yrottable[a]) + s->Yrotations[l] = s->Yrotations[l - 1]; + if (k > s->Yrotations[l] || l == s->Yrottable[a]) { + s->Yrotations[l] = k; + c++; + l = s->Yrottable[a]; + } + l--; + } + + } + d += iy; + if (maxi < c - s->Yrottable[a]) + maxi = c - s->Yrottable[a]; + } + s->Yrottable[a] = c; + if (s->rotateY) + (void) free((void *) s->rotateY); + s->rotateY = (int *) calloc((maxi + 2) << 1, sizeof (int)); + + (void) free((void *) chks); +} + + +void +init_kumppa(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + XGCValues xgcv; + int n, i; + double rspeed; + kumppastruct *s; + + if (kumppas == NULL) { + if ((kumppas = (kumppastruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (kumppastruct))) == NULL) + return; + } + s = &kumppas[MI_SCREEN(mi)]; + + if (!s->acosinus) { + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XColor color; + +#ifndef STANDALONE + extern char *background; + extern char *foreground; + + s->fg = MI_FG_PIXEL(mi); + s->bg = MI_BG_PIXEL(mi); +#endif + s->blackpixel = MI_BLACK_PIXEL(mi); + s->whitepixel = MI_WHITE_PIXEL(mi); + s->cmap = XCreateColormap(display, window, MI_VISUAL(mi), AllocNone); + + XSetWindowColormap(display, window, s->cmap); + (void) XParseColor(display, s->cmap, "black", &color); + (void) XAllocColor(display, s->cmap, &color); + MI_BLACK_PIXEL(mi) = color.pixel; + (void) XParseColor(display, s->cmap, "white", &color); + (void) XAllocColor(display, s->cmap, &color); + MI_WHITE_PIXEL(mi) = color.pixel; +#ifndef STANDALONE + (void) XParseColor(display, s->cmap, background, &color); + (void) XAllocColor(display, s->cmap, &color); + MI_BG_PIXEL(mi) = color.pixel; + (void) XParseColor(display, s->cmap, foreground, &color); + (void) XAllocColor(display, s->cmap, &color); + MI_FG_PIXEL(mi) = color.pixel; +#endif + + xgcv.function = GXcopy; + xgcv.foreground = MI_BLACK_PIXEL(mi); + s->fgc[32] = XCreateGC(display, window, GCForeground | GCFunction, &xgcv); + + n = 0; + if (mono_p) { + s->fgc[0] = s->fgc[32]; + xgcv.foreground = MI_BLACK_PIXEL(mi); + s->fgc[1] = XCreateGC(display, window, GCForeground | GCFunction, &xgcv); + for (i = 0; i < 32; i += 2) + s->fgc[i] = s->fgc[0]; + for (i = 1; i < 32; i += 2) + s->fgc[i] = s->fgc[1]; + } else + for (i = 0; i < 32; i++) { + color.red = colors[n++] * 256; + color.green = colors[n++] * 256; + color.blue = colors[n++] * 256; + color.flags = DoRed | DoGreen | DoBlue; + (void) XAllocColor(display, s->cmap, &color); + xgcv.foreground = color.pixel; + s->fgc[i] = XCreateGC(display, window, GCForeground | GCFunction, &xgcv); + } + xgcv.foreground = MI_BLACK_PIXEL(mi); + xgcv.function = GXcopy; + s->cgc = XCreateGC(display, window, GCForeground | GCFunction, &xgcv); + } + s->acosinus = (float *) malloc(24 * sizeof (float)); + (void) memcpy(s->acosinus, acosinus, 24 * sizeof (float)); + (void) memcpy(s->ocoords, ocoords, 8 * sizeof (int)); + } + if (MI_NCOLORS(mi) <= 2) + mono_p = True; + else + mono_p = False; + + if (MI_IS_FULLRANDOM(mi)) { + if (NRAND(2) == 1) + s->cosilines = False; + else + s->cosilines = True; + } else { + s->cosilines = cosilines; + } + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XInstallColormap(display, s->cmap); + XSetGraphicsExposures(display, s->cgc, False); + } else { + XSetGraphicsExposures(display, MI_GC(mi), False); + s->c1 = NRAND(MI_NPIXELS(mi)); + } + s->time = MI_CYCLES(mi) + NRAND(MI_CYCLES(mi)); + +#if 0 +#ifdef HAVE_XDBE_EXTENSION + if (get_string_resource("dbuf", "String") != NULL && get_string_resource("dbuf", "String")[0] != 0) + usedouble = True; + if (usedouble) { + XdbeQueryExtension(display, &n, &i); + if (n == 0 && i == 0) { + (void) fprintf(stderr, "Double buffer extension not supported!\n"); + usedouble = False; + } + } + if (usedouble) + win[1] = XdbeAllocateBackBufferName(display, win[0], XdbeUndefined); +#endif /* HAVE_XDBE_EXTENSION */ +#endif + + rspeed = (double) speed; + if (rspeed < 0.0001 || rspeed > 0.2) { + (void) fprintf(stderr, + "Speed not in valid range! (0.0001 - 0.2), using 0.1 \n"); + rspeed = 0.1; + } + s->sizx = MI_WIDTH(mi); + s->sizy = MI_HEIGHT(mi); + s->midx = s->sizx >> 1; + s->midy = s->sizy >> 1; + s->stateX = 0; + s->stateY = 0; + s->c = 0; + s->dir = (LRAND() & 1) ? -1 : 1; + MI_CLEARWINDOW(mi); + + make_rots(mi, rspeed, rspeed); +} + + +void +draw_kumppa(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc; + kumppastruct *s = &kumppas[MI_SCREEN(mi)]; + +#if 0 +#ifdef HAVE_XDBE_EXTENSION + XdbeSwapInfo xdswp; + +#endif /* HAVE_XDBE_EXTENSION */ +#endif + int a, b, e; + float f; + + MI_IS_DRAWN(mi) = True; + + +#if 0 +#ifdef HAVE_XDBE_EXTENSION + if (usedouble) { + xdswp.swap_action = XdbeUndefined; + xdswp.swap_window = win[0]; + } else +#endif /* HAVE_XDBE_EXTENSION */ + win[1] = win[0]; +#endif + + if (s->cosilines) { + s->c++; + for (a = 0; a < 8; a++) { + f = 0; + for (b = 0; b < 3; b++) { + s->acosinus[a * 3 + b] += cosinus[a][b]; + f += cosinus[a][b + 3] * + sin((double) s->acosinus[a * 3 + b]); + } + s->coords[a] = (int) f; + } + for (a = 0; a < 4; a++) { + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + gc = (mono_p) ? s->fgc[1] : s->fgc[((a << 2) + s->c) & 31]; + } else { + gc = MI_GC(mi); + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_PIXEL(mi, ((((a << 2) + s->c) & 31) * MI_NPIXELS(mi) / 32) % MI_NPIXELS(mi))); + } + XDrawLine(display, window, gc, + s->midx + s->ocoords[a << 1], s->midy + s->ocoords[(a << 1) + 1], + s->midx + s->coords[a << 1], s->midy + s->coords[(a << 1) + 1]); + s->ocoords[a << 1] = s->coords[a << 1]; + s->ocoords[(a << 1) + 1] = s->coords[(a << 1) + 1]; + } + + } else { + for (e = 0; e < 8; e++) { + a = Satnum(50); + if (a >= 32) + a = 32; + b = Satnum(32) - 16 + s->midx; + s->c = Satnum(32) - 16 + s->midy; + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + gc = s->fgc[a]; + } else { + gc = MI_GC(mi); + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, (a * MI_NPIXELS(mi) / 32) % MI_NPIXELS(mi))); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + } + XFillRectangle(display, window, gc, b, s->c, 2, 2); + } + } + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + gc = s->fgc[32]; + } else { + gc = MI_GC(mi); + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, s->c1)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + } + XFillRectangle(display, window, gc, s->midx - 2, s->midy - 2, 4, 4); + rotate(mi); +#if 0 +#ifdef HAVE_XDBE_EXTENSION + if (usedouble) + XdbeSwapBuffers(display, &xdswp, 1); +#endif /* HAVE_XDBE_EXTENSION */ +#endif + if (--s->time <= 0) { + s->time = MI_CYCLES(mi) + NRAND(MI_CYCLES(mi)); + s->dir = s->dir * (-1); + } +} + + +void +refresh_kumppa(ModeInfo * mi) +{ + init_kumppa(mi); +} + +void +release_kumppa(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + + if (kumppas != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + kumppastruct *s = &kumppas[screen]; + + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + MI_WHITE_PIXEL(mi) = s->whitepixel; + MI_BLACK_PIXEL(mi) = s->blackpixel; +#ifndef STANDALONE + MI_FG_PIXEL(mi) = s->fg; + MI_BG_PIXEL(mi) = s->bg; +#endif + if (s->fgc[32]) + XFreeGC(display, s->fgc[32]); + if (mono_p) { + if (s->fgc[1]) + XFreeGC(display, s->fgc[1]); + } else { + int i; + + for (i = 0; i < 32; i++) { + if (s->fgc[i]) + XFreeGC(display, s->fgc[i]); + } + } + if (s->cgc) + XFreeGC(display, s->cgc); + if (s->cmap) + XFreeColormap(display, s->cmap); + } + if (s->acosinus) + (void) free((void *) s->acosinus); + if (s->Xrotations) + (void) free((void *) s->Xrotations); + if (s->Yrotations) + (void) free((void *) s->Yrotations); + if (s->Xrottable) + (void) free((void *) s->Xrottable); + if (s->Yrottable) + (void) free((void *) s->Yrottable); + if (s->rotateX) + (void) free((void *) s->rotateX); + if (s->rotateY) + (void) free((void *) s->rotateY); + } + (void) free((void *) kumppas); + kumppas = NULL; + } +} + +#endif /* MODE_kumppa */ diff --git a/modes/laser.c b/modes/laser.c new file mode 100644 index 00000000..12d7a887 --- /dev/null +++ b/modes/laser.c @@ -0,0 +1,340 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* laser --- spinning lasers */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)laser.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 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. + * + * 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 "Laser" +#define HACK_INIT init_laser +#define HACK_DRAW draw_laser +#define laser_opts xlockmore_opts +#define DEFAULTS "*delay: 20000 \n" \ + "*count: -10 \n" \ + "*cycles: 200 \n" \ + "*ncolors: 200 \n" +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_laser + +ModeSpecOpt laser_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct laser_description = +{"laser", "init_laser", "draw_laser", "release_laser", + "refresh_laser", "init_laser", NULL, &laser_opts, + 20000, -10, 200, 1, 64, 1.0, "", + "Shows spinning lasers", 0, NULL}; + +#endif + +#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) (int) ((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_WIDTH(mi); + lp->height = MI_HEIGHT(mi); + lp->time = 0; + + lp->ln = MI_COUNT(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_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + lp->gcv_black.foreground = MI_BLACK_PIXEL(mi); + lp->stippledGC = XCreateGC(MI_DISPLAY(mi), MI_WINDOW(mi), + GCForeground | GCBackground, &gcv); + } + MI_CLEARWINDOW(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 = (int) (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_WHITE_PIXEL(mi); + } +} + +static void +draw_laser_once(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + lasersstruct *lp = &lasers[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + 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) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_laser */ diff --git a/modes/life.c b/modes/life.c new file mode 100644 index 00000000..b8062871 --- /dev/null +++ b/modes/life.c @@ -0,0 +1,2860 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* life --- Conway's game of Life */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)life.c 4.07 98/01/18 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * Copyright (c) 1997 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 08-Dec-97: Paul Callahan's B2a/S2b34 rule added. Described on the news + * site for cellular-automata. + * http://www.cs.jhu.edu/~callahan/lifepage.html + * http://www.cs.jhu.edu/~callahan/hexrule.txt + * B2a/S2b34: Birth of x if 2a, + * Survival of x if 2b, 3, or 4 neighbors + * Assume symmetry. + * (2a, 2b, 2c: 2o, 2m, 2p original notation) + * O O O . O . + * 2a: . x . 2b: . x O 2c: . x . + * . . . . . O + * Also Bob Andreen's rule (my own notation for consistency) + * B2a3a4b/S2a2b4a (original notation: 234'B/22'4S) + * + * O O O O O . + * 3a: . x O 3b: . x . 3c: . x O + * . . . O O . + * + * O O O O O O + * 4a: . x O 4b: . x O 4c: . x . + * . O O . O O + * Some other rules + * B2a3b3c5/S12b2c3a4b4c6 + * B23a3c4b4c6/S12b2c3c4a56 + * B2a2c6/S13b + * 27-Oct-97: xpm and ras capability added. + * 04-Jun-97: Removed old algorithm, now use wator's. I could not + * understand it and had trouble adding more features. + * New algorithm is more efficient iff there lots of blank areas + * 10-May-97: Compatible with xscreensaver + * 07-May-97: life neighbor option. Still have to fix -neighbor 3 + * 07-Jan-95: life now has a random soup pattern. + * 07-Dec-94: life now has new organisms. They are now better centered. + * Some of the nonperiodic forms were removed. New life forms + * were taken from xlife (an AMAZING collection of life forms). + * life's gliders now come from the edge of the screen except + * when generated by a life form. + * 23-Nov-94: Bug fix for different iconified window sizes + * 21-Jul-94: Took out bzero & bcopy since memset & memcpy is more portable + * 10-Jun-94: Changed name of function 'kill', which is a libc function on + * many systems from Victor Langeveld + * Changes in original xlock + * 24-May-91: Added wraparound code from johnson@bugs.comm.mot.com. + * Made old cells stay blue. + * Made batchcount control the number of generations until restart. + * 29-Jul-90: support for multiple screens. + * 07-Feb-90: remove bogus semi-colon after #include line. + * 15-Dec-89: Fix for proper skipping of {White,Black}Pixel() in colors. + * 08-Oct-89: Moved seconds() to an extern. + * 20-Sep-89: Written, life algorithm courtesy of Jim Graham + */ + +/*- + Grid Number of Neigbors + ---- ------------------ + Square 4 or 8 + Hexagon 6 + Triangle 3, 9, or 12 + + Conway's Life: -neighbors 8 -rule S23/B3 + Other things to try: + -neighbors 4 -rule S234/B2 + -neighbors 6 -rule S23/B3 + -neighbors 3 -rule S12/B23 + -neighbors 6 -rule S2b34/B2a + -neighbors 6 -rule S2a2b4a/B2b3a4b +*/ + +#ifdef STANDALONE +#define PROGCLASS "Life" +#define HACK_INIT init_life +#define HACK_DRAW draw_life +#define life_opts xlockmore_opts +#define DEFAULTS "*delay: 750000 \n" \ + "*count: 40 \n" \ + "*cycles: 140 \n" \ + "*size: 0 \n" \ + "*ncolors: 200 \n" \ + "*bitmap: \n" \ + "*neighbors: 0 \n" \ + "*verbose: False \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ +#include "iostuff.h" +#include "automata.h" + +#ifdef MODE_life + +/*- + * neighbors of 0 does not randomize. All inappropriate + * modes will be set at 8. 3, 6, 9, & 12 also available. + */ +extern int neighbors; + +#if 1 +#define DEF_RULE "G" /* All rules with known gliders */ +#else +#define DEF_RULE "P" /* All rules with known patterns */ +#define DEF_RULE "S23/B3" /* "B3/S23" */ +#define DEF_RULE "S2b34/B2a" /* CALLAHAN */ +#define DEF_RULE "S2a2b4a/B2b3a4b" /* ANDREEN */ +#endif + +#define DEF_CALLAHAN "FALSE" +#define DEF_ANDREEN "FALSE" + +static char *rule; +static char *lifefile; + +static Bool callahan; +static Bool andreen; +static XrmOptionDescRec opts[] = +{ + {"-rule", ".life.rule", XrmoptionSepArg, (caddr_t) NULL}, + {"-lifefile", ".life.lifefile", XrmoptionSepArg, (caddr_t) NULL}, + {"-callahan", ".life.callahan", XrmoptionNoArg, (caddr_t) "on"}, + {"+callahan", ".life.callahan", XrmoptionNoArg, (caddr_t) "off"}, + {"-andreen", ".life.andreen", XrmoptionNoArg, (caddr_t) "on"}, + {"+andreen", ".life.andreen", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & rule, "rule", "Rule", DEF_RULE, t_String}, + {(caddr_t *) & lifefile, "lifefile", "LifeFile", "", t_String}, + {(caddr_t *) & callahan, "callahan", "Callahan", DEF_CALLAHAN, t_Bool}, + {(caddr_t *) & andreen, "andreen", "Andreen", DEF_ANDREEN, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-rule string", "S/B parameters "}, + {"-lifefile file", "life file"}, + {"-/+callahan", "turn on/off Callahan's hex rule B2a/S2b34"}, + {"-/+andreen", "turn on/off Andreen's hex rule B2a3a4b/S2a2m4a"} +}; + +ModeSpecOpt life_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct life_description = +{"life", "init_life", "draw_life", "release_life", + "refresh_life", "change_life", NULL, &life_opts, + 750000, 40, 140, 0, 64, 1.0, "", + "Shows Conway's game of Life", 0, NULL}; + +#endif + +/* aliases for vars defined in the bitmap file */ +#define CELL_WIDTH image_width +#define CELL_HEIGHT image_height +#define CELL_BITS image_bits + +#include "life.xbm" + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +static char *image_name[] = +{""}; + +#define CELL_NAME image_name +#define DEFAULT_XPM 0 +#endif + +static int local_neighbors = 0; +static int neighbor_kind = 0; + +#define REDRAWSTEP 2000 /* How many cells to draw per cycle */ +#define MINGRIDSIZE 20 +#define MINSIZE 4 +#define MAXNEIGHBORS 12 +#define MAXGROUPS 3 /* Eventually this may be MAXNEIGHBORS - 3 */ +#define FIRSTGROUP 2 /* Need at least 2 to make a group */ +#define MAXCOUNTNEIGHBORS 9 /* This restriction is because of base 10 */ +#define NEIGHBORKINDS 6 +#define DEAD 0 +#define LIVE 1 +#define STATES 2 + +typedef struct { + long position; + unsigned short age; + unsigned char state; + unsigned char toggle; +} cellstruct; + +/* Singly linked list */ +typedef struct _CellList { + cellstruct info; + struct _CellList *previous, *next; +} CellList; + +typedef struct { + int survival, birth; + int survival_group[MAXGROUPS]; + int birth_group[MAXGROUPS]; +} paramstruct; + +typedef struct { + Bool painted; + paramstruct param; + int pattern, patterned_rule; + int pixelmode; + int generation; + int xs, ys, xb, yb; /* cell size, grid border */ + int nrows, ncols, npositions; + int width, height; + int state; + int redrawing, redrawpos; + int ncells[STATES]; + CellList *last[STATES], *first[STATES]; + CellList **arr; + union { + XPoint hexagon[6]; + XPoint triangle[2][3]; + } shape; + XImage *logo; + Colormap cmap; + unsigned long black; + int graphics_format; + GC backGC; +} lifestruct; + +static lifestruct *lifes = NULL; + +static paramstruct input_param; +static Bool allPatterns = False, allGliders = False; +static char *filePattern = NULL; + +static char plots[NEIGHBORKINDS] = +{ + 3, 4, 6, 8, 9, 12 /* Neighborhoods */ +}; + +static char maxgroups[NEIGHBORKINDS] = +{0, 0, 3, 0, 0, 0}; +static char groupnumber[NEIGHBORKINDS][MAXGROUPS] = +{ + {0, 0, 0}, /* Triangular */ + {0, 0, 0}, /* Future improvement */ + {3, 3, 3}, /* Hexagonal */ + {0, 0, 0}, /* Maxgroup will expand... */ + {0, 0, 0}, /* Future improvement */ + {0, 0, 0} /* Future improvement */ +}; + +static char style6[64] = +{0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 0, 0, + 0, 1, 2, 1, 1, 2, 1, 1, 0, 1, 1, 2, 0, 1, 0, 0, + 0, 0, 1, 0, 2, 1, 1, 0, 1, 1, 2, 1, 1, 2, 1, 0, + 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0}; + + +#define NUMPTS 64 +#define NUMFILEPTS (2*NUMPTS) + +/*- + * Patterns have < NUMPTS pts (and should have a size of <= 32x32, + * the Glider Gun is an exception) + */ +static char patterns_8S23B3[][2 * NUMPTS + 1] = +{ + { /* GLIDER GUN */ + 6, -4, + 5, -3, 6, -3, + -6, -2, -5, -2, 8, -2, 9, -2, 16, -2, + -7, -1, 8, -1, 9, -1, 10, -1, 16, -1, 17, -1, + -18, 0, -17, 0, -8, 0, 8, 0, 9, 1, + -17, 1, -8, 1, 5, 1, 6, 1, + -8, 2, 6, 2, + -7, 3, + -6, 4, -5, 4, + 127 + }, + { /* SHOWER TUB (PART OF OSCILATORS) */ + -3, -6, -2, -6, 2, -6, 3, -6, + -4, -5, -2, -5, 2, -5, 4, -5, + -4, -4, 4, -4, + -7, -3, -6, -3, -4, -3, -3, -3, 3, -3, 4, -3, 6, -3, 7, -3, + -7, -2, -6, -2, -4, -2, 0, -2, 4, -2, 6, -2, 7, -2, + -4, -1, -2, -1, 2, -1, 4, -1, + -4, 0, -2, 0, 2, 0, 4, 0, + -5, 1, -4, 1, -2, 1, 2, 1, 4, 1, 5, 1, + -4, 2, -1, 2, 0, 2, 1, 2, 4, 2, + -4, 3, 4, 3, 6, 3, + -3, 4, -2, 4, -1, 4, 5, 4, 6, 4, + -1, 5, + 127 + }, + { /* P4 LARGE TOASTER */ + -5, -3, -4, -3, -2, -3, 2, -3, 4, -3, 5, -3, + -5, -2, 5, -2, + -4, -1, -3, -1, 3, -1, 4, -1, + -7, 0, -6, 0, -5, 0, -2, 0, -1, 0, 0, 0, 1, 0, 2, 0, 5, 0, 6, 0, 7, 0, + -7, 1, -4, 1, 4, 1, 7, 1, + -6, 2, -5, 2, 5, 2, 6, 2, + 127 + }, + { /* STARGATE REPEATER P3 */ + 0, -6, + -1, -5, 1, -5, + -2, -4, 0, -4, 2, -4, + -2, -3, 2, -3, + -4, -2, -3, -2, 0, -2, 3, -2, 4, -2, + -5, -1, 0, -1, 5, -1, + -6, 0, -4, 0, -2, 0, -1, 0, 1, 0, 2, 0, 4, 0, 6, 0, + -5, 1, 0, 1, 5, 1, + -4, 2, -3, 2, 0, 2, 3, 2, 4, 2, + -2, 3, 2, 3, + -2, 4, 0, 4, 2, 4, + -1, 5, 1, 5, + 0, 6, + 127 + }, + { /* OSCILLATOR 7 (P8) */ + -4, -2, -3, -2, -2, -2, -1, -2, 4, -2, 5, -2, 6, -2, 7, -2, + -9, -1, -8, -1, 0, -1, 8, -1, + -9, 0, -8, 0, -5, 0, -4, 0, 0, 0, 3, 0, 4, 0, 8, 0, + -5, 1, -4, 1, -1, 1, 3, 1, 4, 1, 7, 1, + 127 + }, + { /* P144 */ + -14, -9, -13, -9, 12, -9, 13, -9, + -14, -8, -13, -8, 12, -8, 13, -8, + 4, -7, 5, -7, + 3, -6, 6, -6, + 4, -5, 5, -5, + -1, -3, 0, -3, 1, -3, + -1, -2, 1, -2, + -1, -1, 0, -1, 1, -1, + -1, 0, 0, 0, + -2, 1, -1, 1, 0, 1, + -2, 2, 0, 2, + -2, 3, -1, 3, 0, 3, + -6, 5, -5, 5, + -7, 6, -4, 6, + -6, 7, -5, 7, + -14, 8, -13, 8, 12, 8, 13, 8, + -14, 9, -13, 9, 12, 9, 13, 9, + 127 + }, + { /* FIGURE EIGHT */ + -3, -3, -2, -3, -1, -3, + -3, -2, -2, -2, -1, -2, + -3, -1, -2, -1, -1, -1, + 0, 0, 1, 0, 2, 0, + 0, 1, 1, 1, 2, 1, + 0, 2, 1, 2, 2, 2, + 127 + }, + { /* PULSAR 18-22-20 */ + 0, -4, 1, -4, 2, -4, + -1, -2, 4, -2, + -2, -1, 0, -1, 4, -1, + -4, 0, -3, 0, -2, 0, 1, 0, 4, 0, + 2, 1, + 0, 2, 1, 2, + 0, 3, + 0, 4, + 127 + }, + { /* PULSAR 48-56-72 */ + -2, -1, -1, -1, 0, -1, 1, -1, 2, -1, + -2, 0, 2, 0, + 127 + }, + { /* BARBER POLE P2 */ + -6, -6, -5, -6, + -6, -5, -4, -5, + -4, -3, -2, -3, + -2, -1, 0, -1, + 0, 1, 2, 1, + 2, 3, 4, 3, + 5, 4, + 4, 5, 5, 5, + 127 + }, + { /* ACHIM P5 */ + -6, -6, -5, -6, + -6, -5, + -4, -4, + -4, -3, -2, -3, + -2, -1, 0, -1, + 0, 1, 2, 1, + 2, 3, 3, 3, + 5, 4, + 4, 5, 5, 5, + 127 + }, + { /* HERTZ P4 */ + -2, -5, -1, -5, + -2, -4, -1, -4, + -7, -2, -6, -2, -2, -2, -1, -2, 0, -2, 1, -2, 5, -2, 6, -2, + -7, -1, -5, -1, -3, -1, 2, -1, 4, -1, 6, -1, + -5, 0, -3, 0, -2, 0, 2, 0, 4, 0, + -6, 1, -5, 1, -3, 1, 2, 1, 4, 1, 5, 1, + -2, 2, -1, 2, 0, 2, 1, 2, + -2, 4, -1, 4, + -2, 5, -1, 5, + 127 + }, + { /* PUMP (TUMBLER, P14) */ + -2, -3, -1, -3, 1, -3, 2, -3, + -2, -2, -1, -2, 1, -2, 2, -2, + -1, -1, 1, -1, + -3, 0, -1, 0, 1, 0, 3, 0, + -3, 1, -1, 1, 1, 1, 3, 1, + -3, 2, -2, 2, 2, 2, 3, 2, + 127 + }, + { /* SMILEY (P8) */ + -3, -3, -2, -3, -1, -3, 1, -3, 2, -3, 3, -3, + -2, -2, 0, -2, 2, -2, + -2, 0, 2, 0, + -3, 2, -1, 2, 1, 2, 3, 2, + -1, 3, 1, 3, + 127 + }, + { /* PULSE1 P4 */ + 0, -3, 1, -3, + -2, -2, 0, -2, + -3, -1, 3, -1, + -2, 0, 2, 0, 3, 0, + 0, 2, 2, 2, + 1, 3, + 127 + }, + { /* SHINING FLOWER P5 */ + -1, -4, 0, -4, + -2, -3, 1, -3, + -3, -2, 2, -2, + -4, -1, 3, -1, + -4, 0, 3, 0, + -3, 1, 2, 1, + -2, 2, 1, 2, + -1, 3, 0, 3, + 127 + }, + { /* PULSE2 P6 */ + 0, -4, 1, -4, + -4, -3, -3, -3, -1, -3, + -4, -2, -3, -2, 0, -2, 3, -2, + 1, -1, 3, -1, + 2, 0, + 1, 2, 2, 2, + 1, 3, 2, 3, + 127 + }, + { /* PINWHEEL P4 */ + -2, -6, -1, -6, + -2, -5, -1, -5, + -2, -3, -1, -3, 0, -3, 1, -3, + -3, -2, -1, -2, 2, -2, 4, -2, 5, -2, + -3, -1, 1, -1, 2, -1, 4, -1, 5, -1, + -6, 0, -5, 0, -3, 0, 0, 0, 2, 0, + -6, 1, -5, 1, -3, 1, 2, 1, + -2, 2, -1, 2, 0, 2, 1, 2, + 0, 4, 1, 4, + 0, 5, 1, 5, + 127 + }, + { /* CLOCK P4 */ + -2, -6, -1, -6, + -2, -5, -1, -5, + -2, -3, -1, -3, 0, -3, 1, -3, + -6, -2, -5, -2, -3, -2, 0, -2, 2, -2, + -6, -1, -5, -1, -3, -1, -1, -1, 2, -1, + -3, 0, -1, 0, 2, 0, 4, 0, 5, 0, + -3, 1, 2, 1, 4, 1, 5, 1, + -2, 2, -1, 2, 0, 2, 1, 2, + 0, 4, 1, 4, + 0, 5, 1, 5, + 127 + }, + { /* CROSS P3 */ + -2, -4, -1, -4, 0, -4, 1, -4, + -2, -3, 1, -3, + -4, -2, -3, -2, -2, -2, 1, -2, 2, -2, 3, -2, + -4, -1, 3, -1, + -4, 0, 3, 0, + -4, 1, -3, 1, -2, 1, 1, 1, 2, 1, 3, 1, + -2, 2, 1, 2, + -2, 3, -1, 3, 0, 3, 1, 3, + 127 + }, + { /* BIG CROSS P3 */ + 0, -5, + -1, -4, 0, -4, 1, -4, + -3, -3, -2, -3, -1, -3, 1, -3, 2, -3, 3, -3, + -3, -2, 3, -2, + -4, -1, -3, -1, 3, -1, 4, -1, + -5, 0, -4, 0, 4, 0, 5, 0, + -4, 1, -3, 1, 3, 1, 4, 1, + -3, 2, 3, 2, + -3, 3, -2, 3, -1, 3, 1, 3, 2, 3, 3, 3, + -1, 4, 0, 4, 1, 4, + 0, 5, + 127 + }, + { /* P4 DIAG SYM */ + -2, -4, 0, -4, + -2, -3, 0, -3, 2, -3, 3, -3, + -4, -2, -3, -2, 2, -2, + 0, -1, 1, -1, 2, -1, + -4, 0, -3, 0, -1, 0, 2, 0, + -1, 1, 2, 1, + -3, 2, -2, 2, -1, 2, 0, 2, 1, 2, + -3, 3, + 127 + }, + { /* P4 ASYM */ + -4, -4, -2, -4, + -4, -3, -1, -3, + -1, -2, + -2, -1, -1, -1, 0, -1, 3, -1, 4, -1, 5, -1, + -5, 0, -4, 0, -3, 0, 0, 0, 1, 0, 2, 0, + 1, 1, + 1, 2, 4, 2, + 2, 3, 4, 3, + 127 + }, + { /* P4 ASYM 2 */ + -3, -3, -1, -3, 2, -3, 4, -3, 5, -3, 6, -3, + -4, -2, -1, -2, 1, -2, 3, -2, 5, -2, + -4, -1, + 3, 0, + -6, 1, -4, 1, -2, 1, 0, 1, 3, 1, + -7, 2, -6, 2, -5, 2, -3, 2, 0, 2, 2, 2, + 127 + }, + { /* P8 ASYM */ + -3, -4, -2, -4, + -4, -3, + -3, -2, 1, -2, + -3, -1, 1, -1, 2, -1, + -1, 0, 1, 0, + -2, 1, -1, 1, 3, 1, + -1, 2, 3, 2, + 4, 3, + 2, 4, 3, 4, + 127 + }, + { /* P4 SYM */ + -6, -2, -5, -2, 4, -2, 5, -2, + -6, -1, -5, -1, -3, -1, -2, -1, 1, -1, 2, -1, 4, -1, 5, -1, + -5, 0, -2, 0, 1, 0, 4, 0, + -5, 1, -4, 1, -2, 1, -1, 1, 0, 1, 1, 1, 3, 1, 4, 1, + 127 + }, + { /* QUESTION P3 NOSYM */ + -2, -4, -1, -4, 0, -4, + 2, -3, + -3, -2, 2, -2, + 1, -1, + -2, 0, -1, 0, + -2, 1, + -2, 2, + -2, 3, + 127 + }, + { /* WHIRLY THING P12 */ + -5, -6, + -5, -5, -4, -5, -3, -5, 5, -5, 6, -5, + -2, -4, 5, -4, + -3, -3, -2, -3, 3, -3, 5, -3, + 3, -2, 4, -2, + 0, -1, 1, -1, + 0, 0, 1, 0, + 0, 1, 1, 1, + -4, 2, -3, 2, + -5, 3, -3, 3, 2, 3, 3, 3, + -5, 4, 2, 4, + -6, 5, -5, 5, 3, 5, 4, 5, 5, 5, + 5, 6, + 127 + }, + { /* PENTADECATHOLON P15 */ + -5, 0, -4, 0, -3, 0, -2, 0, -1, 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, + 127 + }, + { /* BALLOON P5 */ + -1, -3, 0, -3, + -3, -2, 2, -2, + -3, -1, 2, -1, + -3, 0, 2, 0, + -2, 1, 1, 1, + -4, 2, -2, 2, 1, 2, 3, 2, + -4, 3, -3, 3, 2, 3, 3, 3, + 127 + }, + { /* FENCEPOST P12 */ + -11, -3, -9, -3, -7, -3, + -11, -2, -9, -2, -7, -2, 5, -2, 6, -2, 7, -2, 9, -2, 10, -2, 11, -2, + -11, -1, -7, -1, -3, -1, 1, -1, 8, -1, + -10, 0, -8, 0, -3, 0, -2, 0, -1, 0, 1, 0, 5, 0, 6, 0, 10, 0, 11, 0, + -11, 1, -7, 1, -3, 1, 1, 1, 8, 1, + -11, 2, -9, 2, -7, 2, 5, 2, 6, 2, 7, 2, 9, 2, 10, 2, 11, 2, + -11, 3, -9, 3, -7, 3, + 127 + }, + { /* PISTON (SHUTTLE) P30 */ + 1, -3, 2, -3, + 0, -2, + -10, -1, -1, -1, + -11, 0, -10, 0, -1, 0, 9, 0, 10, 0, + -1, 1, 9, 1, + 0, 2, + 1, 3, 2, 3, + 127 + }, + { /* P30 */ + -8, -5, 7, -5, + -9, -4, -7, -4, 1, -4, 2, -4, 6, -4, 8, -4, + -8, -3, 0, -3, 1, -3, 2, -3, 7, -3, + 1, -2, 2, -2, + 1, 2, 2, 2, + -8, 3, 0, 3, 1, 3, 2, 3, 7, 3, + -9, 4, -7, 4, 1, 4, 2, 4, 6, 4, 8, 4, + -8, 5, 7, 5, + 127 + }, + { /* PISTON2 P46 */ + -3, -5, + -14, -4, -13, -4, -4, -4, -3, -4, 13, -4, 14, -4, + -14, -3, -13, -3, -5, -3, -4, -3, 13, -3, 14, -3, + -4, -2, -3, -2, 0, -2, 1, -2, + -4, 2, -3, 2, 0, 2, 1, 2, + -14, 3, -13, 3, -5, 3, -4, 3, 13, 3, 14, 3, + -14, 4, -13, 4, -4, 4, -3, 4, 13, 4, 14, 4, + -3, 5, + 127 + }, + { /* GEARS (gear, flywheel, blinker) P2 */ + -1, -4, + -1, -3, 1, -3, + -3, -2, + 2, -1, 3, -1, + -4, 0, -3, 0, + 2, 1, + -2, 2, 0, 2, + 0, 3, + + 5, 3, + 3, 4, 4, 4, + 5, 5, 6, 5, + 4, 6, + + 8, 0, + 8, 1, + 8, 2, + 127 + }, + { /* TURBINE8, KOK'S GALAXY */ + -4, -4, -3, -4, -2, -4, -1, -4, 0, -4, 1, -4, 3, -4, 4, -4, + -4, -3, -3, -3, -2, -3, -1, -3, 0, -3, 1, -3, 3, -3, 4, -3, + 3, -2, 4, -2, + -4, -1, -3, -1, 3, -1, 4, -1, + -4, 0, -3, 0, 3, 0, 4, 0, + -4, 1, -3, 1, 3, 1, 4, 1, + -4, 2, -3, 2, + -4, 3, -3, 3, -1, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, + -4, 4, -3, 4, -1, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4, + 127 + }, + { /* P16 */ + -3, -6, 1, -6, 2, -6, + -3, -5, 0, -5, 3, -5, + 3, -4, + -5, -3, -4, -3, 1, -3, 2, -3, 5, -3, 6, -3, + -6, -2, -3, -2, + -6, -1, -3, -1, + -5, 0, 5, 0, + 3, 1, 6, 1, + 3, 2, 6, 2, + -6, 3, -5, 3, -2, 3, -1, 3, 4, 3, 5, 3, + -3, 4, + -3, 5, 0, 5, 3, 5, + -2, 6, -1, 6, 3, 6, + 127 + }, + { /* P28 (FLUTTER) */ + -9, -7, -7, -7, 7, -7, 9, -7, + -6, -6, 6, -6, + -10, -5, -7, -5, 7, -5, 10, -5, + -11, -4, -9, -4, -7, -4, 7, -4, 9, -4, 11, -4, + -11, -3, -8, -3, 8, -3, 11, -3, + -10, -2, -9, -2, -4, -2, -3, -2, -2, -2, + 2, -2, 3, -2, 4, -2, 9, -2, 10, -2, + -3, -1, 3, -1, + -10, 1, -9, 1, 9, 1, 10, 1, + -11, 2, -8, 2, 8, 2, 11, 2, + -11, 3, -9, 3, -6, 3, 6, 3, 9, 3, 11, 3, + -10, 4, 10, 4, + -9, 5, -8, 5, -6, 5, 6, 5, 8, 5, 9, 5, + -7, 6, 7, 6, + 127 + }, + { /* P54 (PISTON3) */ + -14, -8, -13, -8, 13, -8, 14, -8, + -13, -7, 13, -7, + -13, -6, -11, -6, 11, -6, 13, -6, + -12, -5, -11, -5, -1, -5, 11, -5, 12, -5, + 0, -4, + -6, -3, -5, -3, 1, -3, + -6, -2, -5, -2, -2, -2, 0, -2, + -1, -1, + -1, 1, + -6, 2, -5, 2, -2, 2, 0, 2, + -6, 3, -5, 3, 1, 3, + 0, 4, + -12, 5, -11, 5, -1, 5, 11, 5, 12, 5, + -13, 6, -11, 6, 11, 6, 13, 6, + -13, 7, 13, 7, + -14, 8, -13, 8, 13, 8, 14, 8, + 127 + }, + { /* SWITCH ENGINE */ + -12, -3, -10, -3, + -13, -2, + -12, -1, -9, -1, + -10, 0, -9, 0, -8, 0, + 13, 2, 14, 2, + 13, 3, + 127 + }, + { /* PUFFER TRAIN */ + 1, -9, + 2, -8, + -2, -7, 2, -7, + -1, -6, 0, -6, 1, -6, 2, -6, + -2, -2, + -1, -1, 0, -1, + 0, 0, + 0, 1, + -1, 2, + 1, 5, + 2, 6, + -2, 7, 2, 7, + -1, 8, 0, 8, 1, 8, 2, 8, + 127 + }, + { /* SCHOOL OF FISH (ESCORT) */ + 3, -8, + 4, -7, + -2, -6, 4, -6, + -1, -5, 0, -5, 1, -5, 2, -5, 3, -5, 4, -5, + -5, -1, -4, -1, -3, -1, -2, -1, -1, -1, 0, -1, + 1, -1, 2, -1, 3, -1, 4, -1, 5, -1, 6, -1, + -6, 0, 6, 0, + 6, 1, + 5, 2, + 3, 4, + 4, 5, + -2, 6, 4, 6, + -1, 7, 0, 7, 1, 7, 2, 7, 3, 7, 4, 7, + + 127 + }, + { /* DART SPEED 1/3 */ + 3, -7, + 2, -6, 4, -6, + 1, -5, 2, -5, + 4, -4, + 0, -3, 4, -3, + -3, -2, 0, -2, + -4, -1, -2, -1, 1, -1, 2, -1, 3, -1, 4, -1, + -5, 0, -2, 0, + -4, 1, -2, 1, 1, 1, 2, 1, 3, 1, 4, 1, + -3, 2, 0, 2, + 0, 3, 4, 3, + 4, 4, + 1, 5, 2, 5, + 2, 6, 4, 6, + 3, 7, + 127 + }, + { /* PERIOD 4 SPEED 1/2 */ + -3, -5, + -4, -4, -3, -4, -2, -4, -1, -4, 0, -4, + -5, -3, -4, -3, 0, -3, 1, -3, 3, -3, + -4, -2, 4, -2, + -3, -1, -2, -1, 1, -1, 3, -1, + -3, 1, -2, 1, 1, 1, 3, 1, + -4, 2, 4, 2, + -5, 3, -4, 3, 0, 3, 1, 3, 3, 3, + -4, 4, -3, 4, -2, 4, -1, 4, 0, 4, + -3, 5, + 127 + }, + { /* ANOTHER PERIOD 4 SPEED 1/2 */ + -4, -7, -3, -7, -1, -7, 0, -7, 1, -7, 2, -7, 3, -7, 4, -7, + -5, -6, -4, -6, -3, -6, -2, -6, 5, -6, + -6, -5, -5, -5, + -5, -4, 5, -4, + -4, -3, -3, -3, -2, -3, 0, -3, + -2, -2, + -2, -1, + -1, 0, + -2, 1, + -2, 2, + -4, 3, -3, 3, -2, 3, 0, 3, + -5, 4, 5, 4, + -6, 5, -5, 5, + -5, 6, -4, 6, -3, 6, -2, 6, 5, 6, + -4, 7, -3, 7, -1, 7, 0, 7, 1, 7, 2, 7, 3, 7, 4, 7, + 127 + }, + { /* SMALLEST KNOWN PERIOD 3 SPACESHIP SPEED 1/3 */ + 0, -8, + -1, -7, 1, -7, + -1, -6, 1, -6, + -1, -5, + -2, -3, -1, -3, + -1, -2, 1, -2, + -2, -1, 0, -1, + -2, 0, -1, 0, 0, 0, + -1, 2, 1, 2, + -1, 3, 0, 3, + 0, 4, + 0, 5, 2, 5, + 0, 6, 2, 6, + 1, 7, + 127 + }, + { /* TURTLE SPEED 1/3 */ + -4, -5, -3, -5, -2, -5, 6, -5, + -4, -4, -3, -4, 0, -4, 2, -4, 3, -4, 5, -4, 6, -4, + -2, -3, -1, -3, 0, -3, 5, -3, + -4, -2, -1, -2, 1, -2, 5, -2, + -5, -1, 0, -1, 5, -1, + -5, 0, 0, 0, 5, 0, + -4, 1, -1, 1, 1, 1, 5, 1, + -2, 2, -1, 2, 0, 2, 5, 2, + -4, 3, -3, 3, 0, 3, 2, 3, 3, 3, 5, 3, 6, 3, + -4, 4, -3, 4, -2, 4, 6, 4, + 127 + }, + { /* SMALLEST KNOWN PERIOD 5 SPEED 2/5 */ + 1, -7, 3, -7, + -2, -6, 3, -6, + -3, -5, -2, -5, -1, -5, 4, -5, + -4, -4, -2, -4, + -5, -3, -4, -3, -1, -3, 0, -3, 5, -3, + -4, -2, -3, -2, 0, -2, 1, -2, 2, -2, 3, -2, 4, -2, + -4, 2, -3, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, + -5, 3, -4, 3, -1, 3, 0, 3, 5, 3, + -4, 4, -2, 4, + -3, 5, -2, 5, -1, 5, 4, 5, + -2, 6, 3, 6, + 1, 7, 3, 7, + 127 + }, + { /* SYM PUFFER */ + 1, -4, 2, -4, 3, -4, 4, -4, + 0, -3, 4, -3, + 4, -2, + -4, -1, -3, -1, 0, -1, 3, -1, + -4, 0, -3, 0, -2, 0, + -4, 1, -3, 1, 0, 1, 3, 1, + 4, 2, + 0, 3, 4, 3, + 1, 4, 2, 4, 3, 4, 4, 4, + 127 + }, + { /* RAKE P20 BACKWARDS */ + 0, -10, 1, -10, 10, -10, + -1, -9, 0, -9, 1, -9, 2, -9, 11, -9, + -1, -8, 0, -8, 2, -8, 3, -8, 7, -8, 11, -8, + 1, -7, 2, -7, 8, -7, 9, -7, 10, -7, 11, -7, + 6, -3, 7, -3, + 5, -2, 6, -2, 8, -2, 9, -2, + 6, -1, 9, -1, + 6, 0, 9, 0, + 7, 1, 8, 1, + 10, 4, + 11, 5, + -8, 6, 7, 6, 11, 6, + -7, 7, 8, 7, 9, 7, 10, 7, 11, 7, + -11, 8, -7, 8, + -10, 9, -9, 9, -8, 9, -7, 9, + 127 + }, + { /* RAKE P20 FORWARDS */ + 0, -10, 1, -10, 10, -10, + -1, -9, 0, -9, 1, -9, 2, -9, 11, -9, + -1, -8, 0, -8, 2, -8, 3, -8, 7, -8, 11, -8, + 1, -7, 2, -7, 8, -7, 9, -7, 10, -7, 11, -7, + 6, -3, 7, -3, + 5, -2, 6, -2, 8, -2, 9, -2, + 6, -1, 9, -1, + 6, 0, 9, 0, + 7, 1, 8, 1, + 10, 4, + 11, 5, + 7, 6, 11, 6, + -9, 7, -8, 7, -7, 7, -6, 7, 8, 7, 9, 7, 10, 7, 11, 7, + -10, 8, -6, 8, + -6, 9, + -7, 10, + 127 + }, + { /* RAKE P24 BACKWARDS */ + -5, -10, + -4, -9, + -10, -8, -4, -8, + -9, -7, -8, -7, -7, -7, -6, -7, -5, -7, -4, -7, + 6, -6, 7, -6, + 5, -5, 6, -5, 7, -5, 8, -5, + 5, -4, 6, -4, 8, -4, 9, -4, + 7, -3, 8, -3, + 0, -2, 2, -2, + -1, -1, 2, -1, 3, -1, + 0, 0, 2, 0, + 7, 1, 8, 1, + 5, 2, 6, 2, 8, 2, 9, 2, + 5, 3, 6, 3, 7, 3, 8, 3, + 6, 4, 7, 4, + -5, 6, -4, 6, + -9, 7, -8, 7, -7, 7, -6, 7, -4, 7, -3, 7, + -9, 8, -8, 8, -7, 8, -6, 8, -5, 8, -4, 8, + -8, 9, -7, 9, -6, 9, -5, 9, + 127 + }, + { /* BIG GLIDER 1 */ + -4, -7, -3, -7, + -4, -6, -2, -6, + -4, -5, + -7, -4, -6, -4, -4, -4, + -7, -3, -2, -3, + -7, -2, -5, -2, -4, -2, 3, -2, 4, -2, 5, -2, + -2, -1, -1, -1, 0, -1, 5, -1, 6, -1, + -1, 0, 0, 0, 1, 0, 3, 0, 5, 0, + 6, 1, + -1, 2, 1, 2, + -2, 3, -1, 3, 1, 3, + -1, 4, + -3, 5, -2, 5, 0, 5, + 0, 6, + -2, 7, -1, 7, + 127 + }, + { /* BIG GLIDER 2 */ + 0, -9, 1, -9, + 0, -8, 2, -8, + 0, -7, + 1, -6, 2, -6, 3, -6, + 1, -5, 3, -5, 4, -5, 5, -5, + 1, -4, 4, -4, 5, -4, + 3, -3, 5, -3, 7, -3, 8, -3, + 2, -2, 3, -2, 5, -2, 7, -2, + 1, -1, 2, -1, 7, -1, + -9, 0, -8, 0, -7, 0, + -9, 1, -6, 1, -5, 1, -4, 1, -1, 1, 3, 1, 4, 1, + -8, 2, -6, 2, -2, 2, -1, 2, + -6, 3, -5, 3, -3, 3, -2, 3, 1, 3, + -5, 4, -4, 4, 1, 4, + -5, 5, -4, 5, -3, 5, -2, 5, + -3, 7, -2, 7, -1, 7, + -3, 8, + 127 + }, + { /* BIG GLIDER 3 */ + -1, -8, + -2, -7, -1, -7, + -2, -6, 0, -6, + 0, -4, 2, -4, + -2, -3, 0, -3, 2, -3, + -7, -2, -3, -2, -2, -2, 0, -2, 2, -2, 3, -2, + -8, -1, -7, -1, -6, -1, -5, -1, -2, -1, 4, -1, + -8, 0, -5, 0, -4, 0, -2, 0, -1, 0, 3, 0, 4, 0, + -6, 1, -5, 1, 0, 1, + -4, 2, -3, 2, 1, 2, + -3, 3, -2, 3, -1, 3, 2, 3, 4, 3, 5, 3, 6, 3, 7, 3, + -3, 4, 0, 4, 3, 4, 4, 4, 5, 4, + -1, 5, 0, 5, 1, 5, + 1, 6, 2, 6, 3, 6, + 2, 7, 3, 7, + 127 + }, + { /* PI HEPTOMINO (], NEAR SHIP) */ + -2, -1, -1, -1, 0, -1, + 1, 0, + -2, 1, -1, 1, 0, 1, + 127 + }, + { /* R PENTOMINO */ + 0, -1, 1, -1, + -1, 0, 0, 0, + 0, 1, + 127 + }, + { /* BUNNIES */ + -4, -2, 2, -2, + -2, -1, 2, -1, + -2, 0, 1, 0, 3, 0, + -3, 1, -1, 1, + 127 + } +}; + + +/*- + * This uses Callahan's "/" notation + * ABC A B C + * DEF -> D E F + * GHI G H I + */ +static char patterns_6S2b34B2a[][2 * NUMPTS + 1] = +{ +#if 0 + { /* GLIDER (P4) */ + 0, -2, + 1, -1, + -2, 0, 1, 0, + 1, 1, + 1, 2, + 127 + }, +#endif + { /* 3 OSCILLATOR GLIDER GUN (P42) */ + 5, -6, 6, -6, + 6, -5, 7, -5, 9, -5, + 6, -4, 8, -4, 9, -4, + 7, -3, 8, -3, 10, -3, 11, -3, + 8, -2, 10, -2, + 8, -1, 10, -1, 11, -1, + 8, 0, 9, 0, 10, 0, 12, 0, + 10, 1, + + -10, -5, + -11, -4, -10, -4, -8, -4, + -12, -3, -11, -3, -9, -3, -8, -3, -7, -3, + -10, -2, -8, -2, -6, -2, + -10, -1, -9, -1, -7, -1, -6, -1, -5, -1, -4, -1, + -10, 0, -8, 0, -7, 0, -5, 0, + + 0, -1, 1, -1, + 1, 0, 2, 0, 3, 0, + 1, 1, 3, 1, + 0, 2, 1, 2, 2, 2, 3, 2, + 0, 3, 4, 3, + 1, 4, 2, 4, 3, 4, 4, 4, 5, 4, + 3, 5, + 3, 6, + 127 + }, + { /* ANOTHER GUN (P20) */ + -2, -7, -1, -7, + -2, -6, + + -8, -2, + -9, -1, -8, -1, -7, -1, -6, -1, -5, -1, + -8, 0, -6, 0, -5, 0, + -7, 1, -6, 1, + -8, 2, -7, 2, + -10, 3, -9, 3, -8, 3, + -8, 4, + -9, 5, -8, 5, -7, 5, + -6, 6, + + 4, 0, + 3, 1, 4, 1, 5, 1, 10, 1, + 3, 2, 4, 2, 6, 2, 7, 2, 10, 2, + 5, 3, 6, 3, 8, 3, 9, 3, 10, 3, 11, 3, + 7, 4, 10, 4, 12, 4, + 11, 5, + 127 + }, + { /* SHIP (P48) */ + -3, -2, -1, -2, + -2, -1, -1, -1, + -2, 0, -1, 0, 0, 0, 2, 0, + -1, 1, 0, 1, 3, 1, + 0, 2, + 127 + }, + { /* SHIP (P15) */ + -3, -5, -1, -5, + -2, -4, -1, -4, 0, -4, + -4, -3, -3, -3, -2, -3, 0, -3, + -2, -2, 0, -2, + -1, -1, 0, -1, + 0, 1, 1, 1, + 0, 2, 2, 2, + -1, 3, 0, 3, 1, 3, 3, 3, + 2, 4, 3, 4, 4, 4, + 2, 5, 4, 5, + 127 + }, + { /* SHIP BY A COLLISION OF 3 GLIDERS (P15) */ + 7, -4, + 8, -3, + 8, -2, 10, -2, + -11, -1, -10, -1, 1, -1, 2, -1, 3, -1, 4, -1, 9, -1, 11, -1, + -9, 0, 1, 0, 10, 0, + -8, 1, + -7, 2, 5, 2, + -9, 3, + 127 + }, + { /* STALK (P8) */ + -2, -4, + -3, -3, -2, -3, + -3, -2, -1, -2, 0, -2, + -3, -1, -2, -1, -1, -1, 1, -1, + 0, 0, 1, 0, + 0, 1, 2, 1, + 0, 2, 1, 2, 2, 2, + 2, 3, 3, 3, 4, 3, + 127 + }, + { /* STALK BY A COLLISION OF 3 GLIDERS */ + -8, -9, + -5, -8, + -5, -7, + -5, -6, + -6, -5, -5, -5, + -3, 1, + -4, 2, -2, 2, + -3, 3, -1, 3, + -1, 4, + 0, 5, 5, 5, + 5, 6, + 5, 7, 8, 7, + 5, 8, + 6, 9, + 127 + }, + { /* STALK BY A COLLISION OF 2 GLIDERS AND EATER */ + 3, -6, + 3, -5, + -5, -4, 4, -4, 7, -4, + -4, -3, -3, -3, 5, -3, + 6, -2, + -7, 1, -6, 1, + -5, 2, + -4, 3, + -3, 4, + -5, 5, + 127 + }, + { /* OSCILLATOR (P42) */ + -2, -3, -1, -3, + -2, -2, 0, -2, + -3, -1, -2, -1, -1, -1, 0, -1, + -3, 0, 1, 0, + -2, 1, -1, 1, 0, 1, 1, 1, 2, 1, + 0, 2, + 0, 3, + 127 + }, + { /* TENTACLE (P66) */ + -3, -3, -2, -3, + -5, -2, -4, -2, -3, -2, -1, -2, + -5, -1, -3, -1, -1, -1, + -4, 0, -3, 0, -1, 0, 0, 0, + -4, 1, -2, 1, -1, 1, 1, 1, 3, 1, + 0, 2, 1, 2, 3, 2, 4, 2, 5, 2, + 2, 3, 3, 3, + 127 + }, + { /* ROTATING OSCILLATOR (P42) */ + 0, -2, 1, -2, + -1, -1, 0, -1, 1, -1, + 1, 0, + -2, 1, -1, 1, 0, 1, 1, 1, + -2, 2, -1, 2, + 127 + }, + { /* INTERNAL OSCILLATOR (P7) */ + -3, -6, + -4, -5, -3, -5, + -5, -4, -4, -4, -2, -4, -1, -4, 1, -4, + -3, -3, -1, -3, 0, -3, 1, -3, + -6, -2, -4, -2, -3, -2, -1, -2, 2, -2, 3, -2, + -5, -1, -4, -1, -2, -1, 2, -1, + -6, 0, -5, 0, -3, 0, -2, 0, -1, 0, 0, 0, 3, 0, + -4, 1, -3, 1, 1, 1, 3, 1, + -4, 2, -2, 2, 0, 2, 1, 2, 4, 2, + -4, 3, -3, 3, -2, 3, 0, 3, 1, 3, 3, 3, 4, 3, 5, 3, + -1, 4, 0, 4, 2, 4, 3, 4, + 1, 5, 2, 5, + 127 + }, + { /* OSCILLATOR (P7) */ + -6, -7, + -6, -6, + -5, -5, -4, -5, + -4, -4, -3, -4, -2, -4, + -5, -3, -4, -3, -1, -3, 0, -3, 2, -3, + -5, -2, 0, -2, 1, -2, 2, -2, + -4, -1, 2, -1, + 3, 0, + 2, 1, 3, 1, + 2, 2, + 3, 3, 5, 3, + 2, 4, 3, 4, 4, 4, 5, 4, + 5, 5, + 6, 6, + 127 + }, + { /* OSCILLATOR (P9) */ + -2, -6, -1, -6, + -4, -5, -3, -5, -2, -5, 0, -5, + -3, -4, -1, -4, 0, -4, + -3, -3, -2, -3, -1, -3, 1, -3, + 0, -2, 1, -2, + 0, -1, + -1, 0, 0, 0, 1, 0, + -1, 1, 2, 1, + -2, 2, -1, 2, 0, 2, 2, 2, + -2, 3, 0, 3, 3, 3, + -1, 4, 0, 4, 2, 4, 3, 4, + 1, 5, 2, 5, + 2, 6, + 127 + }, + { /* OSCILLATOR1 (P11) */ + -4, -5, + -5, -4, -4, -4, + -4, -3, -3, -3, -1, -3, + -6, -2, -5, -2, -4, -2, -2, -2, 0, -2, + -4, -1, -2, -1, 1, -1, 2, -1, + -4, 0, -3, 0, -2, 0, -1, 0, 0, 0, 1, 0, 3, 0, 4, 0, 5, 0, + -4, 1, 0, 1, 1, 1, 4, 1, + 2, 2, 3, 2, 4, 2, + 4, 3, + 5, 4, + 127 + }, + { /* OSCILLATOR2 (P11) */ + -3, -3, -2, -3, 0, -3, + -3, -2, 0, -2, 1, -2, + -1, -1, 0, -1, 2, -1, + -3, 0, -2, 0, -1, 0, 1, 0, 2, 0, + -2, 1, 0, 1, 1, 1, 3, 1, + -1, 2, 0, 2, 2, 2, 3, 2, + 1, 3, 2, 3, + 127 + }, + { /* OSCILLATOR (P14) */ + -2, -3, -1, -3, 0, -3, + -3, -2, -2, -2, 0, -2, + -3, -1, 1, -1, 2, -1, + -3, 0, -2, 0, 0, 0, 1, 0, + -1, 1, 0, 1, 2, 1, 3, 1, + -1, 2, 1, 2, 2, 2, + 1, 3, + 127 + }, + { /* OSCILLATOR (P17) */ + -3, -6, + -3, -5, + -5, -4, -4, -4, -3, -4, -2, -4, -1, -4, 0, -4, + -3, -3, -1, -3, 0, -3, + -2, -2, -1, -2, + -2, 0, -1, 0, 2, 0, + -3, 1, -2, 1, 0, 1, 1, 1, + -3, 2, 0, 2, 2, 2, + -2, 3, -1, 3, 1, 3, 2, 3, + 0, 4, 1, 4, 3, 4, 4, 4, + 2, 5, 3, 5, + 2, 6, + 127 + }, + { /* OSCILLATOR (P18) */ + -5, -4, -3, -4, + -4, -3, -3, -3, -2, -3, + -5, -2, -4, -2, -2, -2, + -6, -1, -5, -1, -3, -1, -2, -1, 0, -1, 1, -1, 2, -1, 4, -1, + -6, 0, -4, 0, -3, 0, -1, 0, 1, 0, 3, 0, 4, 0, 5, 0, 6, 0, + -5, 1, -4, 1, -2, 1, -1, 1, 0, 1, 1, 1, 2, 1, 4, 1, 5, 1, + -3, 2, -2, 2, 0, 2, 2, 2, 3, 2, 4, 2, 6, 2, + -3, 3, -1, 3, 4, 3, + 127 + }, + { /* OSCILLATOR (P19) */ + -6, -4, -2, -4, + -7, -3, -6, -3, -3, -3, -2, -3, -1, -3, 1, -3, + -7, -2, -5, -2, -4, -2, -2, -2, 0, -2, 1, -2, 2, -2, + -6, -1, -5, -1, -3, -1, -2, -1, -1, -1, 0, -1, 1, -1, 3, -1, + -6, 0, -4, 0, -3, 0, 0, 0, 2, 0, 3, 0, + -4, 1, -2, 1, 0, 1, 1, 1, 2, 1, 4, 1, 5, 1, + 0, 2, 1, 2, 3, 2, 4, 2, 5, 2, + 1, 3, 2, 3, 3, 3, 6, 3, + 3, 4, + 127 + }, + { /* OSCILLATOR (P22) */ + -5, -5, + -4, -4, + -6, -3, -5, -3, -4, -3, -3, -3, -2, -3, + -4, -2, -2, -2, + -4, -1, -3, -1, -2, -1, -1, -1, 0, -1, + -3, 0, -1, 0, 1, 0, 2, 0, + 0, 1, 1, 1, 2, 1, 3, 1, + 0, 2, 1, 2, + 4, 4, + 5, 5, 6, 5, + 127 + }, + { /* OSCILLATOR (P26) */ + -5, -7, + -5, -6, -3, -6, + -6, -5, -5, -5, -4, -5, -3, -5, -2, -5, + -5, -4, -3, -4, -1, -4, 0, -4, + -5, -3, -2, -3, -1, -3, 1, -3, + -3, -2, -2, -2, 1, -2, + -1, -1, 0, -1, 1, -1, 2, -1, 3, -1, + 1, 0, 3, 0, + -1, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, + -4, 2, -3, 2, -1, 2, 1, 2, 3, 2, 5, 2, + -2, 3, 0, 3, 1, 3, 3, 3, + 2, 4, 3, 4, 4, 4, + 2, 5, 5, 5, + 5, 6, + 127 + }, + { /* OSCILLATOR (P29) */ + -2, -6, + -2, -5, -1, -5, + -3, -4, -2, -4, 0, -4, 1, -4, + -5, -3, -4, -3, -3, -3, 2, -3, 3, -3, 4, -3, + -4, -2, -2, -2, 2, -2, 4, -2, + -3, -1, -2, -1, -1, -1, 0, -1, 3, -1, 4, -1, 5, -1, + -5, 0, -4, 0, -3, 0, -2, 0, 1, 0, 2, 0, 3, 0, + -5, 1, -4, 1, -1, 1, 0, 1, 1, 1, 2, 1, + -4, 2, -3, 2, -2, 2, 0, 2, 2, 2, + -3, 3, 0, 3, + 1, 5, + 127 + }, + { /* OSCILLATOR (P46) */ + -2, -4, + -2, -3, -1, -3, 0, -3, + -4, -2, -3, -2, -2, -2, 0, -2, + -5, -1, -3, -1, -1, -1, 0, -1, 1, -1, 2, -1, 3, -1, + -4, 0, -3, 0, -2, 0, -1, 0, 0, 0, 3, 0, + -3, 1, -1, 1, 1, 1, 4, 1, + -4, 2, -3, 2, -2, 2, -1, 2, 0, 2, 1, 2, + -1, 3, + -1, 4, + 127 + }, +}; + +static char patterns_6S2a2b4aB2a3a4b[][2 * NUMPTS + 1] = +{ + { /* GLIDERS */ + -5, -9, + -5, -8, + -4, -7, -3, -7, + -4, -6, + -3, -5, + -1, -2, + -1, -1, 1, -1, + -1, 0, 1, 0, + 0, 1, + 0, 2, + 2, 5, + 2, 6, + 2, 7, + 3, 8, 5, 8, + 3, 9, + 127 + }, + { /* SYMMETRIC 4 GLIDER GUN */ + -2, -3, -1, -3, 0, -3, + -3, -2, -2, -2, 3, -2, + -2, -1, 0, -1, 1, -1, + -2, 0, 0, 0, 2, 0, 3, 0, + -1, 1, + -1, 2, + 127 + }, + { /* PUFFER (P18) */ + -2, -4, + -3, -3, -2, -3, -1, -3, 0, -3, + -2, -2, 0, -2, + -2, -1, 1, -1, + -2, 0, 2, 0, + -2, 2, 4, 2, + -1, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, + 0, 4, 1, 4, 3, 4, 4, 4, + 1, 5, 4, 5, + 127 + }, + { /* QUASAR (P10) */ + -2, -1, -1, -1, 0, -1, + -1, 0, 0, 0, + 0, 1, + 127 + }, +}; + +static int patterns_6rules[] = +{ + (sizeof patterns_6S2b34B2a / sizeof patterns_6S2b34B2a[0]), + (sizeof patterns_6S2a2b4aB2a3a4b / sizeof patterns_6S2a2b4aB2a3a4b[0]) +}; + +static int patterns_8rules[] = +{ + (sizeof patterns_8S23B3 / sizeof patterns_8S23B3[0]) +}; + +static paramstruct param_6rules[] = +{ + { + 0x18, 0x0, + {0x2, 0x0, 0x0}, + {0x1, 0x0, 0x0} + }, + { + 0x0, 0x0, + {0x3, 0x0, 0x1}, + {0x1, 0x1, 0x2} + } +}; + +static paramstruct param_8rules[] = +{ + { + 0xC, 0x8, + {0x0, 0x0, 0x0}, + {0x0, 0x0, 0x0} + } +}; + +#define LIFE_6S2b34B2a 0 +#define LIFE_6GLIDERS 1 /* GLIDER rules are first in param_6rules */ +#define LIFE_6S2a2b4aB2a3a4b 1 +#define LIFE_6RULES (sizeof param_6rules / sizeof param_6rules[0]) +#define LIFE_8S23B3 0 +#define LIFE_8GLIDERS 1 /* GLIDER rules are first in param_8rules */ +#define LIFE_8RULES (sizeof param_8rules / sizeof param_8rules[0]) + +static int +codeToPatternedRule(paramstruct param) +{ + unsigned int i; + int g; + + switch (local_neighbors) { + case 6: + for (i = 0; i < LIFE_6RULES; i++) + if (param_6rules[i].survival == param.survival && + param_6rules[i].birth == param.birth) { + for (g = 0; g < maxgroups[neighbor_kind]; g++) { + if (param_6rules[i].survival_group[g] != + param.survival_group[g] || + param_6rules[i].birth_group[g] != + param.birth_group[g]) { + break; + } + } + if (g == maxgroups[neighbor_kind]) + return i; + } + return LIFE_6RULES; + case 8: + for (i = 0; i < LIFE_8RULES; i++) + if (param_8rules[i].survival == param.survival && + param_8rules[i].birth == param.birth) { + for (g = 0; g < maxgroups[neighbor_kind]; g++) { + if (param_8rules[i].survival_group[g] != + param.survival_group[g] || + param_8rules[i].birth_group[g] != + param.birth_group[g]) { + break; + } + } + if (g == maxgroups[neighbor_kind]) + return i; + } + return LIFE_8RULES; + } + return 0; +} + +static void +copyFromPatternedRule(paramstruct * param, int patterned_rule) +{ + int i; + + switch (local_neighbors) { + case 6: + param->survival = param_6rules[patterned_rule].survival; + param->birth = param_6rules[patterned_rule].birth; + for (i = 0; i < maxgroups[neighbor_kind]; i++) { + param->survival_group[i] = + param_6rules[patterned_rule].survival_group[i]; + param->birth_group[i] = + param_6rules[patterned_rule].birth_group[i]; + } + break; + case 8: + param->survival = param_8rules[patterned_rule].survival; + param->birth = param_8rules[patterned_rule].birth; + for (i = 0; i < maxgroups[neighbor_kind]; i++) { + param->survival_group[i] = + param_8rules[patterned_rule].survival_group[i]; + param->birth_group[i] = + param_8rules[patterned_rule].birth_group[i]; + } + break; + } +} + +static void +printRule(paramstruct param) +{ + int l, g; + Bool found; + + (void) fprintf(stdout, "rule (Survival/Birth neighborhood): S"); + for (l = 0; l <= local_neighbors; l++) { + if (param.survival & (1 << l)) + (void) fprintf(stdout, "%d", l); + else if (l >= FIRSTGROUP && l < FIRSTGROUP + maxgroups[neighbor_kind]) + for (g = 0; g < groupnumber[neighbor_kind][l - FIRSTGROUP]; g++) { + if (param.survival_group[l - FIRSTGROUP] & (1 << g)) + (void) fprintf(stdout, "%d%c", l, 'a' + g); + } + } (void) fprintf(stdout, "/B"); + for (l = 0; l <= local_neighbors; l++) { + if (param.birth & (1 << l)) + (void) fprintf(stdout, "%d", l); + else if (l >= FIRSTGROUP && l < FIRSTGROUP + maxgroups[neighbor_kind]) + for (g = 0; g < groupnumber[neighbor_kind][l - FIRSTGROUP]; g++) { + if (param.birth_group[l - FIRSTGROUP] & (1 << g)) + (void) fprintf(stdout, "%d%c", l, 'a' + g); + } + } + (void) fprintf(stdout, "\nbinary rule: Survival 0x%X, Birth 0x%X\n", + param.survival, param.birth); + found = False; + for (l = 0; l <= maxgroups[neighbor_kind]; l++) { + if (param.survival_group[l] || param.birth_group[l]) { + found = True; + break; + } + } + if (found) + for (l = 0; l < maxgroups[neighbor_kind]; l++) { + (void) fprintf(stdout, + "groups in neighborhood %d: Survival 0x%X, Birth 0x%X\n", + l + FIRSTGROUP, param.survival_group[l], param.birth_group[l]); + } +} + +static int +position_of_neighbor(lifestruct * lp, int n, int col, int row) +{ + int dir = n * 360 / local_neighbors; + + if (local_neighbors == 6) { + switch (dir) { + case 0: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + break; + case 60: + if (!(row & 1)) + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 120: + if (row & 1) + col = (!col) ? lp->ncols - 1 : col - 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? lp->ncols - 1 : col - 1; + break; + case 240: + if (row & 1) + col = (!col) ? lp->ncols - 1 : col - 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 300: + if (!(row & 1)) + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (local_neighbors == 4 || local_neighbors == 8) { + switch (dir) { + case 0: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + break; + case 45: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 90: + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 135: + col = (!col) ? lp->ncols - 1 : col - 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? lp->ncols - 1 : col - 1; + break; + case 225: + col = (!col) ? lp->ncols - 1 : col - 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 270: + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 315: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = (!col) ? lp->ncols - 1 : col - 1; + break; + case 30: + case 40: + col = (!col) ? lp->ncols - 1 : col - 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 60: + col = (!col) ? lp->ncols - 1 : col - 1; + if (row + 1 == lp->nrows) + row = 1; + else if (row + 2 == lp->nrows) + row = 0; + else + row = row + 2; + break; + case 80: + case 90: + if (row + 1 == lp->nrows) + row = 1; + else if (row + 2 == lp->nrows) + row = 0; + else + row = row + 2; + break; + case 120: + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 150: + case 160: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 180: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + break; + case 200: + case 210: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 240: + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 270: + case 280: + if (!row) + row = lp->nrows - 2; + else if (!(row - 1)) + row = lp->nrows - 1; + else + row = row - 2; + break; + case 300: + col = (!col) ? lp->ncols - 1 : col - 1; + if (!row) + row = lp->nrows - 2; + else if (!(row - 1)) + row = lp->nrows - 1; + else + row = row - 2; + break; + case 320: + case 330: + col = (!col) ? lp->ncols - 1 : col - 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + break; + case 30: + case 40: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 60: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + if (!row) + row = lp->nrows - 2; + else if (row == 1) + row = lp->nrows - 1; + else + row = row - 2; + break; + case 80: + case 90: + if (!row) + row = lp->nrows - 2; + else if (row == 1) + row = lp->nrows - 1; + else + row = row - 2; + break; + case 120: + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 150: + case 160: + col = (!col) ? lp->ncols - 1 : col - 1; + row = (!row) ? lp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? lp->ncols - 1 : col - 1; + break; + case 200: + case 210: + col = (!col) ? lp->ncols - 1 : col - 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 240: + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + case 270: + case 280: + if (row + 1 == lp->nrows) + row = 1; + else if (row + 2 == lp->nrows) + row = 0; + else + row = row + 2; + break; + case 300: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + if (row + 1 == lp->nrows) + row = 1; + else if (row + 2 == lp->nrows) + row = 0; + else + row = row + 2; + break; + case 320: + case 330: + col = (col + 1 == lp->ncols) ? 0 : col + 1; + row = (row + 1 == lp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + + return (row * lp->ncols + col); +} + +static void +parseRule(ModeInfo * mi) +{ + int n, g, l; + char serving = 0; + static Bool found = False; + + if (found) + return; + input_param.survival = input_param.birth = 0; + for (n = 0; n < MAXGROUPS; n++) { + input_param.survival_group[n] = input_param.birth_group[n] = 0; + } + if (callahan) { + local_neighbors = 6; + neighbor_kind = 2; + found = True; + input_param.survival = param_6rules[0].survival; + input_param.birth = param_6rules[0].birth; + for (n = 0; n < maxgroups[neighbor_kind]; n++) { + input_param.survival_group[n] = param_6rules[0].survival_group[n]; + input_param.birth_group[n] = param_6rules[0].birth_group[n]; + } + return; + } else if (andreen) { + local_neighbors = 6; + neighbor_kind = 2; + found = True; + input_param.survival = param_6rules[1].survival; + input_param.birth = param_6rules[1].birth; + for (n = 0; n < maxgroups[neighbor_kind]; n++) { + input_param.survival_group[n] = param_6rules[1].survival_group[n]; + input_param.birth_group[n] = param_6rules[1].birth_group[n]; + } + return; + } + if (rule) { + n = 0; + while (rule[n]) { + if (rule[n] == 'P') { + allPatterns = True; + found = True; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "rule: All rules with known patterns\n"); + return; + } else if (rule[n] == 'G') { + allGliders = True; + found = True; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "rule: All rules with known gliders\n"); + return; + } else if (rule[n] == 'S' || rule[n] == 'E' || rule[n] == 'L') { + serving = 'S'; + } else if (rule[n] == 'B') { + serving = 'B'; + } else { + l = rule[n] - '0'; + if (l >= 0 && l <= 9 && l <= local_neighbors) { /* no 10, 11, 12 */ + g = rule[n + 1] - 'a'; + if (l >= FIRSTGROUP && l < FIRSTGROUP + maxgroups[neighbor_kind] && + g >= 0 && g < groupnumber[neighbor_kind][l]) { /* Groupings */ + if (serving == 'S') { + found = True; + input_param.survival_group[l - FIRSTGROUP] |= (1 << g); + } else if (serving == 'B') { + found = True; + input_param.birth_group[l - FIRSTGROUP] |= (1 << g); + } + } else { + if (serving == 'S') { + found = True; + input_param.survival |= (1 << l); + } else if (serving == 'B') { + found = True; + input_param.birth |= (1 << l); + } + } + } + } + n++; + } + } + if (!found) { /* Default to Conway's rule if very stupid */ + allGliders = True; + found = True; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, + "rule: Defaulting to all rules with known gliders\n"); + return; + } + if (MI_IS_VERBOSE(mi)) + printRule(input_param); +} + +static void +parseFile(void) +{ + FILE *file; + static Bool done = False; + int firstx = 0, x = 0, y = 0, i = 0; + int c = 0; + char line[256]; + + if (done) + return; + done = True; + if (!lifefile || !*lifefile || ((file = my_fopen(lifefile, "r")) == NULL)) { + /*(void) fprintf(stderr, "could not read file \"%s\"\n", lifefile); */ + return; + } + for (;;) { + if (!fgets(line, 256, file)) { + (void) fprintf(stderr, "could not read header of file \"%s\"\n", + lifefile); + (void) fclose(file); + return; + } + if (strncmp(line, "#P", (size_t) 2) == 0 && + sscanf(line, "#P %d %d", &x, &y) == 2) + break; + } + c = getc(file); + while (c != EOF && !(c == '0' || c == 'O' || c == '*' || c == '.')) { + c = getc(file); + } + if (c == EOF || x <= -127 || y <= -127 || x >= 127 || y >= 127) { + (void) fprintf(stderr, "corrupt file \"%s\" or file to large\n", + lifefile); + (void) fclose(file); + return; + } + firstx = x; + filePattern = (char *) malloc((2 * NUMFILEPTS + 1) * sizeof (char)); + + while (c != EOF && x < 127 && y < 127 && i < 2 * NUMFILEPTS) { + if (c == '0' || c == 'O' || c == '*') { + filePattern[i++] = x++; + filePattern[i++] = y; + } else if (c == '.') { + x++; + } else if (c == '\n') { + x = firstx; + y++; + } + c = getc(file); + } + (void) fclose(file); + filePattern[i] = 127; +} + +static void +init_list(lifestruct * lp, int state) +{ + /* Waste some space at the beginning and end of list + so we do not have to complicated checks against falling off the ends. */ + lp->last[state] = (CellList *) malloc(sizeof (CellList)); + lp->first[state] = (CellList *) malloc(sizeof (CellList)); + lp->first[state]->previous = lp->last[state]->next = NULL; + lp->first[state]->next = lp->last[state]->previous = NULL; + lp->first[state]->next = lp->last[state]; + lp->last[state]->previous = lp->first[state]; +} + +static void +addto_list(lifestruct * lp, int state, cellstruct info) +{ + CellList *curr; + + curr = (CellList *) malloc(sizeof (CellList)); + lp->last[state]->previous->next = curr; + curr->previous = lp->last[state]->previous; + curr->next = lp->last[state]; + lp->last[state]->previous = curr; + curr->info = info; + if (info.position >= 0) { + lp->arr[info.position] = curr; + lp->ncells[state]++; + } +} +static void +removefrom_list(lifestruct * lp, int state, CellList * curr) +{ + curr->previous->next = curr->next; + curr->next->previous = curr->previous; + if (curr->info.position >= 0) { + lp->arr[curr->info.position] = NULL; + lp->ncells[state]--; + } + (void) free((void *) curr); +} + +#ifdef DEBUG +static void +print_state(ModeInfo * mi, int state) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + CellList *curr; + int i = 0; + + curr = lp->first[state]->next; + (void) printf("state %d\n", state); + while (curr != lp->last[state]) { + (void) printf("%d: position %ld, age %d, state %d, toggle %d\n", + i, curr->info.position, curr->info.age, + curr->info.state, curr->info.toggle); + curr = curr->next; + i++; + } +} + +#endif + +static void +flush_list(lifestruct * lp, int state) +{ + while (lp->last[state]->previous != lp->first[state]) { + CellList *curr = lp->last[state]->previous; + + curr->previous->next = lp->last[state]; + lp->last[state]->previous = curr->previous; + (void) free((void *) curr); + } + lp->ncells[state] = 0; +} + + +static void +draw_cell(ModeInfo * mi, cellstruct info) +{ + Display *display = MI_DISPLAY(mi); + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + GC gc = lp->backGC; + int col, row; + + col = (int) (info.position % lp->ncols); + row = (int) (info.position / lp->ncols); + if (info.state == LIVE) { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, info.age)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + } else + XSetForeground(display, gc, lp->black); + + if (local_neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + lp->shape.hexagon[0].x = lp->xb + ccol * lp->xs; + lp->shape.hexagon[0].y = lp->yb + crow * lp->ys; + if (lp->xs == 1 && lp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), + lp->backGC, lp->shape.hexagon[0].x, lp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), lp->backGC, + lp->shape.hexagon, 6, Convex, CoordModePrevious); + } else if (local_neighbors == 4 || local_neighbors == 8) { + if (lp->pixelmode || info.state == DEAD) + XFillRectangle(display, MI_WINDOW(mi), gc, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, + lp->xs - (lp->xs > 3 && lp->pixelmode), + lp->ys - (lp->ys > 3 && lp->pixelmode)); + else +/*- + * PURIFY 4.0.1 on SunOS4 and on Solaris 2 reports a 132 byte memory leak on + * the next line */ + (void) XPutImage(display, MI_WINDOW(mi), gc, lp->logo, + 0, 0, lp->xb + lp->xs * col, lp->yb + lp->ys * row, + lp->logo->width, lp->logo->height); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + lp->shape.triangle[orient][0].x = lp->xb + col * lp->xs; + lp->shape.triangle[orient][0].y = lp->yb + row * lp->ys; + if (lp->xs <= 3 || lp->ys <= 3) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), lp->backGC, + ((orient) ? -1 : 1) + lp->shape.triangle[orient][0].x, + lp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + lp->shape.triangle[orient][0].x += (lp->xs / 2 - 1); + else + lp->shape.triangle[orient][0].x -= (lp->xs / 2 - 1); + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), lp->backGC, + lp->shape.triangle[orient], 3, Convex, CoordModePrevious); + + } + } +} + +static void +setcelltoggles(ModeInfo * mi, int col, int row) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int position; + CellList *curr; + + position = row * lp->ncols + col; + curr = lp->arr[position]; + if (!curr) { + (void) fprintf(stderr, "state toggling but not on list\n"); + return; + } + curr->info.toggle = True; +} + +static void +setcellfromtoggle(ModeInfo * mi, int col, int row) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int neighbor, n, position; + cellstruct info; + CellList *curr, *currn; + + position = row * lp->ncols + col; + curr = lp->arr[position]; + if ((curr && curr->info.state == DEAD && curr->info.toggle) || + (curr && curr->info.state == LIVE && !curr->info.toggle)) { + for (n = 0; n < local_neighbors; n++) { + neighbor = position_of_neighbor(lp, n, col, row); + currn = lp->arr[neighbor]; + if (!currn) { + info.position = neighbor; + info.age = 0; + info.state = DEAD; + info.toggle = False; + addto_list(lp, DEAD, info); + } + } + } + if (curr && curr->info.state == DEAD && curr->info.toggle) { + removefrom_list(lp, DEAD, curr); + info.age = 0; + info.position = position; + info.toggle = False; + info.state = LIVE; + addto_list(lp, LIVE, info); + draw_cell(mi, info); + } else if (curr && curr->info.state == LIVE && !curr->info.toggle) { + info = curr->info; + /* if we aren't up to blue yet, then keep aging the cell. */ + if ((MI_NPIXELS(mi) > 2) && + (info.age < (unsigned short) (MI_NPIXELS(mi) * 0.7))) { + ++(info.age); + curr->info.age = info.age; + draw_cell(mi, info); + } + } +} + +static void +setcell(ModeInfo * mi, int col, int row, int state) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int neighbor, n, position; + cellstruct info; + CellList *curr, *currn; + + position = row * lp->ncols + col; + curr = lp->arr[position]; + if (state == LIVE) { + if (curr && curr->info.state == DEAD) { + removefrom_list(lp, DEAD, curr); + curr = NULL; + } + if (!curr) { + for (n = 0; n < local_neighbors; n++) { + neighbor = position_of_neighbor(lp, n, col, row); + currn = lp->arr[neighbor]; + if (!currn) { + info.age = 0; + info.position = neighbor; + info.state = DEAD; + info.toggle = False; + addto_list(lp, DEAD, info); + } + } + info.age = 0; + info.position = position; + info.state = LIVE; + info.toggle = False; + addto_list(lp, LIVE, info); + draw_cell(mi, info); + } else { + info = curr->info; + info.age = 0; + draw_cell(mi, info); + } + } else if (curr && curr->info.state == LIVE) { + info.age = 0; + info.position = position; + info.state = DEAD; + info.toggle = False; + removefrom_list(lp, LIVE, curr); + addto_list(lp, DEAD, info); /* Just in case... */ + draw_cell(mi, info); + } +} + +static void +alloc_cells(lifestruct * lp) +{ + lp->arr = (CellList **) calloc(lp->npositions, sizeof (CellList *)); +} + +static void +free_cells(lifestruct * lp) +{ + if (lp->arr != NULL) + (void) free((void *) lp->arr); + lp->arr = NULL; +} + +#if 0 +static int +n_neighbors(lifestruct * lp, CellList * curr) +{ + int col, row, n, p, count = 0; + + col = curr->info.position % lp->ncols; + row = curr->info.position / lp->ncols; + for (n = 0; n < local_neighbors; n++) { + p = position_of_neighbor(lp, n, col, row); + if (lp->arr[p] && lp->arr[p]->info.state == LIVE) { + count++; + } + } + return count; +} +#endif + +static int +ng_neighbors(lifestruct * lp, CellList * curr, int *group) +{ + int col, row, n, p, count = 0, gcount = 0; + + col = (int) (curr->info.position % lp->ncols); + row = (int) (curr->info.position / lp->ncols); + for (n = 0; n < local_neighbors; n++) { + p = position_of_neighbor(lp, n, col, row); + gcount <<= 1; + if (lp->arr[p] && lp->arr[p]->info.state == LIVE) { + count++; + gcount++; + } + } + *group = gcount; + return count; +} + +static void +RandomSoup(ModeInfo * mi, int n, int v) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int row, col; + + v /= 2; + if (v < 1) + v = 1; + for (row = lp->nrows / 2 - v; row < lp->nrows / 2 + v; ++row) + for (col = lp->ncols / 2 - v; col < lp->ncols / 2 + v; ++col) + if (NRAND(100) < n && col > 1 && row > 1 && + col < lp->ncols && row < lp->nrows) + setcell(mi, col, row, LIVE); + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "random pattern\n"); +} + +static void +GetPattern(ModeInfo * mi, int pattern_rule, int pattern) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int row, col; + char *patptr = NULL; + + if (filePattern) { + patptr = &filePattern[0]; + } else { + switch (local_neighbors) { + case 6: + switch (pattern_rule) { + case LIFE_6S2b34B2a: + patptr = &patterns_6S2b34B2a[pattern][0]; + break; + case LIFE_6S2a2b4aB2a3a4b: + patptr = &patterns_6S2a2b4aB2a3a4b[pattern][0]; + break; + } + break; + case 8: + switch (pattern_rule) { + case LIFE_8S23B3: + patptr = &patterns_8S23B3[pattern][0]; + break; + } + break; + } + } + while ((col = *patptr++) != 127) { + row = *patptr++; + col += lp->ncols / 2; + if (local_neighbors == 6) { + if (row < 0) + col += (lp->nrows / 2 % 2) ? -row / 2 : -(row - 1) / 2; + else + col += (lp->nrows / 2 % 2) ? -(row + 1) / 2 : -row / 2; + } + row += lp->nrows / 2; + + if (col >= 0 && row >= 0 && col < lp->ncols && row < lp->nrows) + setcell(mi, col, row, LIVE); + } + if (MI_IS_VERBOSE(mi) && !filePattern) + (void) fprintf(stdout, "table number %d\n", pattern); +} + +static void +shooter(ModeInfo * mi) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int hsp, vsp, hoff = 1, voff = 1, temp; + + /* Generate the glider at the edge of the screen */ + if (local_neighbors == 6 && lp->patterned_rule == LIFE_6S2b34B2a) { + /*- + * Generate gliders on left and right.... more could be done from top and + * bottom... also phase with voff + */ + hsp = (LRAND() & 1) ? 0 : lp->ncols - 1; + hsp = lp->ncols - 1; + temp = MIN(lp->nrows, 12); + vsp = lp->nrows / 2 + NRAND(temp) - temp / 2; + if (hsp > lp->ncols / 2) { + hoff = -1; + temp = (vsp % 2) ? 0 : hoff; + } else + temp = (vsp % 2) ? hoff : 0; + + setcell(mi, hsp + temp + 2 * hoff, vsp + 4 * voff, LIVE); + setcell(mi, hsp + 3 * hoff, vsp + 3 * voff, LIVE); + setcell(mi, hsp + temp + 3 * hoff, vsp + 2 * voff, LIVE); + setcell(mi, hsp + temp + 0 * hoff, vsp + 2 * voff, LIVE); + setcell(mi, hsp + 4 * hoff, vsp + 1 * voff, LIVE); + setcell(mi, hsp + temp + 3 * hoff, vsp + 0 * voff, LIVE); + } else if (local_neighbors == 8 && lp->patterned_rule == LIFE_8S23B3) { + if (LRAND() & 1) { + hsp = (LRAND() & 1) ? 0 : lp->ncols - 1; + vsp = NRAND(lp->nrows); + } else { + vsp = (LRAND() & 1) ? 0 : lp->nrows - 1; + hsp = NRAND(lp->ncols); + } + if (vsp > lp->nrows / 2) + voff = -1; + if (hsp > lp->ncols / 2) + hoff = -1; + setcell(mi, hsp + 2 * hoff, vsp + 0 * voff, LIVE); + setcell(mi, hsp + 2 * hoff, vsp + 1 * voff, LIVE); + setcell(mi, hsp + 2 * hoff, vsp + 2 * voff, LIVE); + setcell(mi, hsp + 1 * hoff, vsp + 2 * voff, LIVE); + setcell(mi, hsp + 0 * hoff, vsp + 1 * voff, LIVE); + } +} + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + + if (!lp->logo) + getImage(mi, &lp->logo, CELL_WIDTH, CELL_HEIGHT, CELL_BITS, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + DEFAULT_XPM, CELL_NAME, +#endif + &lp->graphics_format, &lp->cmap, &lp->black); +#ifndef STANDALONE + if (lp->cmap != None) { + setColormap(display, window, lp->cmap, MI_IS_INWINDOW(mi)); + if (lp->backGC == None) { + XGCValues xgcv; + + xgcv.background = lp->black; + lp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* STANDALONE */ + { + lp->black = MI_BLACK_PIXEL(mi); + lp->backGC = MI_GC(mi); + } +} + +static void +free_stuff(Display * display, lifestruct * lp) +{ + if (lp->cmap != None) { + XFreeColormap(display, lp->cmap); + if (lp->backGC != None) { + XFreeGC(display, lp->backGC); + lp->backGC = None; + } + lp->cmap = None; + } else + lp->backGC = None; + if (lp->logo) + destroyImage(&lp->logo, &lp->graphics_format); +} + +void +init_life(ModeInfo * mi) +{ + lifestruct *lp; + int size = MI_SIZE(mi), npats, i; + + if (lifes == NULL) { + if ((lifes = (lifestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (lifestruct))) == NULL) + return; + } + lp = &lifes[MI_SCREEN(mi)]; + + lp->generation = 0; + lp->redrawing = 0; + + if (!local_neighbors) { + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + local_neighbors = neighbors; + neighbor_kind = i; + break; + } + if (i == NEIGHBORKINDS - 1) { +#if 0 + local_neighbors = plots[NRAND(NEIGHBORKINDS)]; + local_neighbors = (LRAND() & 1) ? 4 : 8; + neighbor_kind = (local_neighbors == 4) ? 1 : 3; +#else + local_neighbors = 8; + neighbor_kind = 3; +#endif + break; + } + } + } + parseRule(mi); + parseFile(); + if (allPatterns) { + switch (local_neighbors) { + case 6: + lp->patterned_rule = NRAND(LIFE_6RULES); + break; + case 8: + lp->patterned_rule = NRAND(LIFE_8RULES); + break; + } + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } else if (allGliders) { + switch (local_neighbors) { + case 6: + lp->patterned_rule = NRAND(LIFE_6GLIDERS); + break; + case 8: + lp->patterned_rule = NRAND(LIFE_8GLIDERS); + break; + } + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } else { + lp->param.survival = input_param.survival; + lp->param.birth = input_param.birth; + for (i = 0; i < maxgroups[neighbor_kind]; i++) { + lp->param.survival_group[i] = input_param.survival_group[i]; + lp->param.birth_group[i] = input_param.birth_group[i]; + } + lp->patterned_rule = codeToPatternedRule(lp->param); + } + lp->width = MI_WIDTH(mi); + lp->height = MI_HEIGHT(mi); + + if (lp->first[0]) + for (i = 0; i < STATES; i++) + flush_list(lp, i); + else + for (i = 0; i < STATES; i++) + init_list(lp, i); + free_cells(lp); + + if (local_neighbors == 6) { + int nccols, ncrows, sides; + + if (lp->width < 2) + lp->width = 2; + if (lp->height < 4) + lp->height = 4; + if (size < -MINSIZE) + lp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + lp->ys = MAX(MINSIZE, MIN(lp->width, lp->height) / (4 * MINGRIDSIZE)); + else + lp->ys = MINSIZE; + } else + lp->ys = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)); + lp->xs = lp->ys; + nccols = MAX(lp->width / lp->xs - 2, 2); + ncrows = MAX(lp->height / lp->ys - 1, 2); + lp->ncols = nccols / 2; + lp->nrows = 2 * (ncrows / 4); + lp->xb = (lp->width - lp->xs * nccols) / 2 + lp->xs / 2; + lp->yb = (lp->height - lp->ys * (ncrows / 2) * 2) / 2 + lp->ys; + for (sides = 0; sides < 6; sides++) { + lp->shape.hexagon[sides].x = (lp->xs - 1) * hexagonUnit[sides].x; + lp->shape.hexagon[sides].y = + ((lp->ys - 1) * hexagonUnit[sides].y / 2) * 4 / 3; + } + lp->black = MI_BLACK_PIXEL(mi); + lp->backGC = MI_GC(mi); + } else if (local_neighbors == 4 || local_neighbors == 8) { + init_stuff(mi); + if (lp->width < 2) + lp->width = 2; + if (lp->height < 2) + lp->height = 2; +#if 0 + if (size == 0 && !MI_IS_ICONIC(mi)) { + lp->pixelmode = False; + lp->xs = lp->logo->width; + lp->ys = lp->logo->height; + } +#else + if (size == 0 || + MINGRIDSIZE * size > lp->width || MINGRIDSIZE * size > lp->height) { + if (lp->width > MINGRIDSIZE * lp->logo->width && + lp->height > MINGRIDSIZE * lp->logo->height) { + lp->pixelmode = False; + lp->xs = lp->logo->width; + lp->ys = lp->logo->height; + } else { + lp->pixelmode = True; + lp->xs = lp->ys = MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE); + } + } +#endif + else { + lp->pixelmode = True; + if (size < -MINSIZE) + lp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + lp->ys = MINSIZE; + else + lp->ys = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)); + lp->xs = lp->ys; + } + lp->ncols = MAX(lp->width / lp->xs, 4); + lp->nrows = MAX(lp->height / lp->ys, 4); + lp->xb = (lp->width - lp->xs * lp->ncols) / 2; + lp->yb = (lp->height - lp->ys * lp->nrows) / 2; + } else { /* TRI */ + int orient, sides; + + lp->black = MI_BLACK_PIXEL(mi); + lp->backGC = MI_GC(mi); + if (lp->width < 2) + lp->width = 2; + if (lp->height < 2) + lp->height = 2; + if (size < -MINSIZE) + lp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + lp->ys = MAX(MINSIZE, MIN(lp->width, lp->height) / (4 * MINGRIDSIZE)); + else + lp->ys = MINSIZE; + } else + lp->ys = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)); + lp->xs = (int) (1.52 * lp->ys); + lp->ncols = (MAX(lp->width / lp->xs - 1, 2) / 2) * 2; + lp->nrows = (MAX(lp->height / lp->ys - 1, 2) / 2) * 2; + lp->xb = (lp->width - lp->xs * lp->ncols) / 2 + lp->xs / 2; + lp->yb = (lp->height - lp->ys * lp->nrows) / 2 + lp->ys / 2; + for (orient = 0; orient < 2; orient++) { + for (sides = 0; sides < 3; sides++) { + lp->shape.triangle[orient][sides].x = + (lp->xs - 2) * triangleUnit[orient][sides].x; + lp->shape.triangle[orient][sides].y = + (lp->ys - 2) * triangleUnit[orient][sides].y; + } + } + } + lp->npositions = lp->nrows * lp->ncols; + + MI_CLEARWINDOWCOLORMAP(mi, lp->backGC, lp->black); + lp->painted = False; + alloc_cells(lp); + + lp->patterned_rule = codeToPatternedRule(lp->param); + npats = 0; + switch (local_neighbors) { + case 6: + if ((unsigned) lp->patterned_rule < LIFE_6RULES) + npats = patterns_6rules[lp->patterned_rule]; + break; + case 8: + if ((unsigned) lp->patterned_rule < LIFE_8RULES) + npats = patterns_8rules[lp->patterned_rule]; + break; + } + lp->pattern = NRAND(npats + 2); + if (lp->pattern >= npats && !filePattern) + RandomSoup(mi, 30, MAX(2 * MIN(lp->nrows, lp->ncols) / 3, 15)); + else + GetPattern(mi, lp->patterned_rule, lp->pattern); +} + +void +draw_life(ModeInfo * mi) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + CellList *middle[STATES]; /* To distinguish between old and new stuff */ + CellList *curr; + cellstruct info; + int i, count, gcount; + +/*- + * LIVE list are the on cells + * DEAD list are the cells that may go on in the next iteration. + * Init plan: + Create live list and dead list which border all live cells + (no good for rules like 0000 :) ) + * Big loop plan: + Setup toggles, toggle state next iteration? + Remove all from dead list except toggled and remove all from live list + that are dead (but in this case draw background square) + Toggle toggled states, age existing ones, create a new dead list, draw + */ + + /* Go through dead list to see if anything spawns (generate new lists), + then delete the used dead list */ + + MI_IS_DRAWN(mi) = True; + + /* Setup toggles */ + curr = lp->first[DEAD]->next; + while (curr != lp->last[DEAD]) { + count = ng_neighbors(lp, curr, &gcount); + if ((lp->param.birth & (1 << count)) || (count >= FIRSTGROUP && + count < FIRSTGROUP + maxgroups[neighbor_kind] && + (lp->param.birth_group[count - FIRSTGROUP] & + (1 << style6[gcount])))) { + setcelltoggles(mi, (int) (curr->info.position % lp->ncols), + (int) (curr->info.position / lp->ncols)); + } + curr = curr->next; + } + curr = lp->first[LIVE]->next; + while (curr != lp->last[LIVE]) { + count = ng_neighbors(lp, curr, &gcount); + if (!((lp->param.survival & (1 << count)) || (count >= FIRSTGROUP && + count < FIRSTGROUP + maxgroups[neighbor_kind] && + (lp->param.survival_group[count - FIRSTGROUP] & + (1 << style6[gcount]))))) { + setcelltoggles(mi, (int) (curr->info.position % lp->ncols), + (int) (curr->info.position / lp->ncols)); + } + curr = curr->next; + } + + /* Bring out your dead! */ + curr = lp->first[DEAD]->next; + while (curr != lp->last[DEAD]) { + curr = curr->next; + if (!curr->previous->info.toggle) + removefrom_list(lp, DEAD, curr->previous); + } + curr = lp->first[LIVE]->next; + while (curr != lp->last[LIVE]) { + if (curr->info.toggle) { + curr->info.state = DEAD; + draw_cell(mi, curr->info); + curr = curr->next; + removefrom_list(lp, LIVE, curr->previous); + } else + curr = curr->next; + } + + /* Fence off the babies */ + info.position = -1; /* dummy value */ + info.age = 0; /* dummy value */ + addto_list(lp, DEAD, info); + addto_list(lp, LIVE, info); + middle[DEAD] = lp->last[DEAD]->previous; + middle[LIVE] = lp->last[LIVE]->previous; + + /* Toggle toggled states, age existing ones, create a new dead list */ + while (lp->first[DEAD]->next != middle[DEAD]) { + curr = lp->first[DEAD]->next; + setcellfromtoggle(mi, (int) (curr->info.position % lp->ncols), + (int) (curr->info.position / lp->ncols)); + } + curr = lp->first[LIVE]->next; + while (curr != middle[LIVE]) { + setcellfromtoggle(mi, (int) (curr->info.position % lp->ncols), + (int) (curr->info.position / lp->ncols)); + curr = curr->next; + } + removefrom_list(lp, DEAD, middle[DEAD]); + removefrom_list(lp, LIVE, middle[LIVE]); + + if (lp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + CellList *redraw_curr = lp->arr[lp->redrawpos]; + + /* TODO: More efficient to use list rather than array. */ + if (redraw_curr && redraw_curr->info.state == LIVE) { + draw_cell(mi, redraw_curr->info); + } + if (++(lp->redrawpos) >= lp->npositions) { + lp->redrawing = 0; + break; + } + } + } + if (++lp->generation > MI_CYCLES(mi)) + init_life(mi); + else + lp->painted = True; + + /* + * generate a randomized shooter aimed roughly toward the center of the + * screen after batchcount. + */ + + if (lp->generation && lp->generation % + ((MI_COUNT(mi) < 0) ? 1 : MI_COUNT(mi)) == 0) + shooter(mi); + +} + +void +release_life(ModeInfo * mi) +{ + if (lifes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + lifestruct *lp = &lifes[screen]; + int state; + + for (state = 0; state < STATES; state++) { + if (lp->first[0]) + flush_list(lp, state); + if (lp->last[state]) + (void) free((void *) lp->last[state]); + if (lp->first[state]) + (void) free((void *) lp->first[state]); + } + free_cells(lp); + free_stuff(MI_DISPLAY(mi), lp); + } + (void) free((void *) lifes); + lifes = NULL; + } +} + +void +refresh_life(ModeInfo * mi) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + + if (lp->painted) { + MI_CLEARWINDOWCOLORMAP(mi, lp->backGC, lp->black); + lp->redrawing = 1; + lp->redrawpos = 0; + lp->painted = False; + } +} + +void +change_life(ModeInfo * mi) +{ + lifestruct *lp = &lifes[MI_SCREEN(mi)]; + int npats, i; + + lp->generation = 0; + if (lp->first[0]) + for (i = 0; i < STATES; i++) + flush_list(lp, i); + else + for (i = 0; i < STATES; i++) + init_list(lp, i); + free_cells(lp); + alloc_cells(lp); + + MI_CLEARWINDOWCOLORMAP(mi, lp->backGC, lp->black); + + lp->pattern++; + lp->patterned_rule = codeToPatternedRule(lp->param); + npats = 0; + switch (local_neighbors) { + case 6: + if ((unsigned) lp->patterned_rule < LIFE_6RULES) + npats = patterns_6rules[lp->patterned_rule]; + break; + case 8: + if ((unsigned) lp->patterned_rule < LIFE_8RULES) + npats = patterns_8rules[lp->patterned_rule]; + break; + } + if (lp->pattern >= npats + 2) { + lp->pattern = 0; + if (allPatterns) { + lp->patterned_rule++; + switch (local_neighbors) { + case 6: + if ((unsigned) lp->patterned_rule >= LIFE_6RULES) + lp->patterned_rule = 0; + break; + case 8: + if ((unsigned) lp->patterned_rule >= LIFE_8RULES) + lp->patterned_rule = 0; + break; + } + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } else if (allGliders) { + lp->patterned_rule++; + switch (local_neighbors) { + case 6: + if ((unsigned) lp->patterned_rule >= LIFE_6GLIDERS) + lp->patterned_rule = 0; + break; + case 8: + if ((unsigned) lp->patterned_rule >= LIFE_8GLIDERS) + lp->patterned_rule = 0; + break; + } + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } + } + if (lp->pattern >= npats) + RandomSoup(mi, 30, MAX(2 * MIN(lp->nrows, lp->ncols) / 3, 15)); + else + GetPattern(mi, lp->patterned_rule, lp->pattern); +} + +#endif /* MODE_life */ diff --git a/modes/life1d.c b/modes/life1d.c new file mode 100644 index 00000000..e0face0e --- /dev/null +++ b/modes/life1d.c @@ -0,0 +1,850 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* life1d --- Stephen Wolfram's 1d game of Life */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)life1d.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 27-Oct-97: xpm and ras capability added... it does not make too much + * sense here but ... + * 10-May-97: Compatible with xscreensaver + * 27-Jul-95: written, used life.c as a basis, using totalistic rules + * (default). Special thanks to Harold V. McIntosh + * for providing me with the + * LCAU collection and references. + * + * References: + * Dewdney, A.K., "The Armchair Universe, Computer Recreations from the + * Pages of Scientific American Magazine", W.H. Freedman and Company, + * New York, 1988 (May 1985). + * Perry, Kenneth E., "Abstract Mathematical Art", BYTE, December, 1986 + * pp. 181-192 + * Hayes, Brian, "Computer Recreations", Scientific American, March 1984, + * p. 12 + * Wolfram, Stephen, "Cellular automata as models of complexity", Nature, + * 4 October 1984, pp. 419-424 + * Wolfram, Stephen, "Computer Software in Science and Mathematics", + * Scientific American, September 1984, pp. 188-203 + * + */ + +#ifdef STANDALONE +#define PROGCLASS "Life1D" +#define HACK_INIT init_life1d +#define HACK_DRAW draw_life1d +#define life1d_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*cycles: 10 \n" \ + "*size: 0 \n" \ + "*ncolors: 200 \n" \ + "*bitmap: \n" \ + "*verbose: \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ +#include "automata.h" +#include "iostuff.h" + +#ifdef MODE_life1d + +#define DEF_TOTALISTIC "True" /* FALSE is LCAU */ + +static Bool totalistic; + +static XrmOptionDescRec opts[] = +{ + {"-totalistic", ".life1d.totalistic", XrmoptionNoArg, (caddr_t) "on"}, + {"+totalistic", ".life1d.totalistic", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ +{(caddr_t *) & totalistic, "totalistic", "Totalistic", DEF_TOTALISTIC, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+totalistic", "turn on/off totalistic rules (else LCAU rules)"} +}; + +ModeSpecOpt life1d_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct life1d_description = +{"life1d", "init_life1d", "draw_life1d", "release_life1d", + "refresh_life1d", "init_life1d", NULL, &life1d_opts, + 10000, 1, 10, 0, 64, 1.0, "", + "Shows Wolfram's game of 1D Life", 0, NULL}; + +#endif + +#define LIFE1DBITS(n,w,h)\ + lp->pixmaps[lp->init_bits++]=\ + XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1) + +/* aliases for vars defined in the bitmap file */ +#define CELL_WIDTH image_width +#define CELL_HEIGHT image_height +#define CELL_BITS image_bits + +#include "life1d.xbm" + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +static char *image_name[] = +{""}; + +#define CELL_NAME image_name +#define DEFAULT_XPM 0 +#endif + +static int maxstates; +static int maxradius; +static int maxsum_size; + +#define MINGRIDSIZE 10 +#define MINSIZE 2 /* 3 may be better here */ +#define REPEAT 24 +#define MAXSTATES 5 + +typedef struct { + int init_bits; + int pixelmode; + int xs, ys, xb, yb; /* cell size, grid border */ + int screen_generation, row; + int nrows, ncols, border; + int width, height; + int k, r; + long code; + int repeating; + char *nextstate; + int colors[MAXSTATES]; + Pixmap pixmaps[MAXSTATES]; + GC stippledGC; + unsigned char *newcells; + unsigned char *oldcells; + unsigned char *buffer; + XImage *logo; + Colormap cmap; + unsigned long black; + int graphics_format; + GC backGC; + int busyLoop; +} life1dstruct; + +static life1dstruct *life1ds = NULL; + +static int totalistic_rules[][3] = +{ + + /* Well behaved rules */ + /* Scientific American (Dewdney) */ + {2, 2, 20}, + {2, 2, 52}, /* A bit too prolific but I like it anyway */ + {2, 3, 88}, /* James K. Park's 1D Gun (1111111111011) */ + {2, 4, 368}, + + /* Nature */ + {3, 1, 792}, + + /* BYTE (Translated to Wolfram's notation) */ + {4, 1, 39744}, + {4, 1, 81036}, + {4, 1, 126092}, + {4, 1, 147824}, + {4, 1, 156272}, + {4, 1, 189468}, + {4, 1, 176412}, + {4, 1, 214840}, + {4, 1, 245028}, + {4, 1, 267320}, + {4, 1, 257808}, + {4, 1, 258596}, + {4, 1, 260224}, + {4, 1, 267408}, + {4, 1, 290960}, + {4, 1, 330056}, + {4, 1, 330436}, + {4, 1, 400192}, + {4, 1, 433296}, + {4, 1, 434492}, + {4, 1, 447368}, + {4, 1, 453768}, + {4, 1, 454416}, + {4, 1, 485488}, + {4, 1, 505904}, + {4, 1, 618960}, + {4, 1, 642948}, + {4, 1, 680528}, + {4, 1, 708484}, + {4, 1, 741004}, + {4, 1, 749708}, + {4, 1, 756420}, + {4, 1, 761356}, + {4, 1, 769088}, + {4, 1, 778568}, + {4, 1, 779792}, + {4, 1, 797456}, + {4, 1, 803728}, + {4, 1, 844092}, + {4, 1, 874524}, + {4, 1, 881440}, + {4, 1, 921476}, + {4, 1, 936832}, + {4, 1, 937792}, + {4, 1, 1004600}, + + /* Nature */ + {5, 1, 580020}, + {5, 1, 5694390}, + {5, 1, 59123000}, + +#if 0 /* OK but annoying */ + + /* BYTE */ + {4, 1, 10552}, + {4, 1, 14708}, + {4, 1, 25284}, + {4, 1, 42848}, + {4, 1, 44328}, + {4, 1, 51788}, + {4, 1, 107364}, + {4, 1, 111448}, + {4, 1, 155848}, + {4, 1, 173024}, + {4, 1, 224148}, + {4, 1, 238372}, + {4, 1, 241656}, + {4, 1, 243764}, + {4, 1, 255856}, + {4, 1, 259222}, + {4, 1, 310148}, + {4, 1, 324148}, + {4, 1, 346696}, + {4, 1, 364424}, + {4, 1, 403652}, + {4, 1, 436072}, + {4, 1, 456708}, + {4, 1, 461912}, + {4, 1, 534812}, + {4, 1, 546700}, + {4, 1, 552708}, + {4, 1, 569092}, + {4, 1, 616736}, + {4, 1, 658564}, + {4, 1, 717956}, + {4, 1, 748432}, + {4, 1, 800964}, + {4, 1, 800972}, + {4, 1, 801144}, + {4, 1, 821116}, + {4, 1, 840172}, + {4, 1, 858312}, + {4, 1, 865394}, + {4, 1, 914952}, + {4, 1, 919244}, + {4, 1, 984296}, + {4, 1, 997964}, + {4, 1, 1018488}, + {4, 1, 1018808}, + {4, 1, 1023864}, + {4, 1, 1024472}, + {4, 1, 1033776}, + {4, 1, 1033784}, + {4, 1, 1034552}, + + /* Nature */ + {5, 1, 583330}, + {5, 1, 672900}, +#endif + +#if 0 /* rejects */ + /* Nature */ + {2, 1, 4}, + {2, 3, 18}, + {2, 3, 22}, + {2, 3, 90}, + {2, 3, 94}, + {2, 3, 126}, + {2, 3, 128}, + + /* Scientific American (Dewdney) */ + {2, 3, 54}, + {3, 2, 66}, /* RIPPLE, Dewdney's personal 1d rule */ + {3, 1, 257}, + + /* BYTE */ + {4, 1, 16}, + {4, 1, 56}, + {4, 1, 4408}, + {4, 1, 101988}, + {4, 1, 113688}, + {4, 1, 227892}, + {4, 1, 254636}, + {4, 1, 258598}, + {4, 1, 294146}, + {4, 1, 377576}, + {4, 1, 472095}, + {4, 1, 538992}, + {4, 1, 615028}, + {4, 1, 901544}, + {4, 1, 911876}, + + /* Nature */ + {5, 1, 10175}, + {5, 1, 566780}, + {5, 1, 570090}, +#endif +}; + +#define TOTALISTICRULES (sizeof totalistic_rules / sizeof totalistic_rules[0]) + +#if 0 +static char lcau21_rules[][9] = +{ + "00010010", /* 18 Hollow enlarging triangles */ + "00110110", /* 54 Hollow triangles */ + "01101110", /* 110 Hollow right triangles */ + "01111100", /* 124 Hollow left triangles */ + "10010011", /* 147 Solid triangles */ + "10001001", /* 137 Solid right triangles */ + "11000001", /* 193 Solid left triangles */ +}; + +#define LCAU2RULES (sizeof lcau21_rules / sizeof lcau21_rules[0]) +#endif + +static char lcau31_rules[][28] = +{ + "000222111000111222222111000", /* equal thirds */ + "002220210110110211110002200", /* threads on triangles */ + "001121102222110110111002100", /* interfaces of 2 vel */ + "020201010201010102010102020", /* class iv, sparse */ + "020201011201011112011112120", /* blue bground class iv */ + "021211110211110101110101020", /* diagonal black gaps */ + "022221211221211012222111120", /* macrocell w/ 012 membrane */ + "100002021002021210021210100", /* totalistic rule 792 (iv) */ + "100002200112201200020121200", /* binary counter */ + "101021220111100222112102020", /* two patterns compete #1 */ + "110001000112221222112221000", /* reversible rule */ + "111012101002110122121102120", /* small blue triangles */ + "111021210012110202120212122", /* 2 glider on 1 background */ + "111111101010202020202010101", /* motes and triangles */ + "111220012222012120001221020", /* black triangles */ + "112110201012001210101200010", /* dendrites */ + "112122000000122112112122000", /* reversible rule's reverse */ + "200211020111110002001101210", /* crocodile skin */ + "202000200112001200120211100", /* two slow gliders collide */ + "202211000201021001100200200", /* Red Queen's binary counter */ + "210101012101012120012120200", /* blue on red background */ + "212021022100200221201101020", /* two patterns compete #2 */ + "220222010220211111000211010", /* Fisch's cyclic eater */ + "222022001222211202022120012", /* macrocell w/ 0122 membrane */ +}; + +#define LCAU3RULES (sizeof lcau31_rules / sizeof lcau31_rules[0]) + +static char lcau41_rules[][65] = +{ + "0000000313131323232312121213232323231313131101010202020202010101", /* skewed triangle */ + "0000020202000000020232220203300000000101020030000100322121003020", /* slow glider - copies bar */ + "0000213323132331123303003213323113233123002033211332313233120001", /* slightly chaotic symmetri */ + "0000332030033323010020122303001002120210000000100110020220000010", /* shuttle squeeze */ + "0100030000030323200323120202001003000203000220001310220100200010", /* coo gldrs */ + "0121200113213320110223311213201013131010111011101120012132103210", /* mixture of types */ + "0212301103023320313223121332310023203323333231301020023120303020", /* slo gl w/ many f gl */ + "0320032100113332112321213211003321233210121032320000321000010200", /* crosshatching */ + "0323323323313310323323313310310223313310310210213310310210210210", /* Perry's 245028 */ + "0323330023210000121122232322122113310131032101002110122321102120", /* */ + "0332200131100112230221012111210202022013210332120210222311212100", /* cycles on dgl bgrnd */ + "0332200131100112230221012111210202022013210332120210222311212300", /* cycles on dgl bgrnd */ + "1230320301231030321132211021112010202330101010112312220310311000", /* very complex glider */ + "1230320301321030321132211021112010212121232212112312220310311000", /* nice cross hatching */ + "2031122112031101123123233000321210301112010303203232213000311000", /* gliders among stills */ + "2202003300010200010011010011020003033000032302002203110033010200", /* bin ctr */ + "2313032202112320111221023212120203132000233322021310311101010030", /* diagonal growth on mesh */ + "2332102112210200233210120311023110322213112123233132331213211212", /* gliderettes & latice */ + "3000213323132331123302003213323113233123001033211332313233120000", /* symmetric rule */ + "3003003203213211003203213211211303213211211311323211211311321320", /* Perry's blue background */ + "3010213223113300321221011010123112301033010221203333211323110100", /* v. bars w/entanglement */ + "3111213323132331123313113213323113233123220133211332313233121110", /* not purely symmetric */ + "3112001202313030102330122003321023102122030102001210223122203020", /* slow & fast gliders */ + "3130123232333201012202313210121032302200211020313130002001103210", /* crocodile skin */ + "3230120202031130033311232111223012311113322032103210123012303210", /* y/o on b/g */ + "3330333312110010333032222222001033303222121111110000322212110010", /* Fisch's rule */ + "3332032303133100221122122213220022000212021022100200221203103020", /* slow glider */ + "3333101022220101323201012323101033331010222201013232010123231010", /* reverse of rvble #22 */ + "3333111122000022333311112200002233111133002222003311113300222200", /* reversible Rule 22 */ +}; + +#define LCAU4RULES (sizeof lcau41_rules / sizeof lcau41_rules[0]) + +#ifdef LCAU2RULES +#define LCAURULES (LCAU2RULES + LCAU3RULES + LCAU4RULES) +#else +#define LCAURULES (LCAU3RULES + LCAU4RULES) +#endif + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned int state) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + life1dstruct *lp = &life1ds[MI_SCREEN(mi)]; + GC gc = lp->backGC; + + if (!state) { + XSetForeground(display, gc, lp->black); + XFillRectangle(display, window, gc, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, lp->xs, lp->ys); + return; + } + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, lp->colors[state - 1])); + if (lp->pixelmode || (MI_NPIXELS(mi) <= 2)) { + if (MI_NPIXELS(mi) <= 2) { + XGCValues gcv; + + gcv.stipple = lp->pixmaps[state - 1]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = lp->black; + gcv.fill_style = FillOpaqueStippled; + XChangeGC(display, lp->stippledGC, + GCStipple | GCFillStyle | GCForeground | GCBackground, &gcv); + XFillRectangle(display, window, lp->stippledGC, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, lp->xs, lp->ys); + } else + XFillRectangle(display, window, gc, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, lp->xs, lp->ys); + } else { + (void) XPutImage(display, window, gc, + lp->logo, 0, 0, lp->xb + lp->xs * col, lp->yb + lp->ys * row, + lp->logo->width, lp->logo->height); + } +} + +static void +RandomSoup(life1dstruct * lp, int n, int v) +{ + int col; + + v /= 2; + if (v < 1) + v = 1; + for (col = lp->ncols / 2 - v; col < lp->ncols / 2 + v; ++col) + if (NRAND(100) < n && col >= 0 && col < lp->ncols) + lp->newcells[col + lp->border] = (unsigned char) NRAND(lp->k - 1) + 1; +} + +static long +power(int x, int n) +{ /* raise x to the nth power n >= 0 */ + int i; + long p = 1; + + for (i = 1; i <= n; ++i) + p = p * x; + return p; +} + +static void +GetRule(life1dstruct * lp, int i) +{ + long sum_size, j; + + if (totalistic) { + long code, pow_size; + + lp->k = totalistic_rules[i][0]; + lp->r = totalistic_rules[i][1]; + sum_size = (lp->k - 1) * (lp->r * 2 + 1) + 1; + code = lp->code = totalistic_rules[i][2]; + + pow_size = power(lp->k, (int) (sum_size - 1)); /* Should be < max long */ + for (j = 0; j < sum_size; j++) { + lp->nextstate[sum_size - 1 - j] = (char) (code / pow_size); + code -= ((long) lp->nextstate[sum_size - 1 - j]) * pow_size; + pow_size /= (long) lp->k; + } + } else { + lp->r = 1; +#ifdef LCAU2RULES + if (i < (int) LCAU2RULES) { + lp->k = 2; + sum_size = power(lp->k, 2 * lp->r + 1); + for (j = 0; j < sum_size; j++) + lp->nextstate[sum_size - 1 - j] = lcau21_rules[i][j] - '0'; + } else if (i < LCAU2RULES + LCAU3RULES) +#else + if (i < (int) LCAU3RULES) +#endif + { + lp->k = 3; + sum_size = power(lp->k, 2 * lp->r + 1); +#ifdef LCAU2RULES + i -= LCAU2RULES; +#endif + for (j = 0; j < sum_size; j++) + lp->nextstate[sum_size - 1 - j] = lcau31_rules[i][j] - '0'; + } else { + lp->k = 4; + sum_size = power(lp->k, 2 * lp->r + 1); +#ifdef LCAU2RULES + i -= (LCAU2RULES + LCAU3RULES); +#else + i -= LCAU3RULES; +#endif + for (j = 0; j < sum_size; j++) + lp->nextstate[sum_size - 1 - j] = lcau41_rules[i][j] - '0'; + } + } +} + +/* The following sometimes does not detect when there are multiple periodic + life forms side by side. */ +static int +compare(ModeInfo * mi) +{ + life1dstruct *lp = &life1ds[MI_SCREEN(mi)]; + int row, col, tryagain = False; + unsigned char *initl, *cmpr; + + initl = lp->buffer + lp->row * lp->ncols; + for (row = lp->row - 1; row >= 0; row--) { + cmpr = lp->buffer + row * lp->ncols; + for (col = 0; col < lp->ncols; col++) { + tryagain = False; + if (*(initl + col) != *cmpr) { + tryagain = True; + break; + } + cmpr++; + } + if (!tryagain) + return True; + } + return False; +} + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + life1dstruct *lp = &life1ds[MI_SCREEN(mi)]; + + if (!lp->logo) + getImage(mi, &lp->logo, CELL_WIDTH, CELL_HEIGHT, CELL_BITS, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + DEFAULT_XPM, CELL_NAME, +#endif + &lp->graphics_format, &lp->cmap, &lp->black); +#ifndef STANDALONE + if (lp->cmap != None) { + setColormap(display, window, lp->cmap, MI_IS_INWINDOW(mi)); + if (lp->backGC == None) { + XGCValues xgcv; + + xgcv.background = lp->black; + lp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* STANDALONE */ + { + lp->black = MI_BLACK_PIXEL(mi); + lp->backGC = MI_GC(mi); + } +} + +static void +free_stuff(Display * display, life1dstruct * lp) +{ + if (lp->cmap != None) { + XFreeColormap(display, lp->cmap); + if (lp->backGC != None) { + XFreeGC(display, lp->backGC); + lp->backGC = None; + } + lp->cmap = None; + } else + lp->backGC = None; + destroyImage(&lp->logo, &lp->graphics_format); +} + +void +init_life1d(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int size = MI_SIZE(mi); + life1dstruct *lp; + int i; + + if (life1ds == NULL) { + if ((life1ds = (life1dstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (life1dstruct))) == NULL) + return; + } + lp = &life1ds[MI_SCREEN(mi)]; + + init_stuff(mi); + + lp->screen_generation = 0; + lp->row = 0; + + if (totalistic) { + maxstates = MAXSTATES; + maxradius = 4; + maxsum_size = (maxstates - 1) * (maxradius * 2 + 1) + 1; + } else { + maxstates = MAXSTATES - 1; + maxradius = 1; + maxsum_size = (int) power(maxstates, (2 * maxradius + 1)); + } + if (lp->nextstate == NULL) + lp->nextstate = (char *) malloc(maxsum_size * sizeof (char)); + + if (lp->init_bits == 0) { + XGCValues gcv; + + gcv.fill_style = FillOpaqueStippled; + lp->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv); + for (i = 0; i < MAXSTATES - 1; i++) + LIFE1DBITS(stipples[i + NUMSTIPPLES - MAXSTATES + 1], + STIPPLESIZE, STIPPLESIZE); + LIFE1DBITS(stipples[NUMSTIPPLES / 2], + STIPPLESIZE, STIPPLESIZE); /* grey */ + } + if (lp->newcells != NULL) + (void) free((void *) lp->newcells); + if (lp->oldcells != NULL) + (void) free((void *) lp->oldcells); + if (lp->buffer != NULL) + (void) free((void *) lp->buffer); + lp->width = MI_WIDTH(mi); + lp->height = MI_HEIGHT(mi); + if (lp->width < 2) + lp->width = 2; + if (lp->height < 2) + lp->height = 2; + if (size == 0 || + MINGRIDSIZE * size > lp->width || MINGRIDSIZE * size > lp->height) { + if (lp->width > MINGRIDSIZE * lp->logo->width && + lp->height > MINGRIDSIZE * lp->logo->height) { + lp->pixelmode = False; + lp->xs = lp->logo->width; + lp->ys = lp->logo->height; + } else { + lp->pixelmode = True; + lp->xs = lp->ys = MAX(MINSIZE, MIN(lp->width, lp->height) / MINGRIDSIZE); + } + } else { + lp->pixelmode = True; + if (size < -MINSIZE) + lp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + lp->ys = MINSIZE; + else + lp->ys = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)); + lp->xs = lp->ys; + } + lp->ncols = MAX(lp->width / lp->xs, 2); + lp->nrows = MAX(lp->height / lp->ys, 2); + lp->border = (lp->nrows / 2 + 1) * MI_CYCLES(mi); + lp->newcells = (unsigned char *) calloc(lp->ncols + 2 * lp->border, + sizeof (unsigned char)); + + lp->oldcells = (unsigned char *) calloc(lp->ncols + + 2 * (maxradius + lp->border), sizeof (unsigned char)); + + lp->buffer = (unsigned char *) calloc(lp->ncols * lp->nrows, + sizeof (unsigned char)); + + lp->xb = (lp->width - lp->xs * lp->ncols) / 2; + lp->yb = (lp->height - lp->ys * lp->nrows) / 2; + + GetRule(lp, (int) NRAND((totalistic) ? TOTALISTICRULES : LCAURULES)); + if (MI_IS_VERBOSE(mi)) { + (void) fprintf(stdout, "colors %d, radius %d, code %ld, ", + lp->k, lp->r, lp->code); + if (totalistic) { + (void) fprintf(stdout, "totalistic rule "); + for (i = (lp->k - 1) * (lp->r * 2 + 1); i >= 0; i--) + (void) fprintf(stdout, "%d", (int) lp->nextstate[i]); + } else { + (void) fprintf(stdout, "LCAU rule "); + for (i = (int) power(lp->k, (lp->r * 2 + 1)); i >= 0; i--) + (void) fprintf(stdout, "%d", (int) lp->nextstate[i]); + } + (void) fprintf(stdout, "\n"); + } + if (MI_NPIXELS(mi) > 2) + for (i = 0; i < lp->k - 1; i++) + lp->colors[i] = (NRAND(MI_NPIXELS(mi)) + i * MI_NPIXELS(mi)) / + (lp->k - 1); + RandomSoup(lp, 40, 25); + (void) memcpy((char *) (lp->oldcells + maxradius + lp->border), + (char *) (lp->newcells + lp->border), lp->ncols); + lp->busyLoop = 0; + + MI_CLEARWINDOWCOLORMAP(mi, lp->backGC, lp->black); +} + +void +draw_life1d(ModeInfo * mi) +{ + life1dstruct *lp = &life1ds[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + int col; + + MI_IS_DRAWN(mi) = True; + + if (lp->busyLoop) { + if (lp->busyLoop >= 250) + lp->busyLoop = 0; + else + lp->busyLoop++; + return; + } + if (lp->row == 0) { + lp->repeating = 0; + if (lp->screen_generation > MI_CYCLES(mi)) + init_life1d(mi); + + for (col = 0; col < lp->ncols; col++) + if (lp->buffer[col] != lp->newcells[col + lp->border]) + drawcell(mi, col, 0, lp->newcells[col + lp->border]); + (void) memcpy((char *) lp->buffer, (char *) (lp->newcells + lp->border), + lp->ncols); + } else { + for (col = 0; col < lp->ncols + 2 * lp->border; col++) { + int sum = 0, m; + + if (totalistic) { + for (m = col - lp->r; m <= col + lp->r; m++) + sum += lp->oldcells[m + maxradius]; + } else { + int pow_size = 1; + + for (m = col + lp->r; m >= col - lp->r; m--) { + sum += lp->oldcells[m + maxradius] * pow_size; + pow_size *= lp->k; + } + } + lp->newcells[col] = (unsigned char) lp->nextstate[sum]; + } + (void) memcpy((char *) (lp->oldcells + maxradius), + (char *) lp->newcells, lp->ncols + 2 * lp->border); + + for (col = 0; col < lp->ncols; col++) { + if (lp->buffer[col + lp->row * lp->ncols] != + lp->newcells[col + lp->border]) + drawcell(mi, col, lp->row, lp->newcells[col + lp->border]); + } + (void) memcpy((char *) (lp->buffer + lp->row * lp->ncols), + (char *) (lp->newcells + lp->border), lp->ncols); + { + int temp = compare(mi); + + if (temp) + lp->repeating += temp; + else + lp->repeating = 0; + } + lp->repeating += (lp->row == lp->nrows - 1) ? REPEAT * compare(mi) : 0; + } + if (lp->repeating >= 1) { + XGCValues gcv; + + gcv.stipple = lp->pixmaps[MAXSTATES - 1]; + gcv.fill_style = FillStippled; + gcv.foreground = lp->black; + XChangeGC(MI_DISPLAY(mi), lp->stippledGC, + GCStipple | GCFillStyle | GCForeground, &gcv); + XFillRectangle(display, MI_WINDOW(mi), lp->stippledGC, + 0, lp->yb + lp->ys * lp->row, + lp->width, lp->ys); + } + lp->row++; + if (lp->repeating >= REPEAT) { + if (lp->row < lp->nrows) { + XSetForeground(display, lp->backGC, lp->black); + XFillRectangle(display, MI_WINDOW(mi), lp->backGC, + 0, lp->yb + lp->ys * lp->row, + lp->width, lp->height - lp->ys * lp->row - lp->yb); + } + lp->screen_generation = MI_CYCLES(mi); + lp->row = lp->nrows; + } + if (lp->row >= lp->nrows) { + lp->screen_generation++; + lp->busyLoop = 1; + lp->row = 0; + } +} + +void +release_life1d(ModeInfo * mi) +{ + if (life1ds != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + life1dstruct *lp = &life1ds[screen]; + int shade; + + if (lp->stippledGC != NULL) { + XFreeGC(MI_DISPLAY(mi), lp->stippledGC); + } + if (lp->init_bits != 0) { + for (shade = 0; shade < MAXSTATES; shade++) + XFreePixmap(MI_DISPLAY(mi), lp->pixmaps[shade]); + } + if (lp->newcells != NULL) + (void) free((void *) lp->newcells); + if (lp->oldcells != NULL) + (void) free((void *) lp->oldcells); + if (lp->buffer != NULL) + (void) free((void *) lp->buffer); + if (lp->nextstate != NULL) + (void) free((void *) lp->nextstate); + free_stuff(MI_DISPLAY(mi), lp); + } + (void) free((void *) life1ds); + life1ds = NULL; + } +} + +void +refresh_life1d(ModeInfo * mi) +{ + life1dstruct *lp = &life1ds[MI_SCREEN(mi)]; + int row, col, nrow; + + for (row = 0; row < lp->nrows; row++) { + nrow = row * lp->ncols; + for (col = 0; col < lp->ncols; col++) + drawcell(mi, col, row, lp->buffer[col + nrow]); + } +} + +#endif /* MODE_life1d */ diff --git a/modes/life3d.c b/modes/life3d.c new file mode 100644 index 00000000..213ca64f --- /dev/null +++ b/modes/life3d.c @@ -0,0 +1,2319 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* life3d --- Extension to Conway's game of Life, Carter Bays' S45/B5 3d life */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)life3d.c 4.07 98/01/18 xlockmore"; + +#endif + +/*- + * Copyright (c) 1994 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 18-Apr-97: Memory leak fixed by Tom Schmidt + * 12-Mar-95: added LIFE_S567B6 compile-time option + * 12-Feb-95: shooting gliders added + * 07-Dec-94: used life.c and a DOS version of 3dlife + * Copyright 1993 Anthony Wesley awesley@canb.auug.org.au found at + * life.anu.edu.au /pub/complex_systems/alife/3DLIFE.ZIP + * There is some flashing that was not in the original. This is because + * the direct video memory access garbage collection was not portable. + * + * + * References: + * Dewdney, A.K., "The Armchair Universe, Computer Recreations from the + * Pages of Scientific American Magazine", W.H. Freedman and Company, + * New York, 1988 (February 1987 p 16) + * Bays, Carter, "The Game of Three Dimensional Life", 86/11/20 + * with (latest?) update from 87/2/1 + */ + +#ifdef STANDALONE +#define PROGCLASS "Life3D" +#define HACK_INIT init_life3d +#define HACK_DRAW draw_life3d +#define life3d_opts xlockmore_opts +#define DEFAULTS "*delay: 1000000 \n" \ + "*count: 35 \n" \ + "*cycles: 85 \n" \ + "*ncolors: 200 \n" \ + "*wireframe: False \n" \ + "*fullrandom: False \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_life3d + +#if 1 +#define DEF_RULE3D "G" /* All rules with gliders */ +#else +#define DEF_RULE3D "P" /* All rules with known patterns */ +#define DEF_RULE3D "S45/B5" /* "B5/S45" */ +#define DEF_RULE3D "S567/B6" /* "B6/S567" */ +#endif + +static char *rule3d; +static char *life3dfile; + +static XrmOptionDescRec opts[] = +{ + {"-rule3d", ".life3d.rule3d", XrmoptionSepArg, (caddr_t) NULL}, + {"-life3dfile", ".life3d.life3dfile", XrmoptionSepArg, (caddr_t) NULL} +}; +static argtype vars[] = +{ + {(caddr_t *) & rule3d, "rule3d", "Rule3D", DEF_RULE3D, t_String}, + {(caddr_t *) & life3dfile, "life3dfile", "Life3DFile", "", t_String} +}; +static OptionStruct desc[] = +{ + {"-rule3d string", "S/B parameters"}, + {"-life3dfile file", "life file"}, +}; + +ModeSpecOpt life3d_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct life3d_description = +{"life3d", "init_life3d", "draw_life3d", "release_life3d", + "refresh_life3d", "change_life3d", NULL, &life3d_opts, + 1000000, 35, 85, 1, 64, 1.0, "", + "Shows Bays' game of 3D Life", 0, NULL}; + +#endif + +#define ON 0x40 +#define OFF 0 + +/* Don't change these numbers without changing the offset() macro below! */ +#define MAXSTACKS 64 +#define MAXROWS 128 +#define MAXCOLUMNS 128 +#define BASESIZE ((MAXCOLUMNS*MAXROWS*MAXSTACKS)>>6) + +#define RT_ANGLE 90 +#define HALFRT_ANGLE 45 +#define MAXNEIGHBORS 27 + +/* Store state of cell in top bit. Reserve low bits for count of living nbrs */ +#define Set3D(x,y,z) SetMem(lp,(unsigned int)x,(unsigned int)y,(unsigned int)z,ON) +#define Reset3D(x,y,z) SetMem(lp,(unsigned int)x,(unsigned int)y,(unsigned int)z,OFF) + +#define SetList3D(x,y,z) SetMem(lp,(unsigned int)x,(unsigned int)y,(unsigned int)z,ON), AddToList(lp,(unsigned int)x,(unsigned int)y,(unsigned int)z) + +#define CellState3D(c) ((c)&ON) +#define CellNbrs3D(c) ((c)&0x1f) /* 26 <= 31 */ + +#define EyeToScreen 72.0 /* distance from eye to screen */ +#define HalfScreenD 14.0 /* 1/2 the diameter of screen */ +#define BUCKETSIZE 10 +#define NBUCKETS ((MAXCOLUMNS+MAXROWS+MAXSTACKS)*BUCKETSIZE) +#define Distance(x1,y1,z1,x2,y2,z2) sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2)) + +#define IP 0.0174533 + +#define COLORBASE 3 +#define COLORS (COLORBASE + 2) +#define COLORSTEP (MI_NPIXELS(mi)/COLORBASE) /* 21 different colors per side */ + +#define BLACK 0 +#define RED 1 +#define GREEN 2 +#define BLUE 3 +#define WHITE 4 +#define NUMPTS 42 +#define NUMFILEPTS (2*NUMPTS) + +typedef struct _CellList { + unsigned char x, y, z; /* Location in world coordinates */ + char visible; /* 1 if the cube is to be displayed */ + short dist; /* dist from cell to eye */ + struct _CellList *next; /* pointer to next entry on linked list */ + struct _CellList *prev; + struct _CellList *priority; +} CellList; + +typedef struct { + int survival, birth; +} paramstruct; + +typedef struct { + Bool painted; + paramstruct param; + int pattern, patterned_rule; + int ox, oy, oz; /* origin */ + double vx, vy, vz; /* viewpoint */ + int generation; + int nstacks, nrows, ncolumns; + int memstart; + char visible; + unsigned char *base[BASESIZE]; + double A, B, C, F; + int width, height; + unsigned long color[COLORS]; + int alt, azm; + double dist; + CellList *ptrhead, *ptrend, eraserhead, eraserend; + CellList *buckethead[NBUCKETS], *bucketend[NBUCKETS]; /* comfortable upper b */ + Bool wireframe; +} life3dstruct; + +static life3dstruct *life3ds = NULL; + +static paramstruct input_param; +static Bool allPatterns = False, allGliders = False; +static char *filePattern = NULL; + +/*- + * S45/B5 life is probably the best + * S567/B6 life has gliders like Conway's 2d S23/B3 life + * There are no known gliders for S56/B5 or S67/B67, + * so the others may be better + */ + +static char patterns_S45B5[][3 * NUMPTS + 1] = +{ +#if 0 +/* Still life */ + { /* V */ + -1, -1, -1, 0, -1, -1, + -1, 0, -1, 0, 0, -1, + + -1, -1, 0, 0, -1, 0, + 127 + }, + { /* CROSS */ + 0, 0, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + 0, 0, 1, + 127 + }, + { /* PILLAR */ + 0, -1, -1, + -1, 0, -1, 1, 0, -1, + 0, 1, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + 127 + }, +#endif + { /* BLINKER P2 */ + 0, 0, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, 0, 1, 1, 0, 1, + 127 + }, + { /* DOUBLE BLINKER P2 */ + 0, -1, -1, + 0, 1, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, 0, 1, 1, 0, 1, + 127 + }, + { /* TRIPLE BLINKER 1 P2 */ + -1, -1, -2, + -1, 0, -2, + + -2, -1, -1, + 1, 0, -1, + -1, 1, -1, 0, 1, -1, + + -1, -2, 0, 0, -2, 0, + -2, -1, 0, 1, 0, 0, + + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* TRIPLE BLINKER 2 P2 */ + -1, -1, -2, 0, -1, -2, + + 0, -2, -1, + 1, -1, -1, + 1, 0, -1, + -1, 1, -1, + + 0, -2, 0, + -2, -1, 0, + -2, 0, 0, + -1, 1, 0, + + -1, 0, 1, 0, 0, 1, + 127 + }, + { /* THREE HALFS BLINKER P2 */ + 0, -1, -1, + -1, 0, -1, 1, 0, -1, + + -1, -1, 0, + 1, 0, 0, + -1, 1, 0, 0, 1, 0, + + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* PUFFER P4 */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + 127 + }, + { /* PINWHEEL P4 */ + -1, 1, -1, 0, 1, -1, + + -1, -1, 0, 0, -1, 0, + -2, 0, 0, 1, 0, 0, + + -1, 0, 1, 0, 0, 1, + -1, 1, 1, 0, 1, 1, + 127 + }, + { /* HEART P4 */ + -1, -1, -1, + -1, 0, -1, 0, 0, -1, + + 0, -1, 0, + -2, 0, 0, 1, 0, 0, + + -1, -1, 1, + -1, 1, 1, 0, 1, 1, + 127 + }, + { /* ARROW P4 */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + 1, -1, 0, + 1, 0, 0, + 0, 1, 0, + + -1, -1, 1, + -1, 0, 1, + 127 + }, + { /* ROTOR P2 */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* BRONCO P4 */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, -1, 1, + -1, 0, 1, + 127 + }, + { /* TRIPUMP P2 */ + 0, -2, -2, + -2, -1, -2, -1, -1, -2, 0, -1, -2, + + 0, -2, -1, + -2, 0, -1, + -2, 1, -1, -1, 1, -1, + + 1, -2, 0, + 1, -1, 0, + 1, 0, 0, + -1, 1, 0, + + 0, 0, 1, 1, 0, 1, + -1, 1, 1, + 127 + }, + { /* WINDSHIELDWIPER (HELICOPTER) P2 */ + -2, -1, -2, -1, -1, -2, + 0, 0, -2, + + -1, -2, -1, + -2, -1, -1, + 1, 0, -1, + -1, 1, -1, 0, 1, -1, 1, 1, -1, + + 0, -2, 0, + -2, -1, 0, 1, -1, 0, + + 0, -2, 1, + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* WALTZER P6 */ + -2, -1, -1, -1, -1, -1, 0, -1, -1, + -2, 0, -1, + -1, 1, -1, 0, 1, -1, + + -2, -1, 0, + -2, 0, 0, 1, 0, 0, + 1, 1, 0, + + -1, 0, 1, 0, 0, 1, + 0, 1, 1, + 127 + }, + { /* BIG WALTZER P6 */ + 0, -1, -1, 1, -1, -1, + -1, 0, -1, 0, 0, -1, + -1, 1, -1, + + 0, -2, 0, 1, -2, 0, + -2, 0, 0, + -2, 1, 0, + + 0, -1, 1, 1, -1, 1, + -1, 0, 1, 0, 0, 1, + -1, 1, 1, + 127 + }, + { /* SEESAW P2 */ + 0, 0, -2, + + -2, -1, -1, -1, -1, -1, + -2, 0, -1, + 0, 1, -1, + + -1, -1, 0, + 1, 0, 0, + 0, 1, 0, 1, 1, 0, + + -1, 0, 1, + 127 + }, + { /* COLLISION -> REDIRECTION */ + -3, 5, -7, 0, 5, -7, + -3, 4, -7, 0, 4, -7, + -2, 3, -7, -1, 3, -7, + + -2, 5, -6, -1, 5, -6, + -2, 4, -6, -1, 4, -6, + + 1, -2, 1, + + 1, -3, 2, + 0, -2, 2, 2, -2, 2, + 1, -1, 2, + + 0, -2, 3, 2, -2, 3, + 127 + }, + { /* COLLISION -> SEESAW P2 */ + -4, -6, -7, -1, -6, -7, + -4, -5, -7, -1, -5, -7, + -3, -4, -7, -2, -4, -7, + + -3, -6, -6, -2, -6, -6, + -3, -5, -6, -2, -5, -6, + + 1, 4, 6, 2, 4, 6, + 0, 5, 6, 3, 5, 6, + 0, 6, 6, 3, 6, 6, + + 1, 5, 5, 2, 5, 5, + 1, 6, 5, 2, 6, 5, + 127 + } +}; + +static char patterns_S567B6[][3 * NUMPTS + 1] = +{ + { /* KNIFE-SWITCH BLINKER */ + 0, -1, -1, + -1, 0, -1, 0, 0, -1, 1, 0, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 0, 1, + 127, + }, + { /* CLOCK */ + 0, -1, -2, + 0, 0, -2, + + -2, -1, -1, 0, -1, -1, + -2, 0, -1, 0, 0, -1, + + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + + -1, -1, 1, + -1, 0, 1, + 127, + }, + { /* HALF BLINKERS */ + 0, -1, -2, + 0, 0, -2, + + -1, -1, -1, 1, -1, -1, + -1, 0, -1, 1, 0, -1, + 0, 1, -1, + + -1, -2, 0, 0, -2, 0, 1, -2, 0, + -2, -1, 0, 2, -1, 0, + -2, 0, 0, 2, 0, 0, + 0, 1, 0, + + -1, -1, 1, 1, -1, 1, + -1, 0, 1, 1, 0, 1, + 0, 1, 1, + + 0, -1, 2, + 0, 0, 2, + 127, + }, + { /* MUTANT HALF BLINKERS */ + 0, -1, -2, + 0, 0, -2, + + 0, -2, -1, + -1, -1, -1, 1, -1, -1, + -1, 0, -1, 1, 0, -1, + 0, 1, -1, + + -1, -2, 0, 1, -2, 0, + -2, -1, 0, 2, -1, 0, + -2, 0, 0, 2, 0, 0, + 0, 1, 0, + + 0, -2, 1, 1, -2, 1, + -1, -1, 1, 2, -1, 1, + -1, 0, 1, 2, 0, 1, + 0, 1, 1, + + 0, -1, 2, 1, -1, 2, + 0, 0, 2, + 127, + }, + { /* FUSE */ + 0, 0, 4, + + 0, 0, 3, + + 0, -2, 2, + -1, -1, 2, 1, -1, 2, + -2, 0, 2, 2, 0, 2, + -1, 1, 2, 1, 1, 2, + 0, 2, 2, + + 0, -2, 1, + -1, -1, 1, 1, -1, 1, + -2, 0, 1, 2, 0, 1, + -1, 1, 1, 1, 1, 1, + 0, 2, 1, + + 0, 0, 0, + + 0, 0, -1, + + 0, -2, -2, + -1, -1, -2, 1, -1, -2, + -2, 0, -2, 2, 0, -2, + -1, 1, -2, 1, 1, -2, + 0, 2, -2, + + 0, -2, -3, + -1, -1, -3, 1, -1, -3, + -2, 0, -3, 2, 0, -3, + -1, 1, -3, 1, 1, -3, + 0, 2, -3, + + -1, 0, -4, 0, 0, -4, 1, 0, -4, + 127, + }, + { /* 2 PTS OF STAR OF DAVID */ + 1, 0, -3, 2, 0, -3, + + 1, -1, -2, 2, -1, -2, + 0, 0, -2, + 1, 1, -2, 2, 1, -2, + + 1, 0, -1, 2, 0, -1, + + -2, 0, 0, 0, 0, 0, + + -2, -1, 1, + -3, 0, 1, -1, 0, 1, + -2, 1, 1, + + -2, -1, 2, + -3, 0, 2, -1, 0, 2, + -2, 1, 2, + 127, + }, + { /* TRIPLE BLINKER 1 */ + 0, -1, -2, + 0, 0, -2, + + -1, -1, -1, 1, -1, -1, + -2, 0, -1, + -1, 1, -1, 0, 1, -1, + + -1, -2, 0, 0, -2, 0, + 1, -1, 0, + -2, 0, 0, 0, 0, 0, + + -1, -1, 1, + -1, 0, 1, + 127, + }, + { /* TRIPLE BLINKER 2 */ + -1, -1, -2, 0, -1, -2, + + -1, -2, -1, + -2, -1, -1, -1, -1, -1, + -2, 0, -1, + 0, 1, -1, + + -1, -2, 0, + 1, -1, 0, + 0, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, 0, 1, 0, 0, 1, + 127, + }, + { /* TRIKNOT */ + 0, 0, -1, 1, 0, -1, + + -1, -1, 0, 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + 0, 0, 1, + 0, 1, 1, + 127, + }, + { /* SEARCHLIGHT */ + -1, -1, -2, 0, -1, -2, + -1, 0, -2, 0, 0, -2, + + -1, -2, -1, 0, -2, -1, + -2, -1, -1, 1, -1, -1, + -2, 0, -1, 1, 0, -1, + 0, 1, -1, + + -1, -2, 0, 0, -2, 0, + 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, -1, 1, 0, -1, 1, + 127, + }, + { /* POLE DRIVER */ + -1, -1, -1, 0, -1, -1, + -1, 0, -1, 1, 0, -1, + 0, 1, -1, 1, 1, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + 0, 0, 1, + 127, + }, + { /* LITTLE STAR */ + 0, -1, -1, + -1, 0, -1, 1, 0, -1, + -1, 1, -1, 0, 1, -1, 1, 1, -1, + + -1, -1, 0, 1, -1, 0, + -1, 1, 0, 1, 1, 0, + + -1, -1, 1, 0, -1, 1, 1, -1, 1, + -1, 0, 1, 1, 0, 1, + 0, 1, 1, + 127, + }, + { /* JAWS */ + 0, -1, -2, + -1, 0, -2, 1, 0, -2, + 0, 1, -2, + + 0, -2, -1, + -1, -1, -1, 1, -1, -1, + -1, 0, -1, 2, 0, -1, + 0, 1, -1, 1, 1, -1, + + -1, -2, 0, 1, -2, 0, + -1, -1, 0, 2, -1, 0, + 1, 1, 0, 2, 1, 0, + + 0, -2, 1, + 0, -1, 1, 1, -1, 1, + 1, 0, 1, 2, 0, 1, + + -2, 1, 1, + -2, 2, 1, -1, 2, 1, + + -2, 1, 2, -1, 1, 2, + -2, 2, 2, -1, 2, 2, + 127, + }, + { /* NEAR SHIP */ + -2, -1, -2, -1, -1, -2, + -2, 0, -2, -1, 0, -2, + + -2, -1, -1, -1, -1, -1, + -2, 0, -1, -1, 0, -1, + + 0, -1, 0, + 0, 0, 0, + + -2, -1, 1, -1, -1, 1, + -2, 0, 1, -1, 0, 1, + + -2, -1, 2, -1, -1, 2, + -2, 0, 2, -1, 0, 2, + 127 + } +}; + +/*- + * Many names of S56/B5 & S67/B67 are made up by David Bagley. + * They are listed in * order given by Carter Bays all p2 except "H" + */ +static char patterns_S56B5[][3 * NUMPTS + 1] = +{ + { /* SEESAW */ + 0, -1, -1, + -1, 0, -1, 0, 0, -1, + + 0, 0, 0, 1, 0, 0, + 0, 1, 0, + 127 + }, + { /* PROP */ + -1, 0, -1, 0, 0, -1, 1, 0, -1, + + 0, -1, 0, + 0, 0, 0, + 0, 1, 0, + 127 + }, + { /* */ + -1, 0, -1, 0, 0, -1, + + 0, -1, 0, + 0, 0, 0, 1, 0, 0, + 0, 1, 0, + 127 + }, + { /* COLUMN */ + 0, 0, -6, + + 0, 0, -5, + + 0, -1, -4, + -1, 0, -4, 0, 0, -4, 1, 0, -4, + 0, 1, -4, + + 0, -1, -1, + -1, 0, -1, 0, 0, -1, 1, 0, -1, + 0, 1, -1, + + 0, 0, 0, + + 0, 0, 1, + + 0, 0, 2, + + 0, 0, 3, + + 0, -1, 4, + -1, 0, 4, 0, 0, 4, 1, 0, 4, + 0, 1, 4, + 127 + }, + { /* FLIPPING C */ + -1, 0, -1, 1, 0, -1, + + -1, 0, 0, 0, 0, 0, 1, 0, 0, + 127 + }, + { /* SLIDING BLOCKS */ + -1, 0, -1, 0, 0, -1, + -1, 1, -1, 0, 1, -1, + + -1, -1, 0, 0, -1, 0, + 0, 0, 0, + 127 + }, + { /* */ + -1, -1, -1, + -1, 1, -1, + + -1, 0, 0, 0, 0, 0, 1, 0, 0, + + -1, -1, 1, + -1, 1, 1, + 127 + }, + { /* Y */ + 1, -1, -1, + -1, 0, -1, + 0, 1, -1, + + 1, -1, 0, + -1, 0, 0, 0, 0, 0, + 0, 1, 0, + 127 + }, + { /* PUMP */ + 0, -1, -1, + -1, 0, -1, 1, 0, -1, + 0, 1, -1, + + -1, -1, 0, 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, 1, 1, 0, + 127 + }, + { /* WALKER */ + -1, -1, -1, 0, -1, -1, + 1, 0, -1, + + 0, -1, 0, 1, -1, 0, + -1, 0, 0, 0, 0, 0, + 127 + }, + { /* SWITCH */ + 2, -1, -2, + 1, 0, -2, 2, 0, -2, + + 1, -1, -1, 2, -1, -1, + 1, 0, -1, + + 1, 0, 0, + + -1, -1, 1, + -2, 0, 1, -1, 0, 1, 0, 0, 1, + + -2, -1, 2, -1, -1, 2, + -2, 0, 2, + 127 + }, + { /* HOPPER */ + -1, -1, -1, 0, -1, -1, 1, -1, -1, + + 0, -1, 0, + -1, 0, 0, 0, 0, 0, 1, 0, 0, + 127 + }, + { /* PUSHUPS */ + -1, -2, -2, + + -1, -2, -1, 0, -2, -1, + -1, -1, -1, 0, -1, -1, + + -1, 0, 0, 0, 0, 0, + + -1, 0, 1, 0, 0, 1, + -1, 1, 1, + 127 + }, + { /* PUSHER */ + 0, -2, -2, + 0, -1, -2, + + -1, -2, -1, + -1, -1, -1, 0, -1, -1, + + -1, 0, 0, 0, 0, 0, + 0, 1, 0, + + -1, 0, 1, + 0, 1, 1, + 127 + }, + { /* CAPACITOR */ + 0, -1, -2, + -1, 0, -2, 0, 0, -2, + + 0, 0, -1, 1, 0, -1, + 0, 1, -1, 1, 1, -1, + + 0, 0, 1, 1, 0, 1, + 0, 1, 1, 1, 1, 1, + + 0, -1, 2, + -1, 0, 2, 0, 0, 2, + 127 + }, + { /* CORNER 1 */ + -1, -3, -3, + -1, -2, -3, 0, -2, -3, + 1, -1, -3, + 1, 0, -3, 2, 0, -3, + + -1, -3, -2, + 0, -2, -2, + 1, -1, -2, + 2, 0, -2, + + -3, -3, -1, -2, -3, -1, + -3, -2, -1, + 2, 1, -1, + 1, 2, -1, 2, 2, -1, + + -3, -2, 0, -2, -2, 0, + 1, 1, 0, + 1, 2, 0, + + -3, -1, 1, -2, -1, 1, + -3, 0, 1, + 0, 1, 1, + -1, 2, 1, 0, 2, 1, + + -3, 0, 2, -2, 0, 2, + -1, 1, 2, + -1, 2, 2, + 127 + }, + { /* CORNER 2 */ + -2, -2, -3, -1, -2, -3, + -2, -1, -3, + 2, 1, -3, + 1, 2, -3, 2, 2, -3, + + -3, -2, -2, -1, -2, -2, + -3, -1, -2, 0, -1, -2, + 1, 0, -2, + 2, 1, -2, + 1, 3, -2, 2, 3, -2, + + -3, -2, -1, -2, -2, -1, + 0, -1, -1, + 1, 0, -1, + 2, 2, -1, + 2, 3, -1, + + -2, -1, 0, -1, -1, 0, + 1, 1, 0, + 1, 2, 0, + + -2, 0, 1, -1, 0, 1, + 0, 1, 1, + -3, 2, 1, 0, 2, 1, + -2, 3, 1, + + -3, 1, 2, -2, 1, 2, + -3, 2, 2, -1, 2, 2, + -2, 3, 2, -1, 3, 2, + 127 + }, + { /* RUNNER */ + -1, -2, -1, 0, -2, -1, + 0, -1, -1, + + -1, -1, 0, 0, -1, 0, + + -1, 0, 1, 0, 0, 1, + 0, 1, 1, + + -1, 1, 2, 0, 1, 2, + 127 + }, + { /* BACKWARDS RUNNER */ + -1, -2, -1, 0, -2, -1, + 0, -1, -1, + + -1, -1, 0, 0, -1, 0, + + -1, 0, 1, 0, 0, 1, + -1, 1, 1, + + -1, 0, 2, 0, 0, 2, + 127 + }, + { /* FLIPPING H */ + -1, 0, -1, 1, 0, -1, + + -1, 0, 0, 0, 0, 0, 1, 0, 0, + + -1, 0, 1, 1, 0, 1, + 127 + }, + { /* EAGLE */ + 0, -2, -1, 1, -2, -1, + 0, -1, -1, 1, -1, -1, + 0, 1, -1, 1, 1, -1, + 0, 2, -1, 1, 2, -1, + + 0, -1, 0, + -1, 0, 0, + 0, 1, 0, + 127 + }, + { /* VARIANT 1 */ + 1, -1, -2, + 0, 0, -2, + + 0, -1, -1, + 0, 0, -1, 1, 0, -1, + + -1, -1, 0, + + 0, -1, 1, + 0, 0, 1, 1, 0, 1, + + 1, -1, 2, + 0, 0, 2, + 127 + }, + { /* VARIANT 2 */ + 0, -1, -2, + 1, 0, -2, + + 0, -1, -1, 1, -1, -1, + 0, 0, -1, + + -1, 0, 0, + + 0, -1, 1, + 0, 0, 1, 1, 0, 1, + + 1, -1, 2, + 0, 0, 2, + 127 + }, + { /* VARIANT 3 */ + 1, -1, -2, + 0, 0, -2, + + 0, -1, -1, 1, -1, -1, + 0, 0, -1, + + -1, -1, 0, + + 0, -1, 1, + 0, 0, 1, 1, 0, 1, + + 1, -1, 2, + 0, 0, 2, + 127 + }, + { /* VARIANT 4 */ + 1, -1, -2, + 0, 0, -2, + + 0, -1, -1, 1, -1, -1, + 0, 0, -1, + + -1, 0, 0, + + 0, -1, 1, + 0, 0, 1, 1, 0, 1, + + 1, -1, 2, + 0, 0, 2, + 127 + }, + { /* SQUID */ + -2, -1, -2, -1, -1, -2, + 1, 1, -2, + 1, 2, -2, + + -2, -1, -1, -1, -1, -1, 0, -1, -1, + 1, 0, -1, + 1, 1, -1, + 1, 2, -1, + + -1, -1, 0, + 1, 1, 0, + + -1, 0, 1, + -2, 1, 1, -1, 1, 1, 0, 1, 1, + -2, 2, 1, -1, 2, 1, + 127 + }, + { /* ROWER */ + 0, 1, -2, + + -1, -1, -1, 1, -1, -1, + -2, 0, -1, -1, 0, -1, 1, 0, -1, 2, 0, -1, + + -1, 0, 0, 1, 0, 0, + -1, 1, 0, 1, 1, 0, + + 0, -1, 1, + 127 + }, + { /* FLIP */ + -1, -2, -2, + 0, -1, -2, + 0, 0, -2, + + -1, -2, -1, + -2, -1, -1, 1, -1, -1, + 1, 0, -1, + 1, 1, -1, + + -1, -2, 0, + -2, -1, 0, + -1, 1, 0, 0, 1, 0, + + -2, 0, 1, -1, 0, 1, 0, 0, 1, + 127 + } +}; +static char patterns_S67B67[][3 * NUMPTS + 1] = +{ + { /* WALKING BOX */ + -1, -1, -2, + 0, 0, -2, + + -1, -2, -1, 0, -2, -1, + -2, -1, -1, 1, -1, -1, + -2, 0, -1, 1, 0, -1, + -1, 1, -1, 0, 1, -1, + + -1, -2, 0, 0, -2, 0, + -2, -1, 0, 1, -1, 0, + -2, 0, 0, 1, 0, 0, + -1, 1, 0, 0, 1, 0, + + -1, -1, 1, + 0, 0, 1, + 127 + }, + { /* WALKER */ + 0, -1, -1, + -1, 0, -1, + + -1, -1, 0, 0, -1, 0, + -1, 0, 0, 0, 0, 0, + + 0, -1, 1, + -1, 0, 1, + 127 + }, + { /* S */ + -1, -1, -1, 0, -1, -1, + -1, 0, -1, 0, 0, -1, + + -1, 0, 0, 0, 0, 0, + -1, 1, 0, 0, 1, 0, + 127 + }, + { /* BACKWARDS ARROW */ + -1, 0, -1, 0, 0, -1, + + -1, 0, 0, 0, 0, 0, + -1, 1, 0, 0, 1, 0, + + -1, -1, 1, 0, -1, 1, + 127 + }, + { /* SPINING BOX */ + -1, -1, -2, 0, -1, -2, + -1, 0, -2, 0, 0, -2, + + 0, -2, -1, + -2, -1, -1, 1, -1, -1, + -2, 0, -1, + -1, 1, -1, 0, 1, -1, + + -1, -2, 0, 0, -2, 0, + -2, -1, 0, 1, -1, 0, + -2, 0, 0, 1, 0, 0, + -1, 1, 0, 0, 1, 0, + + -1, -1, 1, 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* FLIPPING T */ + 0, 0, -1, + + 0, 0, 0, + + 0, -1, 1, + -1, 0, 1, 0, 0, 1, 1, 0, 1, + -1, 1, 1, 0, 1, 1, + 127 + } +}; + +static int patterns_rules[] = +{ + (sizeof patterns_S45B5 / sizeof patterns_S45B5[0]), + (sizeof patterns_S567B6 / sizeof patterns_S567B6[0]), + (sizeof patterns_S56B5 / sizeof patterns_S56B5[0]), + (sizeof patterns_S67B67 / sizeof patterns_S67B67[0]) +}; + +static paramstruct param_rules[] = +{ + {0x30, 0x20}, + {0xE0, 0x40}, + {0x60, 0x20}, + {0xC0, 0xC0} +}; + +#define LIFE_S45B5 0 +#define LIFE_S567B6 1 +#define LIFE_GLIDERS 2 /* GLIDER rules are first in param_rules */ +#define LIFE_S56B5 2 +#define LIFE_S67B67 3 +#define LIFE_RULES (sizeof patterns_rules / sizeof patterns_rules[0]) + +static int +codeToPatternedRule(paramstruct param) +{ + unsigned int i; + + for (i = 0; i < LIFE_RULES; i++) + if (param_rules[i].survival == param.survival && + param_rules[i].birth == param.birth) + return i; + return LIFE_RULES; +} + +static void +copyFromPatternedRule(paramstruct * param, int patterned_rule) +{ + param->survival = param_rules[patterned_rule].survival; + param->birth = param_rules[patterned_rule].birth; +} + +static void +printRule(paramstruct param) +{ + int l; + + (void) fprintf(stdout, "rule3d (Survival/Birth neighborhood): S"); + for (l = 0; l <= MAXNEIGHBORS; l++) { + if (param.survival & (1 << l)) + (void) fprintf(stdout, "%d", l); + } + (void) fprintf(stdout, "/B"); + for (l = 0; l <= MAXNEIGHBORS; l++) { + if (param.birth & (1 << l)) + (void) fprintf(stdout, "%d", l); + } + (void) fprintf(stdout, "\nbinary rule3d: Survival 0x%X, Birth 0x%X\n", + param.survival, param.birth); +} + +/*- + * This stuff is not good for rules above 9 cubes but it is unlikely that + * these modes would be much good anyway.... death assumed. + */ +static void +parseRule(ModeInfo * mi) +{ + int n, l; + char serving = 0; + static Bool found = False; + + if (found) + return; + + input_param.survival = input_param.birth = 0; + if (rule3d) { + n = 0; + while (rule3d[n]) { + if (rule3d[n] == 'P') { + allPatterns = True; + found = True; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "rule3d: All rules with known patterns\n"); + return; + } else if (rule3d[n] == 'G') { + allGliders = True; + found = True; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, "rule3d: All rules with known gliders\n"); + return; + } else if (rule3d[n] == 'S' || rule3d[n] == 'E' || rule3d[n] == 'L') { + serving = 'S'; + } else if (rule3d[n] == 'B') { + serving = 'B'; + } else { + l = rule3d[n] - '0'; + if (l >= 0 && l <= 9 /*&& l <= MAXNEIGHBORS */ ) { /* no 10..27 */ + if (serving == 'S') { + found = True; + input_param.survival |= (1 << l); + } else if (serving == 'B') { + found = True; + input_param.birth |= (1 << l); + } + } + } + n++; + } + } + if (!found) { /* Default to Bays' rules if very stupid */ + allGliders = True; + found = True; + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stdout, + "rule3d: Defaulting to all rules with known gliders\n"); + return; + } + if (MI_IS_VERBOSE(mi)) + printRule(input_param); +} + +static void +parseFile(void) +{ + FILE *file; + static Bool done = False; + int firstx = 0, firsty = 0, x = 0, y = 0, z = 0, i = 0; + int c = 0, cprev = ' '; + char line[256]; + + if (done) + return; + done = True; + if (!life3dfile || !*life3dfile || + ((file = my_fopen(life3dfile, "r")) == NULL)) { + /*(void) fprintf(stderr, "could not read file \"%s\"\n", life3dfile); */ + return; + } + for (;;) { + if (!fgets(line, 256, file)) { + (void) fprintf(stderr, "could not read header of file \"%s\"\n", + life3dfile); + (void) fclose(file); + return; + } + if (strncmp(line, "#P", (size_t) 2) == 0 && + sscanf(line, "#P %d %d %d", &x, &y, &z) == 3) + break; + } + c = getc(file); + while (c != EOF && !(c == '0' || c == 'O' || c == '*' || c == '.')) { + c = getc(file); + } + if (c == EOF || x <= -127 || y <= -127 || z <= -127 || + x >= 127 || y >= 127 || z >= 127) { + (void) fprintf(stderr, "corrupt file \"%s\" or file to large\n", + life3dfile); + (void) fclose(file); + return; + } + firstx = x; + firsty = y; + filePattern = (char *) malloc((3 * NUMFILEPTS + 1) * sizeof (char)); + + while (c != EOF && x < 127 && y < 127 && i < 3 * NUMFILEPTS) { + if (c == '0' || c == 'O' || c == '*') { + filePattern[i++] = x++; + filePattern[i++] = y; + filePattern[i++] = z; + } else if (c == '.') { + x++; + } else if (c == '\n') { + if (cprev == '\n') { + z++; + y = firsty; + } else { + x = firstx; + y++; + } + } + cprev = c; + c = getc(file); + } + (void) fclose(file); + filePattern[i] = 127; +} + +/*--- list ---*/ +/* initialise the state of all cells to OFF */ +static void +Init3D(life3dstruct * lp) +{ + lp->ptrhead = lp->ptrend = NULL; + lp->eraserhead.next = &lp->eraserend; + lp->eraserend.prev = &lp->eraserhead; +} + +static CellList * +NewCell(void) +{ + return ((CellList *) malloc(sizeof (CellList))); +} + +/*- + * Function that adds the cell (assumed live) at (x,y,z) onto the search + * list so that it is scanned in future generations + */ +static void +AddToList(life3dstruct * lp, unsigned int x, unsigned int y, unsigned int z) +{ + CellList *tmp; + + tmp = NewCell(); + tmp->x = x; + tmp->y = y; + tmp->z = z; + if (lp->ptrhead == NULL) { + lp->ptrhead = lp->ptrend = tmp; + tmp->prev = NULL; + } else { + lp->ptrend->next = tmp; + tmp->prev = lp->ptrend; + lp->ptrend = tmp; + } + lp->ptrend->next = NULL; +} + +static void +AddToEraseList(life3dstruct * lp, CellList * cell) +{ + cell->next = &lp->eraserend; + cell->prev = lp->eraserend.prev; + lp->eraserend.prev->next = cell; + lp->eraserend.prev = cell; +} + +static void +DelFromList(life3dstruct * lp, CellList * cell) +{ + if (cell != lp->ptrhead) + cell->prev->next = cell->next; + else { + lp->ptrhead = cell->next; + if (lp->ptrhead != NULL) + lp->ptrhead->prev = NULL; + } + + if (cell != lp->ptrend) + cell->next->prev = cell->prev; + else { + lp->ptrend = cell->prev; + if (lp->ptrend != NULL) + lp->ptrend->next = NULL; + } + + AddToEraseList(lp, cell); +} + +static void +DelFromEraseList(CellList * cell) +{ + cell->next->prev = cell->prev; + cell->prev->next = cell->next; + (void) free((void *) cell); +} + +/*--- memory ---*/ +/*- + * Simulate a large array by dynamically allocating 4x4x4 size cells when + * needed. + */ +static void +MemInit(life3dstruct * lp) +{ + int i; + + for (i = 0; i < BASESIZE; ++i) { + if (lp->base[i] != NULL) { + (void) free((void *) lp->base[i]); + lp->base[i] = NULL; + } + } + lp->memstart = 0; +} + +static void +BaseOffset(life3dstruct * lp, + unsigned int x, unsigned int y, unsigned int z, int *b, int *o) +{ + *b = ((x & 0x7c) << 7) + ((y & 0x7c) << 2) + ((z & 0x7c) >> 2); + *o = (x & 3) + ((y & 3) << 2) + ((z & 3) << 4); + + if (!lp->base[*b]) + lp->base[*b] = (unsigned char *) calloc(64, sizeof (unsigned char)); +} + +static int +GetMem(life3dstruct * lp, unsigned int x, unsigned int y, unsigned int z) +{ + int b, o; + + if (lp->memstart) + MemInit(lp); + BaseOffset(lp, x, y, z, &b, &o); + return lp->base[b][o]; +} + +static void +SetMem(life3dstruct * lp, + unsigned int x, unsigned int y, unsigned int z, unsigned int val) +{ + int b, o; + + if (lp->memstart) + MemInit(lp); + + BaseOffset(lp, x, y, z, &b, &o); + lp->base[b][o] = val; +} + +static void +ChangeMem(life3dstruct * lp, + unsigned int x, unsigned int y, unsigned int z, unsigned int val) +{ + int b, o; + + if (lp->memstart) + MemInit(lp); + BaseOffset(lp, x, y, z, &b, &o); + lp->base[b][o] += val; +} + +static void +ClearMem(life3dstruct * lp) +{ + int i, j, count; + + for (i = 0; i < BASESIZE; ++i) + if (lp->base[i] != NULL) { + for (count = j = 0; j < 64 && count == 0; ++j) + if (CellState3D(lp->base[i][j])) + ++count; + if (!count) { + (void) free((void *) lp->base[i]); + lp->base[i] = NULL; + } + } +} + + +/*- + * This routine increments the values stored in the 27 cells centred on + * (x,y,z) Note that the offset() macro implements wrapping - the world is a + * torus. + */ +static void +IncrementNbrs3D(life3dstruct * lp, CellList * cell) +{ + int xc, yc, zc, x, y, z; + + xc = cell->x; + yc = cell->y; + zc = cell->z; + for (z = zc - 1; z != zc + 2; ++z) + for (y = yc - 1; y != yc + 2; ++y) + for (x = xc - 1; x != xc + 2; ++x) + if (x != xc || y != yc || z != zc) + ChangeMem(lp, + (unsigned int) x, (unsigned int) y, (unsigned int) z, 1); +} + +static void +End3D(life3dstruct * lp) +{ + CellList *ptr; + + while (lp->ptrhead != NULL) { + SetMem(lp, lp->ptrhead->x, lp->ptrhead->y, lp->ptrhead->z, OFF); + DelFromList(lp, lp->ptrhead); + } + ptr = lp->eraserhead.next; + while (ptr != &lp->eraserend) { + DelFromEraseList(ptr); + ptr = lp->eraserhead.next; + } + MemInit(lp); +} + +static void +RunLife3D(life3dstruct * lp) +{ + unsigned int x, y, z, xc, yc, zc; + int c; + CellList *ptr, *ptrnextcell; + + /* Step 1 - Add 1 to all neighbours of living cells. */ + ptr = lp->ptrhead; + while (ptr != NULL) { + IncrementNbrs3D(lp, ptr); + ptr = ptr->next; + } + + /* Step 2 - Scan world and implement Survival rules. We have a list of live + * cells, so do the following: + * Start at the END of the list and work backwards (so we don't have to worry + * about scanning newly created cells since they are appended to the end) and + * for every entry, scan its neighbours for new live cells. If found, add them + * to the end of the list. If the centre cell is dead, unlink it. + * Make sure we do not append multiple copies of cells. + */ + ptr = lp->ptrend; + while (ptr != NULL) { + ptrnextcell = ptr->prev; + xc = ptr->x; + yc = ptr->y; + zc = ptr->z; + for (z = zc - 1; z != zc + 2; ++z) + for (y = yc - 1; y != yc + 2; ++y) + for (x = xc - 1; x != xc + 2; ++x) + if (x != xc || y != yc || z != zc) + if ((c = GetMem(lp, x, y, z))) { + if (CellState3D(c) == OFF) { + if (lp->param.birth & (1 << CellNbrs3D(c))) + SetList3D(x, y, z); + else + Reset3D(x, y, z); + } + } + c = GetMem(lp, xc, yc, zc); + if (lp->param.survival & (1 << CellNbrs3D(c))) + Set3D(xc, yc, zc); + else { + SetMem(lp, ptr->x, ptr->y, ptr->z, OFF); + DelFromList(lp, ptr); + } + ptr = ptrnextcell; + } + ClearMem(lp); +} + +#if 0 +static int +CountCells3D(life3dstruct * lp) +{ + CellList *ptr; + int count = 0; + + ptr = lp->ptrhead; + while (ptr != NULL) { + ++count; + ptr = ptr->next; + } + return count; +} + +void +DisplayList(life3dstruct * lp) +{ + CellList *ptr; + int count = 0; + + ptr = lp->ptrhead; + while (ptr != NULL) { + (void) printf("(%x)=[%d,%d,%d] ", (int) ptr, ptr->x, ptr->y, ptr->z); + ptr = ptr->next; + ++count; + } + (void) printf("Living cells = %d\n", count); +} + +#endif + +static void +RandomSoup(ModeInfo * mi, int n, int v) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + int x, y, z; + + v /= 2; + if (v < 1) + v = 1; + for (z = lp->nstacks / 2 - v; z < lp->nstacks / 2 + v; ++z) + for (y = lp->nrows / 2 - v; y < lp->nrows / 2 + v; ++y) + for (x = lp->ncolumns / 2 - v; x < lp->ncolumns / 2 + v; ++x) + if (NRAND(100) < n) + SetList3D(x, y, z); + if (MI_IS_VERBOSE(mi)) { + (void) fprintf(stdout, "random pattern\n"); + } +} + +static void +GetPattern(ModeInfo * mi, int pattern_rule, int pattern) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + int x, y, z; + char *patptr = NULL; + + if (filePattern) { + patptr = &filePattern[0]; + } else { + switch (pattern_rule) { + case LIFE_S45B5: + patptr = &patterns_S45B5[pattern][0]; + break; + case LIFE_S567B6: + patptr = &patterns_S567B6[pattern][0]; + break; + case LIFE_S56B5: + patptr = &patterns_S56B5[pattern][0]; + break; + case LIFE_S67B67: + patptr = &patterns_S67B67[pattern][0]; + break; + } + } + while ((x = *patptr++) != 127) { + y = *patptr++; + z = *patptr++; + x += lp->ncolumns / 2; + y += lp->nrows / 2; + z += lp->nstacks / 2; + if (x >= 0 && y >= 0 && z >= 0 && + x < lp->ncolumns && y < lp->nrows && z < lp->nstacks) + SetList3D(x, y, z); + } + if (MI_IS_VERBOSE(mi) && !filePattern) { + (void) fprintf(stdout, "table number %d\n", pattern); + } +} + +static void +NewViewpoint(life3dstruct * lp, double x, double y, double z) +{ + double k, l, d1, d2; + + k = x * x + y * y; + l = sqrt(k + z * z); + k = sqrt(k); + d1 = (EyeToScreen / HalfScreenD); + d2 = EyeToScreen / (HalfScreenD * lp->height / lp->width); + lp->A = d1 * l * (lp->width / 2) / k; + lp->B = l * l; + lp->C = d2 * (lp->height / 2) / k; + lp->F = k * k; +} + +static void +NewPoint(life3dstruct * lp, double x, double y, double z, + register XPoint * cubepts) +{ + double p1, E; + + p1 = x * lp->vx + y * lp->vy; + E = lp->B - p1 - z * lp->vz; + cubepts->x = (int) (lp->width / 2 - lp->A * (lp->vx * y - lp->vy * x) / E); + cubepts->y = (int) (lp->height / 2 - lp->C * (z * lp->F - lp->vz * p1) / E); +} + + +/* Chain together all cells that are at the same distance. These * cannot + mutually overlap. */ +static void +SortList(life3dstruct * lp) +{ + short dist; + double d, x, y, z, rsize; + int i, r; + XPoint point; + CellList *ptr; + + for (i = 0; i < NBUCKETS; ++i) + lp->buckethead[i] = lp->bucketend[i] = NULL; + + /* Calculate distances and re-arrange pointers to chain off buckets */ + ptr = lp->ptrhead; + while (ptr != NULL) { + + x = (double) ptr->x - lp->ox; + y = (double) ptr->y - lp->oy; + z = (double) ptr->z - lp->oz; + d = Distance(lp->vx, lp->vy, lp->vz, x, y, z); + if (lp->vx * (lp->vx - x) + lp->vy * (lp->vy - y) + + lp->vz * (lp->vz - z) > 0 && d > 1.5) + ptr->visible = 1; + else + ptr->visible = 0; + + ptr->dist = (short) d; + dist = (short) (d * BUCKETSIZE); + if (dist > NBUCKETS - 1) + dist = NBUCKETS - 1; + + if (lp->buckethead[dist] == NULL) { + lp->buckethead[dist] = lp->bucketend[dist] = ptr; + ptr->priority = NULL; + } else { + lp->bucketend[dist]->priority = ptr; + lp->bucketend[dist] = ptr; + lp->bucketend[dist]->priority = NULL; + } + ptr = ptr->next; + } + + /* Check for invisibility */ + rsize = 0.47 * lp->width / ((double) HalfScreenD * 2); + i = lp->azm; + if (i < 0) + i = -i; + i = i % RT_ANGLE; + if (i > HALFRT_ANGLE) + i = RT_ANGLE - i; + rsize /= cos(i * IP); + + lp->visible = 0; + for (i = 0; i < NBUCKETS; ++i) + lp->buckethead[i] = lp->bucketend[i] = NULL; + + /* Calculate distances and re-arrange pointers to chain off buckets */ + ptr = lp->ptrhead; + while (ptr != NULL) { + + x = (double) ptr->x - lp->ox; + y = (double) ptr->y - lp->oy; + z = (double) ptr->z - lp->oz; + d = Distance(lp->vx, lp->vy, lp->vz, x, y, z); + if (lp->vx * (lp->vx - x) + lp->vy * (lp->vy - y) + + lp->vz * (lp->vz - z) > 0 && d > 1.5) + ptr->visible = 1; + else + ptr->visible = 0; + + ptr->dist = (short) d; + dist = (short) (d * BUCKETSIZE); + if (dist > NBUCKETS - 1) + dist = NBUCKETS - 1; + + if (lp->buckethead[dist] == NULL) { + lp->buckethead[dist] = lp->bucketend[dist] = ptr; + ptr->priority = NULL; + } else { + lp->bucketend[dist]->priority = ptr; + lp->bucketend[dist] = ptr; + lp->bucketend[dist]->priority = NULL; + } + ptr = ptr->next; + } + + /* Check for invisibility */ + rsize = 0.47 * lp->width / ((double) HalfScreenD * 2); + i = lp->azm; + if (i < 0) + i = -i; + i = i % RT_ANGLE; + if (i > HALFRT_ANGLE) + i = RT_ANGLE - i; + rsize /= cos(i * IP); + + lp->visible = 0; + for (i = 0; i < NBUCKETS; ++i) + if (lp->buckethead[i] != NULL) { + ptr = lp->buckethead[i]; + while (ptr != NULL) { + if (ptr->visible) { + x = (double) ptr->x - lp->ox; + y = (double) ptr->y - lp->oy; + z = (double) ptr->z - lp->oz; + NewPoint(lp, x, y, z, &point); + + r = (int) (rsize * (double) EyeToScreen / (double) ptr->dist); + if (point.x + r >= 0 && point.y + r >= 0 && + point.x - r < lp->width && point.y - r < lp->height) + lp->visible = 1; + } + ptr = ptr->priority; + } + } +} + +static void +DrawFace(ModeInfo * mi, int color, XPoint * cubepts, + int p1, int p2, int p3, int p4) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + XPoint facepts[5]; + + facepts[0] = cubepts[p1]; + facepts[1] = cubepts[p2]; + facepts[2] = cubepts[p3]; + facepts[3] = cubepts[p4]; + facepts[4] = cubepts[p1]; + + if (!lp->wireframe) { + XSetForeground(display, gc, lp->color[color]); + XFillPolygon(display, MI_WINDOW(mi), gc, facepts, 4, + Convex, CoordModeOrigin); + } + if (lp->wireframe) { + XSetForeground(display, gc, lp->color[color]); + } else if (color == BLACK) + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XDrawLines(display, MI_WINDOW(mi), gc, facepts, 5, CoordModeOrigin); +} + +#define LEN 0.45 +#define LEN2 0.9 + +static int +DrawCube(ModeInfo * mi, CellList * cell) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + XPoint cubepts[8]; /* screen coords for point */ + int i = 0, out; + unsigned int mask; + double x, y, z; + double dx, dy, dz; + + x = (double) cell->x - lp->ox; + y = (double) cell->y - lp->oy; + z = (double) cell->z - lp->oz; + out = 0; + for (dz = z - LEN; dz <= z + LEN2; dz += LEN2) + for (dy = y - LEN; dy <= y + LEN2; dy += LEN2) + for (dx = x - LEN; dx <= x + LEN2; dx += LEN2) { + NewPoint(lp, dx, dy, dz, &cubepts[i]); + if (cubepts[i].x < 0 || cubepts[i].x >= lp->width || + cubepts[i].y < 0 || cubepts[i].y >= lp->height) + ++out; + ++i; + } + if (out == 8) + return (0); + + if (cell->visible) + mask = 0xFFFF; + else + mask = 0x0; + + /* Only draw those faces that are visible */ + dx = lp->vx - x; + dy = lp->vy - y; + dz = lp->vz - z; + if (lp->wireframe) { + if (dz <= LEN) + DrawFace(mi, (int) (BLUE & mask), cubepts, 4, 5, 7, 6); + else if (dz >= -LEN) + DrawFace(mi, (int) (BLUE & mask), cubepts, 0, 1, 3, 2); + if (dx <= LEN) + DrawFace(mi, (int) (GREEN & mask), cubepts, 1, 3, 7, 5); + else if (dx >= -LEN) + DrawFace(mi, (int) (GREEN & mask), cubepts, 0, 2, 6, 4); + if (dy <= LEN) + DrawFace(mi, (int) (RED & mask), cubepts, 2, 3, 7, 6); + else if (dy >= -LEN) + DrawFace(mi, (int) (RED & mask), cubepts, 0, 1, 5, 4); + } + if (dz > LEN) + DrawFace(mi, (int) (BLUE & mask), cubepts, 4, 5, 7, 6); + else if (dz < -LEN) + DrawFace(mi, (int) (BLUE & mask), cubepts, 0, 1, 3, 2); + if (dx > LEN) + DrawFace(mi, (int) (GREEN & mask), cubepts, 1, 3, 7, 5); + else if (dx < -LEN) + DrawFace(mi, (int) (GREEN & mask), cubepts, 0, 2, 6, 4); + if (dy > LEN) + DrawFace(mi, (int) (RED & mask), cubepts, 2, 3, 7, 6); + else if (dy < -LEN) + DrawFace(mi, (int) (RED & mask), cubepts, 0, 1, 5, 4); + return (1); +} + +static void +DrawScreen(ModeInfo * mi) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + CellList *ptr; + CellList *eraserptr; + int i; + + SortList(lp); + + /* Erase dead cubes */ + eraserptr = lp->eraserhead.next; + while (eraserptr != &lp->eraserend) { + eraserptr->visible = 0; + (void) DrawCube(mi, eraserptr); + DelFromEraseList(eraserptr); + eraserptr = lp->eraserhead.next; + } + + /* draw furthest cubes first */ + for (i = NBUCKETS - 1; i >= 0; --i) { + ptr = lp->buckethead[i]; + while (ptr != NULL) { + /*if (ptr->visible) */ + /* v += */ (void) DrawCube(mi, ptr); + ptr = ptr->priority; + /* ++count; */ + } + } +#if 0 + { + int count = 0, v = 0; + + + (void) printf("Pop=%-4d Viewpoint (%3d,%3d,%3d) Origin (%3d,%3d,%3d) Mode %dx%d\ +(%d,%d) %d\n", + count, (int) (lp->vx + lp->ox), (int) (lp->vy + lp->oy), + (int) (lp->vz + lp->oz), (int) lp->ox, (int) lp->oy, (int) lp->oz, + lp->width, lp->height, lp->alt, lp->azm, v); + } +#endif +} + +static void +shooter(life3dstruct * lp) +{ + int hsp, vsp, asp, hoff = 1, voff = 1, aoff = 1, r, c2, + r2, s2; + + /* Generate the glider at the edge of the screen */ +#define V 10 +#define V2 (V/2) + c2 = lp->ncolumns / 2; + r2 = lp->nrows / 2; + s2 = lp->nstacks / 2; + r = NRAND(3); + if (!r) { + hsp = NRAND(V2) + c2 - V2 / 2; + vsp = (LRAND() & 1) ? r2 - V : r2 + V; + asp = (LRAND() & 1) ? s2 - V : s2 + V; + if (asp > s2) + aoff = -1; + if (vsp > r2) + voff = -1; + if (hsp > c2) + hoff = -1; + if (lp->patterned_rule == LIFE_S45B5) { + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 3 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 3 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 1 * aoff); + } else if (lp->patterned_rule == LIFE_S567B6) { + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 2 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 2 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 2 * voff, asp + 2 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 2 * aoff); + } + } else if (r == 1) { + hsp = (LRAND() & 1) ? c2 - V : c2 + V; + vsp = (LRAND() & 1) ? r2 - V : r2 + V; + asp = NRAND(V2) + s2 - V2 / 2; + if (asp > s2) + aoff = -1; + if (vsp > r2) + voff = -1; + if (hsp > c2) + hoff = -1; + if (lp->patterned_rule == LIFE_S45B5) { + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 3 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 3 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 2 * aoff); + } else if (lp->patterned_rule == LIFE_S567B6) { + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 2 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 2 * voff, asp + 1 * aoff); + } + } else { + hsp = (LRAND() & 1) ? c2 - V : c2 + V; + vsp = NRAND(V2) + r2 - V2 / 2; + asp = (LRAND() & 1) ? s2 - V : s2 + V; + if (asp > s2) + aoff = -1; + if (vsp > r2) + voff = -1; + if (hsp > c2) + hoff = -1; + if (lp->patterned_rule == LIFE_S45B5) { + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 2 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 3 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 3 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 1 * aoff); + } else if (lp->patterned_rule == LIFE_S567B6) { + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 2 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 2 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 2 * aoff); + } + } +} + +void +init_life3d(ModeInfo * mi) +{ + life3dstruct *lp; + int i, npats; + + if (life3ds == NULL) { + if ((life3ds = (life3dstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (life3dstruct))) == NULL) + return; + } + lp = &life3ds[MI_SCREEN(mi)]; + + lp->generation = 0; + + parseRule(mi); + parseFile(); + if (allPatterns) { + lp->patterned_rule = NRAND(LIFE_RULES); + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } else if (allGliders) { + lp->patterned_rule = NRAND(LIFE_GLIDERS); + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } else { + lp->param.survival = input_param.survival; + lp->param.birth = input_param.birth; + } + if (!lp->eraserhead.next) { + lp->dist = 50.0 /*30.0 */ ; + lp->alt = 20 /*30 */ ; + lp->azm = 10 /*30 */ ; + lp->ncolumns = MAXCOLUMNS; + lp->nrows = MAXROWS; + lp->nstacks = MAXSTACKS; + lp->ox = lp->ncolumns / 2; + lp->oy = lp->nrows / 2; + lp->oz = lp->nstacks / 2; + + Init3D(lp); + } else + End3D(lp); + lp->color[0] = MI_BLACK_PIXEL(mi); + if (MI_NPIXELS(mi) > 2) { + i = NRAND(3); + + lp->color[i + 1] = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi) / COLORBASE)); + lp->color[(i + 1) % 3 + 1] = MI_PIXEL(mi, + NRAND(MI_NPIXELS(mi) / COLORBASE) + + MI_NPIXELS(mi) / COLORBASE); + lp->color[(i + 2) % 3 + 1] = MI_PIXEL(mi, + NRAND(MI_NPIXELS(mi) / COLORBASE) + + 2 * MI_NPIXELS(mi) / COLORBASE); + } else + lp->color[1] = lp->color[2] = lp->color[3] = MI_WHITE_PIXEL(mi); + lp->color[4] = MI_WHITE_PIXEL(mi); + lp->width = MI_WIDTH(mi); + lp->height = MI_HEIGHT(mi); + lp->memstart = 1; + /*lp->tablesMade = 0; */ + + if (MI_IS_FULLRANDOM(mi)) { + lp->wireframe = (Bool) (LRAND() & 1); + } else { + lp->wireframe = MI_IS_WIREFRAME(mi); + } + + MI_CLEARWINDOW(mi); + lp->painted = False; + + if (lp->alt > 89) + lp->alt = 89; + else if (lp->alt < -89) + lp->alt = -89; + /* Calculate viewpoint */ + lp->vx = (sin(lp->azm * IP) * cos(lp->alt * IP) * lp->dist); + lp->vy = (cos(lp->azm * IP) * cos(lp->alt * IP) * lp->dist); + lp->vz = (sin(lp->alt * IP) * lp->dist); + NewViewpoint(lp, lp->vx, lp->vy, lp->vz); + + lp->patterned_rule = codeToPatternedRule(lp->param); + if ((unsigned) lp->patterned_rule < LIFE_RULES) + npats = patterns_rules[lp->patterned_rule]; + else + npats = 0; + lp->pattern = NRAND(npats + 2); + if (lp->pattern >= npats && !filePattern) + RandomSoup(mi, 30, 10); + else + GetPattern(mi, lp->patterned_rule, lp->pattern); + + DrawScreen(mi); +} + +void +draw_life3d(ModeInfo * mi) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + + RunLife3D(lp); + DrawScreen(mi); + + MI_IS_DRAWN(mi) = True; + + if (++lp->generation > MI_CYCLES(mi) || !lp->visible) { + /*CountCells3D(lp) == 0) */ + init_life3d(mi); + } else + lp->painted = True; + + /* + * generate a randomized shooter aimed roughly toward the center of the + * screen after batchcount. + */ + + if (lp->generation && lp->generation % + ((MI_COUNT(mi) < 0) ? 1 : MI_COUNT(mi)) == 0) + shooter(lp); +} + +void +release_life3d(ModeInfo * mi) +{ + if (life3ds != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + life3dstruct *lp = &life3ds[screen]; + + if (lp->eraserhead.next) + End3D(lp); + } + (void) free((void *) life3ds); + life3ds = NULL; + } +} + +void +refresh_life3d(ModeInfo * mi) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + + if (lp->painted) { + MI_CLEARWINDOW(mi); + } +} + +void +change_life3d(ModeInfo * mi) +{ + life3dstruct *lp = &life3ds[MI_SCREEN(mi)]; + int npats; + + lp->generation = 0; + + if (lp->eraserhead.next) + End3D(lp); + /*lp->tablesMade = 0; */ + + MI_CLEARWINDOW(mi); + + lp->pattern++; + lp->patterned_rule = codeToPatternedRule(lp->param); + if ((unsigned) lp->patterned_rule < LIFE_RULES) + npats = patterns_rules[lp->patterned_rule]; + else + npats = 0; + if (lp->pattern >= npats + 2) { + lp->pattern = 0; + if (allPatterns) { + lp->patterned_rule++; + if ((unsigned) lp->patterned_rule >= LIFE_RULES) + lp->patterned_rule = 0; + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } else if (allGliders) { + lp->patterned_rule++; + if (lp->patterned_rule >= LIFE_GLIDERS) + lp->patterned_rule = 0; + copyFromPatternedRule(&lp->param, lp->patterned_rule); + if (MI_IS_VERBOSE(mi)) + printRule(lp->param); + } + } + if (lp->pattern >= npats) + RandomSoup(mi, 30, 10); + else + GetPattern(mi, lp->patterned_rule, lp->pattern); + + DrawScreen(mi); +} + +#endif /* MODE_life3d */ diff --git a/modes/lightning.c b/modes/lightning.c new file mode 100644 index 00000000..d6fb3c55 --- /dev/null +++ b/modes/lightning.c @@ -0,0 +1,608 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* lightning --- fractal lightning bolds */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lightning.c 4.07 97/11/24 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: Compatible with xscreensaver + * 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" +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_lightning + +ModeSpecOpt lightning_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct lightning_description = +{"lightning", "init_lightning", "draw_lightning", "release_lightning", + "refresh_lightning", "init_lightning", NULL, &lightning_opts, + 10000, 1, 1, 1, 64, 0.6, "", + "Shows Keith's fractal lightning bolts", 0, NULL}; + +#endif + +#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 *vert_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[*vert_index].x = mid.x; + verts[*vert_index].y = mid.y; + (*vert_index)++; + return; + } + generate(A, mid, iter - 1, verts, vert_index); + generate(mid, B, iter - 1, verts, vert_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_now) +{ + wiggle_bolt(bolt); + if ((bolt->wiggle_amount == 0) && (bolt->wiggle_number > 2)) + bolt->wiggle_number = 0; + if (((time_now % 3) == 0)) + bolt->wiggle_amount++; + + if (((time_now >= bolt->delay_time) && (time_now < bolt->flash_begin)) || + (time_now > bolt->flash_stop)) + bolt->visible = 1; + else + bolt->visible = 0; + + if (time_now == bolt->delay_time) + bolt->strike_level = FIRST_LEVEL_STRIKE; + else if (time_now == (bolt->delay_time + 1)) + bolt->strike_level = LEVEL_ONE_STRIKE; + else if ((time_now > (bolt->delay_time + 1)) && + (time_now <= (bolt->delay_time + bolt->flash_begin - 2))) + bolt->strike_level = LEVEL_TWO_STRIKE; + else if (time_now == (bolt->delay_time + bolt->flash_begin - 1)) + bolt->strike_level = LEVEL_ONE_STRIKE; + else if (time_now == (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_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_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_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_WIDTH(mi); + st->scr_height = MI_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; + + MI_IS_DRAWN(mi) = True; + + switch (st->stage) { + case 0: + MI_IS_DRAWN(mi) = False; + MI_CLEARWINDOW(mi); + MI_IS_DRAWN(mi) = True; + + st->color = NRAND(MI_NPIXELS(mi)); + st->draw_time = 0; + if (storm_active(st)) + st->stage++; + else + st->stage = 4; + 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++; + st->stage++; + st->busyLoop = 0; + break; + case 2: + if (++st->busyLoop > 6) { + st->stage++; + st->busyLoop = 0; + } + break; + case 3: + MI_IS_DRAWN(mi) = False; + MI_CLEARWINDOW(mi); + MI_IS_DRAWN(mi) = True; + + if (storm_active(st)) + st->stage = 1; + else + st->stage++; + break; + case 4: + if (++st->busyLoop > 100) { + st->busyLoop = 0; + } + 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 */ +} + +#endif /* MODE_lightning */ diff --git a/modes/lisa.c b/modes/lisa.c new file mode 100644 index 00000000..a4ad6865 --- /dev/null +++ b/modes/lisa.c @@ -0,0 +1,517 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* lisa --- animated full-loop lisajous figures */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lisa.c 4.07 97/11/24 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 "*delay: 25000 \n" \ + "*count: 1 \n" \ + "*cycles: 256 \n" \ + "*size: -1 \n" \ + "*ncolors: 200 \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ + +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_lisa + +#define DEF_ADDITIVE "True" + +static Bool additive; + +static XrmOptionDescRec opts[] = +{ + {"-additive", ".lisa.additive", XrmoptionNoArg, (caddr_t) "True"}, + {"+additive", ".lisa.additive", XrmoptionNoArg, (caddr_t) "False"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & additive, "additive", "Additive", DEF_ADDITIVE, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-/+additive", "turn on/off additive functions mode"} +}; + +ModeSpecOpt lisa_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct lisa_description = +{"lisa", "init_lisa", "draw_lisa", "release_lisa", + "refresh_lisa", "change_lisa", NULL, &lisa_opts, + 25000, 1, 256, -1, 64, 1.0, "", + "Shows animated lisajous loops", 0, NULL}; + +#endif + +#define DRAWLINES 1 +#define TWOLOOPS 1 +#define XVMAX 10 /* Maximum velocities */ +#define YVMAX 10 +#define LISAMAXFUNCS 2 +#define NUMSTDFUNCS 10 +#define MAXCYCLES 3 +#define MINLISAS 1 +#define lisasetcolor() \ +if (MI_NPIXELS(mi) > 2) { \ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_PIXEL(mi, loop->color)); \ + if (++(loop->color) >= (unsigned) MI_NPIXELS(mi)) { loop->color=0; } \ + } else { XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_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 { + unsigned long color; + int radius, dx, dy, nsteps, nfuncs, melting; + double pistep, phi, theta; + XPoint center, *lastpoint; + lisafuncs *function[LISAMAXFUNCS]; + int linewidth; +} lisas; + +typedef struct lisacontext_struct { + lisas *lisajous; + int width, height, nlisajous, loopcount; + int maxcycles; + Bool painted; +} lisacons; + +static lisacons *Lisa = NULL; + +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 + XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), loop->linewidth, + LineSolid, CapProjecting, JoinMiter); + /* erase the last cycle's point */ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_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); + XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), 1, + LineSolid, CapProjecting, JoinMiter); +#else + /* erase the last cycle's point */ + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_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_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 = (int) 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); + } +#if defined DRAWLINES + { + loop->linewidth = -8; /* #### make this a resource */ + + if (loop->linewidth == 0) + loop->linewidth = 1; + if (loop->linewidth < 0) + loop->linewidth = NRAND(-loop->linewidth) + 1; + XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), loop->linewidth, + LineSolid, CapProjecting, JoinMiter); + } +#endif + 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 + } +#if defined DRAWLINES + XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), 1, + LineSolid, CapProjecting, JoinMiter); +#endif + +} + +static void +refreshlisa(ModeInfo * mi) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + int lctr; + + for (lctr = 0; lctr < lc->nlisajous; lctr++) { + drawlisa(mi, &lc->lisajous[lctr]); + } +} + +void +refresh_lisa(ModeInfo * mi) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + + if (lc->painted) { + lc->painted = False; + MI_CLEARWINDOW(mi); + refreshlisa(mi); + } +} + +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; + } +} + +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_WIDTH(mi); + lc->height = MI_HEIGHT(mi); + lc->loopcount = 0; + lc->nlisajous = MI_COUNT(mi); + if (lc->nlisajous <= 0) + lc->nlisajous = 1; + MI_CLEARWINDOW(mi); + lc->painted = False; + + if (lc->lisajous == NULL) { + if ((lc->lisajous = (lisas *) calloc(lc->nlisajous, sizeof (lisas))) + == NULL) + return; + for (lctr = 0; lctr < lc->nlisajous; lctr++) { + initlisa(mi, &lc->lisajous[lctr]); + lc->loopcount++; + } + } else { + refreshlisa(mi); + } +} + +void +draw_lisa(ModeInfo * mi) +{ + lisacons *lc = &Lisa[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + lc->painted = True; + if (++lc->loopcount > lc->maxcycles) { + change_lisa(mi); + } + refreshlisa(mi); +} + +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; + } +} + +#endif /* MODE_lisa */ diff --git a/modes/lissie.c b/modes/lissie.c new file mode 100644 index 00000000..23ad4da8 --- /dev/null +++ b/modes/lissie.c @@ -0,0 +1,309 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* lissie --- the Lissajous worm */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lissie.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * lissie.c - The Lissajous worm for xlock, the X Window System + * lockscreen. + * + * Copyright (c) 1996 by Alexander Jolk + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 18-Aug-96: added refresh-hook. + * 01-May-96: written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Lissie" +#define HACK_INIT init_lissie +#define HACK_DRAW draw_lissie +#define lissie_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 1 \n" \ + "*cycles: 20000 \n" \ + "*size: -200 \n" \ + "*ncolors: 200 \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_lissie + +ModeSpecOpt lissie_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct lissie_description = +{"lissie", "init_lissie", "draw_lissie", "release_lissie", + "refresh_lissie", "init_lissie", NULL, &lissie_opts, + 10000, 1, 2000, -200, 64, 0.6, "", + "Shows lissajous worms", 0, NULL}; + +#endif + +#define MINSIZE 1 + +#define Lissie(n)\ + if (lissie->loc[(n)].x > 0 && lissie->loc[(n)].y > 0 &&\ + lissie->loc[(n)].x <= lp->width && lissie->loc[(n)].y <= lp->height) {\ + if (lissie->ri < 2)\ + XDrawPoint(display, MI_WINDOW(mi),\ + gc, lissie->loc[(n)].x, lissie->loc[(n)].y);\ + else\ + XDrawArc(display, MI_WINDOW(mi), gc,\ + lissie->loc[(n)].x - lissie->ri / 2,\ + lissie->loc[(n)].y - lissie->ri / 2,\ + lissie->ri, lissie->ri, 0, 23040);\ + } + +#define FLOATRAND(min,max) ((min)+(LRAND()/MAXRAND)*((max)-(min))) +#define INTRAND(min,max) ((min)+NRAND((max)-(min)+1)) + +#define MINDT 0.01 +#define MAXDT 0.15 + +#define MAXLISSIELEN 100 +#define MINLISSIELEN 10 +#define MINLISSIES 1 + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 + +typedef struct { + double tx, ty, dtx, dty; + int xi, yi, ri, rx, ry, len, pos; + int redrawing, redrawpos; + XPoint loc[MAXLISSIELEN]; + unsigned long color; +} lissiestruct; + +typedef struct { + Bool painted; + int width, height; + int nlissies; + lissiestruct *lissie; + int loopcount; +} lissstruct; + +static lissstruct *lisses = NULL; + + +static void +drawlissie(ModeInfo * mi, lissiestruct * lissie) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + lissstruct *lp = &lisses[MI_SCREEN(mi)]; + int p = (++lissie->pos) % MAXLISSIELEN; + int oldp = (lissie->pos - lissie->len + MAXLISSIELEN) % MAXLISSIELEN; + + /* Let time go by ... */ + lissie->tx += lissie->dtx; + lissie->ty += lissie->dty; + if (lissie->tx > 2 * M_PI) + lissie->tx -= 2 * M_PI; + if (lissie->ty > 2 * M_PI) + lissie->ty -= 2 * M_PI; + + /* vary both (x/y) speeds by max. 1% */ + lissie->dtx *= FLOATRAND(0.99, 1.01); + lissie->dty *= FLOATRAND(0.99, 1.01); + if (lissie->dtx < MINDT) + lissie->dtx = MINDT; + else if (lissie->dtx > MAXDT) + lissie->dtx = MAXDT; + if (lissie->dty < MINDT) + lissie->dty = MINDT; + else if (lissie->dty > MAXDT) + lissie->dty = MAXDT; + + lissie->loc[p].x = lissie->xi + (int) (sin(lissie->tx) * lissie->rx); + lissie->loc[p].y = lissie->yi + (int) (sin(lissie->ty) * lissie->ry); + + /* Mask */ + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + Lissie(oldp); + + /* Redraw */ + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, lissie->color)); + if (++lissie->color >= (unsigned) MI_NPIXELS(mi)) + lissie->color = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + Lissie(p); + if (lissie->redrawing) { + int i; + + lissie->redrawpos++; + /* This compensates for the changed p + since the last callback. */ + + for (i = 0; i < REDRAWSTEP; i++) { + Lissie((p - lissie->redrawpos + MAXLISSIELEN) % MAXLISSIELEN); + if (++(lissie->redrawpos) >= lissie->len) { + lissie->redrawing = 0; + break; + } + } + } +} + +static void +initlissie(ModeInfo * mi, lissiestruct * lissie) +{ + lissstruct *lp = &lisses[MI_SCREEN(mi)]; + int size = MI_SIZE(mi); + int i; + + if (MI_NPIXELS(mi) > 2) + lissie->color = NRAND(MI_NPIXELS(mi)); + else + lissie->color = MI_WHITE_PIXEL(mi); + /* Initialize parameters */ + if (size < -MINSIZE) + lissie->ri = NRAND(MIN(-size, MAX(MINSIZE, + MIN(lp->width, lp->height) / 4)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + lissie->ri = MAX(MINSIZE, MIN(lp->width, lp->height) / 4); + else + lissie->ri = MINSIZE; + } else + lissie->ri = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / 4)); + lissie->xi = INTRAND(lp->width / 4 + lissie->ri, + lp->width * 3 / 4 - lissie->ri); + lissie->yi = INTRAND(lp->height / 4 + lissie->ri, + lp->height * 3 / 4 - lissie->ri); + lissie->rx = INTRAND(lp->width / 4, + MIN(lp->width - lissie->xi, lissie->xi)) - 2 * lissie->ri; + lissie->ry = INTRAND(lp->height / 4, + MIN(lp->height - lissie->yi, lissie->yi)) - 2 * lissie->ri; + lissie->len = INTRAND(MINLISSIELEN, MAXLISSIELEN - 1); + lissie->pos = 0; + + lissie->redrawing = 0; + + lissie->tx = FLOATRAND(0, 2 * M_PI); + lissie->ty = FLOATRAND(0, 2 * M_PI); + lissie->dtx = FLOATRAND(MINDT, MAXDT); + lissie->dty = FLOATRAND(MINDT, MAXDT); + + for (i = 0; i < MAXLISSIELEN; i++) + lissie->loc[i].x = lissie->loc[i].y = 0; + /* Draw lissie */ + drawlissie(mi, lissie); +} + +void +init_lissie(ModeInfo * mi) +{ + lissstruct *lp; + unsigned char ball; + + if (lisses == NULL) { + if ((lisses = (lissstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (lissstruct))) == NULL) + return; + } + lp = &lisses[MI_SCREEN(mi)]; + + lp->width = MI_WIDTH(mi); + lp->height = MI_HEIGHT(mi); + + lp->nlissies = MI_COUNT(mi); + if (lp->nlissies < -MINLISSIES) { + if (lp->lissie) { + (void) free((void *) lp->lissie); + lp->lissie = NULL; + } + lp->nlissies = NRAND(-lp->nlissies - MINLISSIES + 1) + MINLISSIES; + } else if (lp->nlissies < MINLISSIES) + lp->nlissies = MINLISSIES; + + lp->loopcount = 0; + + if (!lp->lissie) + lp->lissie = (lissiestruct *) calloc(lp->nlissies, sizeof (lissiestruct)); + + MI_CLEARWINDOW(mi); + lp->painted = False; + + for (ball = 0; ball < (unsigned char) lp->nlissies; ball++) + initlissie(mi, &lp->lissie[ball]); + +} + +void +draw_lissie(ModeInfo * mi) +{ + lissstruct *lp = &lisses[MI_SCREEN(mi)]; + register unsigned char ball; + + MI_IS_DRAWN(mi) = True; + + if (++lp->loopcount > MI_CYCLES(mi)) { + init_lissie(mi); + } else { + lp->painted = True; + for (ball = 0; ball < (unsigned char) lp->nlissies; ball++) + drawlissie(mi, &lp->lissie[ball]); + } +} + +void +release_lissie(ModeInfo * mi) +{ + if (lisses != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + lissstruct *lp = &lisses[screen]; + + if (lp->lissie) { + (void) free((void *) lp->lissie); + lp->lissie = NULL; + } + } + (void) free((void *) lisses); + lisses = NULL; + } +} + +void +refresh_lissie(ModeInfo * mi) +{ + if (lisses != NULL) { + lissstruct *lp = &lisses[MI_SCREEN(mi)]; + int i; + + if (lp->painted) { + MI_CLEARWINDOW(mi); + for (i = 0; i < lp->nlissies; i++) { + lp->lissie[i].redrawing = 1; + lp->lissie[i].redrawpos = 0; + } + } + } +} + +#endif /* MODE_lissie */ diff --git a/modes/loop.c b/modes/loop.c new file mode 100644 index 00000000..c929cf93 --- /dev/null +++ b/modes/loop.c @@ -0,0 +1,1428 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* loop --- Chris Langton's self-producing loops */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)loop.c 4.13 98/10/18 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 18-Oct-98: Started creating a hexagon version, probably will not work + * for a while since some work has to go into getting not + * only the program to handle the hexagonal data but the loop + * has to be "programmed" as well. I suspect it should be easier + * than the original since the loop will have six sides to + * store its genes (data). + * 10-May-97: Compatible with xscreensaver + * 15-Nov-95: Coded from Chris Langton's Self-Reproduction in Cellular + * Automata Physica 10D 135-144 1984 + * also used wire.c as a guide. + */ + +/*- + Grid Number of Neigbors + ---- ------------------ + Square 4 + Hexagon 6 (currently in development) +*/ + +/*- + * From Steven Levy's Artificial Life + * Chris Langton's cellular automata "loops" reproduce in the spirit of life. + * Beginning from a single organism, the loops from a colony. As the loops + * on the outer fringes reproduce, the inner loops -- blocked by their + * daughters -- can no longer produce offspring. These dead progenitors + * provide a base for future generations' expansion, much like the formation + * of a coral reef. This self-organizing behavior emerges spontaneously, + * from the bottom up -- a key characteristic of artificial life. + */ + +/*- + Don't Panic -- When the artificial life tries to leave its petri + dish (ie. the screen) it will (usually) die... + The loops are short of "real" life because a general purpose Turing + machine is not contained in the loop. This is a simplification of + von Neumann and Codd's self-producing Turing machine. + The data spinning around could be viewed as both its DNA and its internal + clock. + */ + +#ifdef STANDALONE +#define PROGCLASS "loop" +#define HACK_INIT init_loop +#define HACK_DRAW draw_loop +#define loop_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*cycles: 1600 \n" \ + "*size: -12 \n" \ + "*ncolors: 15 \n" \ + "*neighbors: 0 \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_loop + +/*- + * neighbors of 0 randomizes between 4 and 6. + */ +extern int neighbors; + +ModeSpecOpt loop_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct loop_description = +{"loop", "init_loop", "draw_loop", "release_loop", + "refresh_loop", "init_loop", NULL, &loop_opts, + 100000, 1, 1600, -12, 64, 1.0, "", + "Shows Langton's self-producing loops", 0, NULL}; + +#endif + +#define LOOPBITS(n,w,h)\ + lp->pixmaps[lp->init_bits++]=\ + XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1) + +static int local_neighbors = 0; +static int neighbor_kind = 0; + +#define COLORS 8 +#define REALCOLORS (COLORS-2) +#define MINLOOPS 1 +#define REDRAWSTEP 2000 /* How many cells to draw per cycle */ +#define ADAM_SIZE 8 /* MIN 5 */ +#if 1 +#define ADAM_LOOPX (ADAM_SIZE+2) +#define ADAM_LOOPY (ADAM_SIZE+2) +#else +#define ADAM_LOOPX 16 +#define ADAM_LOOPY 10 +#endif +#define MINGRIDSIZE (3*ADAM_LOOPX) +/* TRIA stuff was an attempt to make a triangular lifeform on a + hex grid but I got bored. You probably need an additional 7th + state for a coherent step by step process of separation and + initial stem development. + */ +/* #define TRIA 1 */ +#ifdef TRIA +#define HEX_ADAM_SIZE 3 /* MIN 3 */ +#else +#define HEX_ADAM_SIZE 5 /* MIN 3 */ +#endif +#if 1 +#define HEX_ADAM_LOOPX (2*HEX_ADAM_SIZE+1) +#define HEX_ADAM_LOOPY (2*HEX_ADAM_SIZE+1) +#else +#define HEX_ADAM_LOOPX 3 +#define HEX_ADAM_LOOPY 7 +#endif +#define HEX_MINGRIDSIZE (6*HEX_ADAM_LOOPX) +#define MINSIZE 1 +#define NEIGHBORKINDS 2 +#define ANGLES 360 +#define MAXNEIGHBORS 6 + +/* Singly linked list */ +typedef struct _CellList { + XPoint pt; + struct _CellList *next; +} CellList; + +typedef struct { + int init_bits; + int generation; + int xs, ys; + int xb, yb; + int nrows, ncols; + int bx, by, bnrows, bncols; + int mincol, minrow, maxcol, maxrow; + int width, height; + int redrawing, redrawpos; + unsigned char *newcells, *oldcells; + int ncells[COLORS]; + CellList *cellList[COLORS]; + unsigned long colors[COLORS]; + GC stippledGC; + Pixmap pixmaps[COLORS]; + union { + XPoint hexagon[6]; + } shape; +} loopstruct; + +static loopstruct *loops = NULL; + +#define TRANSITION(TT,V) V=TT&7;TT>>=3 +#define TABLE(R,T,L,B) (table[((B)<<9)|((L)<<6)|((T)<<3)|(R)]) +#define HEX_TABLE(R,T,t,l,b,B) (table[((B)<<15)|((b)<<12)|((l)<<9)|((t)<<6)|((T)<<3)|(R)]) +#ifdef RAND_RULES /* Hack, see below */ +#define TABLE_IN(C,R,T,L,B,I) (TABLE(R,T,L,B)&=~(7<<((C)*3)));\ +(TABLE(R,T,L,B)|=((I)<<((C)*3))) +#define HEX_TABLE_IN(C,R,T,t,l,b,B,I) (HEX_TABLE(R,T,t,l,b,B)&=~(7<<((C)*3)));\ +(HEX_TABLE(R,T,t,l,b,B)|=((I)<<((C)*3))) +#else +#define TABLE_IN(C,R,T,L,B,I) (TABLE(R,T,L,B)|=((I)<<((C)*3))) +#define HEX_TABLE_IN(C,R,T,t,l,b,B,I) (HEX_TABLE(R,T,t,l,b,B)|=((I)<<((C)*3))) +#endif +#define TABLE_OUT(C,R,T,L,B) ((TABLE(R,T,L,B)>>((C)*3))&7) +#define HEX_TABLE_OUT(C,R,T,t,l,b,B) ((HEX_TABLE(R,T,t,l,b,B)>>((C)*3))&7) + +static unsigned int *table = NULL; /* 8*8*8*8 = 2^12 = 2^3^4 = 4K */ + /* 8*8*8*8*8*8 = too big? */ + +static char plots[NEIGHBORKINDS] = +{ + 4, 6 /* Neighborhoods */ +}; + +static unsigned int transition_table[] = +{ /* Octal CBLTR->I */ + /* CBLTRI CBLTRI CBLTRI CBLTRI CBLTRI */ + 0000000, 0025271, 0113221, 0202422, 0301021, + 0000012, 0100011, 0122244, 0202452, 0301220, + 0000020, 0100061, 0122277, 0202520, 0302511, + 0000030, 0100077, 0122434, 0202552, 0401120, + 0000050, 0100111, 0122547, 0202622, 0401220, + 0000063, 0100121, 0123244, 0202722, 0401250, + 0000071, 0100211, 0123277, 0203122, 0402120, + 0000112, 0100244, 0124255, 0203216, 0402221, + 0000122, 0100277, 0124267, 0203226, 0402326, + 0000132, 0100511, 0125275, 0203422, 0402520, + 0000212, 0101011, 0200012, 0204222, 0403221, + 0000220, 0101111, 0200022, 0205122, 0500022, + 0000230, 0101244, 0200042, 0205212, 0500215, + 0000262, 0101277, 0200071, 0205222, 0500225, + 0000272, 0102026, 0200122, 0205521, 0500232, + 0000320, 0102121, 0200152, 0205725, 0500272, + 0000525, 0102211, 0200212, 0206222, 0500520, + 0000622, 0102244, 0200222, 0206722, 0502022, + 0000722, 0102263, 0200232, 0207122, 0502122, + 0001022, 0102277, 0200242, 0207222, 0502152, + 0001120, 0102327, 0200250, 0207422, 0502220, + 0002020, 0102424, 0200262, 0207722, 0502244, + 0002030, 0102626, 0200272, 0211222, 0502722, + 0002050, 0102644, 0200326, 0211261, 0512122, + 0002125, 0102677, 0200423, 0212222, 0512220, + 0002220, 0102710, 0200517, 0212242, 0512422, + 0002322, 0102727, 0200522, 0212262, 0512722, + 0005222, 0105427, 0200575, 0212272, 0600011, + 0012321, 0111121, 0200722, 0214222, 0600021, + 0012421, 0111221, 0201022, 0215222, 0602120, + 0012525, 0111244, 0201122, 0216222, 0612125, + 0012621, 0111251, 0201222, 0217222, 0612131, + 0012721, 0111261, 0201422, 0222272, 0612225, + 0012751, 0111277, 0201722, 0222442, 0700077, + 0014221, 0111522, 0202022, 0222462, 0701120, + 0014321, 0112121, 0202032, 0222762, 0701220, + 0014421, 0112221, 0202052, 0222772, 0701250, + 0014721, 0112244, 0202073, 0300013, 0702120, + 0016251, 0112251, 0202122, 0300022, 0702221, + 0017221, 0112277, 0202152, 0300041, 0702251, + 0017255, 0112321, 0202212, 0300076, 0702321, + 0017521, 0112424, 0202222, 0300123, 0702525, + 0017621, 0112621, 0202272, 0300421, 0702720, + 0017721, 0112727, 0202321, 0300622 +}; + +static unsigned int hex_transition_table[] = +{ /* Octal CBbltTR->I */ + /* CBbltTRI CBbltTRI CBbltTRI CBbltTRI CBbltTRI */ + +#ifdef TRIA + 000000000, 000000020, 000000220, 000002220, 000022220, + 011122121, 011121221, 011122221, 011221221, + 011222221, 011112121, 011112221, + 020021122, 020002122, 020211222, 021111222, + 020221122, 020027122, 020020722, 020021022, + 001127221, + 011122727, 011227227, 010122121, 010222211, + 021117222, 020112272, + 070221220, + 001227221, + 010221121, 011721221, 011222277, + 020111222, 020221172, + 070211220, + 001217221, + 010212277, 010221221, + 020122112, + 070122220, + 001722221, + 010221271, + 020002022, 021122172, + 070121220, + 011122277, 011172121, + 010212177, 011212277, + 070112220, + 001772221, + 021221772, + 070121270, 070721220, + 000112721, 000272211, + 010022211, 012222277, + 020072272, 020227122, 020217222, + 010211121, + 020002727, + 070222220, + 001727721, + 020021072, 020070722, + 070002072, 070007022, + 001772721, + 070002022, + 000000070, 000000770, 000072220, 000000270, + 020110222, 020220272, 020220722, + 070007071, 070002072, 070007022, + 000000012, 000000122, 000000212, 001277721, + 020122072, 020202212, + 010002121, + 020001122, 020002112, + 020021722, + 020122022, 020027022, 020070122, 020020122, + 010227027, + 020101222, + 010227227, 010227277, + 021722172, + 001727221, + 010222277, + 020702272, + 070122020, + 000172721, + 010022277, 010202177, 010227127, + + 001214221, + 010202244, + 020024122, 020020422, + 040122220, + 001422221, + 010221241, 010224224, + 021122142, + 040121220, + 001124221, + 010224274, + 020112242, 021422172, + 040221220, + 001224221, 001427221, + 010222244, + 020227042, + 040122020, + 000142721, + 010022244, 010202144, 010224124, + 040112220, + 001442221, + 021221442, + 040121240, 040421220, + 000242211, 000112421, + 020042242, 020214222, 020021422, 020220242, 020024022, + 011224224, + 020224122, + 020220422, + 012222244, + 020002424, + 040222220, + 001244421, 000000420, 000000440, 000000240, 000000040, + 020040121, 020021042, + 040004022, 040004042, 040002042, + 010021121, + 020011122, 020002112, + 001424421, + 020040422, + 001442421, + 040002022, + 001724221, + 010227247, + 020224072, 021417222, + 000172421, + 010021721, + 020017022, + 020120212, + 020271727, + 070207072, 070701220, + 000001222, + 020110122, + 001277221, + 001777721, + 020021222, 020202272, 020120222, 020221722, + 020027227, + 070070222, + 000007220, + 020101272, 020272172, 020721422, 020721722, + 020011222, 020202242, +#if 0 + {2,2,0,0,2,7,0}, + {2,0,2,0,2,0,2}, + {2,4,1,2,2,1,2}, + {2,1,2,1,2,1,2}, + {2,0,2,2,1,1,2}, + {2,7,1,1,1,1,2}, + {0,2,2,2,2,2,2}, + {2,2,0,0,7,7,0}, + {2,1,2,0,2,0,7}, + {2,0,1,2,2,1,2}, + {2,4,2,1,2,1,2}, + {2,1,2,2,1,1,2}, + {2,0,7,1,1,1,2}, + {0,2,2,2,2,2,2}, +#endif +#else + 000000000, 000000020, 000000220, 000002220, + 011212121, 011212221, 011221221, 011222221, + 020002122, 020021122, 020211122, + + 010221221, 010222121, + 020002022, 020021022, 020020122, 020112022, + + 010202121, + 020102022, 020202112, + + 000000012, 000000122, 000000212, + 010002121, + 020001122, 020002112, 020011122, + + + 001227221, 001272221, 001272721, + 012212277, 011222727, 011212727, + 020021722, 020027122, 020020722, 020027022, + 020211722, 020202172, 020120272, + 020271122, 020202172, 020207122, 020217122, + 020120272, 020210722, 020270722, + 070212220, 070221220, 070212120, + + + 012222277, + 020002727, + 070222220, + + 001277721, 000000070, 000000270, 000000720, 000000770, + 020070122, 020021072, + 070002072, 070007022, 070007071, + + 020070722, + 070002022, + + 010227227, 010222727, 010202727, + 020172022, 020202712, + + 001224221, 001242221, 001242421, + 012212244, 011222424, 011212424, + 020021422, 020024122, 020020422, 020024022, + 020211422, 020202142, 020120242, + 020241122, 020202142, 020204122, 020214122, + 020120242, 020210422, 020240422, + 040212220, 040221220, 040212120, + + + 012222244, + 020002424, + 040222220, + + 001244421, 000000040, 000000240, 000000420, 000000440, + 020040122, 020021042, + 040002042, + 040004021, 040004042, + + 020040422, + 040002022, + + 010224224, 010222424, 010202424, + 020142022, 020202412, + 020011722, 020112072, 020172072, 020142072, + + + + 000210225, 000022015, 000022522, + 011225521, + 020120525, 020020152, 020005122, 020214255, 020021152, + 020255242, + 050215222, 050225121, + + 000225220, 001254222, + 010221250, 011221251, 011225221, + 020025122, 020152152, 020211252, 020214522, 020511125, + 050212241, 05221120, + 040521225, + + 000000250, 000000520, 000150220, 000220520, 000222210, + 001224251, + 010022152, 010251221, 010522121, 011212151, 011221251, + 011215221, + 020000220, 020002152, 020020220, 020021020, 020022152, + 020021422, 020022152, 020022522, 020025425, 020050422, + 020051022, 020051122, 020211122, 020211222, 020215222, + 020245122, + 050021125, 050021025, 050011125, 051242221, + 041225220, + + 000220250, 000220520, 001227521, 001275221, + 011257227, 011522727, + 020002052, 020002752, 020021052, 020057125, + 050020722, 050027125, + 070215220, + + 070212255, + 071225220, + 020275122, + 051272521, + 020055725, + 020021552, + 012252277, + 050002521, + 020005725, + + 050011022, + 000000155, + 020050722, + 001227250, + 010512727, + 010002151, + 020027112, + 001227251, + 012227257, + 050002125, + 020517122, + 050002025, + 020050102, + 050002725, + 020570722, + 001252721, + 020007051, + 020102052, + 020271072, + 050001122, + 010002151, + 011227257, + 020051722, + 020057022, + 020050122, + + + 020051422, + 011224254, + 012224254, + + 020054022, + 050002425, + 040252220, + 020002454, + + + 000000540, + 001254425, + 050004024, + 040004051, + + 000000142, + 040001522, + 010002547, + 020045122, + 051221240, + 020002512, + 020021522, + + + 020020022, + 021125522, + 020521122, + 020025022, + 020025522, + 020020522, + + 020202222, + 020212222, + 021212222, + 021222722, + 021222422, + 020002222, + 020021222, + 020022122, + 020212122, + 020027222, + 020024222, + 020020222, + 020212722, + 020212422, + 020202122, + 001222221, + 020002522, + + 020017125, + 010022722, + 020212052, + + 020205052, +#endif +}; + + +/*- +Neighborhoods are read as follows (rotations are not listed): + T + L C R ==> I + B + + t T + l C R ==> I + b B + */ + +static unsigned char self_reproducing_loop[ADAM_LOOPY][ADAM_LOOPX] = +{ +/* 10x10 */ + {0, 2, 2, 2, 2, 2, 2, 2, 2, 0}, + {2, 4, 0, 1, 4, 0, 1, 1, 1, 2}, + {2, 1, 2, 2, 2, 2, 2, 2, 1, 2}, + {2, 0, 2, 0, 0, 0, 0, 2, 1, 2}, + {2, 7, 2, 0, 0, 0, 0, 2, 7, 2}, + {2, 1, 2, 0, 0, 0, 0, 2, 0, 2}, + {2, 0, 2, 0, 0, 0, 0, 2, 1, 2}, + {2, 7, 2, 2, 2, 2, 2, 2, 7, 2}, + {2, 1, 0, 6, 1, 0, 7, 1, 0, 2}, + {0, 2, 2, 2, 2, 2, 2, 2, 2, 0} +}; + +static unsigned char hex_self_reproducing_loop[HEX_ADAM_LOOPY][HEX_ADAM_LOOPX] = +{ +#if 0 +/* Experimental TRIA5:7x7 */ + {2,2,0,0,0,0,0}, + {2,1,2,0,2,2,0}, + {2,0,4,2,2,0,2}, + {2,7,2,0,2,0,2}, + {2,1,2,2,1,1,2}, + {2,0,7,1,0,7,2}, + {0,2,2,2,2,2,2}, + /* Stem cells, only "5" will fully reproduce itself */ +/* 3:12x7 */ + {2,2,2,2,0,0,0,0,0,0,0,0}, + {2,1,1,1,2,0,0,0,0,0,0,0}, + {2,1,2,2,1,2,2,2,2,2,2,0}, + {2,1,2,0,2,7,1,1,1,1,1,2}, + {0,2,1,2,2,0,2,2,2,2,2,2}, + {0,0,2,0,4,1,2,0,0,0,0,0}, + {0,0,0,2,2,2,2,0,0,0,0,0} +/* 4:14x9 */ + {2,2,2,2,2,0,0,0,0,0,0,0,0,0}, + {2,1,1,1,1,2,0,0,0,0,0,0,0,0}, + {2,1,2,2,2,1,2,0,0,0,0,0,0,0}, + {2,1,2,0,0,2,1,2,2,2,2,2,2,0}, + {2,1,2,0,0,0,2,7,1,1,1,1,1,2}, + {0,2,1,2,0,0,2,0,2,2,2,2,2,2}, + {0,0,2,0,2,2,2,1,2,0,0,0,0,0}, + {0,0,0,2,4,1,0,7,2,0,0,0,0,0}, + {0,0,0,0,2,2,2,2,2,0,0,0,0,0} +/* 5:16x11 */ + {2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0}, + {2,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0}, + {2,1,2,2,2,2,1,2,0,0,0,0,0,0,0,0}, + {2,1,2,0,0,0,2,1,2,0,0,0,0,0,0,0}, + {2,1,2,0,0,0,0,2,1,2,2,2,2,2,2,0}, + {2,1,2,0,0,0,0,0,2,7,1,1,1,1,1,2}, + {0,2,1,2,0,0,0,0,2,0,2,2,2,2,2,2}, + {0,0,2,0,2,0,0,0,2,1,2,0,0,0,0,0}, + {0,0,0,2,4,2,2,2,2,7,2,0,0,0,0,0}, + {0,0,0,0,2,1,0,7,1,0,2,0,0,0,0,0}, + {0,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0} +/* test:3x7 (0,4) is blank ... very strange. + init_adam seems ok something after that I guess */ + {2,2,0}, + {2,0,2}, + {0,2,2}, + {0,0,0}, + {2,2,0}, + {2,1,2}, + {0,2,2}, +#else /* this might be better for hexagons, spacewise efficient... */ +#ifdef TRIA +/* Experimental TRIA5:7x7 */ + {2,2,0,0,2,2,0}, + {2,4,2,0,2,7,2}, + {2,1,0,2,2,0,2}, + {2,0,2,1,2,1,2}, + {2,7,2,2,7,7,2}, + {2,1,0,7,1,0,2}, + {0,2,2,2,2,2,2}, +#else +/* 5:11x11 */ + {2,2,2,2,2,2,0,0,0,0,0}, + {2,1,1,7,0,1,2,0,0,0,0}, + {2,1,2,2,2,2,7,2,0,0,0}, + {2,1,2,0,0,0,2,0,2,0,0}, + {2,1,2,0,0,0,0,2,1,2,0}, + {2,1,2,0,0,0,0,0,2,7,2}, + {0,2,1,2,0,0,0,0,2,0,2}, + {0,0,2,1,2,0,0,0,2,1,2}, + {0,0,0,2,1,2,2,2,2,4,2}, + {0,0,0,0,2,1,1,1,1,5,2}, + {0,0,0,0,0,2,2,2,2,2,2} +#endif +#endif +}; + +static void +position_of_neighbor(int dir, int *pcol, int *prow) +{ + int col = *pcol, row = *prow; + + /* NO WRAPING */ + + if (local_neighbors == 6) { + switch (dir) { + case 0: + col = col + 1; + break; + case 60: + if (row & 1) + col = col + 1; + row = row - 1; + break; + case 120: + if (!(row & 1)) + col = col - 1; + row = row - 1; + break; + case 180: + col = col - 1; + break; + case 240: + if (!(row & 1)) + col = col - 1; + row = row + 1; + break; + case 300: + if (row & 1) + col = col + 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { + switch (dir) { + case 0: + col = col + 1; + break; + case 90: + row = row - 1; + break; + case 180: + col = col - 1; + break; + case 270: + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + *pcol = col; + *prow = row; +} + +static Bool +withinBounds(loopstruct * lp, int col, int row) +{ + return (row >= 1 && row < lp->bnrows - 1 && + col >= 1 && col < lp->bncols - 1 - (local_neighbors == 6 && (row % 2))); +} + +static void +fillcell(ModeInfo * mi, GC gc, int col, int row) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + + if (local_neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + lp->shape.hexagon[0].x = lp->xb + ccol * lp->xs; + lp->shape.hexagon[0].y = lp->yb + crow * lp->ys; + if (lp->xs == 1 && lp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + lp->shape.hexagon[0].x, lp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + lp->shape.hexagon, 6, Convex, CoordModePrevious); + } else { + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, + lp->xs - (lp->xs > 3), lp->ys - (lp->ys > 3)); + } +} + +static void +drawcell(ModeInfo * mi, int col, int row, int state) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + XGCValues gcv; + GC gc; + + if (MI_NPIXELS(mi) >= COLORS) { + gc = MI_GC(mi); + XSetForeground(MI_DISPLAY(mi), gc, lp->colors[state]); + } else { + gcv.stipple = lp->pixmaps[state]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), lp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = lp->stippledGC; + } + fillcell(mi, gc, col, row); +} + +static void +addtolist(ModeInfo * mi, int col, int row, unsigned char state) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + CellList *current = lp->cellList[state]; + + lp->cellList[state] = NULL; + if ((lp->cellList[state] = (CellList *) malloc(sizeof (CellList))) == NULL) { + lp->cellList[state] = current; + return; + } + lp->cellList[state]->pt.x = col; + lp->cellList[state]->pt.y = row; + lp->cellList[state]->next = current; + lp->ncells[state]++; +} + +#ifdef DEBUG +static void +print_state(ModeInfo * mi, int state) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + CellList *locallist = lp->cellList[state]; + int i = 0; + + (void) printf("state %d\n", state); + while (locallist) { + (void) printf("%d x %d, y %d\n", i, + locallist->pt.x, locallist->pt.y); + locallist = locallist->next; + i++; + } +} + +#endif + +static void +free_state(loopstruct * lp, int state) +{ + CellList *current; + + while (lp->cellList[state]) { + current = lp->cellList[state]; + lp->cellList[state] = lp->cellList[state]->next; + (void) free((void *) current); + } + lp->ncells[state] = 0; +} + +static void +draw_state(ModeInfo * mi, int state) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + GC gc; + XGCValues gcv; + CellList *current = lp->cellList[state]; + + if (MI_NPIXELS(mi) >= COLORS) { + gc = MI_GC(mi); + XSetForeground(MI_DISPLAY(mi), gc, lp->colors[state]); + } else { + gcv.stipple = lp->pixmaps[state]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), lp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = lp->stippledGC; + } + + if (local_neighbors == 6) { /* Draw right away, slow */ + while (current) { + int col, row, ccol, crow; + + col = current->pt.x; + row = current->pt.y; + ccol = 2 * col + !(row & 1), crow = 2 * row; + lp->shape.hexagon[0].x = lp->xb + ccol * lp->xs; + lp->shape.hexagon[0].y = lp->yb + crow * lp->ys; + if (lp->xs == 1 && lp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + lp->shape.hexagon[0].x, lp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + lp->shape.hexagon, 6, Convex, CoordModePrevious); + current = current->next; + } + } else { + /* Take advantage of XFillRectangles */ + XRectangle *rects = NULL; + int nrects = 0; + + /* Create Rectangle list from part of the cellList */ + if ((rects = (XRectangle *) malloc(lp->ncells[state] * sizeof (XRectangle))) == NULL) { + return; + } + + while (current) { + rects[nrects].x = lp->xb + current->pt.x * lp->xs; + rects[nrects].y = lp->yb + current->pt.y * lp->ys; + rects[nrects].width = lp->xs - (lp->xs > 3); + rects[nrects].height = lp->ys - (lp->ys > 3); + current = current->next; + nrects++; + } + /* Finally get to draw */ + XFillRectangles(MI_DISPLAY(mi), MI_WINDOW(mi), gc, rects, nrects); + /* Free up rects list and the appropriate part of the cellList */ + (void) free((void *) rects); + } + free_state(lp, state); + XFlush(MI_DISPLAY(mi)); +} + +static int +init_table(void) +{ + if (table == NULL) { + int mult = 1; + unsigned int tt, c, n[MAXNEIGHBORS], i; + int j, k; + int size_transition_table = sizeof (transition_table) / + sizeof (unsigned int); + int size_hex_transition_table = sizeof (hex_transition_table) / + sizeof (unsigned int); + + for (j = 0; j < local_neighbors; j++) + mult *= 8; + + if ((table = (unsigned int *) calloc(mult, sizeof (unsigned int))) == NULL) { + return 1; + } + +#ifdef RAND_RULES + /* Here I was interested to see what happens when it hits a wall.... + Rules not normally used take over... takes too much time though */ + { + for (j = 0; j < mult; j++) { + for (k = 0; k < 8; k++) + table[j] |= (unsigned int) ((unsigned int) (NRAND(8)) << (k * 3)); + } + } +#endif + if (local_neighbors == 6) { + for (j = 0; j < size_hex_transition_table; j++) { + tt = hex_transition_table[j]; + TRANSITION(tt, i); + for (k = 0; k < local_neighbors; k++) { + TRANSITION(tt, n[k]); + } + TRANSITION(tt, c); + HEX_TABLE_IN(c, n[0], n[1], n[2], n[3], n[4], n[5], i); + HEX_TABLE_IN(c, n[1], n[2], n[3], n[4], n[5], n[0], i); + HEX_TABLE_IN(c, n[2], n[3], n[4], n[5], n[0], n[1], i); + HEX_TABLE_IN(c, n[3], n[4], n[5], n[0], n[1], n[2], i); + HEX_TABLE_IN(c, n[4], n[5], n[0], n[1], n[2], n[3], i); + HEX_TABLE_IN(c, n[5], n[0], n[1], n[2], n[3], n[4], i); + } + } else { + for (j = 0; j < size_transition_table; j++) { + tt = transition_table[j]; + TRANSITION(tt, i); + for (k = 0; k < local_neighbors; k++) { + TRANSITION(tt, n[k]); + } + TRANSITION(tt, c); + TABLE_IN(c, n[0], n[1], n[2], n[3], i); + TABLE_IN(c, n[1], n[2], n[3], n[0], i); + TABLE_IN(c, n[2], n[3], n[0], n[1], i); + TABLE_IN(c, n[3], n[0], n[1], n[2], i); + } + } + } + return 0; +} + +static void +init_adam(ModeInfo * mi) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + XPoint start, dirx, diry; + int i, j; + + if (local_neighbors == 6) { + int k; + + /* switch (0) */ + switch (NRAND(6)) { + case 0: + start.x = (lp->bncols - HEX_ADAM_LOOPX / 2) / 2; + start.y = (lp->bnrows - HEX_ADAM_LOOPY) / 2; + lp->mincol = start.x - 2; + lp->minrow = start.y - 1; + lp->maxcol = start.x + HEX_ADAM_LOOPX + 1; + lp->maxrow = start.y + HEX_ADAM_LOOPY + 1; + for (j = 0; j < HEX_ADAM_LOOPY; j++) { + for (i = 0; i < HEX_ADAM_LOOPX; i++) { + k = (((lp->bnrows / 2 + HEX_ADAM_LOOPY / 2) % 2) ? -j / 2 : -(j + 1) / 2); + lp->newcells[(start.y + j) * lp->bncols + start.x + i + k] = + hex_self_reproducing_loop[j][i]; + } + } + break; + case 1: + start.x = (lp->bncols - (HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2) / 2; + start.y = (lp->bnrows - HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2; + lp->mincol = start.x - 1; + lp->minrow = start.y - HEX_ADAM_LOOPX; + lp->maxcol = start.x + (HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2 + 1; + lp->maxrow = start.y + HEX_ADAM_LOOPY + 1; + for (j = 0; j < HEX_ADAM_LOOPY; j++) { + for (i = 0; i < HEX_ADAM_LOOPX; i++) { + k = (((lp->bnrows / 2 + (HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2) % 2) + ? -(i + j + 1) / 2 : -(i + j) / 2); + lp->newcells[(start.y + j - i) * lp->bncols + start.x + i + j + k] = + hex_self_reproducing_loop[j][i]; + } + } + break; + case 2: + start.x = (lp->bncols - HEX_ADAM_LOOPY / 2) / 2; + start.y = (lp->bnrows - HEX_ADAM_LOOPX) / 2; + lp->mincol = start.x - 2; + lp->minrow = start.y - 1; + lp->maxcol = start.x + HEX_ADAM_LOOPY + 1; + lp->maxrow = start.y + HEX_ADAM_LOOPX + 1; + for (j = 0; j < HEX_ADAM_LOOPX; j++) { + for (i = 0; i < HEX_ADAM_LOOPY; i++) { + k = (((lp->bnrows / 2 + HEX_ADAM_LOOPX / 2) % 2) ? -(HEX_ADAM_LOOPX - j - 1) / 2 : -(HEX_ADAM_LOOPX - j) / 2); + lp->newcells[(start.y + j) * lp->bncols + start.x + i + k] = + hex_self_reproducing_loop[i][HEX_ADAM_LOOPX - j - 1]; + } + } + break; + case 3: + start.x = (lp->bncols - HEX_ADAM_LOOPX / 2) / 2; + start.y = (lp->bnrows - HEX_ADAM_LOOPY) / 2; + lp->mincol = start.x - 1, lp->minrow = start.y - 1; + lp->maxcol = start.x + HEX_ADAM_LOOPX + 1, lp->maxrow = start.y + HEX_ADAM_LOOPY + 1; + for (j = 0; j < HEX_ADAM_LOOPY; j++) { + for (i = 0; i < HEX_ADAM_LOOPX; i++) { + k = (((lp->bnrows / 2 + HEX_ADAM_LOOPY / 2) % 2) ? -j / 2 : -(j + 1) / 2); + lp->newcells[(start.y + j) * lp->bncols + start.x + i + k] = + hex_self_reproducing_loop[HEX_ADAM_LOOPY - j - 1][HEX_ADAM_LOOPX - i - 1]; + } + } + break; + case 4: + start.x = (lp->bncols - (HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2) / 2; + start.y = (lp->bnrows - HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2; + lp->mincol = start.x - 1; + lp->minrow = start.y - HEX_ADAM_LOOPX; + lp->maxcol = start.x + (HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2 + 1; + lp->maxrow = start.y + HEX_ADAM_LOOPY + 1; + for (j = 0; j < HEX_ADAM_LOOPY; j++) { + for (i = 0; i < HEX_ADAM_LOOPX; i++) { + k = (((lp->bnrows / 2 + (HEX_ADAM_LOOPX + HEX_ADAM_LOOPY) / 2) % 2) + ? -(i + j + 1) / 2 : -(i + j) / 2); + lp->newcells[(start.y + j - i) * lp->bncols + start.x + i + j + k] = + hex_self_reproducing_loop[HEX_ADAM_LOOPY - j - 1][HEX_ADAM_LOOPX - i - 1]; + } + } + break; + case 5: + start.x = (lp->bncols - HEX_ADAM_LOOPY / 2) / 2; + start.y = (lp->bnrows - HEX_ADAM_LOOPX) / 2; + lp->mincol = start.x - 2; + lp->minrow = start.y - 1; + lp->maxcol = start.x + HEX_ADAM_LOOPY + 1; + lp->maxrow = start.y + HEX_ADAM_LOOPX + 1; + for (j = 0; j < HEX_ADAM_LOOPX; j++) { + for (i = 0; i < HEX_ADAM_LOOPY; i++) { + k = (((lp->bnrows / 2 + HEX_ADAM_LOOPX / 2) % 2) ? -(HEX_ADAM_LOOPX - j - 1) / 2 : -(HEX_ADAM_LOOPX - j) / 2); + lp->newcells[(start.y + j) * lp->bncols + start.x + i + k] = + hex_self_reproducing_loop[HEX_ADAM_LOOPX - i - 1][j]; + } + } + break; + } +#if DEBUGTEST + /* printf ("s %d s %d \n", start.x, start.y); */ + printf ("%d %d %d %d %d\t", + start.x + i + ((lp->bnrows / 2 % 2) ? -j / 2 : -(j + 1) / 2) - lp->bx, + start.y + j - lp->by, i, j, hex_self_reproducing_loop[j][i]); + /* Draw right away */ + drawcell(mi, start.x + i + ((lp->bnrows / 2 % 2) ? -j / 2 : -(j + 1) / 2) - lp->bx, + start.y + j - lp->by, + hex_self_reproducing_loop[j][i]); +#endif +#if DEBUGTEST + printf ("\n"); +#endif +#if DEBUGTEST + printf ("\n"); +#endif + } else { + switch (NRAND(4)) { + case 0: + start.x = (lp->bncols - ADAM_LOOPX) / 2; + start.y = (lp->bnrows - ADAM_LOOPY) / 2; + dirx.x = 1, dirx.y = 0; + diry.x = 0, diry.y = 1; + lp->mincol = start.x, lp->minrow = start.y; + lp->maxcol = start.x + ADAM_LOOPX, lp->maxrow = start.y + ADAM_LOOPY; + break; + case 1: + start.x = (lp->bncols + ADAM_LOOPY) / 2; + start.y = (lp->bnrows - ADAM_LOOPX) / 2; + dirx.x = 0, dirx.y = 1; + diry.x = -1, diry.y = 0; + lp->mincol = start.x - ADAM_LOOPY, lp->minrow = start.y; + lp->maxcol = start.x, lp->maxrow = start.y + ADAM_LOOPX; + break; + case 2: + start.x = (lp->bncols + ADAM_LOOPX) / 2; + start.y = (lp->bnrows + ADAM_LOOPY) / 2; + dirx.x = -1, dirx.y = 0; + diry.x = 0, diry.y = -1; + lp->mincol = start.x - ADAM_LOOPX, lp->minrow = start.y - ADAM_LOOPY; + lp->maxcol = start.x, lp->maxrow = start.y; + break; + case 3: + start.x = (lp->bncols - ADAM_LOOPY) / 2; + start.y = (lp->bnrows + ADAM_LOOPX) / 2; + dirx.x = 0, dirx.y = -1; + diry.x = 1, diry.y = 0; + lp->mincol = start.x, lp->minrow = start.y - ADAM_LOOPX; + lp->maxcol = start.x + ADAM_LOOPY, lp->maxrow = start.y; + break; + } + for (j = 0; j < ADAM_LOOPY; j++) + for (i = 0; i < ADAM_LOOPX; i++) + lp->newcells[(start.y + dirx.y * i + diry.y * j) * lp->bncols + + start.x + dirx.x * i + diry.x * j] = + self_reproducing_loop[j][i]; +#if DEBUG + /* Draw right away */ + drawcell(mi, start.x + dirx.x * i + diry.x * j - lp->bx, + start.y + dirx.y * i + diry.y * j - lp->by, + self_reproducing_loop[j][i]); +#endif + } +} + + +static void +do_gen(loopstruct * lp) +{ + int i, j, k; + unsigned char *z; + unsigned int n[MAXNEIGHBORS]; + unsigned int c; + +#define LOC(X, Y) (*(lp->oldcells + (X) + ((Y) * lp->bncols))) + + for (j = lp->minrow; j <= lp->maxrow; j++) { + for (i = lp->mincol; i <= lp->maxcol; i++) { + z = lp->newcells + i + j * lp->bncols; + c = LOC(i, j); + for (k = 0; k < local_neighbors; k++) { + int newi = i, newj = j; + + position_of_neighbor(k * ANGLES / local_neighbors, &newi, &newj); + n[k] = 0; + if (withinBounds(lp, newi, newj)) { + n[k] = LOC(newi, newj); + } + } + if (local_neighbors == 6) { + *z = HEX_TABLE_OUT(c, n[0], n[1], n[2], n[3], n[4], n[5]); + } else { + *z = TABLE_OUT(c, n[0], n[1], n[2], n[3]); + } + } + } +} + +static void +free_list(loopstruct * lp) +{ + int state; + + for (state = 0; state < COLORS; state++) + free_state(lp, state); +} + +void +release_loop(ModeInfo * mi) +{ + if (loops != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + loopstruct *lp = &loops[screen]; + int shade; + + for (shade = 0; shade < lp->init_bits; shade++) + if (lp->pixmaps[shade] != None) + XFreePixmap(MI_DISPLAY(mi), lp->pixmaps[shade]); + if (lp->stippledGC != None) + XFreeGC(MI_DISPLAY(mi), lp->stippledGC); + if (lp->oldcells != NULL) + (void) free((void *) lp->oldcells); + if (lp->newcells != NULL) + (void) free((void *) lp->newcells); + free_list(lp); + } + (void) free((void *) loops); + loops = NULL; + } + if (table != NULL) { + (void) free((void *) table); + table = NULL; + } +} + +void +init_loop(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int i, size = MI_SIZE(mi); + loopstruct *lp; + XGCValues gcv; + + if (loops == NULL) { + if ((loops = (loopstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (loopstruct))) == NULL) + return; + } + lp = &loops[MI_SCREEN(mi)]; + + lp->redrawing = 0; + + if ((MI_NPIXELS(mi) < COLORS) && (lp->init_bits == 0)) { + if (lp->stippledGC == None) { + gcv.fill_style = FillOpaqueStippled; + lp->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv); + if (lp->stippledGC == None) { + release_loop(mi); + return; + } + } + LOOPBITS(stipples[0], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[2], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[3], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[4], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[6], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[7], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[8], STIPPLESIZE, STIPPLESIZE); + LOOPBITS(stipples[10], STIPPLESIZE, STIPPLESIZE); + if (lp->pixmaps[COLORS - 1] == None) { + release_loop(mi); + return; + } + } + if (MI_NPIXELS(mi) >= COLORS) { + /* Maybe these colors should be randomized */ + lp->colors[0] = MI_BLACK_PIXEL(mi); + lp->colors[1] = MI_PIXEL(mi, 0); /* RED */ + lp->colors[5] = MI_PIXEL(mi, MI_NPIXELS(mi) / REALCOLORS); /* YELLOW */ + lp->colors[4] = MI_PIXEL(mi, 2 * MI_NPIXELS(mi) / REALCOLORS); /* GREEN */ + lp->colors[6] = MI_PIXEL(mi, 3 * MI_NPIXELS(mi) / REALCOLORS); /* CYAN */ + lp->colors[2] = MI_PIXEL(mi, 4 * MI_NPIXELS(mi) / REALCOLORS); /* BLUE */ + lp->colors[3] = MI_PIXEL(mi, 5 * MI_NPIXELS(mi) / REALCOLORS); /* MAGENTA */ + lp->colors[7] = MI_WHITE_PIXEL(mi); + } + free_list(lp); + lp->generation = 0; + lp->width = MI_WIDTH(mi); + lp->height = MI_HEIGHT(mi); + + if (!local_neighbors) { + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + local_neighbors = neighbors; + neighbor_kind = i; + break; + } + if (i == NEIGHBORKINDS - 1) { +#if 1 + local_neighbors = plots[NRAND(NEIGHBORKINDS)]; + neighbor_kind = (local_neighbors == 4) ? 0 : 1; +#else + local_neighbors = 4; + neighbor_kind = 0; +#endif + break; + } + } + } + + + if (local_neighbors == 6) { + int nccols, ncrows; + + if (lp->width < 4) + lp->width = 4; + if (lp->height < 4) + lp->height = 4; + if (size < -MINSIZE) { + lp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(lp->width, lp->height) / + HEX_MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + } else if (size < MINSIZE) { + if (!size) + lp->ys = MAX(MINSIZE, MIN(lp->width, lp->height) / HEX_MINGRIDSIZE); + else + lp->ys = MINSIZE; + } else + lp->ys = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / + HEX_MINGRIDSIZE)); + lp->xs = lp->ys; + nccols = MAX(lp->width / lp->xs - 2, HEX_ADAM_LOOPX + 1); + ncrows = MAX(lp->height / lp->ys - 1, HEX_ADAM_LOOPY + 1); + lp->ncols = nccols / 2; + lp->nrows = ncrows / 2; + lp->nrows -= !(lp->nrows & 1); /* Must be odd */ + lp->xb = (lp->width - lp->xs * nccols) / 2 + lp->xs; + lp->yb = (lp->height - lp->ys * ncrows) / 2 + lp->ys; + for (i = 0; i < 6; i++) { + lp->shape.hexagon[i].x = (lp->xs - 1) * hexagonUnit[i].x; + lp->shape.hexagon[i].y = ((lp->ys - 1) * hexagonUnit[i].y / 2) * 4 / 3; + } + } else { + if (size < -MINSIZE) + lp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + lp->ys = MAX(MINSIZE, MIN(lp->width, lp->height) / MINGRIDSIZE); + else + lp->ys = MINSIZE; + } else + lp->ys = MIN(size, MAX(MINSIZE, MIN(lp->width, lp->height) / + MINGRIDSIZE)); + lp->xs = lp->ys; + lp->ncols = MAX(lp->width / lp->xs, ADAM_LOOPX + 1); + lp->nrows = MAX(lp->height / lp->ys, ADAM_LOOPX + 1); + lp->xb = (lp->width - lp->xs * lp->ncols) / 2; + lp->yb = (lp->height - lp->ys * lp->nrows) / 2; + } + lp->bx = 1; + lp->by = 1; + lp->bncols = lp->ncols + 2 * lp->bx; + lp->bnrows = lp->nrows + 2 * lp->by; + + MI_CLEARWINDOW(mi); + + if (lp->oldcells != NULL) { + (void) free((void *) lp->oldcells); + lp->oldcells = NULL; + } + if ((lp->oldcells = (unsigned char *) calloc(lp->bncols * lp->bnrows, sizeof (unsigned char))) == NULL) { + release_loop(mi); + return; + } + if (lp->newcells != NULL) { + (void) free((void *) lp->newcells); + lp->newcells = NULL; + } + if ((lp->newcells = (unsigned char *) calloc(lp->bncols * lp->bnrows, sizeof (unsigned char))) == NULL) { + release_loop(mi); + return; + } + if (init_table()) { + release_loop(mi); + return; + } + init_adam(mi); +} + +void +draw_loop(ModeInfo * mi) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + int offset, i, j, life = 0; + unsigned char *z, *znew; + + if (loops == NULL) { + init_loop(mi); + return; + } + MI_IS_DRAWN(mi) = True; + + for (j = lp->minrow; j <= lp->maxrow; j++) { + for (i = lp->mincol; i <= lp->maxcol; i++) { + offset = j * lp->bncols + i; + z = lp->oldcells + offset; + znew = lp->newcells + offset; + if (*z != *znew) { + *z = *znew; + addtolist(mi, i - lp->bx, j - lp->by, *znew); + life = 1; + if (i == lp->mincol && i > lp->bx) + lp->mincol--; + if (j == lp->minrow && j > lp->by) + lp->minrow--; + if (i == lp->maxcol && i < lp->bncols - 2 * lp->bx) + lp->maxcol++; + if (j == lp->maxrow && j < lp->bnrows - 2 * lp->by) + lp->maxrow++; + } + } + } + for (i = 0; i < COLORS; i++) + draw_state(mi, i); + if (++lp->generation > MI_CYCLES(mi) /* || !life */) { + init_loop(mi); + return; + } else + do_gen(lp); + + if (lp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + if ((*(lp->oldcells + lp->redrawpos))) { + drawcell(mi, lp->redrawpos % lp->bncols - lp->bx, + lp->redrawpos / lp->bncols - lp->by, + *(lp->oldcells + lp->redrawpos)); + } + if (++(lp->redrawpos) >= lp->bncols * (lp->bnrows - lp->bx)) { + lp->redrawing = 0; + break; + } + } + } +} + +void +refresh_loop(ModeInfo * mi) +{ + loopstruct *lp = &loops[MI_SCREEN(mi)]; + + if (loops == NULL) { + init_loop(mi); + return; + } + MI_CLEARWINDOW(mi); + lp->redrawing = 1; + lp->redrawpos = lp->by * lp->ncols + lp->bx; +} + +#endif /* MODE_loop */ diff --git a/modes/lyapunov.c b/modes/lyapunov.c new file mode 100644 index 00000000..9628c35a --- /dev/null +++ b/modes/lyapunov.c @@ -0,0 +1,402 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* lyapunov --- animated lyapunov space */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)lyapunov.c 4.13 98/12/21 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. + * + * Pictures discovered by Mario Markus and Benno Hess while trying to + * simulate how enzymes break down carbohydrates. By adjusting a pair of + * parameter's they found they could make the simulated enzymes behave in + * either a orderly or chaotic manner. Images are based on a formula + * named after the Russian mathematician Aleksandr M. Lyapunov. + * See A.K. Dewdney's "Computer Recreations", Scientific American + * Magazine" Sep 1991 for more info. + * + * Revision History: + * 17-Dec-98: Used as basis mandelbrot.c + */ + + +#ifdef STANDALONE +#define PROGCLASS "Lyapunov" +#define HACK_INIT init_lyapunov +#define HACK_DRAW draw_lyapunov +#define lyapunov_opts xlockmore_opts +#define DEFAULTS "*delay: 25000 \n" \ + "*count: 600 \n" \ + "*cycles: 20000 \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 */ +#include "vis.h" +#include "color.h" +#endif /* !STANDALONE */ + +#ifdef MODE_lyapunov + +#define MINPOWER 2 +#define DEF_INCREMENT "1.00" +/* 4.0 is best for seeing if a point is inside the set, 13 is better if +** you want to get a pretty corona +*/ + +#define FLOATRAND(min,max) ((min)+((double) LRAND()/((double) MAXRAND))*((max)-(min))) + +ModeSpecOpt lyapunov_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct lyapunov_description = +{"lyapunov", "init_lyapunov", "draw_lyapunov", "release_lyapunov", + NULL, "init_lyapunov", NULL, &lyapunov_opts, + 25000, 600, 20000, 1, 64, 1.0, "", + "Shows lyapunov space", 0, NULL}; + +#endif + +#define ROUND_FLOAT(x,a) ((float) ((int) ((x) / (a) + 0.5)) * (a)) +#define MAXPOWER 14 /* (32 - 2) for 32 bit unsigned long */ + +#ifdef DEBUG +static int debug; +#endif + +typedef struct { + int column; + XColor fgcol, bgcol; /* foreground and background colour specs */ + Bool fixed_colormap; + int ncolors; + XColor top; + XColor bottom; + XColor *colors; + Colormap cmap; + int usable_colors; + unsigned int cur_color; + int screen_width; + int screen_height; + float reptop; + unsigned long periodic_forcing; + int firstone; +} lyapstruct; + +static lyapstruct *lyaps = NULL; +#define OFFSET 3.0 /* Slight changes here may have unexpected results! */ + +static double +reps(unsigned long periodic_forcing, int firstone, int iter, double a, double b) +{ + int forcing_index = firstone, n; + double x = 0.5, total = 0.0, gamma; + + a += OFFSET, b += OFFSET; + for (n = 1; n <= iter; n++) { + gamma = (periodic_forcing & (1 << forcing_index)) ? b : a; + if (forcing_index == 0) + forcing_index = firstone; + else + forcing_index--; + x = gamma * x * (1.0 - x); + /* Sci. Am. article says this should be a table */ + total += (log(ABS(gamma * (1.0 - 2.0 * x))) / M_LN2); +#ifdef DEBUG + if (debug) + /*if (!(n % 1000)) */ + (void) printf("gamma %g, a %g, b %g, result %g, n %d, total %g, x %g, index %d\n", + gamma, a, b, total / n, n, total, x, forcing_index); +#endif + } + return (total / ((double) iter)); +} + +void +init_lyapunov(ModeInfo * mi) +{ + lyapstruct *lp; + int preserve; + Bool truecolor; + unsigned long redmask, greenmask, bluemask; + Window window = MI_WINDOW(mi); + Display *display = MI_DISPLAY(mi); + int i = NRAND(MAXPOWER); + unsigned long power2; + + if (lyaps == NULL) { + if ((lyaps = (lyapstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (lyapstruct))) == NULL) + return; + } + lp = &lyaps[MI_SCREEN(mi)]; + +#ifdef DEBUG + debug = MI_IS_DEBUG(mi); +#endif + lp->column = 0; + + MI_CLEARWINDOW(mi); + + lp->screen_width = MI_WIDTH(mi); + lp->screen_height = MI_HEIGHT(mi); + + lp->reptop = 0.6; + + /* To force a number, say has i + 2 (or 4) binary digits */ + power2 = 1 << (i + 1); + /* Do not want numbers which in binary are all 1's. */ + lp->periodic_forcing = NRAND(power2 - 1) + power2; + lp->firstone = 1; + for (i = 32 - 2; i >= 1; i--) + if (lp->periodic_forcing & (1 << i)) { + lp->firstone = i; + break; + } + + if (MI_IS_VERBOSE(mi)) { + (void) printf("0x%x forcing number", lp->periodic_forcing); + switch (lp->periodic_forcing) { + case 0x2: + (void) printf(", swallow\n"); + break; + case 0x34: + (void) printf(", jellyfish\n"); + break; + case 0xFC0: /* Yeah, I think it should be "city" too, but its not. */ + (void) printf(", zircon zity\n"); + break; + default: + (void) printf("\n"); + break; + } + } + +#ifndef STANDALONE + lp->fixed_colormap = !setupColormap(mi, + &(lp->ncolors), &truecolor, &redmask, &greenmask, &bluemask); + if (!lp->fixed_colormap) { + preserve = preserveColors(MI_BLACK_PIXEL(mi), MI_WHITE_PIXEL(mi), + MI_BG_PIXEL(mi), MI_FG_PIXEL(mi)); + lp->bgcol.pixel = MI_BG_PIXEL(mi); + lp->fgcol.pixel = MI_FG_PIXEL(mi); + XQueryColor(display, MI_COLORMAP(mi), &(lp->bgcol)); + XQueryColor(display, MI_COLORMAP(mi), &(lp->fgcol)); + +#define RANGE 65536 +#define DENOM 4 + /* color in the bottom part */ + lp->bottom.red = NRAND(RANGE / DENOM); + lp->bottom.blue = NRAND(RANGE / DENOM); + lp->bottom.green = NRAND(RANGE / DENOM); + /* color in the top part */ + lp->top.red = RANGE - NRAND(((DENOM-1)*RANGE) / DENOM); + lp->top.blue = RANGE - NRAND(((DENOM-1)*RANGE) / DENOM); + lp->top.green = RANGE - NRAND(((DENOM-1)*RANGE) / DENOM); + + /* allocate colormap, if needed */ + if (lp->colors == NULL) + lp->colors = (XColor *) malloc(sizeof (XColor) * lp->ncolors); + if (lp->cmap == None) + lp->cmap = XCreateColormap(display, window, + MI_VISUAL(mi), AllocAll); + lp->usable_colors = lp->ncolors - preserve; + } + +#endif /* !STANDALONE */ +} + +#if !defined(OLD_COLOR) +static unsigned short +pick_rgb(unsigned short bottom,unsigned short top, + int color_ind,int ncolors) +{ + /* por == part of range */ + double por; + if (color_indcolumn % 15 == 0) { + /* advance "drawing" color */ + lp->cur_color = (lp->cur_color + 1) % lp->ncolors; + if (!lp->fixed_colormap && lp->usable_colors > 2) { + while (lp->cur_color == MI_WHITE_PIXEL(mi) || + lp->cur_color == MI_BLACK_PIXEL(mi) || + lp->cur_color == MI_BG_PIXEL(mi) || + lp->cur_color == MI_FG_PIXEL(mi)) { + lp->cur_color = (lp->cur_color + 1) % lp->ncolors; + } + } + /* advance colormap */ + if (!lp->fixed_colormap && lp->usable_colors > 2) { + for (i = 0, j = lp->cur_color, k = 0; + i < (unsigned int) lp->ncolors; i++) { + if (i == MI_WHITE_PIXEL(mi)) { + lp->colors[i].pixel = i; + lp->colors[i].red = 65535; + lp->colors[i].blue = 65535; + lp->colors[i].green = 65535; + lp->colors[i].flags = DoRed | DoGreen | DoBlue; + } else if (i == MI_BLACK_PIXEL(mi)) { + lp->colors[i].pixel = i; + lp->colors[i].red = 0; + lp->colors[i].blue = 0; + lp->colors[i].green = 0; + lp->colors[i].flags = DoRed | DoGreen | DoBlue; + } else if (i == MI_BG_PIXEL(mi)) { + lp->colors[i] = lp->bgcol; + } else if (i == MI_FG_PIXEL(mi)) { + lp->colors[i] = lp->fgcol; + } else { +#if defined(OLD_COLOR) + /* this is known to work well enough. I just wanted + ** to explore some other possibilities + */ + double range; + lp->colors[i].pixel = i; + range = ((double) (lp->top.red - lp->bottom.red)) / + lp->ncolors; + lp->colors[i].red = (short unsigned int) (range * j + + lp->bottom.red); + range = ((double) (lp->top.green - lp->bottom.green)) / + lp->ncolors; + lp->colors[i].green = (short unsigned int) (range * j + + lp->bottom.green); + range = ((double) (lp->top.blue - lp->bottom.blue)) / + lp->ncolors; + lp->colors[i].blue = (short unsigned int) (range * j + + lp->bottom.blue); + lp->colors[i].flags = DoRed | DoGreen | DoBlue; + j = (j + 1) % lp->ncolors; + k++; +#else + lp->colors[i].pixel = i; + lp->colors[i].red = pick_rgb(lp->bottom.red,lp->top.red, + j,lp->ncolors); + lp->colors[i].green = pick_rgb(lp->bottom.green,lp->top.green, + j,lp->ncolors); + lp->colors[i].blue = pick_rgb(lp->bottom.blue,lp->top.blue, + j,lp->ncolors); + lp->colors[i].flags = DoRed | DoGreen | DoBlue; + j = (j + 1) % lp->ncolors; + k++; +#endif + } + } + /* make the entire lyapunov move forward */ + XStoreColors(display, lp->cmap, lp->colors, lp->ncolors); + setColormap(display, window, lp->cmap, MI_IS_INWINDOW(mi)); + } + } +#endif /* !STANDALONE */ + /* so we iterate columns beyond the width of the physical screen, so that + ** we just wait around and show what we've done + */ + if (lp->column >= 4 * lp->screen_width) { + /* reset to left edge of screen */ + init_lyapunov(mi); + return; + /* select a new region! */ + } else if (lp->column >= lp->screen_width) { + /* delay a while */ + lp->column++; + return; + } + for (h = 0; h < lp->screen_height; h++) { + unsigned int color; + double result; + +#define MULT 1.0 + result = reps(lp->periodic_forcing, lp->firstone, MI_COUNT(mi), + ((double) lp->column) / (MULT * lp->screen_width), + ((double) h) / (MULT * lp->screen_height)); +#ifdef DEBUG + if (debug) + (void) printf("a %g, b %g, result %g\n", + ((double) lp->column) / lp->screen_width, + ((double) h) / lp->screen_height, result); +#endif + if (result > 0.0) + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + else { + color=(unsigned int) ((MI_NPIXELS(mi) * (float)-result) / lp->reptop); + color = color % MI_NPIXELS(mi); +#ifndef STANDALONE + if (!lp->fixed_colormap && lp->usable_colors > 2) { + while (color == MI_WHITE_PIXEL(mi) || + color == MI_BLACK_PIXEL(mi) || + color == MI_BG_PIXEL(mi) || + color == MI_FG_PIXEL(mi)) { + color = (color + 1) % lp->ncolors; + } + XSetForeground(display, gc, color); + } else + XSetForeground(display, gc, MI_PIXEL(mi, color)); +#endif /* !STANDALONE */ + } + /* we no longer have vertical symmetry - so we colpute all points + ** and don't draw with redundancy + */ + XDrawPoint(display, window, gc, lp->column, h); + } + lp->column++; +} + +void +release_lyapunov(ModeInfo * mi) +{ + if (lyaps != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + lyapstruct *lp = &lyaps[screen]; + + if (lp->cmap != None) + XFreeColormap(MI_DISPLAY(mi), lp->cmap); + if (lp->colors != NULL) + XFree((caddr_t) lp->colors); + } + (void) free((void *) lyaps); + lyaps = NULL; + } +} + +#endif /* MODE_lyapunov */ diff --git a/modes/mandelbrot.c b/modes/mandelbrot.c new file mode 100644 index 00000000..7914edd9 --- /dev/null +++ b/modes/mandelbrot.c @@ -0,0 +1,575 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* mandelbrot --- animated mandelbrot sets */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)mandelbrot.c 4.13 98/12/21 xlockmore"; + +#endif + +#define USE_LOG + +/*- + * Copyright (c) 1997 Dan Stromberg + * + * 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. + * + * See A.K. Dewdney's "Computer Recreations", Scientific American + * Magazine" Aug 1985 for more info. Also A.K. Dewdney's "Computer + * Recreations", Scientific American Magazine" Jul 1989, has some neat + * extensions besides z^n + c (n small but >= 2) some of these are: + * z^z + z^n + c + * sin(z) + e^z + c + * sin(z) + z^n + c + * These were first explored by a colleague of Mandelbrot, Clifford A. + * Pickover. These would make nice additions to add. + * + * Revision History: + * 20-Oct-97: Written by Dan Stromberg + * 17-Nov-98: Many Changes by Stromberg, including selection of + * interesting subregions, more extreme color ranges, + * reduction of possible powers to smaller/more interesting + * range, elimination of some unused code, slower color cycling, + * longer period of color cycling after the drawing is complete. + * Hopefully the longer color cycling period will make the mode + * reasonable even after CPUs are so fast that the drawing + * interval goes by quickly + */ + + +#ifdef STANDALONE +#define PROGCLASS "Mandelbrot" +#define HACK_INIT init_mandelbrot +#define HACK_DRAW draw_mandelbrot +#define mandelbrot_opts xlockmore_opts +#define DEFAULTS "*delay: 25000 \n" \ + "*count: -8 \n" \ + "*cycles: 20000 \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 */ +#include "vis.h" +#include "color.h" +#endif /* !STANDALONE */ + +#ifdef MODE_mandelbrot + +#define MINPOWER 2 +#define DEF_INCREMENT "1.00" +/* 4.0 is best for seeing if a point is inside the set, 13 is better if +** you want to get a pretty corona +*/ +#define ESCAPE 13.0 +#define FLOATRAND(min,max) ((min)+((double) LRAND()/((double) MAXRAND))*((max)-(min))) + + /* incr also would be nice as a parameter. It controls how fast + the order is advanced. Non-integral values are not true orders, + but it's a somewhat interesting function anyway + */ +static float increment; + +static XrmOptionDescRec opts[] = +{ + {"-increment", ".mandelbrot.increment", XrmoptionSepArg, (caddr_t) NULL} +}; + +static argtype vars[] = +{ + {(caddr_t *) & increment, "increment", "Increment", DEF_INCREMENT, t_Float}, +}; +static OptionStruct desc[] = +{ + {"-increment value", "increasing orders"} +}; + +ModeSpecOpt mandelbrot_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct mandelbrot_description = +{"mandelbrot", "init_mandelbrot", "draw_mandelbrot", "release_mandelbrot", + NULL, "init_mandelbrot", NULL, &mandelbrot_opts, + 25000, -8, 20000, 1, 64, 1.0, "", + "Shows mandelbrot sets", 0, NULL}; + +#endif + +#define ROUND_FLOAT(x,a) ((float) ((int) ((x) / (a) + 0.5)) * (a)) + +typedef struct { + double real, imag; +} complex; + +static void +add(complex * a, complex b) +{ + a->real = a->real + b.real; + a->imag = a->imag + b.imag; +} + +static void +mult(complex * a, complex b) +{ + double tr, ti; + + /* a.real*b.real + i*a.real*b.imag + i*a.imag*b.real + i^2*a.imag*b.imag */ + tr = a->real * b.real - a->imag * b.imag; + ti = a->real * b.imag + a->imag * b.real; + a->real = tr; + a->imag = ti; +} + +/* Plans for future additions? a, z complex; x, y real + sin(z) = (e^(i * z) - e^(-i * z)) / (2 * i) + cos(z) = (e^(i * z) - e^(-i * z)) / 2 + a^z = e^(z * ln(a)) + e^z = e^x * (cos(y) + i * sin(y)) + ln(z) = ln ((x^2 + y^2)^(1/2)) + i * invtan(y/x) + */ + +/* this is a true power function. */ +static void +ipow(complex * a, int n) +{ + + + switch (n) { + case 1: + return; + case 2: + mult(a, *a); + return; + default: + { + complex a2; + int t2; + + a2 = *a; /* Not very efficient to use: mult(a, ipow(&a2, n-1)); */ + t2 = n / 2; + ipow(&a2, t2); + mult(&a2, a2); + if (t2 * 2 != n) /* if n is odd */ + mult(&a2, *a); + *a = a2; + } + } +} + +typedef struct { + int counter; + double power; + int column; + XColor fgcol, bgcol; /* foreground and background colour specs */ + Bool fixed_colormap; + int ncolors; + XColor top; + XColor bottom; + XColor *colors; + Colormap cmap; + int usable_colors; + unsigned int cur_color; + complex extreme_ul; + complex extreme_lr; + complex ul; + complex lr; + int screen_width; + int screen_height; + int reptop; +} mandelstruct; + +static mandelstruct *mandels = NULL; + +static int +reps(complex c, double p, int r) +{ + int rep; + int escaped = 0; + complex t; + + t = c; + for (rep = 0; rep < r; rep++) { + ipow(&t, p); + add(&t, c); + if (t.real * t.real + t.imag * t.imag >= ESCAPE) { + escaped = 1; + break; + } + } + if (escaped) + return rep; + else + return r; +} + +static void +Select( + /* input variables first */ + complex *extreme_ul,complex *extreme_lr, + int width,int height, + int power,int top, + /* output variables follow */ + complex *selected_ul,complex *selected_lr) + { + double precision; + double s2; + int inside; + int uninteresting; + int found; + int tries; + found = 0; + while (!found) + { + /* select a precision - be careful with this */ + precision = pow(2.0,FLOATRAND(-9.0,-18.0)); + /* printf("precision is %f\n",precision); */ + for (tries=0;tries<10000&&!found;tries++) + { + /* it eventually turned out that this inner loop doesn't always + ** terminate - so we just try 10000 times, and if we don't get + ** anything interesting, we pick a new precision + */ + complex temp; + int sample_step = 4; + int row,column; + inside = 0; + uninteresting = 0; + /* pick a random point in the allowable range */ + temp.real = FLOATRAND(extreme_ul->real,extreme_lr->real); + temp.imag = FLOATRAND(extreme_ul->imag,extreme_lr->imag); + /* find upper left and lower right points */ + selected_ul->real = temp.real - precision * width / 2; + selected_lr->real = temp.real + precision * width / 2; + selected_ul->imag = temp.imag - precision * height / 2; + selected_lr->imag = temp.imag + precision * height / 2; + /* sample the results we'd get from this choice, accept or reject + ** accordingly + */ + for (row=0; rowimag + + (selected_ul->imag - selected_lr->imag) * + (((double)row)/sample_step); + temp.real = selected_ul->real + + (selected_ul->real - selected_lr->real) * + (((double)column)/sample_step); + r = reps(temp,power,top); + /* Here, we just want to see if the point is in the set, + ** not if we can make something pretty + */ + if (r == top) + { + inside++; + } + if (r < 2) + { + uninteresting++; + } + } + } + s2 = sample_step*sample_step; + /* more than 10 percent, but less than 60 percent inside the set */ + if (inside >= ceil(s2/10.0) && inside <= s2*6.0/10.0 && + uninteresting <= s2/10.0) + { + /* this one looks interesting */ + found = 1; + } + else + { + /* this doesn't look like a real good combination, so back up + ** to the top of the loop to try another possibility + */ + } + } + } + } + +void +init_mandelbrot(ModeInfo * mi) +{ + mandelstruct *mp; + int preserve; + Bool truecolor; + unsigned long redmask, greenmask, bluemask; + Window window = MI_WINDOW(mi); + Display *display = MI_DISPLAY(mi); + + if (mandels == NULL) { + if ((mandels = (mandelstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (mandelstruct))) == NULL) + return; + } + mp = &mandels[MI_SCREEN(mi)]; + + + mp->power = NRAND(3) + MINPOWER; + + mp->column = 0; + mp->counter = 0; + + MI_CLEARWINDOW(mi); + + mp->screen_width = MI_WIDTH(mi); + mp->screen_height = MI_HEIGHT(mi); + + mp->reptop = 300; + + /* these could be tuned a little closer, but the selection + ** process throws out the chaf anyway, it just takes slightly + ** longer + */ + mp->extreme_ul.real = -3.0; + mp->extreme_ul.imag = -3.0; + mp->extreme_lr.real = 3.0; + mp->extreme_lr.imag = 3.0; + +#ifndef STANDALONE + mp->fixed_colormap = !setupColormap(mi, + &(mp->ncolors), &truecolor, &redmask, &greenmask, &bluemask); + if (!mp->fixed_colormap) { + preserve = preserveColors(MI_BLACK_PIXEL(mi), MI_WHITE_PIXEL(mi), + MI_BG_PIXEL(mi), MI_FG_PIXEL(mi)); + mp->bgcol.pixel = MI_BG_PIXEL(mi); + mp->fgcol.pixel = MI_FG_PIXEL(mi); + XQueryColor(display, MI_COLORMAP(mi), &(mp->bgcol)); + XQueryColor(display, MI_COLORMAP(mi), &(mp->fgcol)); + +#define RANGE 65536 +#define DENOM 4 + /* color in the bottom part */ + mp->bottom.red = NRAND(RANGE / DENOM); + mp->bottom.blue = NRAND(RANGE / DENOM); + mp->bottom.green = NRAND(RANGE / DENOM); + /* color in the top part */ + mp->top.red = RANGE - NRAND(((DENOM-1)*RANGE) / DENOM); + mp->top.blue = RANGE - NRAND(((DENOM-1)*RANGE) / DENOM); + mp->top.green = RANGE - NRAND(((DENOM-1)*RANGE) / DENOM); + + /* allocate colormap, if needed */ + if (mp->colors == NULL) + mp->colors = (XColor *) malloc(sizeof (XColor) * mp->ncolors); + if (mp->cmap == None) + mp->cmap = XCreateColormap(display, window, + MI_VISUAL(mi), AllocAll); + mp->usable_colors = mp->ncolors - preserve; + } + Select(&mp->extreme_ul,&mp->extreme_lr, + mp->screen_width,mp->screen_height, + mp->power,mp->reptop, + &mp->ul,&mp->lr); + +#endif /* !STANDALONE */ +} + +#if !defined(OLD_COLOR) +static unsigned short +pick_rgb(unsigned short bottom,unsigned short top, + int color_ind,int ncolors) +{ + /* por == part of range */ + double por; + if (color_indreptop); +#endif + + MI_IS_DRAWN(mi) = True; + +#ifndef STANDALONE + if (mp->counter % 15 == 0) { + /* advance "drawing" color */ + mp->cur_color = (mp->cur_color + 1) % mp->ncolors; + if (!mp->fixed_colormap && mp->usable_colors > 2) { + while (mp->cur_color == MI_WHITE_PIXEL(mi) || + mp->cur_color == MI_BLACK_PIXEL(mi) || + mp->cur_color == MI_BG_PIXEL(mi) || + mp->cur_color == MI_FG_PIXEL(mi)) { + mp->cur_color = (mp->cur_color + 1) % mp->ncolors; + } + } + /* advance colormap */ + if (!mp->fixed_colormap && mp->usable_colors > 2) { + for (i = 0, j = mp->cur_color, k = 0; + i < (unsigned int) mp->ncolors; i++) { + if (i == MI_WHITE_PIXEL(mi)) { + mp->colors[i].pixel = i; + mp->colors[i].red = 65535; + mp->colors[i].blue = 65535; + mp->colors[i].green = 65535; + mp->colors[i].flags = DoRed | DoGreen | DoBlue; + } else if (i == MI_BLACK_PIXEL(mi)) { + mp->colors[i].pixel = i; + mp->colors[i].red = 0; + mp->colors[i].blue = 0; + mp->colors[i].green = 0; + mp->colors[i].flags = DoRed | DoGreen | DoBlue; + } else if (i == MI_BG_PIXEL(mi)) { + mp->colors[i] = mp->bgcol; + } else if (i == MI_FG_PIXEL(mi)) { + mp->colors[i] = mp->fgcol; + } else { +#if defined(OLD_COLOR) + /* this is known to work well enough. I just wanted + ** to explore some other possibilities + */ + double range; + mp->colors[i].pixel = i; + range = ((double) (mp->top.red - mp->bottom.red)) / + mp->ncolors; + mp->colors[i].red = (short unsigned int) (range * j + + mp->bottom.red); + range = ((double) (mp->top.green - mp->bottom.green)) / + mp->ncolors; + mp->colors[i].green = (short unsigned int) (range * j + + mp->bottom.green); + range = ((double) (mp->top.blue - mp->bottom.blue)) / + mp->ncolors; + mp->colors[i].blue = (short unsigned int) (range * j + + mp->bottom.blue); + mp->colors[i].flags = DoRed | DoGreen | DoBlue; + j = (j + 1) % mp->ncolors; + k++; +#else + mp->colors[i].pixel = i; + mp->colors[i].red = pick_rgb(mp->bottom.red,mp->top.red, + j,mp->ncolors); + mp->colors[i].green = pick_rgb(mp->bottom.green,mp->top.green, + j,mp->ncolors); + mp->colors[i].blue = pick_rgb(mp->bottom.blue,mp->top.blue, + j,mp->ncolors); + mp->colors[i].flags = DoRed | DoGreen | DoBlue; + j = (j + 1) % mp->ncolors; + k++; +#endif + } + } + /* make the entire mandelbrot move forward */ + XStoreColors(display, mp->cmap, mp->colors, mp->ncolors); + setColormap(display, window, mp->cmap, MI_IS_INWINDOW(mi)); + } + } +#endif /* !STANDALONE */ + /* so we iterate columns beyond the width of the physical screen, so that + ** we just wait around and show what we've done + */ + if (mp->column >= 3 * mp->screen_width) { + /* reset to left edge of screen, bump power */ + mp->column = 0; + mp->power = NRAND(3) + MINPOWER; + /* select a new region! */ + Select(&mp->extreme_ul,&mp->extreme_lr, + mp->screen_width,mp->screen_height, + mp->power,mp->reptop, + &mp->ul,&mp->lr); + } else if (mp->column >= mp->screen_width) { + /* delay a while */ + mp->column++; + mp->counter++; + return; + } + for (h = 0; h < mp->screen_height; h++) { + unsigned int color; + int result; + + /* c.real = 1.3 - (double) mp->column / mp->screen_width * 3.4; */ + /* c.imag = -1.6 + (double) h / mp->screen_height * 3.2; */ + c.real = mp->ul.real + + (mp->ul.real-mp->lr.real)*(((double)(mp->column))/mp->screen_width); + c.imag = mp->ul.imag + + (mp->ul.imag - mp->lr.imag)*(((double) h) / mp->screen_height); + result = reps(c, mp->power, mp->reptop); + if (result == 0 || result == mp->reptop) + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + else { +#if defined(USE_LOG) + color=(unsigned int) (MI_NPIXELS(mi) * log((float) result) / log_top); +#else + color=(unsigned int) ((MI_NPIXELS(mi) * (float)result) / mp->reptop); +#endif +#ifndef STANDALONE + if (!mp->fixed_colormap && mp->usable_colors > 2) { + while (color == MI_WHITE_PIXEL(mi) || + color == MI_BLACK_PIXEL(mi) || + color == MI_BG_PIXEL(mi) || + color == MI_FG_PIXEL(mi)) { + color = (color + 1) % mp->ncolors; + } + XSetForeground(display, gc, color); + } else + XSetForeground(display, gc, MI_PIXEL(mi, color)); +#endif /* !STANDALONE */ + } + /* we no longer have vertical symmetry - so we compute all points + ** and don't draw with redundancy + */ + XDrawPoint(display, window, gc, mp->column, h); + } + mp->column++; + mp->counter++; + if (mp->counter > MI_CYCLES(mi)) { + init_mandelbrot(mi); + } +} + +void +release_mandelbrot(ModeInfo * mi) +{ + if (mandels != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + mandelstruct *mp = &mandels[screen]; + + if (mp->cmap != None) + XFreeColormap(MI_DISPLAY(mi), mp->cmap); + if (mp->colors != NULL) + XFree((caddr_t) mp->colors); + } + (void) free((void *) mandels); + mandels = NULL; + } +} + +#endif /* MODE_mandelbrot */ diff --git a/modes/marquee.c b/modes/marquee.c new file mode 100644 index 00000000..f24a7b47 --- /dev/null +++ b/modes/marquee.c @@ -0,0 +1,516 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* marquee --- types a text-file or a text ribbon */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)marquee.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by Tobias Gloth and David Bagley + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 03-Nov-95 Many changes (hopefully good ones) by David Bagley + * 01-Oct-95 Written by Tobias Gloth + */ + +#ifdef STANDALONE +#define PROGCLASS "Marquee" +#define HACK_INIT init_marquee +#define HACK_DRAW draw_marquee +#define marquee_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*ncolors: 64 \n" \ + "*font: \n" \ + "*text: \n" \ + "*filename: \n" \ + "*fortunefile: \n" \ + "*program: \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_marquee + +ModeSpecOpt marquee_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct marquee_description = +{"marquee", "init_marquee", "draw_marquee", "release_marquee", + "refresh_marquee", "init_marquee", NULL, &marquee_opts, + 100000, 1, 1, 1, 64, 1.0, "", + "Shows messages", 0, NULL}; + +#endif + +#define font_height(f) ((f==None)?8:f->ascent + f->descent) + +extern XFontStruct *getFont(Display * display); +extern char *getWords(int screen, int screens); +extern int isRibbon(void); + +typedef struct { + int ascent; + int height; + int win_height; + int win_width; + int x; + int y; + int t; + int startx; + int nonblanks; + int color; + int time; + GC gc; + char *words; + char modwords[256]; +} marqueestruct; + +static marqueestruct *marquees = NULL; + +static XFontStruct *mode_font = None; +static int char_width[256]; + +static int +font_width(XFontStruct * font, char ch) +{ + int dummy; + XCharStruct xcs; + + (void) XTextExtents(font, &ch, 1, &dummy, &dummy, &dummy, &xcs); + return xcs.width; +} + +/* returns 1 if c is a printable char, the test should work for most 8 * bit + charsets (e.g. latin1), if we would use isprint, we would * depend of + locale settings that are probably incorrect. */ + +static int +is_valid_char(char c) +{ + return (unsigned char) c >= ' '; +} + +static int +is_char_back_char(char *s) +{ + return is_valid_char(*s) && *(s + 1) == '\b' && + *(s + 2) && is_valid_char(*(s + 2)); +} + +static int +char_back_char_width(char *s) +{ + int w1 = char_width[(int) (unsigned char) *s]; + int w2 = char_width[(int) (unsigned char) *(s + 2)]; + + return w2 < w1 ? w1 : w2; +} + + +/*- + * fix strings of the form abc^H^H^H123 to a^H1b^H2c^H3, since we only + * handle backspace for char, back, char correctly. We do this without + * duplicating the string, but I'm not sure if there are conditions + * when the string is actually const. (when it is def_message, no ^Hs + * are present, I'm not sure about resource strings) + */ + +static char * +fixup_back(char *s) +{ + char *p, *p1, *p2; + char tmp[1000]; + char *t; + char *w; + + /* first of all, check if we have to do anything */ + + if (!*s) + return s; + + for (p = s + 1; *p; p++) + if (*p == '\b' && *(p + 1) == '\b') + break; + if (!*p) + return s; + + /* now search for runs of the form char*n, back*n, char. */ + + for (p = s; *p; p++) { + for (p1 = p; *p1 && is_valid_char(*p1); p1++); + if (*p1 == '\b') { + for (p2 = p1; *p2 && *p2 == '\b'; p2++); + + /* do we have `enough' chars for the backspaces? */ + + if (p2 - p1 > 1 && p1 - p >= p2 - p1) { + if (p1 - p > p2 - p1) { + p = p1 - (p2 - p1); + } + /* the situation is as follows: + p points to the first char, + p1 to the first backspace (end first char run), + p2 to the first char in the 2nd run + + Question: how to do that without tmp storage? + */ + (void) strncpy(tmp, p, p1 - p); + t = tmp; + w = p; + while (t - tmp < p1 - p && *p2) { + *w++ = *t++; + *w++ = '\b'; + *w++ = *p2++; + } + p = p2; + } else { + p = p2; + } + } else { + /* we hit some other control char, just continue at this + position */ + p = p1; + } + } + return s; +} + +static int +text_font_width(char *string) +{ + int n = 0, x = 0, t = 0; + + /* The following does not handle a tab or other weird junk */ + while (*string != '\0') { + if (x > n) + n = x; + switch (*string) { + case '\v': + case '\f': + case '\n': + x = 0; + t = 0; + break; + case '\b': + /* we handle only char, ^H, char smartly, if + * we have something different, we use the + * (probably wrong) assumption that we have + * a monospaced font. */ + if (t) { + t--; + x -= char_width[' ']; + } + break; + case '\t': + x += char_width[' '] * (8 - (t % 8)); + t = ((t + 8) / 8) * 8; + break; + case '\r': + break; + default: + t++; + /* handle char, ^H, char */ + if (is_char_back_char(string)) { + x += char_back_char_width(string); + string += 2; + } else { + x += char_width[(int) (unsigned char) *string]; + } + } + string++; + } + return n; +} + +static int +text_height(char *string) +{ + int n = 0; + + while (*string != '\0') { + if ((*string == '\n') || (*string == '\f') || (*string == '\v')) + n++; + string++; + } + return n; +} + +static int +add_blanks(marqueestruct * mp) +{ + if (mp->t < 251) { + mp->modwords[mp->t] = ' '; + mp->t++; + mp->modwords[mp->t] = ' '; + mp->t++; + mp->modwords[mp->t] = '\0'; + (void) strcat(mp->modwords, " "); + } + mp->x -= 2 * char_width[' ']; + if (mp->x <= -char_width[(int) (unsigned char) mp->modwords[0]]) { + mp->x += char_width[(int) (unsigned char) mp->modwords[0]]; + (void) memcpy(mp->modwords, &(mp->modwords[1]), mp->nonblanks); + mp->nonblanks--; + } + return (mp->nonblanks < 0); +} + +static void +add_letter(marqueestruct * mp, char letter) +{ + if (mp->t < 252) { + mp->modwords[mp->t] = letter; + mp->t++; + mp->modwords[mp->t] = '\0'; + (void) strcat(mp->modwords, " "); + } + mp->x -= char_width[(int) letter]; + if (mp->x <= -char_width[(int) (unsigned char) mp->modwords[0]]) { + mp->x += char_width[(int) (unsigned char) mp->modwords[0]]; + (void) memcpy(mp->modwords, &(mp->modwords[1]), mp->t); + mp->modwords[mp->t] = ' '; + mp->t--; + } else + mp->nonblanks = mp->t; +} + +void +init_marquee(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + marqueestruct *mp; + XGCValues gcv; + int i; + + if (marquees == NULL) { + if ((marquees = (marqueestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (marqueestruct))) == NULL) + return; + } + mp = &marquees[MI_SCREEN(mi)]; + + mp->win_width = MI_WIDTH(mi); + mp->win_height = MI_HEIGHT(mi); + if (MI_NPIXELS(mi) > 2) + mp->color = NRAND(MI_NPIXELS(mi)); + mp->time = 0; + mp->t = 0; + mp->nonblanks = 0; + mp->x = 0; + + MI_CLEARWINDOW(mi); + + if (mode_font == None) + mode_font = getFont(display); + if (mp->gc == NULL && mode_font != None) { + gcv.font = mode_font->fid; + XSetFont(display, MI_GC(mi), mode_font->fid); + gcv.graphics_exposures = False; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + mp->gc = XCreateGC(display, MI_WINDOW(mi), + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + mp->ascent = mode_font->ascent; + mp->height = font_height(mode_font); + for (i = 0; i < 256; i++) + if ((i >= (int) mode_font->min_char_or_byte2) && + (i <= (int) mode_font->max_char_or_byte2)) + char_width[i] = font_width(mode_font, (char) i); + else + char_width[i] = font_width(mode_font, (char) mode_font->default_char); + } else if (mode_font == None) { + for (i = 0; i < 256; i++) + char_width[i] = 8; + } + mp->words = fixup_back(getWords(MI_SCREEN(mi), MI_NUM_SCREENS(mi))); + mp->y = 0; + + if (isRibbon()) { + mp->x = mp->win_width; + if (mp->win_height > font_height(mode_font)) + mp->y += NRAND(mp->win_height - font_height(mode_font)); + else if (mp->win_height < font_height(mode_font)) + mp->y -= NRAND(font_height(mode_font) - mp->win_height); + } else { + int text_ht = text_height(mp->words); + int text_font_wid = text_font_width(mp->words); + + if (mp->win_height > text_ht * font_height(mode_font)) + mp->y = NRAND(mp->win_height - text_ht * font_height(mode_font)); + if (mp->y < 0) + mp->y = 0; + mp->x = 0; + if (mp->win_width > text_font_wid) + mp->x += NRAND(mp->win_width - text_font_wid); + /* else if (mp->win_width < text_font_wid) + mp->x -= NRAND(text_font_wid - mp->win_width); */ + mp->startx = mp->x; + } +} + +void +draw_marquee(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + marqueestruct *mp = &marquees[MI_SCREEN(mi)]; + char *space = " "; + char *ch; + + MI_IS_DRAWN(mi) = True; + + ch = mp->words; + if (isRibbon()) { + ch = mp->words; + switch (*ch) { + case '\0': + if (add_blanks(mp)) { + init_marquee(mi); + return; + } + break; + case '\b': + case '\r': + case '\n': + case '\t': + case '\v': + case '\f': + add_letter(mp, ' '); + mp->words++; + break; + default: + add_letter(mp, *ch); + mp->words++; + } + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, mp->gc, MI_PIXEL(mi, mp->color)); + if (++mp->color == MI_NPIXELS(mi)) + mp->color = 0; + } else + XSetForeground(display, mp->gc, MI_WHITE_PIXEL(mi)); + (void) XDrawImageString(display, MI_WINDOW(mi), mp->gc, + mp->x, mp->y + mp->ascent, mp->modwords, mp->t + 2); + } else { + switch (*ch) { + case '\0': + if (++mp->time > 16) + init_marquee(mi); + return; + case '\b': + if (mp->t) { + /* see note in text_font_width */ + mp->t--; + mp->x -= char_width[' ']; + } + break; + case '\v': + case '\f': + case '\n': + mp->x = mp->startx; + mp->t = 0; + mp->y += mp->height; + if (mp->y + mp->height > mp->win_height) { + XCopyArea(display, window, window, mp->gc, + 0, mp->height, mp->win_width, mp->y - mp->height, 0, 0); + XSetForeground(display, mp->gc, MI_BLACK_PIXEL(mi)); + mp->y -= mp->height; + XFillRectangle(display, window, mp->gc, + 0, mp->y, mp->win_width, mp->height); + } + break; + case '\t': + (void) XDrawString(display, window, mp->gc, mp->x, mp->y + mp->ascent, + space, 8 - (mp->t % 8)); + mp->x += char_width[' '] * (8 - (mp->t % 8)); + mp->t = ((mp->t + 8) / 8) * 8; + break; + case '\r': + break; + default: + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, mp->gc, MI_PIXEL(mi, mp->color)); + if (++mp->color == MI_NPIXELS(mi)) + mp->color = 0; + } else + XSetForeground(display, mp->gc, MI_WHITE_PIXEL(mi)); + if (is_char_back_char(ch)) { + int xmid = mp->x + (char_back_char_width(ch) + 1) / 2; + + (void) XDrawString(display, window, mp->gc, + xmid - char_width[(int) (unsigned char) *ch] / 2, + mp->y + mp->ascent, ch, 1); + (void) XDrawString(display, window, mp->gc, + xmid - char_width[(int) (unsigned char) *(ch + 2)] / 2, + mp->y + mp->ascent, ch + 2, 1); + mp->x += char_back_char_width(ch); + mp->words += 2; + } else { +#ifdef USE_MB + int mb = (*ch & 0x80) ? 2 : 1; + + (void) XDrawString(display, window, mp->gc, + mp->x, mp->y + mp->ascent, ch, mb); + if (mb == 1) + mp->x += char_width[(int) (unsigned char) *ch]; + else { + XRectangle rect; + + XmbTextExtents(fontset, ch, 2, NULL, &rect); + mp->x += rect.width; + } +#else + (void) XDrawString(display, window, mp->gc, + mp->x, mp->y + mp->ascent, ch, 1); + mp->x += char_width[(int) (unsigned char) *ch]; +#endif + } + mp->t++; + } +#ifdef USE_MB + mp->words += (*mp->words & 0x80) ? 2 : 1; +#else + mp->words++; +#endif + } +} + +void +release_marquee(ModeInfo * mi) +{ + if (marquees != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + marqueestruct *mp = &marquees[screen]; + + if (mp->gc != NULL) + XFreeGC(MI_DISPLAY(mi), mp->gc); + } + (void) free((void *) marquees); + marquees = NULL; + } + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } +} + +#endif /* MODE_marquee */ diff --git a/modes/maze.c b/modes/maze.c new file mode 100644 index 00000000..8de8c795 --- /dev/null +++ b/modes/maze.c @@ -0,0 +1,890 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* maze --- a varying maze */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)maze.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1988 by Sun Microsystems + * + * 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: + * 27-Oct-97: xpm and ras capability added. + * 10-May-97: Compatible with xscreensaver + * 27-Feb-96: Add ModeInfo args to init and callback hooks, use new + * ModeInfo handle to specify long pauses (eliminate onepause). + * Ron Hitchens + * 20-Jul-95: minimum size fix Peter Schmitzberger + * 17-Jun-95: removed sleep statements + * 22-Mar-95: multidisplay fix Caleb Epstein + * 9-Mar-95: changed how batchcount is used + * 27-Feb-95: patch for VMS + * 4-Feb-95: patch to slow down maze Heath Kehoe + * 17-Jun-94: HP ANSI C compiler needs a type cast for gray_bits + * Richard Lloyd + * 2-Sep-93: xlock version David Bagley + * 7-Mar-93: Good ideas from xscreensaver Jamie Zawinski + * 6-Jun-85: Martin Weiss Sun Microsystems + */ + +/*- + * original copyright + * ************************************************************************** + * 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. + * *************************************************************************** + */ + +#ifdef STANDALONE +#define PROGCLASS "Maze" +#define HACK_INIT init_maze +#define HACK_DRAW draw_maze +#define maze_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*cycles: 3000 \n" \ + "*size: -40 \n" \ + "*ncolors: 64 \n" \ + "*bitmap: \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_maze + +ModeSpecOpt maze_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct maze_description = +{"maze", "init_maze", "draw_maze", "release_maze", + "refresh_maze", "init_maze", NULL, &maze_opts, + 1000, 1, 3000, -40, 64, 1.0, "", + "Shows a random maze and a depth first search solution", 0, NULL}; + +#endif + +#include "bitmaps/gray1.xbm" + +/* aliases for vars defined in the bitmap file */ +#define ICON_WIDTH image_width +#define ICON_HEIGHT image_height +#define ICON_BITS image_bits + +#include "maze.xbm" + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#define ICON_NAME image_name +#include "maze.xpm" +#define DEFAULT_XPM 1 +#endif + +#define MINGRIDSIZE 3 +#define MINSIZE 8 + +#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 + +typedef struct { + unsigned char x; + unsigned char y; + char dir; +} paths; + +typedef struct { + int ncols, nrows, maze_size, xb, yb; + int sqnum, cur_sq_x, cur_sq_y, path_length; + int start_x, start_y, start_dir, end_x, end_y, end_dir; + int logo_x, logo_y; + int width, height; + int xs, ys, logo_size_x, logo_size_y; + int solving, current_path, stage; + int cycles; + unsigned short *maze; + paths *move_list; + paths *save_path, *path; + GC grayGC; + Pixmap graypix; + XImage *logo; + Colormap cmap; + unsigned long black, color; + int graphics_format; + GC backGC; + int time; +} mazestruct; + +static mazestruct *mazes = NULL; + +static void +draw_wall(ModeInfo * mi, int i, int j, int dir) +{ /* draw a single wall */ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + GC gc = mp->backGC; + + switch (dir) { + case 0: + XDrawLine(display, window, gc, + mp->xb + mp->xs * i, + mp->yb + mp->ys * j, + mp->xb + mp->xs * (i + 1), + mp->yb + mp->ys * j); + break; + case 1: + XDrawLine(display, window, gc, + mp->xb + mp->xs * (i + 1), + mp->yb + mp->ys * j, + mp->xb + mp->xs * (i + 1), + mp->yb + mp->ys * (j + 1)); + break; + case 2: + XDrawLine(display, window, gc, + mp->xb + mp->xs * i, + mp->yb + mp->ys * (j + 1), + mp->xb + mp->xs * (i + 1), + mp->yb + mp->ys * (j + 1)); + break; + case 3: + XDrawLine(display, window, gc, + mp->xb + mp->xs * i, + mp->yb + mp->ys * j, + mp->xb + mp->xs * i, + mp->yb + mp->ys * (j + 1)); + break; + } +} /* end of draw_wall */ + +static void +draw_solid_square(ModeInfo * mi, GC gc, + register int i, register int j, register int dir) +{ /* draw a solid square in a square */ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + + switch (dir) { + case 0: + XFillRectangle(display, window, gc, + mp->xb + 3 + mp->xs * i, + mp->yb - 3 + mp->ys * j, + mp->xs - 6, mp->ys); + break; + case 1: + XFillRectangle(display, window, gc, + mp->xb + 3 + mp->xs * i, + mp->yb + 3 + mp->ys * j, + mp->xs, mp->ys - 6); + break; + case 2: + XFillRectangle(display, window, gc, + mp->xb + 3 + mp->xs * i, + mp->yb + 3 + mp->ys * j, + mp->xs - 6, mp->ys); + break; + case 3: + XFillRectangle(display, window, gc, + mp->xb - 3 + mp->xs * i, + mp->yb + 3 + mp->ys * j, + mp->xs, mp->ys - 6); + break; + } + +} /* end of draw_solid_square() */ + +static void +enter_square(ModeInfo * mi, int n) +{ /* move into a neighboring square */ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + + draw_solid_square(mi, mp->backGC, (int) mp->path[n].x, (int) mp->path[n].y, + (int) mp->path[n].dir); + + mp->path[n + 1].dir = -1; + switch (mp->path[n].dir) { + case 0: + mp->path[n + 1].x = mp->path[n].x; + mp->path[n + 1].y = mp->path[n].y - 1; + break; + case 1: + mp->path[n + 1].x = mp->path[n].x + 1; + mp->path[n + 1].y = mp->path[n].y; + break; + case 2: + mp->path[n + 1].x = mp->path[n].x; + mp->path[n + 1].y = mp->path[n].y + 1; + break; + case 3: + mp->path[n + 1].x = mp->path[n].x - 1; + mp->path[n + 1].y = mp->path[n].y; + break; + } + +} /* end of enter_square() */ + +static void +free_maze(mazestruct * mp) +{ + if (mp->maze) { + (void) free((void *) mp->maze); + mp->maze = NULL; + } + if (mp->move_list) { + (void) free((void *) mp->move_list); + mp->move_list = NULL; + } + if (mp->save_path) { + (void) free((void *) mp->save_path); + mp->save_path = NULL; + } + if (mp->path) { + (void) free((void *) mp->path); + mp->path = NULL; + } +} + +static void +set_maze_sizes(ModeInfo * mi) +{ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + int size = MI_SIZE(mi); + + if (size < -MINSIZE) { + free_maze(mp); + mp->ys = NRAND(MIN(-size, MAX(MINSIZE, (MIN(mp->width, mp->height) - 1) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + } else if (size < MINSIZE) { + if (!size) + mp->ys = MAX(MINSIZE, (MIN(mp->width, mp->height) - 1) / MINGRIDSIZE); + else + mp->ys = MINSIZE; + } else + mp->ys = MIN(size, MAX(MINSIZE, (MIN(mp->width, mp->height) - 1) / + MINGRIDSIZE)); + mp->xs = mp->ys; + mp->logo_size_x = mp->logo->width / mp->xs + 1; + mp->logo_size_y = mp->logo->height / mp->ys + 1; + + mp->ncols = MAX((mp->width - 1) / mp->xs, MINGRIDSIZE); + mp->nrows = MAX((mp->height - 1) / mp->ys, MINGRIDSIZE); + + mp->xb = (mp->width - mp->ncols * mp->xs) / 2; + mp->yb = (mp->height - mp->nrows * mp->ys) / 2; + mp->maze_size = mp->ncols * mp->nrows; + if (!mp->maze) + mp->maze = (unsigned short *) + calloc(mp->maze_size, sizeof (unsigned short)); + + if (!mp->move_list) + mp->move_list = (paths *) calloc(mp->maze_size, sizeof (paths)); + if (!mp->save_path) + mp->save_path = (paths *) calloc(mp->maze_size, sizeof (paths)); + if (!mp->path) + mp->path = (paths *) calloc(mp->maze_size, sizeof (paths)); +} /* end of set_maze_sizes */ + + +static void +initialize_maze(ModeInfo * mi) +{ /* draw the surrounding wall and start/end squares */ + Display *display = MI_DISPLAY(mi); + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + register int i, j, wall; + + if (MI_NPIXELS(mi) <= 2) { + mp->color = MI_WHITE_PIXEL(mi); + } else { + i = NRAND(MI_NPIXELS(mi)); + mp->color = MI_PIXEL(mi, i); + } + XSetForeground(display, mp->backGC, mp->color); + XSetForeground(display, mp->grayGC, mp->color); + /* initialize all squares */ + for (i = 0; i < mp->ncols; i++) { + for (j = 0; j < mp->nrows; j++) { + mp->maze[i * mp->nrows + j] = 0; + } + } + + /* top wall */ + for (i = 0; i < mp->ncols; i++) { + mp->maze[i * mp->nrows] |= WALL_TOP; + } + + /* right wall */ + for (j = 0; j < mp->nrows; j++) { + mp->maze[(mp->ncols - 1) * mp->nrows + j] |= WALL_RIGHT; + } + + /* bottom wall */ + for (i = 0; i < mp->ncols; i++) { + mp->maze[i * mp->nrows + mp->nrows - 1] |= WALL_BOTTOM; + } + + /* left wall */ + for (j = 0; j < mp->nrows; j++) { + mp->maze[j] |= WALL_LEFT; + } + + /* set start square */ + wall = NRAND(4); + switch (wall) { + case 0: + i = NRAND(mp->ncols); + j = 0; + break; + case 1: + i = mp->ncols - 1; + j = NRAND(mp->nrows); + break; + case 2: + i = NRAND(mp->ncols); + j = mp->nrows - 1; + break; + case 3: + i = 0; + j = NRAND(mp->nrows); + break; + } + mp->maze[i * mp->nrows + j] |= START_SQUARE; + mp->maze[i * mp->nrows + j] |= (DOOR_IN_TOP >> wall); + mp->maze[i * mp->nrows + j] &= ~(WALL_TOP >> wall); + mp->cur_sq_x = i; + mp->cur_sq_y = j; + mp->start_x = i; + mp->start_y = j; + mp->start_dir = wall; + mp->sqnum = 0; + + /* set end square */ + wall = (wall + 2) % 4; + switch (wall) { + case 0: + i = NRAND(mp->ncols); + j = 0; + break; + case 1: + i = mp->ncols - 1; + j = NRAND(mp->nrows); + break; + case 2: + i = NRAND(mp->ncols); + j = mp->nrows - 1; + break; + case 3: + i = 0; + j = NRAND(mp->nrows); + break; + } + mp->maze[i * mp->nrows + j] |= END_SQUARE; + mp->maze[i * mp->nrows + j] |= (DOOR_OUT_TOP >> wall); + mp->maze[i * mp->nrows + j] &= ~(WALL_TOP >> wall); + mp->end_x = i; + mp->end_y = j; + mp->end_dir = wall; + + /* set logo */ + if ((mp->ncols > mp->logo_size_x + 6) && + (mp->nrows > mp->logo_size_y + 6)) { + mp->logo_x = NRAND(mp->ncols - mp->logo_size_x - 6) + 3; + mp->logo_y = NRAND(mp->nrows - mp->logo_size_y - 6) + 3; + + for (i = 0; i < mp->logo_size_x; i++) + for (j = 0; j < mp->logo_size_y; j++) + mp->maze[(mp->logo_x + i) * mp->nrows + mp->logo_y + j] |= + DOOR_IN_TOP; + } else + mp->logo_y = mp->logo_x = -1; +} + +static int +choose_door(ModeInfo * mi) +{ /* pick a new path */ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + int candidates[3]; + register int num_candidates; + + num_candidates = 0; + + /* top wall */ + if ((!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_IN_TOP)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_OUT_TOP)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + WALL_TOP))) { + if (mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y - 1] & + DOOR_IN_ANY) { + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] |= WALL_TOP; + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y - 1] |= + WALL_BOTTOM; + } else + candidates[num_candidates++] = 0; + } + /* right wall */ + if ((!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_IN_RIGHT)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_OUT_RIGHT)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + WALL_RIGHT))) { + if (mp->maze[(mp->cur_sq_x + 1) * mp->nrows + mp->cur_sq_y] & + DOOR_IN_ANY) { + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] |= WALL_RIGHT; + mp->maze[(mp->cur_sq_x + 1) * mp->nrows + mp->cur_sq_y] |= + WALL_LEFT; + } else + candidates[num_candidates++] = 1; + } + /* bottom wall */ + if ((!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_IN_BOTTOM)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_OUT_BOTTOM)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + WALL_BOTTOM))) { + if (mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y + 1] & + DOOR_IN_ANY) { + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] |= WALL_BOTTOM; + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y + 1] |= WALL_TOP; + } else + candidates[num_candidates++] = 2; + } + /* left wall */ + if ((!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_IN_LEFT)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + DOOR_OUT_LEFT)) && + (!(mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & + WALL_LEFT))) { + if (mp->maze[(mp->cur_sq_x - 1) * mp->nrows + mp->cur_sq_y] & + DOOR_IN_ANY) { + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] |= WALL_LEFT; + mp->maze[(mp->cur_sq_x - 1) * mp->nrows + mp->cur_sq_y] |= + WALL_RIGHT; + } else + candidates[num_candidates++] = 3; + } + /* done wall */ + if (num_candidates == 0) + return (-1); + if (num_candidates == 1) + return (candidates[0]); + return (candidates[NRAND(num_candidates)]); + +} /* end of choose_door() */ + +static void +draw_maze_walls(ModeInfo * mi) +{ /* pick a new path */ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + int i, j, isize; + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < mp->ncols; i++) { + isize = i * mp->nrows; + for (j = 0; j < mp->nrows; j++) { + /* Only need to draw half the walls... since they are shared */ + /* top wall */ + if ( /*(!(mp->maze[isize + j] & DOOR_IN_TOP)) && + (!(mp->maze[isize + j] & DOOR_OUT_TOP)) && */ + (mp->maze[isize + j] & WALL_TOP)) + draw_wall(mi, i, j, 0); + /* left wall */ + if ( /*(!(mp->maze[isize + j] & DOOR_IN_RIGHT)) && + (!(mp->maze[isize + j] & DOOR_OUT_RIGHT)) && */ + (mp->maze[isize + j] & WALL_RIGHT)) + draw_wall(mi, i, j, 1); + } + } +} /* end of draw_maze_walls() */ + +static int +backup(mazestruct * mp) +{ /* back up a move */ + mp->sqnum--; + if (mp->sqnum >= 0) { + mp->cur_sq_x = mp->move_list[mp->sqnum].x; + mp->cur_sq_y = mp->move_list[mp->sqnum].y; + } + return (mp->sqnum); +} /* end of backup() */ + +static void +create_maze_walls(ModeInfo * mi) +{ /* create a maze layout given the intiialized maze */ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + register int i, newdoor; + + for (;;) { + mp->move_list[mp->sqnum].x = mp->cur_sq_x; + mp->move_list[mp->sqnum].y = mp->cur_sq_y; + mp->move_list[mp->sqnum].dir = -1; + while ((newdoor = choose_door(mi)) == -1) /* pick a door */ + if (backup(mp) == -1) /* no more doors ... backup */ + return; /* done ... return */ + + /* mark the out door */ + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] |= + (DOOR_OUT_TOP >> newdoor); + + switch (newdoor) { + case 0: + mp->cur_sq_y--; + break; + case 1: + mp->cur_sq_x++; + break; + case 2: + mp->cur_sq_y++; + break; + case 3: + mp->cur_sq_x--; + break; + } + mp->sqnum++; + + /* mark the in door */ + mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] |= + (DOOR_IN_TOP >> ((newdoor + 2) % 4)); + + /* if end square set path length and save path */ + if (mp->maze[mp->cur_sq_x * mp->nrows + mp->cur_sq_y] & END_SQUARE) { + mp->path_length = mp->sqnum; + for (i = 0; i < mp->path_length; i++) { + mp->save_path[i].x = mp->move_list[i].x; + mp->save_path[i].y = mp->move_list[i].y; + mp->save_path[i].dir = mp->move_list[i].dir; + } + } + } + +} /* end of create_maze_walls() */ + +static void +draw_maze_border(ModeInfo * mi) +{ /* draw the maze outline */ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + GC gc = mp->backGC; + register int i, j; + + if (mp->logo_x != -1) { + (void) XPutImage(display, window, gc, mp->logo, + 0, 0, + mp->xb + mp->xs * mp->logo_x + + (mp->xs * mp->logo_size_x - mp->logo->width + 1) / 2, + mp->yb + mp->ys * mp->logo_y + + (mp->ys * mp->logo_size_y - mp->logo->height + 1) / 2, + mp->logo->width, mp->logo->height); + } + for (i = 0; i < mp->ncols; i++) { + if (mp->maze[i * mp->nrows] & WALL_TOP) { + XDrawLine(display, window, gc, + mp->xb + mp->xs * i, mp->yb, + mp->xb + mp->xs * (i + 1), mp->yb); + } + if ((mp->maze[i * mp->nrows + mp->nrows - 1] & WALL_BOTTOM)) { + XDrawLine(display, window, gc, + mp->xb + mp->xs * i, + mp->yb + mp->ys * (mp->nrows), + mp->xb + mp->xs * (i + 1), + mp->yb + mp->ys * (mp->nrows)); + } + } + for (j = 0; j < mp->nrows; j++) { + if (mp->maze[(mp->ncols - 1) * mp->nrows + j] & WALL_RIGHT) { + XDrawLine(display, window, gc, + mp->xb + mp->xs * mp->ncols, + mp->yb + mp->ys * j, + mp->xb + mp->xs * mp->ncols, + mp->yb + mp->ys * (j + 1)); + } + if (mp->maze[j] & WALL_LEFT) { + XDrawLine(display, window, gc, + mp->xb, mp->yb + mp->ys * j, + mp->xb, mp->yb + mp->ys * (j + 1)); + } + } + + draw_solid_square(mi, gc, mp->start_x, mp->start_y, mp->start_dir); + draw_solid_square(mi, gc, mp->end_x, mp->end_y, mp->end_dir); +} /* end of draw_maze() */ + +static void +solve_maze(ModeInfo * mi) +{ /* solve it with graphical feedback */ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + + if (!mp->solving) { + /* plug up the surrounding wall */ + mp->maze[mp->start_x * mp->nrows + mp->start_y] |= + (WALL_TOP >> mp->start_dir); + mp->maze[mp->end_x * mp->nrows + mp->end_y] |= + (WALL_TOP >> mp->end_dir); + + /* initialize search path */ + mp->current_path = 0; + mp->path[mp->current_path].x = mp->end_x; + mp->path[mp->current_path].y = mp->end_y; + mp->path[mp->current_path].dir = -1; + + mp->solving = 1; + } + if (++mp->path[mp->current_path].dir >= 4) { + /* This draw is to fill in the dead ends, + it ends up drawing more gray boxes then it needs to. */ + draw_solid_square(mi, mp->grayGC, + (int) (mp->path[mp->current_path].x), + (int) (mp->path[mp->current_path].y), + (int) (mp->path[mp->current_path - 1].dir + 2) % 4); + + mp->current_path--; + draw_solid_square(mi, mp->grayGC, + (int) (mp->path[mp->current_path].x), + (int) (mp->path[mp->current_path].y), + (int) (mp->path[mp->current_path].dir)); + } else if (!(mp->maze[mp->path[mp->current_path].x * mp->nrows + + mp->path[mp->current_path].y] & + (WALL_TOP >> mp->path[mp->current_path].dir)) && + ((mp->current_path == 0) || + ((mp->path[mp->current_path].dir != + (unsigned char) (mp->path[mp->current_path - 1].dir + + 2) % 4)))) { + enter_square(mi, mp->current_path); + mp->current_path++; + if (mp->maze[mp->path[mp->current_path].x * mp->nrows + + mp->path[mp->current_path].y] & START_SQUARE) { + mp->solving = 0; + return; + } + } +} /* end of solve_maze() */ + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + + if (!mp->logo) + getImage(mi, &mp->logo, ICON_WIDTH, ICON_HEIGHT, ICON_BITS, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + DEFAULT_XPM, ICON_NAME, +#endif + &mp->graphics_format, &mp->cmap, &mp->black); +#ifndef STANDALONE + if (mp->cmap != None) { + setColormap(display, window, mp->cmap, MI_IS_INWINDOW(mi)); + if (mp->backGC == None) { + XGCValues xgcv; + + xgcv.background = mp->black; + mp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* STANDALONE */ + { + mp->black = MI_BLACK_PIXEL(mi); + mp->backGC = MI_GC(mi); + } +} + +static void +free_stuff(Display * display, mazestruct * mp) +{ + if (mp->cmap != None) { + XFreeColormap(display, mp->cmap); + if (mp->backGC != None) { + XFreeGC(display, mp->backGC); + mp->backGC = None; + } + mp->cmap = None; + } else + mp->backGC = None; + destroyImage(&mp->logo, &mp->graphics_format); +} + +void +init_maze(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + mazestruct *mp; + + if (mazes == NULL) { + if ((mazes = (mazestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (mazestruct))) == NULL) + return; + } + mp = &mazes[MI_SCREEN(mi)]; + + init_stuff(mi); + + mp->width = MI_WIDTH(mi); + mp->height = MI_HEIGHT(mi); + mp->width = (mp->width >= 32) ? mp->width : 32; + mp->height = (mp->height >= 32) ? mp->height : 32; + + if (!mp->graypix) { + mp->graypix = XCreateBitmapFromData(display, MI_WINDOW(mi), + (char *) gray1_bits, gray1_width, gray1_height); + } + if (!mp->grayGC) { + mp->grayGC = XCreateGC(display, MI_WINDOW(mi), 0L, (XGCValues *) 0); + XSetBackground(display, mp->grayGC, mp->black); + XSetFillStyle(display, mp->grayGC, FillOpaqueStippled); + XSetStipple(display, mp->grayGC, mp->graypix); + } + mp->solving = 0; + mp->stage = 0; + mp->time = 0; + mp->cycles = MI_CYCLES(mi); + if (mp->cycles < 4) + mp->cycles = 4; +} + +void +draw_maze(ModeInfo * mi) +{ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + + if (mp->solving) { + solve_maze(mi); + return; + } + switch (mp->stage) { + case 0: + MI_CLEARWINDOWCOLORMAP(mi, mp->backGC, mp->black); + + set_maze_sizes(mi); + initialize_maze(mi); + create_maze_walls(mi); + mp->stage++; + break; + case 1: + draw_maze_border(mi); + mp->stage++; + break; + case 2: + draw_maze_walls(mi); + mp->stage++; + break; + case 3: + if (++mp->time > mp->cycles / 4) + mp->stage++; + break; + case 4: + solve_maze(mi); + mp->stage++; + break; + case 5: + if (++mp->time > 3 * mp->cycles / 4) + init_maze(mi); + break; + } +} /* end of draw_maze() */ + +void +release_maze(ModeInfo * mi) +{ + if (mazes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + mazestruct *mp = &mazes[screen]; + Display *display = MI_DISPLAY(mi); + + free_maze(mp); + if (mp->grayGC != NULL) + XFreeGC(display, mp->grayGC); + if (mp->graypix != None) + XFreePixmap(display, mp->graypix); + free_stuff(display, mp); + } + (void) free((void *) mazes); + mazes = NULL; + } +} + +void +refresh_maze(ModeInfo * mi) +{ + mazestruct *mp = &mazes[MI_SCREEN(mi)]; + + MI_CLEARWINDOWCOLORMAP(mi, mp->backGC, mp->black); + XSetForeground(MI_DISPLAY(mi), mp->backGC, mp->color); + if (mp->stage >= 1) { + mp->stage = 3; + mp->sqnum = 0; + mp->cur_sq_x = mp->start_x; + mp->cur_sq_y = mp->start_y; + mp->maze[mp->start_x * mp->nrows + mp->start_y] |= START_SQUARE; + mp->maze[mp->start_x * mp->nrows + mp->start_y] |= + (DOOR_IN_TOP >> mp->start_dir); + mp->maze[mp->start_x * mp->nrows + mp->start_y] &= + ~(WALL_TOP >> mp->start_dir); + mp->maze[mp->end_x * mp->nrows + mp->end_y] |= END_SQUARE; + mp->maze[mp->end_x * mp->nrows + mp->end_y] |= + (DOOR_OUT_TOP >> mp->end_dir); + mp->maze[mp->end_x * mp->nrows + mp->end_y] &= + ~(WALL_TOP >> mp->end_dir); + draw_maze_border(mi); + draw_maze_walls(mi); + } + mp->solving = 0; +} + +#endif /* MODE_maze */ diff --git a/modes/mountain.c b/modes/mountain.c new file mode 100644 index 00000000..42a66b23 --- /dev/null +++ b/modes/mountain.c @@ -0,0 +1,280 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* mountain -- square grid mountains */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)mountain.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 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. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + */ + +#ifdef STANDALONE +#define PROGCLASS "Mountain" +#define HACK_INIT init_mountain +#define HACK_DRAW draw_mountain +#define mountain_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*count: 30 \n" \ + "*cycles: 4000 \n" \ + "*ncolors: 64 \n" \ + "*wireframe: False \n" \ + "*fullrandom: False \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_mountain + +ModeSpecOpt mountain_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct mountain_description = +{"mountain", "init_mountain", "draw_mountain", "release_mountain", + "refresh_mountain", "init_mountain", NULL, &mountain_opts, + 1000, 30, 4000, 1, 64, 1.0, "", + "Shows Papo's mountain range", 0, NULL}; + +#endif + +/* ~ 5000 Max mountain height (1000 - 10000) */ +#define MAXHEIGHT (3 * (mp->width + mp->height)) + +#define WORLDWIDTH 50 /* World size x * y */ + +#define RANGE_RAND(min,max) ((min) + NRAND((max) - (min))) + +typedef struct { + int pixelmode; + int width; + int height; + int x, y; + int offset; + int stage; + int h[WORLDWIDTH][WORLDWIDTH]; + long time; /* up time */ + int first; + Bool wireframe; + Bool joke; + GC stippled_GC; +} mountainstruct; + +static mountainstruct *mountains = NULL; + +static void +spread(int (*m)[50], int x, int y) +{ + int x2, y2; + int h = m[x][y]; + + for (y2 = y - 1; y2 <= y + 1; y2++) + for (x2 = x - 1; x2 <= x + 1; x2++) + if (x2 >= 0 && y2 >= 0 && x2 < WORLDWIDTH && y2 < WORLDWIDTH) + m[x2][y2] = (m[x2][y2] + h) / 2; +} + +static void +drawamountain(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + mountainstruct *mp = &mountains[MI_SCREEN(mi)]; + int x2, y2, x3, y3, y4, y5, c = 0; + XPoint p[5]; + + if (MI_NPIXELS(mi) > 2) { + c = (mp->h[mp->x][mp->y] + mp->h[mp->x + 1][mp->y] + + mp->h[mp->x][mp->y + 1] + mp->h[mp->x + 1][mp->y + 1]) / 4; + c = (c / 10 + mp->offset) % MI_NPIXELS(mi); + } + x2 = mp->x * (2 * mp->width) / (3 * WORLDWIDTH); + y2 = mp->y * (2 * mp->height) / (3 * WORLDWIDTH); + p[0].x = (x2 - y2 / 2) + (mp->width / 4); + p[0].y = (y2 - mp->h[mp->x][mp->y]) + mp->height / 4; + + x3 = (mp->x + 1) * (2 * mp->width) / (3 * WORLDWIDTH); + y3 = mp->y * (2 * mp->height) / (3 * WORLDWIDTH); + p[1].x = (x3 - y3 / 2) + (mp->width / 4); + p[1].y = (y3 - mp->h[mp->x + 1][mp->y]) + mp->height / 4; + + y4 = (mp->y + 1) * (2 * mp->height) / (3 * WORLDWIDTH); + p[2].x = (x3 - y4 / 2) + (mp->width / 4); + p[2].y = (y4 - mp->h[mp->x + 1][mp->y + 1]) + mp->height / 4; + + y5 = (mp->y + 1) * (2 * mp->height) / (3 * WORLDWIDTH); + p[3].x = (x2 - y5 / 2) + (mp->width / 4); + p[3].y = (y5 - mp->h[mp->x][mp->y + 1]) + mp->height / 4; + + p[4].x = p[0].x; + p[4].y = p[0].y; + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, c)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + if (mp->joke) { + if ((Bool) (LRAND() & 1)) + XDrawLines(display, window, gc, p, 5, CoordModeOrigin); + else { + XFillPolygon(display, window, gc, p, 4, Complex, CoordModeOrigin); + if (!mp->pixelmode) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawLines(display, window, gc, p, 5, CoordModeOrigin); + } + } + } else { + if (mp->wireframe) { + XDrawLines(display, window, gc, p, 5, CoordModeOrigin); + } else { + XFillPolygon(display, window, gc, p, 4, Complex, CoordModeOrigin); + + if (!mp->pixelmode) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawLines(display, window, gc, p, 5, CoordModeOrigin); + } + } + } + mp->x++; + if (mp->x == WORLDWIDTH - 1) { + mp->y++; + mp->x = 0; + } + if (mp->y == WORLDWIDTH - 1) + mp->stage++; +} + +void +init_mountain(ModeInfo * mi) +{ + mountainstruct *mp; + int i, j, x, y; + XGCValues gcv; + + if (mountains == NULL) { + if ((mountains = (mountainstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (mountainstruct))) == NULL) + return; + } + mp = &mountains[MI_SCREEN(mi)]; + mp->width = MI_WIDTH(mi); + mp->height = MI_HEIGHT(mi); + mp->pixelmode = (mp->width + mp->height < 200); + mp->stage = 0; + mp->time = 0; + mp->x = mp->y = 0; + if (MI_IS_FULLRANDOM(mi)) { + mp->joke = (Bool) (NRAND(10) == 0); + mp->wireframe = (Bool) (LRAND() & 1); + } else { + mp->joke = False; + mp->wireframe = MI_IS_WIREFRAME(mi); + } + + if (!mp->first) { + mp->first = 1; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + + mp->stippled_GC = XCreateGC(MI_DISPLAY(mi), MI_WINDOW(mi), + GCForeground | GCBackground, &gcv); + } + MI_CLEARWINDOW(mi); + + for (y = 0; y < (int) WORLDWIDTH; y++) + for (x = 0; x < (int) WORLDWIDTH; x++) + mp->h[x][y] = 0; + + j = MI_COUNT(mi); + if (j < 0) + j = NRAND(-j) + 1; + for (i = 0; i < j; i++) + mp->h[RANGE_RAND(1, WORLDWIDTH - 1)][RANGE_RAND(1, WORLDWIDTH - 1)] = + NRAND(MAXHEIGHT); + + for (y = 0; y < WORLDWIDTH; y++) + for (x = 0; x < WORLDWIDTH; x++) + spread(mp->h, x, y); + + for (y = 0; y < WORLDWIDTH; y++) + for (x = 0; x < WORLDWIDTH; x++) { + mp->h[x][y] = mp->h[x][y] + NRAND(10) - 5; + if (mp->h[x][y] < 10) + mp->h[x][y] = 0; + } + + if (MI_NPIXELS(mi) > 2) + mp->offset = NRAND(MI_NPIXELS(mi)); + else + mp->offset = 0; +} + +void +draw_mountain(ModeInfo * mi) +{ + mountainstruct *mp = &mountains[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + switch (mp->stage) { + case 0: + drawamountain(mi); + break; + case 1: + if (++mp->time > MI_CYCLES(mi)) + mp->stage++; + break; + case 2: + init_mountain(mi); + break; + } +} + +void +release_mountain(ModeInfo * mi) +{ + if (mountains != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + mountainstruct *mp = &mountains[screen]; + + if (mp->stippled_GC) + XFreeGC(MI_DISPLAY(mi), mp->stippled_GC); + } + (void) free((void *) mountains); + mountains = NULL; + } +} + +void +refresh_mountain(ModeInfo * mi) +{ + mountainstruct *mp = &mountains[MI_SCREEN(mi)]; + + MI_CLEARWINDOW(mi); + mp->x = 0; + mp->y = 0; +} + +#endif /* MODE_mountain */ diff --git a/modes/munch.c b/modes/munch.c new file mode 100644 index 00000000..ecedda12 --- /dev/null +++ b/modes/munch.c @@ -0,0 +1,264 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* munch --- munching squares */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)munch.c 4.07 97/11/24 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. + * + * 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 + */ + +#ifdef STANDALONE +#define PROGCLASS "Munch" +#define HACK_INIT init_munch +#define HACK_DRAW draw_munch +#define munch_opts xlockmore_opts +#define DEFAULTS "*delay: 5000 \n" \ + "*cycles: 7 \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef MODE_munch + +ModeSpecOpt munch_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct munch_description = +{"munch", "init_munch", "draw_munch", "release_munch", + "init_munch", "init_munch", NULL, &munch_opts, + 5000, 1, 7, 1, 64, 1.0, "", + "Shows munching squares", 0, NULL}; + +#endif + +#if 0 +#include +#endif + +/* 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) + +typedef struct { + int width, height; + int logminwidth; + int logmaxwidth; + GC gc; + int thiswidth; + int t; + int atX, atY; + int kX, kT, kY; + int grav; +} munchstruct; + +static munchstruct *munches = NULL; + +static void +munchBit(ModeInfo * mi, int width, /* pixels */ + int atX, int atY, /* pixels */ + int kX, int kT, int kY, /* pixels */ + int grav /* 0 or not */ ) +{ + munchstruct *mp = &munches[MI_SCREEN(mi)]; + + int x, y; + int drawX, drawY; + +#if 0 + (void) fprintf(stderr, "Doing width %d at %d %d shift %d %d %d grav %d\n", + width, atX, atY, kX, kT, kY, grav); +#endif + + for (x = 0; x < width; x++) { + /* figure out the next point */ + y = ((x ^ ((mp->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. + */ +#if 0 + assert(drawX >= 0 && drawX < MI_WIDTH(mi)); + assert(drawY >= 0 && drawY < MI_HEIGHT(mi)); +#endif + + XDrawPoint(MI_DISPLAY(mi), MI_WINDOW(mi), mp->gc, drawX, drawY); + /* XXX may want to change this to XDrawPoints, + but it's fast enough without it for the moment. */ + + } +} + +/* + * 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; +} + +void +init_munch(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + munchstruct *mp; + + if (munches == NULL) { + if ((munches = (munchstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (munchstruct))) == NULL) + return; + } + mp = &munches[MI_SCREEN(mi)]; + + if (!mp->gc) { + if ((mp->gc = XCreateGC(display, MI_WINDOW(mi), + (unsigned long) 0, (XGCValues *) NULL)) == None) + return; + } + mp->width = MI_WIDTH(mi); + mp->height = MI_HEIGHT(mi); + + /* We need a square; limit on screen size? */ + /* we want a power of 2 for the width or the munch doesn't fill up. */ + mp->logmaxwidth = (int) + dumb_log_2((mp->height < mp->width) ? mp->height : mp->width); + + XSetFunction(display, mp->gc, GXxor); + + mp->logminwidth = MI_CYCLES(mi); + if (mp->logminwidth < 2 || MI_IS_ICONIC(mi)) + mp->logminwidth = 2; + + if (mp->logmaxwidth < mp->logminwidth) + mp->logmaxwidth = mp->logminwidth; + + mp->t = 0; + + MI_CLEARWINDOW(mi); +} + +void +draw_munch(ModeInfo * mi) +{ + munchstruct *mp = &munches[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (!mp->t) { /* New one */ + int randflags = (int) LRAND(); + + /* choose size -- power of two */ + mp->thiswidth = (int) (1 << (mp->logminwidth + + (LRAND() % (1 + mp->logmaxwidth - mp->logminwidth)))); + + if (MI_NPIXELS(mi) > 2) + XSetForeground(MI_DISPLAY(mi), mp->gc, + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi)))); + else /* Xor'red so WHITE may not be appropriate */ + XSetForeground(MI_DISPLAY(mi), mp->gc, 1); + + mp->atX = (int) (LRAND() % + ((mp->width <= mp->thiswidth) ? 1 : mp->width - mp->thiswidth)); + mp->atY = (int) (LRAND() % + ((mp->height <= mp->thiswidth) ? 1 : mp->height - mp->thiswidth)); + + /* wrap-around by these values; no need to % + as we end up doing that later anyway */ + mp->kX = (int) ((randflags & SHIFT_KX) ? LRAND() % mp->thiswidth : 0); + mp->kT = (int) ((randflags & SHIFT_KT) ? LRAND() % mp->thiswidth : 0); + mp->kY = (int) ((randflags & SHIFT_KY) ? LRAND() % mp->thiswidth : 0); + + /* set the gravity of the munch, or rather, + which direction we draw stuff in. */ + mp->grav = randflags & GRAV; + } + /* Finally draw this munching square. */ + munchBit(mi, + mp->thiswidth, /* Width, in pixels */ + /* draw at this location */ + mp->atX, mp->atY, mp->kX, mp->kT, mp->kY, mp->grav); + + mp->t++; + if (mp->t == mp->thiswidth) + mp->t = 0; +} + +void +release_munch(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + + MI_CLEARWINDOW(mi); + + if (munches != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + munchstruct *mp = &munches[screen]; + + if (mp->gc != NULL) + XFreeGC(display, mp->gc); + } + + (void) free((void *) munches); + munches = NULL; + } +} + +#endif /* MODE_munch */ diff --git a/modes/nose.c b/modes/nose.c new file mode 100644 index 00000000..cd4241a9 --- /dev/null +++ b/modes/nose.c @@ -0,0 +1,782 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/*- + * nose --- a little guy with a big nose and a hat wanders around + * spewing out messages + */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)nose.c 4.07 97/11/24 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: + * 06-Jun-97: Compatible with xscreensaver and now colorized (idea from + * xscreensaver but colors are random). + * 27-Feb-96: Added new ModeInfo arg to init and callback hooks. Removed + * references to onepause, now uses MI_PAUSE(mi) interface. + * Ron Hitchens + * 10-Oct-95: A better way of handling fortunes from a file, thanks to + * Jouk Jansen . + * 21-Sep-95: font option added, debugged for multiscreens + * 12-Aug-95: xlock version + * 1992: xscreensaver version, noseguy (Jamie Zawinski ) + * 1990: X11 version, xnlock (Dan Heller ) + */ + +/*- + * xscreensaver, Copyright (c) 1992 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 STANDALONE +#define PROGCLASS "Nose" +#define HACK_INIT init_nose +#define HACK_DRAW draw_nose +#define nose_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*ncolors: 64 \n" \ + "*font: \n" \ + "*text: \n" \ + "*filename: \n" \ + "*fortunefile: \n" \ + "*program: \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_nose + +ModeSpecOpt nose_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct nose_description = +{"nose", "init_nose", "draw_nose", "release_nose", + "refresh_nose", "init_nose", NULL, &nose_opts, + 100000, 1, 1, 1, 64, 1.0, "", + "Shows a man with a big nose runs around spewing out messages", 0, NULL}; + +#endif + +#include "bitmaps/nose-hat.xbm" +#include "bitmaps/nose-hatd.xbm" +#include "bitmaps/nose-facef.xbm" +#include "bitmaps/nose-faced.xbm" +#include "bitmaps/nose-facel.xbm" +#include "bitmaps/nose-facer.xbm" +#include "bitmaps/nose-shoef.xbm" +#include "bitmaps/nose-shoel.xbm" +#include "bitmaps/nose-shoer.xbm" +#include "bitmaps/nose-stepl.xbm" +#include "bitmaps/nose-stepr.xbm" + +#define font_height(f) ((f == None) ? 8 : f->ascent + f->descent) + +#define L 0 +#define R 1 +#define LSTEP 2 +#define RSTEP 3 +#define LF 4 +#define RF 5 +#define F 6 +#define D 7 +#define PIXMAPS 8 +#define PIXMAP_SIZE 64 +#define MOVE 0 +#define TALK 1 +#define FREEZE 2 + +extern XFontStruct *getFont(Display * display); +extern char *getWords(int screen, int screens); +extern int isRibbon(void); + +typedef struct { + int x, y, width, height; +} window_rect; + +typedef struct { + int xs, ys; + int width, height; + GC text_fg_gc, text_bg_gc, noseGC[PIXMAPS]; + char *words; + int x, y; + int tinymode; /* walking or getting passwd */ + int length, dir, lastdir; + int up; + int busyLoop; + int frames; + int state; + Bool talking; + window_rect s; + Pixmap position[PIXMAPS]; +} nosestruct; + +static nosestruct *noses = NULL; + +static XFontStruct *mode_font = None; + +#define LEFT 001 +#define RIGHT 002 +#define DOWN 004 +#define UP 010 +#define FRONT 020 +#define X_INCR 3 +#define Y_INCR 2 +#define YELLOW (MI_NPIXELS(mi) / 6) + +#define COPY(d,g,c,p,np,x,y,w,h) XSetForeground(d,g,c);\ +XSetStipple(d,g,p); XSetTSOrigin(d,g,x,y);\ +XFillRectangle(d,np,g,x,y,w,h) + +static void +pickClothes(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + nosestruct *np = &noses[MI_SCREEN(mi)]; + XGCValues gcv; + Pixmap face_pix, hat_pix, shoe_pix, shoel_pix, shoer_pix; + unsigned long hat_color = (MI_NPIXELS(mi) <= 2) ? + MI_WHITE_PIXEL(mi) : MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + unsigned long face_color = (MI_NPIXELS(mi) <= 2) ? + MI_WHITE_PIXEL(mi) : MI_PIXEL(mi, (YELLOW)); /* Racism? */ + unsigned long shoe_color = (MI_NPIXELS(mi) <= 2) ? + MI_WHITE_PIXEL(mi) : MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + int i; + + gcv.graphics_exposures = False; + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + for (i = 0; i < PIXMAPS; i++) { + np->position[i] = XCreatePixmap(display, window, PIXMAP_SIZE, PIXMAP_SIZE, + MI_DEPTH(mi)); + np->noseGC[i] = XCreateGC(display, np->position[i], + GCForeground | GCBackground | GCGraphicsExposures, &gcv); + XFillRectangle(display, np->position[i], np->noseGC[i], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE); + } + XSetBackground(display, gc, MI_BLACK_PIXEL(mi)); + XSetFillStyle(display, gc, FillStippled); + /* DOWN NOSE GUY */ + hat_pix = XCreateBitmapFromData(display, window, + (char *) nose_hat_down_bits, + nose_hat_down_width, nose_hat_down_height); + face_pix = XCreateBitmapFromData(display, window, + (char *) nose_face_down_bits, + nose_face_down_width, nose_face_down_height); + shoe_pix = XCreateBitmapFromData(display, window, + (char *) nose_shoe_front_bits, + nose_shoe_front_width, nose_shoe_front_height); + COPY(display, gc, shoe_color, shoe_pix, np->position[D], + (PIXMAP_SIZE - nose_shoe_front_width) / 2, + nose_hat_height + nose_face_front_height + 3, + nose_shoe_front_width, nose_shoe_front_height); + COPY(display, gc, face_color, face_pix, np->position[D], + (PIXMAP_SIZE - nose_face_down_width) / 2, nose_hat_down_height + 7, + nose_face_down_width, nose_face_down_height); + COPY(display, gc, hat_color, hat_pix, np->position[D], + (PIXMAP_SIZE - nose_hat_down_width) / 2, 7, + nose_hat_down_width, nose_hat_down_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[D], gc, + 0, nose_hat_down_height + 6, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + XFreePixmap(display, face_pix); + XFreePixmap(display, hat_pix); + /* FRONT NOSE GUY */ + hat_pix = XCreateBitmapFromData(display, window, + (char *) nose_hat_bits, + nose_hat_width, nose_hat_height); + face_pix = XCreateBitmapFromData(display, window, + (char *) nose_face_front_bits, + nose_face_front_width, nose_face_front_height); + COPY(display, gc, shoe_color, shoe_pix, np->position[F], + (PIXMAP_SIZE - nose_shoe_front_width) / 2, + nose_hat_height + nose_face_front_height + 3, + nose_shoe_front_width, nose_shoe_front_height); + COPY(display, gc, hat_color, hat_pix, np->position[F], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[F], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[F], + (PIXMAP_SIZE - nose_face_front_width) / 2, nose_hat_height + 1, + nose_face_front_width, nose_face_front_height); + XFreePixmap(display, shoe_pix); + /* FRONT LEFT NOSE GUY */ + shoel_pix = XCreateBitmapFromData(display, window, + (char *) nose_shoe_left_bits, + nose_shoe_left_width, nose_shoe_left_height); + COPY(display, gc, shoe_color, shoel_pix, np->position[LF], + (PIXMAP_SIZE - nose_shoe_left_width) / 2 - 4, + nose_hat_height + nose_face_front_height + 3, + nose_shoe_left_width, nose_shoe_left_height); + COPY(display, gc, hat_color, hat_pix, np->position[LF], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[LF], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[LF], + (PIXMAP_SIZE - nose_face_front_width) / 2, nose_hat_height + 1, + nose_face_front_width, nose_face_front_height); + /* FRONT RIGHT NOSE GUY */ + shoer_pix = XCreateBitmapFromData(display, window, + (char *) nose_shoe_right_bits, + nose_shoe_right_width, nose_shoe_right_height); + COPY(display, gc, shoe_color, shoer_pix, np->position[RF], + (PIXMAP_SIZE - nose_shoe_right_width) / 2 + 4, + nose_hat_height + nose_face_front_height + 3, + nose_shoe_right_width, nose_shoe_right_height); + COPY(display, gc, hat_color, hat_pix, np->position[RF], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[RF], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[RF], + (PIXMAP_SIZE - nose_face_front_width) / 2, nose_hat_height + 1, + nose_face_front_width, nose_face_front_height); + XFreePixmap(display, face_pix); + /* LEFT NOSE GUY */ + face_pix = XCreateBitmapFromData(display, window, + (char *) nose_face_left_bits, + nose_face_left_width, nose_face_left_height); + COPY(display, gc, shoe_color, shoel_pix, np->position[L], + (PIXMAP_SIZE - nose_shoe_left_width) / 2 - 4, + nose_hat_height + nose_face_front_height + 3, + nose_shoe_left_width, nose_shoe_left_height); + COPY(display, gc, hat_color, hat_pix, np->position[L], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[L], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[L], + (PIXMAP_SIZE - nose_face_left_width) / 2 - 4, nose_hat_height + 4, + nose_face_left_width, nose_face_left_height); + XFreePixmap(display, shoel_pix); + /* LEFT NOSE GUY STEPPING */ + shoel_pix = XCreateBitmapFromData(display, window, + (char *) nose_step_left_bits, + nose_step_left_width, nose_step_left_height); + COPY(display, gc, shoe_color, shoel_pix, np->position[LSTEP], + (PIXMAP_SIZE - nose_step_left_width) / 2, + nose_hat_height + nose_face_front_height - 1, + nose_step_left_width, nose_step_left_height); + COPY(display, gc, hat_color, hat_pix, np->position[LSTEP], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[LSTEP], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[LSTEP], + (PIXMAP_SIZE - nose_face_left_width) / 2 - 4, nose_hat_height + 4, + nose_face_left_width, nose_face_left_height); + XFreePixmap(display, face_pix); + XFreePixmap(display, shoel_pix); + /* RIGHT NOSE GUY */ + face_pix = XCreateBitmapFromData(display, window, + (char *) nose_face_right_bits, + nose_face_right_width, nose_face_right_height); + COPY(display, gc, shoe_color, shoer_pix, np->position[R], + (PIXMAP_SIZE - nose_shoe_right_width) / 2 + 4, + nose_hat_height + nose_face_front_height + 3, + nose_shoe_right_width, nose_shoe_right_height); + COPY(display, gc, hat_color, hat_pix, np->position[R], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[R], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[R], + (PIXMAP_SIZE - nose_face_right_width) / 2 + 4, nose_hat_height + 4, + nose_face_right_width, nose_face_right_height); + XFreePixmap(display, shoer_pix); + /* RIGHT NOSE GUY STEPPING */ + shoer_pix = XCreateBitmapFromData(display, window, + (char *) nose_step_right_bits, + nose_step_right_width, nose_step_right_height); + COPY(display, gc, shoe_color, shoer_pix, np->position[RSTEP], + (PIXMAP_SIZE - nose_step_right_width) / 2, + nose_hat_height + nose_face_front_height - 1, + nose_step_right_width, nose_step_right_height); + COPY(display, gc, hat_color, hat_pix, np->position[RSTEP], + (PIXMAP_SIZE - nose_hat_width) / 2, 4, + nose_hat_width, nose_hat_height); + if (MI_NPIXELS(mi) <= 2) { + XSetFillStyle(display, gc, FillSolid); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, np->position[RSTEP], gc, + 0, nose_hat_height + 3, PIXMAP_SIZE, 1); + XSetFillStyle(display, gc, FillStippled); + } + COPY(display, gc, face_color, face_pix, np->position[RSTEP], + (PIXMAP_SIZE - nose_face_right_width) / 2 + 4, nose_hat_height + 4, + nose_face_right_width, nose_face_right_height); + XFreePixmap(display, face_pix); + XFreePixmap(display, shoer_pix); + XFreePixmap(display, hat_pix); + XSetFillStyle(display, gc, FillSolid); +} + +static void +walk(ModeInfo * mi, register int dir) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + nosestruct *np = &noses[MI_SCREEN(mi)]; + register int incr = 0; + + if (dir & (LEFT | RIGHT)) { /* left/right movement (mabye up/down too) */ + np->up = -np->up; /* bouncing effect (even if hit a wall) */ + if (dir & LEFT) { + incr = X_INCR; + np->frames = (np->up < 0) ? L : LSTEP; + } else { + incr = -X_INCR; + np->frames = (np->up < 0) ? R : RSTEP; + } + /* note that maybe neither UP nor DOWN is set! */ + if (dir & UP && np->y > Y_INCR) + np->y -= Y_INCR; + else if (dir & DOWN && np->y < np->height - np->ys) + np->y += Y_INCR; + } else if (dir == UP) { /* Explicit up/down movement only (no left/right) */ + np->y -= Y_INCR; + XCopyArea(display, np->position[F], window, np->noseGC[F], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y); + } else if (dir == DOWN) { + np->y += Y_INCR; + XCopyArea(display, np->position[D], window, np->noseGC[D], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y); + } else if (dir == FRONT && np->frames != F) { + if (np->up > 0) + np->up = -np->up; + if (np->lastdir & LEFT) + np->frames = LF; + else if (np->lastdir & RIGHT) + np->frames = RF; + else + np->frames = F; + XCopyArea(display, np->position[np->frames], window, np->noseGC[np->frames], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y); + } + if (dir & LEFT) + while (--incr >= 0) { + --np->x; + XCopyArea(display, np->position[np->frames], window, np->noseGC[np->frames], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y + np->up); + XFlush(display); + } else if (dir & RIGHT) + while (++incr <= 0) { + ++np->x; + XCopyArea(display, np->position[np->frames], window, np->noseGC[np->frames], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y + np->up); + XFlush(display); + } + np->lastdir = dir; +} + +static int +think(ModeInfo * mi) +{ + nosestruct *np = &noses[MI_SCREEN(mi)]; + + if (LRAND() & 1) + walk(mi, FRONT); + if (LRAND() & 1) { + np->words = getWords(MI_SCREEN(mi), MI_NUM_SCREENS(mi)); + return 1; + } + return 0; +} + +#define MAXLINES 40 +#if 0 +#define MAXWIDTH BUFSIZ +#else +#define MAXWIDTH 170 +#endif + +/*- +Strange but true: +On an HP Pa-RISC with gcc MAXLINES * MAXWIDTH should be <= +around 6800 (40 * 170) or + +as: /usr/tmp/cca####.s line#3364 [err#13] + (warning) Use of GR3 when frame>=8192 may cause conflict + +*/ + +static void +talk(ModeInfo * mi, Bool force_erase) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + nosestruct *np = &noses[MI_SCREEN(mi)]; + int width = 0, height, Y, Z, total = 0; + register char *p, *p2; + char buf[BUFSIZ], args[MAXLINES][MAXWIDTH]; + + /* clear what we've written */ + if (np->talking || force_erase) { + if (!np->talking) + return; + XFillRectangle(display, window, np->text_bg_gc, np->s.x - 5, np->s.y - 5, + np->s.width + 10, np->s.height + 10); + np->talking = False; + if (!force_erase) + np->state = MOVE; + return; + } + np->talking = True; + walk(mi, FRONT); + p = strncpy(buf, np->words, BUFSIZ); + if (!(p2 = (char *) strchr(p, '\n')) || !p2[1]) { + (void) strncpy(args[0], np->words, MAXWIDTH - 1); + total = strlen(args[0]); + args[0][MAXWIDTH - 1] = '\0'; + if (mode_font == None) + width = 8; + else + width = XTextWidth(mode_font, np->words, total); + height = 0; + } else + /* p2 now points to the first '\n' */ + for (height = 0; p && height < MAXLINES; height++) { + int w; + + *p2 = 0; + if (mode_font != None && (w = XTextWidth(mode_font, p, p2 - p)) > width) + width = w; + total += p2 - p; /* total chars; count to determine reading time */ + (void) strncpy(args[height], p, MAXWIDTH - 1); + args[height][MAXWIDTH - 1] = '\0'; + p = p2 + 1; + if (!(p2 = (char *) strchr(p, '\n'))) + break; + } + + height++; + /* + * Figure out the height and width in imagepixels (height, width) extend the + * new box by 15 pixels on the sides (30 total) top and bottom. + */ + np->s.width = width + 30; + np->s.height = height * font_height(mode_font) + 30; + if (np->x - np->s.width - 10 < 5) + np->s.x = 5; + else if ((np->s.x = np->x + 32 - (np->s.width + 15) / 2) + + np->s.width + 15 > np->width - 5) + np->s.x = np->width - 15 - np->s.width; + if (np->y - np->s.height - 10 < 5) + np->s.y = np->y + np->ys + 5; + else + np->s.y = np->y - 5 - np->s.height; + + XFillRectangle(display, window, np->text_bg_gc, + np->s.x, np->s.y, np->s.width, np->s.height); + + /* make a box that's 5 pixels thick. Then add a thin box inside it */ + XSetLineAttributes(display, np->text_fg_gc, 5, 0, 0, 0); + XDrawRectangle(display, window, np->text_fg_gc, + np->s.x, np->s.y, np->s.width - 1, np->s.height - 1); + XSetLineAttributes(display, np->text_fg_gc, 0, 0, 0, 0); + XDrawRectangle(display, window, np->text_fg_gc, + np->s.x + 7, np->s.y + 7, np->s.width - 15, np->s.height - 15); + + Y = 15 + font_height(mode_font); + + /* now print each string in reverse order (start at bottom of box) */ + for (Z = 0; Z < height; Z++) { + (void) XDrawString(display, window, np->text_fg_gc, + np->s.x + 15, np->s.y + Y, args[Z], strlen(args[Z])); + Y += font_height(mode_font); + } + np->busyLoop = (total / 15) * 10; + if (np->busyLoop < 30) + np->busyLoop = 30; + np->state = TALK; +} + +static int +look(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + + /*GC gc = MI_GC(mi); */ + nosestruct *np = &noses[MI_SCREEN(mi)]; + int i; + + if (NRAND(3)) { + i = (LRAND() & 1) ? D : F; + XCopyArea(display, np->position[i], window, np->noseGC[i], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y); + return 3; + } + if (!NRAND(5)) + return 0; + if (NRAND(3)) { + i = (LRAND() & 1) ? LF : RF; + XCopyArea(display, np->position[i], window, np->noseGC[i], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y); + return 3; + } + if (!NRAND(5)) + return 0; + i = (LRAND() & 1) ? L : R; + XCopyArea(display, np->position[i], window, np->noseGC[i], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, np->x, np->y); + return 3; +} + +static void +move(ModeInfo * mi) +{ + nosestruct *np = &noses[MI_SCREEN(mi)]; + + if (!np->length) { + register int tries = 0; + + np->dir = 0; + if ((LRAND() & 1) && think(mi)) { + talk(mi, False); /* sets timeout to itself */ + return; + } + if (!NRAND(3) && (np->busyLoop = look(mi))) { + np->state = MOVE; + return; + } + np->busyLoop = 3 + NRAND(3); + do { + if (!tries) + np->length = np->width / 100 + NRAND(90), tries = 8; + else + tries--; + switch (NRAND(8)) { + case 0: + if (np->x - X_INCR * np->length >= 5) + np->dir = LEFT; + break; + case 1: + if (np->x + X_INCR * np->length <= np->width - np->xs - 6) + np->dir = RIGHT; + break; + case 2: + if (np->y - (Y_INCR * np->length) >= 5) + np->dir = UP; + break; + case 3: + if (np->y + Y_INCR * np->length <= np->height - np->ys - 6) + np->dir = DOWN; + break; + case 4: + if (np->x - X_INCR * np->length >= 5 && + np->y - (Y_INCR * np->length) >= 5) + np->dir = (LEFT | UP); + break; + case 5: + if (np->x + X_INCR * np->length <= np->width - np->xs - 6 && + np->y - Y_INCR * np->length >= 5) + np->dir = (RIGHT | UP); + break; + case 6: + if (np->x - X_INCR * np->length >= 5 && + np->y + Y_INCR * np->length <= np->height - np->ys - 6) + np->dir = (LEFT | DOWN); + break; + case 7: + if (np->x + X_INCR * np->length <= np->width - np->xs - 6 && + np->y + Y_INCR * np->length <= np->height - np->ys - 6) + np->dir = (RIGHT | DOWN); + break; + default: + /* No Defaults */ + break; + } + } while (!np->dir); + } + walk(mi, np->dir); + --np->length; + np->state = MOVE; +} + +void +init_nose(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + nosestruct *np; + XGCValues gcv; + int i = 0; + + if (noses == NULL) { + if ((noses = (nosestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (nosestruct))) == NULL) + return; + } + np = &noses[MI_SCREEN(mi)]; + + np->width = MI_WIDTH(mi) + 2; + np->height = MI_HEIGHT(mi) + 2; + np->tinymode = (np->width + np->height < 4 * PIXMAP_SIZE); + np->xs = PIXMAP_SIZE; + np->ys = PIXMAP_SIZE; + + MI_CLEARWINDOW(mi); + + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + /* don't want any exposure events from XCopyPlane */ + XSetGraphicsExposures(display, gc, False); + + if (mode_font == None) + mode_font = getFont(display); + if (np->noseGC[0] == NULL) + pickClothes(mi); + np->words = getWords(MI_SCREEN(mi), MI_NUM_SCREENS(mi)); + if (np->text_fg_gc == NULL && mode_font != None) { + gcv.font = mode_font->fid; + XSetFont(display, gc, mode_font->fid); + gcv.graphics_exposures = False; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + np->text_fg_gc = XCreateGC(display, window, + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_WHITE_PIXEL(mi); + np->text_bg_gc = XCreateGC(display, window, + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + } + np->up = 1; + if (np->tinymode) { + np->x = 0; + np->y = 0; + i = (NRAND(PIXMAPS)); + XCopyArea(display, np->position[i], window, np->noseGC[i], + 0, 0, PIXMAP_SIZE, PIXMAP_SIZE, + (np->width - PIXMAP_SIZE) / 2, + (np->height - PIXMAP_SIZE) / 2); + np->state = FREEZE; + } else { + np->x = np->width / 2; + np->y = np->height / 2; + np->state = MOVE; + } + XFlush(display); +} + +void +draw_nose(ModeInfo * mi) +{ + nosestruct *np = &noses[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (np->busyLoop > 0) { + np->busyLoop--; + return; + } + switch (np->state) { + case MOVE: + move(mi); + break; + case TALK: + talk(mi, 0); + break; + } +} + +void +release_nose(ModeInfo * mi) +{ + if (noses != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + Display *display = MI_DISPLAY(mi); + nosestruct *np = &noses[screen]; + int i; + + if (np->text_fg_gc != NULL) + XFreeGC(display, np->text_fg_gc); + if (np->text_bg_gc != NULL) + XFreeGC(display, np->text_bg_gc); + for (i = 0; i < PIXMAPS; i++) { + if (np->position[i]) + XFreePixmap(display, np->position[i]); + if (np->noseGC[i] != NULL) + XFreeGC(display, np->noseGC[i]); + } + } + (void) free((void *) noses); + noses = NULL; + } + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } +} + +void +refresh_nose(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_nose */ diff --git a/modes/pacman.c b/modes/pacman.c new file mode 100644 index 00000000..c8d5d697 --- /dev/null +++ b/modes/pacman.c @@ -0,0 +1,749 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* pacman --- Mr. Pacman and his ghost friends */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)pacman.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by Heath Rice . + * + * 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: + * 04-Jun-97: Compatible with xscreensaver + * + */ + +/*- + * [Pacman eats screen. Ghosts put screen back.] + * Pacman eats ghosts when he encounters them. + * After all ghosts are eaten, pacman continues + * eating the screen until all of it is gone. Then + * it starts over. + * Food dots should be added. Restart when done eating. + */ + +#ifdef STANDALONE +#define PROGCLASS "Pacman" +#define HACK_INIT init_pacman +#define HACK_DRAW draw_pacman +#define pacman_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: 10 \n" \ + "*size: 0 \n" \ + "*ncolors: 6 \n" \ + "*bitmap: \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_pacman + +ModeSpecOpt pacman_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct pacman_description = +{"pacman", "init_pacman", "draw_pacman", "release_pacman", + "refresh_pacman", "init_pacman", NULL, &pacman_opts, + 100000, 10, 1, 0, 64, 1.0, "", + "Shows Pacman(tm)", 0, NULL}; + +#endif + +/* aliases for vars defined in the bitmap file */ +#define CELL_WIDTH image_width +#define CELL_HEIGHT image_height +#define CELL_BITS image_bits + +#include "ghost.xbm" + +#define MINGHOSTS 1 +#define MAXMOUTH 11 +#define MINGRIDSIZE 4 +#define MINSIZE 1 +#define NOWHERE 255 + +#define NONE 0x0000 +#define LT 0x1000 +#define RT 0x0001 +#define RB 0x0010 +#define LB 0x0100 +#define ALL 0x1111 + +#define YELLOW (MI_NPIXELS(mi) / 6) +#define GREEN (23 * MI_NPIXELS(mi) / 64) +#define BLUE (45 * MI_NPIXELS(mi) / 64) + +typedef struct { + int col, row; + int nextbox, lastbox, nextcol, nextrow; + int dead; + int mouthstage, mouthdirection; + /*int color; */ +} beingstruct; + +typedef struct { + int pixelmode; + int width, height; + int nrows, ncols; + int xs, ys, xb, yb; + int incx, incy; + GC stippledGC; + Pixmap ghostPixmap; + int ghostWidth, ghostHeight; + int graphics_format; + beingstruct pacman; + beingstruct *ghosts; + int nghosts; +#ifdef DEFUNCT + unsigned int *eaten; +#endif + Pixmap pacmanPixmap[4][MAXMOUTH]; +} pacmangamestruct; + +static pacmangamestruct *pacmangames = NULL; + +#if DEFUNCT +static void +clearcorners(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + Window window = MI_WINDOW(mi); + pacmangamestruct *pp = &pacmangames[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, GREEN)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + if ((pp->pacman.nextrow == 0) && (pp->pacman.nextcol == 0)) { + XFillRectangle(display, window, gc, 0, 0, + ((pp->width / pp->ncols) / 2), ((pp->width / pp->ncols) / 2)); + pp->eaten[(pp->pacman.nextcol * pp->nrows) + pp->pacman.nextrow] |= + RT | LT | RB | LB; + } else if ((pp->pacman.nextrow == pp->nrows - 1) && + (pp->pacman.nextcol == 0)) { + XFillRectangle(display, window, gc, + 0, (pp->nrows * pp->ys) - ((pp->width / pp->ncols) / 2), + ((pp->width / pp->ncols) / 2), ((pp->width / pp->ncols) / 2)); + pp->eaten[(pp->pacman.nextcol * pp->nrows) + pp->pacman.nextrow] |= + RT | LT | RB | LB; + } else if ((pp->pacman.nextrow == 0) && + (pp->pacman.nextcol == pp->ncols - 1)) { + XFillRectangle(display, window, gc, + (pp->ncols * pp->xs) - ((pp->width / pp->ncols) / 2), 0, + ((pp->width / pp->ncols) / 2), ((pp->width / pp->ncols) / 2)); + pp->eaten[(pp->pacman.nextcol * pp->nrows) + pp->pacman.nextrow] |= + RT | LT | RB | LB; + } else if ((pp->pacman.nextrow == pp->nrows - 1) && + (pp->pacman.nextcol == pp->ncols - 1)) { + XFillRectangle(display, window, gc, + (pp->ncols * pp->xs) - ((pp->width / pp->ncols) / 2), + (pp->nrows * pp->ys) - ((pp->width / pp->ncols) / 2), + ((pp->width / pp->ncols) / 2), ((pp->width / pp->ncols) / 2)); + pp->eaten[(pp->pacman.nextcol * pp->nrows) + pp->pacman.nextrow] |= + RT | LT | RB | LB; + } +} +#endif +static void +repopulate(ModeInfo * mi) +{ + pacmangamestruct *pp = &pacmangames[MI_SCREEN(mi)]; + int ghost; + +#if DEFUNCT + if (pp->eaten) + (void) free((void *) pp->eaten); + pp->eaten = (unsigned int *) calloc((pp->nrows * pp->ncols), + sizeof (unsigned int)); + +#endif + + MI_CLEARWINDOW(mi); + + for (ghost = 0; ghost < pp->nghosts; ghost++) { + do { + pp->ghosts[ghost].col = NRAND(pp->ncols); + pp->ghosts[ghost].row = NRAND(pp->nrows); + if ((pp->ghosts[ghost].row + pp->ghosts[ghost].col) % 2 != + (pp->pacman.row + pp->pacman.col) % 2) { + if (pp->ghosts[ghost].col != 0) + pp->ghosts[ghost].col--; + else + pp->ghosts[ghost].col++; + } + } + while ((pp->ghosts[ghost].col == pp->pacman.col) && + (pp->ghosts[ghost].row == pp->pacman.row)); + pp->ghosts[ghost].dead = 0; + pp->ghosts[ghost].lastbox = -1; + + } +} + +static void +movepac(ModeInfo * mi) +{ + typedef struct { + int cfactor, rfactor; + int cf, rf; + int oldcf, oldrf; + } being; + being *g, p; + + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + pacmangamestruct *pp = &pacmangames[MI_SCREEN(mi)]; + int ghost, alldead, dir; + XPoint delta; + + if (pp->pacman.nextcol > pp->pacman.col) { + p.cfactor = 1; +#if DEFUNCT + if (pp->eaten) { + pp->eaten[(pp->pacman.col * pp->nrows) + pp->pacman.row] |= + RT | RB; + pp->eaten[((pp->pacman.col + 1) * pp->nrows) + pp->pacman.row] |= + LT | LB; + } +#endif + } else if (pp->pacman.col > pp->pacman.nextcol) { + p.cfactor = -1; +#if DEFUNCT + if (pp->eaten) { + pp->eaten[(pp->pacman.col * pp->nrows) + pp->pacman.row] |= + LT | LB; + pp->eaten[((pp->pacman.col - 1) * pp->nrows) + pp->pacman.row] |= + RT | RB; + } +#endif + } else { + p.cfactor = 0; + } + + if (pp->pacman.nextrow > pp->pacman.row) { + p.rfactor = 1; +#if DEFUNCT + if (pp->eaten) { + pp->eaten[(pp->pacman.col * pp->nrows) + pp->pacman.row] |= + RB | LB; + pp->eaten[(pp->pacman.col * pp->nrows) + (pp->pacman.row + 1)] |= + RT | LT; + } +#endif + } else if (pp->pacman.row > pp->pacman.nextrow) { + p.rfactor = -1; +#if DEFUNCT + if (pp->eaten) { + pp->eaten[(pp->pacman.col * pp->nrows) + pp->pacman.row] |= + RT | LT; + pp->eaten[(pp->pacman.col * pp->nrows) + (pp->pacman.row - 1)] |= + RB | LB; + } +#endif + } else { + p.rfactor = 0; + } + + p.oldcf = pp->pacman.col * pp->xs + pp->xb; + p.oldrf = pp->pacman.row * pp->ys + pp->yb; + g = (being *) malloc(pp->nghosts * sizeof (being)); + + for (ghost = 0; ghost < pp->nghosts; ghost++) { + if (pp->ghosts[ghost].dead == 0) { +#if DEFUNCT + pp->eaten[(pp->ghosts[ghost].col * pp->nrows) + + pp->ghosts[ghost].row] = NONE; +#endif + if (pp->ghosts[ghost].nextcol > pp->ghosts[ghost].col) { + g[ghost].cfactor = 1; + } else if (pp->ghosts[ghost].col > pp->ghosts[ghost].nextcol) { + g[ghost].cfactor = -1; + } else { + g[ghost].cfactor = 0; + } + if (pp->ghosts[ghost].nextrow > pp->ghosts[ghost].row) { + g[ghost].rfactor = 1; + } else if (pp->ghosts[ghost].row > pp->ghosts[ghost].nextrow) { + g[ghost].rfactor = -1; + } else { + g[ghost].rfactor = 0; + } + + g[ghost].oldcf = pp->ghosts[ghost].col * pp->xs + + pp->xb; + g[ghost].oldrf = pp->ghosts[ghost].row * pp->ys + + pp->yb; + } + } + for (delta.x = pp->incx, delta.y = pp->incy; + (delta.x < pp->xs + pp->incx) || (delta.y < pp->ys + pp->incy); + delta.x += pp->incx, delta.y += pp->incy) { + if (delta.x > pp->xs) + delta.x = pp->xs; + if (delta.y > pp->ys) + delta.y = pp->ys; + p.cf = pp->pacman.col * pp->xs + delta.x * p.cfactor + pp->xb; + p.rf = pp->pacman.row * pp->ys + delta.y * p.rfactor + pp->yb; + + dir = (ABS(p.cfactor) * (2 - p.cfactor) + + ABS(p.rfactor) * (1 + p.rfactor)) % 4; + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); +#ifdef FLASH + XFillRectangle(display, window, gc, + p.oldcf, p.oldrf, + pp->xs, pp->ys); +#else + ERASE_IMAGE(display, window, gc, p.cf, p.rf, + p.oldcf, p.oldrf, pp->xs, pp->ys); +#endif + XSetTSOrigin(display, pp->stippledGC, p.cf, p.rf); + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, pp->stippledGC, MI_PIXEL(mi, YELLOW)); + else + XSetForeground(display, pp->stippledGC, MI_WHITE_PIXEL(mi)); + + XSetStipple(display, pp->stippledGC, + pp->pacmanPixmap[dir][pp->pacman.mouthstage]); +#ifdef FLASH + XSetFillStyle(display, pp->stippledGC, FillStippled); +#else + XSetFillStyle(display, pp->stippledGC, FillOpaqueStippled); +#endif + XFillRectangle(display, window, pp->stippledGC, + p.cf, p.rf, pp->xs, pp->ys); + pp->pacman.mouthstage += pp->pacman.mouthdirection; + if ((pp->pacman.mouthstage >= MAXMOUTH) || + (pp->pacman.mouthstage < 0)) { + pp->pacman.mouthdirection *= -1; + pp->pacman.mouthstage += pp->pacman.mouthdirection * 2; + } + p.oldcf = p.cf; + p.oldrf = p.rf; + + for (ghost = 0; ghost < pp->nghosts; ghost++) { + if (!pp->ghosts[ghost].dead) { + g[ghost].cf = pp->ghosts[ghost].col * pp->xs + + delta.x * g[ghost].cfactor + pp->xb; + g[ghost].rf = pp->ghosts[ghost].row * pp->ys + + delta.y * g[ghost].rfactor + pp->yb; + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (pp->pixelmode) { + XFillRectangle(display, window, gc, + g[ghost].oldcf, g[ghost].oldrf, + pp->xs, pp->ys); + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, BLUE)); + else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XFillRectangle(display, window, gc, + g[ghost].cf, g[ghost].rf, pp->xs, pp->ys); + XFlush(display); + } else { +#ifdef FLASH + XFillRectangle(display, window, gc, + g[ghost].oldcf, g[ghost].oldrf, + pp->xs, pp->ys); +#else + ERASE_IMAGE(display, window, gc, g[ghost].cf, g[ghost].rf, + g[ghost].oldcf, g[ghost].oldrf, pp->xs, pp->ys); +#endif + XSetTSOrigin(display, pp->stippledGC, g[ghost].cf, g[ghost].rf); + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, pp->stippledGC, MI_PIXEL(mi, BLUE)); + else + XSetForeground(display, pp->stippledGC, MI_WHITE_PIXEL(mi)); + XSetStipple(display, pp->stippledGC, pp->ghostPixmap); +#ifdef FLASH + XSetFillStyle(display, pp->stippledGC, FillStippled); +#else + XSetFillStyle(display, pp->stippledGC, FillOpaqueStippled); +#endif + XFillRectangle(display, window, pp->stippledGC, + g[ghost].cf, g[ghost].rf, pp->xs, pp->ys); + XFlush(display); + } + g[ghost].oldcf = g[ghost].cf; + g[ghost].oldrf = g[ghost].rf; + } + } + XFlush(display); + } + +#if 0 + clearcorners(mi); +#endif + (void) free((void *) g); + + alldead = 1; + for (ghost = 0; ghost < pp->nghosts; ghost++) { + if (pp->ghosts[ghost].dead == 0) { +#if 0 + if ((pp->ghosts[ghost].nextrow >= pp->pacman.nextrow - 1) && + (pp->ghosts[ghost].nextrow <= pp->pacman.nextrow + 1) && + (pp->ghosts[ghost].nextcol >= pp->pacman.nextcol - 1) && + (pp->ghosts[ghost].nextcol <= pp->pacman.nextcol + 1)) { + (void) printf("%d %d\n", pp->ghosts[ghost].nextrow, + pp->ghosts[ghost].nextcol); + } +#endif + if (((pp->ghosts[ghost].nextrow == pp->pacman.nextrow) && + (pp->ghosts[ghost].nextcol == pp->pacman.nextcol)) || + ((pp->ghosts[ghost].nextrow == pp->pacman.row) && + (pp->ghosts[ghost].nextcol == pp->pacman.col) && + (pp->ghosts[ghost].row == pp->pacman.nextrow) && + (pp->ghosts[ghost].col == pp->pacman.nextcol))) { + pp->ghosts[ghost].dead = 1; + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + /*XFillRectangle(display, window, gc, + pp->ghosts[ghost].col * pp->xs + pp->xb, + pp->ghosts[ghost].row * pp->ys + pp->yb, + pp->xs, pp->ys); */ + XFillRectangle(display, window, gc, + pp->ghosts[ghost].nextcol * pp->xs + pp->xb, + pp->ghosts[ghost].nextrow * pp->ys + pp->yb, + pp->xs, pp->ys); + } else { + pp->ghosts[ghost].row = pp->ghosts[ghost].nextrow; + pp->ghosts[ghost].col = pp->ghosts[ghost].nextcol; + alldead = 0; + } + } + } + pp->pacman.row = pp->pacman.nextrow; + pp->pacman.col = pp->pacman.nextcol; + +#if DEFUNCT + if (alldead && pp->eaten) { + for (ghost = 0; ghost < (pp->nrows * pp->ncols); ghost++) + if (pp->eaten[ghost] != ALL) + break; + if (ghost == pp->nrows * pp->ncols) + repopulate(mi); + } +#else + if (alldead) { + repopulate(mi); + } +#endif +} + +void +init_pacman(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int size = MI_SIZE(mi); + pacmangamestruct *pp; + XGCValues gcv; + int ghost, dir, mouth; + GC fg_gc, bg_gc; + + if (pacmangames == NULL) { + if ((pacmangames = (pacmangamestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (pacmangamestruct))) == NULL) + return; + } + pp = &pacmangames[MI_SCREEN(mi)]; + pp->width = MI_WIDTH(mi); + pp->height = MI_HEIGHT(mi); + if (pp->stippledGC == None) { + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + if ((pp->stippledGC = XCreateGC(display, window, + GCForeground | GCBackground, &gcv)) == None) + return; + pp->ghostWidth = CELL_WIDTH; + pp->ghostHeight = CELL_HEIGHT; + if (size == 0) { + if (pp->ghostPixmap == None) { + getPixmap(mi, window, CELL_WIDTH, CELL_HEIGHT, CELL_BITS, + &(pp->ghostWidth), &(pp->ghostHeight), &(pp->ghostPixmap), + &(pp->graphics_format)); + pp->xs = pp->ghostWidth; + pp->ys = pp->ghostHeight; + } + } + } + if (size == 0) { + if (MINGRIDSIZE * pp->ghostWidth > pp->width || + MINGRIDSIZE * pp->ghostHeight > pp->height) { + pp->pixelmode = 1; + pp->xs = pp->ys = MAX(MINSIZE, MIN(pp->width, pp->height) / MINGRIDSIZE); + } else { + pp->pixelmode = 0; + pp->xs = pp->ghostWidth; + pp->ys = pp->ghostHeight; + } + } else { + pp->pixelmode = 1; + if (size < -MINSIZE) + pp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(pp->width, pp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + pp->ys = MINSIZE; + else + pp->ys = MIN(size, MAX(MINSIZE, MIN(pp->width, pp->height) / + MINGRIDSIZE)); + pp->xs = pp->ys; + } + pp->incx = pp->xs / 10 + 1; + pp->incy = pp->ys / 10 + 1; + pp->ncols = MAX(pp->width / pp->xs, 2); + pp->nrows = MAX(pp->height / pp->ys, 2); + pp->xb = pp->width - pp->ncols * pp->xs; + pp->yb = pp->height - pp->nrows * pp->ys; + + if (pp->pacmanPixmap[0][0] != None) + for (dir = 0; dir < 4; dir++) + for (mouth = 0; mouth < MAXMOUTH; mouth++) + XFreePixmap(display, pp->pacmanPixmap[dir][mouth]); + + + for (dir = 0; dir < 4; dir++) + for (mouth = 0; mouth < MAXMOUTH; mouth++) { + pp->pacmanPixmap[dir][mouth] = XCreatePixmap(display, MI_WINDOW(mi), + pp->xs, pp->ys, 1); + gcv.foreground = 1; + fg_gc = XCreateGC(display, pp->pacmanPixmap[dir][mouth], + GCForeground, &gcv); + gcv.foreground = 0; + bg_gc = XCreateGC(display, pp->pacmanPixmap[dir][mouth], + GCForeground, &gcv); + XFillRectangle(display, pp->pacmanPixmap[dir][mouth], bg_gc, + 0, 0, pp->xs, pp->ys); + if (pp->xs == 1 && pp->ys == 1) + XFillRectangle(display, pp->pacmanPixmap[dir][mouth], fg_gc, + 0, 0, pp->xs, pp->ys); + else + XFillArc(display, pp->pacmanPixmap[dir][mouth], fg_gc, + 0, 0, pp->xs, pp->ys, + ((90 - dir * 90) + mouth * 5) * 64, + (360 + (-2 * mouth * 5)) * 64); + XFreeGC(display, fg_gc); + XFreeGC(display, bg_gc); + } + pp->pacman.lastbox = -1; + pp->pacman.mouthdirection = 1; + + pp->nghosts = MI_COUNT(mi); + if (pp->nghosts < -MINGHOSTS) { + /* if pp->nghosts is random ... the size can change */ + if (pp->ghosts != NULL) { + (void) free((void *) pp->ghosts); + pp->ghosts = NULL; + } + pp->nghosts = NRAND(-pp->nghosts - MINGHOSTS + 1) + MINGHOSTS; + } else if (pp->nghosts < MINGHOSTS) + pp->nghosts = MINGHOSTS; + + if (!pp->ghosts) + pp->ghosts = (beingstruct *) calloc(pp->nghosts, sizeof (beingstruct)); + for (ghost = 0; ghost < pp->nghosts; ghost++) + pp->ghosts[ghost].nextbox = NOWHERE; + + pp->pacman.row = NRAND(pp->nrows); + pp->pacman.col = NRAND(pp->ncols); + + MI_CLEARWINDOW(mi); + + pp->pacman.mouthstage = MAXMOUTH - 1; + for (ghost = 0; ghost < pp->nghosts; ghost++) { + do { + pp->ghosts[ghost].col = NRAND(pp->ncols); + pp->ghosts[ghost].row = NRAND(pp->nrows); + } + while ((pp->ghosts[ghost].col == pp->pacman.col) && + (pp->ghosts[ghost].row == pp->pacman.row)); + pp->ghosts[ghost].dead = 0; + pp->ghosts[ghost].lastbox = -1; + + } +#if DEFUNCT + if (pp->eaten) + (void) free((void *) pp->eaten); + pp->eaten = (unsigned int *) malloc((pp->nrows * pp->ncols) * + sizeof (unsigned int)); + + if (pp->eaten) + for (ghost = 0; ghost < (pp->nrows * pp->ncols); ghost++) + pp->eaten[ghost] = NONE; +#endif +} + +void +draw_pacman(ModeInfo * mi) +{ + pacmangamestruct *pp = &pacmangames[MI_SCREEN(mi)]; + int g; + + MI_IS_DRAWN(mi) = True; + + do { + if (NRAND(3) == 2) + pp->pacman.nextbox = NRAND(5); + + switch (pp->pacman.nextbox) { + case 0: + if ((pp->pacman.row == 0) || (pp->pacman.lastbox == 2)) + pp->pacman.nextbox = NOWHERE; + else { + pp->pacman.nextrow = pp->pacman.row - 1; + pp->pacman.nextcol = pp->pacman.col; + } + break; + + case 1: + if ((pp->pacman.col == pp->ncols - 1) || + (pp->pacman.lastbox == 3)) + pp->pacman.nextbox = NOWHERE; + else { + pp->pacman.nextrow = pp->pacman.row; + pp->pacman.nextcol = pp->pacman.col + 1; + } + break; + + case 2: + if ((pp->pacman.row == pp->nrows - 1) || + (pp->pacman.lastbox == 0)) + pp->pacman.nextbox = NOWHERE; + else { + pp->pacman.nextrow = pp->pacman.row + 1; + pp->pacman.nextcol = pp->pacman.col; + } + break; + + case 3: + if ((pp->pacman.col == 0) || (pp->pacman.lastbox == 1)) + pp->pacman.nextbox = NOWHERE; + else { + pp->pacman.nextrow = pp->pacman.row; + pp->pacman.nextcol = pp->pacman.col - 1; + } + break; + + default: + pp->pacman.nextbox = NOWHERE; + break; + } + } + while (pp->pacman.nextbox == NOWHERE); + + + for (g = 0; g < pp->nghosts; g++) { + if (pp->ghosts[g].dead == 0) { + do { + if (NRAND(3) == 2) + pp->ghosts[g].nextbox = NRAND(5); + + switch (pp->ghosts[g].nextbox) { + case 0: + if ((pp->ghosts[g].row == 0) || (pp->ghosts[g].lastbox == 2)) + pp->ghosts[g].nextbox = NOWHERE; + else { + pp->ghosts[g].nextrow = pp->ghosts[g].row - 1; + pp->ghosts[g].nextcol = pp->ghosts[g].col; + } + break; + + case 1: + if ((pp->ghosts[g].col == pp->ncols - 1) || + (pp->ghosts[g].lastbox == 3)) + pp->ghosts[g].nextbox = NOWHERE; + else { + pp->ghosts[g].nextrow = pp->ghosts[g].row; + pp->ghosts[g].nextcol = pp->ghosts[g].col + 1; + } + break; + + case 2: + if ((pp->ghosts[g].row == pp->nrows - 1) || + (pp->ghosts[g].lastbox == 0)) + pp->ghosts[g].nextbox = NOWHERE; + else { + pp->ghosts[g].nextrow = pp->ghosts[g].row + 1; + pp->ghosts[g].nextcol = pp->ghosts[g].col; + } + break; + + case 3: + if ((pp->ghosts[g].col == 0) || (pp->ghosts[g].lastbox == 1)) + pp->ghosts[g].nextbox = NOWHERE; + else { + pp->ghosts[g].nextrow = pp->ghosts[g].row; + pp->ghosts[g].nextcol = pp->ghosts[g].col - 1; + } + break; + + default: + pp->ghosts[g].nextbox = NOWHERE; + break; + } + } + while (pp->ghosts[g].nextbox == NOWHERE); + pp->ghosts[g].lastbox = pp->ghosts[g].nextbox; + } + } + if (pp->pacman.lastbox != pp->pacman.nextbox) + pp->pacman.mouthstage = 0; + pp->pacman.lastbox = pp->pacman.nextbox; + movepac(mi); + +} + +void +release_pacman(ModeInfo * mi) +{ + if (pacmangames != NULL) { + int screen, dir, mouth; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + pacmangamestruct *pp = &pacmangames[screen]; + Display *display = MI_DISPLAY(mi); + + if (pp->ghosts != NULL) + (void) free((void *) pp->ghosts); +#ifdef DEFUNCT + if (pp->eaten != NULL) + (void) free((void *) pp->eaten); +#endif + if (pp->stippledGC != None) + XFreeGC(display, pp->stippledGC); + if (pp->ghostPixmap != None) + XFreePixmap(display, pp->ghostPixmap); + if (pp->pacmanPixmap[0][0] != None) + for (dir = 0; dir < 4; dir++) + for (mouth = 0; mouth < MAXMOUTH; mouth++) + XFreePixmap(display, pp->pacmanPixmap[dir][mouth]); + } + (void) free((void *) pacmangames); + pacmangames = NULL; + } +} + +void +refresh_pacman(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_pacman */ diff --git a/modes/penrose.c b/modes/penrose.c new file mode 100644 index 00000000..4dfad297 --- /dev/null +++ b/modes/penrose.c @@ -0,0 +1,1302 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* penrose --- quasiperiodic tilings */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)penrose.c 4.07 97/11/24 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: Jamie Zawinski compatible with xscreensaver + * 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" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef MODE_penrose + +#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 = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct penrose_description = +{"penrose", "init_penrose", "draw_penrose", "release_penrose", + "init_penrose", "init_penrose", NULL, &penrose_opts, + 10000, 1, 1, -40, 64, 1.0, "", + "Shows Penrose's quasiperiodic tilings", 0, NULL}; + +#endif + +/*- + * 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 31415 /* This causes a pause, an error occurred. */ +#define COMPLETION 3141 /* This causes a pause, tiles filled up screen. */ + +#define MAX_TILES_PER_VERTEX 7 +#define N_VERTEX_RULES 8 +#define ALLOC_NODE( type) ((type *)malloc( sizeof( type))) + +/*- + * 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; + unsigned long thick_color, thin_color; + int busyLoop; + Bool ammann; +} 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_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]); + } + tp->busyLoop = 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 void +fived_to_loc(int fived[], tiling_c * tp, XPoint *pt) +{ + static fcoord_c fived_table[5] = + { + {.0, .0}}; + float fifth = 8 * atan(1.) / 5; + register int i; + register float r; + register fcoord_c offset; + + *pt = tp->origin; + offset.x = 0.0; + offset.y = 0.0; + 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); +} + + +/* 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((void *) fp2); + } while (fp1 != tp->fringe.nodes); + tp->fringe.nodes = 0; + for (lp1 = tp->forced.first; lp1 != 0;) { + lp2 = lp1; + lp1 = lp1->next; + (void) free((void *) 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)]; + + if (MI_IS_FULLRANDOM(mi)) + tp->ammann = (Bool) (LRAND() & 1); + else + tp->ammann = ammann; + tp->done = False; + tp->busyLoop = 0; + tp->failures = 0; + tp->width = MI_WIDTH(mi); + tp->height = MI_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_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_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_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; + fived_to_loc(fp->fived, tp, &(fp->loc)); + /* 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_WHITE_PIXEL(mi)); + XFillPolygon(display, window, gc, pts, 4, Convex, CoordModeOrigin); + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawLines(display, window, gc, pts, 5, CoordModeOrigin); + + if (tp->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_BLACK_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_BLACK_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 delayLoop 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_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Dislocation occurred!\n"); + } + tp->busyLoop = 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; + (void) free((void *) 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_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in delete_penrose()\n"); + (void) fprintf(stderr, "tp->fringe.nodes == vertex\n"); + } + tp->busyLoop = 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; + (void) free((void *) node); + tp->forced.n_nodes--; + if (!vertex->off_screen) + tp->forced.n_visible--; + } + if (!vertex->off_screen) + tp->fringe.n_nodes--; + (void) free((void *) 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_IS_VERBOSE(mi)) { + (void) fprintf(stderr, "Weirdness in alloc_vertex()\n"); + (void) fprintf(stderr, "v = 0\n"); + } + tp->busyLoop = CELEBRATE; + } + *v = *from; + add_unit_vec(dir, v->fived); + fived_to_loc(v->fived, tp, &(v->loc)); + 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_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_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_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_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_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_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_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; + + MI_IS_DRAWN(mi) = True; + + if (tp->busyLoop > 0) { + tp->busyLoop--; + return; + } + 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 = (unsigned char) (VT_TOTAL_MASK & LRAND()); + + MI_CLEARWINDOW(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; + tp->busyLoop = 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 *fringe_p = tp->fringe.nodes; + + n = NRAND(tp->fringe.n_nodes); + i = 0; + for (; i <= n; i++) + do { + fringe_p = fringe_p->next; + } while (fringe_p->off_screen); + add_random_tile(fringe_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; + } +} + +#endif /* MODE_penrose */ diff --git a/modes/petal.c b/modes/petal.c new file mode 100644 index 00000000..edf42a10 --- /dev/null +++ b/modes/petal.c @@ -0,0 +1,358 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* petal --- mathematical flowers */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)petal.c 4.07 97/11/24 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: + * 10-May-97: Compatible with xscreensaver + * 12-Aug-95: xlock version + * Jan-95: xscreensaver version (Jamie Zawinski ) + * 24-Jun-94: X11 version (Dale Moore ) + * Based on a program for some old PDP-11 Graphics + * Display Processors at CMU. + */ + +/*- + * original 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. + */ + +#ifdef STANDALONE +#define PROGCLASS "Petal" +#define HACK_INIT init_petal +#define HACK_DRAW draw_petal +#define petal_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: -500 \n" \ + "*cycles: 400 \n" \ + "*ncolors: 64 \n" \ + "*wireframe: False \n" \ + "*fullrandom: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_petal + +ModeSpecOpt petal_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct petal_description = +{"petal", "init_petal", "draw_petal", "release_petal", + "refresh_petal", "init_petal", NULL, &petal_opts, + 10000, -500, 400, 1, 64, 1.0, "", + "Shows various GCD Flowers", 0, NULL}; + +#endif + +#define TWOPI (2.0*M_PI) + +/*- + * 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) + +/*- + * If the petal has only this many lines, it must be ugly and we do not + * want to see it. + */ +#define MINLINES 5 + +typedef struct { + Bool painted; + int width, height; + int lines; + int time; + int npoints; + long color; + XPoint *points; + Bool wireframe; +} petalstruct; + +static petalstruct *petals = NULL; + +/*- + * Macro: + * sine + * cosine + * 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 sine(t, degrees) sin(t * TWOPI / (degrees)) +#define cosine(t, degrees) cos(t * TWOPI / (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 + NRAND(b - a)) + +static int +gcd(int m, int n) +/*- + * Greatest Common Divisor (also Greatest 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_petal(XPoint * points, int lines, int sizex, int sizey) +/*- + * 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 petal */ + + double r; + int theta = 0; + XPoint *p = points; + int count; + int npoints; + + for (;;) { + d = lines; + + a = rand_range(1, d); + b = rand_range(1, d); + npoints = numlines(a, b, d); + if (npoints >= 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 = npoints; count--;) { + r = sine(theta * a, d); + + /* Convert from polar to cartesian coordinates */ + /* We could round the results, but coercing seems just fine */ + p->x = (int) (sine(theta, d) * r * sizex + sizex); + p->y = (int) (cosine(theta, d) * r * sizey + sizey); + + /* Advance index into array */ + p++; + + /* Advance theta */ + theta += b; + theta %= d; + } + *p = points[0]; /* Tack on another for XDrawLines */ + + return (npoints); +} + +static void +petal(ModeInfo * mi) +{ + petalstruct *pp = &petals[MI_SCREEN(mi)]; + + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), pp->color); + if (pp->wireframe) { + XDrawLines(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + pp->points, pp->npoints + 1, CoordModeOrigin); + } else { + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + pp->points, pp->npoints, Complex, CoordModeOrigin); + } +} + +static void +random_petal(ModeInfo * mi) +{ + petalstruct *pp = &petals[MI_SCREEN(mi)]; + + pp->npoints = compute_petal(pp->points, pp->lines, + pp->width / 2, pp->height / 2); + + if (MI_NPIXELS(mi) <= 2) + pp->color = MI_WHITE_PIXEL(mi); + else + pp->color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + petal(mi); +} + +void +init_petal(ModeInfo * mi) +{ + petalstruct *pp; + + if (petals == NULL) { + if ((petals = (petalstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (petalstruct))) == NULL) + return; + } + pp = &petals[MI_SCREEN(mi)]; + + pp->lines = MI_COUNT(mi); + if (pp->lines > MAXLINES) + pp->lines = MAXLINES; + else if (pp->lines < -MINLINES) { + if (pp->points) { + (void) free((void *) pp->points); + pp->points = NULL; + } + pp->lines = NRAND(-pp->lines - MINLINES + 1) + MINLINES; + } else if (pp->lines < MINLINES) + pp->lines = MINLINES; + if (!pp->points) + pp->points = (XPoint *) malloc((pp->lines + 1) * sizeof (XPoint)); + pp->width = MI_WIDTH(mi); + pp->height = MI_HEIGHT(mi); + + pp->time = 0; + if (MI_IS_FULLRANDOM(mi)) + pp->wireframe = (Bool) (LRAND() & 1); + else + pp->wireframe = MI_IS_WIREFRAME(mi); + + MI_CLEARWINDOW(mi); + pp->painted = False; + + random_petal(mi); +} + +void +draw_petal(ModeInfo * mi) +{ + petalstruct *pp = &petals[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (++pp->time > MI_CYCLES(mi)) + init_petal(mi); + else + pp->painted = True; +} + +void +release_petal(ModeInfo * mi) +{ + if (petals != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + petalstruct *pp = &petals[screen]; + + if (pp->points) + (void) free((void *) pp->points); + } + (void) free((void *) petals); + petals = NULL; + } +} + +void +refresh_petal(ModeInfo * mi) +{ + petalstruct *pp = &petals[MI_SCREEN(mi)]; + + if (pp->painted) { + MI_CLEARWINDOW(mi); + petal(mi); + pp->painted = False; + } +} + +#endif /* MODE_petal */ diff --git a/modes/puzzle.c b/modes/puzzle.c new file mode 100644 index 00000000..8e5724fa --- /dev/null +++ b/modes/puzzle.c @@ -0,0 +1,624 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* puzzle --- the familiar Sam Loyd puzzle */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)puzzle.c 4.09 98/03/20 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by Heath Rice . + * + * 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: + * 20-Mar-98: Ideas from slip.c and eyes.c, problems with XGetImage when + * image moved off screen (-inwindow or -debug). + * 10-May-97: Compatible with xscreensaver + * 15-Mar-96: cleaned up, NUMBERED compile-time switch is now broken. + * Feb-96: combined with rastering. Jouk Jansen . + * Feb-95: written. Heath Rice + */ + +/*- + * Chops up the screen into squares and randomly slides them around + * like that game where you try to rearrange the little tiles in their + * original order. After it scrambles the tiles for awhile, it reverses + * itself and puts them back like they started. This mode looks the coolest + * if you have a picture on your background. + */ + +#ifdef STANDALONE +#define PROGCLASS "Puzzle" +#define HACK_INIT init_puzzle +#define HACK_DRAW draw_puzzle +#define puzzle_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 250 \n" \ + "*ncolors: 64 \n" \ + "*bitmap: \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ +#include "iostuff.h" + +#ifdef MODE_puzzle + +ModeSpecOpt puzzle_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct puzzle_description = +{"puzzle", "init_puzzle", "draw_puzzle", "release_puzzle", + "init_puzzle", "init_puzzle", NULL, &puzzle_opts, + 10000, 250, 1, 1, 64, 1.0, "", + "Shows a puzzle being scrambled and then solved", 0, NULL}; + +#endif + +#include + +#define PUZZLE_WIDTH image_width +#define PUZZLE_HEIGHT image_height +#define PUZZLE_BITS image_bits +#define NOWAY 255 +#include "puzzle.xbm" + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#define PUZZLE_NAME image_name +#include "puzzle.xpm" +#define DEFAULT_XPM 1 +#endif + + /*int storedmoves, *moves, *position, space; To keep track of puzzle */ +typedef struct { + Bool painted; /* For debouncing */ + int excount; + int *fixbuff; + XPoint count, boxsize, windowsize; + XPoint usablewindow, offsetwindow; + XPoint randompos, randpos; + unsigned long black; + int row, col, nextrow, nextcol, nextbox; + int incrementOfMove; + int lastbox; + int forward; + int prev; + int moves; + + /* Delta move stuff */ + int movingBox; + Pixmap bufferBox; + int cfactor, rfactor; + int Lp; + int cbs, cbw, rbs, rbw; + int lengthOfMove; + +#ifdef NUMBERED + XImage *image; + GC gc; + /* Font stuff */ + int done; + int ascent, fontWidth, fontHeight; +#else + XImage *logo; + GC backGC; + Colormap cmap; + int graphics_format; +#endif +} puzzlestruct; + +static puzzlestruct *puzzs = NULL; + +#ifdef NUMBERED +extern XFontStruct *getFont(Display * display); + +#define font_height(f) (f->ascent + f->descent) +static XFontStruct *mode_font = None; + +static int +font_width(XFontStruct * font, char ch) +{ + int dummy; + XCharStruct xcs; + + (void) XTextExtents(font, &ch, 1, &dummy, &dummy, &dummy, &xcs); + return xcs.width; +} + +void +NumberScreen(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + if (mode_font == None) + mode_font = getFont(display); + if (!pp->done) { + XGCValues gcv; + + pp->done = 1; + gcv.font = mode_font->fid; + XSetFont(display, MI_GC(mi), mode_font->fid); + gcv.graphics_exposures = False; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + pp->gc = XCreateGC(display, window, + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + pp->ascent = mode_font->ascent; + pp->fontHeight = font_height(mode_font); + pp->fontWidth = font_width(mode_font, '5'); + } + XSetForeground(display, pp->gc, MI_WHITE_PIXEL(mi)); + + { + XPoint pos, letter; + int count = 1, digitOffset = 1, temp, letterOffset; + int i, j, mult = pp->count.x * pp->count.y; + char buf[16]; + + letter.x = pp->boxsize.x / 2 - 3; + letter.y = pp->boxsize.y / 2 + pp->ascent / 2 - 1; + letterOffset = pp->fontWidth / 2; + pos.y = 0; + for (j = 0; j < pp->count.y; j++) { + pos.x = 0; + for (i = 0; i < pp->count.x; i++) { + if (count < mult) { + if (pp->boxsize.x > 2 * pp->fontWidth && + pp->boxsize.y > pp->fontHeight) { + (void) sprintf(buf, "%d", count); + (void) XDrawString(display, window, pp->gc, + pos.x + letter.x - letterOffset * digitOffset + + pp->randompos.x, + pos.y + letter.y + pp->randompos.y, buf, digitOffset); + } + XDrawRectangle(display, window, pp->gc, + pos.x + 1 + pp->randompos.x, pos.y + 1 + pp->randompos.y, + pp->boxsize.x - 3, pp->boxsize.y - 3); + count++; + digitOffset = 0; + temp = count; + while (temp >= 1) { + temp /= 10; + digitOffset++; + } + } + pos.x += pp->boxsize.x; + } + pos.y += pp->boxsize.y; + } + } +} +#endif + +static int +setupmove(ModeInfo * mi) +{ + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + if ((pp->prev == pp->excount) && (pp->excount > 0) && (pp->forward == 1)) { + pp->lastbox = -1; + pp->forward = 0; + pp->prev--; + } else if ((pp->prev == -1) && (pp->excount > 0) && (pp->forward == 0)) { + pp->lastbox = -1; + pp->forward = 1; + pp->prev++; + } + if (pp->forward) + pp->nextbox = NRAND(5); + else + pp->nextbox = pp->fixbuff[pp->prev]; + + switch (pp->nextbox) { + case 0: + if ((pp->row == 0) || (pp->lastbox == 2)) + pp->nextbox = NOWAY; + else { + pp->nextrow = pp->row - 1; + pp->nextcol = pp->col; + } + break; + case 1: + if ((pp->col == pp->count.x - 1) || (pp->lastbox == 3)) + pp->nextbox = NOWAY; + else { + pp->nextrow = pp->row; + pp->nextcol = pp->col + 1; + } + break; + case 2: + if ((pp->row == pp->count.y - 1) || (pp->lastbox == 0)) + pp->nextbox = NOWAY; + else { + pp->nextrow = pp->row + 1; + pp->nextcol = pp->col; + } + break; + case 3: + if ((pp->col == 0) || (pp->lastbox == 1)) + pp->nextbox = NOWAY; + else { + pp->nextrow = pp->row; + pp->nextcol = pp->col - 1; + } + break; + default: + pp->nextbox = NOWAY; + break; + } + + if (pp->nextbox != NOWAY) { + pp->lastbox = pp->nextbox; + return True; + } else + return False; +} + +static void +setupmovedelta(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + if (pp->bufferBox != None) { + XFreePixmap(display, pp->bufferBox); + pp->bufferBox = None; + } + pp->bufferBox = XCreatePixmap(display, MI_WINDOW(mi), + pp->boxsize.x, pp->boxsize.y, MI_DEPTH(mi)); + if (pp->bufferBox == None) { + return; + } + XCopyArea(MI_DISPLAY(mi), MI_WINDOW(mi), pp->bufferBox, pp->backGC, + pp->nextcol * pp->boxsize.x + pp->randompos.x + 1, + pp->nextrow * pp->boxsize.y + pp->randompos.y + 1, + pp->boxsize.x - 2, pp->boxsize.y - 2, 0, 0); + XFlush(MI_DISPLAY(mi)); + + if (pp->nextcol > pp->col) { + pp->cfactor = -1; + pp->cbs = pp->boxsize.x; + pp->cbw = pp->incrementOfMove; + } else if (pp->col > pp->nextcol) { + pp->cfactor = 1; + pp->cbs = -pp->incrementOfMove; + pp->cbw = pp->incrementOfMove; + } else { + pp->cfactor = 0; + pp->cbs = 0; + pp->cbw = pp->boxsize.x; + } + if (pp->nextrow > pp->row) { + pp->rfactor = -1; + pp->rbs = pp->boxsize.y; + pp->rbw = pp->incrementOfMove; + } else if (pp->row > pp->nextrow) { + pp->rfactor = 1; + pp->rbs = -pp->incrementOfMove; + pp->rbw = pp->incrementOfMove; + } else { + pp->rfactor = 0; + pp->rbs = 0; + pp->rbw = pp->boxsize.y; + } + + if (pp->cfactor == 0) + pp->lengthOfMove = pp->boxsize.y; + else if (pp->rfactor == 0) + pp->lengthOfMove = pp->boxsize.x; + else + pp->lengthOfMove = MIN(pp->boxsize.x, pp->boxsize.y); + pp->Lp = pp->incrementOfMove; +} + +static void +wrapupmove(ModeInfo * mi) +{ + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + if (pp->excount) { + if (pp->forward) { + pp->fixbuff[pp->prev] = (pp->nextbox + 2) % 4; + pp->prev++; + } else + pp->prev--; + } +} + +static void +wrapupmovedelta(ModeInfo * mi) +{ + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + if (pp->bufferBox) { + + XCopyArea(MI_DISPLAY(mi), pp->bufferBox, MI_WINDOW(mi), pp->backGC, + 0, 0, pp->boxsize.x - 2, pp->boxsize.y - 2, + pp->col * pp->boxsize.x + pp->randompos.x + 1, + pp->row * pp->boxsize.y + pp->randompos.y + 1); + + XFlush(MI_DISPLAY(mi)); + + pp->row = pp->nextrow; + pp->col = pp->nextcol; + + XFreePixmap(MI_DISPLAY(mi), pp->bufferBox); + pp->bufferBox = None; + } +} + +static int +moveboxdelta(ModeInfo * mi) +{ + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + int cf = pp->nextcol * pp->boxsize.x + + pp->Lp * pp->cfactor + pp->randompos.x; + int rf = pp->nextrow * pp->boxsize.y + + pp->Lp * pp->rfactor + pp->randompos.y; + + if (pp->Lp <= pp->lengthOfMove) { + if (pp->bufferBox) { + XCopyArea(MI_DISPLAY(mi), pp->bufferBox, MI_WINDOW(mi), + pp->backGC, 0, 0, pp->boxsize.x - 2, pp->boxsize.y - 2, + cf + 1, rf + 1); + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), pp->backGC, + cf + pp->cbs - 1, rf + pp->rbs - 1, pp->cbw + 2, pp->rbw + 2); + } + if ((pp->Lp + pp->incrementOfMove > pp->lengthOfMove) && + (pp->Lp != pp->lengthOfMove)) + pp->Lp = pp->lengthOfMove - pp->incrementOfMove; + pp->Lp += pp->incrementOfMove; + return False; + } else + return True; +} + +static void +init_stuff(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + if (!pp->logo) + getImage(mi, &pp->logo, PUZZLE_WIDTH, PUZZLE_HEIGHT, PUZZLE_BITS, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + DEFAULT_XPM, PUZZLE_NAME, +#endif + &pp->graphics_format, &pp->cmap, &pp->black); +#ifndef STANDALONE + if (pp->cmap != None) { + setColormap(display, window, pp->cmap, MI_IS_INWINDOW(mi)); + if (pp->backGC == None) { + XGCValues xgcv; + + xgcv.background = pp->black; + pp->backGC = XCreateGC(display, window, GCBackground, &xgcv); + } + } else +#endif /* STANDALONE */ + { + pp->black = MI_BLACK_PIXEL(mi); + pp->backGC = MI_GC(mi); + } +} + +static void +free_stuff(Display * display, puzzlestruct * pp) +{ + if (pp->cmap != None) { + XFreeColormap(display, pp->cmap); + if (pp->backGC != None) { + XFreeGC(display, pp->backGC); + pp->backGC = None; + } + pp->cmap = None; + } else + pp->backGC = None; + destroyImage(&pp->logo, &pp->graphics_format); +} + +void +init_puzzle(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + puzzlestruct *pp; + int x, y; + XPoint size; + + if (puzzs == NULL) { + if ((puzzs = (puzzlestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (puzzlestruct))) == NULL) + return; + } + pp = &puzzs[MI_SCREEN(mi)]; + + if (pp->painted && pp->windowsize.x == MI_WIDTH(mi) && + pp->windowsize.y == MI_HEIGHT(mi)) + return; /* Debounce since refresh_puzzle is init_puzzle */ + init_stuff(mi); + + pp->excount = MI_COUNT(mi); + if (pp->excount < 0) { + if (pp->fixbuff != NULL) + (void) free((void *) pp->fixbuff); + pp->fixbuff = NULL; + pp->excount = NRAND(-pp->excount) + 1; + } + pp->lastbox = -1; + pp->moves = 0; + pp->movingBox = False; + + pp->windowsize.x = MI_WIDTH(mi); + pp->windowsize.y = MI_HEIGHT(mi); + if (pp->windowsize.x < 7) + pp->windowsize.x = 7; + if (pp->windowsize.y < 7) + pp->windowsize.y = 7; + pp->forward = 1; + pp->prev = 0; + /* don't want any exposure events from XCopyArea */ + XSetGraphicsExposures(display, pp->backGC, False); + + MI_CLEARWINDOWCOLORMAP(mi, pp->backGC, pp->black); + + if (pp->logo) { + size.x = (pp->logo->width < pp->windowsize.x) ? + pp->logo->width : pp->windowsize.x; + size.y = (pp->logo->height < pp->windowsize.y) ? + pp->logo->height : pp->windowsize.y; + } else { + size.x = pp->windowsize.x; + size.y = pp->windowsize.y; + } + pp->boxsize.y = NRAND(1 + size.y / 4) + 6; + pp->boxsize.x = NRAND(1 + size.x / 4) + 6; + if ((pp->boxsize.x > 4 * pp->boxsize.y) || + pp->boxsize.y > 4 * pp->boxsize.x) + pp->boxsize.x = pp->boxsize.y = 2 * MIN(pp->boxsize.x, pp->boxsize.y); + pp->count.x = size.x / pp->boxsize.x; + pp->count.y = size.y / pp->boxsize.y; + + if (pp->bufferBox != None) { + XFreePixmap(display, pp->bufferBox); + pp->bufferBox = None; + } + pp->usablewindow.x = pp->count.x * pp->boxsize.x; + pp->usablewindow.y = pp->count.y * pp->boxsize.y; + pp->offsetwindow.x = (pp->windowsize.x - pp->usablewindow.x) / 2; + pp->offsetwindow.y = (pp->windowsize.y - pp->usablewindow.y) / 2; + + pp->incrementOfMove = MIN(pp->usablewindow.x, pp->usablewindow.y) / 20; + pp->incrementOfMove = MAX(pp->incrementOfMove, 1); + + if (pp->logo) { + pp->randompos.x = NRAND(MAX((pp->windowsize.x - pp->logo->width), + 2 * pp->offsetwindow.x + 1)); + pp->randompos.y = NRAND(MAX((pp->windowsize.y - pp->logo->height), + 2 * pp->offsetwindow.y + 1)); + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, pp->backGC, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, pp->backGC, MI_PIXEL(mi, NRAND(MI_NPIXELS(mi)))); + (void) XPutImage(display, window, pp->backGC, pp->logo, + (int) (NRAND(MAX(1, (pp->logo->width - pp->usablewindow.x)))), + (int) (NRAND(MAX(1, (pp->logo->height - pp->usablewindow.y)))), + pp->randompos.x, pp->randompos.y, + pp->usablewindow.x, pp->usablewindow.y); + XSetForeground(display, pp->backGC, pp->black); + for (x = 0; x <= pp->count.x; x++) { + int tempx = x * pp->boxsize.x; + + XDrawLine(display, window, pp->backGC, + tempx + pp->randompos.x, pp->randompos.y, + tempx + pp->randompos.x, pp->usablewindow.y + pp->randompos.y); + XDrawLine(display, window, pp->backGC, + tempx + pp->randompos.x - 1, pp->randompos.y, + tempx + pp->randompos.x - 1, pp->usablewindow.y + pp->randompos.y); + } + for (y = 0; y <= pp->count.y; y++) { + int tempy = y * pp->boxsize.y; + + XDrawLine(display, window, pp->backGC, + pp->randompos.x, tempy + pp->randompos.y, + pp->usablewindow.x + pp->randompos.x, tempy + pp->randompos.y); + XDrawLine(display, window, pp->backGC, + pp->randompos.x, tempy + pp->randompos.y - 1, + pp->usablewindow.x + pp->randompos.x, tempy + pp->randompos.y - 1); + } + } +#ifdef NUMBERED + else { + if (pp->image) + (void) XDestroyImage(pp->image); + pp->randompos.x = pp->offsetwindow.x; + pp->randompos.y = pp->offsetwindow.y; + NumberScreen(mi); + pp->image = XGetImage(display, window, + pp->offsetwindow.x, pp->offsetwindow.y, + pp->usablewindow.x, pp->usablewindow.y, + AllPlanes, + (MI_NPIXELS(mi) <= 2) ? XYPixmap : ZPixmap); + } + + pp->row = pp->count.y - 1; + pp->col = pp->count.x - 1; +#else + pp->row = NRAND(pp->count.y); + pp->col = NRAND(pp->count.x); +#endif + + if ((pp->excount) && (pp->fixbuff == NULL)) + if ((pp->fixbuff = (int *) calloc(pp->excount, sizeof (int))) == NULL) + (void) fprintf(stderr, "Could not allocate memory for puzzle buffer\n"); + + pp->painted = True; +} + +void +draw_puzzle(ModeInfo * mi) +{ + puzzlestruct *pp = &puzzs[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + pp->painted = False; + if (pp->movingBox) { + if (moveboxdelta(mi)) { + wrapupmovedelta(mi); + wrapupmove(mi); + pp->movingBox = False; + if (pp->moves++ > 2 * MI_COUNT(mi)) + init_puzzle(mi); + } + } else { + if (setupmove(mi)) { + setupmovedelta(mi); + pp->movingBox = True; + } + } +} + +void +release_puzzle(ModeInfo * mi) +{ + if (puzzs != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + puzzlestruct *pp = &puzzs[screen]; + + if (pp->fixbuff != NULL) + (void) free((void *) pp->fixbuff); + if (pp->bufferBox != None) + XFreePixmap(MI_DISPLAY(mi), pp->bufferBox); + free_stuff(MI_DISPLAY(mi), pp); + } + (void) free((void *) puzzs); + puzzs = NULL; + } +#ifdef NUMBERED + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } +#endif +} + +#endif /* MODE_puzzle */ diff --git a/modes/pyro.c b/modes/pyro.c new file mode 100644 index 00000000..4cf04b3b --- /dev/null +++ b/modes/pyro.c @@ -0,0 +1,607 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* pyro --- fireworks */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)pyro.c 4.07 97/11/24 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: + * 15-May-97: jwz@jwz.org: turned into a standalone program. + * 05-Sep-96: Added 3d support Henrik Theiling + * 16-Mar-91: Written, received from David Brooks + */ + +/*- + * The physics of the rockets is a little bogus, but it looks OK. Each is + * given an initial velocity impetus. They decelerate slightly (gravity + * overcomes the rocket's impulse) and explode as the rocket's main fuse + * gives out (we could add a ballistic stage, maybe). The individual + * stars fan out from the rocket, and they decelerate less quickly. + * That's called bouyancy, but really it's again a visual preference. + */ + +#ifdef STANDALONE +#define PROGCLASS "Pyro" +#define HACK_INIT init_pyro +#define HACK_DRAW draw_pyro +#define pyro_opts xlockmore_opts +#define DEFAULTS "*delay: 15000 \n" \ + "*count: 100 \n" \ + "*size: -3 \n" \ + "*ncolors: 200 \n" \ + "*use3d: False \n" \ + "*delta3d: 1.5 \n" \ + "*right3d: red \n" \ + "*left3d: blue \n" \ + "*both3d: magenta \n" \ + "*none3d: black \n" +#define UNIFORM_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_pyro + +ModeSpecOpt pyro_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct pyro_description = +{"pyro", "init_pyro", "draw_pyro", "release_pyro", + "refresh_pyro", "init_pyro", NULL, &pyro_opts, + 15000, 100, 1, -3, 64, 1.0, "", + "Shows fireworks", 0, NULL}; + +#endif + +#define ORANGE (MI_NPIXELS(mi) / 16) + +#define MINROCKETS 1 +#define MINSIZE 1 + +#define SILENT 0 +#define REDGLARE 1 +#define BURSTINGINAIR 2 + +#define CLOUD 0 +#define DOUBLECLOUD 1 +#define COLORCLOUD 2 +/* Clearly other types and other fascinating visual effects could be added... */ + +/* P_xxx parameters represent the reciprocal of the probability... */ +#define P_IGNITE 5000 /* ...of ignition per cycle */ +#define P_DOUBLECLOUD 10 /* ...of an ignition being double */ +#define P_COLORCLOUD 5 /* ...of an ignition being full color */ +#define P_MULTI 75 /* ...of an ignition being several @ once */ +#define P_FUSILLADE 250 /* ...of an ignition starting a fusillade */ + +#define ROCKETW 2 /* Dimensions of rocket */ +#define ROCKETH 4 +#define XVELFACTOR 0.0025 /* Max horizontal velocity / screen width */ +#define ZVELFACTOR 0.0025 +#define MINZVAL 250 /* absolute minimum of z values */ +#define MINZVALSTART 300 /* range where they start */ +#define MAXZVALSTART 1000 +#define SCREENZ 400 +/* the z-component still gets too small sometimes */ +#define GETZDIFFAUX(z) (MI_DELTA3D(mi)*20.0*(1.0-(SCREENZ)/(z))) +#define GETZDIFF(z) ((z)MINZVAL) val+=(add) +#define ADDZ(val,add) (((val)+(add)>MINZVAL)?(val)+(add):(val)) +#define TWOPI (2.0*M_PI) + +typedef struct { + unsigned long color; + float sx, sy, sz; /* Distance from notional center */ + float sxvel, syvel, szvel; /* Relative to notional center */ +} star; + +typedef struct { + int state; + int shelltype; + int fuse; + float xvel, yvel, zvel; + float x, y, z; + unsigned long color[2]; + int nstars; + XRectangle Xpoints[2][MAXSTARS]; + XRectangle Xpointsleft[2][MAXSTARS]; + star stars[MAXSTARS]; +} rocket; + +typedef struct { + int p_ignite; + unsigned long rockpixel; + int nflying, nrockets; + int fusilcount; + int width, height; + int lmargin, rmargin; + int star_size; + float minvelx, maxvelx; + float minvely, maxvely; + float minvelz, maxvelz; + float maxsvel; + float rockdecel, stardecel; + rocket *rockq; +} pyrostruct; + +static void shootup(ModeInfo * mi, pyrostruct * pp, rocket * rp); +static void burst(ModeInfo * mi, pyrostruct * pp, rocket * rp); + +static pyrostruct *pyros = NULL; +static int orig_p_ignite; +static int just_started = True; /* Greet the user right away */ + +static void +ignite(ModeInfo * mi, pyrostruct * pp) +{ + rocket *rp; + int multi, shelltype, nstars, fuse, pix; + unsigned long color[2]; + float xvel, yvel, x, zvel = 0.0, z = 0.0; + + x = NRAND(pp->width); + xvel = FLOATRAND(-pp->maxvelx, pp->maxvelx); +/* All this to stop too many rockets going offscreen: */ + if ((x < pp->lmargin && xvel < 0.0) || (x > pp->rmargin && xvel > 0.0)) + xvel = -xvel; + yvel = FLOATRAND(pp->minvely, pp->maxvely); + if (MI_IS_USE3D(mi)) { + z = FLOATRAND(MINZVALSTART, MAXZVALSTART); + zvel = FLOATRAND(pp->minvelz, pp->maxvelz); + } + fuse = INTRAND(MINFUSE, MAXFUSE); + nstars = INTRAND(MINSTARS, MAXSTARS); + if (MI_NPIXELS(mi) > 2) { + pix = NRAND(MI_NPIXELS(mi)); + color[0] = MI_PIXEL(mi, pix); + color[1] = MI_PIXEL(mi, + ((pix + (MI_NPIXELS(mi) / 2)) % MI_NPIXELS(mi))); + } else { + color[0] = color[1] = MI_WHITE_PIXEL(mi); + } + + multi = 1; + if (NRAND(P_DOUBLECLOUD) == 0) + shelltype = DOUBLECLOUD; + else { + shelltype = CLOUD; + if (NRAND(P_MULTI) == 0) + multi = INTRAND(5, 15); + } + if (NRAND(P_COLORCLOUD) == 0) + shelltype |= COLORCLOUD; + + rp = pp->rockq; + while (multi--) { + if (pp->nflying >= pp->nrockets) + return; + while (rp->state != SILENT) + rp++; + pp->nflying++; + rp->shelltype = shelltype; + rp->state = REDGLARE; + rp->color[0] = color[0]; + rp->color[1] = color[1]; + rp->xvel = xvel; + rp->yvel = FLOATRAND(yvel * 0.97, yvel * 1.03); + rp->fuse = INTRAND((fuse * 90) / 100, (fuse * 110) / 100); + rp->x = x + FLOATRAND(multi * 7.6, multi * 8.4); + rp->y = pp->height - 1; + if (MI_IS_USE3D(mi)) { + rp->zvel = FLOATRAND(zvel * 0.97, zvel * 1.03); + rp->z = z; + } + rp->nstars = nstars; + } +} + +static void +animate(ModeInfo * mi, pyrostruct * pp, rocket * rp) +{ + int starn, diff; + float r, theta; + + if (rp->state == REDGLARE) { + shootup(mi, pp, rp); + +/* Handle setup for explosion */ + if (rp->state == BURSTINGINAIR) { + for (starn = 0; starn < rp->nstars; starn++) { + rp->stars[starn].sx = rp->stars[starn].sy = 0.0; + if (MI_IS_USE3D(mi)) { + rp->stars[starn].sz = 0.0; + diff = (int) GETZDIFF(rp->z); + rp->Xpoints[0][starn].x = (int) rp->x + diff; + rp->Xpointsleft[0][starn].x = (int) rp->x - diff; + rp->Xpoints[0][starn].y = + rp->Xpointsleft[0][starn].y = (int) rp->y; + if (rp->shelltype & DOUBLECLOUD) { + rp->Xpoints[1][starn].x = (int) rp->x + diff; + rp->Xpointsleft[1][starn].x = (int) rp->x - diff; + rp->Xpoints[1][starn].y = + rp->Xpointsleft[1][starn].y = (int) rp->y; + } + /* this isn't really a 3d direction. it's */ + /* very much the same as in worm. */ + r = FLOATRAND(0.0, pp->maxsvel); + theta = FLOATRAND(0.0, TWOPI); + rp->stars[starn].sxvel = r * COSF(theta); + rp->stars[starn].syvel = r * SINF(theta); + theta = FLOATRAND(0.0, TWOPI); + rp->stars[starn].szvel = FLOATRAND(0.0, pp->maxsvel) * SINF(theta); + } else { + rp->Xpoints[0][starn].x = (int) rp->x; + rp->Xpoints[0][starn].y = (int) rp->y; + if ((rp->shelltype & COLORCLOUD) && (MI_NPIXELS(mi) > 2)) { + if (NRAND(6) < 1) + rp->stars[starn].color = MI_WHITE_PIXEL(mi); + else + rp->stars[starn].color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + } + if (rp->shelltype & DOUBLECLOUD) { + rp->Xpoints[1][starn].x = (int) rp->x; + rp->Xpoints[1][starn].y = (int) rp->y; + } + r = FLOATRAND(0.0, pp->maxsvel); + theta = FLOATRAND(0.0, TWOPI); + rp->stars[starn].sxvel = r * COSF(theta); + rp->stars[starn].syvel = r * SINF(theta); + } +/* This isn't accurate solid geometry, but it looks OK. */ + } + rp->fuse = INTRAND(MINSFUSE, MAXSFUSE); + } + } + if (rp->state == BURSTINGINAIR) { + burst(mi, pp, rp); + } +} + +static void +shootup(ModeInfo * mi, pyrostruct * pp, rocket * rp) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + int diff, h; + + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (MI_IS_USE3D(mi)) { + diff = (int) GETZDIFF(rp->z); + XFillRectangle(display, window, gc, (int) (rp->x) + diff, (int) (rp->y), + ROCKETW, ROCKETH + 3); + XFillRectangle(display, window, gc, (int) (rp->x) - diff, (int) (rp->y), + ROCKETW, ROCKETH + 3); + } else + XFillRectangle(display, window, gc, (int) (rp->x), (int) (rp->y), + ROCKETW, ROCKETH + 3); + + if (rp->fuse-- <= 0) { + rp->state = BURSTINGINAIR; + return; + } + rp->x += rp->xvel; + rp->y += rp->yvel; + rp->yvel += pp->rockdecel; + if (MI_IS_USE3D(mi)) { + INCZ(rp->z, rp->zvel); + diff = (int) GETZDIFF(rp->z); + h = (int) (ROCKETH + NRAND(4)); + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XFillRectangle(display, window, gc, (int) (rp->x) + diff, (int) (rp->y), + ROCKETW, h); + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + XFillRectangle(display, window, gc, (int) (rp->x) - diff, (int) (rp->y), + ROCKETW, h); + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else { + XSetForeground(display, gc, pp->rockpixel); + XFillRectangle(display, window, gc, (int) (rp->x), (int) (rp->y), + ROCKETW, (int) (ROCKETH + NRAND(4))); + } +} + +static void +burst(ModeInfo * mi, pyrostruct * pp, rocket * rp) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + register int starn; + register int nstars, stype; + register float rx, ry, rz = 0.0, sd; /* Help compiler optimize :-) */ + register float sx, sy, sz; + int diff; + + nstars = rp->nstars; + stype = rp->shelltype; + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + + XFillRectangles(display, window, gc, rp->Xpoints[0], nstars); + if (stype & DOUBLECLOUD) + XFillRectangles(display, window, gc, rp->Xpoints[1], nstars); + if (MI_IS_USE3D(mi)) { + XFillRectangles(display, window, gc, rp->Xpointsleft[0], nstars); + if (stype & DOUBLECLOUD) + XFillRectangles(display, window, gc, rp->Xpointsleft[1], nstars); + } + if (rp->fuse-- <= 0) { + rp->state = SILENT; + pp->nflying--; + return; + } +/* Stagger the stars' decay */ + if (rp->fuse <= 7) { + if ((rp->nstars = nstars = nstars * 90 / 100) == 0) + return; + } + rx = rp->x; + ry = rp->y; + if (MI_IS_USE3D(mi)) { + rz = rp->z; + } + sd = pp->stardecel; + for (starn = 0; starn < nstars; starn++) { + sx = rp->stars[starn].sx += rp->stars[starn].sxvel; + sy = rp->stars[starn].sy += rp->stars[starn].syvel; + rp->stars[starn].syvel += sd; + if (MI_IS_USE3D(mi)) { + if (rz + rp->stars[starn].sz + rp->stars[starn].szvel > MINZVAL) + rp->stars[starn].sz += rp->stars[starn].szvel; + sz = rp->stars[starn].sz; + diff = (int) GETZDIFF(rz + sz); + rp->Xpoints[0][starn].x = (int) (rx + sx + diff); + rp->Xpointsleft[0][starn].x = (int) (rx + sx - diff); + rp->Xpoints[0][starn].y = + rp->Xpointsleft[0][starn].y = (int) (ry + sy); + if (stype & DOUBLECLOUD) { + rp->Xpoints[1][starn].x = (int) (rx + 1.7 * sx) + diff; + rp->Xpointsleft[1][starn].x = (int) (rx + 1.7 * sx) - diff; + rp->Xpoints[1][starn].y = + rp->Xpointsleft[1][starn].y = (int) (ry + 1.7 * sy); + } + } else { + + rp->Xpoints[0][starn].x = (int) (rx + sx); + rp->Xpoints[0][starn].y = (int) (ry + sy); + if (stype & DOUBLECLOUD) { + rp->Xpoints[1][starn].x = (int) (rx + 1.7 * sx); + rp->Xpoints[1][starn].y = (int) (ry + 1.7 * sy); + } + } + } + rp->x = rx + rp->xvel; + rp->y = ry + rp->yvel; + if (MI_IS_USE3D(mi)) { + rp->z = ADDZ(rz, rp->zvel); + } + rp->yvel += sd; + + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XFillRectangles(display, window, gc, rp->Xpoints[0], nstars); + if (stype & DOUBLECLOUD) { + XFillRectangles(display, window, gc, rp->Xpoints[1], nstars); + } + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + XFillRectangles(display, window, gc, rp->Xpointsleft[0], nstars); + if (stype & DOUBLECLOUD) { + XFillRectangles(display, window, gc, rp->Xpointsleft[1], nstars); + } + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else { + + if ((stype & COLORCLOUD) && (MI_NPIXELS(mi) > 2)) { + for (starn = 0; starn < nstars; starn++) { + XSetForeground(display, gc, rp->stars[starn].color); + XFillRectangle(display, window, gc, + rp->Xpoints[0][starn].x, rp->Xpoints[0][starn].y, + rp->Xpoints[0][starn].width, rp->Xpoints[0][starn].height); + } + } else { + XSetForeground(display, gc, rp->color[0]); + XFillRectangles(display, window, gc, rp->Xpoints[0], nstars); + } + if (stype & DOUBLECLOUD) { + XSetForeground(display, gc, rp->color[1]); + XFillRectangles(display, window, gc, rp->Xpoints[1], nstars); + } + } +} + +void +init_pyro(ModeInfo * mi) +{ + pyrostruct *pp; + rocket *rp; + int rockn, starn; + int size = MI_SIZE(mi); + + if (pyros == NULL) { + if ((pyros = (pyrostruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (pyrostruct))) == NULL) + return; + } + pp = &pyros[MI_SCREEN(mi)]; + + pp->width = MI_WIDTH(mi); + pp->height = MI_HEIGHT(mi); + pp->lmargin = pp->width / 16; + pp->rmargin = pp->width - pp->lmargin; + + pp->nrockets = MI_COUNT(mi); + if (pp->nrockets < -MINROCKETS) { + if (pp->rockq) { + (void) free((void *) pp->rockq); + pp->rockq = NULL; + } + pp->nrockets = NRAND(-pp->nrockets - MINROCKETS + 1) + MINROCKETS; + } else if (pp->nrockets < MINROCKETS) + pp->nrockets = MINROCKETS; + if (size < -MINSIZE) + pp->star_size = NRAND(MIN(-size, MAX(MINSIZE, + MIN(pp->width, pp->height) / 64)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + pp->star_size = MAX(MINSIZE, MIN(pp->width, pp->height) / 64); + else + pp->star_size = MINSIZE; + } else + pp->star_size = MIN(size, MAX(MINSIZE, MIN(pp->width, pp->height) / 64)); + orig_p_ignite = P_IGNITE / pp->nrockets; + if (orig_p_ignite <= 0) + orig_p_ignite = 1; + pp->p_ignite = orig_p_ignite; + + if (!pp->rockq) { + pp->rockq = (rocket *) malloc(pp->nrockets * sizeof (rocket)); + } + pp->nflying = pp->fusilcount = 0; + + for (rockn = 0, rp = pp->rockq; rockn < pp->nrockets; rockn++, rp++) { + rp->state = SILENT; + for (starn = 0; starn < MAXSTARS; starn++) { + rp->Xpoints[0][starn].width = rp->Xpoints[0][starn].height = + rp->Xpoints[1][starn].width = rp->Xpoints[1][starn].height = + pp->star_size; + if (MI_IS_USE3D(mi)) { + rp->Xpointsleft[0][starn].width = rp->Xpointsleft[0][starn].height = + rp->Xpointsleft[1][starn].width = rp->Xpointsleft[1][starn].height = + pp->star_size; + } + } + } + + if (MI_NPIXELS(mi) > 3) + pp->rockpixel = MI_PIXEL(mi, ORANGE); + else + pp->rockpixel = MI_WHITE_PIXEL(mi); + +/* Geometry-dependent physical data: */ + pp->maxvelx = (float) (pp->width) * XVELFACTOR; + pp->minvelx = -pp->maxvelx; + pp->minvely = -(float) (pp->height) * MINYVELFACTOR; + pp->maxvely = -(float) (pp->height) * MAXYVELFACTOR; + if (MI_IS_USE3D(mi)) { + pp->maxvelz = (float) (MAXZVALSTART - MINZVALSTART) * ZVELFACTOR; + pp->minvelz = -pp->maxvelz; + } + pp->maxsvel = pp->minvely * SVELFACTOR; + pp->rockdecel = (float) (pp->height) * GRAVFACTOR; + pp->stardecel = pp->rockdecel * BOUYANCY; + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } +} + +/* ARGSUSED */ +void +draw_pyro(ModeInfo * mi) +{ + pyrostruct *pp = &pyros[MI_SCREEN(mi)]; + rocket *rp; + int rockn; + + MI_IS_DRAWN(mi) = True; + + if (just_started || (NRAND(pp->p_ignite) == 0)) { + just_started = False; + if (NRAND(P_FUSILLADE) == 0) { + pp->p_ignite = orig_p_ignite / FUSILFACTOR; + if (pp->p_ignite <= 0) + pp->p_ignite = 1; + pp->fusilcount = INTRAND(FUSILLEN * 9 / 10, FUSILLEN * 11 / 10); + } + ignite(mi, pp); + if (pp->fusilcount > 0) { + if (--pp->fusilcount == 0) + pp->p_ignite = orig_p_ignite; + } + } + for (rockn = pp->nflying, rp = pp->rockq; rockn > 0; rp++) { + if (rp->state != SILENT) { + animate(mi, pp, rp); + rockn--; + } + } +} + +void +release_pyro(ModeInfo * mi) +{ + if (pyros != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + pyrostruct *pp = &pyros[screen]; + + if (pp->rockq != NULL) { + (void) free((void *) pp->rockq); + } + } + (void) free((void *) pyros); + pyros = NULL; + } +} + +void +refresh_pyro(ModeInfo * mi) +{ + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } +} + +#endif /* MODE_pyro */ diff --git a/modes/qix.c b/modes/qix.c new file mode 100644 index 00000000..18019316 --- /dev/null +++ b/modes/qix.c @@ -0,0 +1,397 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* qix --- vector swirl */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)qix.c 4.07 97/11/24 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: + * 03-Mar-98: Combined with Darrick Brown's "geometry". + * 10-May-97: Compatible with xscreensaver + * 29-Jul-90: support for multiple screens. + * made check_bounds_?() a macro. + * fixed initial parameter setup. + * 15-Dec-89: Fix for proper skipping of {White,Black}Pixel() in colors. + * 08-Oct-89: Fixed bug in memory allocation in init_qix(). + * Moved seconds() to an extern. + * 23-Sep-89: Switch to random() and fixed bug w/ less than 4 lines. + * 20-Sep-89: Lint. + * 24-Mar-89: Written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Qix" +#define HACK_INIT init_qix +#define HACK_DRAW draw_qix +#define qix_opts xlockmore_opts +#define DEFAULTS "*delay: 30000 \n" \ + "*count: -5 \n" \ + "*cycles: 32 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_qix + +#define DEF_COMPLETE "False" +#define DEF_KALEID "False" + +static Bool complete; +static Bool kaleid; + +static XrmOptionDescRec opts[] = +{ + {"-complete", ".qix.complete", XrmoptionNoArg, (caddr_t) "on"}, + {"+complete", ".qix.complete", XrmoptionNoArg, (caddr_t) "off"}, + {"-kaleid", ".qix.kaleid", XrmoptionNoArg, (caddr_t) "on"}, + {"+kaleid", ".qix.kaleid", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & complete, "complete", "Complete", DEF_COMPLETE, t_Bool}, + {(caddr_t *) & kaleid, "kaleid", "Kaleid", DEF_KALEID, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+complete", "turn on/off complete morphing graph"}, + {"-/+kaleid", "turn on/off complete kaleidoscope"} +}; + +ModeSpecOpt qix_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct qix_description = +{"qix", "init_qix", "draw_qix", "release_qix", + "refresh_qix", "init_qix", NULL, &qix_opts, + 30000, -5, 32, 1, 64, 1.0, "", + "Shows spinning lines a la Qix(tm)", 0, NULL}; + +#endif + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 +#define MINPOINTS 2 +/*- + * remember when complete: the number of lines to be drawn is 1+2+3+...+N or + * N(N+1)/2 + */ + +/* I forget now, did Newton discover this as a boy? */ +#define NEWT(n) (n*(n+1)/2) + +typedef struct { + int pix; + int first, last; + XPoint *delta, *position; + int npoints; + int offset; + int max_delta; + int width, height, mid, midx, midy; + int nlines, linecount; + int redrawing, redrawpos; + XPoint *lineq; + Bool complete; + Bool kaleid; +} qixstruct; + +static qixstruct *qixs = NULL; + +#define check_bounds(qp, val, del, min, max) \ +{ \ + if ((val) < (min)) { \ + *(del) = NRAND((qp)->max_delta) + (qp)->offset; \ + } else if ((val) >= (max)) { \ + *(del) = -(NRAND((qp)->max_delta)) - (qp)->offset; \ + } \ +} + +void +init_qix(ModeInfo * mi) +{ + qixstruct *qp; + int i; + + if (qixs == NULL) { + if ((qixs = (qixstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (qixstruct))) == NULL) + return; + } + qp = &qixs[MI_SCREEN(mi)]; + + qp->width = MI_WIDTH(mi); + qp->height = MI_HEIGHT(mi); + qp->mid = MAX(qp->width, qp->height) / 2; + qp->midx = qp->width / 2; + qp->midy = qp->height / 2; + qp->max_delta = 16; + qp->redrawing = 0; + qp->linecount = 0; + + if (qp->width < 100) { /* icon window */ + qp->max_delta /= 4; + } + qp->offset = qp->max_delta / 3; + qp->last = 0; + if (MI_NPIXELS(mi) > 2) + qp->pix = NRAND(MI_NPIXELS(mi)); + + qp->npoints = MI_COUNT(mi); + if (qp->npoints < -MINPOINTS) + qp->npoints = NRAND(qp->npoints - MINPOINTS + 1) + MINPOINTS; + /* Absolute minimum */ + if (qp->npoints < MINPOINTS) + qp->npoints = MINPOINTS; + + if (MI_IS_FULLRANDOM(mi)) + qp->complete = (Bool) (LRAND() & 1); + else + qp->complete = complete; + + if (qp->complete) { + qp->kaleid = False; + } else { + if (MI_IS_FULLRANDOM(mi)) + qp->kaleid = (Bool) (LRAND() & 1); + else + qp->kaleid = kaleid; + } + if (qp->delta) + (void) free((void *) qp->delta); + if (qp->position) + (void) free((void *) qp->position); + + qp->delta = (XPoint *) malloc(qp->npoints * sizeof (XPoint)); + qp->position = (XPoint *) malloc(qp->npoints * sizeof (XPoint)); + for (i = 0; i < qp->npoints; i++) { + qp->delta[i].x = NRAND(qp->max_delta) + qp->offset; + qp->delta[i].y = NRAND(qp->max_delta) + qp->offset; + qp->position[i].x = NRAND(qp->width); + qp->position[i].y = NRAND(qp->height); + } + + qp->nlines = (qp->npoints == 2) ? (MI_CYCLES(mi) + 1) * 2 : + ((MI_CYCLES(mi) + qp->npoints) / qp->npoints) * qp->npoints; + if (qp->complete) { + qp->max_delta /= 4; + qp->nlines = qp->npoints; + } + if (qp->kaleid) { + qp->nlines = MI_CYCLES(mi) * 16; /* Fudge it so its compatible */ + } + if (qp->lineq) { + (void) free((void *) qp->lineq); + qp->lineq = NULL; + } + if (!qp->kaleid) { + qp->lineq = (XPoint *) malloc(qp->nlines * sizeof (XPoint)); + for (i = 0; i < qp->nlines; i++) + qp->lineq[i].x = qp->lineq[i].y = -1; /* move initial point off screen */ + } + MI_CLEARWINDOW(mi); +} + +void +draw_qix(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + qixstruct *qp = &qixs[MI_SCREEN(mi)]; + int i, j, k, l; + + qp->first = (qp->last + qp->npoints) % qp->nlines; + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < qp->npoints; i++) { + qp->position[i].x += qp->delta[i].x; + qp->position[i].y += qp->delta[i].y; + if (NRAND(20) < 1) { + check_bounds(qp, qp->position[i].x, &qp->delta[i].x, + qp->width / 3, 2 * qp->width / 3); + } else { + check_bounds(qp, qp->position[i].x, &qp->delta[i].x, 0, qp->width); + } + if (NRAND(20) < 1) { + check_bounds(qp, qp->position[i].y, &qp->delta[i].y, + qp->height / 3, 2 * qp->height / 3); + } else { + check_bounds(qp, qp->position[i].y, &qp->delta[i].y, 0, qp->height); + } + } + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (qp->complete && qp->npoints > 3) { + for (i = 0; i < qp->npoints - 1; i++) + for (j = i + 1; j < qp->npoints; j++) + XDrawLine(display, MI_WINDOW(mi), gc, + qp->lineq[qp->first + i].x, qp->lineq[qp->first + i].y, + qp->lineq[qp->first + j].x, qp->lineq[qp->first + j].y); + } else if (!qp->kaleid) { + for (i = 1; i < qp->npoints + ((qp->npoints == 2) ? -1 : 0); i++) + XDrawLine(display, MI_WINDOW(mi), gc, + qp->lineq[qp->first + i - 1].x, qp->lineq[qp->first + i - 1].y, + qp->lineq[qp->first + i].x, qp->lineq[qp->first + i].y); + XDrawLine(display, MI_WINDOW(mi), gc, + qp->lineq[qp->first].x, qp->lineq[qp->first].y, + qp->lineq[qp->first + qp->npoints - 1].x, + qp->lineq[qp->first + qp->npoints - 1].y); + } + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, qp->pix)); + if (++qp->pix >= MI_NPIXELS(mi)) + qp->pix = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + if (qp->complete && qp->npoints > 3) { + for (i = 0; i < qp->npoints - 1; i++) + for (j = i + 1; j < qp->npoints; j++) + XDrawLine(display, MI_WINDOW(mi), gc, + qp->position[i].x, qp->position[i].y, + qp->position[j].x, qp->position[j].y); + } else if (qp->kaleid) { + for (i = 0; i < qp->npoints; i++) { + XSegment segs[8]; + XPoint small[2]; + + j = (i + 1) % qp->npoints; + small[0].x = ABS(qp->position[i].x - qp->mid); + small[0].y = ABS(qp->position[i].y - qp->mid); + small[1].x = ABS(qp->position[j].x - qp->mid); + small[1].y = ABS(qp->position[j].y - qp->mid); + segs[0].x1 = qp->midx + small[0].x; + segs[0].y1 = qp->midy + small[0].y; + segs[0].x2 = qp->midx + small[1].x; + segs[0].y2 = qp->midy + small[1].y; + segs[1].x1 = qp->midx - small[0].x; + segs[1].y1 = qp->midy + small[0].y; + segs[1].x2 = qp->midx - small[1].x; + segs[1].y2 = qp->midy + small[1].y; + segs[2].x1 = qp->midx - small[0].x; + segs[2].y1 = qp->midy - small[0].y; + segs[2].x2 = qp->midx - small[1].x; + segs[2].y2 = qp->midy - small[1].y; + segs[3].x1 = qp->midx + small[0].x; + segs[3].y1 = qp->midy - small[0].y; + segs[3].x2 = qp->midx + small[1].x; + segs[3].y2 = qp->midy - small[1].y; + segs[4].x1 = qp->midx + small[0].y; + segs[4].y1 = qp->midy + small[0].x; + segs[4].x2 = qp->midx + small[1].y; + segs[4].y2 = qp->midy + small[1].x; + segs[5].x1 = qp->midx + small[0].y; + segs[5].y1 = qp->midy - small[0].x; + segs[5].x2 = qp->midx + small[1].y; + segs[5].y2 = qp->midy - small[1].x; + segs[6].x1 = qp->midx - small[0].y; + segs[6].y1 = qp->midy - small[0].x; + segs[6].x2 = qp->midx - small[1].y; + segs[6].y2 = qp->midy - small[1].x; + segs[7].x1 = qp->midx - small[0].y; + segs[7].y1 = qp->midy + small[0].x; + segs[7].x2 = qp->midx - small[1].y; + segs[7].y2 = qp->midy + small[1].x; + XDrawSegments(display, MI_WINDOW(mi), gc, segs, 8); + if (qp->npoints == 2) /* do not repeat drawing the same line */ + break; + } + if (++qp->linecount >= qp->nlines) { + qp->linecount = 0; + MI_CLEARWINDOW(mi); + } + } else { + for (i = 1; i < qp->npoints + ((qp->npoints == 2) ? -1 : 0); i++) + XDrawLine(display, MI_WINDOW(mi), gc, + qp->position[i - 1].x, qp->position[i - 1].y, + qp->position[i].x, qp->position[i].y); + XDrawLine(display, MI_WINDOW(mi), gc, qp->position[0].x, qp->position[0].y, + qp->position[qp->npoints - 1].x, qp->position[qp->npoints - 1].y); + } + + if (!qp->kaleid) + for (i = 0; i < qp->npoints; i++) { + qp->lineq[qp->last].x = qp->position[i].x; + qp->lineq[qp->last].y = qp->position[i].y; + qp->last++; + if (qp->last >= qp->nlines) + qp->last = 0; + } + if (qp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + j = (qp->first - qp->redrawpos + qp->nlines - qp->npoints) % qp->nlines; + if (qp->complete && qp->npoints > 3) { + for (k = 0; k < qp->npoints - 1; k++) + for (l = k + 1; l < qp->npoints; l++) + XDrawLine(display, MI_WINDOW(mi), gc, + qp->lineq[j + k].x, qp->lineq[j + k].y, + qp->lineq[j + l].x, qp->lineq[j + l].y); + } else if (!qp->kaleid) { + for (k = 1; k < qp->npoints + ((qp->npoints == 2) ? -1 : 0); k++) + XDrawLine(display, MI_WINDOW(mi), gc, + qp->lineq[j + k - 1].x, qp->lineq[j + k - 1].y, + qp->lineq[j + k].x, qp->lineq[j + k].y); + XDrawLine(display, MI_WINDOW(mi), gc, + qp->lineq[j].x, qp->lineq[j].y, + qp->lineq[j + qp->npoints - 1].x, qp->lineq[j + qp->npoints - 1].y); + } + qp->redrawpos += qp->npoints; + if (qp->redrawpos >= qp->nlines - qp->npoints) { + qp->redrawing = 0; + break; + } + } + } +} + +void +release_qix(ModeInfo * mi) +{ + if (qixs != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + qixstruct *qp = &qixs[screen]; + + if (qp->lineq) + (void) free((void *) qp->lineq); + if (qp->delta) + (void) free((void *) qp->delta); + if (qp->position) + (void) free((void *) qp->position); + } + (void) free((void *) qixs); + qixs = NULL; + } +} + +void +refresh_qix(ModeInfo * mi) +{ + qixstruct *qp = &qixs[MI_SCREEN(mi)]; + + MI_CLEARWINDOW(mi); + qp->redrawing = 1; + qp->redrawpos = 0; +} + +#endif /* MODE_qix */ diff --git a/modes/random.c b/modes/random.c new file mode 100644 index 00000000..f52fd0b4 --- /dev/null +++ b/modes/random.c @@ -0,0 +1,933 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* random --- run random modes for a certain duration */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)random.c 4.07 97/11/24 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: + * 10-May-97: Made more compatible with xscreensaver :) + * 18-Mar-96: Ron Hitchens + * Re-coded for the ModeInfo calling scheme. Added the + * change hook. Get ready for 3.8 release. + * 23-Dec-95: Ron Hitchens + * Re-coded pickMode() to keep track of the modes, so + * that all modes are tried before there are any repeats. + * Also prevent a mode from being picked twice in a row + * (could happen as first pick after refreshing the list). + * 04-Sep-95: Written by Heath A. Kehoe . + * + */ + +#ifdef STANDALONE +#define PROGCLASS "Random" +#define HACK_INIT init_random +#define HACK_DRAW draw_random +#define random_opts xlockmore_opts +#define DEFAULTS "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#include "util.h" +#endif /* STANDALONE */ + +#define DEF_DURATION "60" /* 0 == infinite duration */ +#define DEF_MODELIST "" +#define DEF_SEQUENTIAL "False" +#define DEF_FULLRANDOM "True" + +static int duration; +static char *modelist; +static Bool sequential; +extern Bool fullrandom; + +static XrmOptionDescRec opts[] = +{ + {"-duration", ".random.duration", XrmoptionSepArg, (caddr_t) NULL}, + {"-modelist", ".random.modelist", XrmoptionSepArg, (caddr_t) NULL}, + {"-sequential", ".random.sequential", XrmoptionNoArg, (caddr_t) "on"}, + {"+sequential", ".random.sequential", XrmoptionNoArg, (caddr_t) "off"}, + {"-sequential", ".random.sequential", XrmoptionNoArg, (caddr_t) "on"}, + {"+sequential", ".random.sequential", XrmoptionNoArg, (caddr_t) "off"}, + {"-fullrandom", ".random.fullrandom", XrmoptionNoArg, (caddr_t) "on"}, + {"+fullrandom", ".random.fullrandom", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & duration, "duration", "Duration", DEF_DURATION, t_Int}, + {(caddr_t *) & modelist, "modelist", "Modelist", DEF_MODELIST, t_String}, + {(caddr_t *) & sequential, "sequential", "Sequential", DEF_SEQUENTIAL, t_Bool}, +{(caddr_t *) & fullrandom, "fullrandom", "FullRandom", DEF_FULLRANDOM, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-duration num", "how long a mode runs before changing to another"}, + {"-modelist string", "list of modes to randomly choose from"}, + {"-/+sequential", "turn on/off picking of modes sequentially"}, + {"-/+fullrandom", "turn on/off full random choice of mode-options"} +}; + +ModeSpecOpt random_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct random_description = +{"random", "init_random", "draw_random", "release_random", + "refresh_random", "change_random", NULL, &random_opts, + 1, 1, 1, 1, 64, 1.0, "", +#ifdef USE_BOMB + "Shows a random mode from above except blank and bomb", 0, NULL}; + +#else + "Shows a random mode from above except blank", 0, NULL}; + +#endif + +#endif + +#ifdef USE_BOMB +#define NUMSPECIAL 3 /* bomb, blank, random */ +#else +#define NUMSPECIAL 2 /* blank, random */ +#endif + +#define GC_SAVE_VALUES (GCFunction|GCLineWidth|GCLineStyle|GCCapStyle|GCJoinStyle|GCGraphicsExposures|GCFont|GCSubwindowMode) + +extern int startscreen; +extern int delay; +extern int count; +extern int cycles; +extern int size; +extern int ncolors; +extern float saturation; +extern char *bitmap; + +#define MAXMODECHARS 14 + +#ifdef USE_GL +static char gl_modes[][MAXMODECHARS] = +{ +#ifdef MODE_atlantis + "atlantis", +#endif +#ifdef MODE_bubble3d + "bubble3d", +#endif +#ifdef MODE_cage + "cage", +#endif +#ifdef MODE_gears + "gears", +#endif +#ifdef MODE_invert + "invert", +#endif +#ifdef MODE_lament + "lament", +#endif +#ifdef MODE_moebius + "moebius", +#endif +#ifdef MODE_morph3d + "morph3d", +#endif +#ifdef MODE_pipes + "pipes", +#endif +#ifdef MODE_rubik + "rubik", +#endif +#ifdef MODE_sproingies + "sproingies", +#endif +#ifdef MODE_stairs + "stairs", +#endif +#ifdef MODE_superquadrics + "superquadrics", +#endif +#ifdef MODE_text3d + "text3d" +#endif +}; + +#define NUMGL (int) (sizeof (gl_modes) / sizeof (gl_modes[0])) +#else +static char gl_modes[][MAXMODECHARS] = +{""}; + +#define NUMGL 0 +#endif + +static char xpm_modes[][MAXMODECHARS] = +{ +#ifdef MODE_bat + "bat", +#endif +#ifdef MODE_cartoon + "cartoon", +#endif +#ifdef MODE_image + "image", +#endif +#ifdef MODE_flag + "flag", +#endif +#ifdef MODE_life + "life", +#endif +#ifdef MODE_life1d + "life1d", +#endif +#ifdef MODE_maze + "maze", +#endif +#ifdef MODE_puzzle + "puzzle" +#endif +}; + +#define NUMXPM (int) (sizeof (xpm_modes) / sizeof (xpm_modes[0])) + +static char write_modes[][MAXMODECHARS] = +{ +#ifdef MODE_crystal + "crystal", +#endif +#ifdef MODE_mandelbrot + "mandelbrot", +#endif +#ifdef MODE_starfish + "starfish", +#endif +#ifdef MODE_swirl + "swirl", +#endif +#ifdef MODE_tetris + "tetris", +#endif +#ifdef MODE_tube + "tube" +#endif + /* XPM modes are usually writable too ... */ +}; + +#define NUMWRITE (int) (sizeof (write_modes) / sizeof (write_modes[0])) + +static char nice_modes[][MAXMODECHARS] = +{ +#ifdef MODE_blot + "blot", +#endif +#ifdef MODE_bouboule + "bouboule", +#endif +#ifdef MODE_bug + "bug", +#endif +#ifdef MODE_clock + "clock", +#endif +#ifdef MODE_crystal + "crystal", +#endif +#ifdef MODE_daisy + "daisy", +#endif +#ifdef MODE_dclock + "dclock", +#endif +#ifdef MODE_demon + "demon", +#endif +#ifdef MODE_deco + "deco", +#endif +#ifdef MODE_eyes + "eyes", +#endif +#ifdef MODE_fadeplot + "fadeplot", +#endif +#ifdef MODE_flag + "flag", +#endif +#ifdef MODE_flame + "flame", +#endif +#ifdef MODE_grav + "grav", +#endif +#ifdef MODE_helix + "helix", +#endif +#ifdef MODE_hyper + "hyper", +#endif +#ifdef MODE_ico + "ico", +#endif +#ifdef MODE_image + "image", +#endif +#ifdef MODE_kaleid + "kaleid", +#endif +#ifdef MODE_laser + "laser", +#endif +#ifdef MODE_life + "life", +#endif +#ifdef MODE_life1d + "life1d", +#endif +#ifdef MODE_life3d + "life3d", +#endif +#ifdef MODE_lightning + "lightning", +#endif +#ifdef MODE_lisa + "lisa", +#endif +#ifdef MODE_lissie + "lissie", +#endif +#ifdef MODE_loop + "loop", +#endif +#ifdef MODE_marquee + "marquee", +#endif +#ifdef MODE_nose + "nose", +#endif +#ifdef MODE_penrose + "penrose", +#endif +#ifdef MODE_petal + "petal", +#endif +#ifdef MODE_puzzle + "puzzle", +#endif +#ifdef MODE_pyro + "pyro", +#endif +#ifdef MODE_qix + "qix", +#endif +#ifdef MODE_roll + "roll", +#endif +#ifdef MODE_rotor + "rotor", +#endif +#ifdef MODE_shape + "shape", +#endif +#ifdef MODE_sierpinski + "sierpinski", +#endif +#ifdef MODE_spline + "spline", +#endif +#ifdef MODE_star + "star", +#endif +#ifdef MODE_swarm + "swarm", +#endif +#ifdef MODE_triangle + "triangle", +#endif +#ifdef MODE_tube + "tube", +#endif +#ifdef MODE_turtle + "turtle", +#endif +#ifdef MODE_vines + "vines", +#endif +#ifdef MODE_voters + "voters", +#endif +#ifdef MODE_wire + "wire", +#endif +#ifdef MODE_world + "world", +#endif +#ifdef MODE_worm + "worm", +#endif +#ifdef MODE_xjack + "xjack" +#endif +}; + +#define NUMNICE (int) (sizeof (nice_modes) / sizeof (nice_modes[0])) + +static char use3d_modes[][MAXMODECHARS] = +{ +#ifdef MODE_bouboule + "bouboule", +#endif +#ifdef MODE_hyper + "hyper", +#endif +#ifdef MODE_pyro + "pyro", +#endif +#ifdef MODE_star + "star", +#endif +#ifdef MODE_worm + "worm" +#endif +}; + +#define NUMUSE3D (int) (sizeof (use3d_modes) / sizeof (use3d_modes[0])) + +static char mouse_modes[][MAXMODECHARS] = +{ +#ifdef MODE_eyes + "eyes", +#endif +#ifdef MODE_julia + "julia", +#endif +#ifdef MODE_swarm + "swarm" +#endif +}; + +#define NUMMOUSE (int) (sizeof (mouse_modes) / sizeof (mouse_modes[0])) + +static char automata_modes[][MAXMODECHARS] = +{ +#ifdef MODE_ant + "ant", +#endif +#ifdef MODE_bug + "bug", +#endif +#ifdef MODE_demon + "demon", +#endif +#ifdef MODE_dilemma + "dilemma", +#endif +#ifdef MODE_life + "life", +#endif +#ifdef MODE_life1d + "life1d", +#endif +#ifdef MODE_life3d + "life3d", +#endif +#ifdef MODE_loop + "loop", +#endif +#ifdef MODE_voters + "voters", +#endif +#ifdef MODE_wator + "wator", +#endif +#ifdef MODE_wire + "wire" +#endif +}; + +#define NUMAUTOMATA (int) (sizeof (automata_modes) / sizeof (automata_modes[0])) + +static char fractal_modes[][MAXMODECHARS] = +{ +#ifdef MODE_coral + "coral", +#endif +#ifdef MODE_discrete + "discrete", +#endif +#ifdef MODE_drift + "drift", +#endif +#ifdef MODE_flame + "flame", +#endif +#ifdef MODE_flow + "flow", +#endif +#ifdef MODE_forest + "forest", +#endif +#ifdef MODE_julia + "julia", +#endif +#ifdef MODE_hop + "hop", +#endif +#ifdef MODE_ifs + "ifs", +#endif +#ifdef MODE_lightning + "lightning", +#endif +#ifdef MODE_mandelbrot + "mandelbrot", +#endif +#ifdef MODE_mountain + "mountain", +#endif +#ifdef MODE_sierpinski + "sierpinski", +#endif +#ifdef MODE_strange + "strange", +#endif +#ifdef MODE_thornbird + "thornbird", +#endif +#ifdef MODE_triangle + "triangle", +#endif +#ifdef MODE_turtle + "turtle", +#endif +#ifdef MODE_vines + "vines" +#endif +}; + +#define NUMFRACTAL (int) (sizeof (fractal_modes) / sizeof (fractal_modes[0])) + + +static char geometry_modes[][MAXMODECHARS] = +{ +#ifdef MODE_braid + "braid", +#endif +#ifdef MODE_fadeplot + "fadeplot", +#endif +#ifdef MODE_helix + "helix", +#endif +#ifdef MODE_hyper + "hyper", +#endif +#ifdef MODE_ico + "ico", +#endif +#ifdef MODE_kaleid + "kaleid", +#endif +#ifdef MODE_laser + "laser", +#endif +#ifdef MODE_lisa + "lisa", +#endif +#ifdef MODE_lissie + "lissie", +#endif +#ifdef MODE_penrose + "penrose", +#endif +#ifdef MODE_petal + "petal", +#endif +#ifdef MODE_qix + "qix", +#endif +#ifdef MODE_shape + "shape", +#endif +#ifdef MODE_sphere + "sphere", +#endif +#ifdef MODE_spiral + "spiral", +#endif +#ifdef MODE_spline + "spline" +#endif +}; + +#define NUMGEOMETRY (int) (sizeof (geometry_modes) / sizeof (geometry_modes[0])) + +static char space_modes[][MAXMODECHARS] = +{ +#ifdef MODE_bouboule + "bouboule", +#endif +#ifdef MODE_galaxy + "galaxy", +#endif +#ifdef MODE_grav + "grav", +#endif +#ifdef MODE_star + "star", +#endif +#ifdef MODE_world + "world" +#endif +}; + +#define NUMSPACE (int) (sizeof (space_modes) / sizeof (space_modes[0])) + +typedef struct { + XGCValues gcvs; + int fix; +} randomstruct; + +static int currentmode = -1; +static int previousmode = -1; +static unsigned long starttime; +static int *modes; +static int nmodes; +static Bool change_now = False; + +static randomstruct *randoms; + +static int +pickMode(void) +{ + static int *mode_indexes = NULL; + static int mode_count = 0; + static int last_mode = -1, last_index = -1; + int mode, i; + + if (mode_indexes == NULL) { + if ((mode_indexes = (int *) calloc(nmodes, sizeof (int))) == + NULL) { + if (sequential) + return modes[0]; + else + return modes[NRAND(nmodes)]; + } + } + if (mode_count == 0) { + for (i = 0; i < nmodes; i++) { + mode_indexes[i] = modes[i]; + } + mode_count = nmodes; + } + if (mode_count == 1) { + /* only one left, let's use that one */ + last_index = -1; + return (last_mode = mode_indexes[--mode_count]); + } else { + /* pick a random slot in the list, check for last */ + if (sequential) { + last_index = i = (last_index + 1) % nmodes; + } else + while (mode_indexes[i = NRAND(mode_count)] == last_mode); + } + + mode = mode_indexes[i]; /* copy out chosen mode */ + /* move mode at end of list to slot vacated by chosen mode, dec count */ + mode_indexes[i] = mode_indexes[--mode_count]; + return (last_mode = mode); /* remember last mode picked */ +} + +static +char * +strpmtok(int *sign, char *str) +{ + static int nextsign = 0; + static char *loc; + char *p, *r; + + if (str) + loc = str; + if (nextsign) { + *sign = nextsign; + nextsign = 0; + } + p = loc - 1; + for (;;) { + switch (*++p) { + case '+': + *sign = 1; + continue; + case '-': + *sign = -1; + continue; + case ' ': + case ',': + case '\t': + case '\n': + continue; + case 0: + loc = p; + return NULL; + } + break; + } + r = p; + + for (;;) { + switch (*++p) { + case '+': + nextsign = 1; + break; + case '-': + nextsign = -1; + break; + case ' ': + case ',': + case '\t': + case '\n': + case 0: + break; + default: + continue; + } + break; + } + if (*p) { + *p = 0; + loc = p + 1; + } else + loc = p; + + return r; +} + +static void +parsemodelist(ModeInfo * mi) +{ + int i, sign = 1, j; + char *p; + + modes = (int *) calloc(numprocs - 1, sizeof (int)); + + p = strpmtok(&sign, (modelist) ? modelist : ""); + + while (p) { + if (!strcmp(p, "all")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allgl")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMGL; j++) + if (!strcmp(gl_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allxpm")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMXPM; j++) + if (!strcmp(xpm_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allwrite")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMWRITE; j++) + if (!strcmp(write_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allnice")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMNICE; j++) + if (!strcmp(nice_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "all3d")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMUSE3D; j++) + if (!strcmp(use3d_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allmouse")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMMOUSE; j++) + if (!strcmp(mouse_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allautomata")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMAUTOMATA; j++) + if (!strcmp(automata_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allfractal")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMFRACTAL; j++) + if (!strcmp(fractal_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allgeometry")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMGEOMETRY; j++) + if (!strcmp(geometry_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else if (!strcmp(p, "allspace")) { + for (i = 0; i < numprocs - NUMSPECIAL; i++) + for (j = 0; j < NUMSPACE; j++) + if (!strcmp(space_modes[j], LockProcs[i].cmdline_arg)) + modes[i] = (sign > 0); + } else { + for (i = 0; i < numprocs - 1; i++) + if (!strcmp(p, LockProcs[i].cmdline_arg)) + break; + if (i < numprocs - 1) + modes[i] = (sign > 0); + else + (void) fprintf(stderr, "unrecognized mode \"%s\"\n", p); + } + p = strpmtok(&sign, (char *) NULL); + } + + nmodes = 0; + for (i = 0; i < numprocs - 1; i++) + if (modes[i]) + modes[nmodes++] = i; + if (!nmodes) { /* empty list */ + for (i = 0; i < numprocs - NUMSPECIAL; i++) + modes[i] = i; + nmodes = i; + } + if (MI_IS_DEBUG(mi)) { + (void) fprintf(stderr, "%d mode%s: ", nmodes, ((nmodes == 1) ? "" : "s")); + for (i = 0; i < nmodes; i++) + (void) fprintf(stderr, "%d ", modes[i]); + (void) fprintf(stderr, "\n"); + } +} + +static +void +setMode(ModeInfo * mi, int newmode) +{ + randomstruct *rp = &randoms[MI_SCREEN(mi)]; + int i; + + previousmode = currentmode; + currentmode = newmode; + +/* FIX THIS GLOBAL ACCESS */ + delay = MI_DELAY(mi) = LockProcs[currentmode].def_delay; + count = MI_COUNT(mi) = LockProcs[currentmode].def_count; + cycles = MI_CYCLES(mi) = LockProcs[currentmode].def_cycles; + size = MI_SIZE(mi) = LockProcs[currentmode].def_size; + ncolors = MI_NCOLORS(mi) = LockProcs[currentmode].def_ncolors; + saturation = MI_SATURATION(mi) = LockProcs[currentmode].def_saturation; + bitmap = MI_BITMAP(mi) = LockProcs[currentmode].def_bitmap; + + for (i = startscreen; i < MI_NUM_SCREENS(mi); i++) { + + XChangeGC(MI_DISPLAY(mi), MI_GC(mi), GC_SAVE_VALUES, + &(rp->gcvs)); /* Not sure if this is right for multiscreens */ + randoms[i].fix = True; + } + if (MI_IS_VERBOSE(mi)) + (void) fprintf(stderr, "mode: %s\n", LockProcs[currentmode].cmdline_arg); +} + +void +init_random(ModeInfo * mi) +{ + randomstruct *rp; + int i; + + if (randoms == NULL) { + if ((randoms = (randomstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (randomstruct))) == NULL) + return; + } + rp = &randoms[MI_SCREEN(mi)]; + + MI_SET_FLAG_STATE(mi, WI_FLAG_FULLRANDOM, fullrandom); + if (currentmode < 0) { + parsemodelist(mi); + + for (i = startscreen; i < MI_NUM_SCREENS(mi); i++) { + (void) XGetGCValues(MI_DISPLAY(mi), MI_GC(mi), + GC_SAVE_VALUES, &(rp->gcvs)); + } + setMode(mi, pickMode()); + starttime = seconds(); + if (duration < 0) + duration = 0; + } + if (rp->fix) { + fixColormap(MI_DISPLAY(mi), MI_WINDOW(mi), MI_SCREEN(mi), MI_NCOLORS(mi), + MI_SATURATION(mi), MI_IS_MONO(mi), MI_IS_INSTALL(mi), + MI_IS_INROOT(mi), MI_IS_INWINDOW(mi), MI_IS_VERBOSE(mi)); + rp->fix = False; + } + call_init_hook(&LockProcs[currentmode], mi); +} + +void +draw_random(ModeInfo * mi) +{ + int scrn = MI_SCREEN(mi); + randomstruct *rp = &randoms[scrn]; + int newmode; + unsigned long now = seconds(); + int has_run = (duration == 0) ? 0 : (int) (now - starttime); + static int do_init = 0; + + if ((scrn == startscreen) && do_init) { + do_init = 0; + } + if ((scrn == startscreen) && (change_now || (has_run > duration))) { + newmode = pickMode(); + + MI_CLEARWINDOW(mi); + + setMode(mi, newmode); + starttime = now; + do_init = 1; + change_now = False; + } + if (rp->fix) { + fixColormap(MI_DISPLAY(mi), MI_WINDOW(mi), MI_SCREEN(mi), MI_NCOLORS(mi), + MI_SATURATION(mi), MI_IS_MONO(mi), MI_IS_INSTALL(mi), + MI_IS_INROOT(mi), MI_IS_INWINDOW(mi), MI_IS_VERBOSE(mi)); + rp->fix = False; + } + if (do_init) { + call_init_hook(&LockProcs[currentmode], mi); + } + call_callback_hook(&LockProcs[currentmode], mi); +} + +void +refresh_random(ModeInfo * mi) +{ + call_refresh_hook(&LockProcs[currentmode], mi); +} + +void +change_random(ModeInfo * mi) +{ + if (MI_SCREEN(mi) == startscreen) + change_now = True; /* force a change on next draw callback */ + + draw_random(mi); +} + +void +release_random(ModeInfo * mi) +{ + if (previousmode >= 0 && previousmode != currentmode) + call_release_hook(&LockProcs[previousmode], mi); + previousmode = currentmode; +} diff --git a/modes/roll.c b/modes/roll.c new file mode 100644 index 00000000..23f24030 --- /dev/null +++ b/modes/roll.c @@ -0,0 +1,312 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* roll --- rolling ball of points */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)roll.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by Charles Vidal + * http://www.chez.com/vidalc + * + * 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 + * 1995: Written. + */ + +#ifdef STANDALONE +#define PROGCLASS "Roll" +#define HACK_INIT init_roll +#define HACK_DRAW draw_roll +#define roll_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: 25 \n" \ + "*size: -64 \n" \ + "*ncolors: 200 \n" +#define BRIGHT_COLORS +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_roll + +ModeSpecOpt roll_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct roll_description = +{"roll", "init_roll", "draw_roll", "release_roll", + "refresh_roll", "init_roll", NULL, &roll_opts, + 100000, 25, 1, -64, 64, 0.6, "", + "Shows a rolling ball", 0, NULL}; + +#endif + +#define MINPTS 1 +#define MINSIZE 8 +#define FACTOR 8.0 +#define SPEED 25.0 + +typedef struct { + float t, u, v; + float t1, u1, v1; +} ptsstruct; +typedef struct { + ptsstruct *pts; + XPoint *p; + int maxpts, npts; + float alpha, theta, phi, r; + XPoint sphere, direction; + int color; + int width, height; +} rollstruct; + +static rollstruct *rolls = NULL; + +static void +createsphere(rollstruct * rp, int n1, int n2) +{ + double i, j; + int n = 0; + + for (i = 0.0; i < FACTOR * M_PI; i += (FACTOR * M_PI) / n1) + for (j = 0.0; j < FACTOR * M_PI; j += (FACTOR * M_PI) / n2) { + rp->pts[n].t1 = rp->r * COSF(i) * COSF(j); + rp->pts[n].u1 = rp->r * COSF(i) * SINF(j); + rp->pts[n].v1 = rp->r * SINF(i); + n++; + } +} + +static void +rotation3d(rollstruct * rp) +{ + float c1, c2, c3, c4, c5, c6, c7, c8, c9, x, y, z; + float sintheta, costheta; + float sinphi, cosphi; + float sinalpha, cosalpha; + int i; + + sintheta = SINF(rp->theta); + costheta = COSF(rp->theta); + sinphi = SINF(rp->phi); + cosphi = COSF(rp->phi); + sinalpha = SINF(rp->alpha); + cosalpha = COSF(rp->alpha); + + c1 = cosphi * costheta; + c2 = sinphi * costheta; + c3 = -sintheta; + + c4 = cosphi * sintheta * sinalpha - sinphi * cosalpha; + c5 = sinphi * sintheta * sinalpha + cosphi * cosalpha; + c6 = costheta * sinalpha; + + c7 = cosphi * sintheta * cosalpha + sinphi * sinalpha; + c8 = sinphi * sintheta * cosalpha - cosphi * sinalpha; + c9 = costheta * cosalpha; + for (i = 0; i < rp->maxpts; i++) { + x = rp->pts[i].t; + y = rp->pts[i].u; + z = rp->pts[i].v; + rp->pts[i].t = c1 * x + c2 * y + c3 * z; + rp->pts[i].u = c4 * x + c5 * y + c6 * z; + rp->pts[i].v = c7 * x + c8 * y + c9 * z; + } +} + +static void +project(rollstruct * rp) +{ + int i; + + for (i = 0; i < rp->maxpts; i++) { + rp->p[i].x = (short) (2 * rp->pts[i].t); + rp->p[i].y = (short) (2 * rp->pts[i].u); + } +} + +void +init_roll(ModeInfo * mi) +{ + rollstruct *rp; + int i; + int size = MI_SIZE(mi); + double ang; + + if (rolls == NULL) { + if ((rolls = (rollstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (rollstruct))) == NULL) + return; + } + rp = &rolls[MI_SCREEN(mi)]; + + ang = (double) NRAND(75) + 7.5; + rp->direction.x = (short) ((2 * (LRAND() & 1)) - 1) * (int) + (SPEED * SINF(ang * M_PI / 180.0)); + rp->direction.y = (short) ((2 * (LRAND() & 1)) - 1) * (int) + (SPEED * COSF(ang * M_PI / 180.0)); + rp->width = MI_WIDTH(mi); + rp->height = MI_HEIGHT(mi); + if (size < -MINSIZE) + rp->r = NRAND(MIN(-size, MAX(MINSIZE, + MIN(rp->width, rp->height) / 4)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + rp->r = MAX(MINSIZE, MIN(rp->width, rp->height) / 4); + else + rp->r = MINSIZE; + } else + rp->r = MIN(size, MAX(MINSIZE, + MIN(rp->width, rp->height) / 4)); + rp->sphere.x = NRAND(MAX(1, rp->width - 4 * (int) rp->r)) + + 2 * (int) rp->r; + rp->sphere.y = NRAND(MAX(1, rp->height - 4 * (int) rp->r)) + + 2 * (int) rp->r; + rp->alpha = 0; + rp->theta = 0; + rp->phi = 0; + rp->maxpts = MI_COUNT(mi); + if (rp->maxpts < -MINPTS) { + /* if rp->maxpts is random ... the size can change */ + if (rp->pts != NULL) { + (void) free((void *) rp->pts); + rp->pts = NULL; + } + rp->maxpts = NRAND(-rp->maxpts - MINPTS + 1) + MINPTS; + } else if (rp->maxpts < MINPTS) + rp->maxpts = MINPTS; + i = rp->maxpts; + rp->maxpts *= rp->maxpts; + rp->npts = 0; + if (rp->pts == NULL) + rp->pts = (ptsstruct *) malloc(rp->maxpts * sizeof (ptsstruct)); + if (rp->p != NULL) { + (void) free((void *) rp->p); + rp->p = NULL; + } + if (MI_NPIXELS(mi) > 2) + rp->color = NRAND(MI_NPIXELS(mi)); + createsphere(rp, i, i); + + MI_CLEARWINDOW(mi); +} + +void +draw_roll(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + rollstruct *rp = &rolls[MI_SCREEN(mi)]; + int i; + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < rp->maxpts; i++) { + rp->pts[i].t = rp->pts[i].t1; + rp->pts[i].u = rp->pts[i].u1; + rp->pts[i].v = rp->pts[i].v1; + } + rp->alpha += ((FACTOR * M_PI) / 200.0); + rp->theta += ((FACTOR * M_PI) / 200.0); + rp->phi += ((FACTOR * M_PI) / 200.0); + if (rp->alpha > (FACTOR * M_PI)) + rp->alpha -= (FACTOR * M_PI); + if (rp->theta > (FACTOR * M_PI)) + rp->theta -= (FACTOR * M_PI); + if (rp->phi > (FACTOR * M_PI)) + rp->phi -= (FACTOR * M_PI); + + if (rp->npts) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawPoints(display, window, gc, rp->p, rp->npts, CoordModeOrigin); + } else { + if (rp->p) + (void) free((void *) rp->p); + rp->p = (XPoint *) malloc(rp->maxpts * sizeof (XPoint)); + } + rotation3d(rp); + project(rp); + rp->npts = 0; + for (i = 0; i < rp->maxpts; i++) { + if (rp->pts[i].v > 0.0) { + rp->p[rp->npts].x += rp->sphere.x; + rp->p[rp->npts].y += rp->sphere.y; + rp->npts++; + } + } + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else { + rp->color = (rp->color + 1) % MI_NPIXELS(mi); + XSetForeground(display, gc, MI_PIXEL(mi, rp->color)); + } + XDrawPoints(display, window, gc, rp->p, rp->npts, CoordModeOrigin); + if (rp->sphere.x >= rp->width - (int) rp->r && rp->direction.x > 0) + rp->direction.x = -rp->direction.x; + else if (rp->sphere.x <= (int) rp->r && rp->direction.x < 0) + rp->direction.x = -rp->direction.x; + else if (rp->sphere.x < rp->width - 2 * (int) rp->r || + rp->sphere.x > 2 * (int) rp->r) { + if (rp->sphere.x >= rp->width - 2 * (int) rp->r && rp->direction.x > 0) + rp->direction.x = -rp->direction.x; + else if (rp->sphere.x <= 2 * (int) rp->r && rp->direction.x < 0) + rp->direction.x = -rp->direction.x; + } + if (rp->sphere.y >= rp->height - (int) rp->r && rp->direction.y > 0) + rp->direction.y = -rp->direction.y; + else if (rp->sphere.y <= (int) rp->r && rp->direction.y < 0) + rp->direction.y = -rp->direction.y; + else if (rp->sphere.y < rp->height - 2 * (int) rp->r || + rp->sphere.y > 2 * (int) rp->r) { + if (rp->sphere.y >= rp->height - 2 * (int) rp->r && rp->direction.y > 0) + rp->direction.y = -rp->direction.y; + else if (rp->sphere.y <= 2 * (int) rp->r && rp->direction.y < 0) + rp->direction.y = -rp->direction.y; + } + rp->sphere.x += rp->direction.x; + rp->sphere.y += rp->direction.y; +} + +void +release_roll(ModeInfo * mi) +{ + if (rolls != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + rollstruct *rp = &rolls[screen]; + + if (rp->pts != NULL) + (void) free((void *) rp->pts); + if (rp->p != NULL) + (void) free((void *) rp->p); + } + (void) free((void *) rolls); + rolls = NULL; + } +} + +void +refresh_roll(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_roll */ diff --git a/modes/rotor.c b/modes/rotor.c new file mode 100644 index 00000000..abfaf044 --- /dev/null +++ b/modes/rotor.c @@ -0,0 +1,369 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* rotor --- a swirly rotor */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)rotor.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 08-Mar-95: CAT stuff for ## was tripping up some C compilers. Removed. + * 01-Dec-93: added patch for AIXV3 from Tom McConnell + * + * 11-Nov-90: put into xlock by Steve Zellers + * 16-Oct-90: Received from Tom Lawrence (tcl@cs.brown.edu: 'flight' simulator) + */ + +#ifdef STANDALONE +#define PROGCLASS "Rotor" +#define HACK_INIT init_rotor +#define HACK_DRAW draw_rotor +#define rotor_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 4 \n" \ + "*cycles: 20 \n" \ + "*size: -6 \n" \ + "*ncolors: 200 \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_rotor + +ModeSpecOpt rotor_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct rotor_description = +{"rotor", "init_rotor", "draw_rotor", "release_rotor", + "refresh_rotor", "init_rotor", NULL, &rotor_opts, + 10000, 4, 20, -6, 64, 0.3, "", + "Shows Tom's Roto-Rooter", 0, NULL}; + +#endif + +/*- + * A 'batchcount' of 3 or 4 works best! + */ + +#define MAXANGLE 3000.0 /* irrectangular (was 10000.0) */ + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 + +typedef struct { + float angle; + float radius; + float start_radius; + float end_radius; + float radius_drift_max; + float radius_drift_now; + + float ratio; + float start_ratio; + float end_ratio; + float ratio_drift_max; + float ratio_drift_now; +} elem; + +typedef struct { + int pix; + int lastx, lasty; + int num, rotor, prev; + int nsave; + float angle; + int centerx, centery; + int prevcenterx, prevcentery; + unsigned char firsttime; + unsigned char iconifiedscreen; /* for iconified view */ + unsigned char forward; + unsigned char unused; + elem *elements; + XPoint *save; + int redrawing, redrawpos; + int linewidth; +} rotorstruct; + +static rotorstruct *rotors = NULL; + +void +init_rotor(ModeInfo * mi) +{ + rotorstruct *rp; + int x; + elem *pelem; + unsigned char wasiconified; + + if (rotors == NULL) { + if ((rotors = (rotorstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (rotorstruct))) == NULL) + return; + } + rp = &rotors[MI_SCREEN(mi)]; + + rp->prevcenterx = rp->centerx; + rp->prevcentery = rp->centery; + + rp->centerx = MI_WIDTH(mi) / 2; + rp->centery = MI_HEIGHT(mi) / 2; + + rp->redrawing = 0; + /* + * sometimes, you go into iconified view, only to see a really whizzy pattern + * that you would like to look more closely at. Normally, clicking in the + * icon reinitializes everything - but I don't, cuz I'm that kind of guy. + * HENCE, the wasiconified stuff you see here. + */ + + wasiconified = rp->iconifiedscreen; + rp->iconifiedscreen = MI_IS_ICONIC(mi); + + if (wasiconified && !rp->iconifiedscreen) + rp->firsttime = True; + else { + + /* This is a fudge is needed since prevcenter may not be set when it comes + from the the random mode and return is pressed (and its not the first + mode that was running). This assumes that the size of the lock screen + window / size of the icon window = 12 */ + if (!rp->prevcenterx) + rp->prevcenterx = rp->centerx * 12; + if (!rp->prevcentery) + rp->prevcentery = rp->centery * 12; + + rp->num = MI_COUNT(mi); + if (rp->num < 0) { + rp->num = NRAND(-rp->num) + 1; + if (rp->elements != NULL) { + (void) free((void *) rp->elements); + rp->elements = NULL; + } + } + if (rp->elements == NULL) + rp->elements = (elem *) calloc(rp->num, sizeof (elem)); + rp->nsave = MI_CYCLES(mi); + if (rp->nsave <= 1) + rp->nsave = 2; + if (rp->save == NULL) + rp->save = (XPoint *) malloc(rp->nsave * sizeof (XPoint)); + for (x = 0; x < rp->nsave; x++) { + rp->save[x].x = rp->centerx; + rp->save[x].y = rp->centery; + } + + pelem = rp->elements; + + for (x = rp->num; --x >= 0; pelem++) { + pelem->radius_drift_max = 1.0; + pelem->radius_drift_now = 1.0; + + pelem->end_radius = 100.0; + + pelem->ratio_drift_max = 1.0; + pelem->ratio_drift_now = 1.0; + pelem->end_ratio = 10.0; + } + if (MI_NPIXELS(mi) > 2) + rp->pix = NRAND(MI_NPIXELS(mi)); + + rp->rotor = 0; + rp->prev = 1; + rp->lastx = rp->centerx; + rp->lasty = rp->centery; + rp->angle = (float) NRAND((long) MAXANGLE) / 3.0; + rp->forward = rp->firsttime = True; + } + rp->linewidth = MI_SIZE(mi); + + if (rp->linewidth == 0) + rp->linewidth = 1; + if (rp->linewidth < 0) + rp->linewidth = NRAND(-rp->linewidth) + 1; + + MI_CLEARWINDOW(mi); +} + +void +draw_rotor(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + register rotorstruct *rp = &rotors[MI_SCREEN(mi)]; + register elem *pelem; + int thisx, thisy; + int i; + int x_1, y_1, x_2, y_2; + + MI_IS_DRAWN(mi) = True; + + if (!rp->iconifiedscreen) { + thisx = rp->centerx; + thisy = rp->centery; + } else { + thisx = rp->prevcenterx; + thisy = rp->prevcentery; + } + XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), rp->linewidth, + LineSolid, CapButt, JoinMiter); + for (i = rp->num, pelem = rp->elements; --i >= 0; pelem++) { + if (pelem->radius_drift_max <= pelem->radius_drift_now) { + pelem->start_radius = pelem->end_radius; + pelem->end_radius = (float) NRAND(40000) / 100.0 - 200.0; + pelem->radius_drift_max = (float) NRAND(100000) + 10000.0; + pelem->radius_drift_now = 0.0; + } + if (pelem->ratio_drift_max <= pelem->ratio_drift_now) { + pelem->start_ratio = pelem->end_ratio; + pelem->end_ratio = (float) NRAND(2000) / 100.0 - 10.0; + pelem->ratio_drift_max = (float) NRAND(100000) + 10000.0; + pelem->ratio_drift_now = 0.0; + } + pelem->ratio = pelem->start_ratio + + (pelem->end_ratio - pelem->start_ratio) / + pelem->ratio_drift_max * pelem->ratio_drift_now; + pelem->angle = rp->angle * pelem->ratio; + pelem->radius = pelem->start_radius + + (pelem->end_radius - pelem->start_radius) / + pelem->radius_drift_max * pelem->radius_drift_now; + + thisx += (int) (COSF(pelem->angle) * pelem->radius); + thisy += (int) (SINF(pelem->angle) * pelem->radius); + + pelem->ratio_drift_now += 1.0; + pelem->radius_drift_now += 1.0; + } + if (rp->firsttime) + rp->firsttime = False; + else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + + x_1 = (int) rp->save[rp->rotor].x; + y_1 = (int) rp->save[rp->rotor].y; + x_2 = (int) rp->save[rp->prev].x; + y_2 = (int) rp->save[rp->prev].y; + + if (rp->iconifiedscreen) { + x_1 = x_1 * rp->centerx / rp->prevcenterx; + x_2 = x_2 * rp->centerx / rp->prevcenterx; + y_1 = y_1 * rp->centery / rp->prevcentery; + y_2 = y_2 * rp->centery / rp->prevcentery; + } + XDrawLine(display, MI_WINDOW(mi), gc, x_1, y_1, x_2, y_2); + + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, rp->pix)); + if (++rp->pix >= MI_NPIXELS(mi)) + rp->pix = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + x_1 = rp->lastx; + y_1 = rp->lasty; + x_2 = thisx; + y_2 = thisy; + + if (rp->iconifiedscreen) { + x_1 = x_1 * rp->centerx / rp->prevcenterx; + x_2 = x_2 * rp->centerx / rp->prevcenterx; + y_1 = y_1 * rp->centery / rp->prevcentery; + y_2 = y_2 * rp->centery / rp->prevcentery; + } + XDrawLine(display, MI_WINDOW(mi), gc, x_1, y_1, x_2, y_2); + } + rp->save[rp->rotor].x = rp->lastx = thisx; + rp->save[rp->rotor].y = rp->lasty = thisy; + + ++rp->rotor; + rp->rotor %= rp->nsave; + ++rp->prev; + rp->prev %= rp->nsave; + if (rp->forward) { + rp->angle += 0.01; + if (rp->angle >= MAXANGLE) { + rp->angle = MAXANGLE; + rp->forward = False; + } + } else { + rp->angle -= 0.1; + if (rp->angle <= 0) { + rp->angle = 0.0; + rp->forward = True; + } + } + if (rp->redrawing) { + int j; + + for (i = 0; i < REDRAWSTEP; i++) { + j = (rp->rotor - rp->redrawpos + rp->nsave) % rp->nsave; + + x_1 = (int) rp->save[j].x; + y_1 = (int) rp->save[j].y; + x_2 = (int) rp->save[(j - 1 + rp->nsave) % rp->nsave].x; + y_2 = (int) rp->save[(j - 1 + rp->nsave) % rp->nsave].y; + + if (rp->iconifiedscreen) { + x_1 = x_1 * rp->centerx / rp->prevcenterx; + x_2 = x_2 * rp->centerx / rp->prevcenterx; + y_1 = y_1 * rp->centery / rp->prevcentery; + y_2 = y_2 * rp->centery / rp->prevcentery; + } + XDrawLine(display, MI_WINDOW(mi), gc, x_1, y_1, x_2, y_2); + + if (++(rp->redrawpos) >= rp->nsave) { + rp->redrawing = 0; + break; + } + } + } + XSetLineAttributes(MI_DISPLAY(mi), MI_GC(mi), 1, + LineSolid, CapButt, JoinMiter); +} + +void +release_rotor(ModeInfo * mi) +{ + if (rotors != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + rotorstruct *rp = &rotors[screen]; + + if (rp->elements != NULL) + (void) free((void *) rp->elements); + if (rp->save != NULL) + (void) free((void *) rp->save); + } + (void) free((void *) rotors); + rotors = NULL; + } +} + +void +refresh_rotor(ModeInfo * mi) +{ + rotorstruct *rp = &rotors[MI_SCREEN(mi)]; + + MI_CLEARWINDOW(mi); + rp->redrawing = 1; + rp->redrawpos = 1; +} + +#endif /* MODE_rotor */ diff --git a/modes/shape.c b/modes/shape.c new file mode 100644 index 00000000..bf92e9ad --- /dev/null +++ b/modes/shape.c @@ -0,0 +1,416 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* shape --- basic in your face shapes */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)shape.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1992 by Jamie Zawinski + * + * 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-Mar-98: Got the idea for shadow from looking at xscreensaver web page. + * 10-May-97: Compatible with xscreensaver + * 03-Nov-95: formerly rect.c + * 11-Aug-95: slight change to initialization of pixmaps + * 27-Jun-95: added ellipses + * 27-Feb-95: patch for VMS + * 29-Sep-94: multidisplay bug fix + * 15-Jul-94: xlock version David Bagley + * 1992: xscreensaver version Jamie Zawinski + */ + +/*- + * original copyright + * 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. + */ + +#ifdef STANDALONE +#define PROGCLASS "Shape" +#define HACK_INIT init_shape +#define HACK_DRAW draw_shape +#define shape_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*count: 100 \n" \ + "*cycles: 256 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_shape + +#ifndef STIPPLING +/*- + * For Linux (others, Intel based?) this could be deadly for the client. + * If you have 15/16 bit displays it may want a hard reboot after + * 1 minute. Not true on all systems... may be a XFree86 based problem. + * Also what is it with those corruption lines in some of the shapes? + * 3 degrees for STIPPLING ... + * 0: absolutely not + * 1: if user insists (default for Linux) + * 2: permit (also no warning message) (default for other OS's) + */ +#ifdef __linux__ +#if 0 +#define STIPPLING 0 +#else +#define STIPPLING 1 +#endif +#else +#define STIPPLING 2 +#endif +#endif + +/*- + * "shade" is used over "shadow" because of possible confusion with + * password shadowing + */ + +#define DEF_SHADE "True" +#define DEF_BORDER "False" +#if (STIPPLING > 1) +#define DEF_STIPPLE "True" +#else +#define DEF_STIPPLE "False" +#endif + +static Bool shade; +static Bool border; +static Bool stipple; + +static XrmOptionDescRec opts[] = +{ + {"-shade", ".shape.shade", XrmoptionNoArg, (caddr_t) "on"}, + {"+shade", ".shape.shade", XrmoptionNoArg, (caddr_t) "off"}, + {"-border", ".shape.border", XrmoptionNoArg, (caddr_t) "on"}, + {"+border", ".shape.border", XrmoptionNoArg, (caddr_t) "off"}, + {"-stipple", ".shape.stipple", XrmoptionNoArg, (caddr_t) "on"}, + {"+stipple", ".shape.stipple", XrmoptionNoArg, (caddr_t) "off"} +}; +static argtype vars[] = +{ + {(caddr_t *) & shade, "shade", "Shade", DEF_SHADE, t_Bool}, + {(caddr_t *) & border, "border", "Border", DEF_BORDER, t_Bool}, + {(caddr_t *) & stipple, "stipple", "Stipple", DEF_STIPPLE, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+shade", "turn on/off shape's shadows"}, + {"-/+border", "turn on/off shape's borders"}, + {"-/+stipple", "turn on/off shape's stippling"} +}; + +ModeSpecOpt shape_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct shape_description = +{"shape", "init_shape", "draw_shape", "release_shape", + "refresh_shape", "init_shape", NULL, &shape_opts, + 10000, 100, 256, 1, 64, 1.0, "", + "Shows overlaying rectangles, ellipses, and triangles", 0, NULL}; + +#endif + +#define MAX_SHADE_OFFSET 32 +#define MIN_SHADE_OFFSET 2 + +#define NBITS 12 + +#include "bitmaps/gray1.xbm" +#include "bitmaps/gray3.xbm" +#include "bitmaps/stipple.xbm" +#include "bitmaps/cross_weave.xbm" +#include "bitmaps/dimple1.xbm" +#include "bitmaps/dimple3.xbm" +#include "bitmaps/flipped_gray.xbm" +#include "bitmaps/hlines2.xbm" +#include "bitmaps/light_gray.xbm" +#include "bitmaps/root_weave.xbm" +#include "bitmaps/vlines2.xbm" +#include "bitmaps/vlines3.xbm" +#define SHAPEBITS(n,w,h)\ + sp->pixmaps[sp->init_bits++]=\ + XCreateBitmapFromData(display,window,(char *)n,w,h) + +typedef struct { + int width; + int height; + int borderx; + int bordery; + int time; + int x, y, w, h; + Bool shade; + Bool border; + Bool stipple; + XPoint shade_offset; + int init_bits; + Pixmap pixmaps[NBITS]; +} shapestruct; + +static shapestruct *shapes = NULL; + +void +init_shape(ModeInfo * mi) +{ + shapestruct *sp; + + if (shapes == NULL) { + if ((shapes = (shapestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (shapestruct))) == NULL) + return; + } + sp = &shapes[MI_SCREEN(mi)]; + + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + sp->borderx = sp->width / 20; + sp->bordery = sp->height / 20; + sp->time = 0; + + if (MI_IS_FULLRANDOM(mi)) + sp->shade = (Bool) (LRAND() & 1); + else + sp->shade = shade; + + if (shade) { + sp->shade_offset.x = (NRAND(MAX_SHADE_OFFSET - MIN_SHADE_OFFSET) + + MIN_SHADE_OFFSET) * ((LRAND() & 1) ? 1 : -1); + sp->shade_offset.y = (NRAND(MAX_SHADE_OFFSET - MIN_SHADE_OFFSET) + + MIN_SHADE_OFFSET) * ((LRAND() & 1) ? 1 : -1); + } + if (MI_IS_FULLRANDOM(mi)) + sp->border = (Bool) (LRAND() & 1); + else + sp->border = border; + +#if (STIPPLING > 1) + if (MI_IS_FULLRANDOM(mi)) + sp->stipple = (Bool) (LRAND() & 1); + else + sp->stipple = stipple; +#else +#if (STIPPLING < 1) + sp->stipple = False; +#else + sp->stipple = stipple; /* OK if you insist... could be dangerous */ +#endif +#endif + if (sp->stipple && !sp->init_bits) { + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + +#if defined( __linux__ ) && ( STIPPLING < 2 ) + if ((MI_IS_VERBOSE(mi) || MI_IS_DEBUG(mi)) && + (MI_DEPTH(mi) == 15 || MI_DEPTH(mi) == 16)) + (void) fprintf(stderr, "This may cause a LOCKUP in seconds!!!\n"); +#endif + SHAPEBITS(gray1_bits, gray1_width, gray1_height); + SHAPEBITS(gray3_bits, gray3_width, gray3_height); + SHAPEBITS(cross_weave_bits, cross_weave_width, cross_weave_height); + SHAPEBITS(dimple1_bits, dimple1_width, dimple1_height); + SHAPEBITS(dimple3_bits, dimple3_width, dimple3_height); + SHAPEBITS(flipped_gray_bits, flipped_gray_width, flipped_gray_height); + SHAPEBITS(vlines3_bits, vlines3_width, vlines3_height); + SHAPEBITS(stipple_bits, stipple_width, stipple_height); + SHAPEBITS(hlines2_bits, hlines2_width, hlines2_height); + SHAPEBITS(light_gray_bits, light_gray_width, light_gray_height); + SHAPEBITS(root_weave_bits, root_weave_width, root_weave_height); + SHAPEBITS(vlines2_bits, vlines2_width, vlines2_height); + } + MI_CLEARWINDOW(mi); +} + +void +draw_shape(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + shapestruct *sp = &shapes[MI_SCREEN(mi)]; + int shape, i; + XPoint shade_offset; + + MI_IS_DRAWN(mi) = True; + + shade_offset.x = 0; + shade_offset.y = 0; + if (sp->stipple) + if (!sp->init_bits) + return; + + if (sp->stipple) { + XSetBackground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_BLACK_PIXEL(mi)); + } + if (sp->border) { + XSetLineAttributes(display, gc, 2, LineSolid, CapNotLast, JoinRound); + } + shape = NRAND(3); + if (sp->shade) { + i = MAX(ABS(sp->shade_offset.x), ABS(sp->shade_offset.y)); + shade_offset.x = (short int) (((float) NRAND(i) + 2.0) / + (1.0 + i) * sp->shade_offset.x); + shade_offset.y = (short int) (((float) NRAND(i) + 2.0) / + (1.0 + i) * sp->shade_offset.y); + /* This is over-simplistic... it casts the same length shadow over + * different depth objects. + */ + } + if (shape == 2) { + XPoint triangleList[4]; + XPoint triangleShade[3]; + + triangleList[0].x = sp->borderx + NRAND(sp->width - 2 * sp->borderx); + triangleList[0].y = sp->bordery + NRAND(sp->height - 2 * sp->bordery); + triangleList[1].x = sp->borderx + NRAND(sp->width - 2 * sp->borderx); + triangleList[1].y = sp->bordery + NRAND(sp->height - 2 * sp->bordery); + triangleList[2].x = sp->borderx + NRAND(sp->width - 2 * sp->borderx); + triangleList[2].y = sp->bordery + NRAND(sp->height - 2 * sp->bordery); + triangleList[3].x = triangleList[0].x; + triangleList[3].y = triangleList[0].y; + if (sp->shade) { + for (i = 0; i < 3; i++) { + triangleShade[i].x = triangleList[i].x + shade_offset.x; + triangleShade[i].y = triangleList[i].y + shade_offset.y; + } + if (sp->stipple) { + XSetStipple(display, gc, sp->pixmaps[0]); + XSetFillStyle(display, gc, FillStippled); + } + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, triangleShade, 3, + Convex, CoordModeOrigin); + } + if (sp->stipple) { + XSetStipple(display, gc, sp->pixmaps[NRAND(sp->init_bits)]); + XSetFillStyle(display, gc, FillOpaqueStippled); + } + XSetForeground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_WHITE_PIXEL(mi)); + XFillPolygon(display, window, gc, triangleList, 3, + Convex, CoordModeOrigin); + if (sp->border) { + XSetForeground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_BLACK_PIXEL(mi)); + XDrawLines(display, window, gc, triangleList, 4, CoordModeOrigin); + } + } else { + sp->w = sp->borderx + NRAND(sp->width - 2 * sp->borderx) * + NRAND(sp->width) / sp->width; + sp->h = sp->bordery + NRAND(sp->height - 2 * sp->bordery) * + NRAND(sp->height) / sp->height; + sp->x = NRAND(sp->width - sp->w); + sp->y = NRAND(sp->height - sp->h); + if (shape) { + if (sp->shade) { + if (sp->stipple) { + XSetStipple(display, gc, sp->pixmaps[0]); + XSetFillStyle(display, gc, FillStippled); + } + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillArc(display, window, gc, + sp->x + shade_offset.x, sp->y + shade_offset.y, + sp->w, sp->h, 0, 23040); + } + if (sp->stipple) { + XSetStipple(display, gc, sp->pixmaps[NRAND(sp->init_bits)]); + XSetFillStyle(display, gc, FillOpaqueStippled); + } + XSetForeground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_WHITE_PIXEL(mi)); + XFillArc(display, window, gc, + sp->x, sp->y, sp->w, sp->h, 0, 23040); + if (sp->border) { + XSetForeground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_BLACK_PIXEL(mi)); + XDrawArc(display, window, gc, + sp->x, sp->y, sp->w, sp->h, 0, 23040); + } + } else { + if (sp->shade) { + if (sp->stipple) { + XSetStipple(display, gc, sp->pixmaps[0]); + XSetFillStyle(display, gc, FillStippled); + } + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, + sp->x + shade_offset.x, sp->y + shade_offset.y, sp->w, sp->h); + } + if (sp->stipple) { + XSetStipple(display, gc, sp->pixmaps[NRAND(sp->init_bits)]); + XSetFillStyle(display, gc, FillOpaqueStippled); + } + XSetForeground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_WHITE_PIXEL(mi)); + XFillRectangle(display, window, gc, + sp->x, sp->y, sp->w, sp->h); + if (sp->border) { + XSetForeground(display, gc, (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))) : MI_BLACK_PIXEL(mi)); + XDrawRectangle(display, window, gc, + sp->x, sp->y, sp->w, sp->h); + } + } + } + if (sp->border) + XSetLineAttributes(display, gc, 1, LineSolid, CapNotLast, JoinRound); + if (sp->stipple) + XSetFillStyle(display, gc, FillSolid); + if (sp->stipple && MI_NPIXELS(mi) > 2) { + XSetBackground(display, gc, MI_BLACK_PIXEL(mi)); + } + XFlush(display); + if (++sp->time > MI_CYCLES(mi)) + init_shape(mi); +} + +void +release_shape(ModeInfo * mi) +{ + if (shapes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + shapestruct *sp = &shapes[screen]; + int bits; + + for (bits = 0; bits < sp->init_bits; bits++) + XFreePixmap(MI_DISPLAY(mi), sp->pixmaps[bits]); + } + (void) free((void *) shapes); + shapes = NULL; + } +} + +void +refresh_shape(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_shape */ diff --git a/modes/sierpinski.c b/modes/sierpinski.c new file mode 100644 index 00000000..e3c71309 --- /dev/null +++ b/modes/sierpinski.c @@ -0,0 +1,205 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* sierpinski --- Sierpinski's triangle fractal */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sierpinski.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 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. + * + * 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. + * + * Dots initially appear where they "should not". Later they get + * "focused". This is correct behavior. + * + * Revision History: + * 18-Sep-97: 3D version Antti Kuntsi . + * 20-May-97: Changed the name tri to sierpinski for more compatiblity + * 10-May-97: Jamie Zawinski compatible with xscreensaver + * 05-Sep-96: Desmond Daignault Datatimes Incorporated + * . + */ + +#ifdef STANDALONE +#define PROGCLASS "Sierpinski" +#define HACK_INIT init_sierpinski +#define HACK_DRAW draw_sierpinski +#define sierpinski_opts xlockmore_opts +#define DEFAULTS "*delay: 400000 \n" \ + "*count: 2000 \n" \ + "*cycles: 100 \n" \ + "*ncolors: 64 \n" +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_sierpinski + +ModeSpecOpt sierpinski_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct sierpinski_description = +{"sierpinski", "init_sierpinski", "draw_sierpinski", "release_sierpinski", + "refresh_sierpinski", "init_sierpinski", NULL, &sierpinski_opts, + 400000, 2000, 100, 1, 64, 1.0, "", + "Shows Sierpinski's triangle", 0, NULL}; + +#endif + +#define MAXCORNERS 4 + +typedef struct { + int width, height; + int time; + int px, py; + int total_npoints; + int corners; + int npoints[MAXCORNERS]; + unsigned long colors[MAXCORNERS]; + XPoint *pointBuffer[MAXCORNERS]; + XPoint vertex[MAXCORNERS]; +} sierpinskistruct; + +static sierpinskistruct *tris = NULL; + +static void +startover(ModeInfo * mi) +{ + int j; + sierpinskistruct *sp = &tris[MI_SCREEN(mi)]; + + if (MI_NPIXELS(mi) > 2) { + if (sp->corners == 3) { + sp->colors[0] = (NRAND(MI_NPIXELS(mi))); + sp->colors[1] = (sp->colors[0] + MI_NPIXELS(mi) / 7 + + NRAND(2 * MI_NPIXELS(mi) / 7 + 1)) % MI_NPIXELS(mi); + sp->colors[2] = (sp->colors[0] + 4 * MI_NPIXELS(mi) / 7 + + NRAND(2 * MI_NPIXELS(mi) / 7 + 1)) % MI_NPIXELS(mi); + } else if (sp->corners == 4) { + sp->colors[0] = (NRAND(MI_NPIXELS(mi))); + sp->colors[1] = (sp->colors[0] + MI_NPIXELS(mi) / 7 + + NRAND(MI_NPIXELS(mi) / 7 + 1)) % MI_NPIXELS(mi); + sp->colors[2] = (sp->colors[0] + 3 * MI_NPIXELS(mi) / 7 + + NRAND(MI_NPIXELS(mi) / 7 + 1)) % MI_NPIXELS(mi); + sp->colors[3] = (sp->colors[0] + 5 * MI_NPIXELS(mi) / 7 + + NRAND(MI_NPIXELS(mi) / 7 + 1)) % MI_NPIXELS(mi); + } else { + (void) fprintf(stderr, "colors not set for %d corners\n", sp->corners); + } + } + for (j = 0; j < sp->corners; j++) { + sp->vertex[j].x = NRAND(sp->width); + sp->vertex[j].y = NRAND(sp->height); + } + sp->px = NRAND(sp->width); + sp->py = NRAND(sp->height); + sp->time = 0; + + MI_CLEARWINDOW(mi); +} + +void +init_sierpinski(ModeInfo * mi) +{ + sierpinskistruct *sp; + int i; + + if (tris == NULL) { + if ((tris = (sierpinskistruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (sierpinskistruct))) == NULL) + return; + } + sp = &tris[MI_SCREEN(mi)]; + + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + + sp->total_npoints = MI_COUNT(mi); + if (sp->total_npoints < 1) + sp->total_npoints = 1; + sp->corners = MI_SIZE(mi); + if (sp->corners < 3 || sp->corners > 4) { + sp->corners = (int) (LRAND() & 1) + 3; + } + for (i = 0; i < sp->corners; i++) { + if (!sp->pointBuffer[i]) + sp->pointBuffer[i] = (XPoint *) malloc(sp->total_npoints * + sizeof (XPoint)); + } + startover(mi); +} + +void +draw_sierpinski(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + sierpinskistruct *sp = &tris[MI_SCREEN(mi)]; + XPoint *xp[MAXCORNERS]; + int i = 0, v; + + MI_IS_DRAWN(mi) = True; + + if (MI_NPIXELS(mi) <= 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + for (i = 0; i < sp->corners; i++) + xp[i] = sp->pointBuffer[i]; + for (i = 0; i < sp->total_npoints; i++) { + v = NRAND(sp->corners); + sp->px = (sp->px + sp->vertex[v].x) / 2; + sp->py = (sp->py + sp->vertex[v].y) / 2; + xp[v]->x = sp->px; + xp[v]->y = sp->py; + xp[v]++; + sp->npoints[v]++; + } + for (i = 0; i < sp->corners; i++) { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, sp->colors[i])); + XDrawPoints(display, MI_WINDOW(mi), gc, sp->pointBuffer[i], sp->npoints[i], + CoordModeOrigin); + sp->npoints[i] = 0; + } + if (++sp->time >= MI_CYCLES(mi)) + startover(mi); +} + +void +release_sierpinski(ModeInfo * mi) +{ + if (tris != NULL) { + int screen, i; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + for (i = 0; i < MAXCORNERS; i++) + if (tris[screen].pointBuffer[i] != NULL) { + (void) free((void *) tris[screen].pointBuffer[i]); + } + } + (void) free((void *) tris); + tris = NULL; + } +} + +void +refresh_sierpinski(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_sierpinski */ diff --git a/modes/slip.c b/modes/slip.c new file mode 100644 index 00000000..898f844d --- /dev/null +++ b/modes/slip.c @@ -0,0 +1,327 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* slip --- lots of slipping blits */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)slip.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 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. + * + * 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. + * + * 10-May-97: Jamie Zawinski compatible with xscreensaver + * 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 "*delay: 50000 \n" \ + "*count: 35 \n" \ + "*cycles: 50 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_slip + +ModeSpecOpt slip_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct slip_description = +{"slip", "init_slip", "draw_slip", "release_slip", + "init_slip", "init_slip", NULL, &slip_opts, + 50000, 35, 50, 1, 64, 1.0, "", + "Shows slipping blits", 0, NULL}; + +#endif + +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 = (short) (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 = (int) (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(2) == 0) { +#if 0 + Pixmap p = +#endif + grab_screen_image(DefaultScreenOfDisplay(display), + MI_WINDOW(mi)); + +#if 0 + if (p) + XFreePixmap(display, p); + return; +#endif + } +#endif + + s->backwards = (int) (LRAND() & 1); /* jwz: go the other way sometimes */ + + if (s->first_time || !halfrandom(10)) { + MI_CLEARWINDOW(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_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + + for (i = 0; i < n; i++) { + int ww = ((w / 2) + halfrandom(w)); + + if (not_solid) { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, gc, MI_PIXEL(mi, halfrandom(MI_NPIXELS(mi)))); + else if (halfrandom(2)) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + } + XFillRectangle(display, MI_WINDOW(mi), gc, + halfrandom(s->width - ww), + halfrandom(s->height - ww), + ww, ww); + } + 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_WIDTH(mi); + sp->height = MI_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_COUNT(mi) * MI_CYCLES(mi); + + MI_IS_DRAWN(mi) = True; + + 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 int lut[] = + {0, 0, 0, 1, 1, 1, 2}; + + prepare_screen(mi, s); + s->nblits_remaining = MI_COUNT(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: /* rotor */ + 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: /* shuffle */ + dx = erandom(3); + dy = erandom(3); + break; + case 2: /* explode */ + 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; + } +} + +#endif /* MODE_slip */ diff --git a/modes/sphere.c b/modes/sphere.c new file mode 100644 index 00000000..e7d845c4 --- /dev/null +++ b/modes/sphere.c @@ -0,0 +1,293 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* sphere --- a bunch of shaded spheres */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sphere.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1988 by Sun Microsystems + * + * 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: + * 30-May-97: made it go vertically as well as horizontally. + * 27-May-97: turned into a standalone program. + * 02-Sep-93: xlock version David Bagley + * 1988: Revised to use SunView canvas instead of gfxsw Sun Microsystems + * 1982: Orignal Algorithm Tom Duff Lucasfilm Ltd. + */ + +/*- + * original copyright + * ************************************************************************** + * 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. + * *************************************************************************** + */ + +#ifdef STANDALONE +#define PROGCLASS "Sphere" +#define HACK_INIT init_sphere +#define HACK_DRAW draw_sphere +#define sphere_opts xlockmore_opts +#define DEFAULTS "*delay: 5000 \n" \ + "*cycles: 20 \n" \ + "*size: 0 \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 */ + +#ifdef MODE_sphere + +ModeSpecOpt sphere_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct sphere_description = +{"sphere", "init_sphere", "draw_sphere", "release_sphere", + "refresh_sphere", "init_sphere", NULL, &sphere_opts, + 5000, 1, 20, 0, 64, 1.0, "", + "Shows a bunch of shaded spheres", 0, NULL}; + +#endif + +/*- + * (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 shadowx, shadowy; + 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_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + sp->points = (XPoint *) malloc(sp->height * sizeof (XPoint)); + + MI_CLEARWINDOW(mi); + + sp->dirx = 1; + sp->x = sp->radius; + sp->shadowx = (LRAND() & 1) ? 1 : -1; + sp->shadowy = (LRAND() & 1) ? 1 : -1; +} + +void +draw_sphere(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + spherestruct *sp = &spheres[MI_SCREEN(mi)]; + int sqrd, nd; + register int minx = 0, maxx = 0, miny = 0, maxy = 0, npts = 0; + + MI_IS_DRAWN(mi) = True; + + 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 = (int) (LRAND() & 1) * 2 - 1; + sp->diry = 0; + } else { + sp->dirx = 0; + sp->diry = (int) (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_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_WHITE_PIXEL(mi)); + + if (sp->dirx) { + sqrd = sp->radius * sp->radius - sp->x * sp->x; + nd = NX * sp->shadowx * sp->x; + for (sp->y = miny; sp->y <= maxy; sp->y++) + if ((NRAND(sp->radius * NR)) <= nd + NY * sp->shadowy * sp->y + + NZ * SQRT(sqrd - sp->y * sp->y)) { + sp->points[npts].x = sp->x + sp->x0; + sp->points[npts].y = sp->y + sp->y0; + npts++; + } + } + if (sp->diry) { + sqrd = sp->radius * sp->radius - sp->y * sp->y; + nd = NY * sp->shadowy * sp->y; + for (sp->x = minx; sp->x <= maxx; sp->x++) + if ((NRAND(sp->radius * NR)) <= NX * sp->shadowx * sp->x + nd + + NZ * SQRT(sqrd - sp->x * sp->x)) { + 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)]; + + MI_CLEARWINDOW(mi); + + sp->x = -sp->radius; +} + +#endif /* MODE_sphere */ diff --git a/modes/spiral.c b/modes/spiral.c new file mode 100644 index 00000000..717cd634 --- /dev/null +++ b/modes/spiral.c @@ -0,0 +1,316 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* spiral --- spiraling dots */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)spiral.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 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. + * + * 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@jwz.org: 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. + * 03-Mar-95: Cleaned up code. + * 12-Jul-94: Written. + * + * Low CPU usage mode. + * Idea based on a graphics demo I saw a *LONG* time ago. + */ + +#ifdef STANDALONE +#define PROGCLASS "Spiral" +#define HACK_INIT init_spiral +#define HACK_DRAW draw_spiral +#define spiral_opts xlockmore_opts +#define DEFAULTS "*delay: 5000 \n" \ + "*count: -40 \n" \ + "*cycles: 350 \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 */ + +#ifdef MODE_spiral + +ModeSpecOpt spiral_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct spiral_description = +{"spiral", "init_spiral", "draw_spiral", "release_spiral", + "refresh_spiral", "init_spiral", NULL, &spiral_opts, + 5000, -40, 350, 1, 64, 1.0, "", + "Shows a helical locus of points", 0, NULL}; + +#endif + +#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_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + + MI_CLEARWINDOW(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_COUNT(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; + + MI_IS_DRAWN(mi) = True; + + if (sp->erase == 1) { + XSetForeground(display, gc, MI_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_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)]; + + MI_CLEARWINDOW(mi); + sp->redrawing = 1; + sp->redrawpos = 0; +} + +#endif /* MODE_spiral */ diff --git a/modes/spline.c b/modes/spline.c new file mode 100644 index 00000000..2977db9d --- /dev/null +++ b/modes/spline.c @@ -0,0 +1,429 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* spline --- spline fun */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)spline.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1992 by Jef Poskanzer + * + * 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 + * 13-Sep-96: changed FOLLOW to a runtime option "-erase" + * 17-Jan-96: added compile time option, FOLLOW to erase old splines like Qix + * thanks to Richard Duran + * 9-Mar-95: changed how batchcount is used + * 2-Sep-93: xlock version: David Bagley + * reminds me of a great "Twilight Zone" episode. + * 1992: X11 version Jef Poskanzer , + * + * spline fun #3 + */ + +/*- + * original copyright + * xsplinefun.c - X11 version of spline fun #3 + * Displays colorful moving splines in the X11 root window. + * Copyright (C) 1992 by Jef Poskanzer + * 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 software is provided "as is" without express or + * implied warranty. + */ + +#ifdef STANDALONE +#define PROGCLASS "Spline" +#define HACK_INIT init_spline +#define HACK_DRAW draw_spline +#define spline_opts xlockmore_opts +#define DEFAULTS "*delay: 30000 \n" \ + "*count: -6 \n" \ + "*cycles: 2048 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_spline + +#define DEF_ERASE "False" + +static Bool erase; + +static XrmOptionDescRec opts[] = +{ + {"-erase", ".spline.erase", XrmoptionNoArg, (caddr_t) "on"}, + {"+erase", ".spline.erase", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & erase, "erase", "Erase", DEF_ERASE, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-/+erase", "turn on/off the following erase of splines"} +}; + +ModeSpecOpt spline_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct spline_description = +{"spline", "init_spline", "draw_spline", "release_spline", + "refresh_spline", "init_spline", NULL, &spline_opts, + 30000, -6, 2048, 1, 64, 0.3, "", + "Shows colorful moving splines", 0, NULL}; + +#endif + +#define MINPOINTS 3 + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 + +#define SPLINE_THRESH 5 + +typedef struct { + XPoint pos, delta; +} splinepointstruct; + +typedef struct { + /* ERASE stuff */ + int first; + int last; + int max_delta; + XPoint **splineq; + int redrawing, redrawpos; + Bool erase; + + int width; + int height; + int color; + int points; + int nsplines; + splinepointstruct *pt; +} splinestruct; + +static splinestruct *splines = NULL; + +static void XDrawSpline(Display * display, Drawable d, GC gc, + int x0, int y0, int x1, int y1, int x2, int y2); + +void +init_spline(ModeInfo * mi) +{ + splinestruct *sp; + int i; + + if (splines == NULL) { + if ((splines = (splinestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (splinestruct))) == NULL) + return; + } + sp = &splines[MI_SCREEN(mi)]; + + if (MI_IS_FULLRANDOM(mi)) + sp->erase = (Bool) (LRAND() & 1); + else + sp->erase = erase; + + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + /* batchcount is the upper bound on the number of points */ + sp->points = MI_COUNT(mi); + if (sp->points < -MINPOINTS) { + if (sp->pt) { + (void) free((void *) sp->pt); + sp->pt = NULL; + } + if (sp->erase) { + if (sp->splineq) + for (i = 0; i < sp->nsplines; ++i) + if (sp->splineq[i]) { + (void) free((void *) sp->splineq[i]); + sp->splineq[i] = NULL; + } + } + sp->points = NRAND(-sp->points - MINPOINTS + 1) + MINPOINTS; + } else if (sp->points < MINPOINTS) + sp->points = MINPOINTS; + if (!sp->pt) + sp->pt = (splinepointstruct *) malloc(sp->points * + sizeof (splinepointstruct)); + + if (sp->erase) { + sp->max_delta = 16; + sp->redrawing = 0; + sp->last = 0; + sp->nsplines = MI_CYCLES(mi) / 64 + 1; /* So as to be compatible */ + if (!sp->splineq) + sp->splineq = (XPoint **) calloc(sp->nsplines, sizeof (XPoint *)); + for (i = 0; i < sp->nsplines; ++i) + if (!sp->splineq[i]) + sp->splineq[i] = (XPoint *) calloc(sp->points, sizeof (XPoint)); + } else { + sp->max_delta = 3; + sp->nsplines = 0; + } + + MI_CLEARWINDOW(mi); + + /* Initialize points. */ + for (i = 0; i < sp->points; ++i) { + sp->pt[i].pos.x = NRAND(sp->width); + sp->pt[i].pos.y = NRAND(sp->height); + sp->pt[i].delta.x = NRAND(sp->max_delta * 2) - sp->max_delta; + if (sp->pt[i].delta.x <= 0 && sp->width > 1) + --sp->pt[i].delta.x; + sp->pt[i].delta.y = NRAND(sp->max_delta * 2) - sp->max_delta; + if (sp->pt[i].delta.y <= 0 && sp->height > 1) + --sp->pt[i].delta.y; + } + if (MI_NPIXELS(mi) > 2) + sp->color = NRAND(MI_NPIXELS(mi)); +} + +void +draw_spline(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + splinestruct *sp = &splines[MI_SCREEN(mi)]; + int i, t, px, py, zx, zy, nx, ny; + + MI_IS_DRAWN(mi) = True; + + if (sp->erase) + sp->first = (sp->last + 2) % sp->nsplines; + + /* Move the points. */ + for (i = 0; i < sp->points; i++) { + for (;;) { + t = sp->pt[i].pos.x + sp->pt[i].delta.x; + if (t >= 0 && t < sp->width) + break; + sp->pt[i].delta.x = NRAND(sp->max_delta * 2) - sp->max_delta; + if (sp->pt[i].delta.x <= 0 && sp->width > 1) + --sp->pt[i].delta.x; + } + sp->pt[i].pos.x = t; + for (;;) { + t = sp->pt[i].pos.y + sp->pt[i].delta.y; + if (t >= 0 && t < sp->height) + break; + sp->pt[i].delta.y = NRAND(sp->max_delta * 2) - sp->max_delta; + if (sp->pt[i].delta.y <= 0 && sp->height > 1) + --sp->pt[i].delta.y; + } + sp->pt[i].pos.y = t; + } + + if (sp->erase) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + + /* Erase first figure. */ + px = zx = (sp->splineq[sp->first][0].x + + sp->splineq[sp->first][sp->points - 1].x) / 2; + py = zy = (sp->splineq[sp->first][0].y + + sp->splineq[sp->first][sp->points - 1].y) / 2; + for (i = 0; i < sp->points - 1; ++i) { + nx = (sp->splineq[sp->first][i + 1].x + + sp->splineq[sp->first][i].x) / 2; + ny = (sp->splineq[sp->first][i + 1].y + + sp->splineq[sp->first][i].y) / 2; + XDrawSpline(display, window, gc, + px, py, sp->splineq[sp->first][i].x, + sp->splineq[sp->first][i].y, nx, ny); + px = nx; + py = ny; + } + + XDrawSpline(display, window, gc, + px, py, sp->splineq[sp->first][sp->points - 1].x, + sp->splineq[sp->first][sp->points - 1].y, zx, zy); + } + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, sp->color)); + if (++sp->color >= MI_NPIXELS(mi)) + sp->color = 0; + } else + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + + /* Draw the figure. */ + px = zx = (sp->pt[0].pos.x + sp->pt[sp->points - 1].pos.x) / 2; + py = zy = (sp->pt[0].pos.y + sp->pt[sp->points - 1].pos.y) / 2; + for (i = 0; i < sp->points - 1; ++i) { + nx = (sp->pt[i + 1].pos.x + sp->pt[i].pos.x) / 2; + ny = (sp->pt[i + 1].pos.y + sp->pt[i].pos.y) / 2; + XDrawSpline(display, window, gc, + px, py, sp->pt[i].pos.x, sp->pt[i].pos.y, nx, ny); + px = nx; + py = ny; + } + + XDrawSpline(display, window, gc, px, py, + sp->pt[sp->points - 1].pos.x, sp->pt[sp->points - 1].pos.y, zx, zy); + + if (sp->erase) { + for (i = 0; i < sp->points; ++i) { + sp->splineq[sp->last][i].x = sp->pt[i].pos.x; + sp->splineq[sp->last][i].y = sp->pt[i].pos.y; + } + sp->last++; + if (sp->last >= sp->nsplines) + sp->last = 0; + + if (sp->redrawing) { + int j, k; + + sp->redrawpos++; + /* This compensates for the changed sp->last + since last callback */ + + for (k = 0; k < REDRAWSTEP; k++) { + j = (sp->last - sp->redrawpos + sp->nsplines) % + sp->nsplines; +#ifdef BACKWARDS + /* Draw backwards, probably will not see it, + but its the thought ... */ + px = zx = (sp->splineq[j][0].x + + sp->splineq[j][sp->points - 1].x) / 2; + py = zy = (sp->splineq[j][0].y + + sp->splineq[j][sp->points - 1].y) / 2; + for (i = sp->points - 1; i > 0; --i) { + nx = (sp->splineq[j][i - 1].x + + sp->splineq[j][i].x) / 2; + ny = (sp->splineq[j][i - 1].y + + sp->splineq[j][i].y) / 2; + XDrawSpline(display, window, gc, + px, py, sp->splineq[j][i].x, + sp->splineq[j][i].y, nx, ny); + px = nx; + py = ny; + } + + XDrawSpline(display, window, gc, + px, py, sp->splineq[j][0].x, + sp->splineq[j][0].y, zx, zy); +#else + px = zx = (sp->splineq[j][0].x + + sp->splineq[j][sp->points - 1].x) / 2; + py = zy = (sp->splineq[j][0].y + + sp->splineq[j][sp->points - 1].y) / 2; + for (i = 0; i < sp->points - 1; ++i) { + nx = (sp->splineq[j][i + 1].x + + sp->splineq[j][i].x) / 2; + ny = (sp->splineq[j][i + 1].y + + sp->splineq[j][i].y) / 2; + XDrawSpline(display, window, gc, + px, py, sp->splineq[j][i].x, + sp->splineq[j][i].y, nx, ny); + px = nx; + py = ny; + } + + XDrawSpline(display, window, gc, + px, py, sp->splineq[j][sp->points - 1].x, + sp->splineq[j][sp->points - 1].y, zx, zy); +#endif + if (++(sp->redrawpos) >= sp->nsplines - 1) { + sp->redrawing = 0; + break; + } + } + } + } else if (++sp->nsplines > MI_CYCLES(mi)) + init_spline(mi); +} + +/* X spline routine. */ + +static void +XDrawSpline(Display * display, Drawable d, GC gc, int x0, int y0, int x1, int y1, int x2, int y2) +{ + register int xa, ya, xb, yb, xc, yc, xp, yp; + + xa = (x0 + x1) / 2; + ya = (y0 + y1) / 2; + xc = (x1 + x2) / 2; + yc = (y1 + y2) / 2; + xb = (xa + xc) / 2; + yb = (ya + yc) / 2; + + xp = (x0 + xb) / 2; + yp = (y0 + yb) / 2; + if (ABS(xa - xp) + ABS(ya - yp) > SPLINE_THRESH) + XDrawSpline(display, d, gc, x0, y0, xa, ya, xb, yb); + else + XDrawLine(display, d, gc, x0, y0, xb, yb); + + xp = (x2 + xb) / 2; + yp = (y2 + yb) / 2; + if (ABS(xc - xp) + ABS(yc - yp) > SPLINE_THRESH) + XDrawSpline(display, d, gc, xb, yb, xc, yc, x2, y2); + else + XDrawLine(display, d, gc, xb, yb, x2, y2); +} + +void +release_spline(ModeInfo * mi) +{ + if (splines != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + splinestruct *sp = &splines[screen]; + int i; + + if (sp->pt) + (void) free((void *) sp->pt); + if (sp->splineq) { + for (i = 0; i < sp->nsplines; ++i) + if (sp->splineq[i]) + (void) free((void *) sp->splineq[i]); + (void) free((void *) sp->splineq); + } + } + (void) free((void *) splines); + splines = NULL; + } +} + +void +refresh_spline(ModeInfo * mi) +{ + splinestruct *sp = &splines[MI_SCREEN(mi)]; + + if (sp->erase) { + sp->redrawing = 1; + sp->redrawpos = 1; + } else { + MI_CLEARWINDOW(mi); + } +} + +#endif /* MODE_spline */ diff --git a/modes/star.c b/modes/star.c new file mode 100644 index 00000000..8f8bbbb7 --- /dev/null +++ b/modes/star.c @@ -0,0 +1,738 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* star --- flying through an asteroid field */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)star.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Based on TI Explorer Lisp code by John Nguyen + * Copyright (c) 1992 by Jamie Zawinski + * + * 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-Oct-96: Renamed from rock. Added trek and rock options. + * Combined with features from star by Heath Rice + * . + * The Enterprise flys by from a few different views. + * Also have one view of a Romulan ship. + * 7-Sep-96: Fixed problems with 3d mode + * 8-May-96: Blue on left instead of green for 3d. It seems more common + * than green. Use "-left3d Green" if you have the other kind. + * 17-Jan-96: 3D mode for star thanks to . + * Get out your 3D glasses, Red on right and Blue on left. + * 14-Apr-95: Jeremie PETIT added a "move" feature. + * 2-Sep-93: xlock version David Bagley + * 1992: xscreensaver version Jamie Zawinski + */ + +/*- + * original copyright + * 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. + */ + +#ifdef STANDALONE +#define PROGCLASS "Star" +#define HACK_INIT init_star +#define HACK_DRAW draw_star +#define star_opts xlockmore_opts +#define DEFAULTS "*delay: 40000 \n" \ + "*count: 100 \n" \ + "*size: 100 \n" \ + "*ncolors: 200 \n" \ + "*use3d: False \n" \ + "*delta3d: 1.5 \n" \ + "*right3d: red \n" \ + "*left3d: blue \n" \ + "*both3d: magenta \n" \ + "*none3d: black \n" +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ + +#endif /* STANDALONE */ + +#ifdef MODE_star + +#define DEF_TREK "50" +#define DEF_ROCK "False" +#define DEF_STRAIGHT "False" + +static int trek; +static Bool rock; +static Bool straight; + +static XrmOptionDescRec opts[] = +{ + {"-trek", ".star.trek", XrmoptionSepArg, (caddr_t) NULL}, + {"-rock", ".star.rock", XrmoptionNoArg, (caddr_t) "on"}, + {"+rock", ".star.rock", XrmoptionNoArg, (caddr_t) "off"}, + {"-straight", ".star.straight", XrmoptionNoArg, (caddr_t) "on"}, + {"+straight", ".star.straight", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & trek, "trek", "Trek", DEF_TREK, t_Int}, + {(caddr_t *) & rock, "rock", "Rock", DEF_ROCK, t_Bool}, + {(caddr_t *) & straight, "straight", "Straight", DEF_STRAIGHT, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-trek num", "chance of a Star Trek encounter"}, + {"-/+rock", "turn on/off rocks"}, + {"-/+straight", "turn on/off spin and shifting origin"} +}; + +ModeSpecOpt star_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct star_description = +{"star", "init_star", "draw_star", "release_star", + "refresh_star", "init_star", NULL, &star_opts, + 40000, 100, 1, 100, 64, 0.3, "", + "Shows a star field with a twist", 0, NULL}; + +#endif + +typedef struct _BitmapType { + int direction, width, height; +} BitmapType; + +#include "bitmaps/trek-0.xbm" /* Enterprise SOUTH EAST */ +#include "bitmaps/trek-1.xbm" /* Enterprise EAST */ +#ifdef ROMULAN /* Bitmap looks messed up to me. */ +#include "bitmaps/trek-2.xbm" /* Romulan (cloaked?) EAST */ +#define TREKIES 3 +#else +#define TREKIES 2 +#endif + +static BitmapType trekie[] = +{ + {3, trek0_width, trek0_height}, + {2, trek1_width, trek1_height} +#ifdef ROMULAN + , + {2, trek2_width, trek2_height} +#endif +}; + +/*- + * For 3d effect get some 3D glasses, right lens red, and left lens blue. + * Too bad monitors do not emit polarized light. + */ + +#define MIN_STARS 1 +#define MIN_DEPTH 2 /* stars disappear when they get this close */ +#define MAX_DEPTH 60 /* this is where stars appear */ +#define MINSIZE 3 /* how small where pixmaps are not used */ +#define MAXSIZE 200 /* how big (in pixels) stars are at depth 1 */ +#define DEPTH_SCALE 100 /* how many ticks there are between depths */ +#define RESOLUTION 1000 +#define MAX_DEP 0.3 /* how far the displacement can be (percents) */ +#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 stars that are moving (1) + or the stars source (0). */ + +#define GETZDIFF(z) \ + (MI_DELTA3D(mi)*40.0*(1.0-((MAX_DEPTH*DEPTH_SCALE/2)/(z+20.0*DEPTH_SCALE)))) + /* the compiler needs to optimize the calculations here */ + +/*- + 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. + */ + +#define TREKBITS(n,w,h)\ + sp->trekPixmaps[sp->init_treks++]=\ + XCreateBitmapFromData(display,window,(char *)n,w,h) + + +typedef struct { + int real_size; + int r; + unsigned long color; + int theta; + int depth; + int size, x, y; + int diff; +} astar; + +typedef struct { + XPoint loc, delta, size; +} trekstruct; + +typedef struct { + int current_delta; /* observer Z rotation */ + int new_delta; + int dchange_tick; + int width, height; + int midx, midy; + int current_dep[2]; + int speed_dep[2]; + short direction[2]; + int rotate_p, speed, nstars; + float max_dep; + int move_p; + int dep_x, dep_y; + int max_star_size; + astar *astars; + Pixmap *pixmaps; + Pixmap trekPixmaps[TREKIES]; + int init_treks; + int current_trek; + GC stippledGC; + trekstruct trek; +} starstruct; + +static float cos_array[RESOLUTION], sin_array[RESOLUTION]; +static float depths[(MAX_DEPTH + 1) * DEPTH_SCALE]; + +static starstruct *stars = NULL; + +static void star_draw(ModeInfo * mi, astar * astars, int draw_p); +static int compute_move(starstruct * sp, int axe); + +static void +star_compute(ModeInfo * mi, astar * astars) +{ + starstruct *sp = &stars[MI_SCREEN(mi)]; + double factor = depths[astars->depth]; + double rsize = astars->real_size * factor; + + astars->size = (int) (rsize + 0.5); + astars->diff = (int) (int) GETZDIFF(astars->depth); + astars->x = sp->midx + (int) (cos_array[astars->theta] * astars->r * factor); + astars->y = sp->midy + (int) (sin_array[astars->theta] * astars->r * factor); + if (sp->move_p) { + double move_factor = (double) (MOVE_STYLE - (double) astars->depth / + (double) ((MAX_DEPTH + 1) * (double) DEPTH_SCALE)); + + /* move_factor is 0 when the star is close, 1 when far */ + astars->x += (int) ((double) sp->dep_x * move_factor); + astars->y += (int) ((double) sp->dep_y * move_factor); + } +} + +static void +star_reset(ModeInfo * mi, astar * astars) +{ + starstruct *sp = &stars[MI_SCREEN(mi)]; + + astars->real_size = sp->max_star_size; + astars->r = (int) (RESOLUTION * 0.7 + NRAND(30 * RESOLUTION)); + astars->theta = NRAND(RESOLUTION); + astars->depth = MAX_DEPTH * DEPTH_SCALE; + if (MI_NPIXELS(mi) > 2) + astars->color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + astars->color = MI_WHITE_PIXEL(mi); + star_compute(mi, astars); + star_draw(mi, astars, True); +} + +static void +star_tick(ModeInfo * mi, astar * astars, int d) +{ + starstruct *sp = &stars[MI_SCREEN(mi)]; + + if (astars->depth > 0) { + star_draw(mi, astars, False); + astars->depth -= sp->speed; + if (sp->rotate_p) + astars->theta = (astars->theta + d) % RESOLUTION; + while (astars->theta < 0) + astars->theta += RESOLUTION; + if (astars->depth < (MIN_DEPTH * DEPTH_SCALE)) + astars->depth = 0; + else { + star_compute(mi, astars); + star_draw(mi, astars, True); + } + } else if (!NRAND(40)) + star_reset(mi, astars); +} + +static void +move_trek(starstruct * sp, int direction, int width, int height) +{ + switch (direction) { /* Format: 0 = N, 1 = NE, etc */ + case 2: /* EAST */ + sp->trek.loc.x = sp->width; + sp->trek.loc.y = NRAND(sp->height); + sp->trek.delta.x = -(NRAND(3) + 1); + sp->trek.delta.y = NRAND(7) - 4; + sp->trek.size.x = width; + sp->trek.size.y = height; + break; + case 3: /* SOUTH EAST */ + if (LRAND() & 1) { /* Top to Right */ + sp->trek.loc.x = NRAND(sp->width); + sp->trek.loc.y = -height; + } else { /* Left to Bottom */ + sp->trek.loc.x = -width; + sp->trek.loc.y = NRAND(sp->height); + } + sp->trek.delta.x = NRAND(3) + 1; + sp->trek.delta.y = NRAND(3) + 1; + sp->trek.size.x = width; + sp->trek.size.y = height; + break; + case 4: /* SOUTH */ + sp->trek.loc.x = NRAND(sp->width); + sp->trek.loc.y = sp->height; + sp->trek.delta.x = NRAND(7) - 4; + sp->trek.delta.y = -(NRAND(3) + 1); + sp->trek.size.x = width; + sp->trek.size.y = height; + break; + default: + (void) printf("not implemented for direction %d", direction); + break; + } +} + +static void +draw_trek(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + starstruct *sp = &stars[MI_SCREEN(mi)]; + int new_one = 0; + + if (TREKIES == sp->current_trek) + if (NRAND(10000) < trek) { + sp->current_trek = NRAND(TREKIES); + new_one = 1; + move_trek(sp, trekie[sp->current_trek].direction, + trekie[sp->current_trek].width, trekie[sp->current_trek].height); + } + if (TREKIES != sp->current_trek) { + sp->trek.loc.x += sp->trek.delta.x; + sp->trek.loc.y += sp->trek.delta.y; + + if ((sp->trek.loc.x < -sp->trek.size.x) || + (sp->trek.loc.y < -sp->trek.size.y) || + (sp->trek.loc.y > sp->height) || + (sp->trek.loc.x > sp->width)) { + sp->current_trek = TREKIES; + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, + sp->trek.loc.x - sp->trek.delta.x, + sp->trek.loc.y - sp->trek.delta.y, + sp->trek.size.x, sp->trek.size.y); + } else { + XSetForeground(display, sp->stippledGC, MI_WHITE_PIXEL(mi)); + XSetTSOrigin(display, sp->stippledGC, sp->trek.loc.x, sp->trek.loc.y); + XSetStipple(display, sp->stippledGC, sp->trekPixmaps[sp->current_trek]); + XSetFillStyle(display, sp->stippledGC, FillOpaqueStippled); + XFillRectangle(display, window, sp->stippledGC, + sp->trek.loc.x, sp->trek.loc.y, + sp->trek.size.x, sp->trek.size.y); + + if (!new_one) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + ERASE_IMAGE(display, window, gc, + sp->trek.loc.x, sp->trek.loc.y, + (sp->trek.loc.x - sp->trek.delta.x), + (sp->trek.loc.y - sp->trek.delta.y), + sp->trek.size.x, sp->trek.size.y); + + } + } + } +} + +static void +star_draw(ModeInfo * mi, astar * astars, int draw_p) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + starstruct *sp = &stars[MI_SCREEN(mi)]; + + if (draw_p) { + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) + XSetForeground(MI_DISPLAY(mi), gc, MI_NONE_COLOR(mi)); + else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + } else + XSetForeground(display, gc, astars->color); + } else + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + if (astars->x <= 0 || astars->y <= 0 || + astars->x >= sp->width || astars->y >= sp->height) { + /* This means that if a star 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 star would have been visible again. + Oh well. + */ + if (!sp->move_p) + astars->depth = 0; + return; + } + if (astars->size <= 1) { + if (MI_IS_USE3D(mi)) { + if (draw_p) { + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + } + XDrawPoint(display, window, gc, astars->x - astars->diff, astars->y); + if (draw_p) + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XDrawPoint(display, window, gc, astars->x + astars->diff, astars->y); + if (draw_p && MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else + XDrawPoint(display, window, gc, astars->x, astars->y); + } else if (astars->size <= MINSIZE || !draw_p) { + if (MI_IS_USE3D(mi)) { + if (draw_p) { + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + } + XFillRectangle(display, window, gc, + astars->x - astars->size / 2 - astars->diff, + astars->y - astars->size / 2, + astars->size, astars->size); + if (draw_p) + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XFillRectangle(display, window, gc, + astars->x - astars->size / 2 + astars->diff, + astars->y - astars->size / 2, + astars->size, astars->size); + if (draw_p && MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else + XFillRectangle(display, window, gc, + astars->x - astars->size / 2, astars->y - astars->size / 2, + astars->size, astars->size); + } else if (astars->size < sp->max_star_size) { + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + XCopyPlane(display, sp->pixmaps[astars->size - MINSIZE], window, gc, + 0, 0, astars->size, astars->size, + astars->x - astars->size / 2 - astars->diff, + astars->y - astars->size / 2, + 1L); + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XCopyPlane(display, sp->pixmaps[astars->size - MINSIZE], window, gc, + 0, 0, astars->size, astars->size, + astars->x - astars->size / 2 + astars->diff, + astars->y - astars->size / 2, + 1L); + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else + XCopyPlane(display, sp->pixmaps[astars->size - MINSIZE], window, gc, + 0, 0, astars->size, astars->size, + astars->x - astars->size / 2, astars->y - astars->size / 2, + 1L); + } +} + +static void +init_pixmaps(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + starstruct *sp = &stars[MI_SCREEN(mi)]; + int size = MI_SIZE(mi); + int i; + XGCValues gcv; + GC fg_gc = 0, bg_gc = 0; + + 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; + if (sp->max_star_size > MAXSIZE) + sp->max_star_size = MAXSIZE; + sp->pixmaps = (Pixmap *) calloc(sp->max_star_size, sizeof (Pixmap)); + for (i = 0; i < sp->max_star_size; i++) { + int h = i + MINSIZE; + Pixmap p; + XPoint points[7]; + + if (rock) + p = XCreatePixmap(display, window, h, h, 1); + else /* Dunno why this is required */ + p = XCreatePixmap(display, window, 2 * h, 2 * h, 1); + sp->pixmaps[i] = p; + if (!p) { + (void) fprintf(stderr, "Could not allocate pixmaps, in star\n"); + return; + } + if (!fg_gc) { /* must use drawable of pixmap, not window (fmh) */ + gcv.foreground = 1; + gcv.background = 0; + fg_gc = XCreateGC(display, p, GCForeground | GCBackground, &gcv); + } + if (!bg_gc) { /* must use drawable of pixmap, not window (fmh) */ + gcv.foreground = 0; + gcv.background = 1; + bg_gc = XCreateGC(display, p, GCForeground | GCBackground, &gcv); + } + XFillRectangle(display, p, bg_gc, 0, 0, h, h); + if (rock) { + points[0].x = (int) ((double) h * 0.15); + points[0].y = (int) ((double) h * 0.85); + points[1].x = (int) ((double) h * 0.00); + points[1].y = (int) ((double) h * 0.20); + points[2].x = (int) ((double) h * 0.30); + points[2].y = (int) ((double) h * 0.00); + points[3].x = (int) ((double) h * 0.40); + points[3].y = (int) ((double) h * 0.10); + points[4].x = (int) ((double) h * 0.90); + points[4].y = (int) ((double) h * 0.10); + points[5].x = (int) ((double) h * 1.00); + points[5].y = (int) ((double) h * 0.55); + points[6].x = (int) ((double) h * 0.45); + points[6].y = (int) ((double) h * 1.00); + XFillPolygon(display, p, fg_gc, points, 7, Nonconvex, CoordModeOrigin); + } else { + XFillArc(display, p, fg_gc, 0, 0, h, h, 0, 23040); + } + } + XFreeGC(display, fg_gc); + XFreeGC(display, bg_gc); + if (!sp->stippledGC) { + gcv.foreground = MI_BLACK_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + if ((sp->stippledGC = XCreateGC(display, window, + GCForeground | GCBackground, &gcv)) == None) + return; + } + if (!sp->init_treks && trek) { +/* PURIFY 4.0.1 on SunOS4 reports a 3264 byte memory leak on the next line. * + PURIFY 4.0.1 on Solaris 2 does not report this memory leak. */ + TREKBITS(trek0_bits, trek0_width, trek0_height); + TREKBITS(trek1_bits, trek1_width, trek1_height); +#ifdef ROMULAN + TREKBITS(trek2_bits, trek2_width, trek2_height); +#endif + } +} + +static void +tick_stars(ModeInfo * mi, int d) +{ + starstruct *sp = &stars[MI_SCREEN(mi)]; + int i; + + if (sp->move_p) { + sp->dep_x = compute_move(sp, 0); + sp->dep_y = compute_move(sp, 1); + } + for (i = 0; i < sp->nstars; i++) + star_tick(mi, &sp->astars[i], d); +} + +static int +compute_move(starstruct * sp, int axe) + /* 0 for x, 1 for y */ +{ + int limit[2]; + int change = 0; + + limit[0] = sp->midx; + limit[1] = sp->midy; + + sp->current_dep[axe] += sp->speed_dep[axe]; /* We adjust the displacement */ + + if (sp->current_dep[axe] > (int) (limit[axe] * sp->max_dep)) { + if (sp->current_dep[axe] > limit[axe]) + sp->current_dep[axe] = limit[axe]; + sp->direction[axe] = -1; + } /* This is when we reach the upper screen limit */ + if (sp->current_dep[axe] < (int) (-limit[axe] * sp->max_dep)) { + if (sp->current_dep[axe] < -limit[axe]) + sp->current_dep[axe] = -limit[axe]; + sp->direction[axe] = 1; + } /* This is when we reach the lower screen limit */ + if (sp->direction[axe] == 1) /* We adjust the sp->speed_dep */ + sp->speed_dep[axe] += 1; + else if (sp->direction[axe] == -1) + sp->speed_dep[axe] -= 1; + + if (sp->speed_dep[axe] > MAX_DEP_SPEED) + sp->speed_dep[axe] = MAX_DEP_SPEED; + else if (sp->speed_dep[axe] < -MAX_DEP_SPEED) + sp->speed_dep[axe] = -MAX_DEP_SPEED; + + if (!straight && !NRAND(DIRECTION_CHANGE_RATE)) { + /* We change direction */ + change = (int) (LRAND() & 1); + if (change != 1) { + if (sp->direction[axe] == 0) + sp->direction[axe] = change - 1; /* 0 becomes either 1 or -1 */ + else + sp->direction[axe] = 0; /* -1 or 1 become 0 */ + } + } + return (sp->current_dep[axe]); +} + +void +init_star(ModeInfo * mi) +{ + starstruct *sp; + int i; + static int first = 1; + + if (stars == NULL) { + if ((stars = (starstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (starstruct))) == NULL) + return; + } + sp = &stars[MI_SCREEN(mi)]; + + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + sp->midx = sp->width / 2; + sp->midy = sp->height / 2; + sp->speed = 100; + sp->rotate_p = !straight; + sp->max_dep = (straight) ? 0 : MAX_DEP; + sp->move_p = True; + sp->dep_x = 0; + sp->dep_y = 0; + sp->current_trek = TREKIES; + sp->nstars = MI_COUNT(mi); + if (sp->nstars < -MIN_STARS) { + if (sp->astars) { + (void) free((void *) sp->astars); + sp->astars = NULL; + } + sp->nstars = NRAND(-sp->nstars - MIN_STARS + 1) + MIN_STARS; + } else if (sp->nstars < MIN_STARS) + sp->nstars = MIN_STARS; + if (sp->speed < 1) + sp->speed = 1; + if (sp->speed > 100) + sp->speed = 100; + + if (first) { + first = 0; + for (i = 0; i < RESOLUTION; i++) { + sin_array[i] = SINF((((float) i) / (RESOLUTION / 2.0)) * M_PI); + cos_array[i] = COSF((((float) i) / (RESOLUTION / 2.0)) * M_PI); + } + /* We actually only need i/speed of these. Oh well. */ + for (i = 1; i < (int) (sizeof (depths) / sizeof (depths[0])); i++) + depths[i] = (float) atan(((double) 0.5) / (((double) i) / DEPTH_SCALE)); + depths[0] = M_PI_2; /* avoid division by 0 */ + } + if (!sp->astars) + sp->astars = (astar *) calloc(sp->nstars, sizeof (astar)); + if (!sp->pixmaps) + init_pixmaps(mi); + + /* don't want any exposure events from XCopyPlane */ + XSetGraphicsExposures(MI_DISPLAY(mi), MI_GC(mi), False); + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_star(ModeInfo * mi) +{ + starstruct *sp = &stars[MI_SCREEN(mi)]; + + MI_IS_DRAWN(mi) = True; + + if (sp->current_delta != sp->new_delta) { + if (sp->dchange_tick++ == 5) { + sp->dchange_tick = 0; + if (sp->current_delta < sp->new_delta) + sp->current_delta++; + else + sp->current_delta--; + } + } else { + if (!NRAND(50)) { + sp->new_delta = (NRAND(11) - 5); + if (!NRAND(10)) + sp->new_delta *= 5; + } + } + tick_stars(mi, sp->current_delta); + draw_trek(mi); +} + +void +release_star(ModeInfo * mi) +{ + if (stars != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + Display *display = MI_DISPLAY(mi); + starstruct *sp = &stars[screen]; + int i; + + if (sp->astars != NULL) + (void) free((void *) sp->astars); + if (sp->pixmaps != NULL) { + for (i = 0; i < sp->max_star_size; i++) + XFreePixmap(display, sp->pixmaps[i]); + (void) free((void *) sp->pixmaps); + } + if (sp->stippledGC != NULL) + XFreeGC(display, sp->stippledGC); + for (i = 0; i < sp->init_treks; i++) + XFreePixmap(display, sp->trekPixmaps[i]); + } + (void) free((void *) stars); + stars = NULL; + } +} + +void +refresh_star(ModeInfo * mi) +{ + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } +} + +#endif /* MODE_star */ diff --git a/modes/starfish.c b/modes/starfish.c new file mode 100644 index 00000000..1c904b29 --- /dev/null +++ b/modes/starfish.c @@ -0,0 +1,625 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* starfish --- */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)starfish.c 4.11 98/06/11 xlockmore"; + +#endif + +/* 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. + * + * Revision History: + * 24-Feb-98: xlockmore version by Jouk Jansen + * 1997 : original xscreensaver version by Jamie Zawinski + */ + +#ifdef STANDALONE +#define PROGCLASS "Starfish" +#define HACK_INIT init_starfish +#define HACK_DRAW draw_starfish +#define starfish_opts xlockmore_opts +#define DEFAULTS "*delay: 2000 \n" \ + "*cycles: 1000 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ + +#ifdef MODE_starfish + +#include "spline.h" + +#define DEF_ROTV "-1" +#define DEF_THICKNESS "-20" +#define DEF_CYCLE "True" +#define DEF_BLOB "False" +#define DEF_CYCLESPEED "3" + +static int cyclespeed; +static float rotv, thickness; + +static Bool blob, cycle_p; + +static XrmOptionDescRec opts[] = +{ + {"-cyclespeed", "starfish.cyclespeed", XrmoptionSepArg, (caddr_t) NULL}, + {"-rotation", "starfish.rotation", XrmoptionSepArg, (caddr_t) NULL}, + {"-thickness", "starfish.thickness", XrmoptionSepArg, (caddr_t) NULL}, + {"-blob", ".starfish.blob", XrmoptionNoArg, (caddr_t) "on"}, + {"+blob", ".starfish.blob", XrmoptionNoArg, (caddr_t) "off"}, + {"-cycle", ".starfish.cycle", XrmoptionNoArg, (caddr_t) "on"}, + {"+cycle", ".starfish.cycle", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ +{(caddr_t *) & cyclespeed, "cyclespeed", "CycleSpeed", DEF_CYCLESPEED, t_Int}, + {(caddr_t *) & rotv, "rotation", "Rotation", DEF_ROTV, t_Float}, + {(caddr_t *) & thickness, "thickness", "Thickness", DEF_THICKNESS, t_Float}, + {(caddr_t *) & blob, "blob", "Blob", DEF_BLOB, t_Bool}, + {(caddr_t *) & cycle_p, "cycle", "Cycle", DEF_CYCLE, t_Bool} +}; + +static OptionStruct desc[] = +{ + {"-cyclespeed num", "Cycling speed"}, + {"-rotation num", "Rotation velocity"}, + {"-thickness num", "Thickness"}, + {"-/+blob", "turn on/off blob"}, + {"-/+cycle", "turn on/off cycle"} +}; + +ModeSpecOpt starfish_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct starfish_description = +{"starfish", "init_starfish", "draw_starfish", "release_starfish", + "refresh_starfish", "init_starfish", NULL, &starfish_opts, + 10000, 1, 1, 1, 64, 1.0, "", + "Shows starfish", 0, NULL}; + +#endif + +#define SCALE 1000 /* fixed-point math, for sub-pixel motion */ + +#define RAND(n) ((long) ((LRAND() & 0x7fffffff) % ((long) (n)))) +#define RANDSIGN() ((LRAND() & 1) ? 1 : -1) + +enum starfish_mode { + pulse, + zoom +}; + + +typedef struct { + 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 */ + double 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 *splines; + XPoint *prev; + int n_prev; + GC gc; + Colormap cmap; + XColor *colors; + int ncolors; + Bool cycle_p, mono_p, no_colors; + unsigned int fg_index; + int size, winwidth, winheight, stage, counter; + float thickness; + unsigned long blackpixel, whitepixel, fg, bg; + int direction; +} starfishstruct; + +static starfishstruct *starfishes = NULL; + +static void +make_starfish(ModeInfo * mi) +{ + starfishstruct *sp = &starfishes[MI_SCREEN(mi)]; + int i; + int mid; + + sp->elasticity = SCALE * sp->thickness; + + if (sp->elasticity == 0.0) + /* bell curve from 0-15, avg 7.5 */ + sp->elasticity = RAND(5 * SCALE) + RAND(5 * SCALE) + RAND(5 * SCALE); + + if (sp->rotv == -1) + /* bell curve from 0-12 degrees, avg 6 */ + sp->rotv = (double) 4.0 *((double) LRAND() / (double) MAXRAND + + (double) LRAND() / (double) MAXRAND + + (double) LRAND() / (double) MAXRAND); + + sp->rotv /= 360; /* convert degrees to ratio */ + + if (sp->blob_p) { + sp->elasticity *= 3.0; + sp->rotv *= 3; + } + sp->rot_max = sp->rotv * 2; + sp->rota = 0.0004 + 0.0002 * (double) LRAND() / (double) MAXRAND; + + + if (!(LRAND() % 20)) + sp->size *= (int) (0.35 * ((double) LRAND() / (double) MAXRAND + + (double) LRAND() / (double) MAXRAND) + 0.3); + + { + static char skips[] = + {2, 2, 2, 2, 3, 3, 3, 6, 6, 12}; + + sp->skip = skips[LRAND() % sizeof (skips)]; + } + + if (!(LRAND() % (sp->skip == 2 ? 3 : 12))) + sp->mode = zoom; + else + sp->mode = pulse; + + sp->winwidth *= SCALE; + sp->winheight *= SCALE; + sp->size *= SCALE; + + sp->max_r = sp->size; + sp->min_r = 0; + + if (sp->min_r < (5 * SCALE)) + sp->min_r = (5 * SCALE); + mid = ((sp->min_r + sp->max_r) / 2); + + sp->x = sp->winwidth / 2; + sp->y = sp->winheight / 2; + + sp->th = 2.0 * M_PI * ((double) LRAND() / (double) MAXRAND) * 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 (sp->skip > 3) + nsizes -= 4; + sp->npoints = sp->skip * sizes[LRAND() % nsizes]; + } + + if (sp->splines) + free_spline(sp->splines); + sp->splines = make_spline(sp->npoints); + + if (sp->r) + (void) free((void *) sp->r); + sp->r = (long *) malloc(sizeof (*sp->r) * sp->npoints); + + for (i = 0; i < sp->npoints; i++) + sp->r[i] = ((i % sp->skip) == 0) ? 0 : sp->size; +} + + +void +release_starfish(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + + if (starfishes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + starfishstruct *sp = &starfishes[screen]; + + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + MI_WHITE_PIXEL(mi) = sp->whitepixel; + MI_BLACK_PIXEL(mi) = sp->blackpixel; +#ifndef STANDALONE + MI_FG_PIXEL(mi) = sp->fg; + MI_BG_PIXEL(mi) = sp->bg; +#endif + if (sp->colors && sp->ncolors && !sp->no_colors) + free_colors(display, sp->cmap, sp->colors, sp->ncolors); + if (sp->colors) + (void) free((void *) sp->colors); + XFreeColormap(display, sp->cmap); + } + if (sp->gc != NULL) + XFreeGC(display, sp->gc); + if (sp->splines) + free_spline(sp->splines); + if (sp->r) + (void) free((void *) sp->r); + if (sp->prev) + (void) free((void *) sp->prev); + } + (void) free((void *) starfishes); + starfishes = NULL; + } +} + + +static void +throb_starfish(starfishstruct * sp) +{ + int i; + double frac = ((M_PI + M_PI) / sp->npoints); + + for (i = 0; i < sp->npoints; i++) { + double r = sp->r[i]; + double ra = (r > 0.0 ? r : -r); + double th = (sp->th > 0 ? sp->th : -sp->th); + double x, y; + double elasticity = sp->elasticity; + + /* place control points evenly around perimiter, shifted by theta */ + x = sp->x + (ra * cos(i * frac + th)); + y = sp->y + (ra * sin(i * frac + th)); + + sp->splines->control_x[i] = x / SCALE; + sp->splines->control_y[i] = y / SCALE; + + if (sp->mode == zoom && ((i % sp->skip) == 0)) + continue; + + /* Slow down near the end points: move fastest in the middle. */ + { + double ratio = ra / (double) (sp->max_r - sp->min_r); + + if (ratio > 0.5) + ratio = 1 - ratio; /* flip */ + ratio *= 2.0; /* normalize */ + ratio = (ratio * 0.9) + 0.1; /* fudge */ + elasticity = elasticity * ratio; + } + + + /* Increase/decrease radius by elasticity */ + ra += (r >= 0.0 ? elasticity : -elasticity); + if ((i % sp->skip) == 0) + ra += (elasticity / 2.0); + + r = ra * (r >= 0.0 ? 1.0 : -1.0); + + /* If we've reached the end (too long or too short) reverse direction. */ + if ((ra > sp->max_r && r >= 0.0) || + (ra < sp->min_r && r < 0.0)) + r = -r; + + sp->r[i] = r; + } +} + + +static void +spin_starfish(starfishstruct * sp) +{ + double th = sp->th; + + if (th < 0) + th = -(th + sp->rotv); + else + th += sp->rotv; + + if (th > (M_PI + M_PI)) + th -= (M_PI + M_PI); + else if (th < 0) + th += (M_PI + M_PI); + + sp->th = (sp->th > 0 ? th : -th); + + sp->rotv += sp->rota; + + if (sp->rotv > sp->rot_max || + sp->rotv < -sp->rot_max) { + sp->rota = -sp->rota; + } + /* If it stops, start it going in the other direction. */ + else if (sp->rotv < 0) { + if (LRAND() & 1) { + /* keep going in the same direction */ + sp->rotv = 0; + if (sp->rota < 0) + sp->rota = -sp->rota; + } else { + /* reverse gears */ + sp->rotv = -sp->rotv; + sp->rota = -sp->rota; + sp->th = -sp->th; + } + } + /* Alter direction of rotational acceleration randomly. */ + if (!(LRAND() % 120)) + sp->rota = -sp->rota; + + /* Change acceleration very occasionally. */ + if (!(LRAND() % 200)) { + if (LRAND() & 1) + sp->rota *= 1.2; + else + sp->rota *= 0.8; + } +} + + +static void +draw1_starfish(Display * display, Drawable drawable, GC gc, starfishstruct * sp) +{ + compute_closed_spline(sp->splines); + if (sp->prev) { + XPoint *points = (XPoint *) + malloc(sizeof (XPoint) * (sp->n_prev + sp->splines->n_points + 2)); + int i = sp->splines->n_points; + int j = sp->n_prev; + + (void) memcpy((char *) points, (char *) sp->splines->points, + (i * sizeof (*points))); + (void) memcpy((char *) (points + i), (char *) sp->prev, + (j * sizeof (*points))); + + if (sp->blob_p) + XClearWindow(display, drawable); + XFillPolygon(display, drawable, gc, points, i + j, + Complex, CoordModeOrigin); + (void) free((void *) points); + + (void) free((void *) sp->prev); + sp->prev = NULL; + } + sp->prev = (XPoint *) malloc(sp->splines->n_points * sizeof (XPoint)); + (void) memcpy((char *) sp->prev, (char *) sp->splines->points, + sp->splines->n_points * sizeof (XPoint)); + sp->n_prev = sp->splines->n_points; + +#ifdef DEBUG + if (sp->blob_p) { + int i; + + for (i = 0; i < sp->npoints; i++) + XDrawLine(display, drawable, gc, sp->x / SCALE, sp->y / SCALE, + sp->splines->control_x[i], sp->splines->control_y[i]); + } +#endif +} + + +void +init_starfish(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + XGCValues gcv; + starfishstruct *sp; + +/* initialize */ + if (starfishes == NULL) { + + if ((starfishes = (starfishstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (starfishstruct))) == NULL) + return; + } + sp = &starfishes[MI_SCREEN(mi)]; + + if (MI_IS_FULLRANDOM(mi)) { + if (NRAND(10) == 9) + sp->blob_p = True; + else + sp->blob_p = False; + if (NRAND(8) == 7) + sp->cycle_p = False; + else + sp->cycle_p = True; + } else { + sp->blob_p = blob; + sp->cycle_p = cycle_p; + } + sp->rotv = (double) rotv; + sp->direction = (LRAND() & 1) ? 1 : -1; + if (thickness < 0) + sp->thickness = -thickness * (float) LRAND() / (float) MAXRAND; + else + sp->thickness = thickness; + if (sp->blob_p) + sp->fg_index = MI_BLACK_PIXEL(mi); + else + sp->fg_index = MI_WHITE_PIXEL(mi); + + if (!sp->gc) { + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XColor color; + +#ifndef STANDALONE + extern char *background; + extern char *foreground; + + sp->fg = MI_FG_PIXEL(mi); + sp->bg = MI_BG_PIXEL(mi); +#endif + sp->blackpixel = MI_BLACK_PIXEL(mi); + sp->whitepixel = MI_WHITE_PIXEL(mi); + sp->cmap = /*MI_COLORMAP(mi); */ + XCreateColormap(display, window, MI_VISUAL(mi), AllocNone); + XSetWindowColormap(display, window, sp->cmap); + (void) XParseColor(display, sp->cmap, "black", &color); + (void) XAllocColor(display, sp->cmap, &color); + MI_BLACK_PIXEL(mi) = color.pixel; + (void) XParseColor(display, sp->cmap, "white", &color); + (void) XAllocColor(display, sp->cmap, &color); + MI_WHITE_PIXEL(mi) = color.pixel; +#ifndef STANDALONE + (void) XParseColor(display, sp->cmap, background, &color); + (void) XAllocColor(display, sp->cmap, &color); + MI_BG_PIXEL(mi) = color.pixel; + (void) XParseColor(display, sp->cmap, foreground, &color); + (void) XAllocColor(display, sp->cmap, &color); + MI_FG_PIXEL(mi) = color.pixel; +#endif + sp->colors = 0; + sp->ncolors = 0; + } + gcv.foreground = sp->fg_index; + gcv.fill_rule = EvenOddRule; + sp->gc = XCreateGC(display, window, GCForeground | GCFillRule, &gcv); + } + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { +/* Set up colour map */ + if (sp->colors && sp->ncolors && !sp->no_colors) + free_colors(display, sp->cmap, sp->colors, sp->ncolors); + if (sp->colors) + (void) free((void *) sp->colors); + sp->colors = 0; + sp->ncolors = MI_NCOLORS(mi); + if (sp->ncolors < 2) + sp->ncolors = 2; + if (sp->ncolors <= 2) + sp->mono_p = True; + else + sp->mono_p = False; + + if (sp->mono_p) + sp->colors = 0; + else + sp->colors = (XColor *) malloc(sizeof (*sp->colors) * (sp->ncolors + 1)); + + if (sp->mono_p || sp->blob_p) + sp->cycle_p = False; + if (!sp->mono_p) { + if (LRAND() % 3) + make_smooth_colormap(mi, sp->cmap, sp->colors, &sp->ncolors, + True, &sp->cycle_p); + else + make_uniform_colormap(mi, sp->cmap, sp->colors, &sp->ncolors, + True, &sp->cycle_p); + } + XInstallColormap(display, sp->cmap); + if (sp->ncolors < 2) { + sp->ncolors = 2; + sp->no_colors = True; + } else + sp->no_colors = False; + if (sp->ncolors <= 2) + sp->mono_p = True; + + if (sp->mono_p) + sp->cycle_p = False; + + sp->fg_index = 0; + +/* if (!sp->mono_p && !sp->blob_p) + { + gcv.foreground = sp->colors[sp->fg_index].pixel; + XSetWindowBackground (display, window, gcv.foreground); + } */ + + } else + sp->fg_index = NRAND(MI_NPIXELS(mi)); + + sp->size = (MI_WIDTH(mi) < MI_HEIGHT(mi) ? MI_WIDTH(mi) : MI_HEIGHT(mi)); + if (sp->blob_p) + sp->size /= 2; + else + sp->size = (int) (sp->size * 1.3); + sp->winwidth = MI_WIDTH(mi); + sp->winheight = MI_HEIGHT(mi); + MI_CLEARWINDOW(mi); + if (sp->prev) { + (void) free((void *) sp->prev); + sp->prev = NULL; + } + sp->stage = 0; + sp->counter = 0; + make_starfish(mi); +} + +static void +run_starfish(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + starfishstruct *sp = &starfishes[MI_SCREEN(mi)]; + + throb_starfish(sp); + spin_starfish(sp); + draw1_starfish(display, window, sp->gc, sp); + + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + if (sp->mono_p) { + if (!sp->blob_p) { + sp->fg_index = (sp->fg_index == MI_BLACK_PIXEL(mi) ? + MI_BLACK_PIXEL(mi) : MI_BLACK_PIXEL(mi)); + } + XSetForeground(display, sp->gc, sp->fg_index); + } else { + sp->fg_index = (sp->fg_index + 1) % sp->ncolors; + XSetForeground(display, sp->gc, sp->colors[sp->fg_index].pixel); + } + } else { + if (MI_NPIXELS(mi) > 2) + XSetForeground(display, sp->gc, MI_PIXEL(mi, sp->fg_index)); + else if (sp->fg_index) + XSetForeground(display, sp->gc, MI_BLACK_PIXEL(mi)); + else + XSetForeground(display, sp->gc, MI_WHITE_PIXEL(mi)); + if (++sp->fg_index >= (unsigned int) MI_NPIXELS(mi)) + sp->fg_index = 0; + } +} + +void +draw_starfish(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + starfishstruct *sp = &starfishes[MI_SCREEN(mi)]; + + if (sp->no_colors) { + init_starfish(mi); + return; + } + MI_IS_DRAWN(mi) = True; + + if (!sp->stage) + run_starfish(mi); + else if (sp->cycle_p) { + rotate_colors(display, sp->cmap, sp->colors, sp->ncolors, sp->direction); + + if (!NRAND(512)) + sp->direction = -sp->direction; + } + sp->stage++; + + if (sp->stage > (2 * sp->blob_p + 1) * cyclespeed) { + sp->stage = 0; + sp->counter++; + } + if (sp->counter > MI_CYCLES(mi)) { + /* Every now and then, restart the mode */ + init_starfish(mi); + } +} +void +refresh_starfish(ModeInfo * mi) +{ + init_starfish(mi); +} + +#endif /* MODE_starfish */ diff --git a/modes/strange.c b/modes/strange.c new file mode 100644 index 00000000..8ad233ee --- /dev/null +++ b/modes/strange.c @@ -0,0 +1,419 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* strange --- strange attractors */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)strange.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 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. + * + * 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@jwz.org: turned into a standalone program. + * Made it render into an offscreen bitmap and then copy + * that onto the screen, to reduce flicker. + * + * strange attractors are not so hard to find... + */ + +#ifdef STANDALONE +#define PROGCLASS "Strange" +#define HACK_INIT init_strange +#define HACK_DRAW draw_strange +#define strange_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \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 */ + +#ifdef MODE_strange + +ModeSpecOpt strange_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct strange_description = +{"strange", "init_strange", "draw_strange", "release_strange", + "init_strange", "init_strange", NULL, &strange_opts, + 1000, 1, 1, 1, 64, 1.0, "", + "Shows strange attractors", 0, NULL}; + +#endif + +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 ? -A->Fold[ (-(a))&(UNIT2-1) ] : A->Fold[ (a)&(UNIT2-1) ] + +#if 0 +#define DO_FOLD(a) (a)<-UNIT2 ? -A->Fold[(-(a))%UNIT2] : (a)<0 ? -A->Fold[ -(a) ] :\ +(a)>UNIT2 ? A->Fold[ (a)%UNIT2 ] : A->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 ) ) +#endif + +/******************************************************************/ + +#define MAX_PRM 3*5 + +typedef struct _ATTRACTOR { + DBL Prm1[MAX_PRM], Prm2[MAX_PRM]; + PRM Prm[MAX_PRM], *Fold; + void (*Iterate) (struct _ATTRACTOR *, 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 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(ATTRACTOR * A, 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 = A->Prm[1] * xx + A->Prm[2] * xy + A->Prm[3] * yy + A->Prm[4] * x2y; + Tmp = A->Prm[0] - y + (Tmp / UNIT); + *xo = DO_FOLD(Tmp); + Tmp = A->Prm[6] * xx + A->Prm[7] * xy + A->Prm[8] * yy + A->Prm[9] * y2x; + Tmp = A->Prm[5] + x + (Tmp / UNIT); + *yo = DO_FOLD(Tmp); +} + +static void +Iterate_X3(ATTRACTOR * A, 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 = A->Prm[1] * xx + A->Prm[2] * xy + A->Prm[3] * yy + A->Prm[4] * x2y; + Tmp_x = A->Prm[0] - y + (Tmp_x / UNIT); + Tmp_x = DO_FOLD(Tmp_x); + + Tmp_y = A->Prm[6] * xx + A->Prm[7] * xy + A->Prm[8] * yy + A->Prm[9] * y2x; + Tmp_y = A->Prm[5] + x + (Tmp_y / UNIT); + + Tmp_y = DO_FOLD(Tmp_y); + + Tmp_z = A->Prm[11] * xx + A->Prm[12] * xy + A->Prm[13] * yy + A->Prm[14] * y2x; + Tmp_z = A->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]) (ATTRACTOR *, PRM, PRM, PRM *, PRM *) = { + Iterate_X2, Iterate_X3 +}; + +/***************************************************************/ + +void +draw_strange(ModeInfo * mi) +{ + int i, j, n, Cur_Pt; + PRM x, y, xo, yo; + DBL u; + XPoint *Buf; + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + ATTRACTOR *A = &Root[MI_SCREEN(mi)]; + DBL Lx, Ly; + void (*Iterate) (ATTRACTOR *, PRM, PRM, PRM *, PRM *); + PRM xmin, xmax, ymin, ymax; + + + + Cur_Pt = A->Cur_Pt; + Iterate = A->Iterate; + + u = (DBL) (A->Count) / 1000.0; + for (j = MAX_PRM - 1; j >= 0; --j) + A->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) (A, 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) (A, x, y, &xo, &yo); + Buf->x = (int) (Lx * (x + DBL_To_PRM(1.1))); + Buf->y = (int) (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; + } + + MI_IS_DRAWN(mi) = True; + + XSetForeground(display, gc, MI_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 (MI_NPIXELS(mi) < 2) + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + else + XSetForeground(display, gc, MI_PIXEL(mi, A->Col % MI_NPIXELS(mi))); + + 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) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + ATTRACTOR *Attractor; + + if (Root == NULL) { + Root = (ATTRACTOR *) calloc( + MI_NUM_SCREENS(mi), sizeof (ATTRACTOR)); + if (Root == NULL) + return; + } + Attractor = &Root[MI_SCREEN(mi)]; + + if (Attractor->Fold == NULL) { + int i; + + Attractor->Fold = (PRM *) calloc(UNIT2 + 1, sizeof (PRM)); + if (Attractor->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); + Attractor->Fold[i] = DBL_To_PRM(x); + } + } + if (Attractor->Buffer1 == NULL) + Attractor->Buffer1 = (XPoint *) calloc(MAX_POINTS, sizeof (XPoint)); + if (Attractor->Buffer2 == NULL) + Attractor->Buffer2 = (XPoint *) calloc(MAX_POINTS, sizeof (XPoint)); + if (Attractor->Buffer1 == NULL || Attractor->Buffer2 == NULL) { + if (Attractor->Buffer1 != NULL) { + (void) free((void *) Attractor->Buffer1); + Attractor->Buffer1 = NULL; + } + if (Attractor->Buffer2 != NULL) { + (void) free((void *) Attractor->Buffer2); + Attractor->Buffer2 = NULL; + } + Attractor->Cur_Pt = 0; + return; + } + Attractor->Max_Pt = MAX_POINTS; + + Attractor->Width = MI_WIDTH(mi); + Attractor->Height = MI_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); + + if (Attractor->dbuf) + XFreePixmap(display, Attractor->dbuf); + + Attractor->dbuf = XCreatePixmap(display, window, + Attractor->Width, Attractor->Height, 1); + + /* Do not want any exposure events from XCopyPlane */ + XSetGraphicsExposures(display, MI_GC(mi), False); + + if (Attractor->dbuf) { + XGCValues gcv; + + gcv.foreground = 0; + gcv.background = 0; + gcv.graphics_exposures = False; + gcv.function = GXcopy; + if (Attractor->dbuf_gc) + XFreeGC(display, Attractor->dbuf_gc); + + Attractor->dbuf_gc = XCreateGC(display, Attractor->dbuf, + GCForeground | GCBackground | GCGraphicsExposures | GCFunction, + &gcv); + XFillRectangle(display, Attractor->dbuf, + Attractor->dbuf_gc, 0, 0, Attractor->Width, + Attractor->Height); + XSetBackground(display, gc, MI_BLACK_PIXEL(mi)); + XSetFunction(display, gc, GXcopy); + } + MI_CLEARWINDOW(mi); +} + +/***************************************************************/ + +void +release_strange(ModeInfo * mi) +{ + int screen; + + if (Root != NULL) { + + for (screen = 0; screen < MI_NUM_SCREENS(mi); ++screen) { + ATTRACTOR *Attractor = &Root[screen]; + + if (Attractor->Buffer1 != NULL) + (void) free((void *) Attractor->Buffer1); + if (Attractor->Buffer2 != NULL) + (void) free((void *) Attractor->Buffer2); + if (Attractor->dbuf) + XFreePixmap(MI_DISPLAY(mi), Attractor->dbuf); + if (Attractor->dbuf_gc) + XFreeGC(MI_DISPLAY(mi), Attractor->dbuf_gc); + if (Attractor->Fold != NULL) + (void) free((void *) Attractor->Fold); + } + (void) free((void *) Root); + Root = NULL; + } +} + +#endif /* MODE_strange */ diff --git a/modes/swarm.c b/modes/swarm.c new file mode 100644 index 00000000..d0af41d6 --- /dev/null +++ b/modes/swarm.c @@ -0,0 +1,353 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* swarm --- swarm of bees */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)swarm.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 31-Aug-90: Adapted from xswarm by Jeff Butterworth + */ + +#ifdef STANDALONE +#define PROGCLASS "Swarm" +#define HACK_INIT init_swarm +#define HACK_DRAW draw_swarm +#define swarm_opts xlockmore_opts +#define DEFAULTS "*delay: 15000 \n" \ + "*count: 100 \n" \ + "*mouse: False \n" +#define BRIGHT_COLORS +#define SMOOTH_COLORS +#include "xlockmore.h" /* from the xscreensaver distribution */ +#include +#else /* !STANDALONE */ +#include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef MODE_swarm + +ModeSpecOpt swarm_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct swarm_description = +{"swarm", "init_swarm", "draw_swarm", "release_swarm", + "refresh_swarm", "init_swarm", NULL, &swarm_opts, + 15000, 100, 1, 1, 64, 1.0, "", + "Shows a swarm of bees following a wasp", 0, NULL}; + +#endif + +#define TIMES 4 /* number of time positions recorded */ +#define BEEACC 2 /* acceleration of bees */ +#define WASPACC 5 /* maximum acceleration of wasp */ +#define BEEVEL 12 /* maximum bee velocity */ +#define WASPVEL 10 /* maximum wasp velocity */ + +/* Macros */ +#define X(t,b) (sp->x[(t)*sp->beecount+(b)]) +#define Y(t,b) (sp->y[(t)*sp->beecount+(b)]) +#define balance_rand(v) ((NRAND(v))-((v)/2)) /* random number around 0 */ + +typedef struct { + int pix; + int width; + int height; + int border; /* wasp won't go closer than this to the edge */ + int beecount; /* number of bees */ + XSegment *segs; /* bee lines */ + XSegment *old_segs; /* old bee lines */ + short *x; + short *y; /* bee positions x[time][bee#] */ + short *xv; + short *yv; /* bee velocities xv[bee#] */ + short wx[3]; + short wy[3]; + short wxv; + short wyv; + Cursor cursor; +} swarmstruct; + +static swarmstruct *swarms = NULL; + +void +init_swarm(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + swarmstruct *sp; + int b; + + if (swarms == NULL) { + if ((swarms = (swarmstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (swarmstruct))) == NULL) + return; + } + sp = &swarms[MI_SCREEN(mi)]; + + sp->beecount = MI_COUNT(mi); + if (sp->beecount < 0) { + /* if sp->beecount is random ... the size can change */ + if (sp->segs != NULL) { + (void) free((void *) sp->segs); + sp->segs = NULL; + } + if (sp->old_segs != NULL) { + (void) free((void *) sp->old_segs); + sp->old_segs = NULL; + } + if (sp->x != NULL) { + (void) free((void *) sp->x); + sp->x = NULL; + } + if (sp->y != NULL) { + (void) free((void *) sp->y); + sp->y = NULL; + } + if (sp->xv != NULL) { + (void) free((void *) sp->xv); + sp->xv = NULL; + } + if (sp->yv != NULL) { + (void) free((void *) sp->yv); + sp->yv = NULL; + } + sp->beecount = NRAND(-sp->beecount) + 1; /* Add 1 so its not too boring */ + } + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + sp->border = (sp->width + sp->height) / 50; + + if (MI_IS_MOUSE(mi) && !sp->cursor) { /* Create an invisible cursor */ + Pixmap bit; + XColor black; + + black.red = 0; + black.green = 0; + black.blue = 0; + black.flags = DoRed | DoGreen | DoBlue; + bit = XCreatePixmapFromBitmapData(display, window, "\000", 1, 1, + MI_BLACK_PIXEL(mi), + MI_BLACK_PIXEL(mi), 1); + sp->cursor = XCreatePixmapCursor(display, bit, bit, &black, &black, + 0, 0); + XFreePixmap(display, bit); + } + XDefineCursor(display, window, sp->cursor); + + MI_CLEARWINDOW(mi); + + /* Allocate memory. */ + + if (!sp->segs) { + sp->segs = (XSegment *) malloc(sizeof (XSegment) * sp->beecount); + sp->old_segs = (XSegment *) malloc(sizeof (XSegment) * sp->beecount); + sp->x = (short *) malloc(sizeof (short) * sp->beecount * TIMES); + sp->y = (short *) malloc(sizeof (short) * sp->beecount * TIMES); + sp->xv = (short *) malloc(sizeof (short) * sp->beecount); + sp->yv = (short *) malloc(sizeof (short) * sp->beecount); + } + /* Initialize point positions, velocities, etc. */ + if (MI_NPIXELS(mi) > 2) + sp->pix = NRAND(MI_NPIXELS(mi)); + + /* wasp */ + sp->wx[0] = sp->border + NRAND(sp->width - 2 * sp->border); + sp->wy[0] = sp->border + NRAND(sp->height - 2 * sp->border); + sp->wx[1] = sp->wx[0]; + sp->wy[1] = sp->wy[0]; + sp->wxv = 0; + sp->wyv = 0; + + /* bees */ + for (b = 0; b < sp->beecount; b++) { + X(0, b) = NRAND(sp->width); + X(1, b) = X(0, b); + Y(0, b) = NRAND(sp->height); + Y(1, b) = Y(0, b); + sp->xv[b] = balance_rand(7); + sp->yv[b] = balance_rand(7); + } +} + +void +draw_swarm(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + swarmstruct *sp = &swarms[MI_SCREEN(mi)]; + int b; + Bool track_p = MI_IS_MOUSE(mi); + int cx, cy; + + MI_IS_DRAWN(mi) = True; + + if (track_p) { + Window r, c; + int rx, ry; + unsigned int m; + + (void) XQueryPointer(display, window, + &r, &c, &rx, &ry, &cx, &cy, &m); + if (cx <= sp->border || cy <= sp->border || + cx >= MI_WIDTH(mi) - 1 - sp->border || + cy >= MI_HEIGHT(mi) - 1 - sp->border) + track_p = False; + } + /* <=- Wasp -=> */ + /* Age the arrays. */ + sp->wx[2] = sp->wx[1]; + sp->wx[1] = sp->wx[0]; + sp->wy[2] = sp->wy[1]; + sp->wy[1] = sp->wy[0]; + if (track_p) { + sp->wx[0] = cx; + sp->wy[0] = cy; + } else { + + /* Accelerate */ + sp->wxv += balance_rand(WASPACC); + sp->wyv += balance_rand(WASPACC); + + /* Speed Limit Checks */ + if (sp->wxv > WASPVEL) + sp->wxv = WASPVEL; + if (sp->wxv < -WASPVEL) + sp->wxv = -WASPVEL; + if (sp->wyv > WASPVEL) + sp->wyv = WASPVEL; + if (sp->wyv < -WASPVEL) + sp->wyv = -WASPVEL; + + /* Move */ + sp->wx[0] = sp->wx[1] + sp->wxv; + sp->wy[0] = sp->wy[1] + sp->wyv; + + /* Bounce Checks */ + if ((sp->wx[0] < sp->border) || (sp->wx[0] > sp->width - sp->border - 1)) { + sp->wxv = -sp->wxv; + sp->wx[0] += sp->wxv; + } + if ((sp->wy[0] < sp->border) || (sp->wy[0] > sp->height - sp->border - 1)) { + sp->wyv = -sp->wyv; + sp->wy[0] += sp->wyv; + } + /* Don't let things settle down. */ + sp->xv[NRAND(sp->beecount)] += balance_rand(3); + sp->yv[NRAND(sp->beecount)] += balance_rand(3); + } + /* <=- Bees -=> */ + for (b = 0; b < sp->beecount; b++) { + int distance, dx, dy; + + /* Age the arrays. */ + X(2, b) = X(1, b); + X(1, b) = X(0, b); + Y(2, b) = Y(1, b); + Y(1, b) = Y(0, b); + + /* Accelerate */ + dx = sp->wx[1] - X(1, b); + dy = sp->wy[1] - Y(1, b); + distance = abs(dx) + abs(dy); /* approximation */ + if (distance == 0) + distance = 1; + sp->xv[b] += (dx * BEEACC) / distance; + sp->yv[b] += (dy * BEEACC) / distance; + + /* Speed Limit Checks */ + if (sp->xv[b] > BEEVEL) + sp->xv[b] = BEEVEL; + if (sp->xv[b] < -BEEVEL) + sp->xv[b] = -BEEVEL; + if (sp->yv[b] > BEEVEL) + sp->yv[b] = BEEVEL; + if (sp->yv[b] < -BEEVEL) + sp->yv[b] = -BEEVEL; + + /* Move */ + X(0, b) = X(1, b) + sp->xv[b]; + Y(0, b) = Y(1, b) + sp->yv[b]; + + /* Fill the segment lists. */ + sp->segs[b].x1 = X(0, b); + sp->segs[b].y1 = Y(0, b); + sp->segs[b].x2 = X(1, b); + sp->segs[b].y2 = Y(1, b); + sp->old_segs[b].x1 = X(1, b); + sp->old_segs[b].y1 = Y(1, b); + sp->old_segs[b].x2 = X(2, b); + sp->old_segs[b].y2 = Y(2, b); + } + + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawLine(display, window, gc, + sp->wx[1], sp->wy[1], sp->wx[2], sp->wy[2]); + XDrawSegments(display, window, gc, sp->old_segs, sp->beecount); + + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XDrawLine(display, window, gc, + sp->wx[0], sp->wy[0], sp->wx[1], sp->wy[1]); + if (MI_NPIXELS(mi) > 2) { + XSetForeground(display, gc, MI_PIXEL(mi, sp->pix)); + if (++sp->pix >= MI_NPIXELS(mi)) + sp->pix = 0; + } + XDrawSegments(display, window, gc, sp->segs, sp->beecount); +} + +void +release_swarm(ModeInfo * mi) +{ + if (swarms != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + swarmstruct *sp = &swarms[screen]; + + if (sp->segs != NULL) + (void) free((void *) sp->segs); + if (sp->old_segs != NULL) + (void) free((void *) sp->old_segs); + if (sp->x != NULL) + (void) free((void *) sp->x); + if (sp->y != NULL) + (void) free((void *) sp->y); + if (sp->xv != NULL) + (void) free((void *) sp->xv); + if (sp->yv != NULL) + (void) free((void *) sp->yv); + if (sp->cursor) + XFreeCursor(MI_DISPLAY(mi), sp->cursor); + } + (void) free((void *) swarms); + swarms = NULL; + } +} + +void +refresh_swarm(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_swarm */ diff --git a/modes/swirl.c b/modes/swirl.c new file mode 100644 index 00000000..35856806 --- /dev/null +++ b/modes/swirl.c @@ -0,0 +1,1480 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* swirl --- swirly patterns */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)swirl.c 4.07 97/11/24 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. + * + * Revision History: + * 13-May-97: jwz@jwz.org: 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 "*delay: 5000 \n" \ + "*count: 5 \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 */ +#include "vis.h" +#include "color.h" +#endif /* !STANDALONE */ + +#ifdef MODE_swirl + +ModeSpecOpt swirl_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct swirl_description = +{"swirl", "init_swirl", "draw_swirl", "release_swirl", + "refresh_swirl", "init_swirl", NULL, &swirl_opts, + 5000, 5, 1, 1, 64, 1.0, "", + "Shows animated swirling patterns", 0, NULL}; + +#endif + +#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 */ + Colormap cmap; /* colour map for the window */ + XColor *rgb_values; /* colour definitions array */ + Bool off_screen; +#ifndef STANDALONE + Bool fixed_colourmap; /* fixed colourmap? */ + int current_map; /* current colour map, 0..dcolours-1 */ + unsigned long black, white, bg, fg; /* black and white pixel values */ + int shift; /* colourmap shift */ + int dshift; /* colourmap shift while drawing */ + XColor bgcol, fgcol; /* foreground and background colour specs */ +#endif /* !STANDALONE */ +} SWIRL , *SWIRL_P; + +#ifndef STANDALONE +#define SWIRLCOLOURS 13 +/* 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(SWIRL_P swirl) +{ + 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 */ +} + +/****************************************************************/ + +/*- + * 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) + (void) 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)); + } +} + +/****************************************************************/ + +/*- + * 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->bg] = swirl->bgcol; + values[swirl->fg] = swirl->fgcol; +} + +/****************************************************************/ + +/*- + * 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 black, white, bg, fg; + + /* where are black, white, background, foreground? */ + black = swirl->black; + white = swirl->white; + bg = swirl->bg; + fg = swirl->fg; + + /* haven't set it yet */ + done = False; + + /* try and set the colour */ + while (!done) { + (**value).flags = DoRed | DoGreen | DoBlue; + (**value).pixel = *pixel; + + /* white, black, bg, fg, or a colour? */ + if ((*pixel != black) && (*pixel != white) && + (*pixel != bg) && (*pixel != fg)) { + (**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 black, white, bg, fg; + + /* where is white and black? */ + black = swirl->black; + white = swirl->white; + bg = swirl->bg; + fg = swirl->fg; + + /* haven't set it yet */ + done = False; + + /* try and set the colour */ + while (!done) { + /* black, white or a colour? */ + if (((*value)->pixel != black) && ((*value)->pixel != white) && + ((*value)->pixel != bg) && ((*value)->pixel != fg)) { + c->r = (*value)->red; + c->g = (*value)->green; + c->b = (*value)->blue; + + /* now we've done it */ + done = True; + } + /* next value */ + (*value)++; + } +} + +/****************************************************************/ + +/*- + * 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 = 0; + int n_rotations; + int i; + Bool truecolor; + unsigned long redmask, greenmask, bluemask; + + swirl->fixed_colourmap = !setupColormap(mi, &(swirl->colours), + &truecolor, &redmask, &greenmask, &bluemask); + + /* how many colours should we animate? */ + + 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; + + /* create a colour map */ + if (!swirl->fixed_colourmap) { + swirl->current_map = 0; /* current colour map, 0..dcolours-1 */ + + /* set up fg fb colour specs */ + swirl->black = MI_BLACK_PIXEL(mi); + swirl->white = MI_WHITE_PIXEL(mi); + swirl->bg = MI_BG_PIXEL(mi); + swirl->fg = MI_FG_PIXEL(mi); + preserve = preserveColors(swirl->black, swirl->white, + swirl->bg, swirl->fg); + swirl->bgcol.pixel = swirl->bg; + swirl->fgcol.pixel = swirl->fg; + XQueryColor(display, MI_COLORMAP(mi), &(swirl->bgcol)); + XQueryColor(display, MI_COLORMAP(mi), &(swirl->fgcol)); + if (swirl->cmap) + XFreeColormap(display, swirl->cmap); + swirl->cmap = + XCreateColormap(display, swirl->win, swirl->visual, AllocAll); + } + swirl->dcolours = (swirl->colours > preserve + 1) ? + swirl->colours - preserve : swirl->colours; + /* 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) + XFree((caddr_t) swirl->rgb_values); + swirl->rgb_values = (XColor *) calloc((swirl->colours + 3) * n_rotations, + sizeof (XColor)); + + /* 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, add, value; + unsigned long colour_value; + 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) + colour_value = (value % dcolours) + 2; + else + colour_value = dcolours - (abs((int) value) % (dcolours - 1)); + +#ifndef STANDALONE + /* if bg and fg are 0 and 1 we should be OK, but just in case */ + while ((dcolours > 2) && + (((colour_value % swirl->colours) == swirl->black) || + ((colour_value % swirl->colours) == swirl->white) || + ((colour_value % swirl->colours) == swirl->bg) || + ((colour_value % swirl->colours) == swirl->fg))) { + colour_value++; + } +#endif /* !STANDALONE */ + + /* definitely make sure it is in range */ + colour_value = colour_value % swirl->colours; + + /* lookup the pixel value if necessary */ +#ifndef STANDALONE + if (swirl->fixed_colourmap && swirl->dcolours > 2) +#endif + colour_value = swirl->rgb_values[colour_value].pixel; + + /* return it */ + return colour_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. */ + (void) 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(&swirls[i]); + } + /* get a pointer to this swirl */ + swirl = &(swirls[MI_SCREEN(mi)]); + + /* get window parameters */ + swirl->win = window; + swirl->width = MI_WIDTH(mi); + swirl->height = MI_HEIGHT(mi); + swirl->depth = MI_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); + + MI_CLEARWINDOW(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_IS_INWINDOW(mi)); +#else + XSetWindowColormap(display, window, swirl->cmap); + 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_COUNT(mi) / 2) + + MI_COUNT(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)]); + + MI_IS_DRAWN(mi) = True; + + /* 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! */ + MI_CLEARWINDOW(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); + 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 != None) + XFreeColormap(MI_DISPLAY(mi), swirl->cmap); + if (swirl->rgb_values != NULL) + XFree((caddr_t) swirl->rgb_values); + if (swirl->ximage != NULL) + (void) 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) { + MI_CLEARWINDOW(mi); + if (swirl->drawing) + swirl->resolution = swirl->resolution + 1; + swirl->drawing = False; + } +} + +#endif /* MODE_swirl */ diff --git a/modes/tetris.c b/modes/tetris.c new file mode 100644 index 00000000..07cac06e --- /dev/null +++ b/modes/tetris.c @@ -0,0 +1,932 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* tetris --- autoplaying tetris game */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)tetris.c 4.13 98/10/01 xlockmore"; + +#endif + +/*- + * Copyright (c) 1998 by Jouk Jansen + * + * 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 author should like to be notified if changes have been made to the + * routine. Response will only be guaranteed when a VMS version of the + * program is available. + * + * An autoplaying tetris mode for xlockmore + * David Bagley changed much of it to look more like altetris code... + * which a significant portion belongs to Q. Alex Zhao. + * + * Copyright (c) 1992 - 95 Q. Alex Zhao, azhao@cc.gatech.edu + * + * 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 name of the author not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * This program is distributed in the hope that it will be "playable", + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Todo list consists of (in this order): + * -Removal of "full" lines + * -Adding rotation/shifting + * -Add option for the level of thinking the computer should perform + * (i.e. dummy = do nothing ..... genius = do always the best move + * possible) + * + * Revision History: + * 01-Oct-98: Created + */ + +#ifdef STANDALONE +#define PROGCLASS "Tetris" +#define HACK_INIT init_tetris +#define HACK_DRAW draw_tetris +#define tetris_opts xlockmore_opts +#define DEFAULTS "*delay: 600000 \n" \ + "*count: -500 \n" \ + "*cycles: 200 \n" \ + "*size: 0 \n" \ + "*ncolors: 200 \n" \ + "*fullrandom: True \n" \ + "*verbose: False \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#include "color.h" +#endif /* STANDALONE */ + +#ifdef MODE_tetris + +#define DEF_CYCLE "True" + +static Bool cycle_p; + +#define INTRAND(min,max) (NRAND((max+1)-(min))+(min)) + +static XrmOptionDescRec opts[] = +{ + {"-tshift", ".tetris.tshift", XrmoptionNoArg, (caddr_t) "on"}, + {"+tshift", ".tetris.tshift", XrmoptionNoArg, (caddr_t) "off"} +}; + +static argtype vars[] = +{ + {(caddr_t *) & cycle_p, "tshift", "TShift", DEF_CYCLE, t_Bool} +}; +static OptionStruct desc[] = +{ + {"-/+tshift", "turn on/off colour cycling"} +}; + +ModeSpecOpt tetris_opts = +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; + +#ifdef USE_MODULES +ModStruct tetris_description = +{"tetris", "init_tetris", "draw_tetris", "release_tetris", + "refresh_tetris", "init_tetris", NULL, &tetris_opts, + 600000, -40, 200, 0, 64, 1.0, "", + "Autoplaying tetris game", 0, NULL}; + +#endif + +#include "bitmaps/rot00.xbm" +#include "bitmaps/rot01.xbm" +#include "bitmaps/rot02.xbm" +#include "bitmaps/rot03.xbm" +#include "bitmaps/rot04.xbm" +#include "bitmaps/rot05.xbm" +#include "bitmaps/rot06.xbm" +#include "bitmaps/rot07.xbm" +#include "bitmaps/rot08.xbm" +#include "bitmaps/rot09.xbm" +#include "bitmaps/rot10.xbm" +#include "bitmaps/rot11.xbm" +#include "bitmaps/rot12.xbm" +#include "bitmaps/rot13.xbm" +#include "bitmaps/rot14.xbm" +#include "bitmaps/rot15.xbm" + +#define MINGRIDSIZE 8 +#define MINSIZE 2 +#define NONE 0 +#define MAX_SIDES 4 +#define MAX_KINDS 3 +#define MAX_SQUARES 4 +#define MAX_START_POLYOMINOES 7 +#define MAX_POLYOMINOES 19 +#define NUM_FLASHES 16 +#define BITMAPS 16 + +#define THRESHOLD(x) ((x+1)*10) +#define CHECKUP(x) ((x)%8) +#define CHECKDOWN(x) (((x)/4)*4+(x)%2) + +static XImage logo[BITMAPS] = +{ + {0, 0, 0, XYBitmap, (char *) rot00_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot01_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot02_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot03_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot04_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot05_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot06_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot07_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot08_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot09_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot10_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot11_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot12_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot13_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot14_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) rot15_bits, LSBFirst, 8, LSBFirst, 8, 1} +}; + +typedef enum {FALL, DROP, LEFT, RIGHT, ROTATE, REFLECT} move_t; + +typedef struct { + int squares, polyomino_number; + int xpos, ypos; + int size, color_number; + int random_rotation; + int bonus, random_reflection; /* not really used yet */ + long random_number; +} thing_t; +typedef struct { + int rotation; + int reflection; /* not really used yet */ + int start_height; + int shape[MAX_SQUARES][MAX_SQUARES]; + int size; +} Polyominoes; +typedef struct { + int number; + int start[MAX_START_POLYOMINOES]; +} Mode; +typedef struct { + Polyominoes polyomino[MAX_POLYOMINOES]; + Mode mode; +} Polytris; +typedef struct { + int pmid, cid; +} fieldstruct; + +typedef struct { + Bool painted; + int object, orient; + GC gc; + Colormap cmap; + Bool cycle_p, mono_p, no_colors; + unsigned long blackpixel, whitepixel, fg, bg; + int direction; + unsigned long colour; + int p_type; + + fieldstruct *field; + int xb, yb; + int xs, ys; + int width, height; + int pixelmode; + XColor *colors; + int ncolors; + int ncols, nrows; + Polytris tris; + thing_t curPolyomino; +} trisstruct; + +static trisstruct *triss = NULL; +static int icon_width, icon_height; + + +static int +ominos[] = +{ + /* Side of smallest square that contains shape */ + /* Number of orientations */ + /* Position, Next Postion, (not used yet), + number_down, used_for_start? + Polyomino (side^2 values) */ + 2, + 1, + 0, 0, 0, 0, 2, 6, 3, 12, 9, + + 3, + 16, + 0, 1, 4, 1, 2, 0, 0, 0, 6, 5, 1, 8, 0, 0, + 1, 2, 7, 0, 0, 0, 2, 0, 0, 10, 0, 0, 12, 1, + 2, 3, 6, 1, 0, 0, 0, 0, 0, 0, 2, 4, 5, 9, + 3, 0, 5, 0, 0, 0, 4, 3, 0, 0, 10, 0, 0, 8, + 4, 5, 0, 1, 1, 0, 0, 0, 4, 5, 3, 0, 0, 8, + 5, 6, 3, 0, 0, 0, 6, 1, 0, 10, 0, 0, 8, 0, + 6, 7, 2, 1, 0, 0, 0, 0, 2, 0, 0, 12, 5, 1, + 7, 4, 1, 0, 0, 0, 0, 2, 0, 0, 10, 0, 4, 9, + 8, 9, 8, 1, 2, 0, 0, 0, 4, 7, 1, 0, 8, 0, + 9, 10, 11, 0, 0, 0, 2, 0, 0, 14, 1, 0, 8, 0, + 10, 11, 10, 1, 0, 0, 0, 0, 0, 2, 0, 4, 13, 1, + 11, 8, 9, 0, 0, 0, 0, 2, 0, 4, 11, 0, 0, 8, + 12, 13, 14, 1, 2, 0, 0, 0, 4, 3, 0, 0, 12, 1, + 13, 12, 15, 0, 0, 0, 0, 2, 0, 6, 9, 0, 8, 0, + 14, 15, 12, 1, 1, 0, 0, 0, 0, 6, 1, 4, 9, 0, + 15, 14, 13, 0, 0, 0, 2, 0, 0, 12, 3, 0, 0, 8, + + 4, + 2, + 0, 1, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 1, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 8, 0 +}; + +static void +readPolyominoes(trisstruct * tp) +{ + int size = 0, n = 0, index = 0, sum = 0; + int counter = 0, start_counter = 0; + int polyomino, kinds, i, j; + + tp->tris.mode.number = MAX_START_POLYOMINOES; + for (kinds = 0; kinds < MAX_KINDS; kinds++) { + size = ominos[index++]; + n = ominos[index++]; + for (polyomino = 0; polyomino < n; polyomino++) { + sum = polyomino + counter; + if (polyomino != ominos[index]) + (void) printf("polyomino %d, ominos[index] %d\n", polyomino, ominos[index]); + index++; /* This is only there to "read" input file */ + tp->tris.polyomino[sum].rotation = ominos[index++] + counter; + tp->tris.polyomino[sum].reflection = ominos[index++] + counter; /* not used */ + + tp->tris.polyomino[sum].start_height = ominos[index++]; + if (ominos[index++] != NONE) { + i = start_counter; + tp->tris.mode.start[i] = sum; + start_counter++; + } + tp->tris.polyomino[sum].size = size; + for (j = 0; j < size; j++) + for (i = 0; i < size; i++) { + tp->tris.polyomino[sum].shape[j][i] = ominos[index++]; + } + } + counter += n; + } +} + +static void +drawSquare(ModeInfo * mi, int pmid, int cid, int col, int row) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + trisstruct *tp = &triss[MI_SCREEN(mi)]; + long colour; + + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + if (tp->ncolors >= MAX_START_POLYOMINOES + 2) + colour = cid + 2; + else + colour = 1; /* Just in case */ + XSetBackground(display, tp->gc, tp->blackpixel); + XSetForeground(display, tp->gc, tp->colors[colour].pixel); + } else { + if (MI_NPIXELS(mi) > MAX_START_POLYOMINOES) + colour = MI_PIXEL(mi, cid * MI_NPIXELS(mi) / MAX_START_POLYOMINOES); + else + colour = MI_WHITE_PIXEL(mi); + XSetForeground(display, tp->gc, colour); + XSetBackground(display, tp->gc, MI_BLACK_PIXEL(mi)); + } + if (tp->pixelmode) + XFillRectangle(display, window, tp->gc, + tp->xb + col * tp->xs, tp->yb + row * tp->ys, tp->xs, tp->ys); + else +/*- + * PURIFY on SunOS4 and on Solaris 2 reports a 120 byte memory leak on + * the next line */ + (void) XPutImage(display, window, tp->gc, &logo[pmid], 0, 0, + tp->xb + icon_width * col, tp->yb + icon_height * row, + icon_width, icon_height); +} + +static void +clearSquare(ModeInfo * mi, int col, int row) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + trisstruct *tp = &triss[MI_SCREEN(mi)]; + + XSetForeground(display, tp->gc, tp->blackpixel); + XFillRectangle(display, window, tp->gc, + tp->xb + col * tp->xs, tp->yb + row * tp->ys, tp->xs, tp->ys); +} + +static void +drawPolyomino(ModeInfo * mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int i, j; + + for (i = 0; i < tp->curPolyomino.size; i++) { + for (j = 0; j < tp->curPolyomino.size; j++) { + if (tp->tris.polyomino[tp->curPolyomino.polyomino_number].shape[j][i]) { + drawSquare(mi, tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[j][i], + tp->curPolyomino.color_number, + tp->curPolyomino.xpos + i, tp->curPolyomino.ypos + j); + } + } + } +} + +static void +drawPolyominoDiff(ModeInfo *mi, thing_t * old) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int i, j, ox, oy; + + for (i = 0; i < tp->curPolyomino.size; i++) + for (j = 0; j < tp->curPolyomino.size; j++) + if ((tp->curPolyomino.ypos + j >= 0) && tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[j][i]) + drawSquare(mi, tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[j][i], + tp->curPolyomino.color_number, tp->curPolyomino.xpos + i, tp->curPolyomino.ypos + j); + + for (i = 0; i < tp->curPolyomino.size; i++) + for (j = 0; j < tp->curPolyomino.size; j++) { + ox = old->xpos + i - tp->curPolyomino.xpos; + oy = old->ypos + j - tp->curPolyomino.ypos; + if (tp->tris.polyomino[old->polyomino_number].shape[j][i] && + ((ox < 0) || (ox >= tp->curPolyomino.size) || + (oy < 0) || (oy >= tp->curPolyomino.size) || + !tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[oy][ox])) + clearSquare(mi, (old->xpos + i), (old->ypos + j)); + } +} + +static void +redoNext(ModeInfo * mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int next_start, i; + + next_start = tp->curPolyomino.random_number % tp->tris.mode.number; + tp->curPolyomino.color_number = next_start; + + tp->curPolyomino.polyomino_number = tp->tris.mode.start[next_start]; + for (i = 0; i < tp->curPolyomino.random_rotation; i++) + tp->curPolyomino.polyomino_number = tp->tris.polyomino + [tp->curPolyomino.polyomino_number].rotation; + tp->curPolyomino.size = tp->tris.polyomino[tp->curPolyomino.polyomino_number].size; + tp->curPolyomino.xpos = NRAND(tp->ncols - tp->curPolyomino.size + 1); + /* tp->curPolyomino.xpos = (tp->ncols - tp->curPolyomino.size) / 2; */ + tp->curPolyomino.ypos = -tp->tris.polyomino + [tp->curPolyomino.polyomino_number].start_height; +} + +static void +newPolyomino(ModeInfo * mi) { + Display * display = MI_DISPLAY(mi); + trisstruct *tp = &triss[MI_SCREEN(mi)]; + + tp->curPolyomino.random_number = LRAND(); + tp->curPolyomino.random_rotation = NRAND(MAX_SIDES); + /* tp->curPolyomino.random_reflection = NRAND(2); */ /* Future? */ + /* tp->curPolyomino.bonus = bonusNow; */ /* Future? */ + + redoNext(mi); +} + +static void +putBox(ModeInfo * mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int i, j; + int x = tp->curPolyomino.xpos, y = tp->curPolyomino.ypos, pos; + + for (i = 0; i < tp->curPolyomino.size; i++) + for (j = 0; j < tp->curPolyomino.size; j++) + if ((y + j >= 0) && tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[j][i]) { + pos = (y + j) * tp->ncols + x + i; + tp->field[pos].pmid = tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[j][i] % BITMAPS; + tp->field[pos].cid = tp->curPolyomino.color_number; + } +} + +static Bool +overlapping(ModeInfo * mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int i, j; + int x = tp->curPolyomino.xpos, y = tp->curPolyomino.ypos; + int gradualAppear = False; + + for (i = 0; i < tp->curPolyomino.size; i++) + for (j = 0; j < tp->curPolyomino.size; j++) + if (tp->tris.polyomino[tp->curPolyomino.polyomino_number].shape[j][i]) { + if ((y + j >= tp->nrows) || (x + i < 0) || (x + i >= tp->ncols)) + return True; +if (gradualAppear) { +/* This method one can turn polyomino to an area above of screen, also + part of the polyomino may not be visible initially */ + if ((y + j >= 0) && (tp->field[(y + j) * tp->ncols + x + i].pmid >= 0)) + return True; + } else { +/* This method does not allow turning polyomino to an area above screen */ + if ((y + j < 0) || (tp->field[(y + j) * tp->ncols + x + i].pmid >= 0)) + return True; + } + + } + return False; +} + +static Bool +atBottom(ModeInfo * mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int i, j; + int x = tp->curPolyomino.xpos, y = tp->curPolyomino.ypos; + + for (i = 0; i < tp->curPolyomino.size; i++) + for (j = 0; j < tp->curPolyomino.size; j++) + if ((y + j >= -1) && tp->tris.polyomino + [tp->curPolyomino.polyomino_number].shape[j][i]) + if ((y + j >= tp->nrows - 1) || (x + i < 0) || (x + i >= tp->ncols) || + (tp->field[(y + j + 1) * tp->ncols + x + i].pmid >= 0)) + return True; + return False; +} + +static void +tryMove(ModeInfo * mi, move_t move) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + thing_t old; + int i; + int cw = False; /* I am not sure if this is the original */ + + old = tp->curPolyomino; + + switch (move) { + case FALL: + tp->curPolyomino.ypos++; + break; + + case DROP: + do { /* so fast you can not see it ;) */ + tp->curPolyomino.ypos ++; + } while (!overlapping(mi)); + tp->curPolyomino.ypos--; + break; + + case LEFT: + tp->curPolyomino.xpos--; + break; + + case RIGHT: + tp->curPolyomino.xpos++; + break; + + case ROTATE: + if (cw) + for (i = 0; i < MAX_SIDES - 1; i++) + tp->curPolyomino.polyomino_number = tp->tris.polyomino + [tp->curPolyomino.polyomino_number].rotation; + else /* ccw */ + tp->curPolyomino.polyomino_number = tp->tris.polyomino + [tp->curPolyomino.polyomino_number].rotation; + tp->curPolyomino.xpos = old.xpos; + tp->curPolyomino.ypos = old.ypos; + break; + + case REFLECT: /* reflect on y axis */ + tp->curPolyomino.polyomino_number = tp->tris.polyomino + [tp->curPolyomino.polyomino_number].reflection; + tp->curPolyomino.xpos = old.xpos; + tp->curPolyomino.ypos = old.ypos; + break; + } + + if (!overlapping(mi)) + drawPolyominoDiff(mi, &old); + else + tp->curPolyomino = old; +} + +static int +checkLines(ModeInfo *mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + int *lSet, nset = 0; + int i, j, y; + + + lSet = calloc(tp->nrows, sizeof (int)); + for (j = 0; j < tp->nrows; j++) { + for (i = 0; i < tp->ncols; i++) + if (tp->field[j * tp-> ncols + i].pmid >= 0) + lSet[j]++; + if (lSet[j] == tp->ncols) + nset++; + } + + if (nset) { + for (i = 0; i < ((NUM_FLASHES / nset) % 2) * 2; i++) { + for (j = 0; j < tp->nrows; j++) { + if (lSet[j] == tp->ncols) +#if 0 /* Future */ + XFillRectangle(display, blockWin, xorGC, + 0, j * BOXSIZE, frameW, BOXSIZE) +#endif + ; + } + XFlush(display); + } + + for (j = tp->nrows - 1; j >= 0; j--) { + if (lSet[j] == tp->ncols) { + for (y = j; y > 0; y--) + for (i = 0; i < tp->ncols; i++) + tp->field[y * tp->ncols + i] = tp->field[(y - 1) * tp->ncols + i]; + for (i = 0; i < tp->ncols; i++) + tp->field[i].pmid = -1; + +#if 0 /* Future */ + XCopyArea(display, blockWin, blockWin, tinyGC, + 0, 0, frameW, j * BOXSIZE, 0, BOXSIZE); + + XFillRectangle(display, blockWin, revGC, + 0, 0, frameW, BOXSIZE); +#endif + + for (i = j; i > 0; i--) + lSet[i] = lSet[i-1]; + lSet[0] = 0; + + if (j > 0) + for (i = 0; i < tp->ncols; i++) { + int tmp = tp->field[j * tp->ncols + i].pmid; + if ((tmp >= 0) && (tmp != CHECKDOWN(tmp))) { + tp->field[j * tp->ncols + i].pmid = CHECKDOWN(tmp); + drawSquare(mi, tp->field[j * tp->ncols + i].pmid, tp->field[j * tp->ncols + i].cid, + i, j); + } + } + + j++; + + if (j < tp->nrows) + for (i = 0; i < tp->ncols; i++) { + int tmp = tp->field[j * tp->ncols + i].pmid; + if ((tmp >= 0) && (tmp != CHECKUP(tmp))) { + tp->field[j * tp->ncols + i].pmid = CHECKUP(tmp); + drawSquare(mi, tp->field[j * tp->ncols + i].pmid, tp->field[j * tp->ncols + i].cid, + i, j); + } + } + + XFlush(display); + } + } + + XSync(display, False); + } + + if (lSet) + (void) free((void *) lSet); + + + return nset; +} + + +static Bool +moveOne(ModeInfo *mi, move_t move) +{ + Display *display = MI_DISPLAY(mi); + int lines; + + if ((move == DROP) || ((move == FALL) && atBottom(mi))) { + putBox(mi); + lines = checkLines(mi); +#if 0 + rows += lines; + if (rows > THRESHOLD(level)) { + level++; + if (bonus) /* No good deed goes unpunished */ + bonusNow = True; + } +#endif + newPolyomino(mi); + XSync(display, True); /* discard all events */ + if (overlapping(mi)) { +#if 0 + gameOver(); +#endif + init_tetris(mi); + return False; + } + + drawPolyomino(mi); + return True; + } else { + tryMove(mi, move); +#if 0 + if (rows > THRESHOLD(level)) { + level++; + if (bonus) + bonusNow = True; + } +#endif + return False; + } +} + +void +refresh_tetris(ModeInfo * mi) +{ + trisstruct *tp = &triss[MI_SCREEN(mi)]; + int col, row, pos; + + if (!tp->painted) + return; + MI_CLEARWINDOW(mi); + for (col = 0; col < tp->ncols; col++) + for (row = 0; row < tp->nrows; row++) { + pos = row * tp->ncols + col; +#if 0 + (void) printf("pmid %d, cid %d, %d %d\n", + tp->field[pos].pmid, tp->field[pos].cid, col, row); +#endif + if (tp->field[pos].pmid != -1) + drawSquare(mi, tp->field[pos].pmid, tp->field[pos].cid, col, row); + } + drawPolyomino(mi); +} + +void +draw_tetris(ModeInfo * mi) { + Display * display = MI_DISPLAY(mi); + trisstruct *tp = &triss[MI_SCREEN(mi)]; + + if (tp->no_colors) { + init_tetris(mi); + return; + } + tp->painted = True; + MI_IS_DRAWN(mi) = True; + + /* Rotate colours */ + if (tp->cycle_p) { + rotate_colors(display, tp->cmap, tp->colors, tp->ncolors, + tp->direction); + if (!(LRAND() % 1000)) + tp->direction = -tp->direction; + } + + moveOne(mi, FALL); +} + +void +release_tetris(ModeInfo * mi) { + Display * display = MI_DISPLAY(mi); + + if (triss != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + trisstruct *tp = &triss[screen]; + + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + MI_WHITE_PIXEL(mi) = tp->whitepixel; + MI_BLACK_PIXEL(mi) = tp->blackpixel; +#ifndef STANDALONE + MI_FG_PIXEL(mi) = tp->fg; + MI_BG_PIXEL(mi) = tp->bg; +#endif + if (tp->colors && tp->ncolors && !tp->no_colors) + free_colors(display, tp->cmap, tp->colors, tp->ncolors); + if (tp->colors) + (void) free((void *) tp->colors); + XFreeColormap(display, tp->cmap); + } + if (tp->gc != NULL) + XFreeGC(display, tp->gc); + if (tp->field) + (void) free((void *) tp->field); + + } + (void) free((void *) triss); + triss = NULL; + } +} + +void +init_tetris(ModeInfo * mi) { + Display * display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + trisstruct *tp; + int size = MI_SIZE(mi); + int i; + + if (triss == NULL) { + if ((triss = (trisstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (trisstruct))) == NULL) + return; + } + tp = &triss[MI_SCREEN(mi)]; + + if (!tp->gc) { + icon_width = rot00_width; + icon_height = rot00_height; + for (i = 0; i < BITMAPS; i++) { + logo[i].width = icon_width; + logo[i].height = icon_height; + logo[i].bytes_per_line = (icon_width + 7) / 8; + } + + readPolyominoes(tp); + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + XColor color; + +#ifndef STANDALONE + extern char *background; + extern char *foreground; + + tp->fg = MI_FG_PIXEL(mi); + tp->bg = MI_BG_PIXEL(mi); +#endif + tp->blackpixel = MI_BLACK_PIXEL(mi); + tp->whitepixel = MI_WHITE_PIXEL(mi); + tp->cmap = XCreateColormap(display, window, + MI_VISUAL(mi), AllocNone); + XSetWindowColormap(display, window, tp->cmap); + (void) XParseColor(display, tp->cmap, "black", &color); + (void) XAllocColor(display, tp->cmap, &color); + MI_BLACK_PIXEL(mi) = color.pixel; + (void) XParseColor(display, tp->cmap, "white", &color); + (void) XAllocColor(display, tp->cmap, &color); + MI_WHITE_PIXEL(mi) = color.pixel; +#ifndef STANDALONE + (void) XParseColor(display, tp->cmap, background, &color); + (void) XAllocColor(display, tp->cmap, &color); + MI_BG_PIXEL(mi) = color.pixel; + (void) XParseColor(display, tp->cmap, foreground, &color); + (void) XAllocColor(display, tp->cmap, &color); + MI_FG_PIXEL(mi) = color.pixel; +#endif + tp->colors = 0; + tp->ncolors = 0; + } + if ((tp->gc = XCreateGC(display, MI_WINDOW(mi), + (unsigned long) 0, (XGCValues *) NULL)) == None) + return; + } + MI_CLEARWINDOW(mi); + tp->painted = False; + + tp->width = MI_WIDTH(mi); + tp->height = MI_HEIGHT(mi); + + if (tp->width < 2) + tp->width = 2; + if (tp->height < 2) + tp->height = 2; + if (size == 0 || + MINGRIDSIZE * size > tp->width || MINGRIDSIZE * size > tp->height) { + if (tp->width > MINGRIDSIZE * icon_width && + tp->height > MINGRIDSIZE * icon_height) { + tp->pixelmode = False; + tp->xs = icon_width; + tp->ys = icon_height; + } else { + tp->pixelmode = True; + tp->xs = tp->ys = MAX(MINSIZE, MIN(tp->width, tp->height) / + MINGRIDSIZE); + } + } else { + tp->pixelmode = True; + if (size < -MINSIZE) + tp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(tp->width, tp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + tp->ys = MINSIZE; + else + tp->ys = MIN(size, MAX(MINSIZE, MIN(tp->width, tp->height) / + MINGRIDSIZE)); + tp->xs = tp->ys; + } + tp->ncols = MAX(tp->width / tp->xs, 2); + tp->nrows = MAX(tp->height / tp->ys, 2); + tp->xb = (tp->width - tp->xs * tp->ncols) / 2; + tp->yb = (tp->height - tp->ys * tp->nrows) / 2; + + /* Set up tetris data */ + + if (tp->field) + (void) free((void *) tp->field); + tp->field = malloc(tp->ncols * tp->nrows * sizeof (fieldstruct)); + for (i = 0; i < tp->ncols * tp->nrows; i++) { + tp->field[i].pmid = -1; + tp->field[i].cid = 0; + } + + /* Set up colour map */ + tp->direction = (LRAND() & 1) ? 1 : -1; + if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) { + if (tp->colors && tp->ncolors && !tp->no_colors) + free_colors(display, tp->cmap, tp->colors, tp->ncolors); + if (tp->colors) + (void) free((void *) tp->colors); + tp->colors = 0; + tp->ncolors = MI_NCOLORS(mi); + if (tp->ncolors < 2) + tp->ncolors = 2; + if (tp->ncolors <= 2) + tp->mono_p = True; + else + tp->mono_p = False; + + if (tp->mono_p) + tp->colors = 0; + else + tp->colors = (XColor *) malloc(sizeof (*tp->colors) * (tp->ncolors + 1)); + tp->cycle_p = has_writable_cells(mi); + if (tp->cycle_p) { + if (MI_IS_FULLRANDOM(mi)) { + if (!NRAND(8)) + tp->cycle_p = False; + else + tp->cycle_p = True; + } else { + tp->cycle_p = cycle_p; + } + } + if (!tp->mono_p) { + if (!(LRAND() % 10)) + make_random_colormap( +#if STANDALONE + MI_DISPLAY(mi), MI_WINDOW(mi), +#else + mi, +#endif + tp->cmap, tp->colors, &tp->ncolors, + True, True, &tp->cycle_p); + else if (!(LRAND() % 2)) + make_uniform_colormap( +#if STANDALONE + MI_DISPLAY(mi), MI_WINDOW(mi), +#else + mi, +#endif + tp->cmap, tp->colors, &tp->ncolors, + True, &tp->cycle_p); + else + make_smooth_colormap( +#if STANDALONE + MI_DISPLAY(mi), MI_WINDOW(mi), +#else + mi, +#endif + tp->cmap, tp->colors, &tp->ncolors, + True, &tp->cycle_p); + } + XInstallColormap(display, tp->cmap); + if (tp->ncolors < 2) { + tp->ncolors = 2; + tp->no_colors = True; + } else + tp->no_colors = False; + if (tp->ncolors <= 2) + tp->mono_p = True; + + if (tp->mono_p) + tp->cycle_p = False; + + } + /* initialize object */ + newPolyomino(mi); +} + +#endif /* MODE_tetris */ diff --git a/modes/thornbird.c b/modes/thornbird.c new file mode 100644 index 00000000..b89bc76a --- /dev/null +++ b/modes/thornbird.c @@ -0,0 +1,213 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* thornbird --- continuously varying Thornbird set */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)discrete.c 4.10 98/04/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by Tim Auckland + * + * 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. + * + * "thornbird" shows a view of the "Bird in a Thornbush" fractal, + * continuously varying the three free paramaters. + * + * Revision History: + * 31-Jul-97: Adapted from discrete.c Copyright (c) 1996 by Tim Auckland + */ + +#ifdef STANDALONE +#define PROGCLASS "Thornbird" +#define HACK_INIT init_thornbird +#define HACK_DRAW draw_thornbird +#define thornbird_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*count: 800 \n" \ + "*cycles: 16 \n" \ + "*ncolors: 100 \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_thornbird + +ModeSpecOpt thornbird_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct thornbird_description = +{"thornbird", "init_thornbird", "draw_thornbird", "release_thornbird", + "refresh_thornbird", NULL, NULL, þbird_opts, + 1000, 800, 16, 1, 64, 1.0, "", + "Shows an animated Bird in a Thorn Bush fractal map", 0, NULL}; + +#endif + +typedef struct { + int maxx; + int maxy; /* max of the screen */ + double a; + double b; + double c; + double d; + double e; + double i; + double j; /* thornbird parameters */ + int inc; + int pix; + int count; + int nbuffers; + XPoint **pointBuffer; /* pointer for XDrawPoints */ +} thornbirdstruct; + +static thornbirdstruct *thornbirds = NULL; + +void +init_thornbird(ModeInfo * mi) +{ + thornbirdstruct *hp; + + if (thornbirds == NULL) { + if ((thornbirds = + (thornbirdstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (thornbirdstruct))) == NULL) + return; + } + hp = þbirds[MI_SCREEN(mi)]; + + + hp->maxx = MI_WIDTH(mi); + hp->maxy = MI_HEIGHT(mi); + + hp->b = 0.1; + hp->i = hp->j = 0.1; + + hp->pix = 0; + hp->inc = 0; + + hp->nbuffers = MI_CYCLES(mi); + + if (hp->pointBuffer == NULL) + hp->pointBuffer = (XPoint **) calloc(MI_CYCLES(mi), sizeof (XPoint *)); + + if (hp->pointBuffer[0] == NULL) + hp->pointBuffer[0] = (XPoint *) malloc(MI_COUNT(mi) * sizeof (XPoint)); + + /* Clear the background. */ + MI_CLEARWINDOW(mi); + + hp->count = 0; +} + + +void +draw_thornbird(ModeInfo * mi) +{ + Display *dsp = MI_DISPLAY(mi); + Window win = MI_WINDOW(mi); + double oldj, oldi; + int batchcount = MI_COUNT(mi); + + int k; + XPoint *xp; + GC gc = MI_GC(mi); + thornbirdstruct *hp = þbirds[MI_SCREEN(mi)]; + + int erase = (hp->inc + 1) % MI_CYCLES(mi); + int current = hp->inc % MI_CYCLES(mi); + + k = batchcount; + + + xp = hp->pointBuffer[current]; + + hp->a = 1.99 + 0.4 * sin((hp->inc / 2700.0)) * sin(hp->inc / 1700.0); + hp->c = 0.80 + 0.15 * cos((hp->inc / 2700.0)) * cos(hp->inc / 1700.0); +#if 1 + hp->c += 0.05 * cos(hp->inc / 600.0); + hp->a += 0.05 * sin(hp->inc / 600.0); +#endif +#if 0 + hp->a = 1.99 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.2; + hp->c = 0.8 + ((LRAND() / MAXRAND) * 2.0 - 1.0) * 0.1; +#endif + + while (k--) { + oldj = hp->j; + oldi = hp->i; + + hp->j = oldi; + hp->i = (1 - hp->c) * cos(M_PI * hp->a * oldj) + hp->c * hp->b; + hp->b = oldj; + + xp->x = (short) (hp->maxx / 2 * (1 + hp->i)); + xp->y = (short) (hp->maxy / 2 * (1 - hp->j)); + xp++; + } + + MI_IS_DRAWN(mi) = True; + + if (hp->pointBuffer[erase] == NULL) { + hp->pointBuffer[erase] = + (XPoint *) malloc(MI_COUNT(mi) * sizeof (XPoint)); + } else { + XSetForeground(dsp, gc, MI_BLACK_PIXEL(mi)); + XDrawPoints(dsp, win, gc, hp->pointBuffer[erase], + batchcount, CoordModeOrigin); + } + if (MI_NPIXELS(mi) > 2) { + XSetForeground(dsp, gc, MI_PIXEL(mi, hp->pix)); + if (erase % 5 == 0) + if (++hp->pix >= MI_NPIXELS(mi)) + hp->pix = 0; + } + XDrawPoints(dsp, win, gc, hp->pointBuffer[current], + batchcount, CoordModeOrigin); + hp->inc++; + +} + +void +release_thornbird(ModeInfo * mi) +{ + if (thornbirds != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + thornbirdstruct *hp = þbirds[screen]; + + if (hp->pointBuffer != NULL) { + int i; + + for (i = 0; i < hp->nbuffers; i++) + if (hp->pointBuffer[i] != NULL) + (void) free((void *) hp->pointBuffer[i]); + (void) free((void *) hp->pointBuffer); + } + } + (void) free((void *) thornbirds); + thornbirds = NULL; + } +} + +void +refresh_thornbird(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_thornbird */ diff --git a/modes/triangle.c b/modes/triangle.c new file mode 100644 index 00000000..6353a6ef --- /dev/null +++ b/modes/triangle.c @@ -0,0 +1,368 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* triangle --- create a triangle-mountain */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)triangle.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1995 by Tobias Gloth + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 22-Dec-97: Removed MI_PAUSE since it does not work on multiscreens. + * 10-May-97: Compatible with xscreensaver + * 10-Mar-96: re-arranged and re-formatted the code for appearance and + * to make common subroutines. Simplified. + * Ron Hitchens + * 07-Mar-96: Removed internal delay code, set MI_PAUSE(mi) for inter-scene + * delays. No other delays are needed here. + * Made pause time sensitive to value of cycles (in 10ths of a + * second). Removed (hopefully) all references to globals. + * Ron Hitchens + * 27-Feb-96: Undid the changes listed below. Added ModeInfo argument. + * Implemented delay between scenes using the MI_PAUSE(mi) + * scheme. Ron Hitchens + * 27-Dec-95: Ron Hitchens + * Modified logic of draw_triangle() to provide a delay + * (sensitive to the value of cycles) between each iteration. + * Because this mode is so compute intensive, when the new + * event loop adjusted the delay to compensate, this mode had + * almost no delay time left. This change pauses between each + * new landscape, but could still be done better (it is not + * sensitive to input events while drawing, for example). + * 03-Nov-95: Many changes (hopefully some good ones) by David Bagley + * 01-Oct-95: Written by Tobias Gloth + */ + +#ifdef STANDALONE +#define PROGCLASS "Triangle" +#define HACK_INIT init_triangle +#define HACK_DRAW draw_triangle +#define triangle_opts xlockmore_opts +#define DEFAULTS "*delay: 10000 \n" \ + "*ncolors: 128 \n " \ + "*wireframe: False \n" \ + "*fullrandom: False \n" +#define SMOOTH_COLORS + /* #define UNIFORM_COLORS *//* To get blue water uncomment, but ... */ +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_triangle + +ModeSpecOpt triangle_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct triangle_description = +{"triangle", "init_triangle", "draw_triangle", "release_triangle", + "refresh_triangle", "init_triangle", NULL, &triangle_opts, + 10000, 1, 1, 1, 64, 1.0, "", + "Shows a triangle mountain range", 0, NULL}; + +#endif + +#define MAX_STEPS 8 +#define MAX_SIZE (1< 2) { /* color */ + int dmax, dmin; + long color; + + dmin = MIN(y_0, y_1); + dmin = MIN(dmin, y_2); + dmax = MAX(y_0, y_1); + dmax = MAX(dmax, y_2); + + if (dmax == 0) { + color = BLUE; + } else { + color = MI_NPIXELS(mi) - + (int) ((double) MI_NPIXELS(mi) / M_PI_2 * atan(dinv * (dmax - dmin))); + } + + XSetForeground(display, gc, MI_PIXEL(mi, color % MI_NPIXELS(mi))); + if (tp->joke) { + if ((Bool) (LRAND() & 1)) + XDrawLines(display, window, gc, p, 4, CoordModeOrigin); + else + XFillPolygon(display, window, gc, p, 3, Convex, CoordModeOrigin); + } else if (tp->wireframe) { + XDrawLines(display, window, gc, p, 4, CoordModeOrigin); + } else { + XFillPolygon(display, window, gc, p, 3, Convex, CoordModeOrigin); + } + } else { + /* mono */ +#ifdef BACKFACE_REMOVAL + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, p, 3, Convex, CoordModeOrigin); +#endif + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XDrawLines(display, window, gc, p, 4, CoordModeOrigin); + } +} + +static +void +calc_points1(trianglestruct * tp, int d, int *y0_p, int *y1_p, int *y2_p, XPoint * p) +{ + *y0_p = tp->level[MAX(tp->h[tp->i][tp->j], 0)]; + *y1_p = tp->level[MAX(tp->h[tp->i + d][tp->j], 0)]; + *y2_p = tp->level[MAX(tp->h[tp->i][tp->j + d], 0)]; + + p[0].x = tp->xpos[2 * tp->i + tp->j]; + p[1].x = tp->xpos[2 * (tp->i + d) + tp->j]; + p[2].x = tp->xpos[2 * tp->i + (tp->j + d)]; + + p[0].y = tp->ypos[tp->j] - *y0_p; + p[1].y = tp->ypos[tp->j] - *y1_p; + p[2].y = tp->ypos[tp->j + d] - *y2_p; + + p[3] = p[0]; +} + +static +void +calc_points2(trianglestruct * tp, int d, int *y0_p, int *y1_p, int *y2_p, XPoint * p) +{ + *y0_p = tp->level[MAX(tp->h[tp->i + d][tp->j], 0)]; + *y1_p = tp->level[MAX(tp->h[tp->i + d][tp->j + d], 0)]; + *y2_p = tp->level[MAX(tp->h[tp->i][tp->j + d], 0)]; + + p[0].x = tp->xpos[2 * (tp->i + d) + tp->j]; + p[1].x = tp->xpos[2 * (tp->i + d) + (tp->j + d)]; + p[2].x = tp->xpos[2 * tp->i + (tp->j + d)]; + + p[0].y = tp->ypos[tp->j] - *y0_p; + p[1].y = tp->ypos[tp->j + d] - *y1_p; + p[2].y = tp->ypos[tp->j + d] - *y2_p; + + p[3] = p[0]; +} + + +static +void +draw_mesh(ModeInfo * mi, trianglestruct * tp, int d, int count) +{ + XPoint p[4]; + int first = 1; + int y_0, y_1, y_2; + double dinv = 0.2 / d; + + if ((tp->j == 0) && (tp->i == 0)) { + MI_CLEARWINDOW(mi); + } + for (; (tp->j < tp->size) && (count > 0); tp->j += ((count) ? d : 0)) { + for (tp->i = (first) ? tp->i : 0, first = 0; + (tp->i < MAX_SIZE - tp->j) && (count > 0); + tp->i += d, count--) { + if (tp->i + tp->j < tp->size) { + calc_points1(tp, d, &y_0, &y_1, &y_2, p); + draw_atriangle(mi, p, y_0, y_1, y_2, dinv); + } + if (tp->i + tp->j + d < tp->size) { + calc_points2(tp, d, &y_0, &y_1, &y_2, p); + draw_atriangle(mi, p, y_0, y_1, y_2, dinv); + } + } + } + + if (tp->j == tp->size) { + tp->busyLoop = 1; + } +} + +void +init_triangle(ModeInfo * mi) +{ + trianglestruct *tp; + short *tmp; + int i, dim, one; + + if (triangles == NULL) { + if ((triangles = (trianglestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (trianglestruct))) == NULL) + return; + } + tp = &triangles[MI_SCREEN(mi)]; + + tp->width = MI_WIDTH(mi); + tp->height = MI_HEIGHT(mi); + tp->busyLoop = -1; + tp->fast = 2; + if (MI_IS_FULLRANDOM(mi)) { + tp->joke = (Bool) (NRAND(10) == 0); + tp->wireframe = (Bool) (LRAND() & 1); + } else + tp->wireframe = MI_IS_WIREFRAME(mi); + + MI_CLEARWINDOW(mi); + + tp->steps = MAX_STEPS; + do { + tp->size = 1 << --tp->steps; + } while (tp->size * 5 > tp->width); + tmp = tp->H; + for (i = 0; i < tp->size + 1; i++) { + tp->h[i] = tmp; + tmp += (tp->size) + 1 - i; + } + + tp->stage = -1; + dim = MIN(tp->width, tp->height); + + for (i = 0; i < 2 * tp->size + 1; i++) { + tp->xpos[i] = (short) ((((double) i) + / ((double) (2 * tp->size)) * (RIGHT - LEFT) + LEFT) + * dim) + (tp->width - dim) / 2; + } + + for (i = 0; i < (tp->size + 1); i++) { + tp->ypos[i] = (short) ((((double) i) + / ((double) tp->size) * (BOTTOM - TOP) + TOP) * dim) + + (tp->height - dim) / 2; + } + + for (i = 0; i < tp->steps; i++) { + tp->delta[i] = ((short) (DELTA * dim)) >> i; + } + + one = tp->delta[0]; + + if (one > 0) + for (i = 0; i < MAX_LEVELS; i++) { + tp->level[i] = (i * i) / one; + } +} + +void +draw_triangle(ModeInfo * mi) +{ + trianglestruct *tp = &triangles[MI_SCREEN(mi)]; + int d, d2, i, j, delta; + + MI_IS_DRAWN(mi) = True; + + if (tp->busyLoop > 0) { + if (tp->busyLoop >= 100) + tp->busyLoop = -1; + else + tp->busyLoop++; + return; + } + if (!tp->busyLoop) { + draw_mesh(mi, tp, tp->d / 2, MAX_SIZE / tp->d); + return; + } + if (tp->delta[0] > 0) { + if (!(++tp->stage)) { + tp->h[0][0] = (short int) MAX(0, DISPLACE(0, tp->delta[0])); + tp->h[tp->size][0] = (short int) MAX(0, DISPLACE(0, tp->delta[0])); + tp->h[0][tp->size] = (short int) MAX(0, DISPLACE(0, tp->delta[0])); + } else { + d = 2 << (tp->steps - tp->stage); + d2 = d / 2; + delta = tp->delta[tp->stage - 1]; + + for (i = 0; i < tp->size; i += d) { + for (j = 0; j < (tp->size - i); j += d) { + tp->h[i + d2][j] = (short int) DISPLACE(tp->h[i][j] + + tp->h[i + d][j], delta); + tp->h[i][j + d2] = (short int) DISPLACE(tp->h[i][j] + + tp->h[i][j + d], delta); + tp->h[i + d2][j + d2] = (short int) DISPLACE(tp->h[i + d][j] + + tp->h[i][j + d], delta); + } + + tp->busyLoop = 0; + tp->i = 0; + tp->j = 0; + tp->d = d; + } + } + } + if (tp->stage == tp->steps) { +#ifdef STANDALONE + erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi)); +#endif + init_triangle(mi); + } +} + +void +release_triangle(ModeInfo * mi) +{ + if (triangles != NULL) { + (void) free((void *) triangles); + triangles = NULL; + } +} + +void +refresh_triangle(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_triangle */ diff --git a/modes/tube.c b/modes/tube.c new file mode 100644 index 00000000..724c8986 --- /dev/null +++ b/modes/tube.c @@ -0,0 +1,354 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* tube --- animated tube */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)tube.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1997 Dan Stromberg + * + * 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 + * 4-Mar-97: Memory leak fix by Tom Schmidt + * 7-Feb-97: Written by Dan Stromberg + */ + + +#ifdef STANDALONE +#define PROGCLASS "Tube" +#define HACK_INIT init_tube +#define HACK_DRAW draw_tube +#define tube_opts xlockmore_opts +#define DEFAULTS "*delay: 25000 \n" \ + "*cycles: 20000 \n" \ + "*size: -200 \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 */ +#include "vis.h" +#include "color.h" +#endif /* !STANDALONE */ + +#ifdef MODE_tube + +ModeSpecOpt tube_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct tube_description = +{"tube", "init_tube", "draw_tube", "release_tube", + NULL, "init_tube", NULL, &tube_opts, + 25000, -9, 20000, -200, 64, 1.0, "", + "Shows an animated tube", 0, NULL}; + +#endif + +#define MINSIZE 3 +#define MINSHAPE 1 + +typedef struct { + int dx1, dy1; + int x1, y1; + int width, height, average, linewidth; + int shape; + XPoint *pts, *proto_pts; + unsigned int cur_color; + Colormap cmap; + XColor *colors; + XColor top; + XColor bottom; + XColor bgcol, fgcol; /* foreground and background colour specs */ + int counter; + int ncolors; + int usable_colors; + Bool fixed_colormap; +} tubestruct; + +static tubestruct *tubes = NULL; + +void +init_tube(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + tubestruct *tp; + int screen_width, screen_height, preserve; + int size = MI_SIZE(mi); + Bool truecolor; + int star = 1, lw; + unsigned long redmask, greenmask, bluemask; + + if (tubes == NULL) { + if ((tubes = (tubestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (tubestruct))) == NULL) + return; + } + tp = &tubes[MI_SCREEN(mi)]; + + screen_width = MI_WIDTH(mi); + screen_height = MI_HEIGHT(mi); + + if (size < -MINSIZE) { + tp->width = NRAND(MIN(-size, MAX(MINSIZE, screen_width / 2)) - + MINSIZE + 1) + MINSIZE; + tp->height = NRAND(MIN(-size, MAX(MINSIZE, screen_height / 2)) - + MINSIZE + 1) + MINSIZE; + } else if (size < MINSIZE) { + if (!size) { + tp->width = MAX(MINSIZE, screen_width / 2); + tp->height = MAX(MINSIZE, screen_height / 2); + } else { + tp->width = MINSIZE; + tp->height = MINSIZE; + } + } else { + tp->width = MIN(size, MAX(MINSIZE, screen_width / 2)); + tp->height = MIN(size, MAX(MINSIZE, screen_height / 2)); + } + tp->average = (tp->width + tp->height) / 2; + + tp->dx1 = NRAND(2); + if (tp->dx1 == 0) + tp->dx1 = -1; + tp->dy1 = NRAND(2); + if (tp->dy1 == 0) + tp->dy1 = -1; + if (tp->pts) { + (void) free((void *) tp->pts); + tp->pts = NULL; + } + if (tp->proto_pts) { + (void) free((void *) tp->proto_pts); + tp->proto_pts = NULL; + } + tp->shape = MI_COUNT(mi); + if (tp->shape < -MINSHAPE) { + tp->shape = NRAND(-tp->shape - MINSHAPE + 1) + MINSHAPE; + } else if (tp->shape < MINSHAPE) + tp->shape = MINSHAPE; + + if (tp->shape >= 3) { + int i; + float start; + + tp->width = tp->height = tp->average; + tp->pts = (XPoint *) malloc((tp->shape + 1) * sizeof (XPoint)); + tp->proto_pts = (XPoint *) malloc((tp->shape + 1) * sizeof (XPoint)); + start = (float) NRAND(360); + do { + star = NRAND(tp->shape / 2) + 1; /* Not always a star but thats ok. */ + } while ((star != 1) && (!(tp->shape % star))); + for (i = 0; i < tp->shape; i++) { + tp->proto_pts[i].x = tp->average / 2 + + (int) (cos((double) start * 2.0 * M_PI / 360.0) * tp->average / 2.0); + tp->proto_pts[i].y = tp->average / 2 + + (int) (sin((double) start * 2.0 * M_PI / 360.0) * tp->average / 2.0); + start += star * 360 / tp->shape; + } + tp->proto_pts[tp->shape] = tp->proto_pts[0]; + } + tp->linewidth = NRAND(tp->average / 6 + 1) + 1; + if (star > 1) /* Make the width less */ + tp->linewidth = NRAND(tp->linewidth / 2 + 1) + 1; + lw = tp->linewidth / 2; + tp->x1 = NRAND(screen_width - tp->width - 2 * lw) + lw; + tp->y1 = NRAND(screen_height - tp->height - 2 * lw) + lw; + + tp->counter = 0; + + MI_CLEARWINDOW(mi); + +#ifndef STANDALONE + tp->fixed_colormap = !setupColormap(mi, + &(tp->ncolors), &truecolor, &redmask, &greenmask, &bluemask); + if (!tp->fixed_colormap) { + preserve = preserveColors(MI_BLACK_PIXEL(mi), MI_WHITE_PIXEL(mi), + MI_BG_PIXEL(mi), MI_FG_PIXEL(mi)); + tp->bgcol.pixel = MI_BG_PIXEL(mi); + tp->fgcol.pixel = MI_FG_PIXEL(mi); + XQueryColor(display, MI_COLORMAP(mi), &(tp->bgcol)); + XQueryColor(display, MI_COLORMAP(mi), &(tp->fgcol)); + +#define RANGE 65536 +#define DENOM 2 + /* color in the bottom part */ + tp->bottom.red = NRAND(RANGE / DENOM); + tp->bottom.blue = NRAND(RANGE / DENOM); + tp->bottom.green = NRAND(RANGE / DENOM); + /* color in the top part */ + tp->top.red = RANGE - NRAND(RANGE / DENOM); + tp->top.blue = RANGE - NRAND(RANGE / DENOM); + tp->top.green = RANGE - NRAND(RANGE / DENOM); + + /* allocate colormap, if needed */ + if (tp->colors == NULL) + tp->colors = (XColor *) malloc(sizeof (XColor) * tp->ncolors); + if (tp->cmap == None) + tp->cmap = XCreateColormap(display, window, + MI_VISUAL(mi), AllocAll); + tp->usable_colors = tp->ncolors - preserve; + } + tp->cur_color = NRAND(tp->ncolors); +#endif /* !STANDALONE */ +} + +void +draw_tube(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + tubestruct *tp = &tubes[MI_SCREEN(mi)]; + unsigned int i, j; + int k, lw = tp->linewidth / 2; + + MI_IS_DRAWN(mi) = True; + + /* advance drawing color */ + tp->cur_color = (tp->cur_color + 1) % tp->ncolors; +#ifndef STANDALONE + if (!tp->fixed_colormap && tp->usable_colors > 2) { + while (tp->cur_color == MI_WHITE_PIXEL(mi) || + tp->cur_color == MI_BLACK_PIXEL(mi) || + tp->cur_color == MI_BG_PIXEL(mi) || + tp->cur_color == MI_FG_PIXEL(mi)) { + tp->cur_color = (tp->cur_color + 1) % tp->ncolors; + } + XSetForeground(display, gc, tp->cur_color); + } else + XSetForeground(display, gc, MI_PIXEL(mi, tp->cur_color)); +#endif /* !STANDALONE */ + + /* move rectangle forward, horiz */ + tp->x1 += tp->dx1; + if (tp->x1 < lw) { + tp->x1 = lw; + tp->dx1 = -tp->dx1; + } + if (tp->x1 + tp->width + lw >= MI_WIDTH(mi)) { + tp->x1 = MI_WIDTH(mi) - tp->width - 1 - lw; + tp->dx1 = -tp->dx1; + } + /* move rectange forward, vert */ + tp->y1 += tp->dy1; + if (tp->y1 < lw) { + tp->y1 = lw; + tp->dy1 = -tp->dy1; + } + if (tp->y1 + tp->height + lw >= MI_HEIGHT(mi)) { + tp->y1 = MI_HEIGHT(mi) - tp->height - 1 - lw; + tp->dy1 = -tp->dy1; + } + XSetLineAttributes(display, gc, tp->linewidth + (tp->shape >= 2), + LineSolid, CapNotLast, JoinRound); + if (tp->shape < 2) + XDrawRectangle(display, window, gc, + tp->x1, tp->y1, tp->width, tp->height); + else if (tp->shape == 2) + XDrawArc(display, window, gc, + tp->x1, tp->y1, tp->width, tp->height, 0, 23040); + else { + for (i = 0; i <= (unsigned int) tp->shape; i++) { + tp->pts[i].x = tp->x1 + tp->proto_pts[i].x; + tp->pts[i].y = tp->y1 + tp->proto_pts[i].y; + } + XDrawLines(display, window, gc, tp->pts, tp->shape + 1, + CoordModeOrigin); + } + XSetLineAttributes(display, gc, 1, LineSolid, CapNotLast, JoinRound); + +#ifndef STANDALONE + /* advance colormap */ + if (!tp->fixed_colormap && tp->usable_colors > 2) { + for (i = 0, j = tp->cur_color, k = 0; + i < (unsigned int) tp->ncolors; i++) { + if (i == MI_WHITE_PIXEL(mi)) { + tp->colors[i].pixel = i; + tp->colors[i].red = 65535; + tp->colors[i].blue = 65535; + tp->colors[i].green = 65535; + tp->colors[i].flags = DoRed | DoGreen | DoBlue; + } else if (i == MI_BLACK_PIXEL(mi)) { + tp->colors[i].pixel = i; + tp->colors[i].red = 0; + tp->colors[i].blue = 0; + tp->colors[i].green = 0; + tp->colors[i].flags = DoRed | DoGreen | DoBlue; + } else if (i == MI_BG_PIXEL(mi)) { + tp->colors[i] = tp->bgcol; + } else if (i == MI_FG_PIXEL(mi)) { + tp->colors[i] = tp->fgcol; + } else { + double range; + + tp->colors[i].pixel = i; + range = ((double) (tp->top.red - tp->bottom.red)) / + tp->ncolors; + tp->colors[i].red = (short unsigned int) (range * j + + tp->bottom.red); + range = ((double) (tp->top.green - tp->bottom.green)) / + tp->ncolors; + tp->colors[i].green = (short unsigned int) (range * j + + tp->bottom.green); + range = ((double) (tp->top.blue - tp->bottom.blue)) / + tp->ncolors; + tp->colors[i].blue = (short unsigned int) (range * j + + tp->bottom.blue); + tp->colors[i].flags = DoRed | DoGreen | DoBlue; + j = (j + 1) % tp->ncolors; + k++; + } + } + /* make the entire tube move forward */ + XStoreColors(display, tp->cmap, tp->colors, tp->ncolors); + setColormap(display, window, tp->cmap, MI_IS_INWINDOW(mi)); + } +#endif /* !STANDALONE */ + tp->counter++; + if (tp->counter > MI_CYCLES(mi)) { + init_tube(mi); + } +} + +void +release_tube(ModeInfo * mi) +{ + if (tubes != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + tubestruct *tp = &tubes[screen]; + + if (tp->pts) + (void) free((void *) tp->pts); + if (tp->proto_pts) + (void) free((void *) tp->proto_pts); + if (tp->cmap != None) + XFreeColormap(MI_DISPLAY(mi), tp->cmap); + if (tp->colors != NULL) + XFree((caddr_t) tp->colors); + } + (void) free((void *) tubes); + tubes = NULL; + } +} + +#endif /* MODE_tube */ diff --git a/modes/turtle.c b/modes/turtle.c new file mode 100644 index 00000000..071c33d8 --- /dev/null +++ b/modes/turtle.c @@ -0,0 +1,407 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* turtle --- fractal curves */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)turtle.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 01-Dec-96: Not too proud how I hacked in 2 more curves + * 30-Sep-96: started with Hilbert curve, David Bagley + * From Fractal Programming in C by Roger T. Stevens + */ + +#ifdef STANDALONE +#define PROGCLASS "Turtle" +#define HACK_INIT init_turtle +#define HACK_DRAW draw_turtle +#define turtle_opts xlockmore_opts +#define DEFAULTS "*delay: 1000000 \n" \ + "*cycles: 20 \n" \ + "*ncolors: 64 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_turtle + +ModeSpecOpt turtle_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct turtle_description = +{"turtle", "init_turtle", "draw_turtle", "release_turtle", + "init_turtle", "init_turtle", NULL, &turtle_opts, + 1000000, 1, 20, 1, 64, 1.0, "", + "Shows turtle fractals", 0, NULL}; + +#endif + +#define HILBERT 0 /* Not exactly a turtle algorthm... p199 */ +#define CESARO_VAR 1 /* Telephone curve p168 */ +#define HARTER_HEIGHTWAY 2 /* Dragon curve p292 */ +#define TURTLE_CURVES 3 + +#define POINT(x_1,y_1,x_2,y_2) (((x_2)==(x_1))?(((y_2)>(y_1))?90.0:270.0):\ + ((x_2)>(x_1))?(atan(((y_2)-(y_1))/((x_2)-(x_1)))*(180.0/M_PI)):\ + (atan(((y_2)-(y_1))/((x_2)-(x_1)))*(180.0/M_PI)+180.0)) +#define TURN(theta, angle) ((theta)+=(angle)) +#define STEP(x, y, r, theta) ((x)+=(r)*cos((theta)*M_PI/180.0)),\ + ((y)+=(r)*sin((theta)*M_PI/180.0)) + +typedef struct { + double r, theta, x, y; +} turtletype; + +typedef struct { + double x, y; +} complextype; + +typedef struct { + int width, height; + int time; + int level; + int curve; + int r, maxlevel, min, dir; + XPoint pt1, pt2; + XPoint start; + turtletype turtle; + int sign; +} turtlestruct; + +static turtlestruct *turtles = NULL; + +static void +generate_hilbert(ModeInfo * mi, int r1, int r2) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + turtlestruct *tp = &turtles[MI_SCREEN(mi)]; + + tp->level--; + + if (tp->level > 0) + generate_hilbert(mi, r2, r1); + + tp->pt2.x += r1; + tp->pt2.y += r2; + XDrawLine(display, window, gc, + tp->pt1.x, tp->pt1.y, tp->pt2.x, tp->pt2.y); + tp->pt1.x = tp->pt2.x; + tp->pt1.y = tp->pt2.y; + + if (tp->level > 0) + generate_hilbert(mi, r1, r2); + + tp->pt2.x += r2; + tp->pt2.y += r1; + XDrawLine(display, window, gc, + tp->pt1.x, tp->pt1.y, tp->pt2.x, tp->pt2.y); + tp->pt1.x = tp->pt2.x; + tp->pt1.y = tp->pt2.y; + + if (tp->level > 0) + generate_hilbert(mi, r1, r2); + + tp->pt2.x -= r1; + tp->pt2.y -= r2; + XDrawLine(display, window, gc, + tp->pt1.x, tp->pt1.y, tp->pt2.x, tp->pt2.y); + tp->pt1.x = tp->pt2.x; + tp->pt1.y = tp->pt2.y; + + if (tp->level > 0) + generate_hilbert(mi, -r2, -r1); + + tp->level++; +} + +static void +generate_cesarovar(ModeInfo * mi, double pt1x, double pt1y, + double pt2x, double pt2y, int level, int sign) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + turtlestruct *tp = &turtles[MI_SCREEN(mi)]; + complextype points[4]; + + level--; + + tp->turtle.r = sqrt((double) ((pt2x - pt1x) * (pt2x - pt1x) + + (pt2y - pt1y) * (pt2y - pt1y))) / 2.0; + points[0].x = pt1x; + points[0].y = pt1y; + points[2].x = pt2x; + points[2].y = pt2y; + tp->turtle.theta = POINT(pt1x, pt1y, pt2x, pt2y); + tp->turtle.x = pt1x; + tp->turtle.y = pt1y; + STEP(tp->turtle.x, tp->turtle.y, tp->turtle.r, tp->turtle.theta); + points[3].x = tp->turtle.x; + points[3].y = tp->turtle.y; + TURN(tp->turtle.theta, 90.0 * (double) sign); + STEP(tp->turtle.x, tp->turtle.y, tp->turtle.r, tp->turtle.theta); + points[1].x = tp->turtle.x; + points[1].y = tp->turtle.y; + sign = -1; + if (level > 0) { + int j; + + for (j = 0; j < 2; j++) { + pt1x = points[j].x; + pt2x = points[j + 1].x; + pt1y = points[j].y; + pt2y = points[j + 1].y; + generate_cesarovar(mi, pt1x, pt1y, pt2x, pt2y, level, sign); + } + } else { + XDrawLine(display, window, gc, + (int) points[0].x + tp->start.x, (int) points[0].y + tp->start.y, + (int) points[2].x + tp->start.x, (int) points[2].y + tp->start.y); + XDrawLine(display, window, gc, + (int) points[1].x + tp->start.x, (int) points[1].y + tp->start.y, + (int) points[3].x + tp->start.x, (int) points[3].y + tp->start.y); + } +} + +static void +generate_harter_heightway(ModeInfo * mi, double pt1x, double pt1y, + double pt2x, double pt2y, int level, int sign) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + turtlestruct *tp = &turtles[MI_SCREEN(mi)]; + complextype points[4]; + int sign2 = -1; + + level--; + + tp->turtle.r = sqrt((double) ((pt2x - pt1x) * (pt2x - pt1x) + + (pt2y - pt1y) * (pt2y - pt1y)) / 2.0); + points[0].x = pt1x; + points[0].y = pt1y; + points[2].x = pt2x; + points[2].y = pt2y; + tp->turtle.theta = POINT(pt1x, pt1y, pt2x, pt2y); + tp->turtle.x = pt1x; + tp->turtle.y = pt1y; + TURN(tp->turtle.theta, 45.0 * (double) sign); + STEP(tp->turtle.x, tp->turtle.y, tp->turtle.r, tp->turtle.theta); + points[1].x = tp->turtle.x; + points[1].y = tp->turtle.y; + if (level > 0) { + int j; + + for (j = 0; j < 2; j++) { + pt1x = points[j].x; + pt2x = points[j + 1].x; + pt1y = points[j].y; + pt2y = points[j + 1].y; + generate_harter_heightway(mi, pt1x, pt1y, pt2x, pt2y, level, sign2); + sign2 *= -1; + } + } else { + XDrawLine(display, window, gc, + (int) points[0].x + tp->start.x, (int) points[0].y + tp->start.y, + (int) points[1].x + tp->start.x, (int) points[1].y + tp->start.y); + XDrawLine(display, window, gc, + (int) points[1].x + tp->start.x, (int) points[1].y + tp->start.y, + (int) points[2].x + tp->start.x, (int) points[2].y + tp->start.y); + } +} + + +void +init_turtle(ModeInfo * mi) +{ + turtlestruct *tp; + int i; + + if (turtles == NULL) { + if ((turtles = (turtlestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (turtlestruct))) == NULL) + return; + } + tp = &turtles[MI_SCREEN(mi)]; + + tp->width = MI_WIDTH(mi); + tp->height = MI_HEIGHT(mi); + tp->min = MIN(tp->width, tp->height); + tp->maxlevel = 0; + i = tp->min; + do { + tp->r = i; + tp->maxlevel++; + i = (tp->min - 1) / (1 << tp->maxlevel); + } while (i > 1); + tp->maxlevel--; + tp->r = tp->min = (tp->r << tp->maxlevel); + + tp->curve = NRAND(TURTLE_CURVES); + switch (tp->curve) { + case HILBERT: + tp->start.x = NRAND(tp->width - tp->min); + tp->start.y = NRAND(tp->height - tp->min); + break; + case CESARO_VAR: + tp->r <<= 6; + tp->min = 3 * tp->min / 4; + tp->start.x = tp->width / 2; + tp->start.y = tp->height / 2; + switch (NRAND(4)) { + case 0: + tp->pt1.x = -tp->min / 2; + tp->pt1.y = 0; + tp->pt2.x = tp->min / 2; + tp->pt2.y = 0; + tp->start.y -= tp->min / 6; + break; + case 1: + tp->pt1.x = 0; + tp->pt1.y = -tp->min / 2; + tp->pt2.x = 0; + tp->pt2.y = tp->min / 2; + tp->start.x += tp->min / 6; + break; + case 2: + tp->pt1.x = tp->min / 2; + tp->pt1.y = 0; + tp->pt2.x = -tp->min / 2; + tp->pt2.y = 0; + tp->start.y += tp->min / 6; + break; + case 3: + tp->pt1.x = 0; + tp->pt1.y = tp->min / 2; + tp->pt2.x = 0; + tp->pt2.y = -tp->min / 2; + tp->start.x -= tp->min / 6; + break; + } + break; + case HARTER_HEIGHTWAY: + tp->r <<= 6; + tp->min = 3 * tp->min / 4; + tp->start.x = tp->width / 2; + tp->start.y = tp->height / 2; + switch (NRAND(4)) { + case 0: + tp->pt1.x = -tp->min / 2; + tp->pt1.y = -tp->min / 12; + tp->pt2.x = tp->min / 2; + tp->pt2.y = -tp->min / 12; + break; + case 1: + tp->pt1.x = tp->min / 12; + tp->pt1.y = -tp->min / 2; + tp->pt2.x = tp->min / 12; + tp->pt2.y = tp->min / 2; + break; + case 2: + tp->pt1.x = tp->min / 2; + tp->pt1.y = tp->min / 12; + tp->pt2.x = -tp->min / 2; + tp->pt2.y = tp->min / 12; + break; + case 3: + tp->pt1.x = -tp->min / 12; + tp->pt1.y = tp->min / 2; + tp->pt2.x = -tp->min / 12; + tp->pt2.y = -tp->min / 2; + break; + } + } + tp->level = 0; + tp->sign = 1; + tp->dir = NRAND(4); + tp->time = 0; + + MI_CLEARWINDOW(mi); + + if (MI_NPIXELS(mi) <= 2) + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), MI_WHITE_PIXEL(mi)); +} + +void +draw_turtle(ModeInfo * mi) +{ + turtlestruct *tp = &turtles[MI_SCREEN(mi)]; + + if (++tp->time > MI_CYCLES(mi)) + init_turtle(mi); + + MI_IS_DRAWN(mi) = True; + + if (MI_NPIXELS(mi) > 2) + XSetForeground(MI_DISPLAY(mi), MI_GC(mi), + MI_PIXEL(mi, NRAND(MI_NPIXELS(mi)))); + + tp->r = tp->r >> 1; + tp->level++; + if (tp->r > 1) + switch (tp->curve) { + case HILBERT: + switch (tp->dir) { + case 0: + tp->pt1.x = tp->pt2.x = tp->start.x + tp->r / 2; + tp->pt1.y = tp->pt2.y = tp->start.y + tp->r / 2; + generate_hilbert(mi, 0, tp->r); + break; + case 1: + tp->pt1.x = tp->pt2.x = tp->start.x + tp->min - tp->r / 2; + tp->pt1.y = tp->pt2.y = tp->start.y + tp->min - tp->r / 2; + generate_hilbert(mi, 0, -tp->r); + break; + case 2: + tp->pt1.x = tp->pt2.x = tp->start.x + tp->min - tp->r / 2; + tp->pt1.y = tp->pt2.y = tp->start.y + tp->min - tp->r / 2; + generate_hilbert(mi, -tp->r, 0); + break; + case 3: + tp->pt1.x = tp->pt2.x = tp->start.x + tp->r / 2; + tp->pt1.y = tp->pt2.y = tp->start.y + tp->r / 2; + generate_hilbert(mi, tp->r, 0); + } + break; + case CESARO_VAR: + generate_cesarovar(mi, tp->pt1.x, tp->pt1.y, tp->pt2.x, tp->pt2.y, + tp->level, tp->sign); + break; + case HARTER_HEIGHTWAY: + generate_harter_heightway(mi, tp->pt1.x, tp->pt1.y, + tp->pt2.x, tp->pt2.y, tp->level, tp->sign); + break; + } +} + +void +release_turtle(ModeInfo * mi) +{ + if (turtles != NULL) { + (void) free((void *) turtles); + turtles = NULL; + } +} + +#endif /* MODE_turtle */ diff --git a/modes/vines.c b/modes/vines.c new file mode 100644 index 00000000..0ae29f17 --- /dev/null +++ b/modes/vines.c @@ -0,0 +1,183 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* vines --- vine fractals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)vines.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1997 by Tracy Camp campt@hurrah.com + * + * 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 you make a modification I would of course appreciate a copy. + * + * Revision History: + * 11-Jul-97: David Hansen + * Changed names to vines and modified draw loop + * to honor batchcount so vines can be grown or + * plotted. + * 10-May-97: Compatible with xscreensaver + * 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. + */ + +/*- + * 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. + */ + +#ifdef STANDALONE +#define PROGCLASS "Vines" +#define HACK_INIT init_vines +#define HACK_DRAW draw_vines +#define vines_opts xlockmore_opts +#define DEFAULTS "*delay: 200000 \n" \ + "*count: 0 \n" \ + "*ncolors: 64 \n" \ + "*eraseSpeed: 400 \n" \ + "*eraseMode: -1 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_vines + +ModeSpecOpt vines_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct vines_description = +{"vines", "init_vines", "draw_vines", "release_vines", + "refresh_vines", "init_vines", NULL, &vines_opts, + 200000, 0, 1, 1, 64, 1.0, "", + "Shows fractals", 0, NULL}; + +#endif + +typedef struct { + int a; + int x1; + int y1; + int x2; + int y2; + int i; + int length; + int iterations; + int constant; + int ang; + int centerx; + int centery; +} vinestruct; + +static vinestruct *vines = NULL; + +void +refresh_vines(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} /* refresh_vines */ + +void +init_vines(ModeInfo * mi) +{ + vinestruct *fp; + + if (vines == NULL) { + if ((vines = (vinestruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (vinestruct))) == NULL) { + return; + } + } + fp = &vines[MI_SCREEN(mi)]; + + fp->i = 0; + fp->length = 0; + fp->iterations = 30 + NRAND(100); + + MI_CLEARWINDOW(mi); +} /* init_vines */ + +void +draw_vines(ModeInfo * mi) +{ + vinestruct *fp = &vines[MI_SCREEN(mi)]; + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + int count; + + MI_IS_DRAWN(mi) = True; + + if (fp->i >= fp->length) { + if (--(fp->iterations) == 0) { + init_vines(mi); + } + fp->centerx = NRAND(MI_WIDTH(mi)); + fp->centery = NRAND(MI_HEIGHT(mi)); + + fp->ang = 60 + NRAND(720); + fp->length = 100 + NRAND(3000); + fp->constant = fp->length * (10 + NRAND(10)); + + fp->i = 0; + 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_WHITE_PIXEL(mi)); + } + count = fp->i + MI_COUNT(mi); + if ((count <= fp->i) || (count > fp->length)) + count = fp->length; + + while (fp->i < count) { + 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 * fp->i); + + fp->x1 = fp->x2; + fp->y1 = fp->y2; + + fp->x2 += (int) (fp->i * ((cos(fp->a) * 360) / (2 * M_PI))); + fp->y2 += (int) (fp->i * ((sin(fp->a) * 360) / (2 * M_PI))); + fp->i++; + } +} /* draw_vines */ + +void +release_vines(ModeInfo * mi) +{ + if (vines != NULL) { + (void) free((void *) vines); + vines = NULL; + } +} /* release_vines */ + +#endif /* MODE_vines */ diff --git a/modes/voters.c b/modes/voters.c new file mode 100644 index 00000000..03c519d8 --- /dev/null +++ b/modes/voters.c @@ -0,0 +1,809 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* voters --- Dewdney's Voting Simulation */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)voters.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1997 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-Jun-97: Coded from A.K. Dewdney's "The Armchair Universe, Computer + * Recreations from the Pages of Scientific American Magazine" + * W.H. Freedman and Company, New York, 1988 (Apr 1985) + * Used wator.c and demon.c as a guide. + */ + +#ifdef STANDALONE +#define PROGCLASS "Voters" +#define HACK_INIT init_voters +#define HACK_DRAW draw_voters +#define voters_opts xlockmore_opts +#define DEFAULTS "*delay: 1000 \n" \ + "*cycles: 327670 \n" \ + "*size: 0 \n" \ + "*ncolors: 64 \n" \ + "*neighbors: 0 \n" +#define UNIFORM_COLORS +#define BRIGHT_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_voters + +/*- + * neighbors of 0 randomizes it between 3, 4, 6, 8, 9, and 12. + */ +extern int neighbors; + +ModeSpecOpt voters_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct voters_description = +{"voters", "init_voters", "draw_voters", "release_voters", + "refresh_voters", "init_voters", NULL, &voters_opts, + 1000, 0, 327670, 0, 64, 1.0, "", + "Shows Dewdney's Voters", 0, NULL}; + +#endif + +extern int neighbors; + +/*- + * From far left to right, at least in the currently in the US. By the way, I + * consider myself to be a proud bleeding heart liberal democrat, in + * case anyone wants to know.... Please, no fascist "improvements". :) + */ + +#include "bitmaps/sickle.xbm" +#include "bitmaps/donkey.xbm" +#include "bitmaps/elephant.xbm" + +#define MINPARTIES 2 +#define BITMAPS 3 +#define MINGRIDSIZE 10 +#define MINSIZE 4 +#define FACTOR 10 +#define NEIGHBORKINDS 6 + +static XImage logo[BITMAPS] = +{ + {0, 0, 0, XYBitmap, (char *) sickle_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) donkey_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) elephant_bits, LSBFirst, 8, LSBFirst, 8, 1}, +}; + +/* Voter data */ +typedef struct { + char kind; + int age; + int col, row; +} cellstruct; + +/* Doublely linked list */ +typedef struct _CellList { + cellstruct info; + struct _CellList *previous, *next; +} CellList; + +typedef struct { + Bool painted; + int party; /* Currently working on donkey, elephant, or sickle? */ + int xs, ys; /* Size of party icon */ + int xb, yb; /* Bitmap offset for party icon */ + int nparties; /* 2 parties or 3 */ + int number_in_party[BITMAPS]; /* Good to know when one party rules */ + int pixelmode; + int generation; + int ncols, nrows; + int npositions; + int width, height; + CellList *last, *first; + char *arr; + int neighbors; + int busyLoop; + XPoint hexagonList[6]; + XPoint triangleList[2][3]; +} voterstruct; + +static char plots[NEIGHBORKINDS] = +{ + 3, 4, 6, 8, 9, 12 /* Neighborhoods */ +}; + +static voterstruct *voters = NULL; +static int icon_width, icon_height; + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned long color, int bitmap, + Bool firstChange) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + voterstruct *vp = &voters[MI_SCREEN(mi)]; + unsigned long colour = (MI_NPIXELS(mi) > 2) ? + MI_PIXEL(mi, color) : MI_WHITE_PIXEL(mi); + + XSetForeground(display, gc, colour); + if (vp->neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + vp->hexagonList[0].x = vp->xb + ccol * vp->xs; + vp->hexagonList[0].y = vp->yb + crow * vp->ys; + if (vp->xs == 1 && vp->ys == 1) + XFillRectangle(display, window, gc, + vp->hexagonList[0].x, vp->hexagonList[0].y, 1, 1); + else if (bitmap == BITMAPS - 1) + XFillPolygon(display, window, gc, + vp->hexagonList, 6, Convex, CoordModePrevious); + else { + if (firstChange) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, + vp->hexagonList, 6, Convex, CoordModePrevious); + XSetForeground(display, gc, colour); + } + if (vp->xs <= 6 || vp->ys <= 2) + XFillRectangle(display, window, gc, + vp->hexagonList[0].x - 3 * vp->xs / 4, + vp->hexagonList[0].y + vp->ys / 4, vp->xs, vp->ys); + else + XFillArc(display, window, gc, + vp->xb + vp->xs * ccol - 3 * vp->xs / 4, + vp->yb + vp->ys * crow + vp->ys / 4, + 2 * vp->xs - 6, 2 * vp->ys - 2, + 0, 23040); + } + } else if (vp->neighbors == 4 || vp->neighbors == 8) { + if (vp->pixelmode) { + if (bitmap == BITMAPS - 1 || (vp->xs <= 2 || vp->ys <= 2)) + XFillRectangle(display, window, gc, + vp->xb + vp->xs * col, vp->yb + vp->ys * row, + vp->xs - (vp->xs > 3), vp->ys - (vp->ys > 3)); + else { + if (firstChange) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, + vp->xb + vp->xs * col, vp->yb + vp->ys * row, + vp->xs, vp->ys); + XSetForeground(display, gc, colour); + } + XFillArc(display, window, gc, + vp->xb + vp->xs * col, vp->yb + vp->ys * row, + vp->xs - 1, vp->ys - 1, + 0, 23040); + } + } else + (void) XPutImage(display, window, gc, + &logo[bitmap], 0, 0, + vp->xb + vp->xs * col, vp->yb + vp->ys * row, + icon_width, icon_height); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + vp->triangleList[orient][0].x = vp->xb + col * vp->xs; + vp->triangleList[orient][0].y = vp->yb + row * vp->ys; + if (vp->xs <= 3 || vp->ys <= 3) + XFillRectangle(display, window, gc, + ((orient) ? -1 : 1) + vp->triangleList[orient][0].x, + vp->triangleList[orient][0].y, 1, 1); + else { + if (orient) + vp->triangleList[orient][0].x += (vp->xs / 2 - 1); + else + vp->triangleList[orient][0].x -= (vp->xs / 2 - 1); + if (bitmap == BITMAPS - 1) + XFillPolygon(display, window, gc, + vp->triangleList[orient], 3, Convex, CoordModePrevious); + else { + if (firstChange) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, + vp->triangleList[orient], 3, Convex, CoordModePrevious); + XSetForeground(display, gc, colour); + } + XFillArc(display, window, gc, + vp->xb + vp->xs * col - 4 * vp->xs / 5 + + ((orient) ? vp->xs / 3 : 3 * vp->xs / 5), + vp->yb + vp->ys * row - vp->ys / 2 + 1, vp->ys - 3, vp->ys - 3, + 0, 23040); + } + } + } +} + +static void +init_list(voterstruct * vp) +{ + /* Waste some space at the beginning and end of list + so we do not have to complicated checks against falling off the ends. */ + vp->last = (CellList *) malloc(sizeof (CellList)); + vp->first = (CellList *) malloc(sizeof (CellList)); + vp->first->previous = vp->last->next = NULL; + vp->first->next = vp->last->previous = NULL; + vp->first->next = vp->last; + vp->last->previous = vp->first; +} + +static void +addto_list(voterstruct * vp, cellstruct info) +{ + CellList *curr; + + curr = (CellList *) malloc(sizeof (CellList)); + vp->last->previous->next = curr; + curr->previous = vp->last->previous; + curr->next = vp->last; + vp->last->previous = curr; + curr->info = info; +} + +static void +removefrom_list(CellList * ptr) +{ + ptr->previous->next = ptr->next; + ptr->next->previous = ptr->previous; + (void) free((void *) ptr); +} + +static void +flush_list(voterstruct * vp) +{ + CellList *curr; + + while (vp->last->previous != vp->first) { + curr = vp->last->previous; + curr->previous->next = vp->last; + vp->last->previous = curr->previous; + (void) free((void *) curr); + } +} + +static char +neighbors_opinion(voterstruct * vp, int col, int row, int dir) +{ + if (vp->neighbors == 6) { + switch (dir) { + case 0: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + break; + case 60: + if (!(row & 1)) + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 120: + if (row & 1) + col = (!col) ? vp->ncols - 1 : col - 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? vp->ncols - 1 : col - 1; + break; + case 240: + if (row & 1) + col = (!col) ? vp->ncols - 1 : col - 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 300: + if (!(row & 1)) + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (vp->neighbors == 4 || vp->neighbors == 8) { + switch (dir) { + case 0: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + break; + case 45: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 90: + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 135: + col = (!col) ? vp->ncols - 1 : col - 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? vp->ncols - 1 : col - 1; + break; + case 225: + col = (!col) ? vp->ncols - 1 : col - 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 270: + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 315: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = (!col) ? vp->ncols - 1 : col - 1; + break; + case 30: + case 40: + col = (!col) ? vp->ncols - 1 : col - 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 60: + col = (!col) ? vp->ncols - 1 : col - 1; + if (row + 1 == vp->nrows) + row = 1; + else if (row + 2 == vp->nrows) + row = 0; + else + row = row + 2; + break; + case 80: + case 90: + if (row + 1 == vp->nrows) + row = 1; + else if (row + 2 == vp->nrows) + row = 0; + else + row = row + 2; + break; + case 120: + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 150: + case 160: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 180: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + break; + case 200: + case 210: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 240: + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 270: + case 280: + if (!row) + row = vp->nrows - 2; + else if (!(row - 1)) + row = vp->nrows - 1; + else + row = row - 2; + + break; + case 300: + col = (!col) ? vp->ncols - 1 : col - 1; + if (!row) + row = vp->nrows - 2; + else if (!(row - 1)) + row = vp->nrows - 1; + else + row = row - 2; + break; + case 320: + case 330: + col = (!col) ? vp->ncols - 1 : col - 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + break; + case 30: + case 40: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 60: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + if (!row) + row = vp->nrows - 2; + else if (row == 1) + row = vp->nrows - 1; + else + row = row - 2; + break; + case 80: + case 90: + if (!row) + row = vp->nrows - 2; + else if (row == 1) + row = vp->nrows - 1; + else + row = row - 2; + break; + case 120: + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 150: + case 160: + col = (!col) ? vp->ncols - 1 : col - 1; + row = (!row) ? vp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? vp->ncols - 1 : col - 1; + break; + case 200: + case 210: + col = (!col) ? vp->ncols - 1 : col - 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 240: + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + case 270: + case 280: + if (row + 1 == vp->nrows) + row = 1; + else if (row + 2 == vp->nrows) + row = 0; + else + row = row + 2; + break; + case 300: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + if (row + 1 == vp->nrows) + row = 1; + else if (row + 2 == vp->nrows) + row = 0; + else + row = row + 2; + break; + case 320: + case 330: + col = (col + 1 == vp->ncols) ? 0 : col + 1; + row = (row + 1 == vp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + + return vp->arr[row * vp->ncols + col]; +} + +static void +advanceColors(ModeInfo * mi, int col, int row) +{ + voterstruct *vp = &voters[MI_SCREEN(mi)]; + CellList *curr; + + curr = vp->first->next; + while (curr != vp->last) { + if (curr->info.col == col && curr->info.row == row) { + curr = curr->next; + removefrom_list(curr->previous); + } else { + if (curr->info.age > 0) + curr->info.age--; + else if (curr->info.age < 0) + curr->info.age++; + drawcell(mi, curr->info.col, curr->info.row, + (MI_NPIXELS(mi) + curr->info.age / FACTOR + + (MI_NPIXELS(mi) * curr->info.kind / BITMAPS)) % MI_NPIXELS(mi), + curr->info.kind, False); + if (curr->info.age == 0) { + curr = curr->next; + removefrom_list(curr->previous); + } else + curr = curr->next; + } + } +} + +void +refresh_voters(ModeInfo * mi) +{ + voterstruct *vp = &voters[MI_SCREEN(mi)]; + int col, row, colrow; + + if (vp->painted) { + MI_CLEARWINDOW(mi); + vp->painted = False; + for (row = 0; row < vp->nrows; row++) + for (col = 0; col < vp->ncols; col++) { + colrow = col + row * vp->ncols; + /* Draw all old, will get corrected soon if wrong... */ + drawcell(mi, col, row, + (unsigned long) (MI_NPIXELS(mi) * vp->arr[colrow] / BITMAPS), + vp->arr[colrow], False); + } + } +} + +void +init_voters(ModeInfo * mi) +{ + int size = MI_SIZE(mi); + voterstruct *vp; + int i, col, row, colrow; + + if (voters == NULL) { + if ((voters = (voterstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (voterstruct))) == NULL) + return; + } + vp = &voters[MI_SCREEN(mi)]; + + vp->generation = 0; + if (!vp->first) { /* Genesis of democracy */ + icon_width = donkey_width; + icon_height = donkey_height; + init_list(vp); + for (i = 0; i < BITMAPS; i++) { + logo[i].width = icon_width; + logo[i].height = icon_height; + logo[i].bytes_per_line = (icon_width + 7) / 8; + } + } else /* Exterminate all free thinking individuals */ + flush_list(vp); + + vp->width = MI_WIDTH(mi); + vp->height = MI_HEIGHT(mi); + + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + vp->neighbors = neighbors; + break; + } + if (i == NEIGHBORKINDS - 1) { +#if 0 + vp->neighbors = plots[NRAND(NEIGHBORKINDS)]; + vp->neighbors = (LRAND() & 1) ? 4 : 8; +#else + vp->neighbors = 8; +#endif + break; + } + } + + if (vp->neighbors == 6) { + int nccols, ncrows, sides; + + if (vp->width < 2) + vp->width = 2; + if (vp->height < 4) + vp->height = 4; + if (size < -MINSIZE) + vp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + vp->ys = MAX(MINSIZE, MIN(vp->width, vp->height) / MINGRIDSIZE); + else + vp->ys = MINSIZE; + } else + vp->ys = MIN(size, MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE)); + vp->xs = vp->ys; + vp->pixelmode = True; + nccols = MAX(vp->width / vp->xs - 2, 2); + ncrows = MAX(vp->height / vp->ys - 1, 2); + vp->ncols = nccols / 2; + vp->nrows = 2 * (ncrows / 4); + vp->xb = (vp->width - vp->xs * nccols) / 2 + vp->xs / 2; + vp->yb = (vp->height - vp->ys * (ncrows / 2) * 2) / 2 + vp->ys; + for (sides = 0; sides < 6; sides++) { + vp->hexagonList[sides].x = (vp->xs - 1) * hexagonUnit[sides].x; + vp->hexagonList[sides].y = + ((vp->ys - 1) * hexagonUnit[sides].y / 2) * 4 / 3; + } + } else if (vp->neighbors == 4 || vp->neighbors == 8) { + if (vp->width < 2) + vp->width = 2; + if (vp->height < 2) + vp->height = 2; + if (size == 0 || + MINGRIDSIZE * size > vp->width || MINGRIDSIZE * size > vp->height) { + if (vp->width > MINGRIDSIZE * icon_width && + vp->height > MINGRIDSIZE * icon_height) { + vp->pixelmode = False; + vp->xs = icon_width; + vp->ys = icon_height; + } else { + vp->pixelmode = True; + vp->xs = vp->ys = MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE); + } + } else { + vp->pixelmode = True; + if (size < -MINSIZE) + vp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + vp->ys = MINSIZE; + else + vp->ys = MIN(size, MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE)); + vp->xs = vp->ys; + } + vp->ncols = MAX(vp->width / vp->xs, 2); + vp->nrows = MAX(vp->height / vp->ys, 2); + vp->xb = (vp->width - vp->xs * vp->ncols) / 2; + vp->yb = (vp->height - vp->ys * vp->nrows) / 2; + } else { /* TRI */ + int orient, sides; + + if (vp->width < 2) + vp->width = 2; + if (vp->height < 2) + vp->height = 2; + if (size < -MINSIZE) + vp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + vp->ys = MAX(MINSIZE, MIN(vp->width, vp->height) / MINGRIDSIZE); + else + vp->ys = MINSIZE; + } else + vp->ys = MIN(size, MAX(MINSIZE, MIN(vp->width, vp->height) / + MINGRIDSIZE)); + vp->xs = (int) (1.52 * vp->ys); + vp->pixelmode = True; + vp->ncols = (MAX(vp->width / vp->xs - 1, 2) / 2) * 2; + vp->nrows = (MAX(vp->height / vp->ys - 1, 2) / 2) * 2; + vp->xb = (vp->width - vp->xs * vp->ncols) / 2 + vp->xs / 2; + vp->yb = (vp->height - vp->ys * vp->nrows) / 2 + vp->ys / 2; + for (orient = 0; orient < 2; orient++) { + for (sides = 0; sides < 3; sides++) { + vp->triangleList[orient][sides].x = + (vp->xs - 2) * triangleUnit[orient][sides].x; + vp->triangleList[orient][sides].y = + (vp->ys - 2) * triangleUnit[orient][sides].y; + } + } + } + + vp->npositions = vp->ncols * vp->nrows; + if (vp->arr != NULL) + (void) free((void *) vp->arr); + vp->arr = (char *) calloc(vp->npositions, sizeof (char)); + + /* Play G-d with these numbers */ + vp->nparties = MI_COUNT(mi); + if (vp->nparties < MINPARTIES || vp->nparties > BITMAPS) + vp->nparties = NRAND(BITMAPS - MINPARTIES + 1) + MINPARTIES; + if (vp->pixelmode) + vp->nparties = 2; + + vp->busyLoop = 0; + MI_CLEARWINDOW(mi); + vp->painted = False; + + for (i = 0; i < BITMAPS; i++) + vp->number_in_party[i] = 0; + + for (row = 0; row < vp->nrows; row++) + for (col = 0; col < vp->ncols; col++) { + colrow = col + row * vp->ncols; + i = NRAND(vp->nparties) + (vp->nparties == 2); + vp->arr[colrow] = (char) i; + drawcell(mi, col, row, (unsigned long) (MI_NPIXELS(mi) * i / BITMAPS), + i, False); + vp->number_in_party[i]++; + } +} + +void +draw_voters(ModeInfo * mi) +{ + voterstruct *vp = &voters[MI_SCREEN(mi)]; + int i, spineless_dude, neighbor_direction; + int spineless_col, spineless_row; + int new_opinion, old_opinion; + cellstruct info; + + MI_IS_DRAWN(mi) = True; + + vp->painted = True; + if (vp->busyLoop) { + if (vp->busyLoop >= 5000) + vp->busyLoop = 0; + else + vp->busyLoop++; + return; + } + for (i = 0; i < BITMAPS; i++) + if (vp->number_in_party[i] == vp->npositions) { /* The End of the WORLD */ + init_voters(mi); /* Create a more interesting planet */ + } + spineless_dude = NRAND(vp->npositions); + neighbor_direction = NRAND(vp->neighbors) * 360 / vp->neighbors; + spineless_col = spineless_dude % vp->ncols; + spineless_row = spineless_dude / vp->ncols; + old_opinion = vp->arr[spineless_dude]; + new_opinion = neighbors_opinion(vp, spineless_col, spineless_row, + neighbor_direction); + if (old_opinion != new_opinion) { + vp->number_in_party[old_opinion]--; + vp->number_in_party[new_opinion]++; + vp->arr[spineless_dude] = new_opinion; + info.kind = new_opinion; + info.age = (old_opinion - new_opinion); + if (info.age == 2) + info.age = -1; + if (info.age == -2) + info.age = 1; + info.age *= (FACTOR * MI_NPIXELS(mi)) / 3; + info.col = spineless_col; + info.row = spineless_row; + if (MI_NPIXELS(mi) > 2) { + advanceColors(mi, spineless_col, spineless_row); + addto_list(vp, info); + } + drawcell(mi, spineless_col, spineless_row, + (MI_NPIXELS(mi) + info.age / FACTOR + + (MI_NPIXELS(mi) * new_opinion / BITMAPS)) % MI_NPIXELS(mi), + new_opinion, True); + } else if (MI_NPIXELS(mi) > 2) + advanceColors(mi, -1, -1); + vp->generation++; + for (i = 0; i < BITMAPS; i++) + if (vp->number_in_party[i] == vp->npositions) { /* The End of the WORLD */ + vp->busyLoop = 1; + refresh_voters(mi); + } +} + +void +release_voters(ModeInfo * mi) +{ + if (voters != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + voterstruct *vp = &voters[screen]; + + if (vp->first) + flush_list(vp); + if (vp->last) + (void) free((void *) vp->last); + if (vp->first) + (void) free((void *) vp->first); + if (vp->arr != NULL) + (void) free((void *) vp->arr); + } + (void) free((void *) voters); + voters = NULL; + } +} + +#endif /* MODE_voters */ diff --git a/modes/wator.c b/modes/wator.c new file mode 100644 index 00000000..b2763171 --- /dev/null +++ b/modes/wator.c @@ -0,0 +1,979 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* wator --- Dewdney's Wa-Tor, water torus simulation */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)wator.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1994 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 29-Aug-95: Efficiency improvements. + * 12-Dec-94: Coded from A.K. Dewdney's "The Armchair Universe, Computer + * Recreations from the Pages of Scientific American Magazine" + * W.H. Freedman and Company, New York, 1988 (Dec 1984 and + * June 1985) also used life.c as a guide. + */ + +#ifdef STANDALONE +#define PROGCLASS "Wator" +#define HACK_INIT init_wator +#define HACK_DRAW draw_wator +#define wator_opts xlockmore_opts +#define DEFAULTS "*delay: 750000 \n" \ + "*cycles: 32767 \n" \ + "*size: 0 \n" \ + "*ncolors: 200 \n" \ + "*neighbors: 0 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_wator + +/*- + * neighbors of 0 randomizes it between 3, 4, 6, 8, 9, and 12. + */ +extern int neighbors; + +ModeSpecOpt wator_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct wator_description = +{"wator", "init_wator", "draw_wator", "release_wator", + "refresh_wator", "init_wator", NULL, &wator_opts, + 750000, 1, 32767, 0, 64, 1.0, "", + "Shows Dewdney's Water-Torus planet of fish and sharks", 0, NULL}; + +#endif + +#include "bitmaps/fish-0.xbm" +#include "bitmaps/fish-1.xbm" +#include "bitmaps/fish-2.xbm" +#include "bitmaps/fish-3.xbm" +#include "bitmaps/fish-4.xbm" +#include "bitmaps/fish-5.xbm" +#include "bitmaps/fish-6.xbm" +#include "bitmaps/fish-7.xbm" +#include "bitmaps/shark-0.xbm" +#include "bitmaps/shark-1.xbm" +#include "bitmaps/shark-2.xbm" +#include "bitmaps/shark-3.xbm" +#include "bitmaps/shark-4.xbm" +#include "bitmaps/shark-5.xbm" +#include "bitmaps/shark-6.xbm" +#include "bitmaps/shark-7.xbm" + +#define FISH 0 +#define SHARK 1 +#define KINDS 2 +#define ORIENTS 4 +#define REFLECTS 2 +#define BITMAPS (ORIENTS*REFLECTS*KINDS) +#define KINDBITMAPS (ORIENTS*REFLECTS) +#define MINGRIDSIZE 10 /* It is possible for the fish to take over with 3 */ +#define MINSIZE 4 +#define NEIGHBORKINDS 6 + +static XImage logo[BITMAPS] = +{ + {0, 0, 0, XYBitmap, (char *) fish0_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish1_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish2_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish3_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish4_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish5_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish6_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish7_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark0_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark1_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark2_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark3_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark4_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark5_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark6_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark7_bits, LSBFirst, 8, LSBFirst, 8, 1}, +}; + +/* Fish and shark data */ +typedef struct { + char kind, age, food, direction; + unsigned long color; + int col, row; +} cellstruct; + +/* Doublely linked list */ +typedef struct _CellList { + cellstruct info; + struct _CellList *previous, *next; +} CellList; + +typedef struct { + Bool painted; + int nkind[KINDS]; /* Number of fish and sharks */ + int breed[KINDS]; /* Breeding time of fish and sharks */ + int sstarve; /* Time the sharks starve if they dont find a fish */ + int kind; /* Currently working on fish or sharks? */ + int xs, ys; /* Size of fish and sharks */ + int xb, yb; /* Bitmap offset for fish and sharks */ + int pixelmode; + int generation; + int ncols, nrows, positions; + int width, height; + CellList *currkind, *babykind, *lastkind[KINDS + 1], *firstkind[KINDS + 1]; + CellList **arr; /* 0=empty or pts to a fish or shark */ + int neighbors; + union { + XPoint hexagon[6]; + XPoint triangle[2][3]; + } shape; +} watorstruct; + +static char plots[NEIGHBORKINDS] = +{ + 3, 4, 6, 8, 9, 12 /* Neighborhoods */ +}; + +static watorstruct *wators = NULL; +static int icon_width, icon_height; + +#if 0 +/*- + * shape either a bitmap or 0 for circle and 1 for polygon + * (if triangle shape: -1, 0, 2 or 3 to differentiate left and right) + */ +drawshape(ModeInfo * mi, int x, int y, int sizex, int sizey, + int sides, int shape) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + + if (sides == 4 && sizex == 0 && sizey == 0) { + (void) XPutImage(display, window, gc, &logo[shape], 0, 0, + x - icon_width, y - icon_height / 2, icon_width, icon_height); + } else if (sizex < 3 || sizey < 3 || (sides == 4 && shape == 1)) { + XFillRectangle(display, window, gc, + x - sizex / 2, y - sizey / 2, + sizex - (sizey > 3), sizey - (sizey > 3)); + } else if (sides == 4 && shape == 0) { + } else if (sides == 6 && shape == 1) { + } else if (sides == 6 && shape == 0) { + } else if (sides == 3 && shape == 1) { + } else if (sides == 3 && shape == 2) { + } else if (sides == 3 && shape == -1) { + } else if (sides == 3 && shape == 0) { + } +} +#endif + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned long color, int bitmap, + Bool alive) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + watorstruct *wp = &wators[MI_SCREEN(mi)]; + unsigned long colour; + + if (!alive) + colour = MI_BLACK_PIXEL(mi); + else if (MI_NPIXELS(mi) > 2) + colour = MI_PIXEL(mi, color); + else + colour = MI_WHITE_PIXEL(mi); + XSetForeground(display, gc, colour); + if (wp->neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + wp->shape.hexagon[0].x = wp->xb + ccol * wp->xs; + wp->shape.hexagon[0].y = wp->yb + crow * wp->ys; + if (wp->xs == 1 && wp->ys == 1) + XFillRectangle(display, window, gc, + wp->shape.hexagon[0].x, wp->shape.hexagon[0].y, 1, 1); + else if (bitmap >= KINDBITMAPS || !alive) + XFillPolygon(display, window, gc, + wp->shape.hexagon, 6, Convex, CoordModePrevious); + else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, + wp->shape.hexagon, 6, Convex, CoordModePrevious); + XSetForeground(display, gc, colour); + if (wp->xs <= 6 || wp->ys <= 2) + XFillRectangle(display, window, gc, + wp->shape.hexagon[0].x - 3 * wp->xs / 4, + wp->shape.hexagon[0].y + wp->ys / 4, wp->xs, wp->ys); + else + XFillArc(display, window, gc, + wp->xb + wp->xs * ccol - 3 * wp->xs / 4, + wp->yb + wp->ys * crow + wp->ys / 4, + 2 * wp->xs - 6, 2 * wp->ys - 2, + 0, 23040); + } + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + if (wp->pixelmode) { + if (bitmap >= KINDBITMAPS || (wp->xs <= 2 || wp->ys <= 2) || !alive) + XFillRectangle(display, window, gc, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, + wp->xs - (wp->xs > 3), wp->ys - (wp->ys > 3)); + else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, + wp->xs, wp->ys); + XSetForeground(display, gc, colour); + XFillArc(display, window, gc, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, + wp->xs - 1, wp->ys - 1, + 0, 23040); + } + } else + (void) XPutImage(display, window, gc, + &logo[bitmap], 0, 0, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, + icon_width, icon_height); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + wp->shape.triangle[orient][0].x = wp->xb + col * wp->xs; + wp->shape.triangle[orient][0].y = wp->yb + row * wp->ys; + if (wp->xs <= 3 || wp->ys <= 3) + XFillRectangle(display, window, gc, + ((orient) ? -1 : 1) + wp->shape.triangle[orient][0].x, + wp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + wp->shape.triangle[orient][0].x += (wp->xs / 2 - 1); + else + wp->shape.triangle[orient][0].x -= (wp->xs / 2 - 1); + if (bitmap >= KINDBITMAPS || !alive) + XFillPolygon(display, window, gc, + wp->shape.triangle[orient], 3, Convex, CoordModePrevious); + else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillPolygon(display, window, gc, + wp->shape.triangle[orient], 3, Convex, CoordModePrevious); + XSetForeground(display, gc, colour); + XFillArc(display, window, gc, + wp->xb + wp->xs * col - 4 * wp->xs / 5 + + ((orient) ? wp->xs / 3 : 3 * wp->xs / 5), + wp->yb + wp->ys * row - wp->ys / 2 + 1, wp->ys - 3, wp->ys - 3, + 0, 23040); + } + } + } +} + +static void +init_kindlist(watorstruct * wp, int kind) +{ + /* Waste some space at the beginning and end of list + so we do not have to complicated checks against falling off the ends. */ + wp->lastkind[kind] = (CellList *) malloc(sizeof (CellList)); + wp->firstkind[kind] = (CellList *) malloc(sizeof (CellList)); + wp->firstkind[kind]->previous = wp->lastkind[kind]->next = NULL; + wp->firstkind[kind]->next = wp->lastkind[kind]->previous = NULL; + wp->firstkind[kind]->next = wp->lastkind[kind]; + wp->lastkind[kind]->previous = wp->firstkind[kind]; +} + +static void +addto_kindlist(watorstruct * wp, int kind, cellstruct info) +{ + wp->currkind = (CellList *) malloc(sizeof (CellList)); + wp->lastkind[kind]->previous->next = wp->currkind; + wp->currkind->previous = wp->lastkind[kind]->previous; + wp->currkind->next = wp->lastkind[kind]; + wp->lastkind[kind]->previous = wp->currkind; + wp->currkind->info = info; +} + +static void +removefrom_kindlist(watorstruct * wp, CellList * ptr) +{ + ptr->previous->next = ptr->next; + ptr->next->previous = ptr->previous; + wp->arr[ptr->info.col + ptr->info.row * wp->ncols] = 0; + (void) free((void *) ptr); +} + +static void +dupin_kindlist(watorstruct * wp) +{ + CellList *temp; + + temp = (CellList *) malloc(sizeof (CellList)); + temp->previous = wp->babykind; + temp->next = wp->babykind->next; + wp->babykind->next = temp; + temp->next->previous = temp; + temp->info = wp->babykind->info; + wp->babykind = temp; +} + +/*- + * new fish at end of list, this rotates who goes first, young fish go last + * this most likely will not change the feel to any real degree + */ +static void +cutfrom_kindlist(watorstruct * wp) +{ + wp->babykind = wp->currkind; + wp->currkind = wp->currkind->previous; + wp->currkind->next = wp->babykind->next; + wp->babykind->next->previous = wp->currkind; + wp->babykind->next = wp->lastkind[KINDS]; + wp->babykind->previous = wp->lastkind[KINDS]->previous; + wp->babykind->previous->next = wp->babykind; + wp->babykind->next->previous = wp->babykind; +} + +static void +reattach_kindlist(watorstruct * wp, int kind) +{ + wp->currkind = wp->lastkind[kind]->previous; + wp->currkind->next = wp->firstkind[KINDS]->next; + wp->currkind->next->previous = wp->currkind; + wp->lastkind[kind]->previous = wp->lastkind[KINDS]->previous; + wp->lastkind[KINDS]->previous->next = wp->lastkind[kind]; + wp->lastkind[KINDS]->previous = wp->firstkind[KINDS]; + wp->firstkind[KINDS]->next = wp->lastkind[KINDS]; +} + +static void +flush_kindlist(watorstruct * wp, int kind) +{ + while (wp->lastkind[kind]->previous != wp->firstkind[kind]) { + wp->currkind = wp->lastkind[kind]->previous; + wp->currkind->previous->next = wp->lastkind[kind]; + wp->lastkind[kind]->previous = wp->currkind->previous; + /* wp->arr[wp->currkind->info.col + wp->currkind->info.row * wp->ncols] = 0; */ + (void) free((void *) wp->currkind); + } +} + +static int +neighbor_position(watorstruct * wp, int col, int row, int dir) +{ + if (wp->neighbors == 6) { + switch (dir) { + case 0: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + break; + case 60: + if (!(row & 1)) + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 120: + if (row & 1) + col = (!col) ? wp->ncols - 1 : col - 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? wp->ncols - 1 : col - 1; + break; + case 240: + if (row & 1) + col = (!col) ? wp->ncols - 1 : col - 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 300: + if (!(row & 1)) + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + switch (dir) { + case 0: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + break; + case 45: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 90: + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 135: + col = (!col) ? wp->ncols - 1 : col - 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? wp->ncols - 1 : col - 1; + break; + case 225: + col = (!col) ? wp->ncols - 1 : col - 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 270: + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 315: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = (!col) ? wp->ncols - 1 : col - 1; + break; + case 30: + case 40: + col = (!col) ? wp->ncols - 1 : col - 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 60: + col = (!col) ? wp->ncols - 1 : col - 1; + if (row + 1 == wp->nrows) + row = 1; + else if (row + 2 == wp->nrows) + row = 0; + else + row = row + 2; + break; + case 80: + case 90: + if (row + 1 == wp->nrows) + row = 1; + else if (row + 2 == wp->nrows) + row = 0; + else + row = row + 2; + break; + case 120: + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 150: + case 160: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 180: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + break; + case 200: + case 210: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 240: + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 270: + case 280: + if (!row) + row = wp->nrows - 2; + else if (!(row - 1)) + row = wp->nrows - 1; + else + row = row - 2; + + break; + case 300: + col = (!col) ? wp->ncols - 1 : col - 1; + if (!row) + row = wp->nrows - 2; + else if (!(row - 1)) + row = wp->nrows - 1; + else + row = row - 2; + break; + case 320: + case 330: + col = (!col) ? wp->ncols - 1 : col - 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + break; + case 30: + case 40: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 60: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + if (!row) + row = wp->nrows - 2; + else if (row == 1) + row = wp->nrows - 1; + else + row = row - 2; + break; + case 80: + case 90: + if (!row) + row = wp->nrows - 2; + else if (row == 1) + row = wp->nrows - 1; + else + row = row - 2; + break; + case 120: + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 150: + case 160: + col = (!col) ? wp->ncols - 1 : col - 1; + row = (!row) ? wp->nrows - 1 : row - 1; + break; + case 180: + col = (!col) ? wp->ncols - 1 : col - 1; + break; + case 200: + case 210: + col = (!col) ? wp->ncols - 1 : col - 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 240: + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + case 270: + case 280: + if (row + 1 == wp->nrows) + row = 1; + else if (row + 2 == wp->nrows) + row = 0; + else + row = row + 2; + break; + case 300: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + if (row + 1 == wp->nrows) + row = 1; + else if (row + 2 == wp->nrows) + row = 0; + else + row = row + 2; + break; + case 320: + case 330: + col = (col + 1 == wp->ncols) ? 0 : col + 1; + row = (row + 1 == wp->nrows) ? 0 : row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + return row * wp->ncols + col; +} + +void +init_wator(ModeInfo * mi) +{ + int size = MI_SIZE(mi); + watorstruct *wp; + int i, col, row, colrow, kind; + cellstruct info; + + if (wators == NULL) { + if ((wators = (watorstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (watorstruct))) == NULL) + return; + } + wp = &wators[MI_SCREEN(mi)]; + + wp->generation = 0; + if (!wp->firstkind[0]) { /* Genesis */ + icon_width = fish0_width; + icon_height = fish0_height; + /* Set up what will be a 'triply' linked list. + doubly linked list, doubly linked to an array */ + for (kind = FISH; kind <= KINDS; kind++) + init_kindlist(wp, kind); + for (i = 0; i < BITMAPS; i++) { + logo[i].width = icon_width; + logo[i].height = icon_height; + logo[i].bytes_per_line = (icon_width + 7) / 8; + } + } else /* Exterminate all */ + for (i = FISH; i <= KINDS; i++) + flush_kindlist(wp, i); + + wp->width = MI_WIDTH(mi); + wp->height = MI_HEIGHT(mi); + if (wp->width < 2) + wp->width = 2; + if (wp->height < 2) + wp->height = 2; + + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + wp->neighbors = neighbors; + break; + } + if (i == NEIGHBORKINDS - 1) { +#if 0 + wp->neighbors = plots[NRAND(NEIGHBORKINDS)]; + wp->neighbors = (LRAND() & 1) ? 4 : 8; +#else + wp->neighbors = 4; +#endif + break; + } + } + + if (wp->neighbors == 6) { + int nccols, ncrows, sides; + + if (wp->width < 2) + wp->width = 2; + if (wp->height < 4) + wp->height = 4; + if (size < -MINSIZE) + wp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + wp->ys = MAX(MINSIZE, MIN(wp->width, wp->height) / MINGRIDSIZE); + else + wp->ys = MINSIZE; + } else + wp->ys = MIN(size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)); + wp->xs = wp->ys; + wp->pixelmode = True; + nccols = MAX(wp->width / wp->xs - 2, 2); + ncrows = MAX(wp->height / wp->ys - 1, 2); + wp->ncols = nccols / 2; + wp->nrows = 2 * (ncrows / 4); + wp->xb = (wp->width - wp->xs * nccols) / 2 + wp->xs / 2; + wp->yb = (wp->height - wp->ys * (ncrows / 2) * 2) / 2 + wp->ys; + for (sides = 0; sides < 6; sides++) { + wp->shape.hexagon[sides].x = (wp->xs - 1) * hexagonUnit[sides].x; + wp->shape.hexagon[sides].y = + ((wp->ys - 1) * hexagonUnit[sides].y / 2) * 4 / 3; + } + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + if (wp->width < 2) + wp->width = 2; + if (wp->height < 2) + wp->height = 2; + if (size == 0 || + MINGRIDSIZE * size > wp->width || MINGRIDSIZE * size > wp->height) { + if (wp->width > MINGRIDSIZE * icon_width && + wp->height > MINGRIDSIZE * icon_height) { + wp->pixelmode = False; + wp->xs = icon_width; + wp->ys = icon_height; + } else { + wp->pixelmode = True; + wp->xs = wp->ys = MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE); + } + } else { + wp->pixelmode = True; + if (size < -MINSIZE) + wp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + wp->ys = MINSIZE; + else + wp->ys = MIN(size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)); + wp->xs = wp->ys; + } + wp->ncols = MAX(wp->width / wp->xs, 2); + wp->nrows = MAX(wp->height / wp->ys, 2); + wp->xb = (wp->width - wp->xs * wp->ncols) / 2; + wp->yb = (wp->height - wp->ys * wp->nrows) / 2; + } else { /* TRI */ + int orient, sides; + + if (wp->width < 2) + wp->width = 2; + if (wp->height < 2) + wp->height = 2; + if (size < -MINSIZE) + wp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + wp->ys = MAX(MINSIZE, MIN(wp->width, wp->height) / MINGRIDSIZE); + else + wp->ys = MINSIZE; + } else + wp->ys = MIN(size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)); + wp->xs = (int) (1.52 * wp->ys); + wp->pixelmode = True; + wp->ncols = (MAX(wp->width / wp->xs - 1, 2) / 2) * 2; + wp->nrows = (MAX(wp->height / wp->ys - 1, 2) / 2) * 2; + wp->xb = (wp->width - wp->xs * wp->ncols) / 2 + wp->xs / 2; + wp->yb = (wp->height - wp->ys * wp->nrows) / 2 + wp->ys / 2; + for (orient = 0; orient < 2; orient++) { + for (sides = 0; sides < 3; sides++) { + wp->shape.triangle[orient][sides].x = + (wp->xs - 2) * triangleUnit[orient][sides].x; + wp->shape.triangle[orient][sides].y = + (wp->ys - 2) * triangleUnit[orient][sides].y; + } + } + } + + wp->positions = wp->ncols * wp->nrows; + + if (wp->arr != NULL) + (void) free((void *) wp->arr); + wp->arr = (CellList **) calloc(wp->positions, sizeof (CellList *)); + + /* Play G-d with these numbers */ + wp->nkind[FISH] = wp->positions / 3; + wp->nkind[SHARK] = wp->nkind[FISH] / 10; + wp->kind = FISH; + if (!wp->nkind[SHARK]) + wp->nkind[SHARK] = 1; + wp->breed[FISH] = MI_COUNT(mi); + wp->breed[SHARK] = 10; + if (wp->breed[FISH] < 1) + wp->breed[FISH] = 1; + else if (wp->breed[FISH] > wp->breed[SHARK]) + wp->breed[FISH] = 4; + wp->sstarve = 3; + + MI_CLEARWINDOW(mi); + wp->painted = False; + + for (kind = FISH; kind <= SHARK; kind++) { + i = 0; + while (i < wp->nkind[kind]) { + col = NRAND(wp->ncols); + row = NRAND(wp->nrows); + colrow = col + row * wp->ncols; + if (!wp->arr[colrow]) { + i++; + info.kind = kind; + info.age = NRAND(wp->breed[kind]); + info.food = NRAND(wp->sstarve); + info.direction = NRAND(KINDBITMAPS) + kind * KINDBITMAPS; + if (MI_NPIXELS(mi) > 2) + info.color = NRAND(MI_NPIXELS(mi)); + else + info.color = 0; + info.col = col; + info.row = row; + addto_kindlist(wp, kind, info); + wp->arr[colrow] = wp->currkind; + drawcell(mi, col, row, + wp->currkind->info.color, wp->currkind->info.direction, True); + } + } + } +} + +void +draw_wator(ModeInfo * mi) +{ + watorstruct *wp = &wators[MI_SCREEN(mi)]; + int col, row; + int colrow, cr, position; + int i, numok; + + struct { + int pos, dir; + } acell[12]; + + + MI_IS_DRAWN(mi) = True; + + wp->painted = True; + /* Alternate updates, fish and sharks live out of phase with each other */ + wp->kind = (wp->kind + 1) % KINDS; + { + wp->currkind = wp->firstkind[wp->kind]->next; + + while (wp->currkind != wp->lastkind[wp->kind]) { + col = wp->currkind->info.col; + row = wp->currkind->info.row; + colrow = col + row * wp->ncols; + numok = 0; + if (wp->kind == SHARK) { /* Scan for fish */ + for (i = 0; i < wp->neighbors; i++) { + position = neighbor_position(wp, col, row, i * 360 / wp->neighbors); + if (wp->arr[position] && wp->arr[position]->info.kind == FISH) { + acell[numok].pos = position; + acell[numok++].dir = i; + } + } + if (numok) { /* No thanks, I'm a vegetarian */ + i = NRAND(numok); + wp->nkind[FISH]--; + cr = acell[i].pos; + removefrom_kindlist(wp, wp->arr[cr]); + wp->arr[cr] = wp->currkind; + if (wp->neighbors == 4) { + wp->currkind->info.direction = (5 - acell[i].dir) % ORIENTS + + ((NRAND(REFLECTS)) ? 0 : ORIENTS) + wp->kind * KINDBITMAPS; + } else if (wp->neighbors == 8) { + wp->currkind->info.direction = (char) (5 - (acell[i].dir / 2 + + ((acell[i].dir % 2) ? LRAND() & 1 : 0))) % ORIENTS + + ((NRAND(REFLECTS)) ? 0 : ORIENTS) + wp->kind * KINDBITMAPS; + } else + wp->currkind->info.direction = wp->kind * KINDBITMAPS; + wp->currkind->info.col = acell[i].pos % wp->ncols; + wp->currkind->info.row = acell[i].pos / wp->ncols; + wp->currkind->info.food = wp->sstarve; + drawcell(mi, wp->currkind->info.col, wp->currkind->info.row, + wp->currkind->info.color, wp->currkind->info.direction, True); + if (++(wp->currkind->info.age) >= wp->breed[wp->kind]) { /* breed */ + cutfrom_kindlist(wp); /* This rotates out who goes first */ + wp->babykind->info.age = 0; + dupin_kindlist(wp); + wp->arr[colrow] = wp->babykind; + wp->babykind->info.col = col; + wp->babykind->info.row = row; + wp->babykind->info.age = -1; /* Make one a little younger */ +#if 0 + if (MI_NPIXELS(mi) > 2 && (LRAND() & 1)) + /* A color mutation */ + if (++(wp->babykind->info.color) >= MI_NPIXELS(mi)) + wp->babykind->info.color = 0; +#endif + wp->nkind[wp->kind]++; + } else { + wp->arr[colrow] = 0; + drawcell(mi, col, row, 0, 0, False); + } + } else { + if (wp->currkind->info.food-- < 0) { /* Time to die, Jaws */ + /* back up one or else in void */ + wp->currkind = wp->currkind->previous; + removefrom_kindlist(wp, wp->arr[colrow]); + wp->arr[colrow] = 0; + drawcell(mi, col, row, 0, 0, False); + wp->nkind[wp->kind]--; + numok = -1; /* Want to escape from next if */ + } + } + } + if (!numok) { /* Fish or shark search for a place to go */ + for (i = 0; i < wp->neighbors; i++) { + position = neighbor_position(wp, col, row, i * 360 / wp->neighbors); + if (!wp->arr[position]) { /* Found an empty spot */ + acell[numok].pos = position; + acell[numok++].dir = i; + } + } + if (numok) { /* Found a place to go */ + i = NRAND(numok); + wp->arr[acell[i].pos] = wp->currkind; + if (wp->neighbors == 4) { + wp->currkind->info.direction = (5 - acell[i].dir) % ORIENTS + + ((NRAND(REFLECTS)) ? 0 : ORIENTS) + wp->kind * KINDBITMAPS; + } else if (wp->neighbors == 8) { + wp->currkind->info.direction = (char) (5 - (acell[i].dir / 2 + + ((acell[i].dir % 2) ? LRAND() & 1 : 0))) % ORIENTS + + ((NRAND(REFLECTS)) ? 0 : ORIENTS) + wp->kind * KINDBITMAPS; + } else + wp->currkind->info.direction = wp->kind * KINDBITMAPS; + wp->currkind->info.col = acell[i].pos % wp->ncols; + wp->currkind->info.row = acell[i].pos / wp->ncols; + drawcell(mi, + wp->currkind->info.col, wp->currkind->info.row, + wp->currkind->info.color, wp->currkind->info.direction, True); + if (++(wp->currkind->info.age) >= wp->breed[wp->kind]) { /* breed */ + cutfrom_kindlist(wp); /* This rotates out who goes first */ + wp->babykind->info.age = 0; + dupin_kindlist(wp); + wp->arr[colrow] = wp->babykind; + wp->babykind->info.col = col; + wp->babykind->info.row = row; + wp->babykind->info.age = -1; /* Make one a little younger */ + wp->nkind[wp->kind]++; + } else { + wp->arr[colrow] = 0; + drawcell(mi, col, row, 0, 0, False); + } + } else { + /* I'll just sit here and wave my tail so you know I am alive */ + wp->currkind->info.direction = + (wp->currkind->info.direction + ORIENTS) % KINDBITMAPS + + wp->kind * KINDBITMAPS; + drawcell(mi, col, row, wp->currkind->info.color, + wp->currkind->info.direction, True); + } + } + wp->currkind = wp->currkind->next; + } + reattach_kindlist(wp, wp->kind); + } + + if ((wp->nkind[FISH] >= wp->positions) || + (!wp->nkind[FISH] && !wp->nkind[SHARK]) || + wp->generation >= MI_CYCLES(mi)) { + init_wator(mi); + } + if (wp->kind == SHARK) + wp->generation++; +} + +void +release_wator(ModeInfo * mi) +{ + if (wators != NULL) { + int screen, kind; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + watorstruct *wp = &wators[screen]; + + for (kind = 0; kind <= KINDS; kind++) { + if (wp->firstkind[0]) + flush_kindlist(wp, kind); + if (wp->lastkind[kind]) + (void) free((void *) wp->lastkind[kind]); + if (wp->firstkind[kind]) + (void) free((void *) wp->firstkind[kind]); + } + if (wp->arr != NULL) + (void) free((void *) wp->arr); + } + (void) free((void *) wators); + wators = NULL; + } +} + +void +refresh_wator(ModeInfo * mi) +{ + watorstruct *wp = &wators[MI_SCREEN(mi)]; + + if (wp->painted) { + MI_CLEARWINDOW(mi); + wp->painted = False; + } +} + +#endif /* MODE_wator */ diff --git a/modes/wire.c b/modes/wire.c new file mode 100644 index 00000000..7852b78f --- /dev/null +++ b/modes/wire.c @@ -0,0 +1,975 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* wire --- logical circuits based on simple state-changes (wireworld) */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)wire.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1996 by David Bagley. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 05-Dec-97: neighbors option added. + * 10-May-97: Compatible with xscreensaver + * 14-Jun-96: Coded from A.K. Dewdney's "Computer Recreations", Scientific + * American Magazine" Jan 1990 pp 146-148. Used ant.c as an + * example. do_gen() based on code by Kevin Dahlhausen + * and Stefan Strack + * . + */ + +/*- + * OR gate is protected by diodes + * XX XX + * Input ->XXX XX XX XXX<- Input + * XX X XX + * X + * X + * | + * V + * Output + * + * ->XXXoOXXX-> Electron moving in a wire + * + * memory element, about to forget 1 and remember 0 + * Remember 0 + * o + * X O XX XX Memory Loop + * X XX X XXXX + * X XX XX X oOX-> 1 Output + * Inputs ->XX X X + * X X XX o + * Inputs ->XXXXXXX XX X XO Memory of 1 + * XX XX + * Remember 1 + */ + +#ifdef STANDALONE +#define PROGCLASS "Wire" +#define HACK_INIT init_wire +#define HACK_DRAW draw_wire +#define wire_opts xlockmore_opts +#define DEFAULTS "*delay: 500000 \n" \ + "*count: 1000 \n" \ + "*cycles: 150 \n" \ + "*size: -8 \n" \ + "*ncolors: 64 \n" \ + "*neighbors: 0 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ +#include "automata.h" + +#ifdef MODE_wire + +/*- + * neighbors of 0 randomizes it between 3, 4, 6, 8, 9, and 12. + */ +extern int neighbors; + +ModeSpecOpt wire_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct wire_description = +{"wire", "init_wire", "draw_wire", "release_wire", + "refresh_wire", "init_wire", NULL, &wire_opts, + 500000, 1000, 150, -8, 64, 1.0, "", + "Shows a random circuit with 2 electrons", 0, NULL}; + +#endif + +#define WIREBITS(n,w,h)\ + wp->pixmaps[wp->init_bits++]=\ + XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1) + +#define COLORS 4 +#define MINWIRES 32 +#define MINGRIDSIZE 24 +#define MINSIZE 3 +#define ANGLES 360 +#define NEIGHBORKINDS 6 + +#define SPACE 0 +#define WIRE 1 /* Normal wire */ +#define HEAD 2 /* electron head */ +#define TAIL 3 /* electron tail */ + +#define REDRAWSTEP 2000 /* How much wire to draw per cycle */ + +/* Singly linked list */ +typedef struct _CellList { + XPoint pt; + struct _CellList *next; +} CellList; + +typedef struct { + int init_bits; + int neighbors; + int generation; + int xs, ys; + int xb, yb; + int nrows, ncols; + int bnrows, bncols; + int mincol, minrow, maxcol, maxrow; + int width, height; + int redrawing, redrawpos; + unsigned char *oldcells, *newcells; + int ncells[COLORS - 1]; + CellList *cellList[COLORS - 1]; + unsigned char colors[COLORS - 1]; + GC stippledGC; + Pixmap pixmaps[COLORS - 1]; + int prob_array[12]; + union { + XPoint hexagon[6]; + XPoint triangle[2][3]; + } shape; +} circuitstruct; + +static char plots[NEIGHBORKINDS] = +{3, 4, 6, 8, 9, 12}; /* Neighborhoods */ + +static circuitstruct *circuits = NULL; + +static void +position_of_neighbor(circuitstruct * wp, int dir, int *pcol, int *prow) +{ + int col = *pcol, row = *prow; + + /* NO WRAPING */ + + if (wp->neighbors == 6) { + switch (dir) { + case 0: + col = col + 1; + break; + case 60: + if (!(row & 1)) + col = col + 1; + row = row - 1; + break; + case 120: + if (row & 1) + col = col - 1; + row = row - 1; + break; + case 180: + col = col - 1; + break; + case 240: + if (row & 1) + col = col - 1; + row = row + 1; + break; + case 300: + if (!(row & 1)) + col = col + 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + switch (dir) { + case 0: + col = col + 1; + break; + case 45: + col = col + 1; + row = row - 1; + break; + case 90: + row = row - 1; + break; + case 135: + col = col - 1; + row = row - 1; + break; + case 180: + col = col - 1; + break; + case 225: + col = col - 1; + row = row + 1; + break; + case 270: + row = row + 1; + break; + case 315: + col = col + 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* TRI */ + if ((col + row) % 2) { /* right */ + switch (dir) { + case 0: + col = col - 1; + break; + case 30: + case 40: + col = col - 1; + row = row - 1; + break; + case 60: + col = col - 1; + row = row - 2; + break; + case 80: + case 90: + row = row - 2; + break; + case 120: + row = row - 1; + break; + case 150: + case 160: + col = col + 1; + row = row - 1; + break; + case 180: + col = col + 1; + break; + case 200: + case 210: + col = col + 1; + row = row + 1; + break; + case 240: + row = row + 1; + break; + case 270: + case 280: + row = row + 2; + break; + case 300: + col = col - 1; + row = row + 2; + break; + case 320: + case 330: + col = col - 1; + row = row + 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } else { /* left */ + switch (dir) { + case 0: + col = col + 1; + break; + case 30: + case 40: + col = col + 1; + row = row + 1; + break; + case 60: + col = col + 1; + row = row + 2; + break; + case 80: + case 90: + row = row + 2; + break; + case 120: + row = row + 1; + break; + case 150: + case 160: + col = col - 1; + row = row + 1; + break; + case 180: + col = col - 1; + break; + case 200: + case 210: + col = col - 1; + row = row - 1; + break; + case 240: + row = row - 1; + break; + case 270: + case 280: + row = row - 2; + break; + case 300: + col = col + 1; + row = row - 2; + break; + case 320: + case 330: + col = col + 1; + row = row - 1; + break; + default: + (void) fprintf(stderr, "wrong direction %d\n", dir); + } + } + } + *pcol = col; + *prow = row; +} + +static Bool +withinBounds(circuitstruct * wp, int col, int row) +{ + return (row >= 2 && row < wp->bnrows - 2 && + col >= 2 && col < wp->bncols - 2 - (wp->neighbors == 6 && !(row % 2))); +} + +static void +fillcell(ModeInfo * mi, GC gc, int col, int row) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + + if (wp->neighbors == 6) { + int ccol = 2 * col + !(row & 1), crow = 2 * row; + + wp->shape.hexagon[0].x = wp->xb + ccol * wp->xs; + wp->shape.hexagon[0].y = wp->yb + crow * wp->ys; + if (wp->xs == 1 && wp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + wp->shape.hexagon[0].x, wp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + wp->shape.hexagon, 6, Convex, CoordModePrevious); + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, + wp->xs - (wp->xs > 3), wp->ys - (wp->ys > 3)); + } else { /* TRI */ + int orient = (col + row) % 2; /* O left 1 right */ + + wp->shape.triangle[orient][0].x = wp->xb + col * wp->xs; + wp->shape.triangle[orient][0].y = wp->yb + row * wp->ys; + if (wp->xs <= 3 || wp->ys <= 3) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ((orient) ? -1 : 1) + wp->shape.triangle[orient][0].x, + wp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + wp->shape.triangle[orient][0].x += (wp->xs / 2 - 1); + else + wp->shape.triangle[orient][0].x -= (wp->xs / 2 - 1); + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + wp->shape.triangle[orient], 3, Convex, CoordModePrevious); + } + } +} + +static void +drawcell(ModeInfo * mi, int col, int row, unsigned char state) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + GC gc; + + if (MI_NPIXELS(mi) > 2) { + gc = MI_GC(mi); + XSetForeground(MI_DISPLAY(mi), gc, MI_PIXEL(mi, wp->colors[state])); + } else { + XGCValues gcv; + + gcv.stipple = wp->pixmaps[state]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), wp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = wp->stippledGC; + } + fillcell(mi, gc, col, row); +} + +#if 0 +static void +drawcell_notused(ModeInfo * mi, int col, int row, unsigned char state) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + XGCValues gcv; + GC gc; + + if (MI_NPIXELS(mi) > 2) { + gc = MI_GC(mi); + XSetForeground(MI_DISPLAY(mi), gc, MI_PIXEL(mi, wp->colors[state])); + } else { + gcv.stipple = wp->pixmaps[state]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), wp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = wp->stippledGC; + } + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), + wp->xb + wp->xs * col, wp->yb + wp->ys * row, + wp->xs - (wp->xs > 3), wp->ys - (wp->ys > 3)); +} +#endif + +static void +addtolist(ModeInfo * mi, int col, int row, unsigned char state) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + CellList *current = wp->cellList[state]; + + wp->cellList[state] = NULL; + if ((wp->cellList[state] = (CellList *) malloc(sizeof (CellList))) == NULL) { + wp->cellList[state] = current; + return; + } + wp->cellList[state]->pt.x = col; + wp->cellList[state]->pt.y = row; + wp->cellList[state]->next = current; + wp->ncells[state]++; +} + +#ifdef DEBUG +static void +print_state(ModeInfo * mi, int state) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + CellList *locallist = wp->cellList[state]; + int i = 0; + + (void) printf("state %d\n", state); + while (locallist) { + (void) printf("%d x %d, y %d\n", i, + locallist->pt.x, locallist->pt.y); + locallist = locallist->next; + i++; + } +} + +#endif + +static void +free_state(circuitstruct * wp, int state) +{ + CellList *current; + + while (wp->cellList[state]) { + current = wp->cellList[state]; + wp->cellList[state] = wp->cellList[state]->next; + (void) free((void *) current); + } + wp->ncells[state] = 0; +} + +static void +draw_state(ModeInfo * mi, int state) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + GC gc; + XGCValues gcv; + CellList *current = wp->cellList[state]; + + if (MI_NPIXELS(mi) > 2) { + gc = MI_GC(mi); + XSetForeground(MI_DISPLAY(mi), gc, MI_PIXEL(mi, wp->colors[state])); + } else { + gcv.stipple = wp->pixmaps[state]; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + XChangeGC(MI_DISPLAY(mi), wp->stippledGC, + GCStipple | GCForeground | GCBackground, &gcv); + gc = wp->stippledGC; + } + + if (wp->neighbors == 6) { /* Draw right away, slow */ + while (current) { + int col, row, ccol, crow; + + col = current->pt.x; + row = current->pt.y; + ccol = 2 * col + !(row & 1), crow = 2 * row; + wp->shape.hexagon[0].x = wp->xb + ccol * wp->xs; + wp->shape.hexagon[0].y = wp->yb + crow * wp->ys; + if (wp->xs == 1 && wp->ys == 1) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), + gc, wp->shape.hexagon[0].x, wp->shape.hexagon[0].y, 1, 1); + else + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + wp->shape.hexagon, 6, Convex, CoordModePrevious); + current = current->next; + } + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + XRectangle *rects = NULL; + /* Take advantage of XFillRectangles */ + int nrects = 0; + + /* Create Rectangle list from part of the cellList */ + if ((rects = (XRectangle *) malloc(wp->ncells[state] * sizeof (XRectangle))) == NULL) { + return; + } + + while (current) { + rects[nrects].x = wp->xb + current->pt.x * wp->xs; + rects[nrects].y = wp->yb + current->pt.y * wp->ys; + rects[nrects].width = wp->xs - (wp->xs > 3); + rects[nrects].height = wp->ys - (wp->ys > 3); + current = current->next; + nrects++; + } + /* Finally get to draw */ + XFillRectangles(MI_DISPLAY(mi), MI_WINDOW(mi), gc, rects, nrects); + /* Free up rects list and the appropriate part of the cellList */ + (void) free((void *) rects); + } else { /* TRI */ + while (current) { + int col, row, orient; + + col = current->pt.x; + row = current->pt.y; + orient = (col + row) % 2; /* O left 1 right */ + wp->shape.triangle[orient][0].x = wp->xb + col * wp->xs; + wp->shape.triangle[orient][0].y = wp->yb + row * wp->ys; + if (wp->xs <= 3 || wp->ys <= 3) + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + ((orient) ? -1 : 1) + wp->shape.triangle[orient][0].x, + wp->shape.triangle[orient][0].y, 1, 1); + else { + if (orient) + wp->shape.triangle[orient][0].x += (wp->xs / 2 - 1); + else + wp->shape.triangle[orient][0].x -= (wp->xs / 2 - 1); + XFillPolygon(MI_DISPLAY(mi), MI_WINDOW(mi), gc, + wp->shape.triangle[orient], 3, Convex, CoordModePrevious); + } + current = current->next; + } + } + free_state(wp, state); + XFlush(MI_DISPLAY(mi)); +} + +#if 0 +static void +RandomSoup(circuitstruct * wp) +{ + int i, j; + + for (j = 2; j < wp->bnrows - 2; j++) + for (i = 2; i < wp->bncols - 2; i++) { + *(wp->newcells + i + j * wp->bncols) = + (NRAND(100) > wp->n) ? SPACE : (NRAND(4)) ? WIRE : (NRAND(2)) ? + HEAD : TAIL; + } +} + +#endif + +static void +create_path(circuitstruct * wp, int n) +{ + int col, row; + int count = 0; + int dir, prob; + int nextcol = 0, nextrow = 0, i; + +#ifdef RANDOMSTART + /* Path usually "mushed" in a corner */ + col = NRAND(wp->ncols) + 1; + row = NRAND(wp->nrows) + 1; +#else + /* Start from center */ + col = wp->ncols / 2; + row = wp->nrows / 2; +#endif + wp->mincol = col - 1, wp->minrow = row - 2; + wp->maxcol = col + 1, wp->maxrow = row + 2; + dir = NRAND(wp->neighbors) * ANGLES / wp->neighbors; + *(wp->newcells + col + row * wp->bncols) = HEAD; + while (++count < n) { + prob = NRAND(wp->prob_array[wp->neighbors - 1]); + i = 0; + while (prob > wp->prob_array[i]) + i++; + dir = ((dir * wp->neighbors / ANGLES + i) % + wp->neighbors) * ANGLES / wp->neighbors; + nextcol = col; + nextrow = row; + position_of_neighbor(wp, dir, &nextcol, &nextrow); + if (withinBounds(wp, nextcol, nextrow)) { + col = nextcol; + row = nextrow; + if (col == wp->mincol && col > 2) + wp->mincol--; + if (row == wp->minrow && row > 2) + wp->minrow--; + else if (row == wp->minrow - 1 && row > 3) + wp->minrow -= 2; + if (col == wp->maxcol && col < wp->bncols - 3) + wp->maxcol++; + if (row == wp->maxrow && row < wp->bnrows - 3) + wp->maxrow++; + else if (row == wp->maxrow + 1 && row < wp->bnrows - 4) + wp->maxrow += 2; + + if (!*(wp->newcells + col + row * wp->bncols)) + *(wp->newcells + col + row * wp->bncols) = WIRE; + } else { + if (wp->neighbors == 3) + break; /* There is no reverse step */ + dir = ((dir * wp->neighbors / ANGLES + wp->neighbors / 2) % + wp->neighbors) * ANGLES / wp->neighbors; + } + } + *(wp->newcells + col + row * wp->bncols) = HEAD; +} + +static void +do_gen(circuitstruct * wp) +{ + int i, j, k; + unsigned char *z; + int count; + +#define LOC(X, Y) (*(wp->oldcells + (X) + ((Y) * wp->bncols))) +#define ADD(X, Y) if (LOC((X), (Y)) == HEAD) count++ + + for (j = wp->minrow; j <= wp->maxrow; j++) { + for (i = wp->mincol; i <= wp->maxcol; i++) { + z = wp->newcells + i + j * wp->bncols; + switch (LOC(i, j)) { + case SPACE: + *z = SPACE; + break; + case TAIL: + *z = WIRE; + break; + case HEAD: + *z = TAIL; + break; + case WIRE: + count = 0; + for (k = 0; k < wp->neighbors; k++) { + int newi = i, newj = j; + + position_of_neighbor(wp, k * ANGLES / wp->neighbors, &newi, &newj); + ADD(newi, newj); + } + if (count == 1 || count == 2) + *z = HEAD; + else + *z = WIRE; + break; + default: + { + (void) fprintf(stderr, + "bad internal character %d at %d,%d\n", + (int) LOC(i, j), i, j); + } + } + } + } +} + +static void +free_list(circuitstruct * wp) +{ + int state; + + for (state = 0; state < COLORS - 1; state++) + free_state(wp, state); +} + +void +release_wire(ModeInfo * mi) +{ + if (circuits != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + circuitstruct *wp = &circuits[screen]; + int shade; + + for (shade = 0; shade < wp->init_bits; shade++) + if (wp->pixmaps[shade] != None) + XFreePixmap(MI_DISPLAY(mi), wp->pixmaps[shade]); + if (wp->stippledGC != None) + XFreeGC(MI_DISPLAY(mi), wp->stippledGC); + if (wp->oldcells != NULL) + (void) free((void *) wp->oldcells); + if (wp->newcells != NULL) + (void) free((void *) wp->newcells); + free_list(wp); + } + (void) free((void *) circuits); + circuits = NULL; + } +} + +void +init_wire(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + int i, size = MI_SIZE(mi), n; + circuitstruct *wp; + XGCValues gcv; + + if (circuits == NULL) { + if ((circuits = (circuitstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (circuitstruct))) == NULL) + return; + } + wp = &circuits[MI_SCREEN(mi)]; + + wp->redrawing = 0; + + if ((MI_NPIXELS(mi) <= 2) && (wp->init_bits == 0)) { + if (wp->stippledGC == None) { + gcv.fill_style = FillOpaqueStippled; + wp->stippledGC = XCreateGC(display, window, GCFillStyle, &gcv); + if (wp->stippledGC == None) { + release_wire(mi); + return; + } + } + WIREBITS(stipples[NUMSTIPPLES - 1], STIPPLESIZE, STIPPLESIZE); + WIREBITS(stipples[NUMSTIPPLES - 3], STIPPLESIZE, STIPPLESIZE); + WIREBITS(stipples[2], STIPPLESIZE, STIPPLESIZE); + if (wp->pixmaps[2] == None) { + release_wire(mi); + return; + } + } + if (MI_NPIXELS(mi) > 2) { + wp->colors[0] = (NRAND(MI_NPIXELS(mi))); + wp->colors[1] = (wp->colors[0] + MI_NPIXELS(mi) / 6 + + NRAND(MI_NPIXELS(mi) / 4 + 1)) % MI_NPIXELS(mi); + wp->colors[2] = (wp->colors[1] + MI_NPIXELS(mi) / 6 + + NRAND(MI_NPIXELS(mi) / 4 + 1)) % MI_NPIXELS(mi); + } + free_list(wp); + wp->generation = 0; + wp->width = MI_WIDTH(mi); + wp->height = MI_HEIGHT(mi); + + for (i = 0; i < NEIGHBORKINDS; i++) { + if (neighbors == plots[i]) { + wp->neighbors = plots[i]; + break; + } + if (i == NEIGHBORKINDS - 1) { + i = NRAND(NEIGHBORKINDS - 3) + 1; /* Skip triangular ones */ + wp->neighbors = plots[i]; + break; + } + } + + wp->prob_array[wp->neighbors - 1] = 100; + if (wp->neighbors == 3) { + wp->prob_array[1] = 67; + wp->prob_array[0] = 33; + } else { + int incr = 24 / wp->neighbors; + + for (i = wp->neighbors - 2; i >= 0; i--) { + wp->prob_array[i] = wp->prob_array[i + 1] - incr - + incr * ((i + 1) != wp->neighbors / 2); + } + } + + if (wp->neighbors == 6) { + int nccols, ncrows; + + if (wp->width < 4) + wp->width = 4; + if (wp->height < 4) + wp->height = 4; + if (size < -MINSIZE) + wp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + wp->ys = MAX(MINSIZE, MIN(wp->width, wp->height) / MINGRIDSIZE); + else + wp->ys = MINSIZE; + } else + wp->ys = MIN(size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)); + wp->xs = wp->ys; + nccols = MAX(wp->width / wp->xs - 2, 2); + ncrows = MAX(wp->height / wp->ys - 1, 2); + wp->ncols = nccols / 2; + wp->nrows = ncrows / 2; + wp->nrows -= !(wp->nrows & 1); /* Must be odd */ + wp->xb = (wp->width - wp->xs * nccols) / 2 + wp->xs; + wp->yb = (wp->height - wp->ys * ncrows) / 2 + wp->ys; + for (i = 0; i < 6; i++) { + wp->shape.hexagon[i].x = (wp->xs - 1) * hexagonUnit[i].x; + wp->shape.hexagon[i].y = ((wp->ys - 1) * hexagonUnit[i].y / 2) * 4 / 3; + } + } else if (wp->neighbors == 4 || wp->neighbors == 8) { + if (size < -MINSIZE) + wp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + wp->ys = MAX(MINSIZE, MIN(wp->width, wp->height) / MINGRIDSIZE); + else + wp->ys = MINSIZE; + } else + wp->ys = MIN(size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)); + wp->xs = wp->ys; + wp->ncols = MAX(wp->width / wp->xs, 2); + wp->nrows = MAX(wp->height / wp->ys, 2); + wp->xb = (wp->width - wp->xs * wp->ncols) / 2; + wp->yb = (wp->height - wp->ys * wp->nrows) / 2; + } else { /* TRI */ + int orient; + + if (wp->width < 4) + wp->width = 4; + if (wp->height < 2) + wp->height = 2; + if (size < -MINSIZE) + wp->ys = NRAND(MIN(-size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)) - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) { + if (!size) + wp->ys = MAX(MINSIZE, MIN(wp->width, wp->height) / MINGRIDSIZE); + else + wp->ys = MINSIZE; + } else + wp->ys = MIN(size, MAX(MINSIZE, MIN(wp->width, wp->height) / + MINGRIDSIZE)); + wp->xs = (int) (1.52 * wp->ys); + wp->ncols = (MAX(wp->width / wp->xs - 1, 4) / 2) * 2; + wp->nrows = (MAX(wp->height / wp->ys - 1, 2) / 2) * 2 - 1; + wp->xb = (wp->width - wp->xs * wp->ncols) / 2 + wp->xs / 2; + wp->yb = (wp->height - wp->ys * wp->nrows) / 2 + wp->ys; + for (orient = 0; orient < 2; orient++) { + for (i = 0; i < 3; i++) { + wp->shape.triangle[orient][i].x = + (wp->xs - 2) * triangleUnit[orient][i].x; + wp->shape.triangle[orient][i].y = + (wp->ys - 2) * triangleUnit[orient][i].y; + } + } + } + + /* + * I am being a bit naughty here wasting a little bit of memory + * but it will give me a real headache to figure out the logic + * and to refigure the mappings to save a few bytes + * ncols should only need a border of 2 and nrows should only need + * a border of 4 when in the neighbors = 9 or 12 + */ + wp->bncols = wp->ncols + 4; + wp->bnrows = wp->nrows + 4; + + MI_CLEARWINDOW(mi); + + if (wp->oldcells != NULL) { + (void) free((void *) wp->oldcells); + wp->oldcells = NULL; + } + if ((wp->oldcells = (unsigned char *) calloc(wp->bncols * wp->bnrows, sizeof (unsigned char))) == NULL) { + release_wire(mi); + return; + } + + if (wp->newcells != NULL) { + (void) free((void *) wp->newcells); + wp->newcells = NULL; + } + if ((wp->newcells = (unsigned char *) calloc(wp->bncols * wp->bnrows, sizeof (unsigned char))) == NULL) { + release_wire(mi); + return; + } + + n = MI_COUNT(mi); + i = (1 + (wp->neighbors == 6)) * wp->ncols * wp->nrows / 4; + if (n < -MINWIRES && i > MINWIRES) { + n = NRAND(MIN(-n, i) - MINWIRES + 1) + MINWIRES; + } else if (n < MINWIRES) { + n = MINWIRES; + } else if (n > i) { + n = MAX(MINWIRES, i); + } + create_path(wp, n); +} + +void +draw_wire(ModeInfo * mi) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + int offset, i, j; + unsigned char *z, *znew; + + if (circuits == NULL) { + init_wire(mi); + return; + } + MI_IS_DRAWN(mi) = True; + + /* wires do not grow so min max stuff does not change */ + for (j = wp->minrow; j <= wp->maxrow; j++) { + for (i = wp->mincol; i <= wp->maxcol; i++) { + offset = j * wp->bncols + i; + z = wp->oldcells + offset; + znew = wp->newcells + offset; + if (*z != *znew) { /* Counting on once a space always a space */ + *z = *znew; + addtolist(mi, i - 2, j - 2, *znew - 1); + } + } + } + for (i = 0; i < COLORS - 1; i++) + draw_state(mi, i); + if (++wp->generation > MI_CYCLES(mi)) { + init_wire(mi); + return; + } else + do_gen(wp); + + if (wp->redrawing) { + for (i = 0; i < REDRAWSTEP; i++) { + if ((*(wp->oldcells + wp->redrawpos))) { + drawcell(mi, wp->redrawpos % wp->bncols - 2, + wp->redrawpos / wp->bncols - 2, *(wp->oldcells + wp->redrawpos) - 1); + } + if (++(wp->redrawpos) >= wp->bncols * (wp->bnrows - 2)) { + wp->redrawing = 0; + break; + } + } + } +} + +void +refresh_wire(ModeInfo * mi) +{ + circuitstruct *wp = &circuits[MI_SCREEN(mi)]; + + if (circuits == NULL) { + init_wire(mi); + return; + } + MI_CLEARWINDOW(mi); + wp->redrawing = 1; + wp->redrawpos = 2 * wp->ncols + 2; +} + +#endif /* MODE_wire */ diff --git a/modes/world.c b/modes/world.c new file mode 100644 index 00000000..1e150333 --- /dev/null +++ b/modes/world.c @@ -0,0 +1,286 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* world --- world spinner */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)world.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1993 Matthew Moyle-Croft + * + * 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 + * 04-Oct-95: multiscreen patch, thanks to Grant McDorman . + * 10-Jul-95: Backward spinning jump fixed by Neale Pickett . + * 17-Jul-94: Got batchcount to work. + * 09-Jan-94: Written [ Modified from image.c ] + * 29-Jul-90: image.c written. Copyright (c) 1991 by Patrick J. Naughton. + */ + +#ifdef STANDALONE +#define PROGCLASS "World" +#define HACK_INIT init_world +#define HACK_DRAW draw_world +#define world_opts xlockmore_opts +#define DEFAULTS "*delay: 100000 \n" \ + "*count: -16 \n" \ + "*ncolors: 200 \n" +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_world + +ModeSpecOpt world_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct world_description = +{"world", "init_world", "draw_world", "release_world", + "refresh_world", "init_world", NULL, &world_opts, + 100000, -16, 1, 1, 64, 0.3, "", + "Shows spinning Earths", 0, NULL}; + +#endif + +#include "bitmaps/terra-00.xbm" +#include "bitmaps/terra-01.xbm" +#include "bitmaps/terra-02.xbm" +#include "bitmaps/terra-03.xbm" +#include "bitmaps/terra-04.xbm" +#include "bitmaps/terra-05.xbm" +#include "bitmaps/terra-06.xbm" +#include "bitmaps/terra-07.xbm" +#include "bitmaps/terra-08.xbm" +#include "bitmaps/terra-09.xbm" +#include "bitmaps/terra-10.xbm" +#include "bitmaps/terra-11.xbm" +#include "bitmaps/terra-12.xbm" +#include "bitmaps/terra-13.xbm" +#include "bitmaps/terra-14.xbm" +#include "bitmaps/terra-15.xbm" +#include "bitmaps/terra-16.xbm" +#include "bitmaps/terra-17.xbm" +#include "bitmaps/terra-18.xbm" +#include "bitmaps/terra-19.xbm" +#include "bitmaps/terra-20.xbm" +#include "bitmaps/terra-21.xbm" +#include "bitmaps/terra-22.xbm" +#include "bitmaps/terra-23.xbm" +#include "bitmaps/terra-24.xbm" +#include "bitmaps/terra-25.xbm" +#include "bitmaps/terra-26.xbm" +#include "bitmaps/terra-27.xbm" +#include "bitmaps/terra-28.xbm" +#include "bitmaps/terra-29.xbm" + +#define NUM_EARTHS 30 +#define SIZE_X terra00_width /* 64 */ +#define SIZE_Y terra00_height /* 64 */ +#define NUM_REV 4 +#define MINWORLDS 1 + +static XImage Earths[NUM_EARTHS] = +{ + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra00_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra01_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra02_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra03_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra04_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra05_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra06_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra07_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra08_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra09_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra10_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra11_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra12_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra13_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra14_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra15_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra16_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra17_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra18_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra19_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra20_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra21_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra22_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra23_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra24_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra25_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra26_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra27_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra28_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {SIZE_X, SIZE_Y, 0, XYBitmap, (char *) terra29_bits, LSBFirst, 8, LSBFirst, 8, 1}}; + +typedef struct { + int x; + int y; + unsigned long color; + int frame; + int direction; +} planetstruct; + +typedef struct { + int width; + int height; + int nrows; + int ncols; + int xb; + int yb; + int frame_num; + int nplanets; + planetstruct *planets; +} worldstruct; + +static worldstruct *worlds = NULL; + +void +init_world(ModeInfo * mi) +{ + worldstruct *wp; + int i; + + if (worlds == NULL) { + if ((worlds = (worldstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (worldstruct))) == NULL) + return; + } + wp = &worlds[MI_SCREEN(mi)]; + wp->frame_num = NUM_EARTHS * NUM_REV; + for (i = 0; i < NUM_EARTHS; i++) + Earths[i].bytes_per_line = 8; + wp->width = MI_WIDTH(mi); + wp->height = MI_HEIGHT(mi); + wp->ncols = wp->width / SIZE_X; + if (!wp->ncols) + wp->ncols = 1; + wp->nrows = wp->height / SIZE_Y; + if (!wp->nrows) + wp->nrows = 1; + wp->xb = (wp->width - SIZE_X * wp->ncols) / 2; + wp->yb = (wp->height - SIZE_Y * wp->nrows) / 2; + wp->nplanets = MI_COUNT(mi); + if (wp->nplanets < -MINWORLDS) + wp->nplanets = NRAND(-wp->nplanets - MINWORLDS + 1) + MINWORLDS; + else if (wp->nplanets < MINWORLDS) + wp->nplanets = MINWORLDS; + + if (wp->nplanets > wp->ncols * wp->nrows) + wp->nplanets = wp->ncols * wp->nrows; +#ifndef NOFLASH + if (wp->nplanets > wp->ncols) + wp->nplanets = wp->ncols; +#endif + if (wp->planets != NULL) + (void) free((void *) wp->planets); + wp->planets = (planetstruct *) malloc(wp->nplanets * sizeof (planetstruct)); + for (i = 0; i < wp->nplanets; i++) + wp->planets[i].x = wp->planets[i].y = -1; + + MI_CLEARWINDOW(mi); +} + +void +draw_world(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + GC gc = MI_GC(mi); + worldstruct *wp = &worlds[MI_SCREEN(mi)]; + int i; + +#ifndef NOFLASH + int *col, j; + + if ((col = (int *) calloc(wp->ncols, sizeof (int))) == NULL) + return; + +#endif + MI_IS_DRAWN(mi) = True; + + if (wp->frame_num == NUM_EARTHS * NUM_REV) { + wp->frame_num = 0; + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + for (i = 0; i < wp->nplanets; i++) { + if ((wp->ncols > wp->nplanets || wp->nrows < 2) && + wp->planets[i].x >= 0 && wp->planets[i].y >= 0) + XFillRectangle(display, MI_WINDOW(mi), gc, + wp->xb + SIZE_X * wp->planets[i].x, + wp->yb + SIZE_Y * wp->planets[i].y, + SIZE_X, SIZE_Y); +#ifdef NOFLASH + wp->planets[i].x = NRAND(wp->ncols); +#else + do { + j = NRAND(wp->ncols); + if (!col[j]) + wp->planets[i].x = j; + col[j]++; + } while (col[j] > 1); +#endif + wp->planets[i].y = NRAND(wp->nrows); + wp->planets[i].direction = (int) (LRAND() & 1); + wp->planets[i].frame = NRAND(NUM_EARTHS); + if (MI_NPIXELS(mi) > 2) + wp->planets[i].color = MI_PIXEL(mi, NRAND(MI_NPIXELS(mi))); + else + wp->planets[i].color = MI_WHITE_PIXEL(mi); + } + } +#ifndef NOFLASH + (void) free((void *) col); +#endif + for (i = 0; i < wp->nplanets; i++) { + XSetForeground(display, gc, wp->planets[i].color); + if (wp->planets[i].frame == NUM_EARTHS) + wp->planets[i].frame = 0; + else { + if ((wp->planets[i].frame < 0) && wp->planets[i].direction == 0) + wp->planets[i].frame = NUM_EARTHS - 1; + } + (void) XPutImage(display, MI_WINDOW(mi), gc, + (Earths + wp->planets[i].frame), 0, 0, + wp->xb + SIZE_X * wp->planets[i].x, + wp->yb + SIZE_Y * wp->planets[i].y, + SIZE_X, SIZE_Y); + + (wp->planets[i].direction) ? wp->planets[i].frame++ : wp->planets[i].frame--; + } + wp->frame_num++; +} + +void +release_world(ModeInfo * mi) +{ + if (worlds != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) + if (worlds[screen].planets != NULL) + (void) free((void *) worlds[screen].planets); + (void) free((void *) worlds); + worlds = NULL; + } +} + +void +refresh_world(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} + +#endif /* MODE_world */ diff --git a/modes/worm.c b/modes/worm.c new file mode 100644 index 00000000..22adbb5c --- /dev/null +++ b/modes/worm.c @@ -0,0 +1,456 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* worm --- draw wiggly worms */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)worm.c 4.07 97/11/24 xlockmore"; + +#endif + +/*- + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * 10-May-97: Compatible with xscreensaver + * 03-Sep-96: fixed bug in allocation of space for worms, added 3d support + * Henrik Theiling + * 27-Sep-95: put back malloc + * 23-Sep-93: got rid of "rint". (David Bagley) + * 27-Sep-91: got rid of all malloc calls since there were no calls to free(). + * 25-Sep-91: Integrated into X11R5 contrib xlock. + * + * Adapted from a concept in the Dec 87 issue of Scientific American p. 142. + * + * SunView version: Brad Taylor + * X11 version: Dave Lemke + * xlock version: Boris Putanec + */ + +#ifdef STANDALONE +#define PROGCLASS "Worm" +#define HACK_INIT init_worm +#define HACK_DRAW draw_worm +#define worm_opts xlockmore_opts +#define DEFAULTS "*delay: 17000 \n" \ + "*count: -20 \n" \ + "*cycles: 10 \n" \ + "*size: -3 \n" \ + "*ncolors: 200 \n" \ + "*use3d: False \n" \ + "*delta3d: 1.5 \n" \ + "*right3d: red \n" \ + "*left3d: blue \n" \ + "*both3d: magenta \n" \ + "*none3d: black \n" +#define SMOOTH_COLORS +#include "xlockmore.h" /* in xscreensaver distribution */ +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +#ifdef MODE_worm + +ModeSpecOpt worm_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct worm_description = +{"worm", "init_worm", "draw_worm", "release_worm", + "refresh_worm", "init_worm", NULL, &worm_opts, + 17000, -20, 10, -3, 64, 1.0, "", + "Shows wiggly worms", 0, NULL}; + +#endif + +#define MINSIZE 1 + +#define SEGMENTS 36 +#define MINWORMS 1 + +#define MAXZ 750 +#define MINZ 100 +#define SCREENZ 200 +#define GETZDIFF(z) (MI_DELTA3D(mi)*20.0*(1.0-(SCREENZ)/((float)(z)+MINZ))) +#define IRINT(x) ((int)(((x)>0.0)?(x)+0.5:(x)-0.5)) + +/* How many segments to draw per cycle when redrawing */ +#define REDRAWSTEP 3 + +typedef struct { + XPoint *circ; + int *diffcirc; + int dir, dir2; + int tail; + int x, y, z; + int redrawing, redrawpos; +} wormstuff; + +typedef struct { + int xsize, ysize, zsize; + int wormlength; + int nc; + int nw; + int circsize; + wormstuff *worm; + XRectangle *rects; + int maxsize; + int *size; + unsigned int chromo; +} wormstruct; + +static float sintab[SEGMENTS]; +static float costab[SEGMENTS]; +static int init_table = 0; + +static wormstruct *worms = NULL; + +static void +worm_doit(ModeInfo * mi, int which, unsigned long color) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + wormstruct *wp = &worms[MI_SCREEN(mi)]; + wormstuff *ws = &wp->worm[which]; + int x, y, z; + int diff; + + ws->tail++; + if (ws->tail == wp->wormlength) + ws->tail = 0; + + x = ws->circ[ws->tail].x; + y = ws->circ[ws->tail].y; + + if (MI_IS_USE3D(mi)) { + diff = ws->diffcirc[ws->tail]; + if (MI_IS_INSTALL(mi)) { + XSetForeground(display, gc, MI_NONE_COLOR(mi)); + } else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + } + XFillRectangle(display, window, gc, x - diff, y, + wp->circsize, wp->circsize); + XFillRectangle(display, window, gc, x + diff, y, + wp->circsize, wp->circsize); + } else { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XFillRectangle(display, window, gc, x, y, wp->circsize, wp->circsize); + } + + if (LRAND() & 1) + ws->dir = (ws->dir + 1) % SEGMENTS; + else + ws->dir = (ws->dir + SEGMENTS - 1) % SEGMENTS; + + x = (ws->x + IRINT((float) wp->circsize * costab[ws->dir]) + + wp->xsize) % wp->xsize; + y = (ws->y + IRINT((float) wp->circsize * sintab[ws->dir]) + + wp->ysize) % wp->ysize; + + ws->circ[ws->tail].x = x; + ws->circ[ws->tail].y = y; + ws->x = x; + ws->y = y; + + if (MI_IS_USE3D(mi)) { + if (LRAND() & 1) + ws->dir2 = (ws->dir2 + 1) % SEGMENTS; + else + ws->dir2 = (ws->dir2 + SEGMENTS - 1) % SEGMENTS; + /* for the z-axis the wrap-around looks bad, + * so worms should just turn around. + */ + z = (int) (ws->z + wp->circsize * sintab[ws->dir2]); + if (z < 0 || z >= wp->zsize) + z = (int) (ws->z - wp->circsize * sintab[ws->dir2]); + + diff = (int) (GETZDIFF(z) + 0.5); /* ROUND */ + ws->diffcirc[ws->tail] = diff; + + ws->z = z; + + /* right eye */ + color = 0; + wp->rects[color * wp->maxsize + wp->size[color]].x = x + diff; + wp->rects[color * wp->maxsize + wp->size[color]].y = y; + wp->size[color]++; + + /* left eye */ + color = 1; + wp->rects[color * wp->maxsize + wp->size[color]].x = x - diff; + wp->rects[color * wp->maxsize + wp->size[color]].y = y; + wp->size[color]++; + +#if 0 + if (ws->redrawing) { /* Too hard for now */ + int j; + + for (j = 0; j < REDRAWSTEP; j++) { + int k = (ws->tail - ws->redrawpos + wp->wormlength) + % wp->wormlength; + + color = 0; + wp->rects[color * wp->maxsize + wp->size[color]].x = + ws->circ[k].x + ws->diffcirc[k]; + wp->rects[color * wp->maxsize + wp->size[color]].y = + ws->circ[k].y; + wp->size[color]++; + + color = 1; + wp->rects[color * wp->maxsize + wp->size[color]].x = + ws->circ[k].x - ws->diffcirc[k]; + wp->rects[color * wp->maxsize + wp->size[color]].y = + ws->circ[k].y; + wp->size[color]++; + + if (++(ws->redrawpos) >= wp->wormlength) { + ws->redrawing = 0; + break; + } + } + } +#endif + + } else { + + wp->rects[color * wp->maxsize + wp->size[color]].x = x; + wp->rects[color * wp->maxsize + wp->size[color]].y = y; + wp->size[color]++; + if (ws->redrawing) { + int j; + + ws->redrawpos++; + /* Compensates for the changed ws->tail + since the last callback. */ + + for (j = 0; j < REDRAWSTEP; j++) { + int k = (ws->tail - ws->redrawpos + wp->wormlength) + % wp->wormlength; + + wp->rects[color * wp->maxsize + wp->size[color]].x = ws->circ[k].x; + wp->rects[color * wp->maxsize + wp->size[color]].y = ws->circ[k].y; + wp->size[color]++; + + if (++(ws->redrawpos) >= wp->wormlength) { + ws->redrawing = 0; + break; + } + } + } + } +} + +static void +free_worms(wormstruct * wp) +{ + int wn; + + if (wp->worm) { + for (wn = 0; wn < wp->nw; wn++) { + if (wp->worm[wn].circ) + (void) free((void *) wp->worm[wn].circ); + if (wp->worm[wn].diffcirc) + (void) free((void *) wp->worm[wn].diffcirc); + } + (void) free((void *) wp->worm); + wp->worm = NULL; + } + if (wp->rects) { + (void) free((void *) wp->rects); + wp->rects = NULL; + } + if (wp->size) { + (void) free((void *) wp->size); + wp->size = NULL; + } +} + +void +init_worm(ModeInfo * mi) +{ + wormstruct *wp; + int size = MI_SIZE(mi); + int i, j; + + if (worms == NULL) { + if ((worms = (wormstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (wormstruct))) == NULL) + return; + } + wp = &worms[MI_SCREEN(mi)]; + if (MI_NPIXELS(mi) <= 2 || MI_IS_USE3D(mi)) + wp->nc = 2; + else + wp->nc = MI_NPIXELS(mi); + + free_worms(wp); + wp->nw = MI_COUNT(mi); + if (wp->nw < -MINWORMS) + wp->nw = NRAND(-wp->nw - MINWORMS + 1) + MINWORMS; + else if (wp->nw < MINWORMS) + wp->nw = MINWORMS; + if (!wp->worm) + wp->worm = (wormstuff *) malloc(wp->nw * sizeof (wormstuff)); + + if (!wp->size) + wp->size = (int *) malloc(MI_NPIXELS(mi) * sizeof (int)); + + wp->maxsize = (REDRAWSTEP + 1) * wp->nw; /* / wp->nc + 1; */ + if (!wp->rects) + wp->rects = + (XRectangle *) malloc(wp->maxsize * MI_NPIXELS(mi) * sizeof (XRectangle)); + + + if (!init_table) { + init_table = 1; + for (i = 0; i < SEGMENTS; i++) { + sintab[i] = SINF(i * 2.0 * M_PI / SEGMENTS); + costab[i] = COSF(i * 2.0 * M_PI / SEGMENTS); + } + } + wp->xsize = MI_WIDTH(mi); + wp->ysize = MI_HEIGHT(mi); + wp->zsize = MAXZ - MINZ + 1; + if (MI_NPIXELS(mi) > 2) + wp->chromo = NRAND(MI_NPIXELS(mi)); + + if (size < -MINSIZE) + wp->circsize = NRAND(-size - MINSIZE + 1) + MINSIZE; + else if (size < MINSIZE) + wp->circsize = MINSIZE; + else + wp->circsize = size; + + for (i = 0; i < wp->nc; i++) { + for (j = 0; j < wp->maxsize; j++) { + wp->rects[i * wp->maxsize + j].width = wp->circsize; + wp->rects[i * wp->maxsize + j].height = wp->circsize; + + } + } + (void) memset((char *) wp->size, 0, wp->nc * sizeof (int)); + + wp->wormlength = (int) sqrt(wp->xsize + wp->ysize) * + MI_CYCLES(mi) / 8; /* Fudge this to something reasonable */ + for (i = 0; i < wp->nw; i++) { + wp->worm[i].circ = (XPoint *) malloc(wp->wormlength * sizeof (XPoint)); + wp->worm[i].diffcirc = (int *) malloc(wp->wormlength * sizeof (int)); + + for (j = 0; j < wp->wormlength; j++) { + wp->worm[i].circ[j].x = wp->xsize / 2; + wp->worm[i].circ[j].y = wp->ysize / 2; + if (MI_IS_USE3D(mi)) + wp->worm[i].diffcirc[j] = 0; + } + wp->worm[i].dir = NRAND(SEGMENTS); + wp->worm[i].dir2 = NRAND(SEGMENTS); + wp->worm[i].tail = 0; + wp->worm[i].x = wp->xsize / 2; + wp->worm[i].y = wp->ysize / 2; + wp->worm[i].z = SCREENZ - MINZ; + wp->worm[i].redrawing = 0; + } + + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } +} + +void +draw_worm(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + GC gc = MI_GC(mi); + wormstruct *wp = &worms[MI_SCREEN(mi)]; + unsigned long wcolor; + int i; + + (void) memset((char *) wp->size, 0, wp->nc * sizeof (int)); + + MI_IS_DRAWN(mi) = True; + + for (i = 0; i < wp->nw; i++) { + if (MI_NPIXELS(mi) > 2) { + wcolor = (i + wp->chromo) % wp->nc; + + worm_doit(mi, i, wcolor); + } else + worm_doit(mi, i, (unsigned long) 0); + } + + if (MI_IS_USE3D(mi)) { + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXor); + XSetForeground(display, gc, MI_RIGHT_COLOR(mi)); + XFillRectangles(display, window, gc, &(wp->rects[0]), wp->size[0]); + + XSetForeground(display, gc, MI_LEFT_COLOR(mi)); + XFillRectangles(display, window, gc, &(wp->rects[wp->maxsize]), wp->size[1]); + if (MI_IS_INSTALL(mi)) + XSetFunction(display, gc, GXcopy); + } else if (MI_NPIXELS(mi) > 2) { + for (i = 0; i < wp->nc; i++) { + XSetForeground(display, gc, MI_PIXEL(mi, i)); + XFillRectangles(display, window, gc, &(wp->rects[i * wp->maxsize]), wp->size[i]); + } + } else { + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + XFillRectangles(display, window, gc, + &(wp->rects[0]), wp->size[0]); + } + + if (++wp->chromo == (unsigned long) wp->nc) + wp->chromo = 0; +} + +void +release_worm(ModeInfo * mi) +{ + if (worms != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) + free_worms(&worms[screen]); + (void) free((void *) worms); + worms = NULL; + } +} + +void +refresh_worm(ModeInfo * mi) +{ + if (MI_IS_INSTALL(mi) && MI_IS_USE3D(mi)) { + MI_CLEARWINDOWCOLOR(mi, MI_NONE_COLOR(mi)); + } else { + MI_CLEARWINDOW(mi); + } + /* The 3D code does drawing&clearing by XORing. We do not + want to go to too much trouble here to make it redraw + correctly. */ + if (!MI_IS_USE3D(mi) && worms != NULL) { + wormstruct *wp = &worms[MI_SCREEN(mi)]; + int i; + + for (i = 0; i < wp->nw; i++) { + wp->worm[i].redrawing = 1; + wp->worm[i].redrawpos = 0; + } + } +} + +#endif /* MODE_worm */ diff --git a/modes/xjack.c b/modes/xjack.c new file mode 100644 index 00000000..1baccad2 --- /dev/null +++ b/modes/xjack.c @@ -0,0 +1,449 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* xjack -- Jack having one of those days */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)xjack.c 4.13 98/10/10 xlockmore"; + +#endif + +/* 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. + * + * Wendy, let me explain something to you. Whenever you come in here and + * interrupt me, you're BREAKING my CONCENTRATION. You're DISTRACTING me! + * And it will then take me time to get back to where I was. You understand? + * Now, we're going to make a new rule. When you come in here and you hear + * me typing, or whether you DON'T hear me typing, or whatever the FUCK you + * hear me doing; when I'm in here, it means that I am working, THAT means + * don't come in! Now, do you think you can handle that? + * + * Revision History: + * 10-Oct-98: revision history edited. + */ + +#ifdef STANDALONE +#define PROGCLASS "XJack" +#define HACK_INIT init_xjack +#define HACK_DRAW draw_xjack +#define xjack_opts xlockmore_opts +#define DEFAULTS "*delay: 50000 \n" \ + "*font: \n" \ + "*text: \n" \ + "*fullrandom: True \n" +#define DEF_FONT "-*-courier-medium-r-*-*-*-240-*-*-m-*-*-*", +#define DEF_TEXT "All work and no play makes Jack a dull boy. "; +#include "xlockmore.h" /* in xscreensaver distribution */ + +#else /* STANDALONE */ +#include "xlock.h" /* in xlockmore distribution */ +#endif +#include "iostuff.h" + +#ifdef MODE_xjack + +ModeSpecOpt xjack_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct xjack_description = +{"xjack", "init_xjack", "draw_xjack", "release_xjack", + "init_xjack", "init_xjack", NULL, &xjack_opts, + 50000, 1, 1, 1, 64, 1.0, "", + "Shows Jack having one of those days", 0, NULL}; + +#endif + +#define font_height(f) ((f==None)?8:f->ascent + f->descent) + +extern XFontStruct *getFont(Display * display); + +typedef struct { + int word_length; + int sentences; + int paras; + Bool caps; + Bool break_para; + int mode, stage, busyloop; + int left, right; /* characters */ + int x, y; /* characters */ + int hspace, vspace; /* pixels */ + int ascent; + int height; + int win_width, win_height; + int columns, rows; /* characters */ + int char_width, line_height; /* pixels */ + const char *s; + GC gc; +} jackstruct; + +static jackstruct *jacks = NULL; + +static XFontStruct *mode_font = None; +static const char *source = "All work and no play makes Jack a dull boy. "; +static const char *source_message; + +extern char *message; + +void +init_xjack(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + jackstruct *jp; + XGCValues gcv; + + + if (jacks == NULL) { + if ((jacks = (jackstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (jackstruct))) == NULL) + return; + } + jp = &jacks[MI_SCREEN(mi)]; + if (mode_font == None) + mode_font = getFont(display); + if (jp->gc == NULL && mode_font != None) { + gcv.font = mode_font->fid; + XSetFont(display, MI_GC(mi), mode_font->fid); + gcv.graphics_exposures = False; + gcv.foreground = MI_WHITE_PIXEL(mi); + gcv.background = MI_BLACK_PIXEL(mi); + jp->gc = XCreateGC(display, MI_WINDOW(mi), + GCForeground | GCBackground | GCGraphicsExposures | GCFont, &gcv); + jp->ascent = mode_font->ascent; + jp->height = font_height(mode_font); + } + + jp->win_width = MI_WIDTH(mi); + jp->win_height = MI_HEIGHT(mi); + + jp->hspace = jp->vspace = 15; /* pixels */ + jp->char_width = (mode_font->per_char + ? mode_font->per_char['n' - mode_font->min_char_or_byte2].rbearing + : mode_font->min_bounds.rbearing); + if (!jp->char_width) + jp->char_width = 1; + jp->line_height = jp->height + 1; + + jp->columns = (jp->win_width - jp->hspace - jp->hspace) / jp->char_width; + jp->rows = (MI_HEIGHT(mi) - jp->vspace - jp->vspace) / jp->line_height; + + jp->left = 0xFF & (NRAND((jp->columns / 2) + 1)); + jp->right = jp->left + (0xFF & (NRAND(jp->columns - jp->left - 10) + 10)); + jp->x = 0; + jp->y = 0; + jp->sentences = 0; + jp->paras = 0; + jp->caps = False; + jp->break_para = True; + jp->mode = 0; + jp->stage = 0; + jp->busyloop = 0; + if (!message || !*message) + source_message = source; + else + source_message = message; + jp->s = source_message; + MI_CLEARWINDOW(mi); +} + +void +draw_xjack(ModeInfo * mi) +{ + Display *display = MI_DISPLAY(mi); + Window window = MI_WINDOW(mi); + jackstruct *jp = &jacks[MI_SCREEN(mi)]; + const char *s2; + + jp->word_length = 0; + for (s2 = jp->s; *s2 && *s2 != ' '; s2++) + jp->word_length++; + + if (jp->break_para || (*(jp->s) != ' ' && + (jp->x + jp->word_length) >= jp->right)) { + jp->x = jp->left; + jp->y++; + + if (jp->break_para) + jp->y++; + + if (jp->mode == 1 || jp->mode == 2) { + /* 1 = left margin goes southwest; 2 = southeast */ + jp->left += (jp->mode == 1 ? 1 : -1); + if (jp->left >= jp->right - 10) { + if ((jp->right < (jp->columns - 10)) && (LRAND() & 1)) + jp->right += (0xFF & (NRAND(jp->columns - jp->right))); + else + jp->mode = 2; + } else if (jp->left <= 0) { + jp->left = 0; + jp->mode = 1; + } + } else if (jp->mode == 3 || jp->mode == 4) { + /* 3 = right margin goes southeast; 4 = southwest */ + jp->right += (jp->mode == 3 ? 1 : -1); + if (jp->right >= jp->columns) { + jp->right = jp->columns; + jp->mode = 4; + } else if (jp->right <= jp->left + 10) + jp->mode = 3; + } + + if (jp->y >= jp->rows) { /* bottom of page */ + /* scroll by 1-5 lines */ + int lines = ((NRAND(5)) ? 0 : (0xFF & (NRAND(5)))) + 1; + + if (jp->break_para) + lines++; + + /* but sometimes scroll by a whole page */ + if (!NRAND(100)) + lines += jp->rows; + + while (lines > 0) { + XCopyArea(display, window, window, jp->gc, + 0, jp->hspace + jp->line_height, + jp->win_width, + jp->win_height - jp->vspace - jp->vspace - jp->line_height, + 0, jp->vspace); + XClearArea(display, window, + 0, jp->win_height - jp->vspace - jp->line_height, + jp->win_width, + jp->line_height + jp->vspace + jp->vspace, + False); + XClearArea(display, window, 0, 0, jp->win_width, jp->vspace, False); + /* See? It's OK. He saw it on the television. */ + XClearArea(display, window, 0, 0, jp->hspace, jp->win_height, False); + XClearArea(display, window, jp->win_width - jp->vspace, 0, + jp->hspace, jp->win_height, False); + jp->y--; + lines--; +#if 0 + XSync (display, True); + if (delay) + usleep (delay * 10); +#endif + } + if (jp->y < 0) + jp->y = 0; + } + + jp->break_para = False; + } + + if (*(jp->s) != ' ') { + char c = *(jp->s); + int xshift = 0, yshift = 0; + + if (!NRAND(50)) { + xshift = NRAND((jp->char_width / 3) + 1); /* mis-strike */ + yshift = NRAND((jp->line_height / 6) + 1); + if (!NRAND(3)) + yshift *= 2; + if (LRAND() & 1) + xshift = -xshift; + if (LRAND() & 1) + yshift = -yshift; + } + + if (!NRAND(250)) { /* introduce adjascent-key typo */ + static const char * const typo[] = { + "asqwz", "bghnv", "cdfvx", "dcefsrx", "edrsw34", + "fcdegrtv", "gbfhtvy", "hbgjnuy", "ijkou89", "jhikmnu", + "kijolm,", "lkop;.,", "mjkn,", "nbhjm", "oiklp09", + "plo;[-0", "qasw12", "redft45", "sadewxz", "tfgry56", + "uhijy78", "vbcfg", "waeqs23", "xcdsz", "yuhgt67", + "zasx", ".l,;/", + "ASQWZ", "BGHNV", "CDFVX", "DCEFSRX", "EDRSW#$", + "FCDEGRTV", "GBFHTVY", "HBGJNUY", "IJKOU*(", "JHIKMNU", + "KIJOLM,", "LKOP:><", "MJKN<", "NBHJM", "OIKLP)(", + "PLO:{_)", "QASW!@", "REDFT$%", "SADEWXZ", "TFGRY%^", + "UHIJY&*", "VBCFG", "WAEQS@#", "XCDSZ", "YUHGT^&", + "ZASX", 0 }; + int i = 0; + + while (typo[i] && typo[i][0] != c) + i++; + if (typo[i]) + c = typo[i][0xFF & (NRAND(strlen(typo[i]+1)))]; + } + + /* caps typo */ + if (c >= 'a' && c <= 'z' && (jp->caps || !NRAND(350))) { + c -= ('a' - 'A'); + if (c == 'O' && LRAND() & 1) + c = '0'; + } + + { + Bool overstrike; + + do { + XDrawString (display, window, jp->gc, + (jp->x * jp->char_width) + jp->hspace + xshift, + (jp->y * jp->line_height) + jp->vspace + mode_font->ascent + yshift, + &c, 1); + overstrike = (xshift == 0 && yshift == 0 && + (0 == (LRAND() & 3000))); + if (overstrike) { + if (LRAND() & 1) + xshift--; + else + yshift--; + } + } while (overstrike); + } + if ((tolower(c) != tolower(*(jp->s))) + ? (!NRAND(10)) /* backup to correct */ + : (!NRAND(400))) { /* fail to advance */ + jp->x--; + jp->s--; +#if 0 + XSync (display, True); + if (delay) + usleep (0xFFFF & (delay + (NRAND(delay * 10)))); +#endif + } + } + + jp->x++; + jp->s++; + + if (!NRAND(200)) { + if (LRAND() & 1 && jp->s != source_message) + jp->s--; /* duplicate character */ + else if (*(jp->s)) + jp->s++; /* skip character */ + } + + if (*(jp->s) == 0) { + jp->sentences++; + jp->caps = (!NRAND(40)); /* capitalize sentence */ + + if (!NRAND(10) || /* randomly break paragraph */ + (jp->mode == 0 && (NRAND(10) || jp->sentences > 20))) { + jp->break_para = True; + jp->sentences = 0; + jp->paras++; + + if (LRAND() & 1) /* mode=0 50% of the time */ + jp->mode = 0; + else + jp->mode = (0xFF & NRAND(5)); + + if (LRAND() & 1) { /* re-pick margins */ + if (jp->columns < 3) + jp->columns = 3; + jp->left = 0xFF & (NRAND(jp->columns / 3)); + jp->right = jp->columns - (0xFF & (NRAND(jp->columns / 3))); + + if (!NRAND(3)) /* sometimes be wide */ + jp->right = jp->left + ((jp->right - jp->left) / 2); + } + + if (jp->right - jp->left <= 10) { /* introduce sanity */ + jp->left = 0; + jp->right = jp->columns; + } + + if (jp->right - jp->left > 50) { /* if wide, shrink and move */ + jp->left += (0xFF & (NRAND((jp->columns - 50) + 1))); + jp->right = jp->left + (0xFF & (NRAND(40) + 10)); + } + + /* oh, gag. */ + if (jp->mode == 0 && jp->right - jp->left < 25 && jp->columns > 40) { + jp->right += 20; + if (jp->right > jp->columns) + jp->left -= (jp->right - jp->columns); + } + } + jp->s = source_message; + } + +#if 0 + XSync (display, True); + if (delay) { + usleep (delay); + if (!NRAND(3)) + usleep(0xFFFFFF & ((NRAND(delay * 5)) + 1)); + + if (jp->break_para) + usleep(0xFFFFFF & ((NRAND(delay * 15)) + 1)); + } +#endif + +#ifdef NFS_COMPLAINTS + if (jp->paras > 5 && (!NRAND(1000)) && jp->y < jp->rows-5) { + int i; + int n = NRAND(3); + + jp->y++; + for (i = 0; i < n; i++) { + /* See also http://catalog.com/hopkins/unix-haters/login.html */ + const char *n1 = + "NFS server overlook not responding, still trying..."; + const char *n2 = "NFS server overlook ok."; + + while (*n1) { + XDrawString (display, window, jp->gc, + (jp->x * jp->char_width) + jp->hspace, + (jp->y * jp->line_height) + jp->vspace + mode_font->ascent, + n1, 1); + jp->x++; + if (jp->x >= jp->columns) + jp->x = 0, jp->y++; + n1++; + } +#if 0 + XSync (display, True); + usleep (5000000); +#endif + while (*n2) { + XDrawString (display, window, jp->gc, + (jp->x * jp->char_width) + jp->hspace, + (jp->y * jp->line_height) + jp->vspace + mode_font->ascent, + n2, 1); + jp->x++; + if (jp->x >= jp->columns) + jp->x = 0, jp->y++; + n2++; + } + jp->y++; +#if 0 + XSync (display, True); + usleep (500000); +#endif + } + } +#endif +} + +void +release_xjack(ModeInfo * mi) +{ + if (jacks != NULL) { + int screen; + + for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) { + jackstruct *jp = &jacks[screen]; + Display *display = MI_DISPLAY(mi); + + if (jp->gc) + XFreeGC(display, jp->gc); + } + (void) free((void *) jacks); + jacks = NULL; + } + if (mode_font != None) { + XFreeFont(MI_DISPLAY(mi), mode_font); + mode_font = None; + } +} + +#endif /* MODE_xjack */ diff --git a/pixmaps/bat-0.xpm b/pixmaps/bat-0.xpm new file mode 100644 index 00000000..81ae3849 --- /dev/null +++ b/pixmaps/bat-0.xpm @@ -0,0 +1,178 @@ +/* XPM */ +static char * bat0[] = { +"147 108 67 1", +" c #000000000000", +". c #090909090909", +"X c #969696969696", +"o c #9C9C9C9C9C9C", +"O c #1E1E1E1E1E1E", +"+ c #F0F0F0F0F0F0", +"@ c #FFFFFFFFFFFF", +"# c #C6C6C6C6C6C6", +"$ c #474747474747", +"% c #212121212121", +"& c #E2E2E2E2E2E2", +"* c #414141414141", +"= c #0C0C0C0C0C0C", +"- c #272727272727", +"; c #AAAAAAAAAAAA", +": c #808080808080", +"> c #B4B4B4B4B4B4", +", c #1A1A1A1A1A1A", +"< c #DDDDDDDDDDDD", +"1 c #EDEDEDEDEDED", +"2 c #2A2A2A2A2A2A", +"3 c #D7D7D7D7D7D7", +"4 c #2C2C2C2C2C2C", +"5 c #999999999999", +"6 c #FBFBFBFBFBFB", +"7 c #4A4A4A4A4A4A", +"8 c #BDBDBDBDBDBD", +"9 c #B2B2B2B2B2B2", +"0 c #585858585858", +"q c #C8C8C8C8C8C8", +"w c #101010101010", +"e c #151515151515", +"r c #6C6C6C6C6C6C", +"t c #C0C0C0C0C0C0", +"y c #7F7F7F7F7F7F", +"u c #3F3F3F3F3F3F", +"i c #6B6B6B6B6B6B", +"p c #868686868686", +"a c #353535353535", +"s c #F4F4F4F4F4F4", +"d c #4D4D4D4D4D4D", +"f c #5D5D5D5D5D5D", +"g c #050505050505", +"h c #EBEBEBEBEBEB", +"j c #606060606060", +"k c #A2A2A2A2A2A2", +"l c #FFFF00000000", +"L c #FFFF77777777", +"z c #656565656565", +"x c #7A7A7A7A7A7A", +"c c #919191919191", +"v c #6E6E70707070", +"b c #A5A5A5A5A5A5", +"n c #CECECECECECE", +"m c #727272727272", +"M c #515151515151", +"N c #E6E6E6E6E6E6", +"B c #D0D0D0D0D0D0", +"V c #3B3B3B3B3B3B", +"C c #BABABABABABA", +"Z c #555555555555", +"A c #888888888888", +"S c #313131313131", +"D c #ACACACACACAC", +"F c #757575757575", +"G c #8C8C8C8C8C8C", +"H c #DADADADADADA", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" .Xo ", +" O+@#$ ", +" %&@@* %= ", +" -&@; .:@> ", +" ,<1 23@@2 ", +" 4@2 5@@67 ", +" 89 0&@@@q ", +" w=eee r@t@@@@>% ", +" %y9@@@@@@@, ,t@V ", +" M@Cevvvvvv=Z#6@t061lll@ZA@llll;@, 3+2 ", +" O+nvvvvvvvz@@@5c@@@3@@64 Z@&lll1&V; #& ", +" ,s&,vvvvvvz@N0g S% t@@z D@@@1N@iF@7 .-sG ", +" 5@4vvvvvvv3s- t@@q h@@@++5g=@n %$j@% ", +" f@Zvvvvvvvw@> :@sZ @@&= j@y 0=B# ", +" ghCvvvvvvvvv6> r@; O+3; b6 -02@f ", +" i@2vvvvvvMxm&B x@k 7NX#4 Dovvr Dhg ", +" .1bvvvvvv7@i 4*g t@0 hj<4 D8vvFg-@u ", +" u@OvvvvvvX@ t@7g@V3 CNgv7M &C ", +" ;&vvvvvvvnN =&@4%@u& .1>vvwf rs, ", +" ,@5vvvvvvvsD O+@ 7#f9 %@0vvvrge@0 ", +" Ss-vvvvvvw@o a@@ AxDX ;@vvvva% #t ", +" D @@2%n>k o@*vvvvvvvuv>H ", +" 01vvvvvvvvvo@ @1 jtNd a@yvvvvvvv-vm1 ", +" bNvvvvv=.vv:@g 4@& f1@$ HXvvvvvvvdv2@% ", +" bNgv,vvOgvv*@V m@; 0@@g q3vvvvvvv2w @j ", +" ;#vvgvuvvvv.hD jH- r@H qHvvvvvvv.d 39 ", +" DkvvvOgvvvvvD@, g 5@p 3kvvvvvvvvi ;q ", +" Dbvvvz.0r0ev*@j =0. @mvvvvvvvvf=yn ", +" Dkvvm@@@@@@o-Nt a@%vvvvvvvv-%i6, ", +" Dkv.@@;2e7C@+h@V chvvvvvvvvv,*21e ", +" Dkvy@x *<@@k #8vvvvvvvvv%c-@2 ", +" DovsH .b@@2 e@MvvvvvvvvvgF=@Z ", +" DD-@d B@t j@vvvvvvvvvvvk @M ", +" ;Ha@% -N@S C6vvvvvvvvvvvA sf ", +" x3:@ A@3. ,@DvvvvvvvvvvvX 6c ", +" dHi@ a@q. f@Zvvvvvvvvvvvx #D ", +" d&4@ u, DhgvvvvvvvvvvvXS59 ", +" 71a@e @pvvvvvvvvvvvvZek9 ", +" .@X@V F@evvvvvvvvvvvv0,o9 ", +" @C@iOX %@Bvvvvvvvvvvvvvm4oC ", +" @B@5S@ o@fvvvvvvvvvvvvv5wA@ ", +" #tG3S@ ,+1vvvvvvvvvvvvvvm*Z@ ", +" :Hu@7@ -n@8udM*gvvvvvvvvvi7$@ ", +" a@m@i@ m= gH@@@@@@@@+nk*vvvvvXpa@- ", +" -@N@t@ @- o@+:aO,fFG36@sAOvvr8S@a ", +" .&@@@@ @O =ja ,d9@6uvCyOsa ", +" y@@@@ 46 S3@VbzZNV ", +" .9@@6 Xk -@1* x c #797979797979", +", c #B7B7B7B7B7B7", +"< c #656565656565", +"1 c #262626262626", +"2 c #BFBFBFBFBFBF", +"3 c #B3B3B3B3B3B3", +"4 c #515151515151", +"5 c #0B0B0B0B0B0B", +"6 c #171717171717", +"7 c #D9D9D9D9D9D9", +"8 c #4F4F4F4F4F4F", +"9 c #050505050505", +"0 c #EDEDEDEDEDED", +"q c #373737373737", +"w c #4A4A4A4A4A4A", +"e c #C6C6C6C6C6C6", +"r c #131313131313", +"t c #8F8F8F8F8F8F", +"y c #E1E1E1E1E1E1", +"u c #636363636363", +"i c #6B6B6B6B6B6B", +"p c #585858585858", +"a c #2B2B2B2B2B2B", +"s c #737373737373", +"d c #808080808080", +"f c #8B8B8B8B8B8B", +"g c #464646464646", +"h c #9E9E9E9E9E9E", +"j c #575757575757", +"k c #202020202020", +"l c #757575757575", +"z c #CCCCCCCCCCCC", +"x c #CBCBCBCBCBCB", +"c c #F0F0F0F0F0F0", +"v c #D6D6D6D6D6D6", +"b c #999999999999", +"n c #858585858585", +"m c #404040404040", +"M c #FFFF00000000", +"L c #FFFF77777777", +"N c #0E0E0E0E0E0E", +"B c #DFDFDFDFDFDF", +"V c #C1C1C1C1C1C1", +"C c #959595959595", +"Z c #878784848181", +"A c #919191919191", +"S c #5F5F5F5F5F5F", +"D c #313131313131", +"F c #6C6C6C6C6C6C", +"G c #F6F6F6F6F6F6", +"H c #D1D1D1D1D1D1", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" .X ", +" oO+ ", +" X@# ", +" $% ", +" &*=-; $: ", +" >,<1+2 34 ", +" 5; 5O678 9 ", +" 0q=w qe2 ", +" *$O rtOyu9 ", +" i@O p0OOa ", +" sO= u7OOOOd ", +" r..66w$-,3fg hO, j=OOO@-o. ", +" 9kql>2zxxx0c00cOO2+h0O:3O7,OOOOx1r ", +" 6wf%v-3bnm#&#&qqaeOMM NBOOOVOOOOOO+ ", +" rquh%xCsuX9ZZZZZZZZZZZ9O+MMMMMi%OOOOO+sOOO& ", +" 9kd,h+swkNZZZZZZZZZZZZZZZZrOMMLLMM .OOOha tcOO& ", +" 1j+3tirZZZZZZZZZZZZZZZ.Z.94AZZzMNLLMMM;OOOMMM SOp.g4X ", +" NqSCC>w.ZZZZZZZZZZZZZZZZZZZZZmv@,j .OcsMMMM*OyMMLLMMDO89#>*7%8X ", +" .F%ft#k9ZZZZZZZZZZZZZZZZZZZZZZZmOVa mVOOOGOcGcuMLLMrxONZZZZ;SheoS5 ", +" ;h$ds6ZZZZZZZZZZZZZZZZZZZZZZZZZZZFOl 9azha ", +" a<*Aw9ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ&OF 9+ eOA$Oe-2S9 ZZZZZZZZZZZZsH%k ", +" Ng+3p6ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ5xi jh BO;eV N ZZZZZZZZZZZZZZi2n6 ", +" 9>0%&ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ2A $8 1OO =< ZZZZZZZZZZZZZZZZlyt ", +"514#9 Nt2>NZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZf* Vr f0%1-. 5D2OOhXZZZZZZZZZZZZZZZ9s$i ", +"8h,=Hq gA>NZZZZN#ZZZ5rZZZZZZZZZZZZZZZZZZZZZZZZZ6=; m, oVj%: X*3l48%co9ZZZZZZZZZZZZZZZkdzp ", +" lO. #V2 .ZZZZZZrZZZZ9ZZZZZZZZZZZZZZZZZZZZZZZZZ7+ Cu 4lvDOX fm X2@pZZZZZZZZZZZZZZZZqV*; ", +" Fv u>mjCht8m6ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ#OX Br5vj*l+ 8c39ZZZZZZZZZZZZZZZZ#*o1 ", +" GA+OBcOOGGOOGV8NZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ+o .7 uobnyX ;7xXZZZZZZZZZZZZZZZZZ>7F ", +" oOOO%1 5G hXpH;B=D +-NZZZZZZZZZZZZZZZZZZgHfN ", +" ;=OOO# #,@VmZZZZZZrsvcGc2n.ZZ4ZZZvC 6e znCH2 .@*ZZZZZZZZZZZZZZZZZZZ6+=j ", +" k=x9$G rCOywZZZZ,O7tfn*OO+Z+rZkOp gd;Oavv4 nO5ZZZZZZZZZZZZZZZZZZZZ&H%5 ", +" 7f Nvd 6COt9ZlOo 9>Ozu;ZpOD AD%$.B%6 aOXZZZZZZZZZZZZZZZZZZZZZZj2S ", +" FB acor 4Oeacy5 jOFNZsO. $&OX2=i COOD sONZee CuBSaO= .@:ZZZZZZZZZZZZZZZZZZZZZZZZZZZ1e+ ", +" lg 69 wOOD 6OmZv: $p= sOo lOZZZZZZZZZZZZZZZZZZZZZZZZZZZZZNo3r ", +" tN &O0r =+Z=s .zeA VOw .-tZZZZZZNZZZZ95ZZZZZZZZZZZZZZZZZZty; ", +" %. N7o +vZOF wOOD O@. HOaZZZ.X5&5ZZ9a;5ZZZ9qZZ1ZZZZZZZZZZuyg ", +" N r9 j0XO& FOv c #C9C9C9C9C9C9", +", c #E6E6E6E6E6E6", +"< c #E3E3E3E3E3E3", +"1 c #848484848484", +"2 c #EFEFEFEFEFEF", +"3 c #F0F0F0F0F0F0", +"4 c #3F3F3F3F3F3F", +"5 c #1B1B1B1B1B1B", +"6 c #8B8B8B8B8B8B", +"7 c #696969696969", +"8 c #4B4B4B4B4B4B", +"9 c #F5F5F5F5F5F5", +"0 c #151515151515", +"q c #8D8D8D8D8D8D", +"w c #D9D9D9D9D9D9", +"e c #949494949494", +"r c #343434343434", +"t c #3A3A3A3A3A3A", +"y c #CECECECECECE", +"u c #454545454545", +"i c #0A0A0A0A0A0A", +"p c #747474747474", +"a c #595959595959", +"s c #C7C7C7C7C7C7", +"d c #515151515151", +"f c #5D5D5D5D5D5D", +"g c #C3C3C3C3C3C3", +"h c #F8F8F8F8F8F8", +"j c #E8E8E8E8E8E8", +"k c #838383838383", +"l c #0E0E0E0E0E0E", +"z c #B2B2B2B2B2B2", +"x c #414141414141", +"c c #737373737373", +"v c #D2D2D2D2D2D2", +"b c #878784848181", +"n c #A8A8A8A8A8A8", +"m c #646464646464", +"M c #6D6D6D6D6D6D", +"N c #303030303030", +"B c #292929292929", +"V c #262626262626", +"C c #7A7A7A7A7A7A", +"Z c #7F7F7F7F7F7F", +"A c #4C4C4C4C4C4C", +"S c #1E1E1E1E1E1E", +"D c #AEAEAEAEAEAE", +"F c #FFFF00000000", +"L c #FFFF77777777", +"G c #989898989898", +"H c #2D2D2D2D2D2D", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" .Xo. ", +" O+@# ", +" $%& ", +" *=-#;+ ", +" :+>,+<+* ", +" 12$ .>++3; ", +" 4,5 *,+++++6 ", +" &7 8+6o++++90 ", +" .q. we rty+9%u ", +" i +$ 8+p3+a ", +" .0 2# wsd<+d ", +" +* f+oog+* ", +" df #hjklq+o ", +" u++O k+oi ", +" z++8 *+%t ", +" x++20 d<+c ", +" X+vXibb7+6 ", +" 4+1oybbb4ys$ ", +" &X gnbbb.z+a il ", +" 8+ibzmbbbbf3-. $++M ", +" l+Nb41#$bbb8+@B chMjB V7V ", +" 9CbbmfxVbbbNwhM 8h Zz 2++A ", +" ewbb.a5Blbbb.e+yB a 5+i e+dn+N ", +" A90bbbflbbbbbbt@+nS sa l+1 yg ", +" i,rbbbl5bbbbbbbbm2+oi *g 5d. M+$ 53t ", +" sqbbbbbbbbbSbbbbbZh+ai 49i .0az++N Dw 00 dhV ", +" 12bbbbbbbbbbbbbbbbB:+2-dl if&e$V+xlZ@2++wx i#umayh&3hwX&5 ", +" x+.bbbbbbbbbbbbbbbbbro@++,Dpxn+++++&+++++++hB NNM1Zsww+++++++++q1&hk ", +" i9Abbbbbbbbbbbbbbbbbbbb.x19+++&FVSX+++++jy++@7f8AAAA40000i 00000000000000000048cn2++++++2O:ao+++32+3 u+r ", +" @Gbbbbbbbbbbbbbbbi0ibbbbbl,+FFLLFB++++6F$+9+++++++++93hh2yg@@h3hhhh92h9hh9h999h+++9DCaCz@m $>3@cuS$f+8 y6 ", +" z=bbbbbbbbbbbbbbbbb#b#bbbb2%FFLLFo+-h%FFFF#%%NHNS5rxxuk1kO&GD-A1111;Hmakk1=k&ekxN0 #V5#$l iz+=H .h.sX k, ", +" q@bbbbbbbbbbbbbbbbbbbib#SO++FFFF%+@l9,FLLFS+= l #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb#$S V. C3@t M+8Ds 8+5", +" a3.bbbbbbbbbbbbbbbbbbbbbc+o++vgh+,. m+@Vbbbbbbbbbbbbbbbbbbbbbbbbbbbb.c+Z Zs ", +" B+lbbbbbbbbbbbbbbbbVZ@+D<+G. f<-f $,k<. x3+*bbbbbbbbbbbbbbbbbbbbbbbbbixO34 Zk ", +" 83.bbbbbbbbbbbbbbbNh+h+++++@Hd@-f $%Dz N2+cbbbbbbbbbbbbbbbbbbbbbbb.Aj%N ", +" a,bb#.bbbbbbbbbbb03+7 l*+++%mq-f 4w>f l3+rbbbbbbbbbbbbbbbbbbbbbbBXh ", +" D:bbNbbbbbbbbbbbb8+c =++h=oga t++H d+Obbbbbbbbbbbbbbbbbbbbb0424 ", +" wmbbp$l.bbbbbbbbbd+. lG,fpaw* f++ 9sbbbbbbbbbbbbbbbbbbbb#0g= ", +" 5+Hbc++++gm#bbbbbb=3 CtS V6h+vdlbgD &M+ f+> p+abbbbbbbbbbbbbbbbbbbb5+5 ", +" Z++z 7,+%bw: OGy :+g j%.bbbbbbbbbbbbbbbbb#Vbcj ", +" 1+9B C+X3& -nq O+g 6+7.###bbbbbbbbbbbbbbx.bv* ", +" >+e ;++3 G@Z X+6 iuD++23333%OC8.bbbbbbbbblbA2. ", +" B++5 7+3 23d O+m $2+++hvD68t*eD<++3 r+v X+N 7+Mbbbwk ", +" C+B m+o ,+V O+*b#+$ ", +" 0+D q+f +90 $9%ba3 ", +" g+4 6+$ t+@ M+Npv ", +" d+yi g%. e++$ .,:&q ", +" t++C S+D 8+si C++7 ", +" =<* 4# N++B ", +" ++B ", +" ++V ", +" ++f ", +" v+; ", +" ix ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/pixmaps/bat-3.xpm b/pixmaps/bat-3.xpm new file mode 100644 index 00000000..ec071e2c --- /dev/null +++ b/pixmaps/bat-3.xpm @@ -0,0 +1,165 @@ +/* XPM */ +static char * bat3[] = { +"147 108 54 1", +" c #010101010101", +". c #1C1C1C1C1C1C", +"X c #A7A7A7A7A7A7", +"o c #FFFFFFFFFFFF", +"O c #9A9A9A9A9A9A", +"+ c #DDDDDDDDDDDD", +"@ c #D3D3D3D3D3D3", +"# c #3F3F3F3F3F3F", +"$ c #F5F5F5F5F5F5", +"% c #BABABABABABA", +"& c #9E9E9E9E9E9E", +"* c #EDEDEDEDEDED", +"= c #121212121212", +"- c #4E4E4E4E4E4E", +"; c #919191919191", +": c #5D5D5D5D5D5D", +"> c #F2F2F2F2F2F2", +", c #797979797979", +"< c #C4C4C4C4C4C4", +"1 c #767676767676", +"2 c #0E0E0E0E0E0E", +"3 c #2A2A2A2A2A2A", +"4 c #888888888888", +"5 c #2E2E2E2E2E2E", +"6 c #434343434343", +"7 c #969696969696", +"8 c #B2B2B2B2B2B2", +"9 c #050505050505", +"0 c #ACACACACACAC", +"q c #272727272727", +"w c #D9D9D9D9D9D9", +"e c #6B6B6B6B6B6B", +"r c #474747474747", +"t c #090909090909", +"y c #8F8F8F8F8F8F", +"u c #373737373737", +"i c #646464646464", +"p c #BEBEBEBEBEBE", +"a c #575757575757", +"s c #CECECECECECE", +"d c #323232323232", +"f c #181818181818", +"g c #7E7E7E7E7E7E", +"h c #818181818181", +"j c #CACACACACACA", +"k c #E1E1E1E1E1E1", +"l c #5A5A5A5A5A5A", +"z c #494949494949", +"x c #A3A3A3A3A3A3", +"c c #3A3A3A3A3A3A", +"v c #878784848181", +"b c #707070707070", +"n c #FFFF00000000", +"L c #FFFF77777777", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" .XoO ", +" .+@#. ", +" $% ", +" &*= ", +" -o; ", +" ;o$. ", +" .:+o># .,<12 ", +" 3oO 4*o5 6$@7o4 ", +" 8<3 4o,9*0 .q ", +" 9wo*3 &ooo3 ", +" Ooe 1ooq ret ", +" qooy uooq oo< ", +" tiwop1asooq deoq ", +" i0***ood toa ", +" .oo1 foa 3 ", +" 9+o7 qop .o@k .= ", +" i ", +" 8oaox 3*= 8vs0 ", +" 1wrOoc 2s-v97v,> ", +" %O1v%@ &Ovvf1vuo= ", +" @Xxv3oX ,%vvvu4vv>g ", +" wh8vvao89 i@2vvvi;vvhk9 ", +" o-&vvvbop2 akfvvvv74vvqod ", +" ofc#vvvuoj. 5*zvvvvv%1vvvk4 ", +" .>9t-vvvv3+$a t d*#vvvvvcOOvvve>9 ", +" ab ", +" &;vva2v9vvv94opq 9u %c 3*-vvvvvvv*z.yvvv4ot ", +" k6tda2vf9vvvvi>o7f .+$s4, -*6vvvvvvvc>qv;3vv=kx ", +" .ovvvu.vvvvvvvvq%o*i td=7$< b*6vvvvvvvv4;tv-yvvvao: ", +" bwvvvu3vvvvvvvvvvu+o%q Oo hkcvvvvvvvv9Xevvv8qvvv;oq ", +" wiv=tuuvv=qvvvvvvv9,$o&. to- .xf =08=vvvvvvvvv#11vvv.gvvvv<+ ", +" rk9vvv.lvvvv9vvvvvvvvf@o$19 X0 f:jo# .sgvvvvvvvvvvvbdavvvv;avvvqoX ", +" j4vvvv9cvvv9uvvvvvvvvvvz@o+c 4*9 5qvva2vvc2vvvv=.vvvvvvvvvvvvco@8ooooooon4o0 .&o,vvvvvvvvvvvvvv-; 7vvvvvvvvu;fvvv1o0 ", +" 1%vvtcvvvqqvvvvvv.vvv.lxXXi6qwknnnf%ooonn &o,01=vvvvvvvvvvvvvvvO. ;vvvvvvvvv:%avvvc$sf ", +" =@qvtivvvvf6vvvvvvz.v2*oooooo*oonLLn,nLLnn 8*2vvvvvvvvvvvvvvvvvfOv=bvvvvvvvvvv.$nLLn%nLLnn wooa :$#*t ol+z 3o@vvvvvvvv0qvvvv;9vvvvvvvvvvvvvvvv=zO<*ooooooo4 ", +" 0*6h%ok%uvvvvvvv-9aol ioo@ :*q*t o5*r iozvvvvvvz,vvvvvivvvvvvvvvvvvvv9r :o-vvvv,,vvvvvdlvvvvvvvvvvvb**hf zq ", +" 1+d qk+uvvv6-*2 e;48 *3o to,vvv=X9vvvvv:avvvvvvvvv6+o7 ", +" . fj>dvv#O@ 1yyi *5+ wv.1vvvvvvv9Ovvvvvbog ", +" rou*. 8s@ #*+c @f dor63vt2vvvvvg.vveor ", +" goe oob 7o@ Oo*ooooo;vvvvb9v3o, ", +" to& ooc 7o7 :*y...q;o9 ", +" col co+ wod &o.v9coc ", +" tow uoj wo3 =ohvv@& ", +" +o. #o; +*9 X>tdoq ", +" 4oh @O +*t qo5x% ", +" #o* x>c ", +" q$oq zq a6 0o* ", +" %oi &o0 ", +" -o8 &o- ", +" kk9 xo. ", +" bo; js ", +" .oo6 oX ", +" *8 qob ", +" *4 aor ", +" 0ou #oz ", +" Xou doz ", +" 5b .oi ", +" g4 ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/pixmaps/bat-4.xpm b/pixmaps/bat-4.xpm new file mode 100644 index 00000000..8e701cf1 --- /dev/null +++ b/pixmaps/bat-4.xpm @@ -0,0 +1,165 @@ +/* XPM */ +static char * bat4[] = { +"147 108 54 1", +" c #010101010101", +". c #AEAEAEAEAEAE", +"X c #292929292929", +"o c #7A7A7A7A7A7A", +"O c #FFFFFFFFFFFF", +"+ c #0C0C0C0C0C0C", +"@ c #646464646464", +"# c #737373737373", +"$ c #C8C8C8C8C8C8", +"% c #C4C4C4C4C4C4", +"& c #101010101010", +"* c #9D9D9D9D9D9D", +"= c #E4E4E4E4E4E4", +"- c #F2F2F2F2F2F2", +"; c #A3A3A3A3A3A3", +": c #909090909090", +"> c #D7D7D7D7D7D7", +", c #DADADADADADA", +"< c #171717171717", +"1 c #3D3D3D3D3D3D", +"2 c #989898989898", +"3 c #8B8B8B8B8B8B", +"4 c #A9A9A9A9A9A9", +"5 c #202020202020", +"6 c #A6A6A6A6A6A6", +"7 c #5F5F5F5F5F5F", +"8 c #868686868686", +"9 c #E9E9E9E9E9E9", +"0 c #DFDFDFDFDFDF", +"q c #CFCFCFCFCFCF", +"w c #060606060606", +"e c #D2D2D2D2D2D2", +"r c #575757575757", +"t c #252525252525", +"y c #B1B1B1B1B1B1", +"u c #4C4C4C4C4C4C", +"i c #484848484848", +"p c #B5B5B5B5B5B5", +"a c #434343434343", +"s c #1B1B1B1B1B1B", +"d c #6E6E6E6E6E6E", +"f c #878784848181", +"g c #2D2D2D2D2D2D", +"h c #BCBCBCBCBCBC", +"j c #7E7E7E7E7E7E", +"k c #5B5B5B5B5B5B", +"l c #313131313131", +"z c #6B6B6B6B6B6B", +"x c #525252525252", +"c c #F0F0F0F0F0F0", +"v c #FFFF00000000", +"L c #FFFF77777777", +"b c #F8F8F8F8F8F8", +"n c #383838383838", +" .X ", +" oO+ ", +" @O#@$%@& ", +" *O=-;:>,X ", +" <1o234OO5 #6 ", +" +7>OOOOOOOO ", +" 890.OOO=$qOO*w ", +" 1eOrt,Oyu 1;Oi ", +" X,Op tO=1 & q3 ", +" 8O4Xa&>=& se>5 e8 ", +" dO@fXaq=< 1-q q8 ", +" 5O:ffuoOg O1 9o ", +" e;ffi:Oo oqhO# O1 ", +" rO&ffj9q pOOOOp9s ", +" 5Ouffi6-X w2OOOOOOO91 ", +" h>ffwu9: uO31-OOOOO-a ", +" oO1ffk:OX 2- 1O75k-OOOo ", +" +O@ffl@qy p* @- &99:O2w ", +" 8=ff&t1O1 #4 d$ X=q6O%& ", +" aO1ffs .o5= 598w,Ok ", +" 1O5fw1 &Od lOw=l iO <6Oy< ", +" 5-kff&& h=+ 1 d8 +-aff1-O4X ", +" q;ffs&fsOo wt :hfffsjOO.X ", +" yqwffXwfoOl 5O-OO9>2ag ", +" tOoff+5ffffoOs oOffff&+ffffffff&rk2qOOOeyz5& ", +" g98ffwiwffff:O sOafffwffffffffffffff5a#*0OOOe3g ", +" t-:fffa5fffffhq %.ffffffffffffffffffffffffi8$-O9;i& ", +" X-7fff+sffffffO; :9fffffffff6fffl111pffaffffffffffuO1 ", +" qO$d1+ 16O2ffffffffffff+O1 1s 5Ouf&uffffffffff:-w ", +" & xO.ffffffffffff$y jOOa 2O+f&xffffffffff,* ", +" #Oxfffffffffff89w pko, 1Okff57fffffffff&O@ ", +" :O&ffffffffff1Ou &O& *d $$fff1lfffffffff&O5 ", +" 98fffffffffffq, $# 5$O2@OXfffutffffffwwfkO& ", +" o9fffffff5fffaOx @h o-O-uO:ffffr&ffffff+tf@O& ", +" 5O1ffffffsffff2Oa 51 l9 5,OO4l,=+ffff8&fffffffwf@O& ", +" ,2ffffffsfffffpOX aOO98O;OOOq&%OsfffffjffffffffffxOs ", +" @-ffffffwffffff9>+t9=@=OOOOOO9=O7ffffff7ffldyh;@5fiOx ", +" sO@ffffffffffffiO-99v&&=OOOqOOOg x:e*ok:&:OOO90OOhiO8 ", +" ;,fffffffffffffs8OvvvvjOOvvadO%>O=h-OOOOOh1 a2OOO,w ", +" 1O&fffflwfffffff1-vLLv;OvLLv O-:l +l,OO8 1,OO1 ", +" 9@ffff5ffffffff1-vLLvOvvLLvdOx :O=w +yO2 ", +" :effff&wfw@%Opf -vvvvhvvvvvO; w:i >Ou ", +" 7O89+ ", +" aO8 pO5 ey9w ", +" aO8 #Ot 4O0+ ", +" 1O3 kO1 oO=+ ", +" @O-& 7Od #O9& ", +" dO- gOd XOO< ", +" 1u 7O: &Ob& ", +" X,@ w0-+ ", +" 1# ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/pixmaps/cal_hob.xpm b/pixmaps/cal_hob.xpm new file mode 100644 index 00000000..e42900a7 --- /dev/null +++ b/pixmaps/cal_hob.xpm @@ -0,0 +1,159 @@ +/* XPM */ +static char * cal_hob[] = { +"390 102 54 1", +" c #000000000000", +". c #FFFFCCCCCCCC", +"X c #CCCCCCCC6666", +"o c #A7A764640202", +"O c #666666660000", +"+ c #808080800000", +"@ c #CCCC99996666", +"# c #999999996767", +"$ c #2A2A66660101", +"% c #666673735959", +"& c #1B1B82825858", +"* c #2F2F99996B6B", +"= c #666633330000", +"- c #CCCCCCCC9999", +"; c #FFFFFFFF9999", +": c #000055550000", +"> c #3A3AAFAF8989", +", c #99999999CCCC", +"< c #9999CCCCFFFF", +"1 c #666699996666", +"2 c #5F5F66665F5F", +"3 c #AAAAAAAAAAAA", +"4 c #CCCC9999CCCC", +"5 c #CCCCCCCCCCCC", +"6 c #808086868C8C", +"7 c #C0C0C0C0C0C0", +"8 c #FFFFCCCC9999", +"9 c #555555555555", +"0 c #333333330000", +"q c #8787CCCC9999", +"w c #999999999999", +"e c #FFFFCCCCFFFF", +"r c #FFFFFFFF6666", +"t c #FFFFCCCC0000", +"y c #FFFFCCCC6666", +"u c #CCCCFFFF6262", +"i c #333333333333", +"p c #9999CCCCCCCC", +"a c #CCCCCCCC0000", +"s c #CCCCCCCCFFFF", +"d c #CDCD8B8B1D1D", +"f c #999999990000", +"g c #CCCCFFFF9999", +"h c #FFFFCCCC3333", +"j c #080826260000", +"k c #595900000000", +"l c #CCCCCCCC3333", +"z c #9E9E73735555", +"x c #B7B71E1E0C0C", +"c c #FFFFFFFF2222", +"v c #7474B0B03333", +"b c #CCCC9999FFFF", +"n c #9999CCCC4949", +"m c #CCCCFFFFCCCC", +" . . ", +" XoOO+ ", +" @X@#@ Xo$%&*%=- ", +" ;O:O:O- o$>*>>,&:. ", +" @O><,$@ O><>1>>2OX ", +" XO&>>O3 O,><><>&O4 ", +" 5:6>>>>>%= ", +" 8O&<&97 o0>>q>1:we rtyuyyX ", +" 5&ip>%@ w20O&O:1e aat; +$:=::O8 ", +" 8O*<>:5 -%=i96s aOO:d +O>>2$Op ", +" s%:<,O@ es3s 3%>O- O:<>>9:8 ;afadafaagh ;; ;;Xafff ", +" OO>>05 ;j>Ow O2>>p:%s ;;; X=$$$O$:Ok:O0:O$0O:O$OX ", +" %:<>O5 3$>OX O&>><>><>>>>&>2*&>>><>iX ", +" O9>6:s 8:,$6 OO<,>0Oe rr;;;;r aO&*:O a:$OO+ X:,>>>>

>,>>>>>>>>>&z ", +" . 8y; e$2>>%- pO>$d O0>>>OO aO0:Ojj; O&<>Od -O%>>$f 790:O>>,::=:$=:O&%&6>O- ", +" . .tf+=OOxoX ;rru; +$<&Oe clX; 8:>&6 o&>p>02 fO:>&%:w ;k>>,:3 ;:>>,:z @39&<>>O26666z9Oi2:Oiw ", +" yf:=O::O:Of X+O:=$y $&>6: ; ; a$O$+X qO>$@ $=><>Oo O0>,>>= vO><*$. 7O2>>OX ,=>>>k3 ses,&8 ", +" 8dOjO9>>,<>>OO. ruh; +::O0:+ O&<$O ;a++fffl ldXXt fO&*:+ a$>2w +:,>>04 O0><,:Oe a0>p&:s Oi<>$O #9<>6ib . ", +" .z=O&&<><>>><:O ;XfOk::$:0&>>&Oo 5O&>2$ X:O:O:OO ;oo0OOOO O:>pOf #:<2f O9>>1O 50O<>>OO O&p>%O O&><9O 5:>>>$@ ", +" d:O&><>>>><>p>%:5 a+O$::=:O0$*<>60% 8:*>&9 raaX fO:2&$:% oOj&&0:Os ;0&<>:O ;rl lO>&6 OO>>&Os +:<>>:% o&>p:2 OO>>&O -=><>:, ", +" d:O$>>>>>,>*>$9:=- aO::>>>>,>>i>><>=O 7:1>OO -aO:O+ O&>><,0@ O:>q<>=O 5$2>>O+ aOO+ ;r; 60>&d Oi>>2$. O*>>>O@ ;;lac OO>>:d 6i><6:8 s:>>>O@ ", +" t=:*>>>>>$$:=0ii99s aO&>>>>,>><>p<>>>O=5 -O*>O= a+:&>>:+ +>>>>:9, ;=O>,>,:O O&<3:O- ; ;r;; f:$O f:+a ;rXvi>1& +9<>$O7 ;j&<>>:3 XO::0:+aX O&>,$6 X:><&O6 8$><>:, ", +" @0*1>p>&%ii66w3573 X$*p>>&9%:i$&*p>>3:2. -$>>%$ O$>p>p$+ X$p1<*i# %0p>>>0% 0*>>,i+ Xf+O+f ;#Ovi&:+X O*,&OX- $910qXO+&9&%$>*O +ip>$=5 7$*,p*07 #v%***6&&%O$fX O2>p:4 5O3>>:z O>>*Oz ;#nz++vvzffX ", +" e$&<>>>9i%%e e f01>>&O9=67s69i>>>>>>Of +$<>*&: 69>>>>%O @+>>>>>O+ +&>,:O X+:p<*>>6Ol O&>>&$:Oa XO>&07$6&:0:&><1O O$,>i:8 p=><>&0 X>><>p>>><>>>:Oku e:&>>O5 5j>><%+ eO&>,:3 Xf0+&>>&9&>&$0;", +" iX9>>>>&$9w +$<>>O0,e e 5O>><>:O5 8:6<>0s +O0<>>:O X&>,>=9s fO>p>,:3 m=>>>>>$Of f>>>OOe +:>>1*2>>:O Oi>O:6>:O+O:,$6vi>:=9i9&>>Oe +:<>6:3 XO*<>2: O,>><>>6>>>><>&$=X O:<>O7 O&<>&O O&<>O6 ;+O:*><<>>>>,>*:v", +" sO%>>>>iOw e X$>>>9:4 *>>>>2j8 s%&>>%- s9Oj>>>OX O>>>6$z 6=&>>>:@ @O>>>,>>0OX $>3>O# 5$6>6i%:>>2OX 2&,&ii$,i:9:>0s%*$Ob s9=>>O O:><&=X -:>,>&O. m$<><>>6$:%:<,><&0O; %9>,O- O&><>Ov; :i<>Oo O:>>p><><6>>>>6:.", +" nO&>,>:9,e +$>>1:, $<<>>&$s :>>>: 5O=><>:O +,<>$9s d$*><$9s -O>>w:&>&:O- O><>$s a:>6:ssO9<>=6 fO>O9ii&>&i9&9sO&O6 e7:*6$ OO>p&:3 d:6>>29 d&>>>1$$9Oj9:>>><$:= :2<&Os OO><>j%0+f- O&<>j2 8 8 8 88adfff +$>>>><>>&>O>%&$O3", +" +9p>>&O#s -O><,&Os %>>>>&:. 5O&>6:8 w:&&<6:8 O>>>=O 3iO>>%$. w$>p,:i>>20O -:<*&= :O>:Oe 6$><:+ 70>&0sw9:>>>22 :90O 5%&>O- 8XO0>>>=+Xy; ;; ; ; 1O>><$O -:1>,$%2 sbw9O&1<>>$. 2j>><&99::++; XlO0&><&=O$=$O$=O:$$$O:y nO>>><>2:O:OiO&i=O-", +" #$>>>>O6 a$>>>2Os O><><*Os 8:,>>O3 zO*>>O$ r:>,&&4 l:*<>:O7 X%>>>Oi9><$0O- 8:>p$&e r=&606 3:6>i9s3O>&2 5%=>>$3 z:>OO5-+06>=w +:009<>>0i:$O++OOO+++fo+O00>>>O9 fO>6:4 e sOO&>>>>OO 8:*<$O +O>>><>>>6::0f O0&>><>&&&>>>>>>>>>>>&i3bss s es5 ", +" 12&p>%:e +2>p>&O %>>><&=- 5O>,>i@ s9:><$0 +&>>2O w92>>O:. +&>>>09:,><>:O; q&>>:v @:&>i+w5w2i>6:.7:>6Os e,=&9w 59&>iO$:6&&Of O*>>>>>>*>*>>&>>>&&&&$&$:0:><>&o -O:3&2 s9:>>><$:8 pO&>&O# O0>><><>>>>>$Of 0O>><>>>><><><>>>>>>>1:. -O>><>&Ose ", +"-O>>>1:3 f$<>p:6e $>>>>>O7 XO&>6i5 di*>>$O v6>v:< XO*p>9%< v2<>62sOO>>>1:O- l&<>2, 0:,>0O:O&>>:%7#O&>Os 54%s %O9**>>>=:0O- $<,<>>,>>><>>,>>><><>><><>>>>p0w a0>>Os 3O&<>>603 lk>>&0%0f OO>>>,:6*>>>>$Of 0:O&><>p>&6&6:>2$&O$ijO1 a0><>>$4 ", +"3O>,>&=7 . +&><>=v %>>,>6:d $*><2- s92&2:. 7:&*<&$. O>>,*6 e9:>p>60O #>*,O z9:>>*>*<>990#7090= s ,9&i$909=9kX &6>><><>>p>,&>>>p>6$26&6*&<,>>:@ O$>3$. s9i><>>O+ 6$>>>>*$O0Or 60>>>>Oj$%>>>>0OX O9=:&>>O:90O:i%i9%92w,O- O&>>>OO ", +"+:,>p$9s oO<>>$w +>><>6:, 8O>>>:5 X09>>:- ;=>,$9s X=&p>2:5 O><>O, wOi><>&O: d&>*Oe OO=&>>>$$:i9w5z22we s3z26ss%6se o$O:$<>p&:O:O0:Oj:00:iOj0O&>>p=, ;=i<&6 8$*><>>:% +O><><>>>$:=f d:>>>29b2$&,<>&=w 54p=*>>:=<,*:4 ", +"%O>>,OO 6:>>>9+ 9>>><>0d s&2>p*@ e2&>>Oo 7O>>O+ 99>>&:8 O&>>& e2i1>>>&O+8 1*6*O s6i9jO0i96435 e e %i09i><6:909i9i9222,w36,90>><$:. w:*>*z sO&<>>><><>>>>$:y p=&<>>2 6O&>>>$$ e92>>9z #O>>>&=- ", +"1:><>j2e .#%>>>=9e v><>>>O9 O&<>:3 -O&>2O XO>>:3 8$i>>1O, ;0,>>9s s+:6>>,&0:@ f><1: 22i96s e 55,O&>>$9,ssessse e 69><>&O7 lO>>&, -O*<>>>i9 O2><>6>>>>>>%: @$>>>>%e 6:>>>6:7 :&<>=6 -O>>,$i2 ", +"2%,>>9+ 7&O>>O: 9,>,>>9O. O&>>&@ O:>>=f 3:<2id s9:p<&0- 5O>>,&. s20>>><&O$+ O>>6O esse e =:>>2=7 3:>p>&O3 #=>>v@ w0>>p><2O O&<>6$$:>>><>Od sO>,>>O sO&>>>0# 9&>,$o 7:>><>9:f ", +"v$><>O6 -O9><:O7 +&O>>p$9s O%>>21 @O&>:Oef2>*9, +O>>6:3 ;0>><% -O=&<>>>:OO0,<*9 :9>,&O4 @O>>>6js fO>>i%e +2>>>p>$Oe 7O*><:09=:O>>>:Oe 8:&>6>$s O9>>>O% O&>>:2e XO>>>>*2i# ", +"O:<>,07 e9:>>2:+. &&i>>>&$. 2:p>># s&=>6:56$>OO 2i>>>=- 7:><>% s6=:&<><9jO>>6O %:,>&Ow si>><*O- +:6>>O$8 -$<6>>>>9: O&>>925<60O>>&OX O2>>>O5 4O&<>>Oe 9:<>9O 7O>,<><>&O+8 ", +"O%><*%s +O*<>=&w 8nO9>>>>26 @:*>O3+*,:4 +Op>>O6 y:>>># e1O:&><>&0*<&% O9>>6:5 XO>>>103 oO&<>:O:fX8 ;d:><>>p>>:b -O>>>0, w:O>,$2 oi<>>=5 O&><>2 +9>><><>O:+X ", +"OO>>1O- 59$>>*O:+v@do:=*>>><>&=X 2:><>1 s99>=1O>>Ow zj>>,:d 12>>6# s901>><6i>&o 6O><>O@ s:>>>>%@ 79:>>>*iO=:+O=:6>><>><$z :6>>=7 e6i$>iO 3&&<>$@ 9i>>>$ 6:<>:o 6iO>><>3>9::t ", +"O:>>6is .$:,<>*$:O::O&>>>>>>,>O3 O2<>>z +O>>=i<1Os f=$::=9 l&<>&6 ev0O>><>>1w +0>>,:, lO><>>03 .$O>p><>>&2&&>>>,<>><$2s XO>>&O4 7:9>>O3 fO>>>O6 5O*>>>% #9><%9 .$:O>>>><>9O: ", +"%$,>&$. 69$&<><,>>>>>><,0@ 2$>>>% &%>&9>&=- s2w343 O&><%# e3O:>>><*o 2:6>>O@ 70>>>>%o 60:>>>>>>>><,>>>>><6j s9=>>:@ 3=>>,:+ 7:>>>>>$. s6i0O&>>><:OX ", +"+O>>%:s 5OO:>>><><>>>>&O&><>&9, O9<>># OO>&>>&%s +&<>$w 7=:,>>627 f=>>pj6 X=>>><:%e O=&*>,><>>>>>><>>%&9 f9>>O9s +:>>$2 @$>>>O9 +O><>&% #9><$%s s699&>>>>0O. ", +"1=&>*03 3=9:%&**2>&1&99i>>>309 %:p>>O 5$&*>1&O3 e 0&>p03 e3z0*p>i$# vi*p6*Oe -90&%&9:5 s609***>p>,q6*&299w #i>p09 #0&p10 30*p>9O55#:>>>pq% 5=>>w0- s79:,>p1$O ", +"5:&&,0+ . . . s29i=:Oii0&i66i$O&&00a 1%>>>% wi1>>2:@ -O&>>9- 39:>&OO. w$,>>9i 2&9290O@ ,99:jO:O::$i=26e 6O>>OO wi2>>=- 5$6>>6jOO$>>><*>1 70>>,:# ;yh 7i2>>>&Od ", +".:O>>9&s e#&i909i99ss@$ii9:996 f2>6<$e @$p><$9s 8:*>>$3 e$O&92s d:><>&Os e ess56s w9990909996,s fi<>:6 +O>>>$s .:&>p>=i&>>>,>>03 O&,>OOzfodOo=O0$$ wO&>>>i2 ", +" z:&>&O+. eXd. s4629263e 7%96262we 6$&<>%5 s9*>>&O@ qO>>>O- 4&0we 6O>>>2:. s5s4,w e 6%>,%o O:>>,:. $=><>&>>>>><>&i3 O&>>iii:O$%&&%&>=m 9O>><&O8 ", +" 7O&>>:O%5 8X+=$3 e es e dO>>>$s O2>>Ois XOO&2:4 #3 lj>>>>O7 +&>>96 .+0*<>>Os O:,<<>>>>6>:&O9 O9>>>*>>><<>>>>3&@ e19>>>2:7 ", +" 2%*<60O:+d88 8 88y@oO==:Of 5i>>>= 2$9::%@ 7:90O: 6:6><>=- O&<>OO 8#+:$<>>*z 6i>>>>><6&9:92e 6&><><>

>>>>><$X 3:><>&:8 ", +" wO*>>>i9:::OkOkO:=O:O&>,06 d2>>pis -66226 e5w6s X=*>>>O4 .:>>,:OO+:O&>>>>1:s fO>>>O&$:O02, +O>&6:&$:=$O0O:O$O +2>>>OOs ", +" e2$<>><>6i0O:=::=::9>>>>:o 5$&,>$y e #:>><>O- O6><&i&&&><>>>,&z p=>>>$$=%w,e %9ii:=9:9i99i9=:io ;; O*p>>2O ", +" 5O:>>>>>>>>,&&6>>>>><3>=& d$O:992 5O&<>>O6 8:><>>>><>>><>>&2s 8:O>6$96s +962626,4s34s7,363 rO=od- ;+:>>>>:w ", +" 6O&9>>>p>>>>>>>>>>>>><&Oe $9i9ii= 3=>>>>Oo 7:,>>>,>>6>>>>OO5 s9j=&i=7 e e e fO:O$:oOOi&><<:O. ", +" 5O:9&>>>>6>>>>>>>,>>>>$$ v2w3w16e 8::6>>:O. lO><>O$:=&%O$96s o9664pe -O&>$O:O9<>>>1Os ", +" esz9:O>>>>>>,>><,>>>><9O e pO=:00O=- w:>>6i23626#se e #:,>>>>>>>>>$=5 ", +" s@Oj:O&&>><>>>>>>>*:O0s #4,4,,3e dO>>&9e -O&>>,>6>$O02s ", +" s69ijO:$$&i$$$=:0O9@ 6iO=:% sOO:=:Oj0265 ", +" s@909=:9i909i2ws 36696 w62226,e ", +" es4w66w747sse e e e ", +" ", +" . ", +" ", +" ", +" ", +" ", +" ", +" ;l ", +" X+8 ", +" XOp ", +" nO- u; ;;; ; ; ", +" -O7 ; r djf+++++++fofoofoOodyay ;rr ", +" 7=-58 -O -f ;f 8OOO::=O:O$0O0O$=::=::O:o; f00f ", +" 0OO:f#O #+- ;0 -$OO=:O0O00:=:0=:=O0:22O:o oOO:Ov r; ", +" :=:OOOOs#:8 X= Owi9=0i=i==jO=:=OkO=s 3OO +O#s7O+ :a ", +" =:6sO:O v=, .:v5 5O32i9,6i66690,4,s70Oe #O d$3e e#OO5 r ++ ", +" sOOs s=OszOX OOOf O6O907sOw#32Os 6O sO -:+e s0Oa ++ +f ", +" +=s v07+03 =OO3 OO00967=6w,6Oe #Oe O7vOs 7O0O7 OO@ fO ", +" OO 6Ow2O3 :=:z 9ii2iz O6w66O5 3O O7Oz 5O2OO7O:+ wo ", +" fOe +:O60w OO=2 O=&,O2sO233wO -=s +#O, l0s7O+=OO 3O5 ", +" w:- 9=90Of %iiO 99:42O7=6367O7 5:. O:=7 #+se%%:0:@ 5$. ", +" fOs X:990i6 OOiis O09s#:3O63670 -O X=O04 +O wO=906e On ", +" #O3X:6e,iO# %09=Xs90O 4%20%76w=O#ffX7O5 O369$++v O% i&=:O $d ", +" f=O0, 60w .v0692 O=&5p=:=93O:9=%O2w5O75+6 ep62%oO#O6 ev=9iO3 O2 ", +" 30zs 39% +0sw=7%i=9%999=3%7$7s 00%7e s#O06 Oi9,01ew+ ", +" e 0O ,O5 %O2i$e s90O3O5O3 =+jOf 20O :2$e6$@7= ", +" 5O9e -=s #OOi2 O=i395Op .Oi9:OO d #=:4 vO02 5O:#O# ", +" OO $. s909$e w99w270@ 2%s99:+$@ 5i9Ov$=9Os 9%:=- ", +" OO .$ O9=9 5=O69706-X@-nO6e 6Oi%2 fO09O069O5 5=9:w ", +" %: O7 599:. 9i%Ow9O00O:=O% 499$d 2k2992s6=o 6i=d ", +" +O Ow e#O6 +96969029&22i, 6Oi%wXO:6ses +92e %i2 ", +" 30- Ov s 66Osess e 7e s69O0Owe s92 sOO ", +" #Os 73s s 364 e #O ", +" : e 7O ", +" -O ", +" 5o ", +" -% ", +" 5O ", +" -O ", +" 5O- ", +" X03 ", +" 7%3 ", +" s "}; diff --git a/pixmaps/calvin.xpm b/pixmaps/calvin.xpm new file mode 100644 index 00000000..4d4815ef --- /dev/null +++ b/pixmaps/calvin.xpm @@ -0,0 +1,387 @@ +/* XPM */ +static char * calvin[] = { +"127 208 176 2", +" c #000000000000", +". c #F6F6F2F2EEEE", +"X c #F2F2F2F2EEEE", +"o c #F2F2F2F2EAEA", +"O c #E6E6E6E6DEDE", +"+ c #C2C2CECEBABA", +"@ c #8989B6B6B2B2", +"# c #A5A5B6B6AAAA", +"$ c #E6E6E6E6E2E2", +"% c #EAEAEEEEE6E6", +"& c #F6F6F6F6F2F2", +"* c #4C4C75756969", +"= c #48485D5D6161", +"- c #40405D5D5959", +"; c #61618D8D9191", +": c #75758D8D7D7D", +"> c #7D7DA1A19595", +", c #BEBEDADACACA", +"< c #F2F2EEEEEAEA", +"1 c #595959594C4C", +"2 c #959555554C4C", +"3 c #B6B659594848", +"4 c #7D7D44443C3C", +"5 c #484848484848", +"6 c #4C4C55555050", +"7 c #717165655959", +"8 c #C2C279795555", +"9 c #EAEABABA6565", +"0 c #FAFADADA7D7D", +"q c #DEDEA5A56565", +"w c #717150504444", +"e c #4C4C69696161", +"r c #D6D6E2E2CECE", +"t c #D2D2D6D6C2C2", +"y c #F2F2BEBE6969", +"u c #F6F6F2F2F2F2", +"i c #F2F2EEEEE2E2", +"p c #9999A1A18585", +"a c #484855555050", +"s c #C2C289895050", +"d c #F2F2DEDEC6C6", +"f c #F6F6DADAB6B6", +"g c #505048484444", +"h c #BEBEBEBEB6B6", +"j c #CACABABA7171", +"k c #F6F6E6E6BEBE", +"l c #E6E6DADAD2D2", +"z c #F6F6EEEEDEDE", +"x c #E2E2BEBEB6B6", +"c c #616175756969", +"v c #E2E2CECEC6C6", +"b c #595965655959", +"n c #E2E2CECE9191", +"m c #4C4C50504444", +"M c #FAFAE6E69191", +"N c #818175755D5D", +"B c #5D5D50504848", +"V c #F2F2E6E6D2D2", +"C c #F2F2DADAB2B2", +"Z c #C2C2A5A57171", +"A c #F2F2E6E6E2E2", +"S c #959565655555", +"D c #99998D8D6565", +"F c #A1A179794C4C", +"G c #F2F2EAEAEAEA", +"H c #F6F6CECE7171", +"J c #F2F2CECEAEAE", +"K c #717159594848", +"L c #CECE95955959", +"P c #FAFAF2F2CECE", +"I c #EAEADADAAEAE", +"U c #595985856969", +"Y c #F6F6E6E6D2D2", +"T c #BABA69694444", +"R c #DADA85854848", +"E c #EAEAA5A54C4C", +"W c #484844444040", +"Q c #BEBE59593434", +"! c #DADA61614444", +"~ c #F6F6F2F2DEDE", +"^ c #404050504C4C", +"/ c #656548484040", +"( c #484850504444", +") c #D6D659594848", +"_ c #AEAE44444040", +"` c #404048484444", +"' c #F6F6EEEEEAEA", +"] c #FAFAF2F2EAEA", +"[ c #40404C4C4848", +"{ c #E2E285853838", +"} c #EAEAEAEAEAEA", +"| c #F6F6F2F2EAEA", +" . c #F6F6B2B23C3C", +".. c #F6F6BEBE3C3C", +"X. c #E6E6E2E2CECE", +"o. c #DADA6D6D3838", +"O. c #484848484040", +"+. c #4C4C5D5D4C4C", +"@. c #F6F6AAAA3434", +"#. c #959544443C3C", +"$. c #F6F6F6F6EEEE", +"%. c #3C3C3C3C3C3C", +"&. c #DEDE75752C2C", +"*. c #3C3C44443C3C", +"=. c #3C3C44444848", +"-. c #E6E6A1A13838", +";. c #444448483C3C", +":. c #484840403C3C", +">. c #5050A5A5B6B6", +",. c #EEEEA1A13838", +"<. c #404040403C3C", +"1. c #F2F2A1A13434", +"2. c #EAEA79792C2C", +"3. c #757565654444", +"4. c #959555553C3C", +"5. c #F2F299993030", +"6. c #D6D685853434", +"7. c #E2E291913434", +"8. c #C2C234342424", +"9. c #959569694040", +"0. c #F2F2A1A13030", +"q. c #F2F291912C2C", +"w. c #EAEA89892C2C", +"e. c #F6F6AAAA4444", +"r. c #F6F6A5A53838", +"t. c #EAEA81813030", +"y. c #C2C279793838", +"u. c #F2F2A1A13C3C", +"i. c #40403C3C3C3C", +"p. c #3C3C40403C3C", +"a. c #616140403C3C", +"s. c #505040404040", +"d. c #48483C3C3C3C", +"f. c #EAEA95954040", +"g. c #404048483C3C", +"h. c #DADA79794040", +"j. c #3C3C40404848", +"k. c #404038385050", +"l. c #3C3C40404040", +"z. c #444440404848", +"x. c #3C3C38383838", +"c. c #383834343434", +"v. c #303030303030", +"b. c #38383C3C3838", +"n. c #2C2C2C2C2C2C", +"m. c #38383C3C3434", +"M. c #343434343838", +"N. c #343430303030", +"B. c #656538383838", +"V. c #343438383434", +"C. c #34343C3C3C3C", +"Z. c #3C3C34344444", +"A. c #F2F291913838", +"S. c #F2F299993C3C", +"D. c #EEEE91913434", +"F. c #3C3C4C4C4848", +"G. c #999938384040", +"H. c #F2F299993838", +"J. c #2C2C2C2C3434", +"K. c #4C4C38383C3C", +"L. c #818138383C3C", +"P. c #404044443838", +"I. c #C6C644443C3C", +"U. c #AEAE38384040", +"Y. c #C2C230302020", +"T. c #C6C62C2C1C1C", +"R. c #FAFAF2F2EEEE", +"E. c #FAFAF6F6EEEE", +"W. c #FFFFF2F2EEEE", +"Q. c #FFFFF6F6EEEE", +"!. c #FFFFFAFAF2F2", +"~. c #FFFFF6F6F2F2", +"^. c #FAFAF6F6F2F2", +"/. c #FAFAFAFAF2F2", +"(. c #FFFFFAFAEEEE", +"). c #8D8DCECEDADA", +" . X o O + @ # # $ . % % % o X & ", +" X O # * = - = = ; $ O # : * * : > , < X ", +" X % : = 1 2 3 4 5 6 @ < < : 7 3 2 2 1 6 * @ % . ", +" < O : 6 8 9 0 0 q w 6 e r X X o t 7 9 0 0 y q 2 6 e > u ", +" i p a s 0 d d f d 8 g 6 h X t e j k l d z z x g 6 c X ", +" v b 6 n d d d f d x m 6 # < % > 6 M d d k z < v g 5 N < ", +" v 1 B t V k k d f d 6 6 j < t 6 6 C f d d V O > g 6 Z < ", +" l 2 6 # V k k k f f B 5 h A > a S f d f f V + = 1 D M ", +" o x 2 e + f f d d C 6 5 h t = 6 q f f C C # * 6 F M ", +" G x w ; d f f C f B 6 + : 6 S H f J J j a 6 K 0 ", +" G 8 = h J M J f 2 5 n b g L J J J C e 6 S y ", +" x K c n n C k 8 w p a B H J J C n 6 2 0 P ", +" Z K n M C f J 8 2 2 q M f C J p 1 j z < r + , $ o ", +" 2 p I C f f f n H M k k J n b D k A A , @ U = e = = * @ r ", +" Z 1 n J J f f d k d f f J n K Z t h > = a B 2 2 2 K 6 e ; ", +" x 6 j J f C f f Y f f f f f 8 6 = b K T L 9 0 0 0 9 2 6 6 r ", +" o + m e + f C f f Y f M C C f v R R E E 0 M f d f f J q 1 6 # ", +" O @ ; : * = a W K n J C C f k f C J J J J n n M J J J J f f f J n 6 5 p i ", +" O c 7 S 3 2 3 Q ! y 0 J C k C C C J J J J J J J J J J J C f J J J Z 5 5 0 ~ ", +" t U S L y 0 y H J J M J J J C f C C M J M C J f J J J J J f f f k k c 5 S P . ", +" O : 7 H M d f J J J f C J J C f f f f C J J f f f f C J n n n I + p p 5 5 Z < & ", +" X p = L C d f f C f C k f f f C f C f f J C J J J f f C n a e * e = ^ 6 / w n . ", +" o c 7 M C M C J f f f k k f J C f J C f C M J J J C f J D ( 1 2 2 3 R E E y M ", +" 6 Z f f f f C k k k k f f f J J J J J J J J C J f d I 6 W L M M f P z z ~ ", +" 1 : v C C C n n h j p p # h n J M J M J M J f f f I c 5 7 C ", +" X t * a X S 6 p I n p 7 a a a 5 5 a a N # J C M J C J C I I p a 5 j ", +" < Z 6 ( . x B a e - 5 5 K 3 3 ) _ 4 5 5 D C k f C Z c * = = 6 / 2 ", +" X h a 5 b O 8 B 6 / w 3 H M k k J L W ( H f f C J K 6 K 8 8 q 9 H ", +" % c ( W ( t c 6 7 9 y M z < v m ( n f J J I K 1 j k Y P ", +" A 7 ( 5 ` a X X D a 5 D k v B ( # f J J I K 7 C ' X ", +" < Z ( 5 5 5 , X % X h 6 5 j z l 2 g j J J C n g D P . ", +" p ` 5 K g ; $ r , X l K 5 j i A 3 g Z f J J n g Z z ", +" Z ( 6 L 4 6 + o h ; O z D 5 > < x m s J J C j 5 n ] ", +" Z m [ j { m ; } . o p c H M D 5 Z i x m Z C C C Z m I | ", +" % % x 1 m s ./ a @ % : 1 9 ..s 5 j z v m Z f d f Z ( X.< ", +" O c U @ + m 1 E E o.g - @ l b N H ..F O.+ v 1 Z d d d Z 5 d X ", +" < : a [ a # x a +.j y @.#.5 * $. h 6 F ....T g + x m j d d V Z ( X.< ", +" u l b ` %.` - @ v m m E ...&./ ( h . p 6 D ....{ B + X < x 1 j d f d D 5 + $ ", +" A S 5 *.=.*.a > ( ( L . ...Q B * , < c ( F ....-.B h X x 1 n f k f D ` c l ", +" < p ( ;.` 4 :.a >.< ( 5 L .. ...,._ 6 ; $ < 6 m s ......w p v +.n d f C D 5 F ", +" X h [ *.<.D 3 g a + } v m 5 F .. .1. .2.B 6 @ X 6 5 3.......4.b O 1 n d f I N ` Z ", +" l ( ` *.e x Q g e , } v 6 ;.s ....@.5.@.Q g b , < a m b 9 ....6.1 r l 1 n k C p 6 B H A . ", +" w ` W m j 7.8.5 * h < X l 6 5 9. . .0.@.@.5.Q g * , < a 5 1 j ..H -.m + < l 1 n d p 6 5 s k P P . ", +" ;.W :.F .5.4.m e r < l B 5 3... . .@.0. .q.Q a * + < l ( 5 m E ......5 p < l 7 0 I 6 B 8 y 0 0 0 ~ ", +" / ` W 3.-.q.q.Q g * , % O K ;.1 ..@.0.@.1. ...5.4 6 e h < t 5 ( g E ......B e $ O q n c 6 s ....H 0 0 ", +" A 8 / ;.m 7.5.q.w.Q g = ; r S ;.m s @.@. . . .....&.4.B = , < | # ;.5 B E ......Q 6 , < j b m K ..e. ...0 0 ", +" . l 8 ;.O.F 5.q.5.0.Q / ^ > % Z ;.;.s ..0.@.5.q.@.@.@.q.Q w * # O < : 5 5 F ......H 7.B p < O a 5 B E .. .....0 ", +" O , G x O.:.F ,.q.q.q.q.&.4 6 ; , h ` O.N ..0.r.5.q.5.0.@.@...t.w 6 * , A D 5 m L ..........4.b O o O : a B R ..........H % X ", +" t : = @ < O B ;.m 6.@.q.q.q.q.&._ a e h < | . v ` W m .0.0.@.5.@.0.r. . . .w.4.5 = @ r 6 5 1 ..........H y.6 h O : a B R ........e...H t : h ", +" : ^ 5 * r 3 O.;.F 0.@.q.q.5.q.w.4.W a + < X l ;.;.;.6.5.@.@.5.0.0.@.0.@.0.@.2.Q g a @ $ < h ( O.1 ............-./ c : a a L ........H ..q D b S ", +" A 8 T ;.` ; } Z O.5 1 5.0.q.w.2.w.5.2.#.g e @ O O g 5 ` 9.1.r.@.@.@. .@.0.5.q.0.0.y o.#.a ; O p 5 g 9...............4.;. p a 5 w ..........H Z +.K 8 ", +" X Y H 4 W [ h % 2 ;.*.6.q.q.2.2.2.q.0.0.Q 5 a * + / g g 1 -.@.@.@. . . .5.5.5.0.0.u.E &.w a U e 5 g y...............7./ @ % r a ` g R .... .....N a B q ", +" k H 5._ :.- > $ 8 ;.<.3.w.w.q.w.w.w.q.2.u.8.B 5 = B m m m N .@.0.@. . .@.@.@.@.@. . . .o.T w 6 g B L ................Q - # c 5 g y.........L +.;.` K C ", +" 0 .... .Q ` a > $ B *.;.6.q.0.q.2.2.w.2.w.w.Q 4 m g g O./ K 7.q.@.@.@.0.0.0.@.@. ... .@.w.0.Q m m m L @............... .W =.=.i.w .H .. .L ( ;.p.;.Z ", +" ........4.:.a > < 2 ;.i.3.7.2.2.q.2.q.2.2.q.@.&.#.g O.4.&.{ .........0 H ....H ......@.0.0.2.o._ #.6.5.r. .1. .........a.=.*.s.L ..H H L 1 ` / a.` : ", +" ......q.#.d.a # 8 *.i.:.y.w.q.q.w.q.2.2.2.5.@.q.Q Q y C k k k f C C f f C k f f k 0 y e. .0.1.q.q.w.5.r. .u. .........4 ` :.1 9 ..H 9 1 ;./ E 2 5 b V ", +" ........Q g = # x g i.<.3.w.w.w.w.5.q.5.0.....0 0 H k f k f d f C J n 0 0 f k k k k f C M H .. .q.q.q.0.r.5.u.0.......&.4./ B j ..H 3.( g 9 M Z 5 +.t ", +" 0 ........Q g a h } < l 2 ;.i.;.3.&.2.@.H 0 M f J C f C J C J n n 0 0 0 H H H y n C k k k k C C f M H e.t.w.5.u.1.1.@. .......E f.{ ..H j ( <.T 0 f s ;.5 # t h + t $ r r r $ ", +" P H ........Q s.= r % A Z g.%.i.m L ..0 Y d v f f C M J n H 0 n 0 0 y y 9 Z Z N D Z p # + I C C f C 0 H 9 5.w. . .r.r.5. .......H ....j m 5 S 9 I I s 5 %.a = - = e @ : e = = * @ t < ", +" P ........0.Q 4 * + % x g s./ o.H Y d f J J C f f C J H H H n j Z 7 b 6 =.*.=.` 5 =.[ =.= c # k C M 0 0 y ..r..... .1.1. ...........K O.m F c b b [ %.i.=.5 5 5 1 1 c O : a 7 R R h.2 b = # ", +" M ............&.a.e , l o.o.-.M f d J M M C C f f C J n y D 6 a [ j.5 W s.B 1 1 1 b b ` ` ` c I J M M M 0 0 y ........5. .........s B g O.k.l.5 ` 5 W :.g 3 y.{ f.f.R k + a ( Z d k d n T 6 = r ", +" ..................0.o.#.: M k f M f J J C C f k C f C J j D b ^ z.=.5 1 b 7 U N U U b U U 1 %.%.( : D n M M M 0 M H H H .. . ... ..... .Q / 5 ` W g B K 4./ 7 ......H H 0 j > : @ # [ 6 j Y Y V G v w 6 > ", +" ..........................E 9 ..M z k f C n 0 J f f C J n n D [ ` ` g m b c b +.( ( ( ( +.U U b b ;.x.%.=.5 Z 0 M 0 0 M M M 0 k H ..........0 y w.Q _ Q o.&.u.r.Q R ..........6 a =.[ ^ ^ = p r < # 5 5 # Y Y d z V S 5 c ", +" H ..............................0 f Y k f J J n 0 M J C C I j c *.l.j.+.b ^ g.*.%.%.c.%.c.v.%.( *.a b *.%.%.%.W b n M J M C M M 0 M J 9 ................e.q.@... . ...........L 1 5 / 2 3 3 w ` a c r h 5 5 ; d d Y V V N ( 1 ", +" % r j j N b +.N N F F s s s -.....-...M k k f J J C J n M J J I : ` =.p.W =.*.b.%.c.n.%.%.x.x.c.x.i.<.<.+.*.%.%.%.%.%.<.p n n M M M M M 0 J 9 ...... .........,.5. .................1 ;.R 9 0 J C y 4.5 =.> Z g 5 N d d d Y V S ` ", +" r : a a ` ;.g <.*.*.;.;.;.;.( ( +.1 1 j k k k C J J J J n M n n D =.p.m.c.c.M.M.M.%.M.M.M.M.x.%.c.M.%.x.%.1 z.%.%.a.s.%.%.=.U n n C C C M M n E ...... .....H .... . .@... . .....9 F ;.K C d d f Y A x l.` e x B 5 +.d d d V d b 5 ", +" R 6.6.h.{ 7.&.o.Q Q Q _ _ Q y.&.&.7.M P k f C J J J J n J I 7 *.%.%.c.N.N.M.x.M.M.x.c.%.%.x.c.c.x.%.x.` U B %.%.D R 8.B.i.*.: n J C C C J n E ............H H H .. .......L s N a 5 %.m v f f f k Y d g W a l 7 5 6 d d Y r p g 5 ", +" k k P z Y k k k k C 0 ......0 C V k k I H n n J J n C Z p.V.%.c.c.N.c.c.M.M.M.c.N.x.%.c.c.N.c.%.%.g.U b <.%.c V f q #.i.*.b n M C f C n E ..... .....H H ........H ..+.5 5 5 l.%.` x J f k P Y d 3 W 5 l S 5 5 V d d p a g ", +" < < | o < ' M ....H n + p : U c 1 b b N p j I K C.V.i.%.N.N.N.c.N.%.M.Z.N.M.c.x.%.c.%.x.c.*.b U ;.%.a v x v q _ a.` b Z J C f J E u.e. .s 3.D H H H ......0 D 5 g / 4 #.4 :.c h J k Y Y f x w *., # 5 5 v d d 6 6 q ", +" X X X o M ..L b ^ =.[ [ ` [ =.g z.` =.^ e W %.c.+.*.c.v.N.M.M.c.M.%.N.%.%.x.c.c.N.c.%.p.U b +.%.;.x y y d x ! 4 5 a D I C J H 5.u. .u.o.4.D H H H ....M y Q o.A.e...e.Q 5 = : I C f f f 8 s.> p 5 g I k k a F M ", +" X . < t p +.` %.p.=.*.*.p.%.<.g / #.a.` p.%.c.%.( %.c.N.N.M.v.M.z.=.v.%.%.c.%.c.%.x.%.%.b U b i.;.n H y n v l q / *.^ p I C C ..r.e. ...S.Q 9 H ..H ..H H ..H ........D./ ` a h C f f C J 2 - a 5 5 v k d a Z ", +" X o O # a =.p.p.%.%.%.v.N.c.v.c.c.m.( ( ( 5 C.%.%.g p.M.c.v.N.c.=.e +.Z.M.%.c.b.M.x.%.c.%.+.U b d.l.n n n n J V A 8 4 W [ c h k y .. .D s ..e.......H ....................o.#.g e j J J J f y g z.W 5 t d d ( p ", +" < < + c =.=.p.C.m.N.c.c.c.N.c.C.M.c.c.x.%.g.+.%.c.c.B %.v.N.N.%.%.e e +.%.M.C.x.c.c.%.b.x.%.+.U b <.<.j J J J J k i l L #.` ` e # 0 ....o.4.9.L .. .........................0 q Q 5 b x J C f C ! 4 / B I d I 5 N ", +" o i h ^ =.*.%.x.N.x.x.x.x.x.N.x.c.c.c.N.M.c.v.F.;.c.N.m %.c.N.M.%.^ b e e <.%.c.c.x.%.%.c.M.c.b U U %.%.p J J f f J d A A n G.:.` a Z ......,.o.F s u...............E ....E ..C O v / 5 p f f f J f 9 R h.f d C 5 D % $ % < ", +" o X.: F.=.%.%.c.N.N.%.c.Z.c.c.c.c.N.v.v.N.c.c.c.%.( %.%.( %.N.v.c.c.*.e e e +.c.M.c.c.x.%.x.x.c.+.U N s.%.D J J J J J J A G G x 3 / <.a N 9 e.r...u.Q L ...........N 3.b +.1 3.# h v S 5 N I f f J J f d J k d d 5 Z O p ; c : h $ o ", +" z I b ` *.%.` %.N.v.N.N.c.M.N.N.c.M.M.N.v.N.c.c.N.c.+.O.c.^ ;.c.M.c.x.%.U e e +.%.M.x.c.c.N.N.N.x.+.U 3.%.%.D C C f J f J J f l A V q _ g *.+.Z u.....r.H...........3.;.;.*.g.4 #.B a = 6 W ` D J J C J J J J k d d K D > a K L T c > , . ", +" H H 1 *.%.%.a +.x.c.v.N.N.M.c.x.J.c.M.N.M.v.c.v.N.N.N.( 5 x.*.5 N.v.Z.v.C.e b e +.M.%.c.%.%.N.N.c.%.+.U ( %.%.D f f f f f f J J J d V A v ) 4 O.6 N -............. ...;.W %.l./ 9 n q ! 4.4 w 4 2 Z J f C C J C d d d 8 b # t # * a K 9 k k T a ; % ", +" ....@.;.<.%./ +.*.b.v.v.N.N.N.N.N.M.N.c.M.x.N.c.M.c.N.c.%.a <.%.+.c.N.M.v.M.b b * U i.%.x.%.%.c.%.x.%.+.b ;.%.%.s C f f f f f f f f J J d A V n Q 5 [ 1 s ...... . .r.6.:.W <.T 9 C d d C J E E y y H J C J J J J f d f J 3 a = 6 1 2 9 M z z # a a r ", +" ........s.m.%.s +.p.c.v.v.N.c.v.c.c.v.v.M.%.M.v.c.N.v.N.v.C.[ d.C.+.d.c.v.v.N.U U e U O.%.x.c.%.%.%.x.` U U *.%.i.Z d d d d f f d d d J J J J l V v 3 s.;.( F .. . .@. .y.:.` K M d d k f f J J J v J J J J M 0 n J C f k d x 3 s h.L y J k Y z D 5 5 d ", +" ......-.E B.x.p.N ( *.N.v.v.N.x.N.%.x.x.N.c.N.c.v.N.N.v.N.v.M.[ s.p.e 1 V.c.N.M.U U U U 1 b.%.%.%.c.M.M.a U 3.%.i./ H d f J f f f f f f C f f f J J d J 8 w *.;.1 s .. ...7.g 5 D V Y k k f J J J J J J J n J M M n J M J f J J n H J J f k Y Y Y b 5 B P ", +" ....D 1 ;.*.%.v.M.%.%.p.v.v.v.c.c.K.d.a B c.c.M.N.N.v.M.N.v.N.M.F.*.p.+.b :.W d.%.b b U U b V.M.N.c.N.M.5 b U ;.%.:.L C d f J f d f f f f f f d f J n n V V q #.<.;.m L .... .w g N v l O X.f I J J n J J J J M J M J J J J J J n n J k f Y V Y V V a g L ", +"M j +.*.*.*.%.%.M.Z.%.x.%.c.v.N.N.M.B 9.+.+.c.v.N.M.N.N.N.x.c.N.l.( %.[ e U b b b b U U U b ( %.M.c.%.%.+.b U m %.i.T H f d f f d d f f f f f f f f J J J n f V x L.:.;.1 F E .&.4 m : p h h Z j n n n n n J J n J M J J J J M J J J C I h # h + v v 5 F ", +"c [ P.*.%.d.B.B.L.L.L.c.<.B.N.v.v.x.%.c +.+.*.v.v.M.v.v.N.c.c.N.( *.b.M.*.( +.e U b U U U U ( 5 W z.g 1 U +.( ;.W T y I d f f d d d f f J C f k f f C J f J J J l x _ a.<.;.3.L ..&._ g ^ ^ a a 6 a 7 D j Z n J C C C C C J J J J J J I e a 6 = = = e B H ", +"a 5 s.L.Q 6.-.e...H q %.` 7 v.v.N.x.x.F.+.+.( ` c.M.c.v.N.N.v.N.%.%.x.c.M.V.C.*.+.+.U e e e e b U b b b b g.<.l.s H J C d d d d d d f d f C J f f k d f J f C J J V v ! W p.*.1 L ..q.o.4.*.*.4 2 4 g [ a b Z n J f C J C J J J J C C j ^ 5 8 h.3 3 3 8 d ", +"! o.-.H M k P z z A l s.*.- x.c.v.x.v.C.*.+.+.+.g M.v.M.N.v.v.c.%.%.x.N.M.c.v.%.*.( +.3.9.3.1 1 b +.b ( g.%.i.w H d f f d d d f d d d d f f f f f d f f f k k f k J l V 8 B.%.%.m 9.6.9 B %.;.y 0 H h.4.5 l.1 h J J C C J J n n C f n b 5 B ", +" < < < % w p.*.%.c.v.%.M.c.*.+.+.e U <.N.c.v.%.M.i.L._ Q B.%.c.c.%.B.s.%.%.O.B m g s.*.;.:.%.4 y.9 J d f k f k k d d d k d f f d f d f f f f d d k d f J d V q #.:.p.p.( 9.%.%.i.# t A X.D l.l.L n J J J J J J J n I t c a O.N ", +" < A 8 *.*.%.x.c.N.b.c.b.F.- e U m %.c.c.K.4 Q E 9 y R _ B.i.g 9 R L.B.K.d.i.i.i.K.s.L.T 9 0 f f f f k f d f d d d d d f f f f d d f f f f f k k d f J d V x 4.%.%.%.%.%.%.%.=.= # p =.%.B J x J J M n D D N U e e 5 ` / 9 ", +" . X x 4 %.` %.c.N.c.x.Z.^ +.+.+.+.*.c.%.7 q y J J J J J R Q 7.0 f n q { o.h.o.o.h.E y M J J f f f k d f f f d d d f f f J J f f d f d k f k k d k f f C I : a %.%.<.%.i.B.B.l.l.^ [ <.g L x J n J n 7 5 w #.2 2 2 3 _ 9 ", +" . X A 8 <.[ <.x.c.c.c.M.*.+.- +.+.m.x.i.s n J C J J f v f n M k f f v d f J J C J d f f J f f f d f f f f f f f f f f f f f f f d f d f k k d d k d f J J K 5 <.s.4 #.T R L #.z.p.=.W s 0 J J J n b 5 4 ", +" . . X l 2 *.;.i.i.c.%.%.p.+.+.+.+.m.m.B 9 n J f C C k k d k k f k J f f f J J J f C C J J C f f f f f k k k f f d f f f f J f f f f f f f k V d f k f J J 8 _ / L y y n J J x 4.*.:.3 y J J J n * 5 T ", +" X G % Z *.` 1 B i.i.%.%.+.+.e b m.%.3.n n J C f f d d d d k f f k C f f J f J d f f J J d k f f k f f f d f f f f f f d C f J f J f J J I v v I d d f J C n E 0 d J f d d x 6 z.K H n C J I p 6 F ", +" . < x *.%.( +.B g z.z.+.b U e ;.%.7 J J J J J k d d d d d d k f d f J f f f d k k f f d f d f k d k f d f J J d f f d n j p : p : N c : p # x f f f f C f f C d k d d d e 5 5 E n J J n Z 6 K ", +" < A l *.x.p.%.( ( [ +.b b +.b m %.;.# x n J J f k d Y d k d k f C f J J J f k f k f f f d f f f J f J J J J J x Z D c = a 5 =.=.=.*.` 5 =.- c X.d f k k f d d d Y d d + a g N H J J J j 6 g ", +" . A A / %.i.#.K.*.<.*.F.( B ( *.c.%.5 D y J J C d Y d f d k d k f C f J J J f J J f f f f f f f f J I I p D b 6 5 5 =.l.*.%.%.%.p.p.%.g :.=.1 I f k d Y d Y Y Y V V + = 5 / q f C f C b 1 8 ", +" . < < S g.*.S Q _ B.K.%.p.%.%.x.K.x.%.a Z J J f C d J Z v f d d d f f J f f J J C f f f f J J n p c b b *.=.l.p.%.%.%.%.%.M.%.i.%.i.%.*.%.W s M C d k d k d k k d h e a B L 0 C C d # 6 D ", +" | V Z / ;.6 h H q Q _ L.#._ Q &.B.x.%.` c N : c c b ^ + J f k d f f J C f J J C d I n h p N a =.*.l.%.b.%.%.%.N.v.M.%.x.x.c.%.x.%.%.i.%.4 H J f d d d k Y d d I c a 5 L 0 f f f h = B H ", +" o l d #.;.5 h J J d 0 y H H 0 J 8 B.%.%.l.*.=.=.=.*.` n J J f f J J J C C J n # p e a ^ =.l.%.%.b.C.%.i.%.%.%.v.M.M.M.b.x.%.%.Z.x.%.i.w 9 f d d V d k k d Y V : a ` 2 M C f d n b a j ", +" < A Z w <.# J J d d v f f f f v 8 #.i.%.<.%.b.%.K.#.H J J J J J J n Z D c a =.=.%.p.%.*.%.%.%.c.M.x.x.Z.i.i.x.x.x.x.c.x.i.i.%.%.%.W q C k d Y Y Y k d k Y t a 5 g 9 f f d I c a 1 ", +" X l O 8 s.b x J d k f f f k k d V x Q L.K.K.B.G.R 9 J J J n n p c a =.=.p.p.%.C.C.%.c.M.c.Z.%.c.%.%.%.x.c.z.%.x.%.i.m.%.%.%.%.%.<.F M d V V z Y Y d k d + c 5 5 L M f f d : 6 1 ", +" A x x / 5 # C d k k f k Y d d d d C q &.&. .9 0 J n j Z b a =.` l.%.%.%.M.%.c.N.c.c.z.%.x.x.x.c.c.%.c.Z.%.c.%.M.d.%.i.i.%.%.%.B 9 Y Y Y V P P Y Y Y t b ^ 5 F H C f f I a g Z ", +" G v x 5 p.c v k k k k k d Y d d f f f C M H x n Z 7 a *.l.%.%.%.M.v.v.v.M.%.c.c.%.M.%.b.%.M.x.x.x.%.M.%.%.%.%.%.i.x.i.%.%.%.x.F M Y z V z z Y Y ~ V : a ` K H f k k k : ( S ", +" X G x 6 %.1 C Y d k k d d Y d d d C J I n D c a =.=.*.%.%.%.c.M.M.M.c.M.M.M.M.v.c.M.c.c.x.x.K.a.K.a.B.i.%.x.x.%.%.%.i.%.%.%.%.L Y Y V z Y z Y Y Y t a 6 g L k V k z + a m ", +" X X % x g i.s J f d d k d d d d v n n N b a C.%.%.C.C.M.M.M.x.N.M.N.x.%.x.x.%.N.M.%.M.%.i.K.a.I.o.Q ! o.I.8.B.i.%.i.c.x.x.x.%.B J k V Y Y d Y Y Y V D [ 5 F 0 k Y Y I b a 8 ", +" < A # U e *.;.Z f d d d k f I x p c a =.=.l.%.C.C.V.N.v.N.c.Z.%.N.Z.N.M.x.c.x.i.c.x.%.%.x.<.#.o.! ! ) ! ) ) ) ) G.d.%.%.%.x.c.%.s d V Y V Y Y d d X.# a 5 S H Y d Y V c 5 K M ", +" A h F.` l.%.` L J d d d d j : a l.%.%.%.%.%.x.M.M.N.N.c.c.N.M.N.c.x.v.%.c.x.%.i.M.x.i.i.K.4 ! ) ) ) ) ) ) ) I.) ) 4 i.%.x.%.i.5 H d d d v d d d I : a 5 2 9 f k d d n 6 g q ", +" X.1 *.3 _ %.5 j n f f I D =.%.%.C.%.x.m.C.x.N.c.v.c.c.c.x.N.N.c.N.c.v.%.c.%.i.B.a.B.%.i.Q o.! ) 8 ) ) ) ) ) ) ) ) L.x.c.c.i.:.T J f n p * c p h p 5 ` g H f d k Y + b g Z ", +" p ` 1 0 L :.g j n I : a =.%.C.c.x.c.N.c.%.c.N.N.c.x.c.v.M.x.v.v.M.v.N.c.x.B.Q o.! w d.#.) ) ) ) ) ) ) 8 ) ) ) ) I.s.x.c.c.i.3 H f p a =.` ` =.^ =.` W L f f f k t c 6 L ", +" v 8 *.7 d x g m 9 n N ` p.C.%.N.x.c.M.M.c.M.x.N.v.N.N.N.v.M.M.c.M.c.c.M.Z.i.o.! ) ) a.4 ! ) ) ) ) ) ! ! ) ) I.) ) U.l.M.%.c.d.H d p =.l.l./ <.l.*.=.i.S 0 f f f f : a g M ", +" A Z ;.1 d x g +.n q ` %.C.v.M.N.b.c.v.N.v.%.c.N.v.M.c.c.N.x.c.v.%.N.J.x.%.4 ) ) ) ) ) o.R ) ) ) ) ) ) ) ) ) ) I.) 3 %.%.%.x.S j : =.%.K.L.8.s.%.%.%.2 y J k k k p a ` S ", +" A x B ( + d 4 ;.# J g %.%.M.%.N.c.N.M.v.v.M.v.v.M.N.c.c.c.Z.c.x.M.N.c.%.%.4.) ) ) ! ! ) ) ) ) ) ) ) ) ) ! ) ) ) ) _ Z.c.x.B.F 6 =.%.c.G.Y.8.L.i.%.%.Z k d k k d a 5 z.j ", +" l S W # l S *.D l 3 s.%.x.c.c.c.c.%.M.c.Z.v.%.N.c.c.c.Z.M.x.%.x.c.c.%.d.3 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ! ) ) ) ) #.%.x.W / 5 j.5 4 c.L.T.T.Y.%.%.z.D l d P k n a ` z.h ", +" Z *.e + Z <.c v J Q a.%.M.M.x.x.%.N.N.c.N.c.M.c.x.%.N.Z.%.x.x.%.%.%.:.3 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) w x.%.%.%.%.W L.8.K.i.Y.8.Y.K.%.i.c l d Y d : B 5 5 ", +" v 4 *.= p a.` > f J ) a.%.%.%.N.c.M.c.M.c.v.M.M.N.N.c.c.M.x.%.c.%.i.z.8 ) ) ) ) ) ) ) ) ) ) 8 ) ) ) ) ) ) ) ) d.M.i.%.%.i.8.T.Y.L.i.G.T.T.a.%.%.m x k k p ^ 3.5 6 ", +" q #.:.^ a.*.a f d f h.a.x.%.c.M.M.c.%.c.n.N.c.v.x.M.c.c.%.M.c.x.x.<.3 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) z.%.i.c.K.L.Y.T.8.Y.a.a.8.8.B.%.%.W + z p a ` a ` 1 ", +" J ! / %.i.` v d f J q Q B.%.%.x.N.M.M.N.x.c.N.M.x.M.Z.%.M.c.c.x.%.2 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 2 i.x.i.K.K.G.Y.T.T.Y.G.%.4 Y.L.p.%.%.> O 6 5 %.l.l.1 ", +" d q #.a.W @ f J f J J R B.%.%.c.M.N.c.x.N.c.%.M.N.%.%.%.x.x.%.i./ ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3 z.%.i.G.L.c.K.T.8.8.T.8.a.s.Y.8.a.i.%.c # =.:.i.=.` b ", +" ] J ! 4 = h f f f J d y Q B.%.c.v.c.c.M.m.b.c.M.M.%.%.%.%.%.%.i.3 ) ) ) ) ! 8 ) ) ) ) 8 ) ) ! ) 2 5 %.K.G.Y.Y.B.c.Y.8.T.8.Y.G.x.T.Y.G.%.%.1 6 <.g s.%.<.7 ", +" Y 8 g 6 # f f f J Y f R _ %.%.N.%.M.N.x.M.x.M.%.x.x.%.M.%.x.S ) ) ) ! 8 8 ! ) ) ! ) ) ) ) K l.%.d.U.8.8.Y.Y.x.B.T.Y.Y.Y.U.B.G.Y.8.%.x.l.g a.g s.%.l.D ", +" z 3 g = # f f f f Y Y J I.s.%.c.v.%.%.M.M.%.%.%.%.i.x.%.%.z.S ) ) 8 8 8 ) ) ) ) ) ) ) w %.x.x.G.U.8.8.Y.8.L.i.G.8.T.Y.8.G.a.Y.8.d.x.%.#.4 :.%.l.` p ", +" v 3 g 6 x f f f f f J x ! #.i.c.i.%.x.x.%.%.%.x.x.x.c.%.%.z.8 8 8 ) ) ) ) ) ) ) ) 3 %.%.d.Z.L.Y.Y.8.8.8.Y.c.a.T.Y.Y.Y.8.K.4 Y.4 %.c.B.#.:.i.l.5 c ", +" x 3 5 : x d f f f J J n q Q B.d.%.i.c.x.%.M.%.%.c.x.%.<.%.5 S 8 ) ) ) ) ) ) ) 8 z.%.%.B.L.x.Y.T.Y.T.Y.8.B.%.#.8.8.Y.Y.L.d.Y.G.%.x.i.#.:.<.=.` N ", +" _ ( : # f f k k f f J J E Q G.s.i.%.M.x.%.%.%.%.%.%.%.%.%.B 2 3 ) ) ! 8 3 g x.i.a.G.G.i.d.Y.Y.8.8.Y.8.K.K.T.T.T.Y.Y.K.L.Y.a.M.%.#.B.i.%.*. ", +" J _ / a : x f k P P d C f f H ! _ 4 x.%.i.c.c.%.%.c.x.M.%.%.%.l.B 3 ) 8 g i.x.B.#.8.T.L.i.B.T.8.Y.T.Y.L.x.U.Y.Y.T.T.L.d.T.U.i.%.a.L.i.%.i. ", +" J R 4.a * # k Y P Y k J f d f n E I.4 d.%.M.%.c.%.%.M.x.%.%.%.%.` B K %.%.B.Y.Y.8.Y.8.B.x.Y.8.Y.T.8.8.a.B.8.Y.T.T.Y.B.#.T.a.%.i.#.K.%.` b I ", +" n _ g a U v d Y P Y k f d d d J R ! G.a.i.%.%.%.Z.M.c.N.%.c.%.%.%.%.K.#.8.Y.T.T.T.8.K.a.Y.Y.T.Y.Y.Y.%.L.Y.T.T.T.#.a.Y.G.%.%.#.a./ g m + ", +" ) w m e : h X.Y d d Y Y k d d k J f.Q _ 4 K.i.x.x.x.i.x.c.M.%.%.x.B.Y.T.T.T.T.8.U.%.B.Y.Y.8.Y.8.a.i.U.T.T.T.8.s.4 T.B.i./ B.g 5 B # ", +" q o.4 g a c p h X.Y Y d k k Y Y d f n y h.Q U.B.i.x.c.x.i.i.G.B.x.T.T.T.T.Y.8.Y.B.<.L.Y.Y.Y.8.U.K.B.8.T.Y.8.G.<.U.8.c.d.d.<.5 5 p ", +" o._ g 5 a ; h v k k d Y Y d d k d f f M f.o./ x.i.Z.a.I.8.B.K.T.T.T.Y.Y.Y.8.K.i.Y.Y.8.8.8.#.i.L.T.Y.8.8.B.d.#.c.%.W %.%.=.: ", +" ! _ B [ ^ = : # x d d d d P d f f d d I m %.i.K.L.Y.Y.Y.i.L.Y.T.8.Y.Y.T.Y.K.K.Y.8.8.8.8.B.K.Y.Y.T.8.Y.a.g i.%.W %.l.` N ", +" _ g 5 5 a = e c n n + h h h h n N %.x.d.L.8.T.8.Y.4 i.L.Y.8.8.8.8.8.G.<.8.8.8.8.Y.8.B.L.T.Y.8.U.a.g i.d.:.%.i.l.b ", +" I.#.s.z.` ` a a a 5 [ ^ a a ` %.x.%.L.Y.T.T.T.Y.B.K.Y.Y.Y.8.Y.Y.Y.L.B.Y.Y.Y.8.Y.Y.d.U.Y.8.B.i.i.s._ 4 %.%.` 6 ", +" y ! I.#.4 / g :.g ` 5 *.p.%.i.i.%.d.G.T.T.T.8.Y.K.K.Y.8.Y.Y.T.T.T.K.B.8.T.8.8.T.K.K.#.d.d.%.a._ I.#.l.l.l.( ", +" E f. I.B.%.%.i.4 a.x.s.T.T.T.Y.Y.T.K.B.Y.Y.T.T.T.T.L.i.#.Y.Y.Y.8.G.d.x.%.%.4 8.8.4 i.%.%.i.l. ", +" I 3.m.d.s.8.T.B.x.L.T.Y.Y.Y.Y.U.x.G.Y.T.Y.Y.8.8.4 d.Y.Y.Y.8.#.d.%.i.B.G.#.d.i.4 d.%.z.W @ ", +" h ` %.<.a.8.Y.T.B.d.G.Y.Y.Y.8.8.B.K.#.Y.Y.T.Y.Y.T.L.B.Y.8.G.i.%.i.B.B.K.%.B.G.8.a.%.i.z.* O ", +" p =.x.x.i.Y.T.T.T.K.<.L.T.T.T.8.T.B.d.Y.Y.Y.8.8.Y.T.i.L.8.d.x.%.x.%.%.s.L.8.8.T.w W d.*.5 h ", +" 7 ` d.%.%.L.T.Y.T.Y.<.c.8.T.Y.Y.T.T.4 B.Y.Y.Y.Y.Y.Y.G.x.i.x.%.%.x.B.G.8.8.Y.Y.#.a.i.5 g 5 ; ", +" a *.L.B.%.x.G.Y.Y.T.Y.K.B.Y.8.Y.T.T.T.K.K.U.8.T.Y.Y.Y.i.x.x.i.a.L.8.Y.Y.8.8.B.d.%.i.B 4 ` a h < ", +" p ` %.L.U.B.%.i.#.8.T.T.T.<.K.8.Y.T.T.T.Y.a.B.Y.8.Y.T.K.c.i.B.8.8.T.T.8.8.L.<.%.c.%.i.w 8.s.W - r ", +" S *.%.G.T.T.K.c.K.G.T.T.T.G.K.d.L.T.T.T.Y.Y.B.K.Y.Y.B.c.c.B.T.T.T.T.Y.L.s.i.a.#.a.G.s.L.8.a.W 5 * O % ", +" N *.%.L.T.Y.U.B.%.K.Y.Y.8.T.Y.K.x.Y.T.T.Y.Y.Y.B.K.K.m.x.K.Y.T.T.T.Y.B.%.d.G.8.T.8.T.a.L.8.4 W W ^ c @ ", +" D g *.d.T.Y.Y.8.B.%.B.Y.Y.8.Y.Y.K.K.Y.T.Y.Y.Y.Y.<.%.c.K.U.T.T.T.8.K.s.4 U.8.8.8.8.8.4 4 8.L./ :.l.=.: ", +" Z K z.x.G.8.T.Y.Y.B.x.B.T.8.8.Y.Y.i.d.L.T.Y.T.8.i.%.%.#.T.T.T.L.d.K.8.T.8.8.8.Y.8.T.#./ 8.4 %.%.` W a # X ", +" w %.a.Y.Y.Y.T.Y.L.K.a.8.Y.Y.T.8.K.i.#.Y.Y.B.%.%.K.T.T.T.B.K.#.T.T.T.T.T.T.8.8.T.U.K.a.i.%.B.#.g g e O ", +" :.i.a.Y.Y.Y.Y.Y.G.B.B.Y.T.T.8.Y.a.i.4 G.K.%.d.#.T.L.K.a.T.T.T.T.8.T.T.T.Y.8.#.B.i.K.U.a.L.8.U.s.` ; O ", +" <.i.B.Y.T.T.T.Y.Y.K.B.Y.T.Y.Y.8.s.c.i.i.K.G.8.a.d.L.T.T.T.T.T.T.8.T.T.8.4 i.K.:.8.8.L.L.I.8.#.g a ; ", +" s.%.s.B.Y.Y.T.T.T.Y.B.K.G.T.8.Y.#.d.i.B.8.#.K.L.Y.T.T.T.T.T.T.8.8.8.4 i.d.U.8.s.U.Y.#.#.8.T.8.#.5 [ - 1 ", +" 8 s.x.<.a.#.T.T.T.T.T.L.d.L.8.Y.U.U.G.8.4 d.L.T.T.T.T.T.T.T.T.T.U.a.d.L.8.T.8.a.Y.T.8.U.T.Y.L.s.%.i.=.N H ", +" i.x.x.s.8.T.T.T.T.T.Y.i.x.c.B.T.8.B.K.U.T.T.T.8.T.T.T.T.U.a.i.d.Y.T.T.T.T.a.U.T.8.G.B.i.%.K.G.4 W 1 @ ", +" d.x.%.:.B.Y.T.T.T.T.8.B.d.L.8.d.d.8.8.T.T.T.T.8.T.Y.#.i.i.B.8.T.T.T.T.T.4 4 Y.L.i.%.s.L.8.I._ 4 g b , ", +" K.%.%.%.x.B.Y.T.T.8.8.Y.#.d.d.G.T.T.T.T.T.T.T.8.a.c.B.8.T.T.T.8.T.T.T.L.K.x.c.Z.#.8.Q 8.T.U.#.:.B ; O ", +" ) / %.i.%.<.4 T.T.Y.T.8.x.x.#.T.T.T.T.T.Y.T.8.d.x.B.T.T.T.T.T.T.T.8.L.K.x.i.L.U.T.8.I.T.8.8.I./ g ^ @ ", +" 8 a.%.%.i.d.Y.T.T.Y.K.B.G.T.T.T.T.T.T.T.L.:.a.U.T.T.8.T.T.T.T.Y.K.c.M.K.8.T.T.T.T.T.T.Y.8.8.L.a.g e } ", +" ! 4 <.%.%.K.#.8.K.s.8.8.T.T.T.T.T.#.K.<.a.T.T.T.T.T.T.T.8.B.x.%.K.a.B.8.8.T.T.T.8.8.T.T.T.U.s.g 5 , ", +" q #.p.%.x.<.i.s.Y.Y.T.T.T.T.T.#.i.K.G.Y.T.T.Y.T.T.8.L.<.i.a.G.Y.4 U.Y.T.8.T.T.T.T.8.#._ T.8.a.g : $ ", +" a.%.%.%.K.8.Y.Y.Y.T.T.8.B.<.L.Y.T.T.T.T.T.Y.L.i.%.B.U.T.8.T.Y.T.T.T.T.T.Y.U.L.K.B.U.T.T.#.a.6 # ", +" L 4 i.%.i.L.Y.8.8.T.8.K.i.#.T.Y.T.T.T.T.8.s.<.B.#.8.8.8.8.Y.T.T.8.T.U.a.i.K.B.8.8.T.8.8.8.g 5 p < ", +" 4 i.<.i.4 Y.Y.G.d.K.8.T.8.8.T.Y.8.4 <.a.L.8.Y.8.T.8.8.Y.8.U.B.K.%.B.G.8.8.8.8.U.L.B.4 :.` D h ", +" Z / %.i.s.U.L.i.s.8.T.Y.8.8.Y.G.K.i.s.U.T.T.T.Y.8.8.8.#.s.x.i.s.L.8.8.#./ W i.<.%.%.%.i.=.5 e O ", +" Z *.l.%.d.%.B.Y.T.T.T.8.8.4 d.a.G.Y.T.T.Y.T.T.Y.L.x.i.W L.8.8.T B W g / 3 Q Q a.i.%.l.g 3 L P ", +" : O.*.%.i.L.8.Y.T.Y.T.#.a.i.a.T.8.Y.T.T.T.T.G.K.i.4 U.8.T.#.W z.G.T h.h.y y 0 #.W <.g L 0 P ", +" =.l.%.%.i.8.Y.T.T.8.8.i.i.L.8.T.T.T.T.T.Y.a.a.G.U.Y.U.4 a.<.s.4.E 0 y n J J 0 q m *.7 M ", +" - ^ [ ` =.*.*.` i.%.M.%.L.Y.T.T.#.d.s.U.8.8.T.T.T.Y.B.K.L.T.T.8.B.i.z.a.#.! ..H 0 n 0 M M M n w ` 7 ", +" a g g W :.g w _ Q o.Q #.i.K.Y.T.a.i.K.8.Y.T.T.T.8.#.a.#.Y.T.8.#.K.i.a.2 { e.q y y H H 0 0 M 0 M 2 ` 7 ", +" e ( g s E h.o.R 9 0 f k k q i.%.s.d.i.4 8.T.T.T.T.8.B.B.8.T.U.L.g z.W 4 h.E y 0 H H H H n n J C 0 M B W N ", +" c a K f.0 t t Z : : : # A z l g %.<.s.#.8.T.T.T.Y.#.a.#.Y.8.B.W :.4 Q Q y y y y 0 H H H 0 j D n J J n B *.Z ", +" a K 9 f I e = =.B w B - ; O t 5 x.x.#.T.T.T.T.#.K.L.8.8.L.d.i.s.3 S.y H 0 M n 0 H 0 0 0 0 8 a D C J n B ` Z ", +" = 6 y k X.: 5 m T ..y L 4 a # c l.%.x.a.T.T.T.B.:.4 L.4 K.i.:.#.h.H 0 0 0 M M 0 0 H 0 0 0 0 F 5 q M 0 H g 5 j ", +" : 6 s P X.c a g L 0 P z z Z *.a 5 ` %.x.i.T.8.B./ L./ d.i.:.s.8 y H M M M M J J 0 H M 0 M J J b K 0 J n Z 5 g D ", +" a 7 0 z # a ` Z M z ] R.' x s.*.%.x.%.%.i.T.4 g #.s.W i.w h.f.H 0 M M M M M M 0 0 H M M 0 0 n 3 E 0 0 0 F 5 w c ", +" h 1 j k + a ( 5 n z R.E.R.o h W l.i.%.%.<.x.U.#./ i.<.` s.E H 0 J M 0 0 M M f J 0 0 0 M C M M M y H J J H 6 *.=.a ", +" p N C z c a ` 5 k | R.E.< + a %.%.%.x.%.%.c./ a.i.%.W 4 h.0 M M M J M M J n 0 0 0 J M M J n 0 0 0 n H n D ` i.` a ", +" l c j P < 6 m 4 g + < o O # = =.x.%.%.M.%.i.%.%.` <.W w E H 0 0 M C J M M M 0 0 H 0 0 J M M 0 H H y y D c ` l.` ` 5 z ", +" h a n z O a B 3 4 a > p c a 5 W %.%.%.i.<.x.x.%.*.i.2 E 0 J 0 M f f f f C M M 0 0 0 0 0 M 0 0 y q D b ` =.` %.<.%.*.# ", +" p a I | l 5 K 3 _ / 5 5 5 B S w %.x.%.%.<.%.c.%.%.%.N j j n n M J f J C J M M 0 H 0 0 0 j n j N b ` l.*.%.%.%.i.*.*.e ", +" V c 6 I ' h g 4._ _ _ _ 4.#.4.F g i.%.%.M.m.x.%.C.%.%.l.l.a b U c : Z j Z j Z Z Z D D N 7 +.+.` %.p.%.%.%.c.%.%.%.%.%.- ", +" b 6 k < D 4 3 G._ 4 B g ` l.l.Z.m.C.M.%.%.x.x.M.%.%.%.p.*.p.*.=.` =.=.F.a ^ ^ 5 a [ ` =.C.*.%.%.%.%.%.%.b.%.M.%.%.%.5 ", +" 6 6 k X.b 4.2 4 B z.i.d./ #.4.B.x.x.M.%.%.%.x.x.x.x.c.C.%.%.%.%.%.%.*.C.%.l.%.%.%.p.%.%.v.%.M.c.x.M.M.%.%.x.%.%.%.l.z.: ", +" a 6 V v a w a.l.z.K.4 _ Q T S s.x.%.N.%.%.b.x.%.%.x.%.%.M.M.M.v.C.M.%.x.%.%.%.M.%.%.M.%.%.Z.%.x.%.%.x.%.%.%.%.%.%.%.l.b ", +" Z 5 7 V x 6 a.a.s./ 2 _ 3 3 3 3 / *.c.%.%.%.%.N.%.*.%.c.%.M.b.c.x.x.M.%.c.%.x.x.%.%.M.Z.x.M.%.%.%.%.%.c.%.%.%.%.%.%.%.*.7 ", +" Z 5 b A h B 4 4._ _ _ 2 #.w w 7 B %.%.%.%.%.x.%.%.l.<.%.x.%.c.c.C.c.%.%.M.%.v.M.%.%.C.%.%.M.%.%.c.%.%.%.M.%.%.%.C.l.%.l.N ", +" Z g b A h 6 3 2 _ #.a.d.<.z.s.s.s.d.%.%.%.i.%.%.%.%.%.%.%.%.%.%.%.%.i.b.%.%.v.%.x.M.b.%.c.%.%.%.c.C.%.%.M.%.%.%.%.%.=.W D ", +" h 5 1 z x 6 3 G.w 5 W i.B.#.3 Q 3 4 d.i.%.%.%.%.%.*.i.%.%.%.%.%.x.m.%.M.M.%.c.%.x.M.%.x.%.%.%.%.%.%.%.%.c.%.C.d.%.%.l.` Z ", +" Z 5 b G x B B g 5 z./ #.2 3 ) 3 2 _ K.%.%.%.%.%.%.%.%.%.%.%.%.M.%.x.%.%.%.%.%.%.%.M.%.%.%.N.%.%.%.b.M.C.M.%.C.;.%.%.l.g j ", +" p 6 6 A v S %.i.z./ 2 _ _ 3 3 3 2 2 s.i.%.%.%.%.%.p.%.%.i.%.%.%.%.%.%.%.M.%.%.%.%.%.%.%.%.%.M.%.%.x.%.%.%.%.%.%.%.<.W S M ", +" D 6 7 z G Z ` g 4 _ #.2 #./ B 5 5 j.z.%.%.%.%.%.%.%.i.%.%.%.%.%.l.%.*.%.%.%.%.%.M.%.%.%.%.%.%.%.x.%.x.%.%.%.%.%.W 5 1 H P ", +" N 5 N < ' x W w L./ d.l.z.W s.B.L._ 3 a.%.%.%.p.b.%.%.%.%.%.%.%.C.x.%.%.%.%.c.%.%.%.%.%.x.%.%.i.%.%.l.i.%.%.l.i.` K L ", +" S 5 b } . V B B z.l.s.4 Q R f.y H M C 8 W <.%.%.%.%.<.%.%.x.M.C.%.c.%.%.%.M.%.%.%.K.s.z.z.x.%.%.%.l.i.l.` W W 4 _ L M ", +" D 6 m z . t 5 ` s.4 R y 0 P P z z < < x B *.5 %.%.%.%.l.%.%.%.%.x.%.%.b.%.%.%.z.a.3 ) #.w w a.%.<.g _ 4 G.I.h.y H ", +" Z 6 6 V A Z 2 3 R 9 k z ] W.W.R.< < | < 8 g ` *.b.%.%.%.%.%.%.%.%.x.%.%.%.%.%.g / S T T 2 2 w i.W s H H ", +" v 1 6 t ' l H 0 k Y ' R.Q.!.~.E.. X $.. O 8 g W W %.i.%.%.` %.%.%.%.%.` %.x.W <.z.j.k.5 B w w W g j ", +" l 7 ( # . R.~ ] ] | . ^.!.E.^.E.X X E.E.< l 8 w *.%.%.%.%.W l.%.p.%.*.W 4 3 ! T ) _ #./ s.g B 5 K ", +" ( : i R.E.E.E.X X E.^.!.^.E.. . E.E.R.< d q W l.<.l.%.%.%.z.%.W w T y M k k k M 9 R ! 8 2 ` Z ", +" 6 b X.R.~./.^.X . ^.^.!.~.^.$.^./.~.^.. ' z ` ` B _ 4 <.W 3 T h.9 M P W.W.W.W.W.] z k j 6 ` ", +" B 6 + . !.!.^./.E.!.!.!.~.^./.~./.~.~.E.. < [ z.Z M L 5 ( M C Y ~ W.Q.(.!.!.Q.Q.Q.Q.] p 5 5 ", +" K 5 : < !.!.!.^.!./.!.!.!.!.!.!.!.!.~.^.R.l 5 1 H ] v 2 5 + ' R.Q.~.!.(.!.!.~.!.!.!.o - 5 F ", +" 5 6 r E.!.!.!.!.!.(.(.!.(.(.!.(.E.!.^.| # 5 N k W.] x w U r o Q.~.E.!.Q.Q.~.!.Q.o # 5 6 ", +" B m : . !.~.E.!.!.!.!.!.Q.!.!.!.E.E.E.t = 5 Z P W.R.A 8 1 * + E.~.~.(.~.Q.~.E.| # a 5 ", +" m a , E.E.!.!.!.!.!.!.!.!.!.E.~.E.O c ^ 5 Z v K 6 e , % . Q.!.Q.Q.| + = [ 5 ", +" a ; O E.^.!./.!.!.!.!.!.!.!.~.l U a ` 6 j q K 6 e c > + O % O @ e ^ 5 B ", +" 6 ; r X E.!.!.!.!.!.!.~.E.E.# a 5 ( 1 n z q 2 5 a = = * ; * = a 5 W L ", +" 6 6 * ).% E.^.!.!.!.!.!./.o c a ` W 7 n ] J 3 w 5 5 a a a 5 5 5 B ", +" B 6 = ; h O | E.!.E.$.i + a [ W ` L k 3 4 B 6 a 5 g ", +" 4 a a = * > h , r # : a 5 ` 5 2 M d y h.) ) T R ", +" w a a ^ = = = = ^ [ 5 5 B Z P ", +" R ! 3 g 5 ^ a a ^ 5 g 3 E M Q. ", +" Q _ #.w / w E 0 P ] ", +" k C J y E y k ] W. "}; diff --git a/pixmaps/calvin2.xpm b/pixmaps/calvin2.xpm new file mode 100644 index 00000000..8351126d --- /dev/null +++ b/pixmaps/calvin2.xpm @@ -0,0 +1,218 @@ +/* XPM */ +static char * calvin2[] = { +"154 150 65 1", +" c #000000000000", +". c #FFFFFFFFCCCC", +"X c #FFFFFFFF9999", +"o c #000055550000", +"O c #CCCCCCCC0000", +"+ c #FFFFFFFFFFFF", +"@ c #666666660000", +"# c #666633330000", +"$ c #EEEEEEEEEEEE", +"% c #666699993434", +"& c #7F7F7F7F0202", +"* c #FFFFFFFF6565", +"= c #CCCCCCCC6666", +"- c #999999990000", +"; c #CCCC99991010", +": c #CCCCCCCCFFFF", +"> c #666666666666", +", c #CCCCCCCCCCCC", +"< c #C0C0C0C0C0C0", +"1 c #2E2E66662E2E", +"2 c #333333330000", +"3 c #CCCCCCCC9999", +"4 c #9999CCCCC6C6", +"5 c #888888888A8A", +"6 c #666699999999", +"7 c #CCCCFFFFFFFF", +"8 c #999999999999", +"9 c #666666663333", +"0 c #999999993333", +"q c #CCCCFFFF6565", +"w c #DDDDDDDDDDDD", +"e c #99999999CCCC", +"r c #9090CCCCC7C7", +"t c #FFFFCCCCCCCC", +"y c #AAAAAAAAAAAA", +"u c #CCCCFFFFCCCC", +"i c #999999996666", +"p c #121220200000", +"a c #333333333333", +"s c #81815D5D6D6D", +"d c #555555555555", +"f c #767689899C9C", +"g c #CCCC99996666", +"h c #333366669C9C", +"j c #333399999999", +"k c #8989CCCC7272", +"l c #CCCCCCCC3333", +"z c #CCCC99999999", +"x c #CDCD9999CDCD", +"c c #FFFFCCCCFFFF", +"v c #FFFFCCCC9999", +"b c #A5A560602424", +"n c #FFFFCCCC6666", +"m c #C9C9FFFF9C9C", +"M c #333333336666", +"N c #FFFFCCCC3333", +"B c #1B1B9999C8C8", +"V c #000099999999", +"C c #000080805A5A", +"Z c #FFFFCCCC0000", +"A c #FFFF99993C3C", +"S c #B0B066663030", +"D c #FFFF99999999", +"F c #A2A217172A2A", +"G c #666600003333", +" .. ", +" .XoO+ +.+ ", +" +o@#. $.+.$XX$++ ", +" X@%@&+$*O=..O-$+$$ ", +" ;@:@>,-&:<&123$..$. ", +" ..$.$O#45@@6:7&%891@&0=. ", +" +=q.+w@@:eo1:7<6:7::44 ", +" $0&64@o::%e7,:7,:7<:7 ", +" :r%8:5,7,7:474:7447t ", +" y::74:7<::7,474474&-0$ ", +" 847:,74:77,:74:747::,; ", +" +.&%r74:7,:u:7474:7iy@yw ", +" +3<4864y7,7747474:7<7::w0 ", +" X--o4::&%4:47,:7<74:7&r7w$ ", +" w+:52&&1@4:74:7<7,74y46&% ", +" =0@a:7<7w4::74y@o964 ", +" ,4,<119:4di:i&11d29i ", +" .o9@o##a6i%w::reee6592#w ", +" 3@o2#od>5f6>@4r:r<::r:::>@o ", +" .g@2he::::y6::4r:7<4:444:&@p ", +" :%1s4:44,44::44:4y:4:rw:,:>@# ", +" .&@o4:<:4:,:44:w4:,4:4,:4:,%o@#@&&&&-&-&, ", +" &@o5:,:,:,:,:,444w4:4,:,w44:5@2@oo#@o@o@@o= ", +" X@2>:<:4:u44:,:w:44:4w44:w,:4::y4e44eey5>@@20 ", +" i@o5:4r:44:4,:444w:444::<,:,:4,:,:,:,:4::ef@o@ ", +" -@oe:,r4:44744,:44w:w4,4::r7<4:,:4:<:,:<4::89o ", +" o#444:,u4:44w:4w:4:4,u:44:<4:,44:44444:,4,:e@0 ", +" 2d6:,<:<:4:44:44w:44:>4ey&@kt ", +" o@5e:r::<4:444y%@o@2o@6e5e:6>44,4eo@y:<:6@<:y:e14::4>#o&, ", +" 1@o6::<444:<49:y4:<@@@, ", +" @@1e:444:4:44%%o#@5e:,:>#6440,:55444:d@i:44:854<442<4:y:522$ ", +" .1oe:<:44<4%%@o2df>::,:<6o>:<5:<85:4445a6,4:<49:4:y9:<4:11>>8eypr<@y44,:<4:<18:4w>rw4:4w92w ", +" 0@24y%@o#d59:r,:e@yr65y:<:6a@4,44:f%:4<:56r4:r,oy44:ie:4<:o5:<1:y:,<4:1:44:45r4444o>4<:5:44:44d1@ ", +" .l@@af:4e@:,::%8:44@a:<8o5:<44>r<<:<,64:4o4 ", +" -@od>e:,:%%:<44%4,:>1yr:d1yr4:e9r4yr6>%%5%5d@o@9#da2@919y4y:a@6@&$ ", +" Ooo>:56<:@64:<:&5>@@o9@99>@>5z8xs5@2>562d29w ", +" 3@o#54:&444:5o4:<:@<:eadyr:a@6,rio@1ss,,twtwtct$$wt$twc,,tw:y4xada#3 ", +" *oo56f:yy>:,44@%r:44%44@ae:<5o99@o5sy$ttt$t$t$Xttt.vw.v.vtwtt$tw@o5>:$ ", +" o@54:94::&64::e1<4<:><:>d946>9o>g,ct,tt.$tv.v.tv..t3.vwtw.t.t.t,o@58t$ ", +" -@>:,4564459:,4:i6::<4@451d@@>8tc$t.tt.tt..tv$v$.vv$tt.vw.,.vwv$vi@>@1&3t+ ", +" &1>44:40:,:>&4:4r9:444:9>dob4w4i%28c$tt$.vt.t$v..v.u;wtt.t.t$n&,t$n$v$vvw.3t.3t& ", +" 8d@1<:4:4:,:6@:59&wt.tt..v$t.$v.tv.i#@@k.v.t.X$&@uv.t.3k%&@=33t$& ", +" $&a6:444<4:,:&@d@-,v$twb&t=%&o@:$$,@og.w& ", +" &@>:46:&i%o9d<&@w.vwt.tt.t.t.t.vis2e+$wg&@@o&@o@@o@#@:$$0#dwt3& ", +" d162@oeoda#d&&,tv.t.v..v.v$v..t$y@i$+c+$:&@o#y:,5d>s$$b@55:3&5:$tt.=# ", +" :x>9d2diyttt=iytvtXttttwvt.v$v.$twizgy08ii5$8cv$v..v.v#i ", +" &3v.$v.t.v.vwtv.v$v..tt..v$v.uv$v.v..$v.v+t$$tcwt$tw$t..tt.co& ", +" t&,t.tv$v.v...t..n$vt..vt.t.v....v.vt..v$X.vt+v.tt.t..vt..v.#9 ", +" @@=.v..t.w.tv.tv$v..tv..t.v$tvtv$tt..tt.v.t.v.t.tXv.v.t.v$c@0 ", +" @@&,vt.vv33t.t.v$v..tt..v+X.w.t...vt..v$v$..v$..v$.t.tv$.v&5 ", +" o@&kg3&@#kv.t.X$tv..tvt.tvtv.v.v$t.v$v..tv$v.v$tv$v...vw@g ", +" 3@@#1@o#o@o2hhhBhhBhhBVddodhjBVhBh>oBdjhjB1f6+$wl-;-;;lv ", +" 51ad>oadBVBVBVjBB>BhBhd1hhV6VVhd2dodadjV<:8@9868@@@o@ ", +" =@phpadhjhBjVhjjVB6BVBhCdjhjdaaadadad22hV-@6::4:448@o@= ", +" &pdaadhjVBjjjBjBhVd1BjjhdV>oaadf6:e:f>da21e:<4:4:4::5@& ", +" @o2dahBhjVhBVhBjBVo2dhjjo#pa>6:4:4:4:46oad:<,<444:4,:@@ ", +" ,oahdaBhVBhBjjBjhVfa#VBhdaa>e4:<:444,:4:ed@1y:44w:,44:5o@ ", +" &1hohVBjjBVhBdddad2adVB2d6:::<:4:4:4,:,:ydo>4:44:4:4,6@o8+ ", +" iaVdVjjBhVhd2ododpdada#18:,4<:4:4:4,:,4,:e@d,r:44:4,:5o@,;OO-&&&-OX ", +" %#MhBVjBjjhhBhhVhhho2d>:,:,:,44:4,4,:4,44#64<4,4,:44@#o@558@o@22@&l ", +" eojBjfBVBhjBVhjBVBa2d2>484rw44:w44:44:4:yod1@@%y4y:%pd#y$$<2@p@2o#& ", +" =@hjhB6jVBfjBjVhhoa>afy,@>:44,4:w44:4,6@@2d2a1po>4&#da6c$w@@p@22#o#& ", +" ioVjBBVBfjjBjhV6Voffd45:>oy,4:444,:4<:@od>adaad#o#25e@i+$0o2d2ddo#o# ", +" &@BhBjVVBjhjhBBV@a65f:,,6@d:<4:44:,4:k#28>aaadoad2d:-2:$t@@aad#dad#o ", +" 5ohBjjVBjVBVBjVBd#656<44:d1@444:4,4:49a>>daad2#d22@5@@w$w1aad#d2d22@# ", +" 991jVhjjBjjjVfjVha>81:,:4,5aCiy4,4r,%2dda2da#daadaa9a9w+k#dadaadaad#og ", +" =oMhjBVBjhBhBVhBdo>:@dr:,r42@ao9684f22a#daaad#daa>adaa:$3#od2adad2ad#e ", +" wd9VBV6jVBjBhjBjhdp&:>><4:6a#65a2opo2d2daaaaaaada#ada#3$wad2#daddada#= ", +" &pdVBVB6VjjBVVB6aaa64%1f%@2d222hdd#dad2adadaad#daaada8c<@odad#aadada5 ", +" >aadhjhjBh6BhjhBdao9>a2#pda22hjhhaofaadadaadaaaaad2o@,w@d2d#dadd#do; ", +" ioaadaVfjVhjjhVdaa#pMBahda5dhVhj22ae@aad2aadada>aadad<,o#dpaa9aad#d5 ", +" >ddapd2o22o2aa222VhfVVBh68:5jha2pd#,dadaaadaadaaadaa2%c9daadaaddda@& ", +" 0aBddaaaadaadahhhjhBjjVh:i+i@odddad:#d2daaadd2dadahdae$i2dadadd#ddadz ", +" %hhjBhBhhhhhVBhVBhjVBhhV6&7codVhda#$a2d#dada2d2>aadd@:$8d2d2da#d2da@o; ", +" %VBhjBjjVBBhBjjhjjhBVBVo21ww6Vddpad:@o#d#aaadaaaaahhoi$<#aadaad#d#a>x1&t ", +" idjBVjBhB6VBVjhBhVBVdo2dddz$4ad2dp@:sadpda>aaada#ddh@o$@d2aaadaaadaadaa2x$=#ad2aad2ad> g&2&O=$ ", +" i#jBhjBhV6VBVBVjBh6VB6hjBV8,$:oda#p@:82dddaaaadaaa2da#7ciad#daddad2@ c<5@&-X.. ", +" 3odVBVVBjhBVjVhhjBhBjVBjVfdi$wj1ad22b,2#aadaadaadad#d5c7@@2dadaa>ad> c3@o-...+ ", +" ,dohjVBfVBVjBhBVBhVjVBjBfVo@y$6adaaoi:dadaaadaaaada22,$$@adaa#ad#d2b 8@p-=X.. ", +" to@dhjjBhjBV6BVhVjhBfVhVV2#29:3@od#aob1d2d#aadadaaddd:$t1@adaddadad: $i@@@&OO. ", +" $5a2VhBVjBVBhVfjBhBjBjBhd2da@-$5a#da#>da#aadaad2da#2@3$:9ad2daad2d1t cwMC>adCaha2adaM2#oyx99ap>,@a9aaadaaada#a5=i#aaadad#M2@21#22@#2@#o2@@2@aa@a2#9%2@9@@0glg=A%2@20 ", +" .$+.$.XXXXX.lO-&&gwc5doBhdBhVVhhhVBhhVBhdada2da#@i:ad2@>edaaaadaaadaa2#d2daadaa2d#i8ggggggiggzgg3zz5d2d#>@igyggyig;gi&2@@o2#- ", +" +..X.OOO-&1o@@p2@#@@@1:$w@#VBBBBBBBBBVjBBBVBV#2daadp2@,5#a2d:@#adaaaaaadad22d2aaadda2d#@@z3=3A===n=Ag&@#d95zzzgo@@o@o@o@2#ay5y>>s ", +" $....X=qXOOO&&&-b--&;;l;;;ggib2&@9>ao1jVVjVBVVBBVBBBBVadaadaa#2@:>da@ixddaaadada#daadaaa>aaa2dap#o&n=A=g=AiS1@o#dgg3g=vgi22#5,xy5do9x ", +" .XqO&&oo@#@b-;=lg=3ng3=ng3==;&222#o@2aaa2o@o1ddddVVVjjjV2adaadad22i:#22d:9ada>2da>aadd#d5sss5ss>9d>sz=g3;0@@@o@#s<=ngn=A=g@2d @p8 ", +" ..=&#@&&b-;;=0n3=Z3A=;n=ngnlngi2d2a@d#ddda#a2a2p@oo22@p#o2da2da2da#2@y5d2@iyd#daa#9g3g5 a@5 ", +" ..&@@o&iii0ii;0i;====;3;=g3lA==g3gzzg3z3gzg5S>#aaaaad#p#aad2daadaadaa2>:bdo@92d2ada8Dg3n==gv;3;0S@@@o@#2@bbsiz33v=gngg=Aii&&@: &2% ", +" .&o&&;30&@@#@2@p@@@#@&@i&0-&%0&00b&0i&g-giigys5sddad2daaadaaaadaaaosz8i,:>#dadaad#>gig&%&;i&&&@@@#@isgigzz33D=;ng;3;=0&1i8z @d5 ", +" $O@@g3=A3=gz3;zgi&b@&@@#@@#2@2#o##o##o@p#o@2o@2od#2d#adaad#ddaaadad#a@#2@:,@2aaad2do@oo@#@2@2>iggz3g3vg3=n=;g=;g&-&&@225 t=O @@2 ", +" +i@o@0;i;gn3;v=3A33D3zg3zgigigzg8zgz8iigiisbgbisgiz8zz3z3g,g3zzygzig8si5gkc,%s>52da#2p@#@izg8vg3s@&@&&&@&@@@@2#o22d@>8 t -o@#@s ", +" @22oo@2o&i&ggk;==;3;g==g33==v==3n=vg3gn3=g3ng3g3n==g3;=;ggg=;igg3;gig4g%ci@##dd>>siz3zn=3n;3;01d@2d@#d@d555eb i@@o@2@oo@@88 0& ", +" $wo#p222#2#2@#d@999@2o2@po2o@2 &9d@2oa 2#o#dd9d#>>@#ao@biz=n=A3==A3g=n0g&@@@ && @98 #a5 v1, ", +" +:6a2d#pd# #2 :ada dda# xd## 2da@ $ad9g3n3A=A==A;=;g&#@o@o2#ak &@@@@12@2@@>i58 8d@@ &9$ ", +" t&@a2ada d# @@sd @#># 1#d @2sp g1@8z=l;3g3n;3;&1o@a9#2ad2a#1@o@>s5@9aex $ %@#&$ ;1i$ ", +" w%@29ad 2@ @a99 dda# oa# dd# 1dpgn=g3;n=0&@#@@i edd#d#d @% 2@2= @@i+t.v ", +" +$. +=&@#9af @p ooaa: @#do &@#as @#d2 -@@29ig=--@#@2d8 dadd @ @2@@ &o#,;0@@ ", +" O +nO +=@o@da9 #o &29a#@ 52d2 @o2sg yaa# @eya@@@2## a#& <@@ < 5d22$v0o1s5y59&z ", +" v= +l&.+$vv+$.;o@#aad p# @22dy@@@1@&e@2# @2#>F: ,8@o# @@ >@s6 92@ -&@@>9< voi ;@od9@o#9y,33y <: ", +" iO 3# . +$+io@2d# 3< 45@22yb#@&@@& da25#@op@:<& %@@ i>a#da#1b33&@#o& X ", +" ;% $,&g+$.-@#2d2a t3=333i022222adzx-y,so#2aaaa#@p#aaa#o#@22@22add 2o@#2@2#2p@2o@p2ad@@ <2#a8>#@2ob,vuNt ", +" + &:+.3w&a2 9as$ i 1o2#2 12aaa aa2ds2@pdaa9aaaaa2aaaaad2a2d2a aaaa922#aaao#ad2dad2aaaad2ao#a12#@>2aa9id2a92@9&=39p9@a2@&@&i3zsiiv3N3X3 3*=n *v", +"+ =qv=o Fs % <59o&zs @sfa2d#dss a aaaaaa aaaaaadadaa>aa#daa#zaa2aaaada d pdd2aaa9adaada2d##>#aaa>d#i5d y99@==3 v,3,33333wv X= vlX=nmZ*y*n ", +". 3 & #@l0@2d z @o2@ @d,3&8,,@#daaadaa9aaa ads> #dssssgsFs Fs Fs #aasGdadaaadpa ada d#a addsssF aa53 ib,= 3 33n3vm=v=v= =v=X= =XO3 Ovq X ", +" u 3 3< , 5F g sF@p < @- &=3x sF d aaad aa#a pa a a aadaad#d>a psF5F F5 ss55FsssF sssFgsadaa93 v33v3 v v 3Nm=v = @@@&nOml = vlnq 3 Xl ", +". n p s s # 33;@= @v3.-@ zFsa a aa dada dpa aaa sa dada #ad dsdssssds>F>#dada aa yn3mn qn=mN= mln=m && 2@k =v 3 =3=nmn ", +". n q 385 dds9 ss@-=3= lXO g8z, z9> i8zii zyi5sdddda aaa d ad# >G aad 2 p aa #aaa d #ddbnm=n= n=XOX=X=v Xl 9@@&3 3nml O lX3= n ", +" g== qN3v,3 3 , v & 3 X OnX vu 3v3 v 3v,v3 , ,v, 33z >s d#d2a dp# pa #d aaadaadadaa ada w nX=n mnlv X X=X q=3 tmn n 3n O X= m ", +" q nqv X m X v v nm= 3Om3 l =X=X=qn Zmn q =nm 3 ,8 8y8 8g i,z i 5 > add 9>9i n3 = m3 v =v n =v mN3Zm Nl = ", +" = l *l = OmN=X nm =n n X= m v n =v On=X nm mN nm=N 3n X v3t3v vmn,n < = v<, z , , vmn nX=nX =m =X Z mZ XO 3 q n ", +" X 3 Xn XZ * X nXZXZ nmn X= X n n XOXnXl n n* = X= n* = = n3Nmn X=vnlX m NXn NX=X= n X N Nv Z. n m nX n "}; diff --git a/pixmaps/calvin3.xpm b/pixmaps/calvin3.xpm new file mode 100644 index 00000000..362f5428 --- /dev/null +++ b/pixmaps/calvin3.xpm @@ -0,0 +1,297 @@ +/* XPM */ +static char * calvin3[] = { +"116 167 127 2", +" c #000000000000", +". c #FFFFCCCC9999", +"X c #FFFFFFFFFFFF", +"o c #EEEEEEEEEEEE", +"O c #999999993333", +"+ c #666666660000", +"@ c #666699990000", +"# c #666666663333", +"$ c #CCCCCCCC9999", +"% c #FFFFFFFFCCCC", +"& c #FFFF99990000", +"* c #333366660000", +"= c #000055550000", +"- c #333366663333", +"; c #CCCC99996666", +": c #CCCC66660000", +"> c #000066660000", +", c #555555555555", +"< c #333333333333", +"1 c #66669999CCCC", +"2 c #CCCCCCCC3333", +"3 c #333333330000", +"4 c #808080808080", +"5 c #999966663333", +"6 c #C0C0C0C0C0C0", +"7 c #FFFFFFFF9999", +"8 c #DDDDDDDDDDDD", +"9 c #FFFFCCCCCCCC", +"0 c #FFFFCCCC6666", +"q c #CCCCCCCC6666", +"w c #999966666666", +"e c #333333336666", +"r c #AAAAAAAAAAAA", +"t c #CCCC99993333", +"y c #999933330000", +"u c #CCCCCCCC0000", +"i c #9999CCCC6666", +"p c #FFFFCCCC0000", +"a c #666666669999", +"s c #CCCCCCCCFFFF", +"d c #000080800000", +"f c #FFFFCCCC3333", +"g c #666633330000", +"h c #666666666666", +"j c #999966660000", +"k c #999999990000", +"l c #666699993333", +"z c #999999996666", +"x c #000033330000", +"c c #333366666666", +"v c #FFFFFFFF6666", +"b c #FFFF99993333", +"n c #808080800000", +"m c #CCCC66663333", +"M c #CCCCCCCCCCCC", +"N c #9999CCCC0000", +"B c #FFFFFFFF3333", +"V c #9999CCCCCCCC", +"C c #CCCC99990000", +"Z c #000088880000", +"A c #666699996666", +"S c #9999CCCC9999", +"D c #FFFFFFFF0000", +"F c #FFFF99996666", +"G c #999999999999", +"H c #333399993333", +"J c #CCCC9999CCCC", +"K c #9999CCCCFFFF", +"L c #CCCC9999FFFF", +"P c #9999CCCC3333", +"I c #666633333333", +"U c #66666666CCCC", +"Y c #888888888888", +"T c #FFFF99999999", +"R c #6666CCCC9999", +"E c #999966669999", +"W c #CCCCFFFF9999", +"Q c #CCCCFFFF6666", +"! c #CCCC99999999", +"~ c #99999999CCCC", +"^ c #CCCCFFFFCCCC", +"/ c #666699999999", +"( c #CCCC66666666", +") c #333399990000", +"_ c #FFFFCCCCFFFF", +"` c #9999FFFF9999", +"' c #333300000000", +"] c #000000005555", +"[ c #555500000000", +"{ c #6666CCCCCCCC", +"} c #666633336666", +"| c #FFFF9999CCCC", +" . c #000000003333", +".. c #CCCC6666CCCC", +"X. c #333366669999", +"o. c #00009999CCCC", +"O. c #EEEE00000000", +"+. c #CCCC33330000", +"@. c #000080808080", +"#. c #DDDD00000000", +"$. c #333399996666", +"%. c #333399999999", +"&. c #FFFF66660000", +"*. c #CCCC00000000", +"=. c #BBBB00000000", +"-. c #FFFF66663333", +";. c #FFFF33330000", +":. c #CCCC33333333", +">. c #000099996666", +",. c #808000000000", +"<. c #333300003333", +"1. c #FFFF00000000", +"2. c #888800000000", +"3. c #6666CCCC3333", +"4. c #999933333333", +"5. c #CCCCFFFFFFFF", +"6. c #AAAA00000000", +"7. c #666600000000", +"8. c #99999999FFFF", +"9. c #999900000000", +"0. c #CCCC66669999", +"q. c #FFFF66666666", +"w. c #99996666CCCC", +"e. c #999933336666", +"r. c #33336666CCCC", +"t. c #66669999FFFF", +"y. c #33339999FFFF", +" . . . X ", +" o . O + @ # $ ", +" % % & + * = - * ; ", +" . : > > + , < , 1 ", +" o 2 3 - 4 5 = - , 6 X % % % . 7 8 % ", +" 9 0 * + ; q w 3 e r % o 9 0 t y + + O 9 % ", +" % . u * # i 0 p + = a s % o o % . 0 @ d * * = # - r ", +" % . O * # O 0 f 2 g - h X o % 9 7 O j k + l 5 z # x c , ", +" % 9 O * t q f p v b * < r % % 0 t n + - z q . 0 0 ; > < c ", +" % o . u + O . 0 f p p u + < 0 m * = + , M 7 p f p p N x h , ", +" % 9 9 t l + O 0 f p B p f k = a . O O 3 * h O $ . f p f B b u g h V ", +" % 0 % 9 n * @ 0 0 p f B p B 0 j g V % C + * x + i 0 0 p p p v p f u + - M ", +" . b M . C Z l ; 0 f B p p f p p + + 1 0 + + * = h r p f f p p B p f u + = A ", +" X . d z o % $ d + z p v p p B f p p u n = M l + = * A t f 0 f p v p f p v f + < ", +" % O + V o . + * ; 0 f p p f p f f f j 3 - M S + * = * 5 z f 0 f B p B p p B f C + - V ", +" % 0 j c s % & + - z 0 0 p p f p p p D C + 3 = = 3 + x w ; . 0 f v p p p f v p f u + - s ", +" o 9 F * + 9 . + x l q f p B p v p v p p C = - 3 g = = + q 0 0 p B p p v p B 0 . $ n * ", +" % 2 n - G 9 0 * = @ ; f p f p f p p p B t + 3 x < x # ; q f B p p p 0 p p B 0 % 8 + H J ", +" 9 C = , K % p x + # G f f v p p p B p p p p + < 3 , h ; 0 f f p f B p p B v & 7 + + H L o ", +" X + > c 9 0 3 + x + u f p p p v p p p v p f j < 3 + O 2 p B p v p f p B p p . ; * > r o ", +" 9 + * h M o O - 3 - O f f B f p p D f p p f f t j - O 0 f p f p p f p p p B p f + * * G i P z A 2 O z q q $ . 9 o 9 % % o ", +" o % n x A $ 0 n = < , . f f p p B p p p f p p B 0 0 b f f f B p f p p D f p p f u + x 3 * 3 = > + x * = + = # = n + k C F 0 . 9 ", +" o o o o % 9 = + O f p % o 9 - < - n p f p p B p B p p B p B p v p 0 f f p p v f p p f f p f 0 C * < < I = h * = c 3 4 < < - = = * + + > > + @ . ", +" % . % 9 X . 9 o % 3 * + 2 v 0 7 0 ; z 5 0 f B p f p f p f p p f p p p B f p B f p p D f p f D p p B C 5 * < , + ; ; 0 ; 0 q F q t ; t O w A # - - 3 * O ", +" % . : n ; o 7 k V o % g 3 n C p B f p B p 0 f v p p f p u B p B p f p f p p p p p B B p f p p D f p p p 0 0 0 0 0 0 f f v p f p p f 0 p p 0 p 0 t j = , c U ", +" ; + * l . . 9 . C - 6 % o ; w n 0 p p p f p p p f p p B u p f p p p p p v p p p p p B p p p B p p p f p p v p f 0 f f f 0 p p p p p p v p p f p v 0 q < < - G ", +" o ; G - * * + * 3 Y o 9 o 7 9 0 p f f p f f f B p p f p p f p f D p f u p p B f p 0 p 0 p f p f f p f p f p B p B p f B p p f B p f p B p B f f f C * - 4 r ", +" 9 T h + = x , R 8 M 9 % v f p f p p p p p C B p p p p p p f p p f p p f p p B p 0 v f p B p v p p p B p p B p p f p v p p B B p p p f p p u N + < ", +" 8 8 E c x * = @ i 7 0 f f 0 p p v p B f p B f p p f f p f f p p p f f v f 7 0 7 0 v p p p f f p p p p f p p B p p f f p p p v f p v p O g + A ", +" o % J l < 3 < < > # l 2 2 f p f p p p p f f p p f B p f p p p p p 0 f f B 0 . 7 0 0 0 v f p u B p p f p p p f p f p p D f p f p B f f k + - 4 ", +" % p . 7 + * 3 = < x , = g = O q 0 p p f f p p p p p p p p p p v p 0 0 p v . 0 0 0 7 0 W 0 0 Q p p p p f p v B p p 0 p 0 p f p p D B p C @ > 4 s o ", +" . j + O n + x , < < , < I > g = n v f f 0 B 0 0 f p 0 p p f f p p v 0 v 0 0 7 0 v 0 7 . 0 7 7 0 f f p f f p p f 0 0 v 0 v 0 p f p p p u * = * ", +" o n < * * - - H = 3 < - 4 z ; $ ! t 5 + 3 k 0 f B f 0 f 0 f 0 0 f 0 0 f 7 f 0 p . 0 v . 0 v f 7 0 . 0 v . 0 B 0 B 0 v . 7 . 0 Q f f p f f C + * - 4 s ", +" % 9 t < < < - 3 g < ~ 9 9 . 0 0 0 0 . + g n 2 0 F f v p 0 W f 0 0 f 0 0 f . v . f . 0 7 0 7 0 . 7 0 B % 0 0 . v 0 0 o v 0 % 7 0 v p f u f n + 3 r o o ", +" 9 r , c < < = c z ^ 0 0 0 0 f 0 0 k = = p 0 f 0 p p v p 0 0 v . 0 0 f v 0 0 0 v 7 0 . f 7 . f % 0 0 . v 0 7 0 7 0 0 7 p 0 % 0 f B f p + = - r 9 o o ", +" ; 4 - < # $ 0 0 0 f v f f f C g * # 2 2 0 0 0 f 0 0 f 0 0 0 f . 0 0 v 0 0 0 O O l @ @ z P q 2 7 0 7 0 . . v . f . v . v 0 f p b + 3 x - H 5 i $ o 9 ", +" 9 O x < / q 0 0 f 0 f q 0 0 0 : 3 - * ; 0 0 0 0 0 7 f 0 Q 0 0 0 0 0 0 0 0 + + * = + 3 + x + + @ $ . . v 0 % v 0 0 0 0 7 0 v 0 0 : = h x 3 - 3 * d $ 9 o ", +" S A - = n 0 0 0 B 0 0 f v 0 0 $ < 3 * z q 0 0 0 . f 0 0 0 B . 0 . u 7 . 0 t k ( 5 n h , + = * + t 7 0 . 7 f f % . v 0 0 . 0 f 7 F : j # , h x 3 + > n . 9 o ", +" o 0 k * = + 3 - 4 2 0 f 0 0 C * n i . q + < + A 0 0 f 0 B f . 0 0 0 v 0 f 0 . 0 7 0 . 0 7 . . $ 9 ! ; r . f v . v 9 v 0 0 . v 0 v . 0 0 f f F 0 t 0 ; z I - * * z 7 9 % ", +" o t + * , # x , , / . 0 0 0 0 C + 3 + ) + 3 - G . . v p 0 0 . B 0 0 . 0 7 0 0 0 7 f 7 0 . 0 % . . 0 7 7 f v % 0 . 0 7 0 7 0 7 0 0 . 7 7 v v p p p f p f f f g < , = + @ ! 9 o ", +" % t - h r 8 ; h - + ; f 0 0 0 0 0 ( + + x # ! . 0 0 f 0 f 7 0 0 . p v 0 0 0 v 7 0 0 0 0 7 7 0 7 7 7 f 0 . 0 0 . v 7 0 . 0 0 0 0 % 0 % 0 0 f p p f f p 0 f 0 5 , 4 h x = * n 0 9 % ", +" % 2 # - V 8 . . 2 ! . 0 0 . 0 0 0 0 . t 5 3 h M 0 . v 0 7 0 0 0 7 0 0 . 0 v 0 . 0 7 0 7 . 0 7 . . 7 0 9 0 7 0 v 0 7 0 . . v 0 0 7 0 v . 2 l P 2 u p D f f p p f O 3 1 8 r G h - = z q 9 ", +" 9 0 = , V W . . F 0 0 0 0 q 0 B f 0 7 f ; + # M . p 0 . 7 0 v 0 0 . f . 7 0 0 7 0 f % 0 Q . % 0 % 7 0 7 7 p . 9 0 0 7 0 7 0 7 0 . Q 0 v C 3 * x n @ 2 p f f v p C + 4 ! # * - G X ", +" o X z # * n 0 0 7 0 0 0 0 0 0 0 0 0 f 0 . . 5 = C W . 0 0 0 . 0 0 7 0 W 0 0 7 0 v 0 % f 7 0 7 0 % 0 . % 0 . 0 7 v . 7 0 7 0 . p o v 0 7 0 : 3 3 + 3 * n u p f p p b g > J , * A . ", +" o 9 j - g c q . f v 0 v 2 0 p 7 0 . q 0 0 $ 5 x # q 0 0 v 0 7 0 . 0 v 0 0 0 7 0 v . % . 7 . 0 7 v . 7 . v . 0 . v . f . B . v . 0 7 0 v . 0 F O 3 * 3 * = n N p 2 t j - 6 G h 8 ", +" % 0 n > x = h 6 . . f 0 0 0 0 0 f 0 7 p . 2 C 3 3 = r % . 9 0 . 7 0 7 0 % 0 % 0 % 0 7 7 7 0 % 7 . % 0 0 7 0 7 7 p . % 7 v . 7 7 . . . 7 0 v 0 7 . 0 j # g g = + x k C j * 6 o _ % ", +" o k = = , + $ . 0 v . f 0 0 0 0 . 0 p . 0 C + = < g @ k 7 7 % 7 v % 0 . 7 . 7 o 0 % 7 0 7 . 7 0 7 0 % v 0 o . 0 % 0 Q 0 . % 0 . 7 7 7 7 . 0 . p 7 7 9 9 ! w + 3 + = + + x ; % ", +" p g , r G M . . 0 f 0 v p 0 q 0 0 0 0 0 0 0 : w Y + 3 + A M . 7 . 0 % % % % . % 7 0 . % . 7 $ % . 7 0 . % f 7 7 0 7 0 % 7 0 o 7 . 7 . f 7 0 7 0 . f 7 . % 9 . ; ; j - 3 < / 9 o ", +" n h 8 9 % . 0 v 0 0 v 0 0 0 f 0 0 0 f 7 0 . 7 . 9 ; # < = + l l O i q $ W . 7 0 % . v 9 0 . 7 . 7 . 7 . 7 . . v . . . 7 . v 7 7 7 . v . 7 . 0 7 v . 7 . . 7 . 7 . . ; # # * - O $ ", +"+ > z . W . 0 7 $ f 7 f 0 f v 0 0 0 v . 0 7 . f . % . ! j + - = 3 = + x * + + P $ u W @ n @ ) @ i P 2 ^ 7 0 7 v 0 % 0 7 7 . % 7 9 7 7 . % f v % 0 . % 0 % 7 . Q 0 % 0 . ! < < h * * + i . ", +"+ = r % 0 7 % 0 0 7 p 0 . f p 0 0 7 f 0 . 0 . % 0 0 % 9 . n I , = * = + x = 3 + + + x = 3 * = 3 * n @ i q q 9 % 0 % . . % 0 % 7 . % . W . 0 0 % 7 7 7 0 7 % . 7 7 0 7 u g a o ! * * 3 l $ 9 ", +"# * V . % . % . v . 0 . f . 0 f W f . 7 f 0 7 . 7 . 7 . 7 9 z # , < < g < = 3 = x x * 3 - - 3 3 x 3 = * 3 = * l z $ % . % 7 % . % . % 7 . . 7 7 7 . 0 7 . 7 0 7 . . 7 . ; * G o o 9 r w * * + M o ", +"5 = l . % 7 7 0 0 7 0 0 f v 0 . b . v 0 . . 7 f 0 ^ 0 . 7 % . 9 M ; c < x I , < 3 , < < G Y = < 3 < , x - < + = = @ @ ^ % 8 . % . ^ 0 . 7 % . 7 0 7 % . 7 . W % 7 0 7 . q x Y o ! , = ) . 9 ", +" + - M 7 9 p % . p . 7 0 0 0 0 . 7 0 7 . . . % 7 p % 7 0 . 7 % . 9 ; z < < x < < x 3 < A 3 3 < c 3 < , a Y x < = = * + i 7 7 . 7 % 7 7 0 % 7 7 % . 0 % 0 7 7 0 v 0 7 0 C + 1 A g < d $ o ", +" ! * > n i 0 q 0 $ v q . 7 0 v f . 0 0 ^ 2 ; $ 0 % f . 7 7 . v 0 7 9 . 9 r # < = < < x 3 x < < < x , 3 - Y s M G 4 # = 3 * l o 0 . % . 7 % . 7 7 7 . 0 7 0 0 7 0 v . v t = G _ 6 # - - G ", +" G 3 + = # n @ n + + l q 0 . 0 % . . C + > + ` 0 % v 7 . . . 9 v 0 . v 9 9 $ w h < < < < < < < < < < < = l o X o J G h * + @ 2 % 0 . 7 $ v % 0 . % W 7 7 . p 0 . p $ O 3 i G h r ", +" A ' * x > + x 3 3 A 8 . v 0 0 Q 0 d 3 3 > 5 $ q $ 0 7 7 7 0 0 7 0 0 % . 9 8 ! ; x < ] < < < < c x < a ~ o 9 X X 9 $ 5 + / 0 $ ) x @ * i . W . % . 7 7 0 7 0 7 & + = K ", +" O < < < x - < 3 z $ 7 0 . 0 q n x 3 3 3 - > * n z 2 $ B . . v 0 0 f v . 7 9 . - < = < < = < < < - / 6 A z O S o . $ + x * l * * 3 = * 3 d + i q 8 7 9 7 0 . . q 3 # r ", +" 8 # , h < < < - O . p 7 . q n x + 4 w h < 3 + x + = H k q q p 7 0 0 7 0 7 . M - < < < < < < , - 6 n > 3 > + @ M $ [ c 3 , = < < = < > , 3 3 d n S % 7 v 7 0 ; , = ", +" O x x , h + x r . 7 u @ n x 3 c M . . ; + 3 - 3 = g * d r . q 7 f 0 . 0 % k = < < < < < < < c ~ @ x + = = x * { r = g x 3 < ~ Y = * } = = = g = - z $ 0 0 % @ = a ", +" 5 = , h $ 5 3 * O * 3 3 3 # h 6 . . 0 . 0 | ! r w # 3 x * * q . 0 v . v q j 3 < < < < < < = ~ r 3 x x < 3 < - c r x 3 < < - M i 3 < 3 < < < < < 3 * * * O @ - + ~ ", +" Y < + A $ F w g 3 3 * = , S . % . f 7 . 0 % v . % ! = 3 3 * l q . 0 . . z = < < < < < < = 1 r d 3 x , < < < = / H 3 < .< + M + x < < < < < - c , < 3 * x g x + ", +" q x Y . . q j 3 , 4 ..8 9 . 0 7 7 0 7 0 . 0 7 p * 3 < 4 h 6 9 0 7 0 q n 3 = < < < < c , r = 3 = < < < < X./ + x < < < o.; x = < < < < < o.Y < , < 3 x < < , ", +" g < * q q 0 $ ; ; G 8 % 7 9 v 0 . 0 $ . 7 9 2 j * 3 , = 6 . 7 0 W 0 O * a G < < < < < x - x < < < e < = < G h 3 < < 3 X.A z x < < < < < < / ! H , 1 h < , < = ", +" , 3 * O k t q n * @ M 9 0 % . p 7 0 % 0 7 q + x , < < d k $ % 0 $ O = = M 4 < < < < < < < < < < < < < c G < < < < < = V - < x < < < = c A + x 3 c G , < = < > o % X ", +" < = = + + + x 3 = R W % f 7 % p 7 p % 0 C = < < , 3 3 - $ . % 0 j + x / G > x < < < < < < < < < < < c l 3 < < x < X./ # < < < < = < c h > 3 = = h x < < , , % o % % . . 9 . . . o ", +" - , < < = , 3 x * 9 0 . . 7 . . v . . k * < w y g < 3 l 6 o 8 r 4 * - V + < < < < < < < < < < < < c - x < < < < - X.* < e < < < e Y = x e 3 < - < < < , a % 0 ; n + + @ # * * k ", +" ! 4 h h 4 G , 3 + i 7 % v 0 7 . % 0 $ + 3 5 m O.+.< < * * $ O A 8 G 3 = @.< < < < < < < < < < < < < x < < < < < x g x < x < < < - = x < < < < x < < - % C * * Y r 6 9 M G < * ; ", +" s _ s 9 - 3 < G 0 . . % 0 7 f % k 3 = ( #.( : +.< 3 = h $.1 _ $ 3 = g < < < < < < = < = < < < x < c < < < < < < < < < < < < x 3 < < < < < ] < c c o % : + 3 s 9 % % 0 . . O = %. ", +" % o 5 < + A $ . v 0 7 0 q O # x , +.&.+.O.#.+.I < 3 * 4 8 o ; , < < < - < < < < < < < < < - 4 r $ G Y G h , < < < < < < < < < < < < < < < < G % O * - V . v 0 0 . 0 . q g # ", +" o A , < 3 @ % 0 0 o . F + x g h m +.&.#.+.*.=.g < x 3 d k 8 o M , < < < < < < x < < x h . 0 . 0 7 0 % 9 h < < = < < < < < x < < < < < = S 9 % 9 . * + G . 7 . 0 7 . B . . 5 3 ", +" n x , - h 6 % . v 8 u + 3 < 5 +.-.+.+.O.#.+.*.I < 3 3 > z M 9 r = < < < < < < < < < X.r 7 0 0 f 0 . 0 % 0 = x < < x < < < < < < < < < c I ) n k q 0 9 C 3 , s 7 p . . 0 0 . 7 C j c s ", +" ; 3 < < - 8 . % 9 v O * < < 3 ( +.;.:.O.+.#.#.+.y < < * = * P 6 6 4 A x < < < < < >.G . 0 0 7 0 . v 9 0 0 O < < < < < < < < < < < < < x = - x * 3 > * + n l + + * h $ 0 . v q f q q t z 3 c r 9 o ", +" h < g > P o % 0 q n = < < < g =.: ;.+.O.#.+.O.*.#.w g I 3 x + S 8 M G @.< < < < Y f . 0 % f 7 0 . p % 0 6 x < < x < < < < < x < < < < , # G w h # h + 4 # # c # z 0 0 7 0 k * = * + = < 3 + A 0 ", +" + < + 1 o 7 . n x g w 5 ,.<., y :.#.m #.O.+.O.#.#.( # 3 3 3 l z M 9 $ Y 4 h 4 M . 7 0 f . 0 0 v . 0 . & = x < < < < < < < < < c < ~ M 9 9 9 $ . ! M 0 . ; ! ! . . . & . n = + x > g = , = * * : . 9 ", +" j = 3 - r q i * x , 5 ( ( y - <.I m +.: #.+.#.+.O.+.-.m 5 I * = * # q M . 9 $ 0 7 0 . v 0 0 . 0 v . v z x < < < x < < = < < , r 8 . . . 7 0 . v . B . 0 . 0 0 0 f 0 f 7 F $ ! ! ! r z r G r 4 * = A ", +" , = 3 > 3 = 3 3 + ( -.m : #.,.3 < g :.m 1.+.O.O.+.: +.;.+.2.g g = x 3.. f n P q $ 7 0 0 7 . q 0 0 ; + > < < < < < < < - V 7 . v . v 7 0 7 f 0 . . 0 0 0 f 0 0 0 v . 0 f . 0 7 % 0 % . 9 % 9 w , - ", +" + 3 3 3 3 3 = < w m : &.;.m #.y < < I m +.+.O.+.;.-.#.: ;.#.m ,.x + # ^ & 3 3 l q q T Q p 0 0 q 0 ) x 3 X.c = < < < < 1 9 % f 0 7 . p . f . 0 0 v 0 0 7 f 0 0 7 f . 7 0 7 0 0 0 % p 0 % 0 % ; + - K ", +" 3 = < < 3 < < I m +.;.*.m +.+.:.=.4.< 3 4.+.:.#.*.+.+.;.*.:.:.5 3 < # 0 $ t 3 3 3 + @ + l n + * * 3 3 - G 8 r 4 - < c S 8 0 i ; @ O n O l P O q f 0 0 f 0 0 0 f 0 . 7 0 . 2 O z @ l i q 9 i z 3 < 8 ", +" I < < x , < < ' < +.*.C #.;.m O.-.+.=.I < < ,.m O.O.: *.O.: =.3 < x # 0 0 0 ( + = = x g = x 3 > < 3 = 4 0 0 7 M < = = + n = = = > 3 = = 3 3 = + i 0 v . 0 0 0 f 0 7 p 7 0 = * x + 3 = + * * 3 3 - 9 ", +" * < h < x < , g < I m *.+.: ;.: +.-.*.+.I 3 < ,.y +.O.+.;.=.g 3 < , 4 M v . 0 t 5 3 3 x 3 < < , = , h M . % 0 f + x 3 3 x = 3 + g - # 3 * x + < z . 2 q 2 q 0 . 7 0 . . u j 3 = x = < > = 3 < c / 5.", +" w < x < < < I m < < ' 5 m O.: O.m +.O.+.=.I 3 < < +.+.O.=.y 3 I = w $ 0 . 0 . . ! # , < < < < + h ; $ 0 . f 7 q < < x x + , # G 6 M < 3 < 3 # q $ f C d 0 . $ 0 7 0 7 . 9 h < 3 , 4 4 h c h c Y ", +" A x < < I I : -.6.g < [ 4.: +.+.1.+.+.O.#.+.4.7.< < g 4.y 3 < < 4 . . f 7 0 7 0 . $ F ! ; z ; $ . . 0 0 0 . 0 t x 3 < < - / 8 9 9 9 . > < , z 9 0 0 t * g ) O q z 2 0 0 . 7 . ! - - 6 ", +" n < x < w : :.=.O.+.6.I < I 4.#.+.O.-.m O.: O.( O.4.< < 3 < c h 9 . 0 . 0 7 0 7 f . 0 0 0 . v T 0 0 7 f 7 f . O = g X.Y s 2 3 - ~ $ 0 0 f k 3 = 3 = = = * + $ 7 p . 0 q + ~ ", +" - = < # : O.:.1.m O.+.+.[ g < 5 #.: +.;.: ;.*.O.m +.g < < } 5 8 f 7 . 7 7 0 7 0 0 p 7 0 0 0 . 0 0 . f f . . $ O 3 c Y s ; = 3 $ % 0 0 . l x g - 4 h # 3 > q p 0 v % 9 ; A ", +" * 3 3 < :.:.+.&.*.O.#.+.*.+.4.7.g I 4.+.m ;.=.;.+.O.=.I < < O $ . . q v 0 0 . . v . 0 f 0 v f 0 0 7 0 0 0 0 P + 3 + 8.o $ 3 - 8 7 . 7 C 3 < x ~ # < O 0 0 . 0 9 $ , 8 ", +" 3 = < < j O.: #.&.+.:.O.O.+.+.#.4.g ' 4.m #.O.+.O.O.y < < < 3 * l 2 $ $ W 0 7 p . q 7 f . q . 0 0 f 0 $ 0 k x = * 1 o p 3 , S 6 v $ n 3 < c V : = A 0 . 0 % . $ - K ", +" = = 3 < < <.( O.+.*.O.+.O.#.O.O.( #.*.g < I +.+.*.O.=.I < 4.5 , 3 * + k n k i k + @ 2 q . 0 . p 0 0 W 0 . @ + = , - _ # x n i $ q = x , + M M + # $ 0 f 0 . % * $ ", +" # x I < 5 g I 3 I +.*.+.O.+.-.*.O.+.+.;.:.7.g < 4.;.+.=.g w ( T ! z O - - + 3 3 * + - 5 % 0 0 0 7 . 2 0 P * = 3 h ~ # < 3 > 3 3 - - a o 9 z * O $ . v . 2 3 / ", +" x < < w : +.4.3 < < 4.+.#.O.+.O.: 1.:.O.O.m y I I < I < , ( T 9 . . 9 9 q r ; ! 6 $ 9 . 0 % W q C N + ' x 3 + c K + = , < , e U s 9 j * G W 0 u + - a ", +" - < 3 5 *.&.#.4.2.< g 9.+.+.*.+.O.O.+.&.: ;.m =.3 < < g w ; . Q 0 % 0 0 . . . % . 9 0 8 q u O + + x x x * < < Y / G x n n k + = I 6 ", +" j x < I I 5 *.:.O.+.6.g < I y +.#.m O.:.;.:.;.:.+.y g < , # ; t $ 2 t q q q O z k O A O * * 3 x 3 x 3 3 3 - ~ 6 h - - - # 1 o ", +" 3 , w +.g [ g +.#.O.:.1.6.< < 3 5 *.: &.=.&.:.O.g <.< h 0.h = > 3 = + - * g x > 3 3 = 3 3 = 3 3 < < < < , a 8 M 6 M ", +" j = + : ( =.< < 4.+.O.+.#.*.+.,.< I y m *.q.O.: +.< < < c r | w + = 3 x 3 3 = 3 3 = 3 3 3 3 3 x 3 , = < < x ", +" < * 4.:.: ;.6.y < 4.j *.O.#.*.+.+.I < I 5 +.m ;.m 2.- 3 3 - $.# 3 3 < # # 2.+ < < h x < 3 < - x < < < - X. ", +" = < w O.O.+.m #.9. < I m O.:.m ;.+.y I <.h : m : 9.< , g 3 3 3 < , , j &.( +.g h , < < < - < , < < a w. ", +" < g j #.: #.O.O.+.< < < 7.y #.O.+.#.( 6.g g < y m < I ( 4.g < < < ' j ( *.&.( I 3 , < < < < a a / J 6 ", +" z * 3 4.#.+.;.:.*.+.,.' < < g 4.+.+.:.;.+.m 4.g < < < # -.m m 4.4.4.m +.#.&.: +.g < < < < < c _ ", +" n x < 5 O.#.:.#.: 2.- < <.< < ' < 5 :.-.: O.( O.y < < } 5 &.m : m O.m : #.:.;.y < 3 < < c x ~ ", +" G < < ( -.: 9.y 7.I I I I I =.g < ' y : +.m *.-.:.' , m #.m O.: : ( +.y y y 5 y g < < < x < Y ", +" 5 3 I j 4.g I I :.*.*.+.*.+.:.:.#.y I < I g +.+.,.< # g I g 3 [ < 3 < < < < 3 < < < < < < , 6 ", +" = x < [ 4 6.+.O.#.m 1.+.m O.;.m O.:.+.I < I 5 g < < < < < < h ,.h I g I < < < < < < < c r ", +" < < I w =.-.O.*.O.O.: :.O.O.#.;.( *.( y < < [ <.< I 4.4.< 3 I , g < < < < < < x < < < g ; ", +" x I 5 ( ;.+.:.O.:.O.+.;.*.&.+.;.+.: g [ < I ,.y :.:.+.< 3 < <.< < < < < I g < < < < < < < z ", +" = 3 w m -.+.;.+.+.O.O.+.: +.: #.&.2.I 4.+.+.+.O.m +.g 7.] 3 g 4.4.y :.m y =.< 4.+.g < < < Y ", +" h < # &.: ;.: #.;.O.: 4.2.y +.-.+.+.#.m #.+.O.5 [ 3 I < < 4.=.m O.+.+.*.O.4.< y +.I < < x l 9 ", +" O < I : :.:.+.+.y I ,.y 4.:.;.+.*.O.#.O.:.y I g ,.I y :.;.+.+.O.+.O.:.:.:.g - 4.,.3 I < < < z ", +" j = I 5 +.+.O.# [ 4.+.:.*.O.+.O.: +.#.: 7.h m :.m O.:.O.+.-.*.+.5 y g 3 x < < < 3 < < - c V ", +" 5 g < # O.m I [ 4.#.#.#.O.: O.#.O.m =.2.4.O.m :.1.#.;.+.+.6.g 3 ' < 3 3 I h I ' < < < < < x = / ", +" # 3 < < 5 =.+.4.=.O.:.+.#.O.+.6.:.9.:.4.;.+.O.+.+.+.y I ' 3 I < < < < I < [ < < x < < < < < 3 = h ", +" j = 3 < h #.#.m O.*.O.O.*.+.=.5 6.#.*.O.*.:.#.:.y 7.< < < < 3 ' < < 3 < < < < < < < < < < < < 3 = = ", +" Y g , < [ m #.O.#.O.#.*.#.O.y +.+.#.O.+.;.O.+.y < < I 4.4.g < < < < < < < I < < < < < I < < < 3 g l $ ", +" = x < < :.O.+.+.O.#.O.m +.:.+.O.+.+.O.*.+.y I [ } y m ' < .< I I < , g < < < < 4.9.( m :.g < < < < r ", +" < < < < 4.+.+.O.#.*.+.y y +.#.#.#.O.#.y 7.< y 4.:.2. < 3 I 4.j 4.3 <.< g 4.y *.+.y g I g < < < 3 , G ", +" x < 3 I +.+.1.+.y y I =.m *.#.O.+.+.g I ,.m *.+.2.< < g w g < < <.I y =.+.=.*.+.6.< < < < ] < < < - V ", +" + < , y I 5 y I 4.=.+.O.;.+.+.y [ } e.*.m ;.+.< < h 4.g ' < I 4.+.:.4.I I =.*.4.I < < < x < < < , / ", +" k < - [ , < ' 4.*.:.+.O.:.#.y 4.,.4.m : ;.:.*.9.< < I < I 4.=.y y =.y y y 4.g <.[ g 4.2.9.4.,.< < x 3 + O $ 8 ", +" ! - < < g < I 5 #.O.O.+.O.=.g 4.:.#.O.+.( ;.+.:.g < ' g ( +.=.I I +.+.*.< ' I y :.*.*.#.O.#.+.6.I < < , = * ; 9 ", +" 3 < < ] 3 h O.: O.+.O.+.y 4.:.#.m O.+.;.+.:.g ' < 4.( =.+.# 7.4.#.y < [ } 6.*.#.#.#.#.+.O.#.:.( 6.I x g < - ", +" * 3 < < , +.+.;.+.*.+.4.4.*.O.+.O.:.;.*.: 7.3 I 4.m #.:.g I 4.y < ' 4.y O.+.#.#.#.#.#.#.+.O.:.*.+.5 <.< < - ", +" < < , =.w 4.+.m y [ w +.O.m O.: O.+.5 < < I m ;.O.m y < < < [ 4.#.*.O.#.#.#.#.#.#.#.*.+.=.2.y 9.g < x - c 9 ", +" = < 3 # 7.' < 2.4.4.*.&.O.O.+.O.m =.' < h m O.m +.9.3 <.< < 4.#.+.#.#.+.#.#.#.*.=.y g < 3 3 < 3 < < < < c K ", +" 5 = < , ' < 4.+.:.#.+.#.+.;.:.=.y 3 , y ;.: +.;.y g <.- ,.y #.O.#.#.#.#.*.*.y g <.< < < < < < < < < x * O z z O ; t ; $ . $ _ ", +" 6 g e I < g m O.#.O.: O.m #.y 3 < # O.( :.+.:.=.[ ' h *.+.O.#.#.#.#.#.*.y < < < < < < <.< < x < < x < > 3 x = 3 x = + 3 = + n ; 9 ", +" + < , ' < O.m #.#.O.+.O.+.7.< < :.: ;.:.-.+.y < < 6.:.O.*.#.#.+.#.*.y [ <.< 3 < ] < ] < < < < < < < < < < < , = < < = - - * + z 6 ", +" ; < x < 4.#.O.#.#.#.O.+.y I [ m :.+.: ;.+.y I I :.+.O.#.+.O.:.#.6.g <.< 3 .< < < < < < - .< < < < < < < 3 < < = < < x - < 3 3 = n ! ", +" o # 3 , :.: *.+.O.O.+.g < 3 ( *.#.O.:.:.y < 4.: *.O.#.#.O.#.=.y < < < .< x < < < < < < < < < < < < < < < < < < ] < < < < < , < * = A ", +" # < , 5 O.-.O.#.+.=.< 7., *.O.O.+.*.y g 4.+.*.O.*.#.#.*.+.g ' <.< < < < < < < < < < < < < < ] < < < < < ] < < < < < < < < < < < = = ", +" ; < 3 w #.+.#.:.+.g < I =.#.+.#.+.+.g I :.#.+.#.O.*.+.=.7.< < 3 < < < < < < < < x < x < < < x < < < < < = < < < < < < < < < < < 3 < A ", +" w < # -.m O.O.y ' < 4.#.*.O.+.=.g ,.:.O.+.O.O.*.*.g ' < < < < < < < < < < < < < <.< < < ] < < < < < < < < < < < < < < < < < < < x 9 ", +" = I 5 O.m +.g e 4.+.#.#.*.#.[ } 4.O.#.#.*.#.+.g < < < < < < < < < < < < < < < < < < < < x < .< < 3 < < < < < < < < < < < V ", +" n 3 < h m g < I +.:.+.:.+.g 4.y O.*.#.*.#.y [ < < <.< < < < < < <.x < < < < < < < < < < < < < x < < < < < < < < < < < < < < < < < - < 6 ", +" h < 3 I I < :.m O.+.y [ I +.*.#.O.#.+.g < ' < < < < < < < x < < < < < < < < < < < < c a < < < < < < < < < < < < < < < < # ", +" O x < x < 4.-.#.( =.I < 2.*.O.#.#.+.9.[ ] < < < < < ] < < < < < ] x x < . ] x < < c c V M c < < < < < < < < x < < < < < < c ", +" 8 5 , < < 5 5 +.:.y 3 e.+.*.#.*.+.4.3 < I g < < < x < < x < < < < < <. .< - < < < < < < x - G V s / < - < < < < < < < < < < , a ", +" s 9 , 3 < I h j I I =.=.O.#.#.y <.I 9.5 < < < .< < < < < < < < x < < < < < < < < < x = n S _ 8 < < < < < < < ] < < x x ", +" 9 $ * < < ' 3 < w O.#.*.#.+.< < I :.y ' < < < < < < < < < < < < x < < < < 3 < < < x < x > r ^ C = x < < < < < < < < , r. ", +" P - 3 , < , < < # ! +.#.O.+.,.< 3 e.q.I x < < < < x < < < < <.< < < < < < < < .< < < < 3 < 3 - + x x < < < < < < < < < X. ", +" < = < # G ! , < < # m +.*.:.g ' h ; r x < < < < < < < < < < x x < <. < < < < < < < < < < .x < 3 3 = < < < < < < < < < x ", +" x g = Y F b 5 , 3 3 3 I +.=.< < w w + ' x x < < < < < < < < < < < < < < < x < < .< < < < < < < < < < < < x < < < c c 6 ", +" = x , 5 2 b t j I < 3 I 2.< < .! 5 3 x < < < < < < < < <.< < < < < < < < < x 3 .< < < < < < x < < < < < < , X.V ", +" 3 3 3 ; t C F ( x < < x < 3 = 1 4 < < < < < < .< < < < < < < < x < < < < < < < < < < < x < < < < < < < < x = A S 9 ", +" + > - O & & C : 3 < < < < < < 3 / # x < < < < < 3 < < < < < < x < < < x < < < < < < < x < < < < < < < < < ] < x = * n n n M ", +" * < j t & C m < < < < .< < 3 - c < < < < < < < .< < < x < < < < .< <.< < <.< < < < < < .< < < < < < < < < < e 3 < x * x # ", +" # 3 h j C & : 5 < < x < x < < < 3 < < < < < < < < x < < < < < x < x < < < < < < < < < .< ] e < < < x = c 4 h < < < h g $ ", +" C * = z &.: b j ' x < < < c # g < < < < < < < < < < < < < < x < .< < < < < < < <.< < - c @.= < < < / ; F F C m } < = < V ", +" 3 g + t & t -.g < < < x 4 ; ; w = < < x < ] x < < .< < < < < < < < x < < < < < < < < e < x <.< = A 2 b C & & 0 F h , < n $ ", +" 4 x * 5 C &.C w # < < < 3 O b t ( h x < < x < < < x < <.< < 3 .< < < < < < < < ' x < = e - < x - # t t & & & C & C b t m < - ", +" + A t C &.&.: * < x 3 < j t n = x x < c c @.- c x < < < < < < < < < < < ] < , X.@.x < < w t & C & C & & & & C b 0 j g - ", +" # 3 * j C b t m I < < < 3 * * 3 3 = } - z z 0 ; A < < .< < x ] < < ] <.< < < < < X.K = < = h O & : & & & & C & C & C & 5 x = q ", +" ! < < # O C & t b I x < x < 3 3 3 h ; b b b j O 3 x < 3 < < < x < < = .< < < = o.t.8 8 * x # m b : C &.C : & : & : & & 2 m * 3 h q ; t O O n n 4 i 9 ", +" % C < 3 = ; & & : t =.< < < < x < A t 0 & k + x x < < @.A > c c - c = = < < < @.$.o % g g w ; : : & : : & j & C &.C & & n 3 x 3 = 3 = 3 = 3 < - 3 / ", +" _ # = g + F C C &.; , < x < x 3 3 n C n + x g # 5 ; t & ; t ; ; ; ; @.c < < < x > $ . F j ; & & C : & & : &.: : & & & t 5 x < 3 3 = 3 < 3 x h x - ; ", +" M 4.= 3 n O b & : C 4.< 3 .< 3 3 3 x 3 x # 5 O j : & : & & b C b & ; O # < x 3 H 2 2 b & : & : t & : & C & & C &.t C 3 < e , < < , < , , a 4 o ", +" o 9 5 = = + O C & t C : I 3 < < 3 3 x < x x g 3 j t & C C & & C & : f t m 3 3 x # t f &.C &.C &.& C &.C & & C C : + 3 < c G 6 a L ! J s _ X X ", +" o h 3 * t b b b F F 5 < < < < < < 3 ' 3 3 O & & &.& & : &.C & : & q =.h 3 x z C & &.C & & C & C & b b & m + x x < , s _ ", +" 9 % o 9 7 8 6 5 < 3 3 # l C C b t b t j I , g < I , < # 4.j b C : C &.C : C : &.& & b m - 3 3 t C b & t & t b C b t C z + 3 < < h G ", +" f 0 n = + * + = = 3 < x 3 = # C b p C & t b b ; m : ( -.; : C &.C & &.C : &.: & C & C & 0 [ x 3 n t t ; q C C n n = + = g 3 , < , y. ", +" f + = x > = 3 > 3 x < < < 3 3 * O C b & & & & C & F F b C & b &.& C : C : &.C : : C &.& t b * < 3 3 = + = g + x 3 x 3 x 3 x x < = h ", +" + + < x 3 = I x < = 3 < < < < < < 3 3 # k 2 b t & C & & C C & &.& C : & : &.& : & : & : & C b q g < , , - 3 3 x 3 3 3 3 < < 3 < , e G ", +" 3 3 = 3 x - 3 < < < < x e < < < < < < < x 3 3 3 * z t F 0 & t b & b C & &.& : : C & & +.& : C & C j + 3 < Y 9 . ; Y ( h # e , h 4 ", +" = = c < 3 , < < x < < < < < < < < < < x < < < < < 3 + + k C C & & f C & & C C &.& & &.: & & & & C y = , - w M 9 . $ ", +" h - < - < 3 - e x , < < < < < < < < < < < < < < < < , e - < x 3 3 * # n C t b C b &.& C & m b t C t O + * 3 h r ", +" J ~ E 4 h c c X. # = < 3 3 = ' = + l z t ; q F t ; C O g x 3 3 < e ", +" , , < < = g x 3 3 + + + * + + = + 3 = 3 , , ", +" r G h h e < 3 < < x 3 3 x 3 3 x < ' - ", +" r # , h , , , < c "}; diff --git a/pixmaps/calvin4.xpm b/pixmaps/calvin4.xpm new file mode 100644 index 00000000..42c213cf --- /dev/null +++ b/pixmaps/calvin4.xpm @@ -0,0 +1,178 @@ +/* XPM */ +static char * calvin4[] = { +"76 116 59 1", +" c #000000000000", +". c #FFFFCCCCCCCC", +"X c #999999990000", +"o c #FFFFCCCC6666", +"O c #CCCC99990000", +"+ c #808080800000", +"@ c #666666660000", +"# c #000055550000", +"$ c #CCCCCCCCCCCC", +"% c #999999997C7C", +"& c #CCCC99999999", +"* c #999966660000", +"= c #FFFFCCCCFFFF", +"- c #EEEEEEEEEEEE", +"; c #999999999999", +": c #CCCCCCCC9999", +"> c #BFBFBFBFC0C0", +", c #666699996666", +"< c #BABAFFFFD7D7", +"1 c #DDDDDDDDDDDD", +"2 c #FFFFCCCC9999", +"3 c #AAAAAAAAAAAA", +"4 c #9595A6A62C2C", +"5 c #666666663333", +"6 c #25256A6A0606", +"7 c #CCCCCCCC6666", +"8 c #91917B7B7979", +"9 c #FFFFFFFFCCCC", +"0 c #555555555555", +"q c #666633330000", +"w c #999966665252", +"e c #CCCC99996666", +"r c #66669D9D3C3C", +"t c #333333330000", +"y c #666666666666", +"u c #CCCC99995E5E", +"i c #CCCCCCCC0000", +"p c #D2D266660A0A", +"a c #CCCCCCCCFFFF", +"s c #FFFFCCCC3333", +"d c #FCFCFFFF6464", +"f c #FFFFCCCC0000", +"g c #FFFFFFFF9797", +"h c #CCCC66666666", +"j c #9999CCCCB7B7", +"k c #CCCCCCCC3333", +"l c #333333333333", +"z c #14141D1D0000", +"x c #666600000000", +"c c #FFFFFFFFFFFF", +"v c #141475757575", +"b c #666699999999", +"n c #FFFF9999A2A2", +"m c #CCCCFFFFFFFF", +"M c #99996666CCCC", +"N c #666666669A9A", +"B c #CCCC9999FFFF", +"V c #FFFF99996666", +"C c #FFFF99993333", +" .Xo ", +" O+@#$ ", +" $+%&@O ", +" *%=-*; ", +" :@> .%,.<. ", +" X+121X@3@+@@ ", +" -@41.-5562-.@% ", +" 7@8192%;1..:+8- ", +" ++@@081.9219:%+@#q#@3 @@+ ", +" >we&;e:.9:.-r@@#00q@@@$ X+O@4 ", +" X -.-.92-92:w55t0y u@@ iO p@ ", +" %+.71212.929-a.80@@72o@@ @7s2OX ", +" @#@@#19$2-2921%@ty2doo@@ i+2dso+: ", +" $>&;*7$29.:+@@@t@@7fgoo*@ #OdfdgO@ ", +" >33$X3-29u@3>ah6@ooogfo+ i@:foosgp+ ", +" >+6@#@@+$$.> = a@@7odfogoq ++osgfgs2* ", +" X#@5h@@q+4j .#@Xgfdsod++ .+XgssdfddfX ", +" 3@#r222u@@@@Xj a@#@fdssdoo@+ $@Xfdgosdo2+$ ", +" 6@@joo22kp+@@@+q@#:sgfsdoo@@ X@e2fsdosddO+ ", +" a;@t@d7sdo2o2e@@l@@Xofodsg2o@+3,@Xdodosddoo+O g ", +" .@5t+2dfogio227*@qr2gsodsgfo@@@t:sdfdsssgso#: 4 ", +" a#@#Xkfgffgodo.eu7fdsdsdfd22e@+oofdssddfd2u@9 X ", +" u#@@+:fgffdfgf2goofdfdodfogso7gskOogfsdfdop+ 9g+ ", +" 8@t@@XOdofdfodfdsdfdsdsfdso7u+@@@+ioofdso2X@9o@ ", +" .r@q@q@kgfodsogfgfoodfkX+6@@@q#@t@+odosgdsoX+g+; ", +" 9odsg.h@#q@sfgofddfdfdods+@6q@#z@#@qt@tXofgsfogoOfeO ", +" gsfgfdfogooeo2osdosdsodfdO+#@t#qq0tl0l0t@tkdfdodfgso7+ ", +" do7gkos777o2ogsdsdsgfodfiq@#@zq5l0lq00lq0t@@Odffdofdoo+. 9 ", +" :kdiOX+@++Ogsdfdfgfdfdss+t#@qq0ll0000t00l0tt@@ogffdssddo7299ggd ", +" 7++t@@@*OOkofdoofdfofdo7+#q@tt80000t0t0q000w@t@7fsgsodsf2O6#@+X: ", +" :3&3&$22goodfodooodsdfoX#@#q00-1x000t0l0l08=&@@@7dfodfdgf2kOu2 ", +" godssdsodssdkOik74#@q0l0t-=8l0q00l00q:1.$@#+Odsdoffodsgog. ", +" 2gsdf7dfodfdi@@#@q@@w8>hy@qac+5lvq00q0;..9..@t+Ogfododfgfoo ", +" .gsf7O7ofgfiX@@tt@ql1..-2-g2-e@1$@@tl08a..92.921e@@q+sof@@t6+u ", +" 7X+#Xfgof7+x@t@0q#4$.91292-.=@#@@lye$...9:.<2-..1w#q+72*#w@@#@i ", +"7++t@*:osdi@q#qlt0l08-2.912-g<2qww8>=1.19..9.9:9.-2$*@q+o+y-a&;3= ", +"@@@w$ ksgO@@t@l0l0l@4..979.<...61=.-:929o9-292-o<29.=w#@7+;=-c- ", +" >= a.2dO@qt#l0yq00ty192-2929$9@-.-2-2-2-2912$21ij7$92w@+#; :e37 ", +" . 7:Ot@z0q@a=8l00q7212-2929$$.:929.9291:e++@#@qt72-=8#q@q@6@q+.9 ", +" . 2@X@tt0t0ya-$@ql0qb-92-2-299.9212<7:++#@##@qt@5=9292005&$.;@@; ", +" a5@z@0t0t@>-->00#@+29.9.g-2.129$>*@t@q@#lqq#t@>.29.1wye-.-.;t+. ", +" . @#5z0ll0t5a:,@y>&1..92-2991g%++#@q#q#q00l0l05=9.$92.-..1.1:@qa ", +" j+t0l0t00lq#@#q*1.-..92-29..7t@#t@#lq00l0q0t0q*<2.9o--2$92<..@#. ", +" :4@#@q0l0q0t0qt@8=.9o192-992..92-2<.92.3@6@@0q0l00t0lt0l0q0@;..o9.2212-2129:@ ", +" ew$awa..1n3&3$.=9..929212j+@@ttl0l00ql0l00t000l0$9.1.9..9.929..4% ", +" m= 3:.-.--..-.929<29.$:+@@#t0lvq0lt00l0ll0t0l0@.792<291o92-79-%@. ", +" .m. % 2129192-2-2.-:7+#@t@qt0ll0l00q00000l0000y=..92-2g$.92-2:+y ", +" m=@:.9-29..g-2917+@#@t0ll0l00t00qv8n>>000q0te<.<.29$..92921%@& ", +" +,-29.2992-9O+@#q@t0q00t0ql0l000a..>.@l0t0$2.9.129<7.12$+@> ", +" %+71.$912-:4@@t0lt0t0t0l00l880qy.>..>=w0@@$.92929..*++#6*$ ", +" @+$<2$9.X@#t0@t0l00t0l0ltM=eq0yn1n1.$n6qy.-o12-29:6@5;$ ", +" = @+212.%@t@00lq00ll0l0l0z.>n>;&an1n$n1&5%1..g-29.%@@ = ", +" m:@@1..1n.$2$.$n1&;51.9..9929@@a ", +" $$@@:1&@#0t0l0lvq0q0l0l0qy.1n.1n..>...>@8292<9.29.@@ ", +" .+@ty$2#@ql0l0l0qvl0q000l0N=na..$...$.$e51..-292-2:@a ", +" j#@0@X1&500l0q0l0l0l0l0l0l@&1..>..$=n$.w%.-.g-299-%* ", +" +$.@t;1.$*5000q0l0qvt0l00008.$...>..1n351.9929..2$+3 ", +" 7@..%@y1.<2.-.%w0qvxvx0l00t0#53$n.$e%@#0>-.9929927@5 ", +" $r<.$0@:1o91.1.=>;w0q000q0lt0q@588q@q@0@..29..9. 4@> ", +" .#28wlyl00l0l0q,...912:21:4= ", +" .@#@q0#&-2-.99$.9929.9$.=.&hy5l000t0>-9:7+@@6+@3m ", +" >>&a0@@7.929.291212929.g---.$.$&;w%.$++q@6q@#q#+2 ", +" &@#@;.9:-92929$.921.99.-.-.-.-.,@@t5l8y05l@q6$ ", +" 8@t+67. 29.129.9.9.7292929.$%6q@83jaaaaaaNl@@9 ", +" =%@#@#%:1.9.129:-2-.9:.1:X++y3aaamam1m$1am3#@= ", +" =&5@t@@,O<:9$29.9.:.14+%a$mam$mjm$m$1m$maa52 ", +" =>w@@x6q++X%++++%+63aamjam:m$m>m>mjam$mjjb ", +" =>3w@@#@#q#t#@8;m$mj1m$m$m>m$m>mm>mjma+2 ", +" =%@t0#q05aamjmjmam>a+5 ", +" >y0l@,aamja>m>ma$m$majm$a1m$a>mjarp ", +" $r#50Namm$m1m>m>m<>mjm1jm$m>mjm$ma3@: ", +" >r6@508+m$$m$mja$m$1mjajjm>m$a>m>mamar@. ", +" i@#lyaam$mm$m$mjm>m$amjm1jm$m$m>mjm1m%@; ", +" >8t50#;mjm$1m>m$m$mj$mjm1jm>m>m>m$ajm$a+@ ", +" 7@@+$&w5@baamm$m$a1ajmm>ajam>m>m>m>m1m1am%@; ", +" %@X:-.-=8l@4m$1ma$m1m>m>m>m1a>jmja5+ ", +" :X+3.-..$X+w;@#8a1amm:a$am1m>m>m>m>m>m$m$mm$mj;@ ", +" %*e-.-.%++ea =y@,jm>m$ajjra$a1a>m>>mjaa@1 ", +" 2Xe--2 X++> =+#ma$ma$m$m>mjj+@,jam$m$m>am>m$j+3 ", +" .X+o- 2-4+w a@3jm$m;565%a$m>m:m>mj$aj1m;@ ", +" 2+@&-.. X@3 :5ama1jmj3@65;aaamjajm>m>mm1mj1j@3 ", +" O@1.- 2.2@@a . .t,b@+@t8Baam:m>m$ajm$m>mmjmj1mq# ", +" :@$..9..9-.3+4 -@6q@#qb>m1m1a>m>mjm$m$m$jm>maa8@ ", +" O%- 1297.9..#, @#0t0yaa1m:am1jm>m>a1m>ma$m>m$jt@ ", +" +1.+X91u,79-*@> ;#0@N8v,1m$a1mjm>m$am>1m>m>mj@8 ", +" @-7@%..1*@3$4@y 7@qbaaj@j$m$m:m>m>m$amjmaa>mjjm$maj$a1m$ma@, ", +" .&-4@@j9.7@y>>= 4@0m$m$a>m>ajmjm>m$jm$m1m$m>mj$@3 ", +" >$.5q#+:.$tr= 80@+a>m$m$mjm>mjmjam$jmj$m$1mab@, ", +" :,+#y3q+jX@y +@#@,a$m>m>m>m>mjm1amajmm1mj1mq@; ", +" 5@5,==;@@wa X@#33@@bja$m>m$m>majm$+@bq@+@ ", +" = Ot@jaB8#q,aj855,b>ajm$;;jamam>mj+#a2#@* ", +" :@#b$m>mm$m$mam>m$m$1m$m$mjm1a$6q3.1*@e ", +" e#@,a1mjmm$maam11mjm>m$m>m>m1am$mjmjm$m>m$m1jm$m1a1a1<%508-2.+@V ", +" ;5@a:mma11m1m$m$m$7mja3m>m$ma$majmjmjmja3b5%291e*7 ", +" u6yma1aam:mm$mm:amjaab7$92.%@+++u", +" :@@a1m1ja1mjm$j,+@@;=a@q,a1m$am1a$mjm>mjm;%9219e@#@@@", +" 86+j>ma$m$mjb+@e: = 8@@ja$m$m$mmjm>m>ma>62$92.@;&q#", +" *@,a$mmj3+@63=. . .#@am1am>m$jm>m>m$1r@$..19*$.4@", +" *@5#t0q08=$92 243 .@#amjm$mj$mmj1a$m@;1.9:92$4@@", +" a8w000#%:9.:9 +> m$@b>mjmjmm1$mamj%@X9$9.2$+@*u", +" a=3w5>.197O@a @qj$amaa$m1jm$+#@y.9219O@@2 ", +" a5+r%X@6% $@@,j>m1amjma3#@yq7.:9.;6C ", +" *@5@8a= q@@,%am:m74#ya;@t%1::+@o ", +" a = a;6@#@+y@t@@3j8q5#@@@@> ", +" =%w@t5@885@ql3=a%w8a ", +" m=aa = awy> "}; diff --git a/pixmaps/calvinf.xpm b/pixmaps/calvinf.xpm new file mode 100644 index 00000000..a8194e73 --- /dev/null +++ b/pixmaps/calvinf.xpm @@ -0,0 +1,156 @@ +/* XPM */ +static char * calvinf[] = { +"148 103 50 1", +" c #000000000000", +". c #999999996767", +"X c #CCCCCCCC0000", +"o c #666666660000", +"O c #000055550000", +"+ c #7474B0B03333", +"@ c #8787CCCC9999", +"# c #808080800000", +"$ c #999999990000", +"% c #333333330000", +"& c #A7A764640202", +"* c #666633330000", +"= c #2A2A66660101", +"- c #CCCCCCCC9999", +"; c #999999999999", +": c #CCCC99996666", +"? c #CCCCCCCC3333", +"> c #FFFFCCCC9999", +", c #CDCD8B8B1D1D", +"< c #FFFFFFFF6666", +"1 c #FFFFCCCC6666", +"2 c #FFFFCCCC3333", +"3 c #CCCCCCCC6666", +"4 c #CCCCFFFFCCCC", +"5 c #FFFFFFFF2222", +"6 c #CCCCCCCCCCCC", +"7 c #FFFFCCCC0000", +"8 c #9999CCCC4949", +"9 c #FFFFCCCCCCCC", +"0 c #5F5F66665F5F", +"q c #080826260000", +"w c #9999CCCCCCCC", +"e c #FFFF99996666", +"r c #C0C0C0C0C0C0", +"t c #666699996666", +"y c #666673735959", +"u c #9E9E73735555", +"i c #EFEF99994747", +"p c #555555555555", +"a c #808086868C8C", +"s c #AAAAAAAAAAAA", +"d c #CCCC9999CCCC", +"f c #595900000000", +"g c #CCCCCCCCFFFF", +"h c #333333333333", +"j c #B7B71E1E0C0C", +"k c #1B1B82825858", +"l c #99999999CCCC", +"z c #FFFFCCCCFFFF", +"x c #9999CCCCFFFF", +" ", +" ", +" ", +" ", +" . ", +" XoO+ ", +" @Oo# X+ ", +" $# @o%o &O* $ ", +" =o# oo*X O*o - @$ ", +" o ## #%;:#- #oo- $o ", +" & oX? #*->,#,< -*O-1 #oo21 $, 1 ", +" # Xo- oo> 2,##3 ,1#o+@ooo:< >4$o <# ", +" # >1$,5 oo61113#oo,13*oO*o,7114#=,1,o ", +" 8 >11o3 #o9<7111X,1113&oo:>12 &oo>1#% ", +" & 11X$X oO172<7<>17<11>,117<1#oo323% ", +" o3111$ 3 oo9<72<72<271<211117+oo112oO ", +" #$7<11& 76o.77<177<217<71211?#oo111:Oo ", +" .o>712X&X?o>11711171<771<7111?,>111$o0 8# ", +" 8#OOo o317<11&#O,7<117<7<7111717<21>17<>#o+-+o$ ", +" 3oqo*==o$3 *#>2211 #&-27<72712<7XX2217<72<771?%oo=.1 ", +" woO%oe:oo#$3- #o,<17<7>111177<17<71?#11$?7227<121.o#,1- ", +" roo%-11$oo#-- - 8*#1127<212121?7<7212X&1O$111<77<7111>1 ", +" wo%,111>,Oo$$3-4-Oo&<17717<2?111717<1&##o12127<77111111- ", +" 9+*t1<7111#=oo##o*Oo71222271<77211171$%o11X7<1721271>11171<1172127<17<7<117<2<277<72711173,$$ ", +" -.Oo&?1221<7<2<711<1717271<7377127<77177171117221<7$Ooooa #o ", +" so%%o#17<7171717<71171<11722177<17212<12127<212171$oor +ooOo+ ", +" oo%%oO,1112<71<727<127<71<7<727<71<271<1<771<7<7?&%o #os9o%0 ", +" w%%oqo#117<711721277127<17171<277<722172127<11731O%o .o.9soO& ", +" 3 -o%%*O:1<771<71<71715<77<721171117221<7122171<7,,oO* #od98fog---- ", +" -6aphoo2<71127<27<17<271777<7<127<212<717<527<2,#y%*# o#$ O*-9&o08##o#X ", +" 3 3+8+###=oOos>1171<7127127<771721117171<771<72121721171Xqohhp +:u#*y9--*o*.r-%o ", +" #oooOo%oooo&$,:11117<717<17<17212<17<7<7<27<11X<17<1717<1>+oph%o##8 3O:996sr>9>>--99.o. ", +" -.-,-:>31>11111111171<77127<71<27<7712<7227<71<717712<77<&&Oy%%o%*. w#%.$o996>99>3:$o X3$###$#@ ", +" 1111111112111?7<27<7117<277<722717<17717<71172177<17711uoh%*o:oO&4 wooO&-19>-9-ooo@ @#o%oOoOoOoo$3 ", +" - 711<71<72<7211171272<71711172211<77211<771<711211727172=ou%p>3&o#..##.hys99--9>>-.os $o%p;rsss;.oooo:r ", +" ?121712711727<2?7<121775127<212<27177<27112770%*Oo*Ooo:69-.o&3>-9ao#1 $Oop6----->-6s0Oo$ ", +" >1<7112115211171<772<71271<771<72<71117<72<72171<7125#$2&o:#qy:,o%O*j&jjhu>3Oo=ou9>>oOow @#odh61---1--3-:oOo: ", +" 177 17<2X?1X<1171217221177<11X<177<7<271177<17172112+o1#Oyq*%o=%%%p*f*u*OoOoar0=.>;Oo% +*.hh6-----3>->-ao=o? ", +" 3 X1177?X&$&##,721213211<72<772<7712177712<72171171<7X1,o:o*O*hh%*hp%qhhh*h*qosg ;#Oo*ps oOghg--1-3---3---.*=# ", +" 11?$#o%ooO=o:?<17<212272271217217<121751722127<127221#o#O%phhh*ph*hhhhhh%%p%#8 6 6sr6 wooph-r--3>--3-->-ra%o8 ", +" 13#ooO*Ooaruo9>11372<712112112111<72121721<771277121$?ofo*h%p%ujjjju*h*h*hh*ho*o-6 - 6 8*o%po:-3---33>3-3>soO# ", +" o%oOy.r .o, 9-1217217<77<717<27217<17<1727<27<123#,%ph%ph*jjjjjujh*jjj&hqpqoOOoOooo#o##8 6rOo ho0 33->----3>36s%o8 ", +" ; g %r:99113112171171<77171577227<711727722Xoo%*%hjj,ju&jufhjjj,jufh*j%*O%oOO%%%*OOo@ -oO9h@& r>-3-3-3333,.oq.6 ", +" ou9>-9+##$1<7212222222121122171722127?uo*&uhjjj,&jju***j,jp*jf&j,j*%%j*%*j&***%%=.-3-666o=#g6oy$#y##o#o#0okyu=%3 ", +" Oo-9>>>311171127<27127<1X<1751771171+%&&jpj,jujjju*jj,jjp**ju,jjfhfujj,jj,j**%*%%o%qo$-@=*Oo.O%ou.-r;a.p=*o#p*O, ", +" oo4::34e>?1<7<72712<217717717711<72?&,&jj*jj,j&j**jjj,j**jujjju*hjjj,jjujhp*j*hh*%p0%oO*%O*O*ppl6-##oO*y0au.upoa ", +" o*3:99193,271712X$X,7512321217<2711o,&,jyjj,jjj**j,juj**j,jj,j**juj,jju*h*jj0hh*ppyga%*Oph%pOdlyy*oo0:;-6-9-6r%$ ", +" #o;9>-98o#11<7$ooo%o.7712122217127O&&jjyf&jj,j0*juj,j*hjjjujjp*jjj,j,*f*j,jjfhhp0h;6&O*h*phag 6*=ar-6--3---3--#* ", +" ;*&-9>>>-911Xo#$r>6:o117<7<175121#ojj&*fujj,j**jujjj*hj,j&j,*jjuj,jufpjjujjh*hh%;p;+hfk%p%og gaor>-01---1----aO#- ", +" *o4::3>>931$os999>9.$1172722712#o%&j**,j,,ju*j,j&jh*jjjuj&fhj,j,jyf*jujjhhhhhp%*hr*Opfpqhos 3.goar-s-----3>-33%o6 ", +" ;*o->:99193o$>:9919.o,<21221XXoo%%j&*jjjjj0fjujjj**,juj&jh*u&j,j**juh%h**0hph%hp%ooh%phhh*tzto.so-1----3---3>;oO$ ", +" o*s99>-993%;99>-9>:O:7122?$*%O%&j%f*jujjyfjjj,,f*jj,j,jp*jj,,ju*jh*0urs6-ssa0*qhh%phhhp%ha 9oog#06>333>--3---ooy ", +" oO#6-9>>9#O:>-9>>4-*+2223o%o%ojjj*q,jj&uf,jj,jf*uj,j,jh*j,jjj**jhous9--3----rshpphphhp*pho9 wo#go3-->--3>---ro%# ", +" #o*:4::3>>:6:4::31.%:11Xo%oq*jj&j,fhjjj*jjejjjpjj,j,jhjjjjuj**jp%a6--1--:->3--sohp%phhk*hkg z=o; %---3---3>?3%pO ", +" oq#6>4::9919>-96>uo,11o%%%*%j,j,jj*hjjj,jj,jhjjjjjj*hj,j,j,*ju%*s3>3--1---3-3-rphh%ph*hqo# o%#g;#-->--3---so%# ", +" .oq>6199>-9-9>>>6#o>3$o%*ju*hjjj,jjp*jjjujjy*jj,j,jhjuj,j,j*j*ha66-----3>--3>3&%phhhphhh%o.6Oo*#g+.-->33-318fOy ", +" ro#>6>-9>>4::39-=,3#*%j,jjjj**ujjuj**j,j,**jjujjjhj,j,jjjhjj**6g--1-3---3>--:hyphphhhphhqo=**%O&rs$3-1----.o*t ", +" o% 1>4>-->9>+$opro*O**j,jjij0fyjj,jj&j,j*jjjj,ufujj,j,j*j,j0* -r--3>--3-----3s*hhphhhhphh*hhpyOo.ry$@3>-3o%pa ", +" s*o>>4:9>>4::6.o.o**jj%*jj,j,jjf,jjjuj,jf,j,j,jhjjj,jjj**jjj**$o:-3---33-33--;&;;0hhp%phhp%kyrgl*o*.s###.ooh%# ", +" #O*1619>4::4::9-.%jjj,jp*ujj,jjufjj,jjjhuj,j,j**jjuju&j*j,ji*h;o0h33->--3-13#$r--:pp%p*phhpl 66yOo.rr.o%%p0; ", +" oo01>6>619919999ojjjujjjhfjijj,jjh,jj&**jji,jjhjj,j&jj*j,juj*Ous*rr>-3-3--to:ru3-r6pp%phho. 9 grhofo*Ohho ", +" O*%o>4:>6>-6>--$*jj&j,ij,***j,jjujf,j,%j,jue&jjujj,juojjj,ju**k6oa6--->-:#o;.#.-->3rop%ppl a0Op*0sg ", +" o=oO619>149149$o*pjj&jjjjj**ujj,jjj*jfj,jj,,jh,jj,j,j*jjuju*hh*saos->-s#o.;.o:--3---rphO. 6w ", +" o=*0>6>-,to+o#*&jj**jjj,jju&j**j,ju**pjjj,jjfpj,jj,jpj&j,j*hphhp@uoss$y0#uy.6-3-3--3-sy*=. ", +" ro09>149o*%%h%*j&jjj**jjj,jj:j**jjjjj*uj?j,jhjjj,j,fjj,jj&hhhp%p*g;oOoy0a-9-3>>-->-----o%=. ", +" .o?363u*0apphhf,jujj**j,jjijjjjjjuhhpj,j,jhjjj,j,jhjijujfh*phhO%oga*p&-6-a6--1--:3-3--rpOo ", +" #*oooo%ay%*ujhujj,j,j**j,jjuj,*h*hh%h*jj,hjjuj&jpjjj,j,phhhph*hO&;0pd61-s3>3--1-->->--#*O ", +" ;;a0p%%p*jjuf,jj.jjujpjj,j,jhhhhhpph*0h*j,j,juf,j,j,jhhhph*p0aO.g;o36166-----3>-33--;Oo ", +" -0pp%%*jj&jjjj,j&>j**jj**hhalsppp%fhpjj,j&fjjjj,jhhphhhhp*go%;gro;6g--1-3---3>--3:Oo ", +" gahhjujjh*j&j&jjjujh*hhor g6 l0hh*0j,j*,j,,j*hh*phph*O%a%o#6g##9r--3>--3--3>-tof ", +" -#ohpfjjjjhjjj,jjju*hhpg #a;h**ju*j,jju%hhhhhhph*O*hOoosg#o6-3---33-3--3o%o ", +" 6+osshh*ujjjhhujjjufphao gahh*hjjj,*h*pphph%php%p%*%o#6ao.33->--3---.o%# ", +" -$=s99aohfuj,j**pj*hh*l 9aohh*ujjhhhh*hhhhhp%p%hphOo%asoo+883,$#$oO%p ", +" #os>9-9;ppf,jj,j**ph%o 8 6ahp%***hhphhphphhphhph%p*%%otd;ooooyyayo%o ", +" #os99-9$o*0hf*ujjph*hpho .ofkfkhhhhhhhphp*khhhp%k*h%*=l6zgg zs=%ps ", +" +o-9>>9+oo6g;pp%hhhhhyaut - lpfpfa;phphp*phhh*hphhfk%ppO*o#.-#o=%o.6 ", +" $#$# 8os9>>1$o0g ap*hhhpg - r0Oplgohhp%k*phhphhpphhp%l tooO*OOohag ", +" #oooo* o.9>>9uo+ glpp*t 6.6 lhp*phh%pphhphhp*O* - wsssr;r ", +" Ou >.ooou 9916=og roqhhphp%hphp*p%pp66 ", +" o.>69;*#69>-9## pppphphhp%p%php066 ", +" oo9>93od>>9>>oa - r#%hhh0hhphppag ", +" %*8>>-:9916ooor- xpppphhp%oar ", +" oO&99>9>-9#oq0 wo*ppppawg ", +" oo=*y-9>-9>>.%%*=$ 6 66 6 66 ", +" oohus-9-94::39s00oo# ", +" o*s69>X4::3>-99 9 #o ", +" *o9>3=*3>9>$o8->>9uo ", +" o,>+OoO:9>3*O*. >-o# ", +" *,$O,&o,>>sos0o&.#o. ", +" Oh&:,o>19-=6 .+oOyg ", +" e1:o21>,or ; ", +" ?#o6 ", +" >##+o%3 ", +" #o%y ", +" u& ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/pixmaps/dragon.xpm b/pixmaps/dragon.xpm new file mode 100644 index 00000000..cfb8510d --- /dev/null +++ b/pixmaps/dragon.xpm @@ -0,0 +1,448 @@ +/* XPM */ +static char * dragon[] = { +"170 232 213 2", +" c #000000000000", +". c #F8F868684848", +"X c #F8F880805050", +"o c #F8F860605858", +"O c #C8C82C2C2C2C", +"+ c #8C8C28282C2C", +"@ c #DCDC48484444", +"# c #B0B044444444", +"$ c #6C6C1C1C2C2C", +"% c #48481C1C3434", +"& c #484814142424", +"* c #343420201010", +"= c #282818180C0C", +"- c #6C6C44442C2C", +"; c #1C1C2C2C2424", +": c #343448481010", +"> c #444438380C0C", +", c #F8F830302C2C", +"< c #D8D848485858", +"1 c #F8F860605050", +"2 c #48483C3C2424", +"3 c #202020203434", +"4 c #8C8C58582C2C", +"5 c #50502C2C2424", +"6 c #1C1C50502424", +"7 c #484858583434", +"8 c #3C3C2C2C2424", +"9 c #C8C8A4A44C4C", +"0 c #343410100C0C", +"q c #F8F888886060", +"w c #A0A038380C0C", +"e c #303014142424", +"r c #282844441010", +"t c #242458584444", +"y c #F8F878786868", +"u c #A4A47C7C4848", +"i c #6C6C5C5C2C2C", +"p c #C8C884844848", +"a c #707078781818", +"s c #E4E484844848", +"d c #F8F880804848", +"f c #D8D8C0C02C2C", +"g c #F8F8A0A05050", +"h c #6C6C34342C2C", +"j c #F8F87C7C2828", +"k c #202018180C0C", +"l c #484858582424", +"z c #A4A488882020", +"x c #F8F8B4B48080", +"c c #F8F870705050", +"v c #F8F894946464", +"b c #F8F890907878", +"n c #D8D884842020", +"m c #F8F888884848", +"M c #F8F878784848", +"N c #A4A498984848", +"B c #F8F8BCBC6464", +"V c #F8F898984848", +"C c #F8F878785050", +"Z c #A4A4ACAC5050", +"A c #F8F898988888", +"S c #7C7C2C2C4444", +"D c #F8F888885050", +"F c #A8A898988888", +"G c #181818180C0C", +"H c #F8F878785858", +"J c #F8F868685050", +"K c #181844440C0C", +"L c #F8F890905050", +"P c #28280C0C0C0C", +"I c #F8F894943030", +"U c #F8F8A0A04848", +"Y c #C8C85C5C2C2C", +"T c #101008080808", +"R c #1C1C50503434", +"E c #F8F890907070", +"W c #101010101414", +"Q c #D0D044445050", +"! c #181814142424", +"~ c #F8F848485C5C", +"^ c #707078784444", +"/ c #080840400C0C", +"( c #48483C3C3434", +") c #383888883030", +"_ c #787890903434", +"` c #2C2C78781C1C", +"' c #F8F898985050", +"] c #181810100404", +"[ c #F8F8A8A83030", +"{ c #606088886C6C", +"} c #D8D8ACAC4C4C", +"| c #F8F870704848", +" . c #343478786C6C", +".. c #F8F8ACAC6464", +"X. c #5454C4C46C6C", +"o. c #3838C4C43030", +"O. c #303078784848", +"+. c #181804040000", +"@. c #F8F8A0A06060", +"#. c #4C4C58584444", +"$. c #848440405050", +"%. c #A4A4DCDC5050", +"&. c #ECECE4E47474", +"*. c #F8F8F8F89090", +"=. c #F8F8F8F8B4B4", +"-. c #F8F8F8F8D0D0", +";. c #F8F8F8F8ECEC", +":. c #D4D4ECEC7474", +">. c #7878CCCC3434", +",. c #F8F8C8C86060", +"<. c #7C7C58584444", +"1. c #F8F880805858", +"2. c #F8F8E0E03030", +"3. c #F8F8F8F88888", +"4. c #F8F8F8F8F8F8", +"5. c #DCDCECECA8A8", +"6. c #F8F8F8F8A0A0", +"7. c #F8F8D4D4E0E0", +"8. c #80804848B0B0", +"9. c #F8F898987474", +"0. c #8C8C44445858", +"q. c #DCDC80806464", +"w. c #A4A4ACAC2C2C", +"e. c #ECECECECE8E8", +"r. c #E4E4ECEC5050", +"t. c #F8F8F8F89898", +"y. c #DCDCA4A48888", +"u. c #303040405050", +"i. c #F8F868685858", +"p. c #DCDCA4A4C8C8", +"a. c #F8F8ACACD8D8", +"s. c #A8A8C0C06C6C", +"d. c #343424244444", +"f. c #F8F8A8A85050", +"g. c #ECECF4F47474", +"h. c #383840405858", +"j. c #D4D4ECECE8E8", +"k. c #A4A4B8B83838", +"l. c #F8F8F0F08484", +"z. c #F8F8B0B05050", +"x. c #A8A8E0E0D8D8", +"c. c #F8F8F8F88080", +"v. c #F8F8D0D0A4A4", +"b. c #F8F890904848", +"n. c #F8F888885858", +"m. c #DCDC98987474", +"M. c #F8F89898A8A8", +"N. c #CCCC4C4CB0B0", +"B. c #F8F868689090", +"V. c #707078786C6C", +"C. c #181810101818", +"Z. c #A4A4DCDC2C2C", +"A. c #F8F87070C8C8", +"S. c #E8E8ACAC4C4C", +"D. c #A8A8E0E09898", +"F. c #C8C8D0D05050", +"G. c #D8D8E0E02828", +"H. c #F8F8F8F85858", +"J. c #F8F8F8F86060", +"K. c #F8F8F8F86868", +"L. c #D0D0E8E86464", +"P. c #BCBCE0E06C6C", +"I. c #DCDCD0D07474", +"U. c #A8A89898C8C8", +"Y. c #F8F8F8F87070", +"T. c #CCCCCCCC6464", +"R. c #F8F8D4D4BCBC", +"E. c #C8C8E8E85050", +"W. c #585884848080", +"Q. c #C8C8C4C45050", +"!. c #A8A884846C6C", +"~. c #30303838ACAC", +"^. c #F8F868682C2C", +"/. c #181810101010", +"(. c #F8F8C8C85050", +"). c #F8F8E4E45858", +"_. c #F8F8A8A84848", +"`. c #F8F8D8D85858", +"'. c #A8A844446060", +"]. c #F8F8F8F87878", +"[. c #F8F8F0F06868", +"{. c #F8F8E8E85050", +"}. c #F8F8B0B04848", +"|. c #D8D8ACAC2828", +" X c #F8F8C0C05050", +".X c #F8F8C0C03434", +"XX c #E8E8F0F06464", +"oX c #F8F8D0D05050", +"OX c #F8F878786060", +"+X c #202008081414", +"@X c #A0A0E0E06C6C", +"#X c #E4E4D8D85050", +"$X c #E4E4D0D05050", +"%X c #E4E4C4C45050", +"&X c #F8F8E8E86464", +"*X c #F8F8B8B85050", +"=X c #080808080000", +"-X c #F8F880806060", +";X c #040410101010", +":X c #F8F8C0C05858", +">X c #101010100808", +",X c #F8F8D4D46464", +" O , < ", +" 1 2 * 3 : : : & 4 & = 4 ", +" o 5 ; : 6 7 8 > 9 0 * = 4 q ", +" w e : r t : 8 w y e ; 8 * u ", +" $ $ : : t 2 8 ; u - % * 8 ; i p ", +" 1 % ; 6 2 6 8 = a s d 1 5 & ; * - f g ", +" h ; ; : 7 6 * - j @ + = k ; l z x ", +" , * ; : t l 8 * 4 j c O e ; ; * i v b ", +" O k ; 6 : : 8 h n m M 1 % * 6 : = N B ", +" + * 6 : r 8 3 4 V C 1 + ; ; : 2 ; Z A ", +" S 0 ; : 6 7 e k 4 D M @ & ; r 3 = : F ", +" # % * : t : : 8 G 4 H m J $ G K : k * z L ", +" M - P ; r : r 8 3 ; u D c + e K 6 * = - u L ", +" # 5 G ; ; : 8 3 ; 4 z . + e ; 6 8 e > 4 C ", +" 4 = k K 8 r r k r n C , * G 6 6 k ; I U ", +" + = k ; r ; ; k 2 Y o O T ; 6 r k R E ", +" 1 $ k ; ; ; ; * * z j d + & k K : 8 W R C ", +" C Y > : r * ; * = 5 j Q $ 0 ; : : ! ; 4 d ", +" O 1 ~ C 1 Y 4 8 8 * k ; k 5 j % = ; : t 2 G l n ", +" + + $ 5 8 8 e 5 % h - ^ 7 R ; k ; : r - j 4 & G / r r * ; Y j ", +" # ( 2 2 - i l : ; * = 2 ) _ ` t : 6 ` l a ' + ] G r : ; G 4 [ ", +" p 4 z Y ^ _ _ _ a ; * r { ) _ ) ) ) _ ) Z } s s | | $ G ; r r e ; I ", +" m | C u 7 { ) _ { ` e * ) _ { _ ) _ { _ { ^ .a ^ ^ * G * R 3 G K .. ", +" D M | z N ) _ _ X._ .> * ) _ ) { _ ) o._ ) a O.^ .a 6 K ; ; ; +.; @. ", +" M ~ w ( #.- ( ^ _ ) _ ) > 6 { ) _ ) _ { _ ) #.#.( 2 2 7 ` ` : 6 ; G ; X ", +" 1 4 $ 5 8 8 8 * r #.{ a { ) ) o._ { ) { ) ) i 8 e ; * 3 ; ^ ) ) ) a l a g c O ", +" o Q $.h 2 l : a Z _ a K ; : 7 ` i _ _ _ { ) X._ _ #.7 6 : K ; * G t ) { ) _ _ N .. S e e 4 ", +" C + $ : z %.&.*.=.-.;.;.=.:.Z : 8 7 O.) _ { >._ _ ) X.) _ ) _ { ) ` k r a ) _ { ) { | ,.<.3 P * #. ", +" 1.# % * _ 2.3.4.4.4.4.4.4.4.;.5.( 8 ` ) ) X.o.Z { >._ _ _ { _ { o._ t = r { ) ^ ) _ ) # B Y e k = 7 ", +" ' | 5 ; ) 6.-.4.4.4.4.7.4.4.4.4.4.8.; l #._ _ _ { ) _ { ) { o._ ) _ { l ; 6 _ ) { ) { _ _ 9.0.8 ; G ", +" q.# # * w.5.;.4.4.4.4.4.e.4.4.4.4.-.p k t ) { { { o.^ 7 O.{ _ ) _ { ) a r ; ) ) { ) _ { ) X.U 1 Y 2 r 8 : ", +" q.+ 5 l r.-.4.4.4.4.4.4.4.4.4.4.4.4.x ; : _ ) _ l 7 8 8 ; 2 7 a O._ ) #.; ; ) _ ) _ { o._ ^ N u 1.# & ; 6 8 ; ", +" 4 > { t.;.4.4.4.4.4.4.4.4.4.4.4.4.;.y.8 r t l : r : 8 ; 8 K : u.l 7 ) 7 6 ) ) _ { ) _ #.7 ) { a Y i.m @ + % = K ` i G ` ", +" # - _ 5.4.4.4.4.4.4.4.4.7.p.a.4.4.4.e.v ; : 7 7 _ Z s.s.s.w._ #.8 ; t ` ^ ) _ { o._ { ) ; 3 5 5 d.h + + $ ; : ) a i 5 ; [ ", +" f.4 * ` 5.4.4.4.4.4.4.4.e.8.$ 5 s.;.4.;.A 8 ` _ %.g.=.4.4.4.-.-.*.^ = ; l ._ ) X._ X.) _ 6 ; G G ; = ; * K ` _ _ _ h.8 a ", +" B 4 0 t 5.4.4.4.4.4.4.4.j.8.= u.X.=.4.7.8.* k.:.3.-.;.4.4.4.4.4.4.l.r ; : l ) _ { >._ _ X._ ` ` ` : ` : ) ) _ _ { - e 6 ", +" L X f.m z.# > { x.;.4.4.4.4.4.4.x.5 8 _ 5.;.4.8.S a c.t.;.4.4.4.4.4.4.4.;.v.l r 6 ) _ { >._ { o._ ) _ ) _ ) _ ) _ _ { 7 % * ; ) ", +" L b.D n.m H n.C L X 1 d o + + + + + $ + + L @.L D 4 > 8 F 4.4.4.4.4.4.4.4.x.z c.;.;.8.5 R m.M.N.7.4.4.7.4.4.4.4.4.-.{ 8 r #.{ ) { X._ _ X._ X._ { o.i #.2 2 e e = ; l I ", +" D D J . Y @ Y # w Q # # # w # @ + # + h - 2 5 2 > 8 ; * * 5 * % 5 + + # @ C u 5 G 3 7.4.4.4.4.4.4.4.4.*.-.7.B.8 ; { ^ S d.F 4.4.4.4.4.4.4.4.;.V.3 : ) _ ) _ o._ X._ X._ ) _ { R 8 C.! k ; i a n ", +" . @ + + @ + h 2 % 5 8 * 5 8 * 2 > 2 l l l i ) z w.k.z Z.>.k.z ) ) ) l * * * * 5 % 5 i 2 ; d.S A.a.4.4.4.4.4.4.a.N.S % 3 Z S.h.3 3 D.4.4.4.4.4.4.4.4.-.h.; ` ` { _ { _ X._ _ _ { o.{ ) ` ; ; G k > Z U ", +" | 1 @ + * * 8 l _ k.F.Z.F.f G.Z.G.G.r.r.r.H.H.H.H.H.H.H.H.H.H.H.H.J.H.H.H.H.2.Z.o.>.) : = * i l 2 3 * 8 % S % 8.N.S S 3 R 8 G t K.{ : 6 D.4.4.7.4.4.4.4.e.M.d.6 a { ) ) _ X._ _ { ) 7 - ) _ _ ) _ 6 ; = 4 c ", +" D @ + + - - a w._ >.f H.H.H.H.H.H.J.K.J.H.H.H.J.J.J.J.H.H.H.H.H.H.J.J.J.K.J.H.H.H.J.H.H.H.2.>.a l a a a 6 : : 3 3 8 % 8 d.; 6 ` : k N 5.L.P.I.j.4.4.4.4.4.4.4.U.0.r ) ) ) _ { ) _ 7 2 : d.8 8 ) { ) _ ) a 6 = - Q ", +" m 1 # 5 8 2 a a %.H.2.K.J.J.K.J.J.J.K.J.J.J.H.J.K.K.K.Y.J.J.J.H.H.H.H.H.J.H.K.K.J.J.K.H.H.H.H.H.H.%._ w._ { ) ) 7 ; : * ; 6 6 ) ` 7 t ; * T.4.;.;.4.4.4.4.4.4.4.4.R.h.t a { _ ) ) X.a ( % k e W 6 ) _ ) _ { ) i * & h ", +" | Y w - l a k.E.H.H.J.K.K.K.J.K.J.K.J.K.K.K.K.H.J.J.K.K.K.K.J.J.J.H.H.H.J.H.H.H.J.H.J.J.H.H.H.H.H.H.G.%.%.k.o._ _ ) ` ` ) ` ) ) _ ) ) l ; 8 W.4.4.4.4.4.4.4.4.4.e.e.F #.l ) _ { ) >._ { l > G G ; ` _ _ { ) ) _ t ; > 5 ", +" j - 5 7 f 2.H.H.J.J.J.J.K.K.K.J.K.Y.Y.K.J.K.K.J.J.H.J.J.K.K.K.K.J.J.H.J.J.H.H.H.H.H.J.J.H.H.H.H.H.H.r.Q.Z.%.F.k.>.{ >.>._ { >.X.>.X.k._ ) l ; t 4.4.4.4.4.4.4.-.e.M.!.~.l ) _ ) ) _ _ X.) ) l 7 G ; _ ) { ) _ ) ) l l * % ^. ", +" f.M # w i _ 2.J.H.H.H.K.J.K.K.K.Y.Y.Y.Y.Y.K.K.K.Y.K.K.K.J.J.J.K.K.K.Y.K.K.J.J.J.H.H.H.J.H.J.J.J.J.H.H.H.r.E.%.%.k.%.%.%.%.%.%.%.%.>.w.>.k.o._ ) l 6 3 0.j.;.4.4.4.a.v.N.0.( : ) _ ) { ) _ { ) _ _ _ O.; ; O._ ) _ ) _ ) ) 7 = /._ ", +" Y h - ` (.H.H.J.K.Y.J.)._.`.K.K.Y.Y.Y.Y.Y.K.Y.Y.Y.K.K.K.K.K.K.J.J.K.K.Y.Y.Y.K.J.J.J.H.H.J.H.J.H.H.H.H.H.H.E.G.E.%.%.%.%.Z.F.%.>.k.X.Z >.Z X._ { ` : 8 e S u 8.q.8.'.0.- ( r O.) { ) _ ) _ o._ { ) _ l G / ) _ X.) _ { _ 7 : 8 ; n ", +" < h - w.E.J.J.J.K.K.K.`.Y h 4 H.K.Y.K.Y.Y.Y.Y.Y.Y.].Y.K.K.K.J.J.J.J.J.J.K.K.Y.J.K.J.K.K.J.J.H.J.H.H.H.H.H.H.r.E.%.%.Z.%.Z.%.k.>.s.>.>.Z >.>.k.>._ ) t r 3 ; % d.d.8 3 d.; R ` ) _ ) _ { ) _ ) _ { >.a R G 6 { ) _ { ) _ ) ) ( 0 l [ ", +" + * i 2.H.H.J.J.J.[.{.f.Y l : h n Y.Y.Y.Y.Y.K.K.K.K.Y.K.H.K.J.K.K.J.J.K.J.J.K.J.J.K.J.J.J.H.J.J.J.H.H.H.H.H.H.r.r.E.%.%.%.%.%.%.>.>.Z X.>.s.k.>.s.>.) ) l ` K K 6 K K 6 ` ` ) _ { ) _ { ) _ X.) _ ) ) 2 k / ) _ _ { ) ) ) ) ( ! 4 }. ", +" # 5 l k.H.H.K.J.J.H.V M p w.k._ > u H.].].Y.K.K.J.H.J.Y.K.H.H.J.K.H.J.J.J.J.J.K.K.H.J.H.J.H.H.H.H.H.H.H.H.H.H.H.r.r.r.%.%.%.%.E.%.Z >.k.>.N X.>.Z >.Z >.) ) ) ` t t 6 ` ` 7 ) { _ ) _ ) o._ ) _ ) { _ .5 ] 6 _ ) { o._ ) ^ #.r C.4 V ", +" O + l Z.H.J.H.J.J.H.}.5 a 2.H.H.2.4 n H.Y.Y.K.J.H.}.o ^.' H.H.H.J.H.K.J.J.J.J.K.J.K.J.J.H.H.H.H.H.H.H.H.{.H.G.H.r.E.E.r.E.E.%.Z.%.%.k.s.%.X.w.>.Z X.w.X.k._ { _ ) ) ) ) ) ) _ ) ) o._ X._ _ ) _ ) _ X.) > & G 6 ) _ ) _ { ) ` : ! ; z ", +" 5 - k.H.J.K.J.J.J.H.n 8 k.2.H.H.{.Y n J.Y.Y.J.).Y + * & h z J.J.H.H.H.H.J.J.J.J.H.J.H.H.H.H.H.2.H.H.2.H.G.E.r.E.E.G.E.G.%.Z.%.%.>.k.>.Z _ >.>.k.X._ >.Z X._ >.) _ o._ ) _ { o._ { _ ) _ ) _ X._ { ) ) l e k 6 ) ) _ ) ) ) a h.e * a ", +" S 8 4 r.H.J.J.K.K.J.H.a > G.H.K.J.} + z K.].Y.J.^.8 ; r ; * ) E.H.J.J.H.J.H.H.J.H.J.H.H.H.H.2.H.2.r.H.2.r.E.E.E.G.%.%.%.Z.k.%.k.%.k.X._ >.>.Z X.w.k._ >.k.o._ _ X._ _ >._ ) >._ { o._ ) { ) _ ) ) _ ) a 3 k / a _ ) ) _ ) { : 3 = i ", +" * : %.H.J.J.J.J.J.J.H.u 5 |.H.J.H.Y > z J.Y.K. Xh : Z.G.a l z H.H.H.J.J.J.H.H.J.J.J.J.H.H.H.2.H.H.2.E.r.H.G.E.E.%.%.k.k.%.%.>.%.%.>.>.>.Z { >.w.X.>._ >._ >._ X._ _ o._ _ X._ { o._ _ { ) >.{ _ { ) - e ; K O.) ) _ { { l ; * C.l ", +" * l %.H.J.H.J.H.J.J.H.|.k i .Xr.H.Z & n H.K.J.p * f H..X2 4 G.H.H.J.J.H.J.H.H.H.J.J.J.H.H.H.H.2.H.H.2.r.2.P.Z.P.Z.Z.%.%.k.%.%.>.s.%.k.>.>.>.>.Z _ X.>.X.Z _ _ _ ) k._ { ) _ ) o._ ) { ) >.) _ ) _ 7 8 k G ` ) _ { ) ) ` 2 = G ; ", +" = _ G.H.Y.J.J.K.J.K.K.H..X* Z.G.XXg.G.G.2.J.H.H.2 t H.oXI : z H.H.H.H.K.J.J.J.H.H.H.J.H.H.H.2.H.r.2.H.r.r.H.2.E.G.r.E.Z.%.%.k.%.%.>.%.k.X.Z k.{ >.>.k._ >.>.X._ >._ X.) >._ X._ _ _ _ ) >._ { o._ t * G K ` ) _ ) ) a #.% e G ; a ", +" = ) G.H.K.J.K.H.J.J.J.J.H.Z.2.H.K.K.K.H.J.J.OXH.i 8 {.H.Y ; 4 H.H.J.H.B K.J.H.J.J.J.J.H.H.H.H.H.oXH.2.H.2.H.r.H.r.E.E.%.F.u F.%.%.k.>.s.k.>.k.%.Z X._ %.>.k.X._ o._ _ _ { o._ ) X.) { o.Z X.) _ - * G / ) ) ^ O.{ 7 8 +XC.G i z ", +" * G.2.K.K.H.J.J.J.J.J.J.H.H.J.K.K.K.K.J.J.K.H.H.l ` {.H.|.l z H.H.H.J.J.J.H.J.H.J.J.J.J.H.H.H.H.H.H.H.r.H.r.H.H.H.r.r.E.Z.%.k.%.%.%.>.k.>.>.Z { >.>.X.Z.>.>.w.X._ { >._ o._ ) _ _ _ o._ _ o.Y 2 8 ; ; 6 ) _ ) ` 7 5 ! C.G 6 n ", +" h : {.J.K.J.K.K.Y.K.J.K.J.H.J.J.K.K.K.J.K.K.K.J.J.H.H.J.H.{.2.2.H.J.J.J.J.J.J.J.J.H.J.J.H.H.H.H.H.H.H.H.H.H.H.H.2.r.r.G.E.%.Z.%.%.>.k.%.k.>.Z >.>._ >.Z k.>.s.X.w._ >._ X._ _ { ) ) _ { _ #.- k K ; 6 l _ { ) #.& * G 6 a |.U ", +" e i {.H.K.K.K.K.K.J.K.J.K.J.K.K.Y.K.K.J.K.K.K.Y.K.K.K.J.J.J.J.J.J.J.J.K.K.J.J.J.K.J.K.Y.J.H.H.H.H.H.H.H.H.H.H.H.H.H.H.r.E.%.%.Z.E.F.%.>.s.%.X.w.>.>.>.k.>.@X>.w.>._ _ X._ ) ) o._ ) O.l 7 5 * ; 6 l ) ) _ ` 7 8 = G ; a V ", +" 8 z H.J.K.K.Y.K.K.K.J.K.K.J.K.K.K.K.K.K.Y.K.J.Y.Y.K.J.K.K.J.J.K.J.J.H.K.J.J.J.K.K.K.K.K.K.J.H.H.H.H.H.H.H.H.H.H.2.r.H.r.r.#XG.%.%.F.Z.k.>.k.>.s.>.Z s.>.s.>.s.Z Z X._ _ o.Z _ _ O.- 5 * ; ; 6 ` a ` _ i 2 5 e C.G ; l ", +" k Y H.J.Y.].K.K.K.J.K.K.J.J.J.J.K.J.K.K.K.Y.K.Y.Y.K.K.K.J.Y.Y.J.J.K.J.H.K.J.K.K.K.K.K.K.J.J.H.H.H.H.J.H.H.H.H.H.r.H.H.2.E.E.#XE.Z.$X%.%.k.%.Z.k.>.k.>.k.>.Z X.) _ _ _ ) ^ i 7 - 8 ; K 6 ` a ) ) 7 7 r r t k G r ` [ .X ", +" G z J.K.Y.Y.Y.K.K.Y.K.K.Y.J.J.J.K.Y.K.K.Y.K.].].Y.K.].].K.J.J.].Y.J.J.Y.K.Y.Y.K.K.K.K.K.J.H.J.H.H.J.H.J.H.H.H.H.H.H.H.r.r.E.Z.E.#X%.%.r.>.s.Z.Z s.%.k.%.Z _ >.k.>.) _ a #.5 e 8 ; r ` ) _ ) _ ) 7 : 8 t _ : ; z |. ", +" k } H.J.K.K.K.Y.K.J.J.J.K.J.J.K.Y.K.K.Y.Y.K.Y.].].Y.Y.Y.Y.K.K.K.J.K.J.J.Y.Y.Y.K.J.J.J.J.J.J.J.J.J.J.J.J.H.H.H.H.H.H.r.r.G.F.E.%.E.k.E.E.Z Z.s.k.Z.X.w._ >.>._ _ ^ i ( 5 3 * ; 6 ` ) _ ) _ { ) ) ( 3 ; a %.z n ", +" ; .XH.K.K.K.Y.J.K.K.J.J.J.J.J.K.K.K.K.K.].K.Y.].].Y.K.K.K.K.Y.K.K.K.K.K.K.Y.K.Y.K.K.K.K.K.H.H.J.H.J.J.J.J.J.H.H.H.H.H.r.E.Z.%.F.G.%.F.Z.%.k.%.>.Z w.>._ _ _ _ - 2 2 ; r ; 6 l ) _ _ ) _ ) >._ ` 8 ; r 2 w.(. ", +" e }.H.K.K.K.J.K.J.J.K.J.J.J.K.K.K.K.J.K.Y.].3.].].Y.K.J.K.J.J.K.K.K.J.H.Y.K.J.J.K.K.K.Y.J.J.J.J.H.H.H.H.J.H.H.H.H.H.2.r.E.E.G.k.%.Z.%.#X%.Z.k.k._ i i ^ ^ - $ 3 6 ` l ) _ _ ) ) _ ) _ X._ ) { ` 6 6 ; * w.f. | 1 ~ Y < @ Q O @ V ", +" 2 = Y H.K.J.K.Y.K.K.J.J.J.K.K.J.K.K.K.Y.Y.].c.Y.3.3.c.].K.K.K.K.J.Y.J.J.H.K.K.K.J.K.K.K.K.K.H.J.H.H.J.J.J.H.K.J.H.H.H.H.r.G.E.E.E.E.E.E.F.z u <.- 2 8 3 * ; 8 ; ` a _ _ Z._ ) _ o._ X.) _ ) _ ) l ` l * l Z.U 1 w & & & * e e = k > !. ", +" U 4 e 5 p {.K.K.K.K.K.J.K.K.J.K.K.K.K.Y.K.Y.c.].Y.c.c.c.Y.Y.Y.Y.K.K.K.K.J.J.K.J.K.J.J.K.K.K.K.J.J.J.H.K.K.J.J.J.J.J.H.H.H.H.r.E.H.G.|.u u 4 5 5 : ( l l ) a _ ) ) _ _ o._ _ o._ _ _ ) _ _ ) _ { ) 7 7 t * a g Y w + # 5 $ e k ; ; ; ; * ; * i m. ", +" L c * = - n K.K.Y.K.K.K.J.K.J.J.K.K.K.K.].].].c.c.c.c.c.c.Y.Y.Y.Y.].Y.Y.J.J.K.K.K.J.K.Y.Y.K.K.J.J.J.H.J.K.K.K.K.K.H.H.H.H.H..XY Y u - 5 * * r a _ _ k.Z.G.%.G.r.G.>._ k.{ >.w.>.>.>.>._ ) X.) _ ) l ) l * * 5 % 3 e = k k ; K ; : K : ; k a [ ", +" }.4 * * 4 Q.K.K.K.J.J.K.J.J.K.Y.K.Y.].K.c.].Y.c.c.].].].].Y.Y.K.Y.Y.K.J.Y.K.].Y.K.Y.Y.Y.K.K.J.K.J.J.J.K.K.K.J.H.H.H.H..XY - 8 8 l 2 l ) G.>.%.P.Z.E.E.%.E.E.%.Z X.>.>._ >.Z X.w.>._ _ _ _ ) o._ ` l 6 * G 3 = ; ; ; ; ; : K : K 6 6 * 2 |. ", +" j ; > > 4 H.K.Y.K.K.K.K.K.J.K.Y.Y.Y.Y.K.3.].].Y.].].].].Y.K.K.K.J.K.Y.K.K.K.K.K.Y.Y.J.K.Y.J.J.J.J.J.K.K.J.H.).}.j | Y - * * l z Z.G.2.2.E.r.r.r.r.r.E.H.H.2.Z.k.Z >._ X.w._ >.Z X._ ) ) Z _ _ ) ) ( * G ; ; K K ; G K r r ; 6 l l ; a ", +" b._ 5 * 5 + n [.J.J.J.K.J.K.K.].].K.Y.Y.Y.Y.].c.].Y.Y.Y.Y.Y.J.K.Y.J.J.J.K.K.K.K.K.K.K.K.K.J.J.H.J.H.H.H.oXY 5 5 : l l _ z |.f `.{.H.H.H.r.r.H.H.r.E.E.r.H.r.H.>.>.%.Z.>._ _ >.Z _ ) >._ ) _ 7 7 i t * ; G G r ; ; ; G ; K r R l r 2 ", +" z - > 0 5 4 s S.%X{.&XH.J.K.K.K.Y.K.Y.].Y.K.K.Y.K.K.K.K.K.J.K.J.J.J.Y.K.K.K.K.K.K.K.H.).*X_.U 9 p 4 # > 2 a Q.} [ 9 u 4 a u z N .X).H.H.H.H.H.2.H.r.H.H.r.E.%.%.E.E.%.%.Z.X.o._ _ X._ X.2 * l : ` K G G ; ; K ; K K r r R 8 8 l ", +" 9 4 l * > 5 h h @ # | M }.*X).{.J.K.Y.K.K.K.J.K.K.J.J.K.J.J.J.H.J.H.{.H.).`.`.}. X1 @ + 5 - - 7 2 l 4 |.}.s u 0.- l i l a #.i a z %X{.2.{.H.H.H.H.2.H.H.H.r.E.r.H.H.r.G.%.w._ _ _ _ _ l K r t ` l ; G G * G K K K R r ; G ; w. ", +" .X.Xf z i l > > * * 5 5 $ $ + # M . | m (.).{.J.{.(.oX(.(.b.1 Y # + + + h h $ * > ; l a i N n b.I I 4 Y 7 7 ) ) ) ) _ ) ) ) i a a ^ ^ z N f r.r.H.H.H.2.H.E.E.r.G.E.H.E.Z ) 7 7 >._ _ K ; : ` t : ; =XG ; ; r R r 8 ; l z }. ", +" .X|.|.i l ; : > > * ; > 5 & 5 5 + # w # # + + + + h * 5 * ; * * * > l 4 z z n n U b.| n p _ _ ) ) ) _ ) _ _ ) _ _ ) ) { ) a a 7 _ _ Z r.H.2.H.r.H.G.H.2.L.E.r.E.w._ 2 t >.>._ r 3 6 7 ) l r G G ; ; ; r R r : I *X ", +" j 4 n z _ a l r * * * * * * 8 * = * * * * l l a l z z [ 2. XV }.-X1 Y 4 _ _ ^ ) _ _ ) _ ) >._ ) _ ) o._ o.) { ) ) a ^ _ |.#Xr.E.r.H.H.r.H.r.r.E.r.Z ) 5 : Z s._ r ; r ) ) 7 ` K G ;XG ; ; l ( 7 `. ", +" 4 4 4 4 4 - 2 2 - l l [ .XI V XL d m Y 4 _ ^ _ ) _ ) _ o._ _ ) _ ) _ ) >._ _ _ _ ) _ ) { ) _ _ k.E.H.2.H.H.H.H.H.r.H.r.w._ ( O.w.Z _ r ; 6 ) ) ) 7 ` ; G G k ; ; ; _ ,. ", +" n q D m j M ^.. a _ _ ) _ ) _ >._ _ _ { o._ X._ ) >._ { ) o._ o._ o._ ) _ ) N k.{.H.H.H.H.H.H.2.r.#X%._ a t N _ ) r ; l ) a { ) 7 r k W G ; * ` r. ", +" . ^.u Y _ _ _ _ _ _ _ _ _ { _ { ) o._ _ _ ) >._ _ o.w._ _ >._ X._ _ ) _ _ ) _ o.{.2.H.H.H.H.r.F._ %.%.2 7 a _ a 8 ; K ) ) ) ) ) 7 * G G ; K .X H ~ < < @ S. ", +" g i. # w # h i a _ ) ) _ ) _ _ { o._ o._ o._ _ o._ _ _ _ o._ X._ ) X._ >._ o._ o._ o._ ) _ N N |.{.H.2.r.k.Z.E.E.w.l i >._ ` ; : ) ) a { ) 7 : ; =XG - _. m ' | # + w h & = 5 N ", +" L c Y h > : l 2 2 l ) a ) _ ) _ _ _ _ ) _ _ _ ) o._ >._ _ ) o._ ) _ k.w._ ) >._ _ _ _ _ _ { >.) _ _ _ ) _ k.#X{.F.%.%.r.r.N - i Z ) 7 r 6 ) { _ ) ) ) l / =XG h Y X o w + & & 0 e e * /.G ; N ", +" ' @ # # 2 7 _ w.9 f f E.k.k._ ) _ ) a ) { ) _ ) ) ) _ _ _ X._ ) >._ ) _ { ) >.X.w._ >.{ o.o._ o._ o._ X.) X._ _ _ _ N k.E.r.E.k._ a _ _ _ 8 6 l ) _ ) { ) ) l ` G ;XP 4 . Q O '.$ e ! k 3 ; = K r ; k > n ", +" g n.o 5 * - i Z.G.H. X{.H.H.H.E.E.E.Z.o.>._ _ _ _ _ ) _ _ ) _ ) >._ _ X._ ) >._ _ _ o._ _ o._ _ _ _ _ X._ _ _ _ ) _ ) { i k.r.G.%.E.N 4 N >.a 8 K : { ) _ ) _ ) ) 7 t k G * + % & 5 * G ; ; * K ; r ; * * a 9 ", +" :X`.Y 0.- l a Z.H.J.K.Y.J.H.H.J.H.H.H.H.H.J.J.H.r.r.E.Z.%._ ) _ ) _ _ _ ) _ o._ ) ) >._ _ X._ _ _ ) _ { o._ _ o._ _ ) _ ) a ) w.%.%.E.Z._ - k.%._ ; 6 ) ) ) _ { ) _ ) _ ) r /.] = k ; ; 6 ; K K K 6 K 8 k ; Y [ ", +" d ' Y #.i >.G.H.H.J.Y.K.Y.K.H.Y.Y.Y.J.J.J.J.J.J.H.H.H.H.H.H.%.%.>._ _ ) _ _ _ _ o._ X._ _ o._ ) _ { ) >._ _ _ ) _ ) _ { ) _ >.>.%.%.Q.%.N i a Z w.a K l ) ) a ) _ { ) _ O.7 t k ;XG ; ; r r K 6 r R r 8 G : a U ", +" m @ h 2 i w.H.H.K.J.K.K.K.Y.K.K.K.K.Y.Y.K.J.K.K.J.J.H.J.J.H.H.H.H.H.H.%.>._ ) ) ) _ _ _ _ ) _ _ X._ o._ o._ ) ) o._ _ ) _ ) ) E.E.%.r.E.Z.k.Z #.2 4 k._ R ) _ ) { _ ) ) _ ) ) ) ) r G ;X* ; 6 r ; 6 t l ; * ; z U ", +" oXs h 2 a Z.P.H.J.K.K.K.Y.].K.Y.K.K.K.K.Y.Y.K.K.J.J.J.H.H.J.H.J.J.J.H.H.H.H.H.%.o.%.>.) _ { ) >.) >._ _ _ ) _ _ _ _ _ ) _ { >.Z.E.G.E.Z.E.k.k.%.%.>.- * <._ 2 ` ^ ) ) ) _ { o.^ ) a 7 ) ; G T ; : r r : r ; = K n ", +" # # u - l k.r.H.J.Y.Y.Y.K.K.Y.K.K.Y.Y.K.K.Y.K.K.K.J.J.J.J.J.H.H.H.H.H.J.H.J.H.H.H.H.H.H.E.>._ ) _ _ _ o._ o._ >.{ ) o._ { ) ) >.k.{.G.E.%.G.%.E.%.Z.Z k.4 * ) i ; a ) ) ^ { ) ) _ ) { ) t ) : G =Xk ; r ; ; 8 = ; a ", +" @.1 h 8 * 5 i ) H.H.J.K.J.K.Y.K.K.K.K.Y.Y.Y.J.K.K.K.K.J.J.J.J.H.J.J.J.J.H.J.H.J.H.H.H.H.H.H.H.H.E.>._ ) ) _ _ _ _ X._ _ _ ) _ ) ) o.Z.`.r.%.%X%.k.F.$XF.k.>.k.z * a - r ` a ) _ ) _ ) ^ _ ) 7 ) 7 ` 8 ;XG ; K r 3 k ; ) ", +" g 1 4 2 l _ k.2.H.J.Y.K.K.K.K.Y.K.K.K.Y.Y.K.Y.K.K.Y.K.K.J.J.J.H.J.H.J.H.H.J.H.H.H.H.H.H.H.H.H.H.H.H.r.>._ _ ) _ { ) _ ) o._ ) _ _ Z.E.G.E.F.k.G.%.%.k.Z.k.k.k.k.4 * l : r ) { ) ) ) ) _ ) { ) ) ` .7 : W G ; ; ; ; a z ", +" X J 0.h 2 w.2.2.H.H.J.K.K.J.K.J.K.Y.Y.J.K.K.Y.K.J.J.J.Y.K.J.J.H.H.J.J.J.J.H.H.H.H.H.J.J.H.H.H.H.H.H.H.H.H.r.Z.X._ ) _ _ _ _ _ ) _ ) w.%.E.H.2.Z.Z Z k.Z.%.%.k.%.>.s.4 * l 2 : a ) a { _ ) { ) _ ) _ ) ) ) l ; =XG k k r Z f. ", +" 1 + $ > > ` z } {.H.H.J.J.J.K.K.K.K.Y.K.K.J.K.J.K.K.J.K.J.Y.K.Y.J.J.J.J.H.J.H.H.H.H.H.H.J.J.J.J.H.H.H.H.H.H.H.H.r.G._ ) l ) l ) ) _ ) >.%.r.G.E.E.F.>.>.k.%.F.k.k.k.Z _ & l 4 l : ` ^ { ) _ ) _ ) _ { ) _ { ) ` K ; =XG > p S. ", +" v < h * : l _ |.).{.J.K.K.J.J.K.K.K.J.K.K.K.K.K.J.K.J.K.K.J.J.Y.].Y.K.K.K.J.J.H.H.J.H.H.J.J.J.J.H.H.H.H.H.H.H.H.H.H.H.H.G.o.Z._ ) a ) _ %.r.r.r.r.G.L.Z.s.k.k.k.%.Z.k.>._ _ & > l l : ) ` ) ^ ) _ { ) 7 ) _ X.) _ 7 ` r G >Xl I ", +" 1 + 5 : a N Z.%XH.J.Y.Y.J.K.J.K.K.K.K.K.K.K.K.J.K.K.K.Y.K.J.H.J.Y.K.K.K.J.K.J.J.H.H.H.H.H.K.J.J.J.J.J.H.H.H.H.H.H.H.2.H.H.H.J.H.f _ o.%.%.r.H.2.r.G.E.E.F.k.k.>.Z k.>.Z >.Z a & * l l : ) ^ ` { ) _ ` 5 ( r #.a ) ) ^ t t * T l .X ", +" + h 8 l w.|.N E.H.J.K.K.K.J.K.K.K.K.K.Y.J.J.K.J.J.K.K.K.H.H.J.H.J.J.Y.K.J.J.J.H.H.J.H.J.H.H.H.J.J.J.J.J.H.H.H.H.H.2.H.H.H.H.H.H.H.{.>.|.E.H.H.r.E.%.%.H.Z.G.%.k.>.>.%.>.k.Z Z _ a ] * > 8 7 ) i ) ) #.: 3 ; ; ; t ^ 7 ) l t K P & Y ", +" + % * ) Z.[ u z L.J.K.K.K.K.J.K.K.J.K.K.J.Y.K.K.J.J.H.J.K.H.J.J.J.J.Y.J.J.H.H.H.J.J.J.H.H.H.J.H.J.J.J.J.J.H.H.H.H.H.H.H.H.H.H.H.H.H.%XZ.E.r.H.2.H.2.E.G.#X%.#XZ.>.F.G.%.F.%.w.>._ a G ; : ; a .a ) _ O.8 ; K ; ; ; t a O.` l 6 k 0 5 p ", +" | 5 8 : k.2.(.I %XH.H.J.{.,X).{.&XH.H.H.H.H.J.H.J.J.J.J.J.J.H.J.K.J.H.H.K.K.K.J.J.J.H.H.H.H.H.J.H.H.J.J.H.J.H.J.H.H.H.H.H.H.2.H.H.H.{.G.Z {.r.r.H.r.r.E.Z.k.k.%.k.k.%.Q.s.k.k.k.Z X.k.4 * K * K ` ` 7 ) a t r K ; ; * ; ` ` 7 ` 7 t k =X= h O S + + $ $ & & & & % ", +" M w 8 _ Z.r.H.%X|.S.Q.9 9 N u Y N u N 9 } 9 V S.%XoX`.oXS.*X(.(.%X*XS. X`.).).{.{.H.H.J.H.H.J.H.H.H.H.J.H.J.H.H.H.H.H.H.H.H.H.H.H.H.2.E.f E.H.2.r.r.G.E.Z.E.%.k.%.k.k.Q.Z.G.k.%.k.w._ w.a G : r r 7 7 ) 7 ) : ; ; K 6 / ; l ) 7 ) l ` k =X] e 8 5 8 ; * ; * ; * K ; = e e & 4 ", +" C + % 4 2.H.H._.u z _ _ _ a _ _ ) _ _ _ _ _ _ _ a { _ N z ^ a ^ _ a #.a a <.z <.z u p |._.`.).H.H.H.H.H.J.H.H.J.H.H.H.H.H.H.H.H.H.{.{.oXE.F.H.H.H.H.H.E.Z.E.k.F.Z.k.k.>.Z w.k.>.Z >.k.X._ > k : > 8 ` 7 ) 7 .: ; K K ; ; ; ` ) ) ) a R ; G =X; r 6 t : 6 6 6 : 6 6 : t : * ; a ", +" ~ > e ) H.H.H.9 a _ _ _ _ _ _ X._ _ { ) o._ _ o._ { ) _ _ ) ) { ) ) ) _ { ) ) ) a O.) i a 7 a u w.U .X).H.H.H.H.H.H.H.H.H.H.H.H.H.2.f w.N 2.r.H.2.H.H.2.r.E.F.Z.k.k.>.Q.w.>.>.Z X.w._ _ w._ 5 G : 8 ; l ` ` ) l t * ; ; ; K 6 a { a .l ` : 6 G k R : ` t 6 l 6 t ` : t l ; G K |. ", +" # $ * ) G.J.H.9 z _ X.o.k.{ o._ _ X.>.>.>._ _ { >.o._ >.) { ) _ ) _ X._ o.) _ _ ) _ _ ) _ ) ) _ ) i a a z S.).{.H.H.H.H.H.H.H.H.H.H.Q.w.>.r.r.H.H.H.r.r.r.G.E.Z.%.%.k.k.w.>.Z >.Z _ >.X._ o._ 5 G 6 : K t l O.i ) ` 6 K K K ` ) ` ` a ) ` 7 t : ; ] 3 6 t l : 6 : : 6 t : = * ; z ", +" S * r z 2.J.J.(.^ a _ w._ >._ _ X._ _ >._ _ >._ o._ X._ _ ) o._ o._ _ ) _ ) _ o._ o._ X._ ) _ ) ) _ ) ) _ ) z ^ n } H.H.H.H.H.H.H.H..Xf F.H.H.E.H.H.H.2.H.r.%.%.k.Z k.w._ >._ >._ X.) w._ w._ a 5 G r * 6 ` l ) ` ) ) ) ` ` ) ) a .) ) ) O.` : ; G G G r : 6 6 t 6 t : 8 ; k a n ", +" + * : o.{.H.J.*Xu ^ _ X.>.X._ >.X._ >._ >.{ X._ { o._ w._ _ ) _ _ _ _ ) >.) _ o._ ) _ ) ) _ o._ _ _ ) _ ) _ ) { ) i i n H.H.H.H.H.2.r.%.r.r.r.2.r.H.2.G.P.G.E.E.k.k.>.>.>.s.>._ Z _ Z.k.>._ _ ) _ > G K * 3 l ) i ) a ) a ) ` a O.) a ) ^ a #.7 ( ; ; =XW ; 6 6 : ` t ` r = G l Z. ", +" < h a k.r.H.J.)._ _ ) _ >.Z _ X._ w._ >._ X.) >._ >._ _ ) >._ ) _ ) _ ) _ ) _ o._ _ X._ ) _ _ _ ) ) _ ) _ ) _ _ ) a ) a _ 9 .X{.2.H.r.f r.H.2.H.H.r.H.H.H.2.E.E.G.%.w.Z %.Z k.k.>.w.) k._ _ _ o._ { l ] : ; G l ` 7 ) a .a ) ^ O.) ) ^ ) 7 t l r r ; ; G =XG K t 6 : t : 8 G r z ", +" < h l n H.H.H.J.*X^ _ >.X._ >.X.w.) o.>._ ) >.w._ >.) o.Z X._ o._ o._ { o._ ) ) _ _ _ ) _ o._ O.o._ ) o._ _ _ ) _ ) _ ) ) _ _ a N {.{.|.F.r.H.H.H.H.2.H.2.E.H.r.Z.k.%.>.>.>.>.k.>.X.w.>.>._ >._ _ _ a > ] 6 > ; ` ` ) 7 ) ` O.a { ) _ ) ) _ l ; ; 6 K K ; G =X;XK t ` : : 8 ! i [ ", +" # - : %.H.H.J.H.F.9 _ o.N _ X._ w._ >.Z X.>.w._ X._ ) >._ ) _ _ ) >._ ) _ ) _ >._ { o._ X._ ) X._ _ ) _ _ ) ) _ ) ) _ ) ) _ ) _ { _ |.k.F.2.H.2.H.2.r.r.E.E.r.E.#X%.%.Z.%.k.X.k.>.k.w.>.Z Z >._ X._ ) a 5 G : 2 G ` #.) a ) a .` ) a ) ) a 7 : ; K r 6 K ; G G =X; ` : 8 ! G l ", +" *X+ a Z.XXJ.J.J.J.Z _ _ _ X.w._ ) >._ X._ _ _ >._ _ _ X._ >.>.{ >._ _ { ) ) _ ) _ ) >._ o._ _ _ _ o._ X.) _ X._ ) _ ) _ ) _ _ ) ) _ _ >.w.E.H.r.r.r.r.r.r.G.E.Z.%.Z.F.Z.%.k.>.%.Z.%.>.Z >.w._ >._ >._ ) l 0 G l : ; ` ^ ) ) 7 ) 7 a ) ) { l 7 R ; 6 6 r ; K ; G =X/ 6 : 3 ! K a ", +" Q $ z H.K.Y.K.J.%X_ _ { >._ ) Z.X.w._ _ o.>._ { >.o._ o.Z _ X._ ) ) o._ ) _ _ ) ) X.) o._ _ ) o._ _ ) _ _ ) ) _ >._ ) ) _ o._ ) _ ) o.k.E.H.r.E.r.2.r.H.G.%.E.G.E.%.%.%.k.>.k.k.k.Z w.X.w.X._ Z _ _ _ _ ) > G l l G r l l a O.) ) 7 ) a ) a R 3 K r r ; R r K G ;X=X; ! k K Y ", +" 0.$ _ 2.J.K.].H.{.N _ _ >._ >.>._ _ o._ o._ _ X._ _ _ X._ _ ) _ o._ >._ _ ) ) _ ) _ _ _ _ _ ) _ _ ) o._ ) o._ >.) _ o._ _ o._ _ o._ _ >.2.H.2.r.r.r.2.r.G.r.E.E.%.Q.Z.k.k.%.k.k.%.k.X.k._ >.w.>._ >._ ) _ l > K ` l =X6 l ) t ` 7 ) ) ) .7 t r K K R 6 K ; ; K G G ;X; ; a z ", +" - 5 4 H.H.J.Y.K.H._ ) >.k.X.w.>._ _ _ { >._ X._ _ o._ >._ X.) _ _ ) _ { o._ ) _ ) ) o._ o.o._ X._ X._ ) _ _ ) _ ) _ { ) _ _ { ) _ ) o.oXH.H.H.2.H.r.r.r.E.r.r.#Xk.%.F.%.k.%.Z o._ X.z >.>.k.>.k.w.X._ _ ) ^ * K ) i G : 6 ` l ) a ) { ` _ ` l ; K ; 6 ; : r r R G =X=X=Xl .X ", +" p d.* Z.H.Y.K.Y.J.oX_ _ { >._ >._ >.{ o.>._ X._ >._ _ X._ ) w._ o._ ) ) _ _ o._ ) ) _ _ o._ _ _ ) _ ) _ o._ ) X._ o._ _ ) >.) >.o._ _ >.H.H.H.H.H.G.r.G.P.E.E.G.%.k.%.%.k.k.>.Z Z _ _ >.w._ >.Z w._ _ _ _ o.7 > 2 a l ; K l l ) a O.) a ) ) #.6 r K r r r ; ; K ; ; =X>XG z ", +" h 5 l P.J.Y.K.K.H.} _ >.>._ k._ X.w.>._ >.k._ o._ ) o._ _ o.X._ _ ) _ _ ) _ _ o._ _ ) _ _ _ X.a ) _ ) >.k.X._ ) _ _ ) >._ ) >._ _ _ X.Z.H.H.H.2.r.r.E.G.%.E.E.Z.%.Z.%.k.>.k.>.>._ >._ _ _ X._ k.X.w.) _ ) _ 7 * ; ) i G ; ` l ` 7 ) ) ) ^ .l 6 r ; ; ; ; 6 ; ; ; K G >XG }. ", +" e 2 Z.H.Y.K.J.K.H.w._ _ Z >.X._ >._ ) X._ X._ _ >._ X._ ) >._ _ o._ o._ ) ) _ ) { ) o.) { o._ ) _ { o._ _ _ o._ o._ ) _ o._ _ ) ) _ Z.r.H.H.2.H.H.r.H.r.r.2.E.E.k.>.k.%.w.>.Z k.>._ o._ _ _ _ >._ _ _ ) _ ) i 5 * _ ) G G K t l ) ^ _ { _ ` t 8 K ; K r ; r r ; ; K r G ; X ", +" 1 ; 4 G.Y.Y.J.J.H.S._ _ >.X._ _ >._ _ X._ _ _ >.o.w._ >.o.k._ o._ ) _ _ o._ _ ) _ ) _ _ >.) _ ) _ ` ) o._ { o._ o._ ) _ _ { ) _ _ { Z.r.H.H.H.H.r.r.2.r.G.E.%.Z.E.%.k.>.Z >.Z k.X._ k._ _ ) o.w._ _ ) o._ ) _ ` * G ) _ 6 ; ; 6 ) a ` ) ) ) a r ; ; ; r ; 6 ; K ; ; K ; k ; }. ", +" 4 * G.r.K.K.Y.H.Q.a _ X._ w.o.w.X._ o._ >.o._ _ >._ { _ _ X.w._ o._ _ _ _ { ) o._ _ ) >._ _ ) _ o.X._ _ ) _ >._ _ X._ ) ) _ _ ) ) o.r.H.H.H.2.H.r.E.E.G.%.E.%.E.G.E.%.%.k.>.>.Z ) w.X._ ) X._ _ _ _ _ _ _ _ _ .> = _ _ ) ; G * t l ) { a { ) ; ; ; ; K 6 r ; ; * / ; ; /.3 }. ", +" M $ : G.J.Y.K.J.H.F._ Z >.X._ X.k.o.w.>._ _ _ >.X._ >._ _ _ _ >._ _ { o.) o._ o._ ) _ _ { ) ) _ X._ _ o._ >.) >.X._ >._ _ o._ ) _ _ ) H.H.H.H.H.r.2.E.Z.r.E.%.Z.).F.Z.>.k.k.k.Z k.>._ _ >._ _ a ) ) _ ) _ ) { ) - & * ) { ) : ;Xk = : ) a O.) O.l ; K K ; K r ; K K ; ; ; ] G @ M ", +" @ 5 4 2.K.Y.Y.J.H.Q.k.>.Z w._ >._ Z._ >.X.) >._ >._ >._ o._ >.{ >.X._ ) >.X.) w.) _ ) o.) ) ) _ _ o._ X._ o._ _ o.w._ ) _ _ _ ) ) X.) H.H.H.H.2.H.r.r.r.E.E.E.r.k.k.%.k.k.k.>.k.>.k.o._ _ ) ) _ _ ) ) _ ) _ ) l * * K ) o.w.R ; G G 3 7 O.^ ) a R ; ; / ; K ; 6 K ; ; * G G =X5 + Y U _. ", +" h * .XH.K.Y.Y.J.r.k.Z.k._ >.X._ >.k.X.w.>.k._ o._ X._ >._ X.w.>._ >.o.w._ k._ o._ ) _ _ o._ >.) _ _ o._ _ _ _ _ _ { o._ X.) _ _ ) Z.E.H.H.H.H.H.H.2.r.r.2.Z.%.k.>.>.Z >.Z k.X.w._ >._ X._ ) _ ) _ _ ) ) _ 8 * k G ; : _ ^ { _ t G G G 3 l ) ) O.6 ; ; K r 6 K ; K ; / ; G =XT +.+.+Xe e e P & & $ w @ ", +" p 5 r J.Y.K.Y.K.J.r.Q.E.k._ Z.Z.>.>.k._ _ X.w._ w._ _ _ _ _ _ >.X._ _ _ X._ ) >._ _ ) _ { o._ _ _ { ) _ _ { ) >.{ o._ _ ) ) _ ) _ { >.r.H.H.H.2.H.H.r.r.G.E.Q.G.k.%.k.k._ >._ _ _ _ _ _ _ _ ) _ ) _ ) _ _ R * G ; : 6 ) ) ) _ _ ` t G =XG 6 ) ) a t K ; K K r r ; ; K ; * / G =X; =XG G G G G G ] = e 5 + ", +" u * R J.K.Y.].Y.K.#X#XH.H.F.{.H.H.L.P.%.Z.>._ { o._ >.o.o._ ) k.w._ _ _ _ _ o._ { ) { ) _ _ _ ) ) _ o._ ) o.o.w._ _ ) ) >._ o._ ) _ Z.H.H.H.H.H.H.H.2.E.E.Z.s.Z.k.>.>.X.k._ _ ) _ _ X._ >._ ) _ ) _ _ ) 7 ; ; r : : 2 - _ { ) { ( : K G G * l ) ) ) l ; ; ; r ; K ; ; ; G ; G =X; ; ; K ; K K ; ; G k ] ; I ", +" }.- * O.K.].Y.K.Y.J.H.2.J.H.H.H.K.K.J.J.K.K.XXZ.Z.%.@Xr.H.H.r.H.%.%.o.X.o.>.) _ ) _ _ ) l ` ) a ) _ ` a ) ^ _ a { o._ _ _ _ _ _ ) k.>.E.H.H.H.H.H.H.2.E.E.#XG.%.Z.s.k.k.Z _ X._ ) ) _ ) _ ) ) _ a t ) i 8 * ; : * ; * = ; l 2 ( 7 ( e 3 K ; G ; 2 #.) ` 6 K ; G 3 ; ; * ; G G G =X; G K ; K K ; r ; * ; k 6 (. ", +" - * ) Y.].].].Y.J.H.H.H.J.J.Y.K.K.Y.Y.K.K.K.K.:.H.H.H.H.J.J.J.J.J.J.H.2.E.P.%.E.%.%.Z.%.Z.%.%.%.>._ ) #.l 7 l a ` _ { ) _ { ) _ _ s.H.H.H.H.H.2.H.H.r.E.%.k.w.>.k.k.>.w._ _ o._ _ ) _ ) _ ) _ ) l l * ; ; * * ; r ; = ; l e e l ` * G G ; ] ] ! r #.) ) : 6 ; K K K / K ; G G =X; ; ; / ; r ; ; k G k r z (. ", +" 2 * ) Y.Y.K.K.J.K.H.{.H.J.H.J.K.Y.Y.].K.Y.K.Y.J.J.J.K.K.J.K.K.K.Y.K.K.K.Y.H.J.J.J.J.H.H.K.K.H.H.H.r.%.>.) o.) o.#.) _ _ ) a ) ) _ >.2.H.H.H.H.H.E.r.E.G.F.%.>.X.f X.k._ o._ _ _ ) >._ _ ) _ ) _ ` 3 * ; k k K 6 a 6 * * l P G 7 ) ; G ;X] >X>X+X8 ) a ) ) t ` ` ` ` 6 6 K K ;X;XG K ; : K ; k ] G ; K z ", +" > * >.].Y.Y.Y.].J.H.H.K.J.H.J.Y.].K.K.K.K.Y.Y.J.K.K.K.J.K.K.K.Y.Y.K.K.Y.K.Y.Y.Y.K.J.J.J.J.J.K.J.J.H.r.E.E.Z.E.Z.Z._ o._ ` a ) _ _ %.H.H.H.2.H.H.E.2.E.E.F.k.k.k._ >.k._ _ X._ ) _ _ ) ) ) _ ) _ l k G G ; K ` a ) 2 = ; 2 k ;X8 l : ;XG ; G =X;X; ) { ) ) ` ) ) 7 ) ` ` : ; G G ; G K ; ; k ] k : ", +" * * >.].Y.K.K.Y.J.H.J.Y.K.K.J.Y.Y.K.J.J.K.Y.Y.K.J.K.K.K.K.Y.].Y.Y.Y.K.K.Y.K.Y.Y.K.K.K.K.K.K.K.J.J.J.H.H.H.H.H.H.J.r.%.%.>.o.^ ) %.E.H.H.H.H.H.2.H.r.r.F.%.Z.>.>.Z _ >.k.o._ _ >.o._ o._ _ ) a ) l ; ; G : l ` 7 ` 8 C.* 3 G G G r R ; G 6 : / * 6 ) a ) a { a ) ) i ` 7 6 ; G G K K ; G ] G ; 4 ", +" 8 : E.J.J.Y.Y.K.J.H.K.Y.K.J.J.J.Y.K.K.K.K.K.J.J.J.K.J.K.J.K.J.K.K.Y.K.Y.Y.K.K.Y.K.K.K.K.K.K.K.J.J.J.J.H.H.H.H.H.H.H.H.H.H.E.Z.X.G.H.H.H.H.H.H.H.H.H.Z.Z.%.%.k.%.w._ X.w._ >._ ) Z _ _ ) ) a ) ) _ ` ` ` ` l ) a .r P >XG 6 K G G ; ; G K t ` ` l ) a O.) ) ) a ) ` ` 7 6 * G =X; k G G r ) n ", +" G l 2.K.K.K.K.K.K.J.K.J.K.J.J.J.K.J.K.K.J.J.K.K.J.J.J.K.J.J.K.K.Y.Y.Y.K.Y.Y.Y.K.K.J.J.J.J.K.J.J.K.H.H.H.J.J.H.J.H.H.H.H.H.H.H.r.H.H.H.H.2.H.2.H.2.r.E.k.E.%.Z.s._ >._ _ _ _ >._ o._ ) _ ) ) ^ ) ) a ` i ` ` 7 ` l 7 * ;XK ` ` K ; k ; k ; l t a ` ` .a ) a .) a { ` 7 6 * G G G G K z ", +" k ) H.H.J.Y.Y.K.J.H.J.K.J.H.H.K.J.J.J.K.K.K.J.J.J.J.J.J.K.K.K.K.Y.K.K.Y.K.H.].Y.Y.K.J.H.J.J.H.J.H.H.H.J.H.H.H.H.H.H.H.H.H.H.2.H.H.H.2.H.H.H.H.E.r.H.G.k.Q.f k.Z.X._ _ ) _ _ { _ ) ) ) ) a ) a ) ^ ) .a ` 7 ` 7 ) : * =X: 7 ) l 6 k G ] r t ` ` .i ` 7 O.) a ` { l ` t * =X=X; : z ", +" P - 2.K.K.Y.K.Y.K.H.H.Y.K.H.J.J.K.K.K.K.K.K.K.J.H.J.K.K.J.J.K.K.K.K.K.K.c.J.Y.Y.K.J.J.J.H.J.K.H.J.J.H.H.H.H.H.H.H.H.H.H.H.H.{.H.H.H.H.H.H.H.2.I |.} 9 k.k.Z _ _ _ _ ) i : : : 8 5 l i ) ^ ` O.a 7 a ` t ` ^ ) 7 7 : > G ; ` 7 ` 7 K ; G 6 ` : t l ) ` ) ^ ) .a ) ` #.: G >XG ` [ ", +" = > G.Y.K.Y.Y.K.K.H.J.Y.K.H.K.K.J.J.K.J.K.J.K.K.H.K.J.J.J.K.K.K.J.K.Y.K.Y.K.Y.Y.Y.K.J.J.H.J.H.J.J.J.J.H.J.J.H.H.H.H.H.H.H.2.H.2.H.J.J.H.H.{.[ 4 4 + 4 4 u _ _ _ _ _ a 6 ` 2 ; * * ; 2 i ) i 7 ` 7 O.l ) 7 ) 7 ) t ` r ; K ` 7 7 ` 6 6 K ` t l ` ) a 7 ) ) i ) ) a O.` ( ] ;XG _ ", +" G i k.J.J.J.Y.K.J.H.{.H.H.J.H.K.K.J.J.K.J.J.J.J.J.H.J.K.K.Y.Y.K.K.K.K.Y.].J.K.J.K.J.J.J.H.H.J.H.J.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.{.{.- i l 8 * e 8 8 2 l 7 ) ) ; r a 6 l ; * ; ; 8 8 6 7 ` ` a O.l ` ` a ` 7 ` l ` ` l ` 7 ` l ` l 6 l ` l ` O.` ^ ` ) ^ ` #.` #.r G G n I ", +" * * _ K.J.Y.K.Y.J.H.H.H.H.H.J.J.H.J.J.J.J.H.K.H.J.J.H.J.K.K.Y.Y.K.Y.Y.J.K.K.J.J.J.K.J.J.J.J.J.J.J.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.2.w.4 7 _ a t ` ; * ; k * ; - 2 6 _ w._ _ _ ) l * G ; : 7 O.7 l 7 l ) #.` 7 ) 7 ` a ) 7 ` t l t : r ; 8 8 r 7 ` .a O.l ) ) #.` t * G : ", +" * * a Y.K.Y.J.].Y.H.oXoX{.H.J.J.J.J.J.H.J.J.H.J.H.J.J.K.K.K.Y.Y.Y.K.K.Y.K.J.J.J.K.K.J.J.J.H.J.J.H.H.H.H.J.H.H.H.H.H.H.H.H.H.2.H.H.2.#X# a Z >.>._ Z w.o.z ` ; G G * a _ _ k.>.Z w.Z._ ` > ; r ` 7 ` t l ` O.a O.` ` 7 ` 7 ) ` 7 l ` r 8 ; ; ; G ; r 7 ) ` a O.a t l t > ] ; ", +" 8 k R {.H.K.J.J.J.r.w._ _ %X).H.J.J.J.H.H.H.J.J.J.J.J.K.J.K.K.J.K.K.K.J.J.K.J.J.J.K.Y.K.J.J.J.H.J.H.H.H.H.H.H.H.J.H.H.H.2.r.H.H.H.H._ ) `.k.Z Z _ { >.k.%.w.) l : ; i _ s.T.Z _ _ s.k._ l 8 ! l ` 7 ` l l 7 ` 7 7 ) a O.) a 7 ) t : ; ; ; G ; / r R ` a O.) #.O.t l r ! l 4 ", +" 2 = e V H.H.Y.J.H.F._ >.>.Z k.F.#XE.$X#XL.r.r.H.H.H.J.K.J.K.K.K.K.K.K.J.K.J.K.K.K.K.K.J.J.J.H.J.J.H.H.H.H.J.H.H.H.J.H.H.r.H.H.H.H.2.Z 5 4 N ^ N { { Z Z >.s.>.N > = = ( _ s.s.>.X.>..Z _ _ >.Z _ k._ w.k.s.k.{.H.H.H.J.K.Y.].J.J.J.K.J.K.K.K.K.K.K.K.J.J.H.J.H.H.H.H.H.H.H.H.H.H.H.H.{..XoX.X(.oXw.5 * i ) { ) { X.s.@Xs.Z Z 7 ; G 3 <.Z s.s.s.1X@XX.a ( ;X; t l r ( : ( 8 R l t ` 7 ) ` .l t : ; ; ; ; K / ; G 6 ) i O.t ` t : r = z ", +" i = 0 4 Z.K.K.K.r.w._ w.>.>.X.w.>.>.>.X._ >.w._ N }. X`.H.J.K.J.J.J.J.J.J.J.J.J.J.J.H.J.J.H.J.H.H.J.H.H.H.H.H.H.H.H.{.| 4 + + h + 4 - G 7 ^ { ) { Z %.s.@Xs.@Xk.` * G e a 1XD.s.F s.s. P h f J.J.H.E._ _ _ >.k.>.>.k.k.%.Z._ X.w._ _ Z Z } H.H.J.K.J.J.J.J.J.J.J.J.J.J.J.J.J.J.H.H.H.H.H.H.H.H.H.H.H.H.S.- 5 5 5 0 & % h k l ) ^ .^ { D.._ { Z.X.Z X.w.>.>.%.Z.>.>.>._ _ _ k.Q.S.2XoXoX{.).{.{.{.{.&XH.H.H.J.J.J.H.H.H.H.H.2.H.H.H.{.Z - 5 * * : ; * G = G * 2 .i ) W.W.F F F F Z .k.w.>.w.>.k.Z k._ Z _ _ { >.>.X.w._ k.Z _ Z w.N N N N N 9 N 3XoXoX$X{.H.H.H.H.H.H.H.{.I 7 2 ` l : a o.) ) : G G ; #.) { #. .<.( S % % h d.* ; = 8 #.#.#.8.<.V.u t G G : _ _ ) o.l ; ] k ; 7 ` 7 ` 7 ` : ; ; ; / ; G 6 ` ` #.) l : 8 3 k l n *X ", +" l * k = 5 z J.H.H.Z.N X.w.>.%.%.>.>.X.k.X._ >._ >._ w.X.>._ >._ _ _ _ X._ ) _ ) _ _ _ z _ Z .X{.{.H.H.2.H.I - - _ Z.) _ _ Z.G.Z.o.: G ; #. .i #.#.( h.u.( d.3 C.6 ) ; G d.d.e 3 % d.- 8 G K ) _ >.Z _ ) * =XC.; : #.` 7 ) ` 6 K / ; K K 6 ` ) t l ` 7 3 k /.= 5 + Y C ", +" k.4 * = 5 P.H.H.oX_ w.>.X.w.X.w._ w.) Z._ _ X._ X.Z._ k.>._ X.) _ ) _ o._ ) >._ ) _ ) _ _ _ _ N z w.9 |.( 5 z F.F.%.%.k.s.%.P.#Xl >XG 5 d.8 u.#.{ _ @X%.%.t ; t Z u.W G ; K 6 7 ` #.; 3 ; _ .F _ Z 7 ; G G ; t ` .l ` 7 ` 6 6 ` 6 ) ` l ` t l 8 >XG ; G * ; 0 e + ", +" .X- = * 4 S.H.{._ _ >.w.>.Z >._ X.w._ X.) w.>._ >._ X._ >._ ) >._ X._ >._ _ _ o._ { o._ ) _ ) _ _ ) - 8 ` k.%.k.%.T.s.@X@X@XF.` 3 ;X; 3 K O. .{ { D.D.:.Z _ _ D. .k ; O.#.{ _ _ %.t k R ^ #.<.5 % #.#.: G ;Xk t ) a ) 7 ` 7 ` l 6 l ` 7 ` 7 t : k G ; K 6 : 6 ; * G = # ", +" .X4 * ] * 4 p .XX._ _ k.>.>.Z >.>._ _ _ _ ) Z._ >.X.z >._ >.X.Z o._ _ X._ o._ _ X.) _ >.) _ ) ) _ ) 8 ; ) 2.2X$XI.I.s.I.4X@XT.{ ; G * 8 ` .^ { _ s.5.7.@X%.D.D.{ 3 ; #.{ { X.@XD.#.k ; % d.3 3 k e 3 8 3 >XG : ) ) a ) .l ` ` ` ` ` 7 t l t * C.G K t ` t ) l : G >X& Y ", +" k.l k 0 & 5 4 z _ _ Z >.s.>.Z k._ _ X.>.>._ { >._ >._ >._ _ _ _ _ ) w._ _ _ _ _ ) >.X._ _ >.) _ 7 ; : _ E.%.s.D.D.s.s.y.F 0.7 8 >XC.* 7 { .{ { XK a .` #.) l ` 7 ` #.7 ` t : ; G ; 6 6 ` l t l ` ` ; = = Y ", +" k.l * k = * h _ _ _ _ w.^ i i - - a _ >.X.) k.>.k.{ >._ X.o._ _ o._ { o._ ) >._ _ _ ) _ ) X._ l G : i s.F.%.s.I.U.0.% S 8 8 3 G G G 3 #.{ { { { 1X5.5.5.D.5.XG 6 a ) 7 ) 7 ` 7 ) 7 ` t l t k ; / ` : t ` l ) l l 6 r G ; ", +" 2.z r * G = i .Xi - ( 5 2 ` a ` ) ) >.w.>._ >.{ >._ _ _ _ o._ _ _ o._ >.X._ >.o._ o._ _ _ ) l ] ; l _ s.5.s.V.S ( #.7 ) %._ ) / G G t { ) W._ 1XT.D.s.j.D.~.% 8 u.8 ( 8 #.$.h.( 3 #.^ O.V. k G r #.` #.l ) 7 ` .l l t 6 l K K 6 ` l ` 7 ` l 6 l r r K = - ", +" z z : = > w 2 i a _ z E.Z.w._ Z.k.{ _ >.>.>.k.o._ o._ _ { o._ _ _ a 7 a { a _ _ { ) o._ 2 =X; : ^ !.y.!.<.#.Z P.:.:.D.D.X.l ; G 8 h.#.#.V.V.F V.8.4 8.#.d.; 7 t 7 t ) _ #.7 e : .#. ._ D.D.._ X.>._ >.Z _ _ _ X._ _ X._ _ ^ ` i d.8 : ( ( 7 _ ) _ a ) l G ; r i <.- #.V..>.>.o.w.{ _ l 2 2 7 7 ` R ) t : ) l ) ) _ X.) ; G 3 2 8 u.X.k.D.5.D.v.D.D.5.D.{ u.e 6 ` r R r #.#.#.X._ >.7 8 3 t #.{ X.1Xs.I.V.3 t i #.{ .>.>.k.>._ >._ _ l 5 5 8 t >.o.o.o.o.o.) ) _ o.o.Z.o.: =X/.8 e ` s.P.D.D.I.D.D.I.x.I.W.d.3 t ) .) ) { ) ) E.E.%.u.3 8 t #.{ @X%.1XD.d.d.#.#.#.{ @XD.s.x. #.V.!.V.^ V.h ~.<.0.'.h.d.; .#.{ X. W ; l ` 7 t l 6 t t 6 t l ` 6 ` ` t l ` #.r ; ; ; G K r ; = 6 _. ", +" S 5 _ 2.H.H.H.H.H.(.Y S 5 2 _ i * * * 8 2 i { o.o.>.a h l Z.Z.Z.H.2.H.H.H.H.H.H.$X9 Y 4 - - - - l * G G ; ( $.#.V.@XP.%._ u.5 d.h.3 W u.O.{ { 1XD.5.j.j.j.F ~.* t #.{ @X5.v.F d.; r ; 8 e % S $.8.D.D.N O./.;Xt 7 t ` : : l 6 l 6 6 ` ` 7 7 ) ` 7 ) ` ; * / K K K ; * G ^. ", +" $ - >.E.H.H.H.H.{._.h 2 l l * * e 8 2 Y 9 # 7 ) Z.E.H.H.H.H.H.H.{..XI Y + 2 7 i 7 a ) l ` ; G k ; : { s.P.5.D.5.D.%.t 5 3 3 ! t #.{ { D.5.D.5.p.u % d.3 O.{ { s.p.'.S : O.7 t ) ) 6 : d.{ !. ) ) l ) : 6 2 h + h ) Z.E.H.H.H.H.H.H.2.s Y h 5 ( l l ) ) ) _ ) 7 : ; G ; l 1X%.D.D.5.D.s...D.Z 7 W.V.h.% ! ! 3 #.#._ 1XD.U.8.d.% % 8 t O. .{ W.#.d.8 R t : ; 8 d.u.y.F F U.D.y.F { #.0 G K t l t l ` l t ` 7 ` t t l ` #.7 ` ) a O.7 ) ` ` ` ` ` : ; >. ", +" +X; %.Y.J.Z 5 8 7 .^ ; ; r t 7 { { { a 6 = G ; : t t * 7 { { { X.v.D.p.X! G 6 o.H.H.H.H.Y % * ; ; C.C.; 8 d.t ( ! ;X! ; ; 8 3 t u.: t #. .#.V.#.#.#.#. . ._ { { F t 3 G u.7 ; : h. .{ #. .{ 7 3 7 _ { { { { ) 8 5 $.~.<.V.W.F W.V.~.5 * a 3XB V w.|.i * ; 6 6 : 6 l 6 ) a ) a ` O.a O.) ) a 7 8 ; [ ", +" { X.H.>.) G.K.J.4 G G 6 #. =X] G l %.H.H.H.[ 5 k ; k k G G /.! 3 8 ( ; =XG 8 r R R 2 u.( u.( 8 u.u.d.; d.t .{ { X.X.{ { ) 6 R .l 8 8 ( { { { .7 3 #.W.W.{ { { a s f.z ; * 6 : 6 l 6 l t 7 ` .a ) 7 ) a O.7 : ! K g ", +" { Z H.H.H.H.J.J.z G G K O. ; =Xk ) E.H.H.{.h k G k ; ` ` ; G G G G ; k >X;X3 d.t #.; ; u.r d.R r t #.t ( t ^ ^ { Z { X.F { _ ^ _ W.) : #.{ { #.{ 7 ; 8 h.#.V. .6X{ V.h.* 8 ; & ( #.d.3 r z U 3Xa G ; : 6 : 6 : t ) a ` #.) a O.) ` : ! G ) ", +" { X.{.`.H.H.J.K._ G =X3 2 #. K G * ) G.H.H..X* k k ; l z _ l : K ; * K r G W k 3 t t d.r ; u.R r h.t #.7 8 t #.#.V.{ F W. .V.V. .V.{ { { { .V. .{ O.2 3 d.d.- #.V.#.V.d.3 r r 3 8 8 d.; a Z S.a * * R : t : 6 t ) ) a ) a O.7 ^ #.8 G ; w. ", +" 8.h V.1XF W.^ Y z Y 7XH.H.Z.* G G 3 : 7 #.k l Z.H.H.).Y G ) ) n 2.(.w + |.[ I n .Xr.i G W /.= d.8 u.R 8 u.t ( t ( R r : h.( r #. .#.d.h.h.d.#.#. .#. .( h.#.{ #.O.8 G 3 ! e 3 d.t 8 W 6 7 e 3 * : n [ }. (.N 5 k k R l 6 l ) a ) ^ ) ) { ) ) l * G l [ ", +" W.d.e d.~.W.W.{ - 5 - h + S.H.E._ * G G K t 7 * l G.H.H.}.h > |.2. } h G G G ! k 3 e ; r h.R 2 t t ( t t 2 u.h.#.t #.( t 7 t h.#.h.#.u.t 7 #.#.d.R r ; ; ; ; ( h.P G R 5 ; r i p 2 = k r r : t ) _ ) ) _ _ ) _ ) ( k r |. ", +" V.8 ! ; 8 h.{ V.5 3 $ & 0 4 H.H.Z.l : G ; ` { o.^ = > E.H.H.p = 4 [ |.t r ] W ] G /.C.! : u.8 u.t #.( #.t 8 t 7 #.7 7 7 t ( R ( u.t ( 7 t u.u.: t #.: 8 : d.e e G ; ` l i |. 3X7 * G ; r R ) _ ) _ ) _ ) ) a #.* > _ X ", +" W.d.e ; * ! ( { 9 : ; * k * Y r.r.r.Z.: k 8 5 { - * 4 2.H.H._ 0 4 oX|.i r * G G W W e R 8 8 8 u.t #.( R 7 #.#.t u.#.#.7 7 t 7 ( t h.( u.7 u.5 d.d.3 +XC.G ; l a N u I z.u * ; K ` i ) _ ) _ ) ^ _ { ) 2 = a ,. ", +" X.d.e 8 * ! 3 - Y >.: k = * - Z H.H.2.) k W ! #. { h.* z H.H.H.z e # g N z : ; ] T >Xk ( R r u.2 7 d.u.7 #. .#.#.t 2 h.#.h.( #.u.( 8 8 8 d.d.d.3 ! C.+XG r l z V ..p * k : O._ ) a ) ^ ) ) a ) a ; 3 N ", +" W.#.e ! 3 * ; * 8 h 5 = k G k h |.H.H.Z.l ; G t _ X._ d.* w.H.H.H.u * 4 f. X|.a * G ] ;Xe e e e ! e e = e e e 8 e 3 e ! e 3 e e e ! ! ! k C.C.C./.; ` l >.[ [ V s 4 5 : ) ) _ { ) _ ) _ O.^ 7 ; * a 4 }.*X{.G.w.; ; a { _ #.* z H.H.H.4 * n (.%X_ l k k C.P C.C.k /.k ! k C.G C.! P C./.k /.k C.G k k G G G ; : ` z G.[ _._. XS.- 0 : _ ) _ _ ) ^ ) ^ ) a : 8 r z (. ", +" #.3 k = ; * P e : z G.Z.4 ) z i 5 h - Y ).[ * : t _ u 5 2 z oX{.2.l R }. I n : ; ; ; ; : r r : r * ; k G ; ; : K : ; ; : : l a a z _ n f .X Xz. g u 5 : l ) _ O.) ) ^ ) a 7 8 3 ` z `. ,. ", +" #.8 * ; = k k G ! - .XH.2.2.H.Z.l * * * 5 w ; : z k.S.4 0 & - >.H.4 ; I p - % : ) _ ) _ ^ _ ) { l 8 3 ; z ,X H # o .. L OX8X,X ", +" { 7 2 w.N l : ; = 2 |.XXH.H.H.H.G.Z.a r = * > _ I XoXz 5 * : X.H.z 8 # X f.# 2 ; l { a ) { ) _ ) a ( G * z ,.O % - L # + 5 $ N :X ", +" s.u $ Y {.H.H.z ) _ .XH.H.H.H.H.H.H.H.>.: k 5 w + + Y ,Xz ` ) Z.{.N 5 - [ 1 @ + ; ` ) ) ) _ ) _ ) ) 2 8 r z `. # 5 ; 4 z.1.S * * * * ^ f. ", +" 1.Y 5 5 5 + . oX2.H.r.r.H.H.H.H.2.H.%X2.G.l = * = e * w.r.2.2.oXk.f - > *X Y 5 8 r ` a _ ) _ ) _ ) ^ ^ l e 4 n - 3 & n z.1 % 2 l ) ` 5 $ Y z. ", +" p 5 * 0 8 $ 4 U ).{.2.H.H.H.2.r.H.G.H.H.f ` ; ; * r _ H.r.Z.k.>.%Xi > *X _.- 8 = : ) ) _ ) _ ) _ { ) ) 5 G Y |. ..- * > 4 g O * l l _ O.r 0 h } ", +" .Xk.z l * * * & 5 $ 9 .X{.r.H.2.r.{.H.2.r.f G.G.G.2.#Xf Z Z.Z f - 5 [ @ = r ` _ ) _ _ _ { _ { ) a 5 k 6 I D <.8 * 5 4 U f.M % : ` .) ^ ) 2 = - ", +" .Xz - > * k * 5 + 4 Y |.$XF.2.H.H.G.E.f r.H.F.Z.Z >.w.>.Z - * .X . + ; l ) ) _ ) { ) _ ) ) a : ! ; 4 - w p ' 2 * ; * 4 _. 9X4 e r i ) a ) { a * l ", +" _.[ ^.- * * k * * = 5 2 4 n oXr.H.r.E.r.2.F.Z.k.Z Z >.|.- * }. }.5 ; l ) i ) _ _ _ ) ) a ) 8 3 ; 4 4 0 8 5 # 9X = ; ; l 4 [ :X+ ; 2 ) .) ^ 7 7 i w.).", +" n.V @ w * > ) l l ) l ] k = e 5 h I |.|.E.Q.Z.Z w.w.>.%.Z 5 > |. # * ; ) _ ) _ { _ { _ _ ) ^ 8 k z n % = ; k * # ,X W G k l 4 X4 e ; l a O.7 ) l = z (.", +" X 1 # w % & : a _ _ z Z.) a : : r G = 5 $ h + 4 Y w.Z k.%.G.N > > oX j - ; K ) a { ) ) _ ) o.a 7 8 ; t .X^ 5 * ; ; k 4 h ] k ; n 5 3 = ` t a .l ; > z ", +" C O $ % * : 6 a w._ o._ _ w._ ) _ ) a * * = * = & > + 4 ^.p N |.h i H. , & * 6 _ ) _ _ ) _ _ { ) $ * l ) ).4 4 =Xk * * 4 * k G ` (. * k 7 ` 7 7 ) & l u ", +" X w % * : : l a _ ) Z _ _ >._ w.a _ G.Z.w.a l > * k = 8 & 5 5 4 4 h # {. I * G 6 ) _ ) _ ) _ { ) _ ` * G ; ] ; G * m.* k k 6 .X 5 ] 6 7 ) ) ) i * l ", +" -XO % r : ) _ _ ) _ ) ) >.>._ a 7 i ` X l l * * * * = & = 5 I I * k 6 _ ) a { _ ) o._ _ a ; ; ; G k G * 4 `.*Xb.* k ; 6 &X h ] 6 ` #.a ) 7 * z ", +" (.' + % k : ) _ a ) _ ) >.w._ _ _ - 7 _ G. 2.2.f z 4 : * ; i .X ^.* G 6 ) _ ) ) _ _ _ ) { l ] 4 l * G G * > 0.@ 5 & W = 8 1. h k t a ` #.#.> l .X ", +" 9XY 0.$ * 6 l _ ) _ _ >._ >._ X._ 2 8 _ 2. H.2.f Z.z 2. Y * * ` a ^ _ ^ ) ) _ _ a 5 G : Z i k G k /.e * e k W G G & + p ,X f.h ] : ) .) l 5 z oX ", +",.Y % % r l a l l _ >._ >.X.w._ k.l * a %. , * / ` ) ) ) ) _ _ X.) #.* G 6 z * k G ; : _ l ` * ` * G P & N ' $ ; ` ) a 7 7 & z (. ", +"D % e * * & * 0 8 t _ _ _ w._ ) _ : 2 G.H. O G * l a ^ #._ ) _ ^ { a * ] l B + k * Z.2.r.2.2.2.2.2.o.K k 4 b.5 * ) ^ ) ) 7 > p oX ", +"d e = = * k = C.= : _ o._ _ _ >._ 2 4 .X Y 0 G r { ) ) ) ^ { ) ) a * ] ; g + * l Z.H.H.H.H.H.H.H.Z._ G 4 ,. ~ & r a O.a #.5 5 |. ", +"[ : 2 ; l a > 0 ; ` ) w._ a 5 i X.4 z Y l ] ; _ ) _ _ _ ) _ _ ) 2 ] ] h # - l Y n {.H.H.H.H.H.H.H.k.= & Y h k t a .a ; e 4 }. ", +" |.|..Xn h * l ) Z.i 7 & ; l & 4 [ l 0 K a ) ) { ) _ _ { ) l * G ! + Y u # - 5 + 4 + G.H.H.H.J.H.H.H.Z > = 4 0XY + ; K ) ) 7 : R : w. ", +" 4 & ` _ a 4 % = ; l : & a (. * G O.^ _ ) _ ) ) _ _ ) ) * G = e % 5 e 0 * * > k.K.J.H.H.J.H.H.#X4 0 $ # + * K 6 ^ _ 7 8 z w.$X ", +" 4 : ) _ i > * k ; > * 0 w.9X : k 7 ) a { _ _ _ { ) _ _ ) : G +X/.k k k * l 4 z J.H.H.J.K.J.H.J.Q.> 0 * = ; K ` ) ) - r n `. ", +" - * _ l h * i w.* * * = h g i ! > #.) _ ) _ ) _ ) ) ) _ ) 6 K ; * ; : i n G.f J.J.J.J.J.H.H.J.} & 0 ; 6 ` 6 l 7 ( 5 4 2. ", +" h * 7 5 e ; |.{.a ; 0 P & # z. Y ; * l a ) ^ ) _ _ ) _ _ _ ) _ ` ` 6 ` l 4 n H.H.H.H.J.J.K.J.H.H.} > +.; ` l ) l * * r (. ", +" Y 5 : & l l 2 k k 8 4 z. z h = 2 7 .a ) _ { _ ) ) _ ) _ _ ) a ) a l z .XH.{.J.J.H.J.H.J.H.r.& = * : l : * * i _ ", +" N 5 * * l Z. 2.k._ a z Y = * * r #._ ) ) ) _ _ ) _ ) _ _ ) _ l l 4 + z 7XH.H.J.H.J.J.J.H.4 * G k /./.; : f ", +" 3Xi * l [ : k k 8 * r 7 _ ) _ ) _ ) _ { ) a t 2 * = * z H.H.H.H.H.J.H.H.H.z * G ; * 6 ) .XH. ", +" ).Q.3Xr. w.- * * ; * : 7 7 i .a ) i ` l 7 5 * ; l z r.H.H.H.J.J.H.J.H.H.z * : ) Z.E. ", +" a ; k = e 8 e * 5 8 8 e e k k ; z n 2.H.H.H.H.J.J.H.H.`.*X+ * z ", +" a ; * ; k k G k ! ; ; * ; z |.2.H.H.H.J.J.J.H.j h $ $ * 4 n ", +" l : ; ; : 6 l ) l l 4 .XH.H.J.J.J.H.H.`.@ * 0 = * 4 [ ", +" .XG.w.& 4 G.H.J.H.H.J.H.z.Y - * ; * 0 & + @ 1 ", +" _.N l & k.H.H.K.H.H.H._ l : 6 : G * * * & 5 w Y ", +" d - & > w ,.H.J.H.H.H.%.l 6 2 : 6 K K ; * = e d.< ", +" h 5 ; * 0 w L oX{.H.H.oX- * ; * = ; ; ; ; * k = & - ", +" ^.5 * ; * * k * 5 - # Y _.n 2 l a : ; * * * * * ; ; * : _ ", +" M 5 * ; r ; * r : > * * * $ 5 * z }.I G.) a l ) l ) z G.z oX ", +" g + e ; K * * : - * k P k i I b. ", +" 1 & k ; ; * ; ) - = k ] * 4 I ", +" p 8 ; r = * i z 2. 4 k ; ; > [ ", +" N C.; * r ) 2.J. w k ; r 0 w. ", +" u = ] = z `. 4 * * * G ) ", +" i ; ] * |.&X w.; * K k l ", +" N : ; i $X %.i G K * l ", +" |.w.2. :.a * ; * a ", +" :.N * ; k i ", +" |.5 G = z ", +" _ ` r "}; diff --git a/pixmaps/garfield.xpm b/pixmaps/garfield.xpm new file mode 100644 index 00000000..88454672 --- /dev/null +++ b/pixmaps/garfield.xpm @@ -0,0 +1,186 @@ +/* XPM */ +static char * garfield[] = { +/* width height num_colors chars_per_pixel */ +"169 173 6 1", +/* colors */ +" c #000000", +"# c #83bfa8", +"a c #000055", +"b c #ffaa00", +"c c #ffffff", +"d c #aa5500", +/* pixels */ +" # # #a a a ", +" # # # # a a a # ", +" # # # # # #aaaaaa # # ", +" # # a # #bbbbb a a a# # # ", +" # # #abbbbbbbb a a a # # # ", +" # # #bbbbbbbb a a a# # # ", +" # # bbbbbbbb a a a # # # # # # # #a ", +" # # #bbbbbbbbb a a aa # # # # # # # # # ", +" # # # bbbbbbbbb bb bbb bba a # # bbbbbbbbb # # ", +" # # # #bbbbbbbba bb bbb bba a# # #bbbbbbbbb# # # # ", +" # # # # # #bbbbbbbbb bbbbbbbbbbbbbbbb b# # bbbb# # # # # # # ", +" # # # # # bbbbbbbbb bbbbbbbbbbbbbbbb b # #bbbb # # # # # # ", +" # # # bbbbbbbbb bbbbbbbbbbbbbbbbbbbb# #bb # # # # # # # # ", +" # # # # #bbbbbbbb # # #a# # # # abbbbbbb# # # # #b# # # # # # ", +" # # # # #bbbbbbbbb# # # a aaa # #a bbbb# # # #bbb# #b# # # # ", +" # # # # # # # # # # # # bbbbbbbbbb# # ccccccccccc # bbb # bbbbbb bbb# # # # # ", +" # # # # # # # # # bbbbbbbbbb# #ccccccccccccccc ab # #bbbbbbbbb# # # # # ", +" # # # # # # # # # bbbbbbbbbb# #ccccccccccccccccc#a# # # # bbbb bb # # # ", +" # # # # # # # # bbbbbbbb# #cccccccccccccccccc a #cc # # #bbbb b # # ", +" # # # # # # # # bbbbbbbb# #ccccccccccccccccccccc#cccccc # # bbb # # ", +" # # # # # # # bbbbbbbbb #cccccccccccccccccccccc #ccccccc# # bbbb# ", +" # # # # # #b# bbbbbbb #ccccccccccccccccccccccc# ccccccccc # b # ", +" # # # bb# #bb bbbbbbb #ccccccccccccccccccccccccc# ccccccccc # # ", +" # #b# bb# bbbbbbbbbbbb# ccccccccccccccccccccccccc #ccccccccc# # ", +" # #bbbbbb # # # #bbbbb# cccccccccccccccccccccccccc# cccccccccc# # ", +" # #bbbbb# # # # # # bbb #cccccccccccccccccccccccccc #ccccccccccc# # ", +" # # bbbb# #bbbbbbbb # # #ccccccccccccccccccccccccccc# ccccccccccc # # ", +" # # #bbb# bbbbb bbbbbb# # ccccccccccccccccccccccccccc #cccccccccccc # ", +" # #bbb# bbbbbbbbbbbbbb# #ccccccccccccccccccccccccccc# cccccccccccc# # ", +" # # bbb bbb bbbbbbbbbbb #cccccccccccccccccccccccccccc #cccccccccccc #b# ", +" # # bbbb#bbbbbbbbbbbbbbb# cccccccccccccccccccccccccccc# cccccccccccc# bb# ", +" # # # bb#bbbbbbbbbbbbbbbb #cccccccccccccccccccccccccccc #cccccccccccc #bb # ", +" # # #bb bbbb bbbbbbbbbbb# cccccccccccccccccccccccccccc# cccccccccccc# bbb # ", +" # # # bb#bbbb bbbb#bbbbbb #cccccccccccccccccccccccccccc #cccccccccccc #bb # # ", +" # # # #b# bbbbbbbb# bbbbbbb ccccccccccccccc cccccccccc# cccccccccccc# bb# # ", +" # # # # #bbbbbbbb # bbbbbb#ccccccccccccccc ccccccccc# ccccccccccccc #bb # # ", +" # # # b bbbbbbbbbbb #bbbbbb cccccccccccccc ccccccccc #ccccccccccccc# # #bb # ", +" # # # #bbbbb bbbbbbb#bbbbbbb# ccccccccccccc cccccccc #ccccccccccccc# # # # # # # ", +" # # bbbbbbb bbbbbbb bbbbbbbb#ccccccccccccc ccccccca# cc cccccccc #bbbbb# # ", +" # # bbbbbbbb bbbbbb#bbbbbbbb #ccccccccccccc ccccccc a ccc ccccccc #bbbbbbb# # ", +" # # #bbbbbbbbbbbbbbbb bbbbbbbbb cccccccccccccccccccccc#accc ccccccc# bbbbbbbb# ", +" # #bbbbbbbbbbbbbbbbb# bbbbbbbb# cccccccccccccccccccc# cccc cccccc# #bbbb bbbb# ", +" # #bbbbbbbbbbbbbbbbbb #bbbbbbbbb# ccccccccccccccccc # ccccc cccccc #bbbbbbbbbbb# ", +" # bbbbbbbbbbbbbbbbbb# #bbbbbbbbb# #cccccccccccccc a #cccccc cccccc # bbbbbbbbbbb # ", +" # # bbbbbbbbbbbbbbbbb # #bbbbbbbbbb # ccccccccc # #a# # ccccccccccc # bbbbbbbbb bbb ", +" # #bbbbbbbbbbbbbbbbb# # bbbbbbbbbbb # # #cccc # #d dd # ccccccccc # bbb b bbbbbbbb# ", +" # # b bbbbbbbbbbbbbbb # # bbbbbbbbbbbbb # # # # ddd dddd# ccccccc # bbbb bbbbbbbb ", +" # # # b bbbbbbbbbbbb# c # bbbbbbbbbbbbbbbbbb# #dddd ddd #ccccc# # bbbb bbbbbbbbbbb# ", +" # # # #b# #bbbbbbbbbb #cc # #bbbbbbbbbbbbbbbbb# #ddd#ddd# # a # #bbbbbb bbbbbbbbbb# ", +" # # # # # #bbbbbbbbb# cccc# # bbbbbbbbbbbbbbbb# # d ddda# #a#bbbbbbbbb bbbbbbbbbb ", +" # # # # # b bbbbbbbbbb#ccccc# # #bbbbbbbbbbbbbbb# # #a# abbbbbbbbbbbbb#bbbbbbbbbb # ", +" # # # # # bbbbbbbbbbb #cccc c # # bbbbbbbbbbbb# # # a bbbbbbbbbbbbbb# bbbbbbbbb # ", +" # # # # # bbbbbbbbbbbbb ccc cccc# # # # # # # # #c# cc#bbbbbbbbbbbbb# bbbbbbb # # # ", +" # # # # bbbbbbbbbbbbbb# cc#ccccccc# # # # # # ccc ccc #bbbbbbbbbbb# bbbbbbbbbbbb# ", +" # # b #bbbbbbbbbbbbbbb# # ccccccccc ccccccccccc ccccc #bbbbbbbb # #bbbbbbbbbbbb ", +" # # # bbbbbbbbbbbbbbbbbbb #ccccccccc#ccccccccccc#cccccc #bbbbbb # #bbbbbbbbbbbbb# ", +" # # #bbbbbbbbbbbbbbbbbbbb # #ccccc#cccccccccccc cccccccc# # # # # bbbbbbbbbbb # ", +" # # bbbbbbbbbbbbbbbbbbbbbb# # #cc ccccccccccc #cccccccccc ccccc bbbbbbbbbbb # ", +" # #bbbbbbb# bbbbbbbbbbbbbbb # # #ccccccccccc#cccccccccc cccccc#bbbbbbb# # # # ", +" # # # #bbbb # #bbbbbbbbbbbbbbbbbb # # #ccccccc# cccccccccc ccccc bbbbbbbb # # # ", +" # # # # # # # # # # bbbbbbbbbbbbbbbbbbbbb # # # ccc ccccccccccc cccc bbbbbbbbbb # # ", +" # # # # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbb # # # # ccccccccc cccc bbbbbbbbb # # # ", +" # #bbbbbbbbb# # # # # #bbbb bbbbbbbbbbbbbbbbbbbbb# # # # # # # # # #bbbbbbbbbbbb # # ", +" # #bbbbbbbbbbb# # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # bbbbbbbbbbbbbb# # # # # ", +" # bbbbbbbbbbbbbbb # # # # #b# # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # ", +" # # bbbbbbbbbbbbbbbbb # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbb # ", +" #bbbbbbbbbbbbbbbbbbbb #bbbb # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbb#bbb# # # bbbbbbbbb # ", +" #bbbbbbbbbbbbbbbbbbbbbb #bbbbbbbbb# # # bbbbbbbbb # # # # # bbbbbbbbbbbbbbb # #b# bb# # #bbbbbbbbbb # ", +" # bbbbbbbbbbbbbbbbbbbbbb# bbbbbbbbbbbb#bbbbbbb# # # # # # # # # bbbb# bbbbbbb # # bb# # #bbbbbbbbbbbb ", +" # bbbbbbbbbbbbbbbbbbbbbbbb# bbbbbbbbbbbbbbbb# # # #bbbbbbbbbbb# # # # bbbbbbb # # b # # bbbbbbbbbbbb# ", +" # bbbbbbbbbbbbbbbbbbbbbbbbbb# bbbbbbbbbbbb# # # #bbbbbbbbbbbbbbbbb# # bbbbbbbb# # # # # #bbbbbbbbbbb# ", +" #bbbbbbbbbbbbbbbbbbbbbbbbbb # #bbbbbbb# # # #bbbbbbbbbbbbbbbbbbbbb# #bb bb# # # # # bbbbbbbbbbb # ", +" # bbbbbbbbbbbbbbbbbbbbbbbbbbb # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # # # # #bbbbbbbbbbb# ", +" #bbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # # # #bbbbbbbbbbb# # ", +" #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # # # # #bbbbbbbbbbb# # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # # bbbbbbbbbbbb# # ", +" # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # bbbbbbbbbbbbb # ", +" # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # #bbbbbbbbbbbb # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # #bbbbbbbbbbbbb# # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # bbbbbbbbbbbbbb# # #bbb# # # # # #bbbbbbbbbbbbbb # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbbbbbbb# # # bbbbbb# # # # # # # bbbbbbbbbbbbbbb # # # # # # # ", +" # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbb # # b # bbbbbbbbb # # # # bbbbbbbbbbbbbbbbb # # # # # # # ", +" # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # # # # # bbb #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # bbbb# # ", +" # # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bb# # # # #bbbbb# bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # ", +" # # # # # # # # # # bbbbbbbbbbbbbbbbbbbbbbb bbbbbbbb#bbbbbbbbbbbbbbbb #bbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbb # ", +" # # # bbbbbbbbbbb #bbbbbbbbbbbbbbbbbbbbbbbb bbbbbbb bbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbb bbb bbbbbbbbbbbb# # # # # # ", +" # # b bbbbbbbbbbbb# bbbbbbbbbbbb#bbbbbbbbbbb#bbbbbbb#bbbbbbbbbbbbbbbbb# bbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbb # # # # # # # # ", +" # # # #bbbbbbbbbbbbb# bbbbbbbbbb# bbbbbbbbbbb bbbbbb# bbbbbbbbbbbbbbbbb #bbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbb# # # ", +" # # # b #bbbbbbbbbb #bbbbbbbbb# bbbbbbbbbbbb# bbbbb #bbbbbbbbbbbbbbbbb# bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbb # ", +" # # # #b# bbbbbbbbbbb #bbbbbbb# #bbbbbbbbbbbb #bbbbb# bbbbbbbbbbbbbbbbbb# bbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbb # #bbbbbbbbbb # ", +" # # # # # #b bbbbbbbbb# # bbb # #bbbbbbbbbbbbb# bbbb# bbbbbbbbbbbbbbbbbbb # # # bbbbbbbbbbbbbbbbbbbbbbbb bbb# # # # bbbbbbbbb #", +" # # # # # b bbbbbbbbbbb # # # #bbbbbbbbbbbbbb bbbb# #bbbbbbbbbbbbbbbbbbb# # # # # bbbbbbbbbbbbbbbbbbbbb bb# #bbbbb# #bbbbbbb# ", +" # # # # # bb bb bbbbbbbbbb# # # bbbbbbbbbbbbb #bb # #bbbbbbbbbbbbbbbbbbbb # # # # #bbbbbbbbbbbbbbbbb bb bbbbbbbbb #bbbbbb #", +" # # # # #bb bb bbbbbbbbbbbbbbb#bbbbbbbbbbbbb# b # # bbbbbbbbbbbbbbbbbbbb# # # # #bbbbbbbbbbbbbb b #bbbbbbbbbb #bbbbb# ", +" # # # # # bb bb bbbbbbbbbbbbbbb bbbbbbbbbbbb# # # #bbbbbbbbbbbbbbbbbbbbbbb# # # # bbbbbbbbbbbbbb#bbbbbbbbbbbb #bbbb #", +" # # # # # #bb bbbbbbbbbbbbbbbbbb# bbbbbbbbbbb # # bbbbbbbbbbbbbbbbbbbbbbbbb # # # bbbbbbbbbbbbbbbbbbbbbbbbbbb bbb # ", +" # # # # b bbbbbbbbbbbbbbbbbbbbb #bbbbbbbbbb # bbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbbbbbbbbbbbbbbbbbbbbbbb#bbb# ", +" # # #bb bbbbbbbbbbbbbbbbbbbbbbbbb #bbbbbbbb # bbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbbbbbbbbbbbbbbbb bb# # ", +" # # bbbbbbbbbbbbbbbbbbbbbbbbbbbb# # bbb # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbbbbbbbbbbbbbbbbbbbb # # # ", +" # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # bbbbbbbbbbbbbbbbbbbbbbbb# # # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # #bbbbbbbbbbbbbbbbbbbbb# # ", +" # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbbbbbbbbb# # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # #bbbbbbbbbbbbbbbbbb # ", +" # bb#b#bbbbb#b# bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # bbbbbbbbbbbbbb# # ", +" # # b # #bb # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # #bbbbbbbbbbb# # ", +" # #b# # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # #b# # # # ", +" # # # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # # # # # # ", +" # # # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # ", +" # # # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # ", +" # # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # ", +" # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# ", +" # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # ", +" # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # ", +" # # # # # # #bb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # ", +" # # # # # # # # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # ", +" # # # # # # # # # # # # # # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # ", +" # # # # # # # # b # # # # # # # # b # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # ", +" # # # # # # # bbbbbb# # # # # # #bbbb # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # ", +" # # # # # # # #bbbbbb # # # # # #bbbbb# # # #bbbbbbbbbbb#bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # ", +" # # # # b # #bbbbbbbbbbb# # # # bbbbbbbb# # # bbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # ", +" # # # bbb # # # bbbbbbbbbb# # # #bbbbbbbb # # bbbbbbbbbbb # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # ", +" # # # #bbbbbb # bbbbbbbbbbb # # #bbbbbbbbbb # #bbbbbbbbbbb# # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # # # ", +" # # # #bbbbbbb#bbbbbbbbbbbbbb # #bbbbbbbbbbb# #bbbbbbbbbbb# # #bbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # # # ", +" # # # # bbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbb # bbbbbbbbbbb # # # #bbbbbbbbbbbbbbbbbbb# # # # # # # # ", +" # # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# #bbbbbbbbbbb# # # # # # # # # # # # # # # # # # # # # # ", +" # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb #bbbbbbbbbbb# # # # # # # # # # # # # # # # # # # # # # # ", +" # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # bbbbbbbbbbb # # # # # # # # # # # # # # # # # # #bbb# # ", +" # # # #b# #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# #bbbbbbbbbbb# # # # # # # # # # # # # # # # # bbbb# # ", +" # # # # b b bbbbbbbbbbbbbbbbbbbbbbbbb # # # # # # bbbbbbbbbbb # # # # # # bbbbb # ", +" # # # # bbbbbbbbbbbbbbbbbbbbbbbbb # # # # # # # # #bbbbbbbbbbb# # # # # bbbbbbb # ", +" # # # bbbbbbbbbbbbbbbbbbbbbbbb# # # #bbbbbbbbbbbb # # # # #bbbbbbbb # ", +" # # # bbbbbbbbbbbbbbbbbbbbbbb # # # bbbbbbbbbbbb# # # #bbbbbbbbb# # ", +"# # # #bbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbb # # # bbbbbbbbbb# ", +" # # #b#bbbbbbbbbbbbbbbbbbbb # # # bbbbbbbbbbbb# # bbbbbbbbbbb # ", +"# # # # bb#bbb bbbbbbbbbbbb # #bbbbbbbbbbbb # #bbbbbbbbbbbb # ", +" # # # #b# bbb bbbbbbbbbbbb# # # #bbbbbbbbbbb# # bbbbbbbbbbbb# ", +"# # # # b bbb bbbb bbbbbbb# # # bbbbbbbbbbbb# #bbbbbbbbbbbb # ", +" # # # #b#bbb#bbb#bbbbbbbb # #bbbbbbbbbbbb # #bbbbbbbbbbb# # ", +"# # # #b# bb# bbb bbb bb# # # bbbbbbbbbbbb# # # bbbbbbbbbbbb# ", +" # # # b #bb #bb #bbb#bb # # #bbbbbbbbbbbbb# #bbbbbbbbbbbb # ", +" # # # # b #bbb# bb# b # # # #bbbbbbbbbbbb # # bbbbbbbbbbbb# ", +" # # # # #b# bb# bbb #b# # # bbbbbbbbbbbbb # #bbbbbbbbbbbb # ", +" # # # #bb #b# #bb #b# # # #bbbbbbbbbbbbbb # # bbbbbbbbbbbb# ", +" # # # # b # # # b #bb # # bbbbbbbbbbbbbbb # #bbbbbbbbbbbb # ", +" # # # #b# # # b # b # # # # # # # # #bbbbbbbbbbb# # # bbbbbbbbbbbb# ", +" # # # # # # # # # # # # # # # # # # # # # # # bbbbbbbbbbbb# # # #bbbbbbbbbbbb # # # # # # # ", +" # # # # # # # # # # # # # # # # # # # # # # # # #bbbbbbbbbbbbbbbbb# # # bbbbbbbbbbbb# # # # # # # # # # # ", +" # # # # # # # # # # # # # # #bbbbbbbbbbbb # # # bbbbbbbbbbbbbbbbbb# # # #bbbbbbbbbbbb # # # # # bb# # # # # # # ", +" # # # # # # # # # # # # bbbbbbbbbbbbbbbbbbbbb # #bbbbbbbbbbbbbbbbb# # # #bbbbbbbbbbbbb# # # # # # bbbbbbbbbbbbbbb # # # ", +" # # # # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbb #bbbbbbbbbbbbbbbbb# # # # bbbbbbbbbb# # # # # # #bbbbbbbbbbbbbbbbbbbbbb # # ", +" # # # # # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # #bbbbbbbbbbbbbbbb # #bbbbbbbbbbbbbbbbbbbbbbbbbbb# # ", +" # # # # # # # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # #bbbbbbbbbbbbbbb# # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # ", +" # # # # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # bbbbbbbbbbbbbbbb# # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # ", +" # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # # bbbbbbbbbbbbbbbb# #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # ", +" #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbb # ", +" # bbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbb # ", +" # bbbbbb#bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbb# # ", +" #bbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbb#bbbb # ", +" #bbbbbbb#bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbb #bbbb # ", +" # bbbbbb# bbbbbbbbbb#bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# bbbbbbbbb bbbb# ", +" #bbbbbb #bbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb#bbbbbbbbb#bbb# # ", +" # bbbbbb# bbbbbbbbb #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# # #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbb bbb # ", +" #bbbbbb #bbbbbbbbb# bbbbbbbbbbbbbbbb# bbbbbbbbbbbbbbbbbbbbbbbb# #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb#bbbbbbbbb#bbb# # ", +" #bbbbb# bbbbbbbbb #bbbbbbbbbbbbbbbb #bbbbbbbbbbbbbbbbbbbbbbbb # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb# bbbbbbbbb bbb # ", +" # bbbbb #bbbbbbbbb# bbbbbbbbbbbbbbbb# bbbbbbbbbbbbbbbbbbbbbbbb# #bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb #bbbbbbbb #bb # ", +" # bbbb# bbbbbbbbbb# bbbbbbbbbbbbbb# #bbbbbbbbb# bbbbbbbbbbbbb # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbb # bbbbbbbb# bb# # ", +" # bbbb# bbbbbbbbb #bbbbbbbbbbbbbb # bbbbbbbb# bbbbbbbbbbbbb # # bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # bbbbbbbbbbb # bbbbbbbb# #b# # ", +" # bbb # bbbbbbbbb #bbbbbbbbbbbb # # bbbb# # #bbbbbbbbbbbbb# # # bbbbbbbbbbbbbbbbbbb #bbbbbbbbbb # # #bbbbbbb# # bbbbbbbb# #b# # ", +" # #b# # #bbbbbbb# # bbbbbbbb# # # # # # # #bbbbbbbbbbbbb# # # # bbbbbbbbbbbbbbbbb # # #bbbb # # # # # # # # # # # # # # # # # # ", +" # # # # # # bb# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", +" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", +" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", +" # # # # # # # " +}; diff --git a/pixmaps/gravity.xpm b/pixmaps/gravity.xpm new file mode 100644 index 00000000..b6186a23 --- /dev/null +++ b/pixmaps/gravity.xpm @@ -0,0 +1,254 @@ +/* XPM */ +static char * gravity[] = { +"118 191 60 1", +" c #000000000000", +". c #DDDDDDDDDDDD", +"X c #CCCCCCCC6666", +"o c #808080800000", +"O c #666666660000", +"+ c #999999996767", +"@ c #7474B0B03333", +"# c #AAAAAAAAAAAA", +"$ c #CCCCCCCC9999", +"% c #CCCCCCCCCCCC", +"& c #000055550000", +"* c #C0C0C0C0C0C0", +"= c #EEEEEEEEEEEE", +"- c #666633330000", +"; c #555555555555", +": c #080826260000", +"> c #666673735959", +", c #2A2A66660101", +"< c #333333330000", +"1 c #808086868C8C", +"2 c #5F5F66665F5F", +"3 c #999999990000", +"4 c #CCCC99996666", +"5 c #FFFFCCCCCCCC", +"6 c #CDCD8B8B1D1D", +"7 c #99999999CCCC", +"8 c #CCCCCCCCFFFF", +"9 c #9999CCCCFFFF", +"0 c #9999CCCCCCCC", +"q c #CCCC9999CCCC", +"w c #999999999999", +"e c #CCCCFFFFFFFF", +"r c #1B1B82825858", +"t c #FFFFFFFFFFFF", +"y c #FFFFFFFFCCCC", +"u c #666699996666", +"i c #A7A764640202", +"p c #CCCCFFFFCCCC", +"a c #9E9E73735555", +"s c #FFFFCCCC3333", +"d c #FFFFFFFF9999", +"f c #9999CCCC4949", +"g c #8787CCCC9999", +"h c #FFFFCCCC6666", +"j c #CCCCCCCC3333", +"k c #333333333333", +"l c #9999FFFFFFFF", +"z c #CCCC9999FFFF", +"x c #595900000000", +"c c #FFFFCCCCFFFF", +"v c #FFFFFFFF6666", +"b c #CCCCCCCC0000", +"n c #FFFFCCCC0000", +"m c #EFEF99994747", +"M c #FFFFCCCC9999", +"N c #FFFFFFFF2222", +"B c #FFFF99996666", +"V c #B7B71E1E0C0C", +"C c #CCCCFFFF6262", +"Z c #CCCCFFFF9999", +" .XoooOOOO +++@+#$#$%%% O &O+%*= ", +" %oO-O&OOOO;OO&:OOOO>,OOOOO,OO&O,OOOO&O&OOO&Oo34%==t ", +" t%+O&2+988e88e.eee8e%e8e8ee8e8e88e8e8e8e8%e%e8%ee%ee8.8e8e888e88e8e8e8e8e89887#7#72w;OO&Ooo6yy ", +" y3o,188e.ee.e=%e%.ee*e*e%e.%e%e.ee.e%e%e%e=%e*ee*e..e.8e%e*e8e%ee%e8e=e%e%e=ee8e=e8e8e88=u2>,-oX ", +" t*OO1#e8%e8=*e.eee8e.*e.e.e%ee*e.e..e%e%e%e*ee*e%.e*ee.e.%e*e%e*e8*e%e=8=e%e8e..e=e8e=e==ee=8e97O,iy ", +" XO1e8e8ee.e.e.e..e%e.e.e.e.e%e=e.e.8p8%e%e..e8e.=e8e.=8p8e%e.8e=%ep8=e.ee.e.e.=e.e=8p8=8e.e8=e.e8*a-u y ", +" 6O8e.e.e*e%e.e%ee.8e.e.8e.e.e.8.ee%e.e.e%e.8e*e%.e.ee%e.ep%e%e8e.e%e%e.e=e.e.%ee=e.e=e=e.e=e.e.=e.e8%o&4 ", +" OOe.e.e.e.e.e.e.%ee.e9.e.e.e.e.ee..e8*e%e%ee.e%ee8%e%e.e.e8*e%e*e*e%e.e=e.e%e8ee=.e=e%e%e=e=e=ee.e.ee82,s ", +" Xo18e.e%e.e.e%e%ee..e%e.%e.e%e.e%%ee%ee.e*e%e%=e%e.e%e.e.e..e%e.e%e%e%e%e=e.e.e.=e=e.e==e.e.e.e.e8=e.8e.O&= ", +" *,*e.e.e8=e.e8e8..ee.e%ee%e=8e.e.e8*ee.e.e%e..e.e%e%e.e.e%ee%e.e.e.e.e.e=.=e=e.ee.e.e.e.e=e=e=e.=e..ee.e8Oid ", +" .3>8e=e=e=e.e.e=e8e%=e.e.8e.e=.e.e.e...e*e.e.e.8e%e.e.e%e=e..8ee*e.e.e.8e.e.e.e...e%e=e.e.e.e.e.e.eee.=e.e.Oe.=e.e.e=e8*o*eo,22O,o8.e=e=e.ee...ee.=e=8OOy ", +" &1e=e.e=e.e=e%e.%&we8ee8e.1O9880OOe%O&u8eo&8.gO78f&%ew11O&1w8O,egO9%ee%e.e.e=e.,#$O78e8*>e8=e.e.e.e.e=.ee.=ee+Oi ", +" .O+e8.e.e.e.e.e.80O%e=8.e=e9,4ee8+O88>;Oe.0O@9%&1e*O1.8e82288e921+O#e=.e.e=e=e.e+10Oie.e8e.ee.e.e=e%e=e=e=e8e=8w&h ", +" $O08e=e=e=e.e..ee3O8.eX%.8e$O78eeOOe$&w;8e.oO0%O78%,1e.8eo>8e%e@O&;88ee%e.e.e.e.#u8O,Ou3*%e.e=e=e.e==e.e.e=e=ee.OO ", +" %O*e=e.e.e=e%e.e8*O.8O,,Of*eOOe%+O1ewO81o%e8&o8&+e8u,%%e.0O0.e88<>&*e=.e.e.=e..e9oe91;-O&O3e.e.e.=e.e.e.e.e=e%=e2O5 ", +" j&8=e%e.e.e.e.e.egO0=+1>,-#8+&-OO788o2ew&08ei&uO7=eO>9e%e#O08.eeak;18e=.e.e..*%%.r8e8880w;OO8e=e8e=e%ee=e=.e%ee%%&o ", +" uO%e.e.e=e.e.e..e8u+8ee88>&e*-O&O#e.&O&,OO%882O-oe8wO0%e.8OOel..e7Ooee.e%e.ee8p8eOe.=ee8e81Oo.e.e.e.e..e.ee.ee8=e7O ", +"y-2e.e.e.e.e.e%ee%e*>e%8e.uO0#,11;O;*&;11;Oue8%&;w8e#&#e%e8&18.e8e%O18=e.e.e.e..e%@zee.e=e8eOO8ee.e.e.ee.e.=e.=ee%=, ", +" X%e.e.e.e.e8.e%eu-g%%01&%8O#e81O&O8e881O+e81o.e8e+O%.e.e8;O.e.e.e.e.ee.e>%e%$%%$e*a&*e5e=e.e=e.e=ee=e=%e8Oi ", +" O7=ee.e.e=e.e.e.e8e%@&O,OO78eO98e8*O18e=e.Owee*>28e.u18e=ewole.e.e@O9.e.e.e.e.e.8#8e$&O&O-,;7e.e.e.e=e.e=.e.e%ee.%,O ", +" O@ee=e.e=e.e=e.e.e%e8807#88ee8=e.ee8ee8pe809..880e.ee8e.e.e*..e=e80O*e.e.e=e.e..e.e.e8*07#7*e8e.e.e=e8=e.e.ee=e.eeuO.", +" O18=e=e=8ee=e=e.e.e..e.e8ee..e.8e..e.8e8.e8e%ee.e.e.=e=e.e8e.e.e.e888e.8e.e.e.e..e%e.e8ee8e8e=ee.e.e.e.=e.e.=e.e..uO.", +" >,%e.e.=ee.e.e=e.e=ee%+8.e.%X>O@ouw%=++u+g%%e.e%8e.%.%.0..p.g*%e%e.e.=%Xe.e.eX+uu#e%e.e=8p$*e.e=+Ou8e=.e.ee=e=e8.8wO*", +" &.=e%ee=.ee=e.e=e%=eoO,8%e8,20712O@8uOk&-OO%e8ou%o,O,,OO&#o,O,,%*e%=euOOe8e%o&1>&o%Of.e.8O@%e.e#&O%e.e.e=e%e=e%ee8O@", +" -0e.e==ee5ee.e.e=ee.O&O0e%%&788e81O8#&%8*OOu8eo>8+1,O21129O27>O&%8e.eoO&*e%%,788uO7OOwe.fO7e=e.+Oke.ee=e=.e=e.e.e$O;", +" ,1.e.ee==ee.e.=e.e88O1&o*e8Ooe8.e8&.9Ow8e8&o8%+&8e87O7e8e80+8e9OO0%e%O:OO=8e2>=e*&o9>,38u&%.ee80-1.e=%e=.e=e.e.e.e&+", +" O;8=e=.e=e.e.e.e8==gO8w&we.@O%e8.g2e%Ou.g+O7e.+Oe%e*e%e*>e%8#,0e%%,w;>0e.@2e88O188o&oO;8e.=eX&88ee=.ee=e.e.e%e%O7", +" 1Owe==e.e.e%e.e.=eewOe82O$e7O1$.uO%.e7,&O&,%.88&*e88>o8.e%8a8.euO%.e0O09ko%ew&...O2=e81k-2e=.ee888e.=.ee=e.e=e.e.8O*", +" ,u8e=e=e..e.e.e%eeo>8e*O>8.:O&OO788.0<1;>-r0e$O08e.uO9e*e.OgoOO98e.+;8*@<#*1O,@O;8e.e8ok18ee5ee=e=ep=e.e.e=.e.e.gO8", +" OO%=e.e.ee.e.e.e..O>w+1-&0%><>&&@e%e8ue887OO082oe%e*&*%e%e><&O1e.e82&O,-;&O0k-O,u0*e.e8>-e=.e=.e.e.8e=e.=e.e.e%eo@=", +" &ue=e.e=e.=e=e=e%&O,>,;-28O;91>-u8*eO8e8e+O0eo18e.*O1e.e.>r2<;O#%%O;1#71-1%&972-Ou*e.eOO%ee.e.f.8e=.e.e8=e.e.e4,qt", +" OO.e==e=.ee.e.e=eO#88881&02O8881-o0*Ow.%*>O880Oe=8e2O%e.eu8881O&@@O988e81O7O*e891OO*e8*&*8.e8oO@e.ee.e.ee.e.e81O. ", +" 6&08ee.e==e=e=8e$O9ee=e*O10&%e8e+&18,O&&Ok7e8.O8ee.#>8e8e+1e8e8o&Ok8ee=e#O9O#8e%e%7e=e#O1=e=eO&9=e..e.=.e.e..0o1= ", +" OOe==e.ee.e.ee.0&*=.e.e*882%.ee88.e9071#8e..e8e%e8e%e==.#u.e.e887#e=.e8e0881..=e8=e.e81*eee.8%.e.ee.e8e.e.ee3O8 ", +" -+8e=e.=e.e.=e$18e=e8=eee8e=..e.e..8e=e88ee%e%e.e.e.ee=e8e=e.e.e8e.e.==ee.9ee.8e=8e=e8e..eee8e=e..e.e=e.e.wO7 ", +" &%.e==e.e==ee88e.e.ee.e.=e.eee.e88=8e.e.e%e.e.e=e.e.e=.e8.e.e8=e.=e8ee=.ee..e=e%ee.=e8=e...e.e.ee.e.e.e=8@O= ", +" &.8ee.e.e%e5pe.e.e..e.e.ee%..e*ep.e.e%e.e.e.e%e.e.e.ee%ee5e%e.ee..e=.ee..ee%e%e..e.e=e.ee.e..e..e.e.e%e3O8 ", +" f.%e.e.e%e8.e.e..e...e...ee.e%8e%e.e.e.e%e.e%e.e%e%.e=%e%e.e.e.ee=ee.=e..e%ee%e.e%e..e.e%ee.ee.e.e.eoO* ", +" o0%e.8.e%ee.8e.e%e8e%e8e..e%ep.e.e.e%e.e%e.e.e.e%e...e.e.e.e.e.=e.=ee=ee%e..e.ee=.ee.e.e=8e..e.e=83o7 ", +" Oow%ee.e..ee.e.e.e.e=e.ee.e%.e.e.e.e.e=e.e8=e8=e.e.eee8e.e=.e=e.e=e=e..e=%ee=e.eee.e.e=ee=ee.ee*eO* ", +" OOOu*8e.ee.ee.e8e.e=e=e.ee.ee%e=e.e=e.e=e=ee.e=e=.e=.ee=e.ee.e=e=e.e=ee%ee.e.=e.==e=e=e.ee.=e5e%o1 ", +" 7O&Oo@e==e=.e=e=e=e.e=e==e..e=e.e=e.e.e.e=.e=e.ee=ee5e.e=e=e=e.e=e5e.=e%=e.ee==ee=ee.e=e5ee.0@oO ", +" OOO0e=e=ee.e=e=e.e=e.=ee%e=e=e=e=e=e.e==e.e.ee.ee=e.e.e5e=e.e=e.ee=e.=e=.ee.=e..e.e.e$3oO,w= ", +" Oo@u+#$%..e.=e=..e=8=e.e.e.e=e.e=.ee.e.e==e.e.e..e%=.p8.=%...0.%%p8.%e%.*p$+g++u+++##. ", +" 7w2OO&O&O@++f$0%%$%*Xe%...$e%e.e=%e..$g.@ooOOoOOO,,O221##1####wwww ", +" #*qw11 21a22>ww##OOg1 ", +" cO7+8 ", +" eO#@t ", +" h&7at ", +" *>+1t ", +" XO&*= ", +" w&-. ", +" 6>2 ", +" 1-+ ", +" 3O ", +" O+ ", +" i8 ", +" . ", +" v tt ", +" bOO& y5 ", +" bOxOO-by nOO4y ", +" o-&-6-i6dy h&o63+nXnsvsnshsnNhnhnhsssNshvnssho-jyXjCh ", +" OO*Myhd5yMMMhyMZM5MMyM5MyMy5555*$OOOObshnvnhhnnvsnvnvnshnhsNhhObhiO-O ", +" XO155Myh5MyM55Myh5MyhMMyMMyh5yM5M55$6o-Xhhnhvnhsnvnnsnhvshvnhvnhnho&Oa ", +" toO*Md5hMy5syMhyMhyMh$fX6y5MhyM5MyMd55546MdhvnhnvhnhhhnvnnvnhhnhhhMiOxj ", +" yOO55MyMyh$$oOoX5yhyoiiOO$5yMMyMyhMMMyM55MMynMvnnhsvnvnnhvnsvsvnhvnX-OO ", +" 6Ow5Myh.MM3OO+O35M5+O55*-X5hy5hyM5My5MMyMy5MMyMMsvsnvnhhhnshnshnvnhMi-O1 ", +" OM5hyMyhMyMhy5hyMdMMdMyMhyM5yMMy5hyMhyMyM55hy5hyM5MsyM6oOohhhnshho45MMd5hyMM%&>kOMM5h5;<;OiXhMyM=5wa$MyM5MyhyMMyMMyhMyhMyhyMMyhyhy5*4+55M*;-& ", +" 2ch5MyhyX63O<;OO%MMdM55=M5MyMys5MyMMyMMpMh5yh5MyMMyh5h55555yM5O&- ", +" O3.hyM54OO&>k;k-6y5MyMyMMd5hdM5MyMMyhMyhMMyh5hyM55hyMhyMyMyMM.OO- ", +" OO4=h5bOO<;2*q545My5h5MyMMyMMyh5MyMM5yh5yyhyM5hyhyMMyMM5Mys5yhO-1 ", +" c5yhyM5MyMy5hyMMyMMyM5hyhM5M5hyMyh5hys5yMyh5hyhM5MMy$O,% ", +" X,45hy5$OOXyM5MMy5hyMy5hy5MMyM5MyhMyMyMyMMM5hyM55hyMMy5syMyMyM5O-= ", +" +>cMyhMMO>5h5dMyhMys5syMhyM5Myhyh55hysyh5d5yMMyhyhMyMhyhM5Myh54O1 ", +" @4d5Mhy5#&6%MhyMMyhMd5sy5hdMdM5MMyMyh5MhyhyhMyh5hy5h5MXM5Myh5M3&5 ", +" i.h5yMMM5@&4.MM5MMM5X$5MyhMyh5yh5Myh5dM5h=s5MM5dMh5yh&Oo+%M5$b<28 ", +" ;M55h.MyM5OO6$5Xyhy5+XMyh55MMyMMy5hMyMM5MM5hyMdM5Myh54O&O34fo-,# ", +" o5MyMM%MM%$OOO$M$5XjO55MyhM%MMyXM55dX5yX5$Myn%MMM.h*ho-O&O&-O:1 ", +" >d5h$y5hyM5#OO&O33OOa$M*h$yhy5X5Md*MMMby5M5XMd5MpM5MuOk;1;;;2 ", +" aM$55hy$h5M.5+O-&OOO+M$MMy5h$d5M5XO- ", +" >$$5dM5$yM%h.M.syM5$yXiO<; ", +" 7w1;OOOoO@@636X$h%MMMMd5MM4%%* ", +" #aO&O<,OOo$5yh%MdXa5y5t ", +" =#VVi-O44*MM$MXXOOinnvdy ", +" .ViV-V-&OO,ooOO-k--VViVVVO&i ", +" %O ", +" +O<---;k--ux--;--VVV;6V6V6VV;O ", +" ukkVaVVxaVxaV--kVaVV6VmV6V6Vkx6V6VV6V6VVa--kk--;V;VVaV6V-Oi ", +" O--rx-VaVVaViVVk;kkk--kx;---Va--O ", +" O2;x-;k-k;---VaV<;-k-Va6VaVV;--;V6VVVVV6VVVa---xO-$h*5M;2;-%tc ", +" M&VVV6VVVV6VaVVVVaVV;M55M$O22O*%t ", +" wO-V6VVaV6V6VV6V6ViVOM$MM=a:;-$ ", +" XO&xa6VV6VVVaVBVV6VaV2-#5X35Mw+-;:;8 ", +" ==2;kxVV6V6V6V6VV6V6VVV&6$4OuM55*;;O ", +" yM*wO;<;kx;-axaV6VVa-2-k-,$$-O$5M5+O< ", +" ydXX =4O,,O;k;x;k-;<-kkk<;-kx;kww1-k;k;kkkkk2xrxkk;x;k<2$O-&ooXOO; ", +" 3@#%=8%*>OOO&O1c=8z;;k;kk;k;-k-;k;kk<;k-+-*888q#12kk;kkk;kk;kk;kkkk;<;Okk-+==t==t=t====ttc1r-aaaaaaaVwVaaaa;k-<8q1q= ", +" 2OO&;;<;k&-OX==ty===ty=t=t=tc======t=tt=t=tc# ", +" c2;;:,O%=yt=yt=t=yt=tt======t===y==t=t ", +" q7>;OOOO,oooo+++u++++1+++w##4$== "}; diff --git a/pixmaps/hobbes.xpm b/pixmaps/hobbes.xpm new file mode 100644 index 00000000..b2ae02e5 --- /dev/null +++ b/pixmaps/hobbes.xpm @@ -0,0 +1,279 @@ +/* XPM */ +static char * hobbes[] = { +"108 214 62 1", +" c #000000000000", +". c #FFFFCCCC6666", +"X c #FFFFCCCC9999", +"o c #FFFFFFFFCCCC", +"O c #CCCC99990000", +"+ c #999966660000", +"@ c #666666660000", +"# c #666666666666", +"$ c #999999999999", +"% c #000055550000", +"& c #CCCC99999999", +"* c #FFFFCCCCCCCC", +"= c #FFFFFFFFFFFF", +"- c #EEEEEEEEEEEE", +"; c #BFBFBFBFC0C0", +": c #333333330000", +"> c #999966665252", +", c #AAAAAAAAAAAA", +"< c #CCCCCCCCCCCC", +"1 c #CCCCCCCCFFFF", +"2 c #555555555555", +"3 c #666633330000", +"4 c #25256A6A0606", +"5 c #FFFFCCCCFFFF", +"6 c #91917B7B7979", +"7 c #808080800000", +"8 c #DDDDDDDDDDDD", +"9 c #FFFFCCCC0000", +"0 c #14141D1D0000", +"q c #333333333333", +"w c #CCCCCCCC0000", +"e c #666666663333", +"r c #666699996666", +"t c #CCCC99995E5E", +"y c #FFFFFFFF9797", +"u c #CCCCCCCC9999", +"i c #CCCCCCCC3333", +"p c #999999990000", +"a c #666600000000", +"s c #9999CCCCB7B7", +"d c #CCCCCCCC6666", +"f c #9595A6A62C2C", +"g c #999999997C7C", +"h c #FCFCFFFF6464", +"j c #666666669A9A", +"k c #CCCC99996666", +"l c #666699999999", +"z c #66669D9D3C3C", +"x c #BABAFFFFD7D7", +"c c #D2D266660A0A", +"v c #FFFF99990000", +"b c #FFFF99993333", +"n c #FFFF99996666", +"m c #FFFFCCCC3333", +"M c #FFFF9999A2A2", +"N c #CCCC66666666", +"B c #CCCCFFFFFFFF", +"V c #141475757575", +"C c #FFFF66660000", +"Z c #CCCC9999FFFF", +"A c #C5C51D1D0B0B", +"S c #99996666CCCC", +" .X ", +" oO+@@@Oo ", +" o.+#$@%@@& ", +" *@@ =-;:@@X ", +" o@>--==->%@, ", +" ..*+@<===-=12%O ", +" o.O+34%@@:5---=-o3@6= ", +" O7@@;$@%:@8=====;:@+= o ", +" o9%@;--=$@@:;=o-=-=@@@= ", +" *0@;--=--1q@7*-=o==13@- o oo o ", +" w%,-=-=-=->qer=-=o-=$@t==o=ooyywwuoo ", +" %75--=-=-=16%@.---=--@@=o=-oip7@%a@oo ", +" @6--=-=--==-$e6===-=*7@8=ow3>---;7@@i o ", +" 8@@8=----=------=*o=--s0O8d@71---=-1f@i ", +" +@g---o-o---=---=--=--@%@3@1=--=*==877 ", +" o 1@%7*-----=--=-=-=o=-=1,@2>=--=-=--=g7 ", +" oyyppw 8g3@7u*--=-=o-=o=-=o=-=51---=--==---p@ ", +" oyhhoo=o oyp%3@@w $2%03%7*o-----=o=-=-=*==-=--=--o=-8@@ ", +" oy@%@po==o=oy%7$<$>%8 O@@:32%@%78=-=-=-=o=-=o=8=----o=o--o7:; ", +" o7,8$@7oo==o4+<=-=-gw u4@61j266;<--=o---=-=-o=--o=--o=<8-<@@; ", +" op8=-=8@7=o-p@1=-=--<@ X@@;---5-=--=-=----o=o---=--o---o77f761 ", +" p8-=-=--f@u7>-=--=o-*@ od@31==-=--=-=---o---o=o----=-=-o-7e- ", +" t-=-=-==1e:@;=-==-=-up ;:@<--------o----=o=---=-=---o=-8@> ", +" ;=-=-=-==k4e5==--=--7< @%f8------Xud---o=o-=------=---u%, ", +" O-=-----=1e,==----=dp l@37*-o-8d7%3+io---=--=o=o=o=--z+ ", +" xpd o4-=-----==-==-=---of@u 8@%@zgkp7:@#e%@k=-----o=-=o-*d7#1 ", +" <@3:d17X=o=--=o-=-==o--=8=1Oo 1j::@%@%+1 ;@%o--o=o=-----z4+8 ", +" x7@6@%urg==o=--=--=o==o=oO7;$ ,,,,11 5 ,@&=-=o-----=u7%1 ", +" f71=$@3@0.o=-------=-o=-=1==------p37e@@+ =--o==---=-o@%:@cn.viv733:+tbdv.vt.O@g @%e33%3%3%:@%> ", +" e@u----==k@<-=-5$o---=---=-o-@@%3c.vObv@@%3@bnOvmvObvbk@+ d@@MkN>ee@3#:3; ", +" d@6----oo4,-=-===-=-----=o=-=%:3@nv.vd+@0@3kbtbbO.vdvbt3e8 yt4@cv.nnknkkn46 ", +" 1@@f-o==f75--==-=-=o=--=o=--=@:@+vdvn+@0@agvtv.O.vtvOttq+ t@%@:@mv.v.v.nt@1 ", +" ,@38--876===------=o=--=o--o0@0NnvOp3:%3>nb.OvvOtO@3%32l 7@:::@+Ovdvmvv@6 ", +" ,e@7d,@f-=--=---=o==o-XX---20@ttbt3%q0@tvdvbO.t7:3%3%%c 1@2q20:@%cObvd@< ", +" 1@@%@:#--=o=o=o==omw74@u2$ X%32322:3%@@7+@5 ", +" 1,$2@@ -o=-=o=-ok70@@%@@@qqqc+@:2q:@cdnt@%033+tnnnn@& X%37nkk32:%3%:@> ", +" 5 #@r-=-o=-.w3@,11;,666622%@:::q2>nOO@:3%+knbt.v.3< 73@nt.vknkc>@3q ", +" 12@+dy O@%@85 5B51,#22:ktk+:::@+nbO.vvdb:k @%+vmv..tv.nkq> ", +" u@@33@%@@;1 51,@3@:%3q2cMtb.Obvvd36 i3@+nb.vvmbO.@21 ", +" 16#%@@#< B8 16@q3q:tnOmbvv.tO@@@ @@0@Oiv..bO.c@$ ", +" 5181 u%:2%qenb.vObO+@:3:2< O@023@tOOvO.c@#5 ", +" 5$@3n.v.OO+%30q2321 X73@kn>%23%.vp@,5 ", +" 12@tvdvc+%3:2ck@%X g@%tntM3203@O@71 ", +" k@kvv7%:3q>knn+@; *w@3cn.vdc:2:3%e1 ", +" =1@+k@%32:+kvdO>3k Xc73@+kmO.vk2:2233u ", +" :@:@:::2:3%3@@:6 O43%:@kbmOvt@3q02q> ", +" 8@@0@:q:2:qq:3:03+ 1@%3:3@OOvkbkq232#< ", +" +%02:2:q:2:2:qqq225 O:::::3@tnmOk@:j15 ", +" 1@2:2:q2qq:2:2:3:@ u@:22:2q:%Oc.n>3 ", +" g3q:2q3232e#3##33 X@3%cn>@:2:%7ct7$ ", +" 5V3e>>>ckkbknnn>4* g@%+b.nk>3:33%@:g ", +" o 7%Nnn.tnvkbbdbO:8 od3:>nkv.v.t>@:3026 ", +" y o g@k+.Onbv.vmCbk%k u@:@c.v.vbvnb&>qe, ", +" y+o=o o9 d@@@cb.O.vOvmvb@@kp@3%+nOmvvmvbbbf2Z ", +" k@+o=o *7 g:3vdvt++Op+tk>:%@::33dbvvivvdvk3g ", +" O%@&==od6 *@%+nc4@@3:3@%@0320q2:33ptbv.vvd@>5 ", +" e@67*--,k-87%3kO@%:3%:%:3::q:qq:q:%:+OOvv.c3< ", +" o@#5r;=*z,u73@@nt3:2032:::2:2qq232:3:%@ckvO@6 ", +" <@6--fdB@;;e>,@k@%23:2qqq:>#q:+k&>2q23:%7O+%5 ", +" o oX7%;--1p@@15---@3#;622:2q2q:q22knbnk+2:q3:%@# ", +" o o 1<5=-=-;;*===-5<1=1$:#ckNq2q3kbO.tvXn>22q3@& ", +" o ooyooh++p<=-=-=-=-==-----=--<@;*.b7q:2Nn.vObbO.nnf%2Z ", +" oyyiwpp773e#6@@do=---=--o=-=------=-.f@q3@kvO.vmv.Ov.>3$ ", +" yw@%@%@%@:@1--1:@:u--=-=-=--o=-o-=--=o------;%32::@+dbviv.vk@@8 ", +" 7%@611*18,3@#--=-----o-o-----o----=--od3q:qq:%Akvv.Ovp@, ", +" ha@;1 ", +" 7361;@3qq232q:@:2@1---=--o+@B*=-----.7a@:+nivOmvv.vObk@#1 ", +" 8@%65g23220Vq:V:234*=o=o-=8@,-=-o=o-=g:@:%:@vtmbv.vO.n73< ", +" u%@;8@:2:2202qq2:2j------o*;------=oX@%:33q%@kbivvt.v7@65 ", +" ,33g1%2:2q32qq2qq3<---o=--gk---=-=*k@%@c#qq:3@iC.O.vO@3@ ", +" d::6<3@qq2qq2q322#1==---ocr1=--o-op@%+knt>@::3AtvbOb7::e8 ", +" ;q3@$2qq2qq232q2:<-*o=--u@;=*o=*=*r:+kbOnnNe2q:%7Ont%3e%k ", +" 8@q23:22:2:22:2q,---*=-=-k--=--=X7@:+bnmvtnk+@q@:@7@3e>3#8 ", +" =$q2:2q:2:2qqq#s5=--=o--------=<74:3%nObvv.bnN23%q3:q0@:@%m ", +" 88@:2:2qq2q2#,5-=-=-uXiX8-=---X7:@::2+.vtmvt.vk+e3q2:20::@% ", +" x u71j32q2232>1--==--->%@8----=*7:@0eq:@cv.vOmvnbnn>q@k>#2:37* ", +" -u@711;,>jZ1=-==-----8@;=----X7%@0>n%3%@kvb.OO.t.v72$*.On>%3; ", +" -#@p=5=--==--o=-----7g----=*7%3:+knkq:37tbOv.v.vk@38y.+kn>:@. * ", +" ;@@;=-=----=-----oo>--=--X7@:%+Nbbt@3%3@kbbOmObt@;-8.77On@:@cO+c ", +" $:@o=--=-=-=-=o==$5-=---z@::+c.v.n>23:%cdvmbvd+@1---u@ttkq3%:@c ", +" @%>--=o=o----=o-u1=---.@%@3knv.Ovk@03:@c.vtvO@,----yc@++qq2%3, ", +" 1>%7d*-o=-=o=o8p@-=--=g%@:ebvdvvin>q:2:@c.vnt0*=-=---q5-=--o------=-8---=-87@gkbkX ", +" u@%p*-=o=--=<32:>>23qq:2:3%@cOvbv.kn>-------o=o---8=-o=8-=1;#66;+v ", +" d3@@e8=-=o==od::2knk%32q32:304@ptbv.O1=--o----o8=o--8--o--8=--= ;,5 ", +" <3@%>;--o*-o=5<2q3Onbk#:2q2q:2030@@7++7p*o=----8-88o----------=-,@< ", +" e26 =o7@---=u@@:kbbnn>@::2::20%3%30@%e<----o-----8-----=-=o--*z1 ", +" $1 $@7*----#03v.tmvnk>2:2q:q3q302:3%p--o---8o-o=8oo=-oo=*-=-&- o * ", +" u7@2-=o--p@:kvvbivbnk+e3q2q202:qj3%8--------88---o--=oB-*=--d+Od* ", +" ;@,7--@X-13%cO.vvv.v.nnkkN>>>>c&6@3----o--8o---------------=5-e@* ", +" pe 18<,-=*%3%cO.vbvmvvbnOn.vnndv@j65=--------=o-----------=-=-z< ", +" g$ 7-=--<23%OvvdvvO.bivmvnO.c@e==----=----o=-o-=o-o-=--=8-=-,@%u ", +" ;2%3@@@3@:%q:q3ec.n&----o=o--o=-o---o----o=-o=----1@3. ", +" ;@:3@::03:2:2>k.vk;=-=o-o-----=--=o----=-o-----=--<@@X ", +" 1j2qq:2:q@+kb.vnf<*o-----=-----------=---=--o---=*8>+X ", +" 1g22:2Nknbbvdvc1p5=-=--o=-o=--o=-=o----o-=--o-y9v.$5 ", +" 5,63%cO.O.vnfd*=o---o=--=o--=--o=--=o----o=--9.bnX ", +" 5M*-=o=----o=---=-o-=-=o---=oo---ymvmvt%+5 ", +" 16q:3kbX-----o=o=---=o--=----------=-oo..tbk@@O ", +" f2:k.8-=--=-o=-----=--o=--=o=o=-=o--ohv9vk@3e5 ", +" ,3@cX=o-=o-----------=--=o=o=o---=--y.vkteq0. ", +" g@&5-=-o-=-------o=o---o--*=------oh9O@33q2%5 ", +" k>nX=-=o--=-=o=---=o=--o--=o---o=o-*hvnf@qq2e ", +" @dn--o---o=o=------o--o=-o=-------oyvd>322:@b ", +" 7cfu------o---o=o------o-*--o=o*=*-..v7@kN@:l5 ", +" uu@@#@v-----*=--=o---------=-o=-*=o=-om.t7nMe@@* ", +" *g11 @#=---==o=o-=o----o------o-=---oymvt+k.O3%$ ", +" :;*=--o--o=-o=-----=-=o==*=-----o..ntpvk3@+* ", +" @8=--=*=--==-o=----o=--o-=------ohO9+@7+2:%k* ", +" <+ -=-o=o-=----=o=o-=--=-=-------omO:@:32:0@%O* ", +" Xr =----=-------=o=-----=o=o=---ood%3%3%:q20q2 ", +" 1+8Xoo=--------=o=-------=o=--=o=5-,#32q32q:#+ ", +" ,f@+-=-------o==o=o=-----=o=o==o=--*gkkkkNe:65 ", +" @+=o-----=o=---o==o==o=o=-=o----*opv.nv.N@+ ", +" @6-==--=o==o=o---o=-o=---o---=o--93tv.Ovk%@5 ", +" ek=-=o=o==o=--=-=--o=-o----=-o-=oi@Omv.nt@@* ", +" @<---=o=o==o=o---=---=-----o----o90Ovtvmb@%; ", +" 5g&--=o===o------=o--=o------=--ooX%Ov.bO.+@O ", +" d7=-o=-o==------o=-=o=--o=o---=*om@+.vmbbk:@ ", +" 87*-=---=o-----=-o-o=---=o=---o=8o@+O.tv.t@+ ", +" u@-=o-=--=-----o=--=o-=o-=------dp@@cOttbk@3 ", +" 4*--=o---=o---=--=--=o=-o=o=o=8@@::%:@@7@:@* ", +" @,=--=---o=---o=o--=o--=--=o-o8p@:23%3::@::1 ", +" @p-------=----=o=--o-=---o=---o*k#3#qq:2::@* ", +" o@+-=-----o=o=--=o=o--o-=-=o-=-o99@knk>@:q3% ", +" >@=o-----=o=-----o=-=--o---=-oo.b7CdbnkNe%3 ", +" 7#5=------=o=o=-=---o-=-=-----99vt.vvdb.c@3 ", +" d@,=------o=-=o---o--=o--=o=o*p+7++.vOmvbvf@5 ", +" 73e3%OnivbO: ", +" <@3<-=-==o==-o=o=--o=----=o=o=--op7M>:@Advv.+@* ", +" O%@5=o---=o-=----=----=---=o-=o-h@O.t+:@+ndv+% ", +" @@#---=--o=-----=o----o-----=o-=O@bvnk20@pvn+%* ", +" @3<-=-o-=-----o=o-=o=o=----=o=-y+Obiv.+@0@t.@3< ", +" *%@5----=o=--=o=---o=--=o-=o=-o=i+O.v.OM3%:+O@3< ", +" d@,=----o=o=o=-o--=o*=--=-o=o=-.+Obv.v.Ok3q%33%5 ", +" @g=-=-o-=*=o=o------=---=o==--=7Ov.Omvv.k#q23%3 ", +" d@5-=o----=o------o-=o=o-o=o-=-X+t.v.vivvbO::23% ", +" p$==--o=-o=---=-o=--o---o=-=--Xf@+cO9vv.v.n#q0@3 ", +" X>-=-=o-o---=-oo------=o----ooc@@:%@@@kmvdvm+@0q@ ", +" 7 =-=------=o=----=o--------=*@@::3::3+OvvmOMq2:+ o", +" 9 --=o-=--=o----=o-o-=o--=----*7:@:q::q%@kvv.O>@qj ", +" *p7-==---o=-o--=o------o----o=o=g@k#q2q2:@:+O.vbk2qN ", +" .7@;=---=-----=o------=o--=o--o-9+vbk@32:20q@tt.vp32, ", +" * *O@@r*--=o--o=o----o=o--o---o--=*m@Okv.N2qq:q@:%bv.>:@& ", +" Xd77%4$r>5B=o-=o----o-=--o-=o*=-=o--*w0@Ob.vk+@qq2023ktt@2q ", +" :2::3%@k>:@> ", +" up@3%@:3%36k#-----=o--=-o----------=----o7++@3ckmvbk+:q203%@3q21 ", +" 8p@@:3@03%303%g--oo=o-=-o------o-----o---ov+.n>:%bOvmnk22qq23::2e* ", +" d73@3>kk+:q:20@6-=--o----=o--o----o---=ooXv%vO.t3%@n.Ovn+%3202:2q; ", +" 8i70@+knvivnbt>2::qqg=---o-----o----------*.@@Onmvtbt0%7.v.Onf32qqq21 ", +" 8f@0@:3+ptvbvdbn>2q23@u-=o=-=o-------o=o-*XO@+OnOOv.bk2:3vivv.n>232e; ", +" d7%3%03033@tkmvbdv>@:2:>=-=o--=o=o----=o*Xp@:@+bdv.mviv03%kvmvO.@:221 ", +" u@3@+e202:%::OOvivbM>20@4X-o-=o--=*o=o-o*X+@3@03@OvvO.vk2:%vbO.t:@:@8 ", +" @%+nknk>32:3%:+nvivib@qq2$----=o--=*oo.97@+tb@3%3+ndvv.O3%3k.O+@32,5 ", +" * *X X :@nO.bbnk#qq3::Odvtvnk2:37----o--oXXvc+@+Omnbt630@Ovv.vt@3:@+@%36< ", +" uw7:%@@@cO* o o *@c.vObdvnnf3%::@On.Ovb+qq%*ov.kvO@@%@+OOvvbmObO@30@t.Ovt:2:@:3#Z ", +" <+@%3%3%3@@%7+d*t* u@kvkvivbmOnk22:3@tvvdb&e%3@34:@%%3%@@+@cOO.tbbnk23%.vv.g3:2q3$1 ", +" 7@43%:@:3kvtc@@34@g X%+nOmvvtmOb.OkAqq@@tnvdvc@0f+@@::@0::::30@@c.Obtn+@3ObvO+:::j15 ", +" @@%@>eq3:%cvO.bnc@:@@%334OcOO.vbbOvnk>2::OO.vOM233:303q0:2qq3:%3:@+vdvm&3%nvdc@:245 ", +" 7@:+cnk+023#nbObiv@3:::%:30@@3@tt.vtbnk@3%3kO.vicq%30:qqq2:2:2:q:2:@+vtv.+3t.+%32j1 ", +" g@0@+nkbk23:@Ov.bvk@%q3%32:%:0%:@@+pbvibk#3:@Ov.vk2qq:23+gc>c>e2:2:303@.tvk2+@:3:@8* ", +" @%@0@7bkb7:3@tnviv+3:2e>::q32:3:03%@%@ctbk+@:+tvbt%:2>N&nndvknnkcee::%3+niv+@02:2:%@pu ", +" <%30@::@Onk2q:cmtvk@qq3>n2qe202q:3%3:3@%3@Otk>+btk@3>tknv.Ovv.vO.knkN#3:@7vnnq32$,,,6%@@d* ", +" d3%3q:30@@+:qq@3+73@:2enk+q>kNc6@:q::::3%:33+knf7:%3nnmOvO.vOvdvvvdvnk>@0@kOO3q,5=---17@:g ", +" ,@+6:2q:::36,#6q@:@q:@c.nk2:tbknnkN>>232q:::%++@@@37tmOv.vvtvdvvO.ObtvM>@@Ot@2q@$-=-==56%@to ", +" op+MOk>@qq21 5B;63q2ekOO+:q>dvt.vdvknkk+32:3%@3+:3k.vbiv.OvdCp7+%+7pOtk+>+3c>%36--=--=<@%> ", +" rttbnn#32e5 5 1$qa@3@:2:@3Otvtvv.tbtnk>q2q03::@vv.tvOcO73%:@03:::@+::3@tn$2:%*----=-637 ", +" o7cndvO+:S1 5$e:q:#>e:@0@7ckOObdvtkk&g>q2qqNntv.@@%3:3%30:q%3::q@:2Nnic%321==o=o-k4e5 ", +" o7+Oc@@:@$ 1#:@cnk>:3::%0@3%3%:+p-585;:@kvnp%@:3::%30:23:2q2qq:@tmvg3%3--o=--=1@@ o ", +" 87@%@332:e1 8>@3n.b7023q@0@:3:@:,---8d@:kd7330@0q2:q#>eq2:q:2:q3kv.+:2#5=--=--*%$ ", +" @03:02qq3f <>tvke:@,,j22##$$15---=$03@+::%q:q@>>nknknk>>2:234bkb3:@g=o-=o--B@NXvtbtntnntn@:2en.O:2S--=--=--oN- ", +" B2Vq:2:2:@%@ 6:6-5==-=-*B*o---=-6:q:0:::>NO.vtv.vmbvink+2%Adv7238==-=o=o=-== ", +" t4q2qq2:qq2% 8 8*@e1-=--=-=---8=-o8d%@q2:q2Nk.vvb.OvtvdvvvO::eMOO33Z----o=-=o-=- ", +" ,232q22q2:2#5 8u@#-=8-=---=8----=--6@q23knb.vvdvvdvvvO.OO:3>nt7325-----=-=o=.s= ", +" 3V322q2:2:@< <%@-*=u=-o=8o=-------223@vm.vOmvvdvvvdbvt3:@ktf%:@-=-=o=o---=7* ", +" ;:2:2q2q32%, u@:1-ig=-=o=8=o=--=-8>%23kOv.vv.vvibivtO@03etc@321---o=-=o--w7 ", +" 1122q2qq2:@@ 1%@7-;+o-=---o=---o-g6,20:++OOmOviv.vkc@03q3eq:288-=o=----=u@& ", +" 8;3q222:2:@; 8 g@%,;z5=o-=d*=-o=d@< 51;:%@3@3+pcp++7%:3Vqj;1<1---o=-----X7> ", +" 1#2q:2q3%; 1%:@@@u---o-7-o=u7g5 1,62::@:%3:@:3ej$1---8=--o=-=o=o=7@B5 ", +" 8 <,j2q2S 8>@0@07-=--*g1 ", +" 5 5 5 1 5s+%@:@0@@%%34@:#$1 5 ", +" 1<1,,,$$6$2%e;5 ", +" 1;ee1 ", +" 5 "}; diff --git a/pixmaps/l-linux.xpm b/pixmaps/l-linux.xpm new file mode 100644 index 00000000..b0e7b002 --- /dev/null +++ b/pixmaps/l-linux.xpm @@ -0,0 +1,332 @@ +/* XPM */ +static char * image_name [] = { +/* width height num_colors chars_per_pixel */ +" 64 75 250 2", +/* colors */ +"bZ c #000000", +"b3 c #f8f8f8", +".. c #a87010", +".# c #f0c814", +".a c #a88004", +".b c #100404", +".c c #503800", +".d c #eccc38", +".e c #101004", +".f c #f0d014", +".g c #684800", +".h c #b08804", +".i c #f0d820", +".j c #503000", +".k c #a87800", +".l c #684808", +".m c #d09010", +".n c #503008", +".o c #e0a410", +".p c #805800", +".q c #f8d830", +".r c #f8c838", +".s c #a08004", +".t c #d0b404", +".u c #f0d810", +".v c #281804", +".w c #d8a410", +".x c #f0cc20", +".y c #d8a800", +".z c #686868", +".A c #a87c1c", +".B c #b88804", +".C c #c08810", +".D c #a08c74", +".E c #805808", +".F c #483000", +".G c #e4cc20", +".H c #a4803c", +".I c #483008", +".J c #604c04", +".K c #f4d850", +".L c #e8b010", +".M c #606060", +".N c #a48804", +".O c #684000", +".P c #606058", +".Q c #c08010", +".R c #201804", +".S c #745804", +".T c #a8a8a8", +".U c #e0b800", +".V c #805000", +".W c #685030", +".X c #f0d818", +".Y c #a8a8a0", +".Z c #805008", +".0 c #201004", +".1 c #a0a0a0", +".2 c #f4d448", +".3 c #403004", +".4 c #583800", +".5 c #604000", +".6 c #785000", +".7 c #585858", +".8 c #f0d838", +".9 c #707070", +"#. c #a07000", +"## c #e0b808", +"#a c #b0aca4", +"#b c #b87800", +"#c c #885800", +"#d c #e8c808", +"#e c #b48410", +"#f c #503c2c", +"#g c #f8b808", +"#h c #e0c808", +"#i c #986000", +"#j c #888888", +"#k c #784804", +"#l c #484848", +"#m c #a07008", +"#n c #887870", +"#o c #f8cc14", +"#p c #181404", +"#q c #c0881c", +"#r c #e8a810", +"#s c #e8cc14", +"#t c #986800", +"#u c #503808", +"#v c #909090", +"#w c #606068", +"#x c #704800", +"#y c #b0b0b0", +"#z c #f4d028", +"#A c #906804", +"#B c #f0b008", +"#C c #707078", +"#D c #583808", +"#E c #404040", +"#F c #604008", +"#G c #704808", +"#H c #906000", +"#I c #704004", +"#J c #e8b808", +"#K c #240004", +"#L c #c08000", +"#M c #c08008", +"#N c #886000", +"#O c #e0b008", +"#P c #986808", +"#Q c #886008", +"#R c #383838", +"#S c #e8a800", +"#T c #e8a808", +"#U c #505050", +"#V c #785008", +"#W c #f8d820", +"#X c #583004", +"#Y c #989898", +"#Z c #303030", +"#0 c #808080", +"#1 c #a8a8b0", +"#2 c #a06800", +"#3 c #585864", +"#4 c #d8b404", +"#5 c #c88800", +"#6 c #684008", +"#7 c #e0a000", +"#8 c #c88c10", +"#9 c #d09810", +"a. c #382420", +"a# c #282828", +"aa c #603804", +"ab c #888890", +"ac c #484840", +"ad c #906008", +"ae c #885808", +"af c #483804", +"ag c #a87000", +"ah c #b88000", +"ai c #c89000", +"aj c #181818", +"ak c #f8d814", +"al c #c08800", +"am c #e0d08c", +"an c #e8e8e8", +"ao c #a06808", +"ap c #d09000", +"aq c #d8d8d8", +"ar c #a87008", +"as c #d08808", +"at c #f0c808", +"au c #a06008", +"av c #c09004", +"aw c #a86804", +"ax c #f0d008", +"ay c #705004", +"az c #d89810", +"aA c #806404", +"aB c #787878", +"aC c #b08004", +"aD c #c89008", +"aE c #e0e0d8", +"aF c #e0e0e0", +"aG c #f0d808", +"aH c #101010", +"aI c #d89010", +"aJ c #402800", +"aK c #402808", +"aL c #a0a0ac", +"aM c #8c6030", +"aN c #d09800", +"aO c #b88008", +"aP c #e4bc10", +"aQ c #986008", +"aR c #404038", +"aS c #d09808", +"aT c #d89800", +"aU c #080800", +"aV c #905804", +"aW c #202020", +"aX c #d89008", +"aY c #b07800", +"aZ c #080004", +"a0 c #b07004", +"a1 c #c08808", +"a2 c #d0d0d0", +"a3 c #685004", +"a4 c #f0f0e8", +"a5 c #f0e8ec", +"a6 c #b07808", +"a7 c #f8d83c", +"a8 c #080808", +"a9 c #c4a474", +"b. c #d8a000", +"b# c #403824", +"ba c #482804", +"bb c #e0a800", +"bc c #382804", +"bd c #d8a008", +"be c #382004", +"bf c #c0c0c0", +"bg c #f8cc08", +"bh c #d09008", +"bi c #242418", +"bj c #886804", +"bk c #e8b000", +"bl c #e8d008", +"bm c #bc8c3c", +"bn c #c88808", +"bo c #e0a008", +"bp c #e8e8f0", +"bq c #a87808", +"br c #e8b008", +"bs c #c88008", +"bt c #e0a808", +"bu c #201c10", +"bv c #d89808", +"bw c #e0c004", +"bx c #80809c", +"by c #f0b010", +"bz c #a07804", +"bA c #f0e8d8", +"bB c #2c2404", +"bC c #885004", +"bD c #f8d808", +"bE c #b49804", +"bF c #484850", +"bG c #b8b8b8", +"bH c #f0b808", +"bI c #d8d8e8", +"bJ c #f0c008", +"bK c #f8b008", +"bL c #d8a808", +"bM c #282840", +"bN c #544404", +"bO c #b87808", +"bP c #c4b4a4", +"bQ c #d0a404", +"bR c #e8c008", +"bS c #c8c8c8", +"bT c #d8ac34", +"bU c #947404", +"bV c #f8a808", +"bW c #f0b810", +"bX c #f8b810", +"bY c #c0c0e0", +"b0 c #f8c008", +"b1 c #f0f0f0", +"b2 c #0000f8", +/* pixels */ +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZaHbMaWbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZaj.M#w#Za8bZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZbZaj.9.9#Ea#bZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZbZaW#l#ZajaHbZbZ.bb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZbZaHaHbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZbZbZbZbZbZbZbZbZbZa8bZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZaHa8aWaWbZbZbZbZa8bZbZbZbZ.9bZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZaH#v#0aHajbZbZa8bZab#v.1.TbZ.zbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZa8aLbS#y#0ajbZbZbZ#j.TbGbSaq.1bZaHbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZ.zbfb3b3b3bZbZbZbZaqb3b3b3b3bG#jbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZ#YaHa8a#b3.9bZaHbZa4b3bZ#Ya8b3b3bZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZa2bZbZ#jb3.9aW.7bZb3bZbZbZ#Eb3b3bZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbSajbZ#Yan.7.bbZa8bSbZbZbZbZbfb3bZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZb3bZbZbyb0#J#4.ubL#pbZbZbZb3b3bZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZb3bZa6bWb0.##haP.G#oaD.Wb3b3bZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZ.bbn#rb0.xblak.d.d.d#h#haxbL#pbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbc.AbobHbWbJat#h.d.d.G.G#h#h.G#obZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZa6bnbobJbJ.f.f.G.d.G#h#h#hbEaS.LbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZayaDbtb0b0bg.Gam#h#h.G.saS#7bdbTbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZ.p.ab0.#.8.d#h.G.h#xaSbtbt.Q.0bZbZ#0#wbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbibSad.cbzbU.I.4albvbvbv#8a9#1bfbZbZbZ#0#0bZaZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbGbGaQ..bdazbvbv.Q.Q.1bSbfa2bfbSbZbZ#0#0bZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbfbfaLad#QaQaQaQa6bGbSbfb3b3b3a2bZbZbZbZbZbZbZaHb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZb1a2bfbGaLaLbSbGbfbYa2b1b3b3b3b3.7bZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2ajaHbZaLb3b3bGbGbGbGbGbSbSaFb3b3b3b3b3b3b3bZbZbZbZbZbZbZaHb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZa8bZb3b3b3b3bGbGbSbfa2b3b3b3b3b3b3b3b3b3#jbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZb3b3b3b3b3b3aqaqb1b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbfb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3aWbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZb1b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3#0bZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZ#Cb1b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b1b3b1bZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZ.1bfb1b3b3b3b3ananaFb1b3b3b3b3b1b1anaFaqa2aqb3bZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZbZ.1.Ya2aFb3b3b3b3aFb3b3b3b3b3b3b1aqbSbfbfbfbfa2b3bZbZaHbZbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZaB#yanb3b3b3b3b3b3b1b3b3b3b3b3b3b3b3b3b3aFa2bSbSb3bZbZbZ#ZaHbZbZbZbZbZbZb2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbMbZ#yb1b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b1a2bfb3bZbZbZ#la8bZbZbZbZbZb2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZ#lbZbZb1b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3a2aqbZbZbZbZ#RbZbZbZbZbZbZb2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bSb3bZaH#RaHa#bZbZbZbZbZb2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZ#UbZbZb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3aHaW#Ua#bMbZbZbZbZbZb2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2bZbZbZbZb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3#Eajaja8bZ#lbZbZbZbZbZb2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2bZbZ#RbZbZb3b3b3b3b3b3b3b3b3b3b1b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZ#UbZbZbZbZbZb2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2bZaZbZbZb1b3b3b3b3b3b3b3b3b3b1b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2bZa8bZbZb3b3b3b3b3b3b3b3b3b3anb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZbZbZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2bZbZ#RbZbZb3b3b3b3b3b3b3b3b3b3aFb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZaWbZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2bZbZ#UbZ#Eb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZ#lbZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2bZbZbZ#0bZbfb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZ#3bZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2bZbZbZbZ.PbZbfb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZaWbZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2bZbZbZa##UbZbfb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZaHbZbZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2bZbZbZbZaHbZbSb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZ#RbZbZbZbZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2bZbZbXbZbZ.zbSb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZa#bZbZbZa8#Z#ZbZbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2bXb0bXb0bZ.Tb3b3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3aWbZbZbZbZbZbZbZ.MbZbZb2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2azb0.#b0.#bJbZ#lb3b3b3b3b3b3b3b3b3aqb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3#h.G#o.JbZbZbZbZbZbZbZa#bZb2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2.maz.x#o.#b0.x.LbZa#b3b3b3b3b3b3b3b3aFb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3azb0#h#h.HbZbZbZbZbZbZajaH.G#h#ob2b2b2b2b2", +"b2b2b2b2b2b2b2b2asbobybXb0bXbXb0btbZaHbfb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bm.#bXat.JbZbZbZbZbZbZbZ.B#h#h.Gb2b2b2b2b2", +"b2b2b2b2b2b2a6bnaz.L.#.#bobXb0b0b0bZbZbZa2b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3aFbmbobJazarbZbZbZbZbZbZbU.LbJb0bVb2b2b2b2b2", +"b2b2b2b2.Aa6#8bd#rbWbX#o.#.#.#bob0aPbZbZbZaFb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3aqbSbmbobHbvaOarbebZbZbBaraibrbHb0bXb2b2b2b2b2", +"b2au#rby#r.L.L.LbWb0bob0.#bX.xb0b0bRa8bZbZbZ#Rb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3a2bfa9bo#Jbobh#MbOa6a6aCaD#ObWbXbX.#b2b2b2b2b2", +"b2azaPbybWbWbXbXbWb0b0bX#z.x.#bX.xbJbtbZbZbZbZbZb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3a2bSbmbdbrbtb.aSbhaDaDaSbtb0bobob0.#.xb2b2b2b2", +"b2btb0b0b0bo.x.##z#z.#.#.#.#.xb0.xbWax.wbZbZbZbZ#Eb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3anbS.Ha1#Tbb#SbtbdbdbobtbH.xbX.x.#bobX.xb2b2b2", +"b2bTbWbob0.#bo.#b0#zbXbo#zbobobo.xbXb0#JbZbZbZbZbZb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bSaM.Bbd#T#Jbr.LbrbrbWbHb0b0b0b0bXb0b0b0b2b2", +"b2#9.Lb0bo.#bobobo.#bobo.#.xbobob0b0b0.##rbZbZbZ.Mb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bSada1b.bHbHbXbHbHb0bJb0b0.#bob0b0bX.#b0#ob2", +"b2.m#rb0b0bobX.x#z.#.x.#.xbo.xbo.#bXb0bJ.uaza#anb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3a8bZ#QaibobHb0b0.#bo.x.xb0.xb0b0bo.x.x.#.xbobX", +"b2#8.obX.#bXbo.#bX#o.#.x.xb0b0.#.#bobobWbR#Oaub3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZaeaibtbWb0.#b0.#b0b0.##obXbXbXbX#zbob0#o.x", +"b2aIbobXbob0b0.xb0#obo.xbo.xbob0b0bXb0bW#J#daDb3b3b3b3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZadaSbtbWb0.x#z.xbX#z.#.x#z.x.#.xbX#o.xbXaI", +"b2aIbtb0bobo.x.r.#b0b0.#.#.#bob0.#b0.#b0#JaPaS#Gb3b3b3b3b3b3b3b3b3b3b3b3b3bZbZbZbZbZ#p#tbhbtbH.#.#b0bXbXbob0b0bXb0bX#zbXbXbXazb2", +"b2azbtbWbX.#bXb0#o.xb0b0bo.#bXbXb0.xb0bJbH#O#9#m.3b1b3b3b3b3b3b3b3b3#jbZbZbZbZbZbZbZ.v#maSbtbW.#b0b0bXb0bo.x.xbX.#b0bX.#boazb2b2", +"azbvazbtbrbr.LbWbXbXb0b0b0.#.#.xbXbobobXb0.L#9aOaJbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZ.FagaSbtb0.#bX.#bX.#.#bobob0bX.razazb2b2b2b2", +"b2bh.mbhaz#9bdbtbt#Tbr#JbXb0bXbo.##z.#bXbXbtaDar#6bZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZ.cawaDb.#JbXb0.xb0bXbXbWby#raI.Ab2b2b2b2b2b2", +"b2adaQ.AbOa1bnaDbhbhaSbdbobtbW.#.##zbXby#TaSbOao#GbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZ.F#H#MaNbtbrbWbWbr#Tbtbd.m.Qb2b2b2b2b2b2b2b2", +"b2b2b2b2b2#Qaoa6a6a6bOaOa1bnaSbtbt#ObtbdaDaOao.V.nbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbebCa6#MaDbvbdbdbdaSala6#Qb2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2#Gad#Paoaoa6aOa1aDa1aOa6ao.p.ObBbZb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2.3#xaoa0aOa1aD#5ala6#maKb2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2#uaV#Paoar#maoad.Z.OaKb2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2.n.V#2ara6aYa6aoae#fb2b2b2b2b2b2b2b2b2b2b2", +"b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2.3#u#G#V.6#x#F.3b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2.3.F.O.Zadae.V#FaKb2b2b2b2b2b2b2b2b2b2b2b2" +}; diff --git a/pixmaps/l-xlock.xpm b/pixmaps/l-xlock.xpm new file mode 100644 index 00000000..8585a5b8 --- /dev/null +++ b/pixmaps/l-xlock.xpm @@ -0,0 +1,59 @@ +/* XPM */ +static char *image_name[] = { +/* width height num_colors chars_per_pixel */ +" 100 48 4 1", +/* colors */ +". c #000000", +"* c #ffffff", +"# c #f81440", +"a c #4682b4", +/* pixels */ +"....................................................................................................", +"....................................................................................................", +"..###################..................................#####........................................", +"...###################................................#####.........................................", +"....###################..............................#####..........................................", +".....###################............................#####...........................................", +"......###################..........................#####............................................", +".......###################........................#####.............................................", +"........###################......................#####........................aaaaaaaaaa............", +".........###################....................#####.......................aaaaaaaaaaaaaa..........", +"..........###################..................#####......................aaaaaaaaaaaaaaaaaa........", +"...........###################................#####.......................aaaaaaaaaaaaaaaaaa........", +"............###################..............#####.......................aaaaaaaaaaaaaaaaaaaa.......", +".............###################............#####........................aaaaaaaaaaaaaaaaaaaa.......", +"..............###################..........#####........................aaaaaaaaa....aaaaaaaaa......", +"...............###################........#####.........................aaaaaaaa......aaaaaaaa......", +"................###################......#####..........................aaaaaaa........aaaaaaa......", +".................###################....#####...........................aaaaaa..........aaaaaa......", +"..................##################...#####............................aaaaaa..........aaaaaa......", +"...................################...#####.............................aaaaaa..........aaaaaa......", +"....................##############...#####..............................aaaaaa..........aaaaaa......", +".....................############...#####...............................aaaaaa..........aaaaaa......", +"......................##########...######...............................aaaaaa..........aaaaaa......", +".......................########...########..............................................aaaaaa......", +"........................######...##########.........................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +"........................#####...############........................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +".......................#####...##############.......................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +"......................#####...################......................aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +".....................#####...##################.....................aaaaaaaaaa..aaaaaa..aaaaaaaaaa..", +"....................#####....###################....................aaaaaaaaaa..aaaaaa..aaaaaaaaaa..", +"...................#####......###################...................aaaa..aaaa..........aaaa..aaaa..", +"..................#####........###################..................aaaa..aaaa..........aaaa..aaaa..", +".................#####..........###################.................aaaa..aaaa..aaaaaa..aaaa..aaaa..", +"................#####............###################................aaaa..aaaa..aaaaaa..aaaa..aaaa..", +"...............#####..............###################...............aaaa..aaaa..........aaaa..aaaa..", +"..............#####................###################..............aaaa..aaaa..........aaaa..aaaa..", +".............#####..................###################.............aaaa..aaaa..aaaaaa..aaaa..aaaa..", +"............#####....................###################............aaaa..aaaa..aaaaaa..aaaa..aaaa..", +"...........#####......................###################...........aaaa..aaaa..........aaaa..aaaa..", +"..........#####........................###################..........aaaa..aaaa..........aaaa..aaaa..", +".........#####..........................###################.........aaaa..aaaa..aaaaaa..aaaa..aaaa..", +"........#####............................###################........aaaa..aaaa..aaaaaa..aaaa..aaaa..", +".......#####..............................###################.......aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +"......#####................................###################......aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +".....#####..................................###################.....aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +"....#####....................................###################....aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..", +"....................................................................................................", +"...................................................................................................." +}; diff --git a/pixmaps/lament.xpm b/pixmaps/lament.xpm new file mode 100644 index 00000000..96c4dbdf --- /dev/null +++ b/pixmaps/lament.xpm @@ -0,0 +1,791 @@ +/* XPM */ +static char *lament_faces[] = { +/* width height num_colors chars_per_pixel */ +" 128 768 16 1", +/* colors */ +". c #c7c913", +"# c #241d15", +"a c #5e5a1b", +"b c #6a6a19", +"c c #e7d60b", +"d c #fceb05", +"e c #d8c610", +"f c #3e3a1b", +"g c #2c2b16", +"h c #88891a", +"i c #99971a", +"j c #a8a918", +"k c #7c781b", +"l c #050506", +"m c #b9b817", +"n c #4d4c1a", +/* pixels */ +"lf........eeee.e.e.e..eee.eeee.ee..allfkkkbabaabnknabbbbbhhhhallajiiijiiiihmiiijiihjiiiillimmjjjijijjjjjjiiijjmmmmmjmm....ee.lll", +"#lacdddccdicmjdbdedcdccjcjdjcjccmddcllgdddejd.ceceeddded.d.ddelliddddec.cmcjchchciejeddjlfdddicbeedi.h.ecjhejc..kchcbehedddeflll", +"cnlbdddddddddddddddddddcdddedcdc.dddflleddcmd.dedc.dddidmdmddmlliddddcdcdmdjd.cje.ejeddnlidddec.ccdmcje.ceichcmdidhcieieddc#llia", +"cdhlhdic.#####edekk#ggg##ggggggggkdccjiecdhgggggggggggfgggfcdcmmcdcngggggggfgfgfggfh.mdjic.cgggfffggggfgffgfnncdddbnnadijd#lljda", +"edde.ki..bllll.dmljglllllllllllll#ecdkaaemjllllllllllll#iglee.nfmmelllllllllllllllljmmbnicekllllllllllllllllfmeijilllkb..kighcda", +"edddblncbdklllkd.lgclllllllllllfbcde.hllkjdgllllllllllllkdjdjmllhdc#llllllllllllll#d.cll.lmfllllllllllllllliddllh#llidicglbdddda", +"edd.dblgckcilllcdhmj.#lllllll.c.ajddcell#dhjllllk.i#lllg.j.cejllibeelllllllllllllladcilfdedmmjnllllllllllfedde..hllhdac#ll.cacda", +".iemcealgc.mbllidddg#jllllllgcddcmjjccfllme.llfmefl#lllnededkmlli.cd#lllllllllllll.nc#lijmi.cajki#llllllk.kf#lljllkmjeallkjjckjn", +"edjf.kdblgcdhhlbdd.ll.mlllamcecdmdmhde.llgmhnn.dffmcnll#cdbcdjllibeeillllllllllllfdcilleddbaah.dhmllllliellllllhlicecgllimcc#cdn", +".hmlfdcdhlgekch#edc#f..jllecdj#iadddd.dgll.mehlhecn#bgll#cmddillih.ndcjlllllllllliadflhbhddcbmdkbdchlg.ddcccjfhbhdhc#llmebeg#hmn", +"e.jllgcmdal#ebcbnddmckihflkddd.eaeddde.bllkmdb#.cenmhllllkhdeilli..gddd.lllllllllcjcllc.ddddddd#ljdcacddccemedd.ckegllh.hc#ll.cn", +".jilllfdcdblg.cckjdddailjnd.iedddddddddell#dddc#hddif#ll#aedijllhaml.dddflllllllbmbal#.nddddddellbacdd.nlkfllmd.edgllhjec#ll#iif", +"jkillllgc.jhl#cmcddddbfhjdjdh.ddddddihicbllhdc.limddddccdhacmhlliijlljddjlllllllccelli.cc.dddddckmheb#llljll#edhe#llm.e.#llllecn", +"e.ebglll#mmeal#ehcdddilj.emijc..ddd.m#dj.llgdmchfaiabheddckcjhlliicii.mcd.lllllgmbjlgcnda.aaddddddjllllljblgmekegllicae#llll#imn", +"mbdddeb#lfcadblgce.ddmlleklllgddddcl.#m.dlllei.ilcccmjhkhmdddkllijcdd#liddallllicdflhdddecg#cddddmlllllhefmdeedgllieac#l#lbagccn", +"..ieddmccmmdacbl#eccddklgdmhbmddd..lja#mhjllf.c.g#.fhlll#jbcdblliidddjlgddhlllgegmll.ndmfmd.dddenllllljdiaecie#ll.jm.gbcccdddicn", +"mjhkdclk.bmdd.cnl#ejcddnlhikmdi.dikbfebc.c#llejciidajllbjflcckllj.dhdd.ned.allb.enlndce#l#chacjlllllajcclbcaegllh.mcajddddccde.n", +".jhl.dlcjllgcccdal#eiedcl#cllkigdcfdjmfi.cnllidd##ddflmbll#cdblljneebdagjddnllml.llckc#lllgmmglllfhc.lnd.j.c#lljdidddddddclgddcf", +".ehlndadilllmddcdklgce.dflgmbnccd.kejbll.f.llgcbc.enlljlaeedjklljmd.mdhllmdblnmmal#c.cllllllllb.cdddjlkdemm#ll.ikdddddj#ncfijhmf", +".ihlliddelllccdddcaf...millfecmddflfek##mmdflliej#llllj#dcaedblljhcm#cellnd.l.nillkhj.nillll#mi#jdddcmdcf.#llijecdddcdnlgi.nlecf", +".eklll.dd#lgdbdncbdc##ejdallf.lbdgll.jed.damllgc.nllllmkdddddblljedd.ddillcegdcjl#cddcdfll##dflladdddchic#llmceddmagl.mecallljig", +"ibhlll#.dblkdheagca.kl#ejchl#knljglgdglgid.ell#dijlllledd..cenlljkcel.cfmi.cdnj#lkeibnmb.iecm#l#..dddmee.#l.ehdmfllnmmaglllllccn", +"m.hllllfde#bdddmnc.mmal#.c..i#bl.inidill#dmjbllhjellllkb.jaecalljcjkmcdl#ecf.mjllmcd.eddeddjhekmaaddekm#b.mhi.nl#hedi#lllllllm.n", +"mkklllllndhkdjmdceh.jdbll.d.j#k#c#bddcbllcccclllckblllllllneimkamhceaadklgdeajnl#eacdhj.ldmelmblgddhgelll.hcjll#cddblllllllllceg", +"..bllllllkccdmli.llfdacbl#mme.nndmheddamikacdflljeell#nbjmeddknbcdddccddhbcdhell.ec#meeeeilkme.mjdhmmllle.iilliekmkkllllllllljjn", +".iblllllllbcdc##mg#mddkdall.idmjngned.n#.ilckillbemmmedmdkcddalleddmdcdmdedcbbl#dijfehlmmllfknclhekill#mjkml#hhachbelllllllllcef", +"edklllllllgeddhlmddddddi.kll..malllkmlc#gdlhddnhccdcn..dcjafnlll#gnhjcdhegdddehjicgf#lbblll#mkcmenjlllebejllmkamflhjj.llllllljhf", +".iklllllfjhcicd#ndddddddemkllm.bbllkil#iknlfcmeflndcin#nblllllllllllll#gajcdm#adbhllllllllllbjdhjjlllc.mj#n.ngjgllje.cfllllllccg", +"e.hllllgeakllidagdddddcdcbdallmhckii.bif.ll#ddelllb#lllg.lllllllllllllllll#bglnddillllllllllncmcillg.cje.mj.li#nhkigadkllllllmig", +".jillllfcblliddc#mdddjlmneacbll.#eiecddhagaddddglllllll#dllllllllllllllllllllladdecfllllllll.cihlllcjbmllllibd.a#bllgdallllllddg", +".hilllllhjllcdddhg.#fhlljgcmihlljj.igkddccckdkgllllllllleglllllllllllllllllllll#h.ch.gllll#miaill#ci.dkbillhcd#fa#llkd.cilllljkf", +".milllnjhmklcddd.l.gljbn..ccj.blljccaa.dccdj#llllllllllljn#gfnaanfg##llllllllllllfj.mdbllljjchllgeie.c#l.mfedcge.nkhejfej#llle.#", +".ailllefjf.edddjm#g.lnddjggjmfcblljedhjdmccgllllllllll#bcddddddddddddehglllllllllllmdmemle.nbllledh.lfl#bfddde.ddb#jfllkjnll#hbg", +"eehlllmjlkdddddddilnmehkbf.jjeichlle.ddchlg.lllllllnjcdddddddddddda#gajdejglllllll#efjcichmjll#ccjkahllfgnh##mddmhbjlllgcgll#ceg", +"eddifl.cgndddbkaihlla.gijmalll..ma#eedcalllaklll#a.dddddddddddddddfllllcdddmalllllm#lljcdd.mlgeh.hjlmllilkflledddden##lacl#bedd#", +"kddfcddjdddddkllillll#eelllllll.d.c#lh#lllllcglncdddddddddddddddddglll#dddddddalliallllbdklajckdaajfal#mlilladddddcj.ececjdihdd#", +"lgcjc#e.ddddcckmgllllhmc#lllllll.jdillllllllf.mdddddddddddddddddddejm.cdddddddd.jhllllllgllfde.abacm.ccc.hllmccddd.lllhdc.kc.kgl", +"##mnb.cadjddffhklllllijbmgllllllfdddglllllllbdddddddddddddddddddddfff#mddddddddddhllllllllgcci.gjncn#dddddjjk#bddddakm.jac..alll", +"ee.nllfmdaefchgclllfl#djedkllllleddflllllllmddddddddddddddddddddddbgghddddddddddddelllllllbdd.#eccmlimdcjn.kmklkddddebfdmglbalgg", +".ddcalllgbmmchcdeb#i.bm#ccehlllihckllllll#edddddddddddddddddddddddkkh.dddddddddddddefllllllbdh.diflhalj#lg.ige#kdjb...b#lllbe.dh", +".ddjcebglllnmechccc.hhegc.lnllbcehllllllgcdddddddddddddddddddddddc#l#.ddddddddddddddegllllll.hddflfklbblljmbk.ceimi.allll#bmkddb", +".mdjcfcd.glll#ad..hee#adddjlllcbdllllll#cddddddddddddddddddddddddddddddddddddddddddddd#llllllcadc.dnnd.fmkndcclcch#llllb.dhmhddb", +".eeficdiceekllllnj.cmceddmhglmcckmfllll.ddddddddddddddddddddddddd.##bdddddddddddddddddcglllllicem##kn#gmdcjcacjn#lllgk.bei.iahjb", +"...ll#hecebcehglllgi.chcccglfccilgmall.ddddddddddddddddddddddddddeabcdddddddddddddddddd.#llgmjinjblllfh...iejfllllgiemaj.hgllhjb", +"ejmlllllgmccg.e.allllneccjdeeeellllijhdddddddddddddddddddddddddddcabdddddddddddddddddddd.lkc#llciilac.j#dealllllncjhge.#llllleea", +".emlllllll#amcamkciflllgkmdmddnllllljddddddddddddddddddddddddddddhlkddddddddddddddddddddd.kllllnjmc.dhehgllllgj.chee.bhlllllljjn", +".kmllllllllllfje.ke.jflllleecelllllleddddddddddddddddddddddddddddemdddddddddddddddddddddddglllllmdd.eb#llllnjcei.dmcflgjlllllecn", +".djlllllllllllllgmdamdcil#d#lllllllkdddddddddddddddddddddddddddddbgdddddddddddddddddddddddjlllllndjjlllllidkjmddkclg.ecdilll#hkn", +".hjlllllllllllllll#hdhcnemelllllll#ddddddddddddddddddddddddddddddnkddddddddddddddddddddddddalllllnlajla.chcjmakblfhfmkgicllllccn", +".djllllllllllllllllfdem.jnd.glllllkddddddddddddddddddddddddddddddf.ddddddddddddddddddddddddclllllllndejch.icnljfb#jdd.llhbllljif", +".djllllllllllllf#l.ddc#idddc#llll#cddddddddddddddddddddddddddddddjddddddddddddddddddddddddddflllllmde.ecallgc.jejeddfeallllllcdf", +"mcjllllllllllg.dcedecdceccdjlllllhddddddddddddddddddddddddddddddddddddddddddddddddddddddddddjlllllmddkflllllg.dbibjd#billllllmhf", +"mdjlllllllll#.dddea#cmkle.iallllledddddddddddddddddddddddddddddddddddddddddddddddddddddddddddgllllg.h#ll#lllllkmbdbcb#hllllllmjf", +".jjllllllll#eddkmllgillledd#lllllddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddklllllifbllhenllllllchcmlllllll#i.f", +"mcillllllkcdddmbkllmb#gjdmclllllhecddddddddddddddddddddddddddddddddddddddddddddddddddddddddddmllllljmjlladdihj#l#dce#llllllllhmg", +"ejjlllll#cddde#hcmeddccdc.hlllllenkijcdddddddddddddddddddddddddddddddddddddddddddddddddddddddclllllhbellm.deg#mllce.lllkgblg#c.n", +".dmlllllcddecggcddhcccmdddnllll#dgfmllkdddddddddddddddddddddddddddddddddddddddddddddddddddddddnlniccc.nlgmed.lkhlji.llmccbmjljnh", +".cmlllfic.klc.dm.hf.#h#dem#llllfd#lc#llm#nedddddddddddddddddddddddddddddddddddddddddddddddddddcjkf#ge.alljbmdbljbhi.#mdddem#leef", +".ee##kdd###hddmieemdec.dcclllllbd#legll.llhhkeddddddddddddddddddddddddddddddddddddddddddddddddelllllchkl#nmn.mlbdnhiecmcie#l#bhf", +"eddedededcdcdcdcddccdddddelllllkelljfllmllkhlhbkddddddddddddddddddddddddddddddddddddddddddddddclllllmkj#gfmjbegfdnihiigmgcfgadcg", +"eddhcbdjdhekckdbeh.hcj.idelllllhde.c.ikeafii#haljiicddddddddddddddddddddddddddddddddddddddddddclllllhddkchckckchmb.ichckekchiddf", +"gamjkhhihhhhihijijijiijdjhllllljddddddddddddcdc.c.k.ddddddddddddddddddddddddddddddddddddddddddclllllhcdhci.jcjcj.jejcickebcbjcdf", +"llfnllllllllllllllllll#clllllllmdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddllllll#bj###########g###ggg#bdgn#", +"ll#allllllllllllllllll#clllllll.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddlllllllnhlllllllllllllllllllgelll", +"fnkiffgg#g########ggg#ndgglllllmddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddclllll#nkmggg#g##############a.##l", +"eddddecedddddddddddddddddclllllmddddddddddddddddddddddddddddddddddddddddddcimeedcddddddddddddddllllljdejdcdcdd.dcd.ddddddddc.ddg", +".ddddiejdd.mjjcdjdjc.ddddelllllhdddddddddddddddddddddddddddddddddddddddddddmb#le#feghefejhecmedlllllidefekcimjamacbcackeijjkfdcl", +".dcacdeccj.jcmdbhebkbkkmjmlllllbdddddddddddddddddddddddddddddddddddddddddddddcjelgmlbiljllhnlncllllliiddhddcccdddeijdde....m.ccl", +"mdcfdddcd#aijacg#ciba#l#eelllllkddddddddddddddddddddddddddddddddddddddddddddddddceelbhlmll.llkelllllecdcem.imjdhbfljhllllllllbjl", +".ddicddcflg.jk#hl.dddhllcdnfbijmdddddddddddddddddddddddddddddddddddddddddddddddddddm.ilmll.llj.llllleadfmmedddklngiclllllllll..l", +".ddch..flllc.iljffdddblleddehfl#ddddddddddddddddddddddddddddddddddddddddddddddddddddddicnl.ll.hllllgdmdccddmfj#ljjdjllllllll#bil", +"ehc#nlnllllcc.lgeggcdnll.emlllllcdddddddddddddddddddddddddddddddddddddddddddddddddddddddd.c#lcfllllfj.dh#a.llm#kdddnlllllllllccl", +"ed.llllllll.dellgkh.dalljmclllllhddddddddddddddddddddddddddddddddddddddddddddddddddddddddddc..lllllkecbllbflncacmhallllllllllhjl", +"ecellllllj#mdelbglllbjllb.d#llllgddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddillllljbc#lk.lidddelllllllllllllccl", +".d.llll#fkcc.jcmdmlllllll.hallllledddddddddddddddddddddddddddddddddddddddddddddddddddddddddddnlllllemdkcdceddddalllllllllllllh.l", +"ed.llla#cgjd.akeddjlllllkcdmllllliddddddddddddddddddddddddddcdddddddddddddddddddddddddddddddd#llllkcjddddddcjd.#lllllllllllll..l", +"ec.lllmhkebdemc.nacnl#kck.de#llllfddddddddddddddddddddddddddkcddddddddddddddddddddddddddddddhlllll.ddddcdde#lgllllllllllllll#mel", +"edcllladn.dkfgfinlae.dmcceilllllllidddddddddddddddddddddddddnddddddddddddddddddddddddddddddcllllllg.cdnedmlllllllllllllllllllccl", +"edelll#edchlbkljla.ddd.bgg.lglllllgddddddddddddddddddddddddmnddddddddddddddddddddddddddddddilllllllbih.cic.hfllllllllllllllllkjl", +"edmllllkjlhb#eeceddc.alll#djcalllll.dddddddddddddddddddddddakdddddddddddddddddddddddddddddc#lllllk#j#llaeem.dmglllllllllllllli.l", +".c.llllgelhdddddcdklllllne.cdcllllllcddddddddddddddddddddddjhdddddddddddddddddddddddddddddklllllbdde#llll#kcc.ccilllllllllll#jel", +".d.lllllgmcdidd.b#lllfhecjeeddfllln.mdddddddddddddddddddddmlhddddddddddddddddddddddddddddcilllll.ddj.mnllll#ajc.chjnllllllll#jel", +"eemllllgmcbd..nllllgjc.cd.b#enjllk.flmddddddddddddddddddddmicddddddddddddddddddddddddddddnh.#llbdd.iijcea#llllamch.j.a#lllllleel", +"edellaed.jcklllllacdbeddcgllndejcalll#ddddddddddddddddddddbljdddddddddddddddddddddddddddjllgdklcaellkccf..m#lllllb.c.hd.flll#k.l", +"eddh..ce.b#lllgh.jim.dj#nehm.dkcnlllllfcdddddddddddddddddilljddddddddddddddddddddddddddjllllg.cjenl#l#.de.jcmalllllnmcjc..kg#..l", +"edd.ei.fllllfjchcmca#illjfgmcddkjllllllkdddddddddddddddddbnhcdddddddddddddddddddddddddc#llllladkilln.#kdddccmdck#llll#kckdjc.jjl", +"edddkllll#icc.edj#h#c#lnafmlnddddalllllladdddddddddddddddhfl.ddddddddddddddddddddddddcllllllleac#lllhdddmaddde.ec.nlllllnmdmgdcl", +"m.he#llnic..ecb.g#jiekickilncd.cdmfllllllkddddddddddddddillledddddddddddddddddddddddegllllll.j.fll###d.kmnenmddeea.mb#llllgjcdcl", +"llle#a.cicmdd.fnlgdieddddkleddgncje#llllllacddddddddddddhkhhddddddddddddddddddddddd.gllllllbdkmlllnccdhl.cnllbdkcjegcch#lllfca.#", +"llgddkc.dddddcmllcflcmddddcdibblbddclllllllleddddddddddca#lgcdddddddddddddddddddddillllllladcelllll#jdejjnlllli..#cccidceklf.lll", +"fidkc.jaadddddd#kjlfhi#ambddeflamhc#llllllllgedddddddddjl###ddddddddddddddddddddeallllllll#id.illllllbife#llllndblmddddh.m.jclll", +"eddddenheddddddfe.lhljllhl.jagae..ib#mllllllcgfcdddddddcm...dddddddddddddddddddeallllllllllfckcallllllaccblll#c.hbiddddeehk.cjfl", +"edeaek#leneddddddddhljl#albajaeee#ledddglllahlllaedddd.llllbdddddddddddddddddjglcflllllkc#bmljm.hllllll.jlllfcallcddcdcjmjecbddn", +"edmb.iajif.ddddddm.llj#kfl#b.db.llgcdde.alg.llllllnmddmglllkddddddddddddddciflll#.gllliddcjlllicjhlgihebhhllgcllledddakehllnjddn", +"ed.bdmdjkemaddddcljlljgelllc.ne#l#e.dhmcck.nllllllllgjcc.kn.dddddddddddceklllllllkcl#mcdd..glll.iciellilfeflleaibcdddkl.llllleea", +"ehmlllmhlmllcddd.lgehhiblliimelllecdfllm.ddfllllllllllllfkmeedddddeemj#llllllllllliecckk#.kd#lllijedjmccnlmllgdddddd.#hhilll#men", +"ecjlllmij.hhcedd.ll#kmcglkjjjll#ejmnllllbc..jflllllllllllll#l#####lllhllllllllllla.ejdd.bnebeflllj.cdcffbl#illedddenmhahklll#ejn", +"ejmlllhjdi#cf#dddjllliciim#mll#.bcnllllll#.ic.i#llllllllllllllllllllljlllllllll#m.eheedjbbneee#lllemjeblmgleglgcddblhj.nlllll.kn", +"edjll#j.djjllgcajdi.emhdki.lll.hdnlllllllllgecdd#lllllllllllllllllllliflllllllmcdaehaadenllfckc#lllmcmegbeidmlladc#llmgllllll..n", +"ehklllanchmln.nlbdkgnn.cjjll#.ejbbllllllflllleckliehfllllllllllllllllbklllfallkddi#fjlcbfnkjkcaenll#miecdddddbll.cflkk.lllll#hjn", +"c.hllllfcink..llkal#ddmk.lll.h.jbilllllkelllabeejdddd.in#llllllllllllnenj.dc#lieail.ik#hdhnl#.cecglllcbcddddd.llndc.nhjlllll#ddf", +"ejmllll#cdcafiljklllemk.lll.adicfhallljclacnccjlh.ddmea.ic..jhllf.mececfjkddcmfbjinilnkgd.m.kggjjc#lllmkedddddfllcddcnllllll#khn", +"ejjllll#.ejlhehmll#jk.jll#.c.abeahillkjcmdbncmfl.icccecchcn.dcllfddicheiibhkcllgmjienlhdd.h#lllb.kegll#mmidjnf.lljdde#llllll#eef", +"emjllllifjgkmgj#llmc.mlllma.dhjfdbmfahnkadjdjml#.egm.#.dcdmccciijddjknlllllejnllcheeemjddkgmglll.ch.#ll#ej.#llcnlnddd.#lllll#hjf", +"ef.lllbhnccnim#lbechmllleacddblle#fedjklndddealmjemdc#gcljmhjcf#bgj#lllllllia.llajcclllmdklljm#jb.eecllll.heabb.ll.dedd#llll#edf", +"ccilll.amaemnghedjmjll#...dddmnhcbnddmjmjfdid##djdd.cnlei.fc..llfccgaabbbklgcefll.ndiglfd.b#lnchlmbij.#llfcf.cjc.#mcadd.#lllgjif", +"emjllbeeflkdcdddkcmlll.cjdddddh#lcmckllinlc..lndmcdg#egen.heamllnhjgbhmddmllikhllijdaeb#d#beflmg#mljcn.lll.che#ijmem#cddhlllgeef", +"edjliblgdmcddeejeee#lejmbedddegjmglllllgkcik#l.jjfdclledi.mdcellndcfmece.lllg.mllgelej#.clllncikai#aacjc#mageccmil.nl.dddfllfkj#", +"c..mdilhddddddejjlaeehdklfdddehfllllllllgd..lnddalhdhlhcg.ajb.llnamikhcghlllne.klljmd.hjkigllenfbbmllem.eillncjdc#.lljddkcllgjeg", +"c.dddd.dddccdikjlll.cmmkl#d.blll#hhlllllkdhiljjd#lfdcafd.keccellfcdndmflilli.km.llfc.ai.lg.imddddddalidea.lllgdbdebllide#dblfmef", +"ccdddddddf#cncjll#cmmbjfij#lllg.cbnc#lll.ec#l..hl#cdde.d.kccfmllfbi.#lkmg#ccll.c#lldccfaindddddddddelledcam#llgci.nllhdb#cdggimg", +"ccdddeanfgmimill#eddjae.klll#hcdmglijfiediilnem#llmddalnciid.ellg.e#niblliecihmkmllhhmgfmgcdddddngacilkdd...gllne.eilic##cdhfccg", +"cccanlllle.billl.bcehfhblllkcddddclncehbedfleeellllmcd#ladcdnmllgjjhmllllghe#gcdcgllcem#dbeddddmillfclnd.hea.lllfcgc.chl#dd.fbig", +"ecillll#cajkll#eemm#lhalnjcdccdddcgbgllmddlgdmklllll#.mll.ddccllfcce..mm..ha.lbcjklliadkddddddjlg.llgnfddbacne#llfe.dejiidddcddg", +"eeilllg.bchllg.j.ceihcmcdddcjbddddddb#he.ilk.clllllllideb.dda.llgjkjbj..ihkihljcej#lncmdddddddcnlnnllmkdddkhj..fllfmcmafbicddjjf", +"cmjlllec.kll#efedgbcdddcdddklke.edcddcd.j#lekhlllllllkddjamdeellgcebakkcc.kjcjfac.kll.gcdddddhjc.bcglidiedclheee#llfcbd#llfmd.eg", +"cdjlfcijbll#cbdbhlll#nbmdcmi#labl.ddddcimlbddflllllllleddglcf.llf.ih###lll#ec.l.dkmllndmdcddmlliagicmhklkdd#lbenc#llncncflllahe#", +"c.cf.gckllgemenhfllllnic.giaklfm#ncjcdcmal.delllllllll#kchl..ellfccjkllllljjadmfbeegl#cmdddd.il#illkmeiljddeflhmm.glla.emfllnic#", +"cdccmmbll#e.calm##gheddelllimnecccnlkdhellcdblllllllllllbelenellgcjhcblllaindeiljehjllijbcagljllmglfdnmlcdddjllh.me#llnc.d#lnm.#", +"cccmibll#eedfl#ecdddddillllgkhcjl.j#fdcblidclllllllllllladfeeellfdckddjlllkefkdegncdfllemmlllmlljmbjcgiej#mdd#llbefc#llaehcfnj.#", +"cdddkllf.eeallkgnjcdcalllllllljheccecm.f#demllllllllllll#c.daellgem.cddal#hgkckgllm#jlljjdglljik.mhi.lgd#lgdd#lllicemgllacaejjc#", +"ecd.llgc.mnllldfgaee#llllllllllhgmcicc.lfdealllllllllllllhddcellgddacdclllljklllllfcclladcillb.hhmlllllmllfddnllllijbellla..ma.#", +"edbk.fcicgllladdddallllllllllllllln.mknljm.lllllllllllllllidfellgce.dd.mllllllllllldbjlle#..ahel#llllll#mgcddcllllladnc#lln.bdd#", +"ehllicbenlll#edd.glllllllllllllllll.dclfdcblllllllllllllll#d.ellfddngh.#llllllllllljce#lb..ebhklllllllllbceddd#lllllimcjglb.cdc#", +"lllgelcbllll.ddallllllllllllllllllgdcd.ccdglllllllllllllll#dkdc.c.jfllg#lllllllllll#.md..dnclllllllllllllhancdglllllliefebe#fdcl", +"ll#cdcccccecddeecccccce.cccecec.eecddflcddccccccccccecec.ecddcllfddcccecccccec.cjc.ccdd##jddccccccccecccccdecdceje.cecdcddfllkd#", +"lghdddhcdd.edd.cddddddehdcd.dcd.ccddjlndddc..mddjm.e.cjcmc.ddell#cccccmceccdjdmcicmccddnlgcdd.ddddddddjdcdjdidhefcbckdddddcfllal", +"lbanfffnnnanabhbafnnaanaafbnnnaaaaanglgjhhbbbibbbajbbkbkhkhjjhlllllllllll##g#g##gg#fgfnlllfnnnanabbbbbbabkjbaaanbabnbabbbhknllll", +"llllllllllkim..mjijmhkkhjj.ijmim....himbhaa...ibkbnaabbbaaakfffgfnnang##nbbbanlffl#ggabbnafnbbbabbbkhhimmmhijimbkecc.flgmec.klll", +"llfjcd.hlnddddddddddddddddddddddddddddddilcddddddddddddddddddddddddddddd.dddddjdd.dddddddcddcddddddddddddddddddddecddagcdddddj#l", +"lnddddddcgdddddddddddddddddddddeeddddddnhfcddddddddddddddddddddddddddddddddddddddddddddddbhckddddddddddddjncekddalnddbddddddddml", +"lcdddddddedddjf.dddddhbddddddd...ddddcbcdlcdddddddddddeddddfadddd.kddddd.dddddddddddddddddbhkdd.cddcjahd.gmddcdnfm#cdddddddddddf", +"kddddddddddddjcddddcid.ecdcdddddd.jdddddd#ceedddhedddjgcddkiacdijebdmmddhdjkhiddddddehdddde#add.khajlmddmc.nddigcdg.dddddddddddk", +".dddddddddddddddddddddddde.dddddd#iddddddkdddddd.#nhb#eddbmdecddd.imlcddjcacdcddddjddddddddmaddddemdfcdddengcjl.ddajdddddddddddk", +"mddddddddddddddddddddddd.jdddddmn.ddddddddddddddddcaeddc#.dddddddihmf.ddnhddddddddkbcdcdddm.nddd.gddmdddchcfdkhdddh.ddddddddddd#", +"jddddddddcddddddddddddddedddddmgdecddedddddc.dddddcidddi.ddddddddccdmeddidddddddddcnfnjdddecnddd.edddc.dddcndhcddd.ddmddddddddml", +"gcdddddddbccdddddddddddddddddddddddddhdddddc#cdddd.mdddddddddddddddddddddddddddddddddddddddcfddddddddjaddddjdddddddddfjddddddd#l", +"laddddddhleddddddddkidddddddcmdddddddmddddddddddddj.dddddddddddddddddddddddddddddddddddddddcfdddddddddddddddddddddddd#lacddde#ll", +"gacdddddibcdddc.jb#ln..e.mmialannabhmmddddddddddm.aim....mjmmeedd.mee.e.e.eeeeedddddddddddce.eeeeeeeee..ee.ee....eeedmjjedddc.ml", +"eddddddddd.###lllllllllllllllllllllllbddddddddddflllllllllllllldcllllllllllllll.ddddddddd.lllllllllllllllllllllllllliddddddddddn", +".ddddddddd.lllllllllllllllllllllllllljdddddddddd#llllllllllll#cddcnllllllllllll.dddden#g.bllllllllllllllllllllllllllidddcingfddh", +".ddddd.dddmllllllllllllllllllllllllll.dddddddddd#lllllllllllgeddddcflllllllllllndddddebddhllllllllllllllllllllllllllidddmaabkdcg", +".didddidddmlllllllllllllllllllllllllgdddjddddddelllllllllllleddddddcllllllllllll.ddddcnddmlllllllllllllllllllllllllljdddddddddel", +"hdddddjedd.lllllllllllllllllllllllllgdddecddddd.llllllllllfeddddddddcflllllllllhddcdddk.dellllllllllllllllllllllllll#iddjednadel", +"fcddcdddddmlllllllllllllllllllllllllfddddddddddhlllllllllfcddddddddddcnllllllllf.dedddchddlllllllllllllllllllllllllllhdcghdbfdel", +"jddmjdddddmlllllllllllllllllllllllllkddjmddddddallllllllleddddddddddddcllllllllllcddddddddfllllllllllllllllllllllllllcdaiddjfdcl", +"mddnmdddddilllllllllllllllllllllllllmdddddddddclllllllll.ddddddddddddddcgllllllgeddjidddddblllllllllllllllllllllllllgddjdddeadcl", +"mddnidddddilllllllllllllllllllllllllcdddddddddcllllllllfddddddddddddddddbllllll#ddd.iddmambllllllllllllllllllllllllllcddc.dcmdel", +".dddddd.ddillllllllllllllllllllllllbdddddcmddd.lllllll..ndddddddddddddddflllllllddddjddchddnllllllllllllllllllllllllledde#ddddel", +"mddddddmddilllllllllllllllllllllll#cddddddccddhllllll.ddeeddddddddddbl##l#.#llll.d.n#iddjdd.llllllllllllllllllllllllledfmdddddel", +".ddcddddddilllllllllllllllllllllllbdd.edddceddnlllllbddddddddddddddckcdcmcdj#llladek.cddccdd#llllllllllllllllllllllllmd.ckcdddel", +"eddfadddddilllllllllllllllllllllllmddhdddddddclllllbddddddddddddddddddddddddellll.dfddddddddmlllllllllllllllllllllllllhdddddddel", +".ddc#jddddillllllllllllllllllllllnddc#gkddddbfllll#cddddddddddddddddddddddddde#llhdedddddddddallllllllllllllllllllllllfddddddd.l", +"mdddhacdddilllllllllllllllllllllledddicdddddjllllnghcddddddddddddddddddddddddd.#lfdddiedddddd.lllllllllllllllllllllllleddddcdd.l", +".ddd.lheddilllllllllllllllllllllifcdddddddddd#llkddgnddddddddddddddddddddddddddelljdddddd.ddddmllllllllllllllllllllllkddddmndbll", +"iddddmheddjllllllllllllllllllll.ccdddddde.ddnllkdddcaedddddddddddddddddddddddddd.#gddddedhhddddnlllllllllllllllllllllmdddikdddel", +"#idddddddd.lllllllllllllllllllmddddddddddddmlladddddcnjddddddddddddcakddddddddddd.g.dddaceacdddcglllllllllllllllllllleddd.ddddcl", +"lnddddddddmlllllllllllllllllljdddejedddddddglkddddddddb#iaddddddddelllbdddddddddddcliadcddddddddc#lllllllllllllllllll.dcddddddd#", +"mdddddddddjllllllllllllllllljdddahecddddddk#nbdddddddddbfcddddddddnlaklfeddddddddddekdddddddkadddcglllllllllllllllllljdckmddddd#", +"jcddddddddillllllllllllllllkddh.fedddddddcf.dcdddddddde#edddddddddca.dhg#hcddddddddddddddkjdddddddcflllllllllllllllllkddcn.ecddg", +"l#hdddkkddjllllllllllllll#.ddddifeddcddddiedddddddddddhfddddddddddddddddcimdddddddddddddc#cddddddddhi#llllllllllllll#cdddd#l#cdg", +"geddddcgcdjlllllllllllllaedcddddcdddddddddddddddddddddb.dddddddddddddddddddddddddddddddddcdcakfhddddddj#llllllllllll#cddidcccmdn", +"mddcdddkjdjlllllllllllamdddmhcddddddddddddddddddddddddkdddddddddddddddddddddddddddddddddddddcdeedddddddcb#llllllllllgddddddd.hda", +"eddfeddddd.lllllllllbcddddddddcdddddddddddddddddddddddcdddddddddddddddddddddddddddddddddddddcdddddddddddddjllllllllladddddckfddk", +".ddikddddd.lllllfbnadddddddeahcdeffidddddddddddjidddddddddddddddddddddddd.#iddddddddddddddddcdddddncdddddddc.k#lllllbddddmm.dddf", +"mdddfcddddchbimcdd.cddddjdddcgfdd.cddddddddddchljddddddddddddddddddddddddebcddcddddddddddddddj.dddjiddccdddddddcmjih.ddddddddddg", +"mdddj#dddddddddddddddddddddddccddddddddddddddaliddddddddddddddddddddddddddddddfeddddddddddddde#dddmbdclhdddddddddndddddekkmddddg", +"bdddd.ddddddddddddcdddddagaedddddddddddddddddal.dddddddddddddddecddddddddddekljdddddddddddddddcddddaidcdddddddcecaddddcghm.ddddg", +"ndddcdddddddddddddbcd.ddea.dddddddddddddd.g.dd.ddddddddddddddddk.ddd.k.ce.alljdddddddddddddddddddddcaaedddddckhbfmddddcmdddcmdd#", +"kddbfdddddddddddd.id.lbdddicddddddddddddcln#.ddddddddddddddddddajdddjlllllllkddddddddddddddddddddddddhidihddkdddieddddddcddkndd#", +"kdcmdddddddddiddd.bdegfnddddddjkddddddddhedhlfhcdddddddddddddddnkdddellllllidddddddddc#beddddddddddddkmd..ddcdddfcdddddcdddbcdcl", +"kdcdddddddddcfd.ibbdddilidddca#cddddddckedddmafggfaieddddddddddfbdddellll#jddddddddddmgagnhmdddd.bccckddddmddchdhcdehddcdddaddd#", +"kdfe.bddddddc#flfcdddelbcddnlleddddddcl.dddddddddddddddddddddddfndddclllgeddddddddddc#.ddccddddddclfhcddddamdk#cddml.dddddcidddf", +"kdcjmehedddddja.cdddddcchfll#eddddddhg.ddddddddddddddddddddddddffdddd#n.ddddddddddddnadddddddddddd.#la.cddccddf.dbhcdddddd.fedd#", +"bdcdddciddddddddddddejnllllljddddddb#geddddddddddddddddddddddddgfddddcdddddddddddddabddddddddddddddblll#nk.cdddddbhhmddddddhbdcl", +"bdhjdddhddddddddddhgllllllleddddddddddccddddddcddddddddddddddddlgdddddddddddddddddbli.ddddddddddddnlllllllllniddddddddddddddeddl", +"kddgedmmddeafg##llllllllll.dddddddddddddddddddcgiddddddddddddddl#ddddddddddenddddcjikicddddddddmcdeieeglllllll#gfabjmdddaeddjccl", +"kddkkdi.dd.lllllllllllllljddddddddddddddddddddde#neddddddddddcjl#ecddddddd.ghdddcddddddddddddcklkddddd.llllllllllllllcddifijfdcl", +"kdddddddddmlllllllllllll.dddddddddddccccddddddddellbdddddddeflllllllhddddilnddd.lmddddddddddhl#jddddddddlllllllllllllcddddd.ddd#", +"hddddddddd.lllllllllllljddddddcibfg#llllllgfhcddd.llg.dddmnllllllllll#kdbllmdddkbcdddddddddcmedddddddddd.#llllllllll#cddddddddcl", +"hddddddddd.llllllllllliddddddjfgg###llllllll#cddddm#lljdjllllllllllllllglladdddddddddddddddddddddddddddddjlllllllllllcdddddddk#l", +"hdddddddddmlllllllllljddddddddddddddcjh#llllcddddddc#ll#lllllllllllllllll#ddddddddddddddddddddddddddddddddmllllllllll.ddddddddjl", +"idddej..ddmlllllllllidddddddddddddddddddcjfadddddddd.llllllllllllllllllllliikaahcdddddddddddddddmfeddddddddmllllllllljddddddddd#", +"mdddddcacd.lllllllladdddddddd.mcdddddddddddcdddddddddklllllllllllllllllllll#nj.ccddddddddddddddd#lfdddddddddmllllllllndjcdddddda", +".ddddcc.fd.lllllllkdddddddddanedddddddddddddccddddddclllllllllllllllllllllljdddddddddddddddddddcllleddddddddallllllllkdddddddddb", +".dhedmedmd.lllllll.cdddddddhjdddddddddddddiflledddddhlllllllllllllllllllllladdddddddddddddddddddinacdddddddemdenlllllkdddddddddf", +"mdgmdddm.d.lllllgbaahme.mjaidddddddddddd.g#fnicdddddfllllllllllllllllllllllleddddddddddddddddddddddddddddddddddc#llllk.mmeeecdda", +".dkkddemdd.lllladddddddddceddddddddddddckedddddddddellllllllllllllllllllllllhddddddddddddddddddddddddddddddddddddllllfkh#ln#fddi", +"mdc#dddddd.lllncdddddddddddddddddddddddddddddddddddmllllllllllllllllllllllllfddddddddddddddddddddddddddddddddddddcnlljdd.cdkcddm", +"mddfmdddddellfddddddddddddddddddddddddddddddcee.jik#lllllllllllllllllllllllllaanakj.eccdddddddddddddddddddddddddddcnlmdddddhdddm", +"bddd.dddddclnddddddddddddddddddddddddddddckgllllllllllllllllllllllllllllllllllllllllllliddddd.dddkcdddddddddddddddddfeddddd.dddi", +"bddddddddddbcdddddddddddddddddddddddddddd.ihknf#llllllllllllllllllllllllllllll#naij.ecdddddddhddd#cdddegicdddddddddddddddddddddi", +"bddddddddddddddddddddddddddddddddddddddddddddddddejallllllllllllllllllllllll#cddcdddddddddddcgdddlcdddd.l#adddddddddccdddddddddm", +"kddddddddddddddddddddddddddddddddddddddddddddddddddcllllllllllllllllllllllllgddddddddddddddd.lcdd#adddddjlhddddddddc#cdddddddddj", +"bddejddm.de#eddddddddd.dddddddddddddddddddddddddddddfllllllllllllllllllllllladddddddddddddddi#dddkljdddcghddddddddeglcddddkedddn", +"bddfiddcddelg.dddddddhl.dddddckddddddddddddddddddddeglllllllllllllllllllllll.dddddddebeddddd#fdddckeddeghddddddddcfllcceeejbdddf", +"bd.mddddddelllmddddddjgl.dddhll.ddddddddddddddhddcffj#lllllllllllllllllllllnddddddddhleddddclbdddddddh#mdddddddddllllcelabbhddel", +"adkedddddd.lllljddddddci#gflfimcddddddddddddddaaahedd.lllllllllllllllllllllhdddddddddeddddi#lkcce.ibfjcddddddddefllll.djmdddddcl", +"ndfceabddd.llllljdddddddjllhdddddddddddddddcce#hcdddddnlllllllllllllllllllgcddddddeddddddddcag#gggniddddddddddcfllllljddicdddem#", +"fdblncnddd.llllllhdddddddigdddddddddddddddddklfddddddbllllllllllllllllllllhddddddjlcdddddddddddddddddddddddddc#llllllmdddedddbll", +"nmf.ddfcdd.llllllliddddddcedddddjnfbkjcddddddnjdddddillllllllllllllllllllllbdddddhmdmkddddddddddddddddddddddcflllllllmddddddddeg", +"lnddddm.dd.llllllllhddddddddddddjlllll#mdddd.addddd.llladalllllllllllllgallladdddcdiiddceecddddddddddddddddcnlllllllljdddddddddg", +"adddbddddd.lllllllllndddddddddddd#llllledddclcddddc#lgcdddhllllllllllaedd.lllhddddcddddiallgedddddddddddddd#llllllllljdcne##jddf", +"addmfddddd.llllllllllacddddddddddallllmddddk.ddddcglkdddddddjalllla.cdddddeallhdddddddddddmklhdddddddddddcnllllllllllmdchdecdddg", +"addddddddd.lllllllllllgcdddddddddjlllfdddddedddddbljdddddddddddgll.dddddddddjllmddddddddcjbkjddddddddckccflllllllllllmddmddddddf", +"bdddddddddmlllllllllllllccjdddddddfllmddddddddddaadddddddddddddnlledddddddddddaldddddjje#.ddddddddddddnllllllllllllllmdce.cdddc#", +"addbaci.dddmjjhaglllllll#fedddddddhlndddddddddddjddddddddddddddbllcddddddddddddmhddddd.iahcddddmdddddd.llllllllg#llll.ddd.cdddd#", +"bddfl#aadddddddddmfbgllllfcdddddddeljddddddddddddddddddddddddddhl#dddddddddddddddddddddddjfidddidddddcfllll#nicdclll#cddddddddd#", +"kddaniiiddddddddddcddd.all#cdddddddl.ddddddddddddccddddddddddddmlndddddddddddddddddddddddddm#.ddddddclllla.dddddddmcdddddddddibl", +"bddddddddd.niddddddf#fkecjnacddddddhcdddddddddddnfcddddddddddddelhddddcaedddddddddddddddddddea.ddddcfllbedddddk.dddddddddddddfll", +"hdddddddccmlidddddcnfnnhdddjhddddddddddddddddddde.dddddddddddddd#eddddcf.dcjeddddddddddddddddddddddn#kcdddddddecddc.eddddddedjll", +".dddddddnhcjd.dddddddddddddddmcdddddddddddddddddddddddddddddddddfddddddddddc#jddddddddddddddddddddnjdddddddddddddd.aaddceddgdd#l", +"iddddddddddebbdddddck.ddddddd.cdddddddddddddddddddddddddddddddddkdddddddcdddelf.dddddddddddddddddcmddddddddccdddddddddddhnnljdfl", +"idddiddddd.lkdcdddddflacdddddddddddd.keddddddddddddddmdddebmddddcddddddd.fkfgjeddddddddddddddddddddddccddddd.dddddddddddddcghdfl", +".dddbhddddddddmcddddddcedddeddddddddhllfcddddddddddddhidddmlhdddddddddcddjlmddddddddddddddmdddddddddd#.ddddcgeejdacddddddddfddll", +"fijkn#dddddddddd.fdddddddddjcddddddd.lfhcddcmbh.ddddddgedddhleddddddddmfa#.ddddddddddddddnnddddddddddebbdddded.km.dddddddddddill", +"fiihhidddddddcdddddddddddcigdddddddddjddddddddh#amccddakdddd#hddddddddddkaddddddddddddddclfdddddddddcihhdddddd.ecddde#eddddddall", +"hdddddddddcgn#nhcddddddddcn.ddddddddddddddddddddc.gl#fggddddakdddddddddddddddddddddddddddflmddddddddcfmddddddddeaccegkddddceddc#", +"iddddddddd.llllll#njdddddddbmddddddddddddddddddddddemkakdddd..dddddddddddddddddddddddddddck#hcddddddcjfcdddddeiallllfddddmihdedk", +"idaeddddddjlllllllllg.dddddd.dddddddddddddddcmmcddddddddddddddddddddddddddddddddddddddddddddccdddddddcddddcjflllllllnddcakdddiek", +"jdhcdddddmllllllllllllgmdddddddddde#edddddddaflledddddddddddddddddddddddddddddddddddddddddddddddddddddddcfllllllllllgdcljdeddbmb", +"iddddddddnllllllllllllllb.dddddddddjgdddddddddckidddddddddddddddddddddddddddddddieddddddddddijijddddddch#lllllllllll#ddbndicda.b", +"hdddcidddcnlllllllllllllllidddddddddadddddddddddddddddddddddddddddddddddddddcdddddddddddddddiddcddddd.glllllllllllll#cddg.e.da.b", +"idddn.ddddelllllllllllllllladddfnaf#.dddddddddddddddddddddddddddddddddddddnlleddddddddddddddddddddddalllllllllllllll#cddhbdddnek", +"kdcffddddd.llllllllllllllllln.cm.ijcddddddkidddddddccddd.kdddddebhcdddddcbhmcddddddddddddddddddddd.glllllllllllllllllcddmfdddaca", +"hdal.ddced.lllllllllllllllllllcddddddddddd.l.dddddjaeddelkdddddnllidddddddddddecddddddddeeeddddddelllllllllllllllllllcddcbddekcb", +"hddcdddddd.lllllllllllllllllllgcdddddddddddaliddcnaddddnlhdddddkllmdddddddddddkcddddddchedddddddklllllllllllllllllll#cddd.ddcldf", +"iddddddddd.llllllllllllllllllllbdddddddemddjllkdnfcddddblbddddddmmddddddddddddhmddmddekicdddddcalllllllllllllllllllllcdddddddjd#", +"bdddd.c.ddilllllllllllllllllllllcdddddcbgddclll#l.ddddddk#cddddddddddddddddddd.ndigdd.gl#cdddelllllllllllllllllllllllcdddddddddg", +"g.dd.fdhdd.lllllllllllllllllllllfdddmkaddjednllladdddddddcdddddddddddddddddddddillmddddcgkdddc#lllllllllllllllllllllledddddddddf", +"liddhnh#miallllllllllllllllllllll.ddi#hdck.dcllllkdddddddddddddddddddddddddddddallhddddd.bdddellllllllllllllllllllllledddddciddg", +"gdddhjmecekllllllllllllllllllllllndddjlhddddilllllkdddddddddddddddddddddddddddkllgmdddddmidddhllllllllllllllllllllllleddddcddddf", +"ldddidddddcllllllllllllllllllllllljdkhdfbddddilllllfddddddddddddddddddddddddcgllleddddddcddde#lllllllllllllllllllllllcddddcbcddf", +"lcdd.dddddcllllllllllllllllllllllladcgn..ddddcllllllndddddd.ddddddddddddddddblllgddddddddddc#llllllllllllllllllllllllcdchfdeacdf", +"ldddddddcdclllllllllllllllllllllllgdd.#hddddddnllllllfcdddd#eddddddddddddddblllladddddddddd.llllllllllllllllllllllll#ccgidcddddn", +"gddddddddddllllllllllllllllllllllll.ddddddddddjlllllll#edde#dddddddddddddcfllllljddddddddjhgllllllllllllllllllllllllgddbeddddddn", +"#ddddmcdddcllllllllllllllllllllllllfddcia.dddd.llllllll#ccnmddddddddddddcallllllcddddddddcnlllllllllllllllllllllllllfdddidddddda", +"gdddddddddclllllllllllllllllllllllllcdelmddeddclllllllllgffdddddddddddddalllllllddddddddddmlllllllllllllllllllllllllnddddddddddb", +"lcdddeihddcllllllllllllllllllllllllleddfdddddddglllllllllfcdddddddddeddnlllllllgddddddddddalllllllllllllllllllllllllnddddddcddda", +"ledkkhceddclllllllllllllllllllllllll.ddgcedddddhlllllllllladddddddddifbllllllllgddddcdddddflllllllllllllllllllllllllnddddddacddn", +"#mdcddddddcllllllllllllllllllllllllljddfjgc.dddhllllllllllladdddddddd#lllllllllfcecnfedddd#lllllllllllllllllllllllllnddddddimddf", +"nddejddddddlllllllllllllllllllllllllhddk#hdfdddhllllllllllllnddddddc#llllllllllk.jdddddddcllllllllllllllllllllllllllfdddddddddda", +"ndddddddddcllllllllllllllllllllllllladdddddcdddjllllllllllllladdddcalllllllllll.mhdddddddmlllllllllllllllllllllllllladdddddddddb", +"ndddddddddclllll######llllllllllllllbddddddddddcllllllllllllllbdddallllllllllllc.bdddddddilllllllllllllllllllllllllliddddddddddg", +"gji.dddddecdcccddddddddddaf.cdccdceecdddddddddcdcecc.fembhjllkheddhkan#l#g#g##gd.addddddde#ll#glgggfbbbkhkiikkhkkhijcddddddddddf", +"ll#jdddddafdddddddddddcddcdddddddddddddddddddd.ddddddddddddimdddddddddifcdddddddddddddddddccdddddddddddddddddddddddddmiddddd.g#l", +"lledddddddidddcdddddddddddddenjmddddddddddddddmdddddddddddddddddddddddddddicddddddddddddddddddddddddddcddcdddddddddddacddddddhll", +"lhdddddddddddddddddddddddddmhcdcfdddddddddddddddddddddddajddddagdddddamddd#cdddddjjdddddcdddddddddd.bngddddjbnfkjddddcddddddddal", +"l.dddddddddddddddddddddddddcddddgdddddddddddddddddddddddjedddibedddcdbeddc#dddddcmdddddhlcdddjddddddcendddddddchhnidddddddddddjl", +"lddddddddddddddcdddjdddddddddddmmdddmmdddddddddddc.ddddddddddcdddddadddddclcddddmcdddddfkedcdcddddddifgdddddeddbcladdddddddddd.l", +"l.dddddddddddddbmddcdddddddddc.cdddddddddddddddddcaddddddddddddddd.fddddddajcnddjcddddgjeejgdnhdddddddndddddcdbmhlhddddddddddd.l", +"lkddddddddcddddbidddddcaddddjcdddddncdddddddddddddnicdddddddddddddenfnadddcanedddccd.kide.c.ddddddddddkddddddc#cjmddddddddddddml", +"l#cddddddcfddddhnhbfcdefddddhddemdel.dddddddddddddddddddfkbbkdddddddddbddddcidddddekhedd.jddeabcddddddjedddddcl.ecdddeddddddddal", +"lllhddddm##ddddc..ecdddddddddddddddbaddmdddddjddddddddddcccccddddddddccdddddddddddddddddmidddccdddddbkddddddddmbjddddnbddddddill", +"llll#nngllgdceeecdddddddiecddcdddcddddddddddhjddddcddddddcddddddchdcccccdcddcccdc......ekiecccceee.bllkj...........j.flfhm.mnlll", +"lllllllllllglllll##gnl#llllll#g###ff#gn##lllll##gg##ggggg#l####llll#llllglllllllllllllllllllllllllllllllllllllllllllllllllllllll", +"lllfieehllfhihijmjmimjjmknjjmjjjjjmiimm.mjf.mmmm.jmmemmhbkbnlggggfnanff#l#bannllfflnbbmjmhiijjiihhhi..e.eecccccee....#lgieeehlll", +"llhdddddcnjdddddddddddddddddddddddddddddjgaddddddddddddddddd.cdddddddddc.dddddbadkaddddddddddddddddde.cmddddddddddccd#nddddddm#l", +"lhdddddddddddddddddddddddddddddddddddddhagbddddddddddddddddddddddddddddddddddddddddddddddddd.edddddd.ie#cdddddddd.#ndbddddddddil", +"bddddddddddddddddddddkmdddddecdddm.ddddcdgjdddddddddddddddddddddddiddddddddddcdddddddibcdddchiddchaamddjcddddeedchh#ddddddddddel", +"mddddddddddddddj.ddcknghmdddcddddemddddddg.cedddmddddd.jdddddddcddjddcddddchaancddddjlgeddcb#iddnncceddcdddcdddc.dc#cdddddddddd#", +".ddddddddddddddddddecdeggdddddddddddddddd#.ddddd.bihjjkdcfeddd.eddidd.dddc#mddjmdddedbdckidcghdhlheddddddddkedd.cddfcdddddddddcg", +"jdddddddddddddddddddddddjddicddddhmdkidddedddddddcefhcddddddddd.edceddddhncdddddd.dddddc.ddegmdgmm#hdddddcddddg.dddcddddddddddc#", +"bdddddddddddmeddddddddddddceddddcdddfhddddde.ddddddacdddkkkddehjedjjdddd.edddddddddddcjcdddeecdfmdenddd.ecddddbcddddd.ddddddddhl", +"#cdddddddcmdeddd.mddddddddddddddjnedfhdddddilhdddddbdddcbheddedddddddddddddb.ccccdddcbl.ddddjedejddedddecdddcddddddddfhddddddell", +"lbdddddddgjddddddddenedddddddcdddeedfhdddddd.eddddcadddddddddddddddddddddddeeccccdddc#feddddddddddcddddddddddddddddddnliddddb##l", +"jmdddddddecdddddddmhicddddddjnmjiimd#aee....mm.cddekddddejcdddddd.cddddddddddddcccccceddddddcccddcccdddddddccddddddddcm.dddcmeml", +"ddddddddddddddddddddddddddddflllll#dlllllllllllm.ddaddddnl#ddddddicddddddddddddnlll###ffffmh##g#f#ladddddd.ll.dddddddddd.hfgl.el", +"ddddddddddddddddddddddddddddgllllllclllllllllllj.ddcddddd..dddddddddddddddddde.lllllllllllhalllllllfdddddddhlemedddddddebflllcel", +"dddddddddddddd..cddddddddddc#lllllld#llllllllllnedddddddddcddddddddddmhkcddddd.llllllllllliflllllllgdd.gfmddacddddddddddddcmjdel", +"ddddddddddddddddddddddddddd.llllll#d#llllllllll#kkddddd.hbfddddddddddn#cdddddejlllllllllllmflllllllledcjcddddddcdddddddddddibe.l", +"dddddddddddddddddddddddddddhllnnffndngggglllllll.edddddcllgdddddddddhgcdddddddnlllllllllllmlllllllllhddddddcddcjddddddd.bddili.l", +"ddddjddccddddddc.i.ddddddddnlnddd.eddddddkllljglhmddddddm.gedddddcd.lmejicddcc#lmmmmjiiijicijijijhllfddddm.eeddddddddddhnddmlm.l", +"dddeedddddddcmjieccdddddddd#l.dddecddddddhllleil#cidddddddddddddccdalnl#.dddcallncdddnefj#.#cfcgcdnllcddd#nklcdmcdddcdda.ddel.ml", +"dddddddddddddjcdd.cddcjdddkl#ddi#######ikhllleellbecddddddddddddiddhnh.dddd.mllllfe...bkbkbbabbkmemllidddh.dkfdmcijddddddcdd#mel", +"dddddddddddddddddkcddh.ddcllndcglllllllhehllledallckcddddddddddmbdddddddddccall#llg.he#lllllllllnmefll.ddccdc#mddfiddddde#eda.el", +"ddddddjncddddddddh.ddadddkll.jmllll#bllhjillledd#lgcmddddddddddkjdddddddddehllbdfllgd.e#lllllllllenhllnddcddd.lkd#addddn.gedmcel", +"dddddddmddddddddddadddddillhedfllll#illhchlll.mkjllneccdddddddddccinddddekhllfcdcnllnec.nllllllllgmcbllbddddddebf#bddecg.acdddel", +"ddddemdddddddddddcn.ddde#l#ecmlllllle#lichllledd.hllacbdcdddmcimec.cdddkccll#cmcg.nllgcac#lllllgll.a.#llmddddd.ddcdddkjcefcdddel", +"ddddc.mdddddddddddddddcllldcclllllll.hlidhlllmj#ecklllececddcdddcddddim.befl.c.#dmm#l#dd.e#lllgd#llcdmllljddddcddddddjleddd.dd.l", +"ddddcdddddddddddddddd.#lliddhllllllljclhchllleelnmeilllbdjem.dcdmdcchchglgdcmm#l#mhckef#memahijdhlmjcgllllacdddddddddelcdddjcdml", +"mcddmedceddddddddddcillllnc..#lllllladbhchlllmjllnmejglambmmmcaebd..hglllndde#lllg.fehll#ebcgllhcjk.gl#k#llfedddddddddhdd..ee.hl", +"liddicdekcddddddddeglll#ll#.cc#lllllled..hllleclllgmiejcllll#fhan#lllll#mmdmlllllllcejglllejeflledcfllmdcflljjmcddddddddjl#####l", +".cdd.m.cdddddddehhhllbedfllfeceglllllndd.hlllimllll#j.i.if#lllllllll#bmjc.allllllll#jhenll#me.fmdde#le.dikjnjll#nkim.eddh.ddddel", +"#kddchh.ddcikagllleamcdd.fllfcb.#llllledchllle.llllllnjea.jibnllllkmcddjjfllllllllllg.nefll#mkdeenc.jcea..eeh#lllllllicfcdddddcl", +"cdddddddddmlllll#kcd.decad#lllckc#llll#dj.llljjllllllllf..jkjdjlllcdddddmjjjhmijhiijmmdddlllledc#l#cdcfllhdmjmjflllllfdgndddddc#", +"ccdddddddd.lllnee.jecal#.icgllgmejflllljcdm#l..lnigllllll#fbedilllcdjckdajikdkciej..jencdcnll#j#llmiddka.igk.enec#lll#ccfndddddg", +"fgfcdddddd.llljdcm.kllllgj.jfllfehe#llliddd.nm.llaeiglllllllkmelllhmjjjiijjjiicmiiiiijihkknllllllhcmnkcdhlll#bjcd#lllnddeghib.c#", +"lncdddddddmlllmcmlllllllll.md#lljdad#lliddddd.illlljdkllllllkdilllllllllllllllj#lllllllllllllllljijfll#hglllllli.glllcdncdfhhlcg", +"mdddddd.ddjlllmjhllllllllllmkdamhg.jjglicimdddcnllllhdm#llllkimlllbkbkhabbkbkbehbkkbbkbkkbknllljmcfllllllllllllimgllledbaddddhjg", +"cddddddcddjlllmdillllllllll#mie.ll#...#idblidmjdjng##.d.#gnhe.mlllcdejbchcaeh.hiejcjehdiddcnlljejnlllllllllllllj.glll.ddcddddijg", +"cdddddddddekafe.hllllllllllll.c.glllmkdedklladddddddeeddd.jmdk.lllcddccc.djccdced.dmdeddddglljbefllllllllllllllhfglll.dddddde#cg", +"d.dddddddd.abkceillllllllllllljjcnllgeacdklllmeddddddchcdgllhcmlll.jg#gggg#g##gg###ggg..cgllmkeglllllllllllllllmcejjjddddehbkcdf", +"chmdddddddjlllm.hlllllllllllll#jh.all#eddbllleenmcdd.#lkcjllhi.llleclllllllllllllllllh.inllhcmnllllllllllllllllj.agfnedmhhcddddf", +"ckgdddddccmlll.cklllllllllllllll.dcgllledalllhmlllfalll#ddalkdmlllmmllllllllllllllllindfllmdeflllllllllllllllllmd#lllemllljkhddf", +"cm.dddddddjlll.mi########lllll#ll.cdall#eklll.mlllllllllide#kcc.m.celllllllllllllllicefllmkcfllllllllllllllllllim#lllefaeedb.ddg", +"cddecdddddjlll.dce...mcjemm.mcme.ccdcall##llljjllllllllllf#lkdeg##.jllllllllllllllkcekllh..alllllllllllllllllllmcllllmlcdddnddd#", +"cddcdddcddkllled.mjj.hdjdhiehdkekejdddfllllllijlllllllllllllh..lllemlllllllllllllhke.elm.mflllllllll#hlllllllll.d#lll.#cdddbddcl", +"cenddddddchlllgfffffnnffffffnfcnnnnnfn#lllllle.llllllllll#ahedmll#e.fllllllllllljieflkcj.flllllllllnc.lllllllllmdllllejidddbddcl", +"d.adcdddddjlllllllllllllllllll.llllllllllllllccgllllll#ajceedd.lllcdemb#lllllllkehnllbeealllllllllbeidgllllllll.d#lllednmddfedcl", +"dcgcm#cdddjlllllllllllllllllll.#lllllllllllllceegllllhdeabecdeillgcdgmidhlllllijmnllheaallllllllf.j#lchllllllnedd#lll.ddmddifdcl", +"ddenm.feddillllfffanannnffffffcnfgfgfggg#fgllfek.flbejikehng#lllll#fbmciccbllik.flliienlllllabhjkglllke#lllb.bddd#llledddcdklccl", +"deddddeiddjllllkedddddcd.c.c.ee.d.cj.ece.dcbllg..mim.n.eblllllllllllllhecbdjkm.blla.ebllllllbnglllllll.il#ji.hingllllecmcdddkicl", +"ddddedjjddellllll#.ddd.dkeb.jmibdaek.kiibdddalll..dmcnlgd#lfahijibgllgcl#m.hdjnllhchbllllllllllllllllladhmbcillll#khjde#lfkbgccl", +"ddddcdjeddcee.ialllfemedknnnnnnnnnnnnnnnafme.bllg.diglllc.eddddddddcmejlllbccfllhj.nllllllllllllllllllledcmfllghjmhmaecgemj.cdc#", +"dddd.jkcddcmcmddckglljmcm#lllllllllllllllllijebllghlll#iddddddddddddddeflllakllbjeklllllllllllllllllllncdc#l#kci.eddecdaedddmmcl", +"ddddddddddddddddccdbllhmcelllllllllnglllllll.ackllllladdddddddddddddddddmlllllidjalllllllllllllllllllfmgddkfcfcdddde#edddck#ljcl", +"dddccdddddddddddddecm#licjmllllln..a#llllllll.ddblllkdddddddddddddddddddde#ll#cdclllllllllllllllllllljimncdijcdddddil.d.a#niedcl", +"dddddddddddddddddddddeglmedflllnde#lllllllll#cde#llkdddddddddddddddddddddde#llkccallllllllllllllllllkjjlljdccddddddbl.e#lg.dddcl", +"ddddddddddddddmjdddddd.l#en.lllmdbllllllllll.cclllbdddddddddddddddddddddddd.llljl.lllllllllllg.llllnjeflacddddddcddal.dd.bl#edcl", +"ddddddddddddddmidddddcdjlncdbl#cdmlllllllllgceillfddddddddddddddddddddddddddillg.chllla#llllln.llllijhllebdddddjdddnlj.ihdm##ccl", +"dddddddddddddd..dcddddddflciefjdddig#aallllhcc#lljdddddddddddddddddddddddddddlllebelll.llllllnelllgjk#laidddddmbddcf#ggffmdgfdcl", +"cddddddddddddd..ddddddddmlmddcfgeddd.allll#cghlladdddddddddddddddddddddddddddmllgcdgll.llllllbclllie.l#dkdddddfjddddddddddmbddcl", +"ddddddddddddddciddddddddd.ddmmlllgg#llllllaccjgl.dddddddddddddddddddddddddddddfghefhllmllllllk.lllejnlaacddddd#mdijddddddddddddn", +"dddddddddddddddbk.ddddddddajedllllllllllllj.cmemddddddddddddddddddddddddddddddc.hjmclljllllllk.ll#eelljnddddddf#afaijjjmm.mihddb", +"cddddddddddddddddccdddddcelnddgllllllllllledjlljddddddddddddddddddddddddddddddjllb.mflm#lllllijlla#hl#hidddddddc.hbbnkki#fb#nddb", +"cdddddddddddddddddddddddddg#eenllllllllllledbllmddddddddddddddddddddddddddddddellgecnl.gllllljjllhehlfecdddckmddcjmmedddbedfiddn", +"cddddddddmkdddddddddddddceale.blllllllllllccflleddddddddddddddddddddddddddddddd#l#ckbljfllllljilljbblkhdddddj#aedgllgcddmcdamdcl", +"cddddddddcedddmdddddddddddhl.hhllllllllllgce#l#ddddddddddddddddddddddddddddddddfl#cjcjd.hkhhhcehhcdnlidddddddel#edil#cdddddmcddf", +"cdddddddddddddcdddddddddccbljdcj.m.jeieiemddll#ddddddddddddddddddddddddddddddddflledmhddcmha.ccbcddnljhdddddddjmcdd.nddddddddddf", +"eddddddddddddddddcmdddddccblmc.i.jeheichcjcell#ddddddddddddddddddddddddddddddddfllmce.edce.medc.ee.#ljeddddcdddddddddddddddcdddf", +"edddddddddddddddddhiddddemfllllllllllllllllllllcddddddddddddddddddddddddddddddc#lllllll.#llllcallllllkkdddddddeeddddcdddddhhdddg", +"edjedddmdddddddddddimdddddfllllllllllllllllllllmddddddddddddddddddddddddddddddclllllllljhlllgcbllllllf.cddddmknfddddddcddd.gddd#", +"ecfeddddddddddddcdddddddcc#l##########llllllllliddddddddddddddddddddddddddddddmllllllllhelllfdalllllllhhddddddcgbdddddccejaljdd#", +"eddcddddddddddde#gcdddddd.laddddddddddddccccellfcdddddddddddddddddddddddddddddbllgjiihied.mmede.jjiklljedddddddilcdddddl#nhmcdd#", +"e.dddddddddddddd.fcddddd.hljddbcnckckmjeeidddglledddddddddddddddddddddddddddddgllmddidacddieddcbckddnlamddddddd.lc.gkddabdde.dd#", +"eicdehadddddddddccddddddcgled.mmjcmjjjmmjmmdealliddddddddddddddddddddddddddddcll#ee.mmjm.dejcdcmjmed.l#ciddddddcl..l#cddbedaljcl", +"eieaadidddddddddddddddc.hlnhjllllillllllllljn.bmccdddddddddddddddddddddddddddm.fh.mlllll#dklidalllgddllfcdddddemlmilgcdddcd.lmc#", +"ejgmd.jdddddddddddddddcdglccmlll#klllllllllnd.ck#bdddddddddddddddddddddddddd.lnmdk.llllllecnjdalllljaillmiddddmglenlgcddddddfjc#", +"kkddddcdddddddddddddddcblb.enlllablllllllll#dk.llleddddddddddddddddddddddddcgllahbnllllllbdccdallllaecfl#e.dddd.ncflnddddddd.id#", +"mdddcdddddddddddddddddjlfccillll.nlllllllllladjbllledddddddddddddddddddddddfllgdcillllllll.dddbllllligmllgckcdddddccdddffgfnajd#", +".dddkddddddddddddddcddalei.#llllcflllllllllll.kcgllgedddddddddddddddddddddnlllmemflllllllladddhlllll#cjjllgjm.ddddddddca.....cc#", +"mdddddddddddddddcdedibc.cdfllll#dglllllllllllfdd.lllgeddddddddddddddddddcalllkddillllllllll.ddhllllllamekll#.eaccdddddbgedhdbcd#", +"jdd.edddddddddccicdfl#cdcalllll#dffhbf#llllllnddhlllllkdddddddddddddddddnlllllmcdblllllllll#ddilllllllac..lbmnc.bdicedcedddcjdc#", +".ddfgcmmdddmemcemn#lfemdallllll#df#nbmcejallaeh.#la#lllgjcdddddddddddmagm#lb#lli..blllllllllmdmllllllllachec#l#nh.mcjddcddddddd#", +".dd#lfifddc..jkgll#kcecnlllllll#cblllndjed.kdd.llgd.fllll#ideccccc.iflllh.edmllle.dfllllllll#eelllllllllacich#llll#fhdddddddddcg", +".dde.ikkcd.lllllfmc.cj#lllllllllj.lll.d#lidddjllnddc.m#lllbhlll#lllllllljceddelllikebllllllllnelllllllllllid#cek#lllfddddddddmgl", +"mdddddddddjlllheemcjalllllllllllfdhlhdkllacdd.gfccmm.kjif#mgllllllllllliddekc.i#llhcjhllllllllillllllllllllnidhdclllfdddddccd#ll", +"mdddddddccillledd.bllllllllllllll.dicellnecmcdcdc.l#hjj.cecn#####gfhjllidellg...lll.hcallllllllllllllllllllllf.dc#llgdceddmadkll", +"mdddddddnhmllledbllllllllllllllll#.ddflacbklgcddjlllllaednjkecedc.mdcllijmlll#eac#llcickllllllllllllllllllllll#.clllgddgcddnmc#l", +"mdddddddhijllledblllllllllllllllll#hblncdillfcddfllllll#nh.me.mejcmdc#li.jllllf.kjf.hhcmhlllllllllllllllllllll#.clllgcdakialadgl", +".dddddddbmjlllecbllllllllllllllllllllfcdmllgcccdillllllllll#gnbbbfkecllj.mlllllfjecklleadnllllllllllllllllllll#cclll#dddccefadgl", +"mdddddcdddde..ddejiikhhikhabbaaannaaidmillfdcjgddfllllfbllllllllllamclljcmllllll#mfc#lliech##l###llll#lll#llllf.clllgdddddjl.cll", +"mdddcddddd.fnfededmjcmeickdbeici.emdddm#lge.m#lidjlll.cnllllllllllaeclljijlllllllg.jmglljddc.iehejejimick.mejidddlll#edddenjdall", +"nmcjkdddddjllljmee...m.ceme.e.eeececc.llgcd.lllgcc#amdilllllllllllaicllicmllllllllgmme#lljddknegj#cbgmbdfmbkjbmddllllg.ddddddfll", +".dddddddddmllllllllllllmnllllllllllllllfc.illllleddcednlllllllllllaeelljhmllllllllll.bcgll#g#f#ffbfbagfnficanbabbllllgidddddddjl", +"edddddddddmllllllllllll.nlllllllllllll#cj.#llllncjn#lgllllllllllllb.c##jejllllllllll#...flllllllllllllllln.lllllllllgcddb##gcncl", +".dddddddddilllieeeee...dem.....mjjbllfcd.lllllndflllllllllllllllllbedeedimlllllllllll#edclllnkbabanaangggbcgfffgglllbdcbfehhd#e#", +"jdicdddddfllll.dmdbenei..bdidicddjlllbdmlllll#c#llllllllllllllllllbcellmjjllllllllllllledflllhdddkda.nmmheadmdmdd#llhdkndecdd#.l", +"idcddddcflllll.dmkbkhkkkkkkkhdcdjllllbejlllllf.lllllllllllllllllllbjellj.jlllllllllllllmdfllllkdceejmj..i.h.meedd#llfddg.cjdcl.l", +"idddddddcflllleealllllllllllnddmlllllbjjllllllkhllllllllllllllllllbcellmjjlllllllllllllmjglllllijchllllllllllln.c#llnddiadaddl.l", +"iddd.iddddjllledhllllllllllhdchllfc#lbfilllllllehlllllllllllllllllbjellmcilllllllllllll.d#l#dfllhdeillllllllllgdcllladddbcmmd#cl", +"idddjbddddmllleddcja#lllllbcdhllfcc#lbeilllllll#chllllllllllllllllkc.ll.hjlllllllllllll.jglgdcfllbcdilllllllgbeddlllnddd.cdkcgel", +"jdccc.cdddmlllai.dddcalllaec.llfddc#lbhhllllllllacnlllllllfbm..e.eccellmccmjjjjjjjjijjjdd#l#dce#ll.cdkllll#idcee.lllnddddcdh.#e#", +"iddchjdkddmlllllllccddcaidei.nadcdd#lbcilllllllllkdalllk.ckci..hchddd#l.dcndndnijkcfd.ncd#lfmcdcg#dic.illjedeh#lllllbdddddd.l#el", +"idegiddiddcjjiaglah#bcedddjlgdcime.#lbhhlllllllll#cchkehe.mikaannbimillijjiiijiii.dijjmjjllfemjhc.albc.jjehb.#lllll#mddcdddcgl.#", +"hdeeddddddddddddedfllg.ddmllgdd.lec#lbcillllllllllfcdc..jfllllllllllllllllllllllln.llllllllfcile..#llijdjj#lhelfh.cdddddddddhle#", +"iddddddddddddddddddhlllbillbdjjllmhglbkhllllllllllbddd.#lllfkj..mia#llll#kbkbhbab.ebnaanallaiillmdcfllkcglllgcddddddddjcddddc#c#", +"idddeddhcdddddddddddmgllllhd.mlll.c#lacillllllllla.icddhfjmded.emccemb#l#hddd.hckeie.eddd#lndill#jdcfll#lllkcdddddddddcdddd.ijc#", +"hddcneckieddddddcddddcnllgddellllmiglabhllllllllk.cigdddddmddddddddemc.fllacdcjckebem.dddllnmillllcdd#lll#mddddddddddddddceemdc#", +"iddcedddddddecdc#fdddddbllkdc#llled.kmchlllllllaecallmddddddddddddddddc.mllgcdelll####g.ellndillllnddgllgcddddddddddddc.kdnmddcl", +"mddccddddddddddnambdddddnll.cellleckkmahllllllgcjillkjeddddddddm.dddddd.d.#lfdcjlllllll.c#lajilllledkllgcdmngfakiddddddi#.cecdc#", +"mdddddedddddddc#.daiddddc#lncealled#ladhlllllljgmllhcmddddddddjl#ddddddddcc#lhdd#lllllljj#lbdilllnmjll#cddblidddcdddddj#.mcddddf", +"mdddjncddddddeljdddfdddddml#.dellecglbnhlllllaedglachdddddddddegkdddddddddi.lledellllllec.mekhll#edfllmdddd.gidkbdddddc#.ddddddk", +"iddmkcddddddcajddddbidddddjmiccbled#lbchlllll.hil#dmddek.ddcddddddddddddddde.ejddblllllmmllndillkjjllbddddddefabdddddddjfcdddddk", +"jdddddd.idddindddddi#dddddd#lmd.led#lbfhllllfkjllhedddgl.mgfcddddddddddddddednljdmlllllecllnhkll.d#llcdddddddd#iddddddddafdddddb", +"mddddda#iddddcdddddmlcddddd#lfddedc#lbcc.mm.ceilgebddblekgjdddddddddjeddddddmjlgdciikimccllac.kicellfdddddddddcgdddddddddcdhdddn", +"idhhkbjjmdddddddddd.l.dedddnllcdmcd#lbdekchdddnlh.ddcliekcddddddkcdddc.ddddd.d#lddejebddclladdjddmlljdddebdddddmidddddddd.bfdddg", +"#cnacddidddddddddddel.dacddhllnkhkbllgihhdmkkh#l.kddelcdddddddddkeddddddddddd.al.ceic.cdclladdecdalgdd.jaeddm.ddedddddddjllgcddg", +".dbgdddddddddddddddcicdbeddellllllllllllleflllllmiddmmdddddddddddddddddddddddcilllllikllllll#gc#llladdil#ghdjkdddddd.ddcemlbk.mf", +".ddcdddddddddekedddddddecdddgllllllllllllefllllgceddcdddddemeddddddddceeddddde.llllliklllllll#cllllhddijjjiddddddddddddddefdddda", +"edddcdddddddddddddddddddddddbllllll#lllllcfllllnccdddddddjll.ddddddddnlleddddcellllljklllllll#clllljddddddddddddddddddddddiddddi", +"bmeddddddiiddddddddddddddddddccccdddhaannda##gge.dddddddddmndddddddddflleddddddk#gfn..anf##l#gcg##lmdddddddddddddddddddddddddddh", +"ll#cdddddb#ddddddddddddddddddddddddddddddddcddeddddddddddddddddddddddk#fcddddddddddddddddcccccddcccdddddddddddddddddcbidddddhffl", +"ll.dddddddjddddddddddddddddd.heddddddddcccddddccdddddddddddddddddddddddddceddddckddddddddddddddddddddc.ddddddcc.jdddmgedddddd#ll", +"lnddddddddddddddddddddeddddd.mjg.ddddddddcddddcdddddddddhhdddddacddddddddhnddddfcddddddafddcdddddddiflgddddcdcddccddeedddddddjll", +"liddddddddddddddddddddmcdddddddi#cdddddd.cddddcfakkddddd#iddddhjdddddddddbndddmnddddddel#ddjcdddddcmm.addddcemeiadddddddddddddgl", +"lmddddddddddddddddd.dddddddddddiaddddmdjlndeddddd.gdddddedddddddddmacddddhndcdebddddddkllddddddddddcebaddddddddkcdddddddddddddfl", +"lidddddddddddddddddddddddddddddcddddd.dca.dddddddel.cdddddddddddddejce.mdelehmd.dddddc#.ldddddddddd.mhadddddddfnddddddddddddddfl", +"lndddddddddddddddddddddcddddddddddddddcdddcmdddddel#jddddddddddddddmhhbfddffa#cdcccc.bemlcddddddmiddddfddddcdclndddddddddddddc#l", +"llhdddddddbcddddddcmjdc.dddddddddddccdddddcedddddencdd.iiab#hddddddccc#iddcglneddcmhmddjlcddddednhddddbcddddd.llbdddi.dddddddbll", +"lllkdddde##ddddddd..cddddddddddddddccddddddddkjddcddddccdcejmdddddelchlcddd.cddddddddddjlcddckmdddd.gmdcddddddccddddkgcdddddelll", +"llll#nbflll.ddddddddddcddddddddddddddddddddd.l.dcdddccddddddddddcnccdccdddddddcdddddccdkleddddcddd.#lg.eeeeee.eccdcdal#im.jb#lll", +"lllllllllll#kbbihjkng#ll#nnaabijbbbnhi...jha#llg##gf#l##fffnkhhkflakababbbnfgf#ngffg#l##lganf##ffnllllllllllllllllllllllllllllll", +"llllgnglllk.ee.......mjjhikiceceecccccee....ee.....mjijm.e.e.e.eecceeee..m.mmmm.alllllllge.meeeeeee.e..mjj.m..eeche.eallllllllll", +"ll#jdddmfljdddddddcccdddddc.dddddddddddddddddddddddddddddddddddddddddddddddddddd.#nhiia#jddcbaababbahddddddddddddhdddhlfjcccilll", +"ll.ddddddgicacdma#l#mdddddcmdddddddddddddddddmhdddddddddddddddddddddddddddcnedddddddddddddddddddddh.dddddddddddddcdddh#dddddde#l", +"lkdddddddcccled#nmcddddddddiddddcddccddddddddd.bdd..ddcjeddddddddddddfcdcajl.dddddchnamddddddddcddddddiddhdddddddddddccdddddddml", +"leddddddddddnddcdddddkdddddaagcdbedddddddddddddicddkd.ahkdc#jcdddddddacdccdgeddddcnanijcdddddddddddddddcnjcdddddddddddddddddddcl", +"fdddddddddddddddddd..ddddddddddk#cdddddddddddddc.ddhkl.dddclkidddddddbcddddfddddddddhjdddddddddddddddddeee#ddmddddcdddddddddddd#", +"gddddddddddddddkaddddcddddddddhacdigeddkedecdddccddcgkddddcgdddddddddkdddddbddddddddaedddddede.dddddddddj#jdi.dddnjdddddddddddcl", +"l.ddddddddcdddd.bmddddddddddddidddflhddaabiddddddddd.cddddcfdd.hkiedddddddcgbmdddddi#.ddddddcicdddddddddmjbjidddcg.dddddddddddml", +"ladddddddiadddddddddddddddddddddddjljddekdddddddddddddddddefddeeddddddddddddddddddhmceddddddddddddddddddddbkddddddddd.cdddddddfl", +"llnddddd.lbdddddddddddddhdddddddjddddddddddddddddddddddmddebdddddddddddddddddddddddddddddddddddddddddddddddddddddddddh#cdddddfll", +"bkacddddikmddddddddddddcfdddjkbalabkkbdiijijmm.cdddddddcdd.iddddddddddddddddddddddddddddjcccdcccccnmddddddddddddddddd.kcdddd.aal", +"edddddddddddddddddddddddddddgllllllllld#llllllljicddddddddhjddddddddddddddddddchbkhimmcj#ll#ellllllkddddddddddddddddddddddddddda", +"eddbkddddddddddddddccedddddd#lllllllllc#lllllllb.dddddddddfjddddddddddddddddddmllllllllllll#.lllllladddddddddddddddddddddddddddb", +".djndddddddddejdee.jmfjddddelllllllllld#lllllllg..ddddddek#mdddddde.ddddddddddkllllllllllllgmllllllfddddcdddeddccdddddddddddddda", +"mddfidddddddd.dddddddijddddilllllllllld#llllllll.eddddddddn.dddddcgcddddddddddnllllllllllll#jllllll#ddddgcddgekllndddddddddddddf", +"jdddifcddddddddddddddndd.ddbllecccmemecemem.ejllj.dddddcngledddddhkmafnfcddddd#laiinllmjijjmchkhhblliddclcddklfmecdddddeg.dddddl", +"jddddegiddddddddddddnjddhddgl#ddhckcbciek.bdddnlnccddddddeiddcadd.gh..ekdddddilldddhl#ddijeiimc.dd#lfddc#id.gbddddddddd.aahddddl", +"idddddm.dddddddddddhaddccdellik.fnfnaaaakkih.djlli.ddddddddddjhddd.dddcddddddllgdddbllcdemdceeceddbllcdd#gclhdddijdddddddddddddl", +"iddddddddddddddddbb.ddddddgllceblllllllllllled.llfe.ddddddddd.ddddddddddddddillhickalldcnggggggfjcclliddklljddddeeddddddddddddcl", +"hdde.dddddddddddclcddddddjlln..#llllllllll#jcm#llljccdddddddddddddddddddddd.llfce.bbllchglllllllgecblledc#fdddddddddddddddddddcl", +"hddigdddddddddddclcdddddc#ll.dhlllllllllll.c.llnnlljcedddddddddcjddddddddddgllmakm.alldd#llllllllifmllnddecdde.dddddddddddkmddel", +"hdddbcddddddddddel#n.dddfllhe.glllll#lll#ejmllfcc#llhcddddddddddeddddddddc#llhc.ljgbl#.hgllllllll#cmjlladddddd#fjdddddddddddddel", +"idddemdddddddcddchedddcallledmlllfkjnll#mc.#lfeddmlllh.ddddddddddddddddd.gllnejnlm.nl#c.lllllggllliddfllidddddghdddddddddddddd.l", +"mddddddddddddkhdddddddnlllljddfnednlllledcel#cidc.ell#ccdeddddddddddcedehllndcbllmgflle.llkedd.lllledd#llidddde.dddddddddddddd.l", +"mdddddddddddd.leddddeglllfllhjdd.#lllgcmjlbcche#g.c.bcflnmd.e..cdcidckgljjicihlll..nl#dd.cddddellllmddhlllnddddddddddddddddddd.l", +"mddbedddddddddedddeehlllmdbl#dddglllfebm#ln.cj#ll#.jdillllfkmm.e.mhallllfdhmillllifnlfddddceddelllmjhblllllgjcdddddddddfffbeddhl", +"mddalcddddddddddenl#d#gcdddnbddmc#llebell#ckc#lllll.ec.flllllllllllllllkmndalllll.cfbddddeflddcll.jdblllnnlll#mdddddddd#dmdddcgl", +"mddde.dddddmibn#llllkcci.ekccdnidmbecjllfc..#lllllllacccikgllllllll#ni.nei#llllllmkdddddallledda..ialllkdd.glll#fkj.dddbcdddddml", +".dddddddddcllllllllfmcjef#eddel#mjdiillfedcejjhiihhhhjccjdd.ihlllajeciejnllllllllmmddddellllkdddhcalllbcddickgllllllbddhmdddddcl", +"mddddddddddllllllhec#cjlll#dddglledelllcddhca.kch.#mibim.dddddgll.dddiglllllllllleddenjk#llll.ddcblllhjgebcejdmbllllgdddcdddddcl", +"mddhmdddddcllllmcjeejfllllbddkcfl#klllnbbbbbkkbbk..hhhhihiiiihlllmmhllllllllllll.ddm##cmllll#.ddilllkb.jll#b.mcddnllgdddddddddcl", +"idddacdddddllllcd.iflllllledeckm#llllllllllllllllknllllllllllllllmiklllllllllllndddfl#.hlll#ebddcflkekhllllllamddfllfdddddccddcl", +"bdddmamidddglll.mllllllll#ddb#cdd#lllllllllllllllballllllllllllllmdallllllllll#ddd.fl#ejll#dcdfmddchnhlllllllllmdfllfdddddddddc#", +"bddmnke.dddfllle.llllllllgddnlgeheflgecce.eee....ccm.mmmmjjjjilllmbklllllllllljdcddfl#cml#ekmnllhddehllllllllllhgfllfddeddddddd#", +"bddibdd.dddglll.hllllllllgddallncbm#lfcdefcbdn.gendbefeaeijecclllmeallllllllllcc#.jfl#e.geicgllljdddhllllllllllmmmiimdddddddddd#", +"bddmaddddddglllc.llllllllgddklllgimc#l#cede..eececcdcdddddddddhabdhalllllllllidklcdfl#.edceflllekjkkddblllllllljbn#gkddddddddddl", +"bdd.addddddflllmmllllllll#ddjllllne#m#ln.eillllllllll#######ecaaaehblllllllllcilljanl#ccncfll#mhebll#ni.mhblllljiflladddddddddd#", +"bddckdddddclllle.#g#llllll.d.lllllnemillni.illllllllllllllllijlllmeallllllllgd#ll..fl#ddegll#mcialllllllgffllllmmglladddddddddd#", +"bdddjdddddd#lllmi#.demihbamdd#lllllnehellamajlllllllllllllllccllleinllllllllkblll.hflgdc#lllcbbnlllllllllllllllj.#llbdddddce.ee#", +"bdddddddddcllll.mllghcddddddddcce...dddmaamcmhlllllllllllllljhlll.cnllllllllmllll.iglge#ll#mmeblllllllllllllllljigllbdddh#lfflll", +"bddddddddddlllliillllfmdddddddddddddddddddddddemjikbaanfgg#lmjlll.hallllllllmllllje#l##lllmddebaanffffffffggg#fe.#llbdddcfl.dc.l", +"addddddddddllllcellllllhddccddehjmjijijdedjiidddjibaababbhgljjlllednllllllllllllledllllllcddmm.eim.jcd.djdjdedcdd#llbdddddggdddl", +"bdddddddddd#lllmhlllllll#llfddillllllllhebhllbdcnllllllllllgjjlllehblllllllllllladd#llllaeee.e.e..cecccdmcmc.dedd#lljdddddc#kddl", +"bdddddddddd#llle.llllllllll#cdcllllllllljb.hlladcnlllll#fi.ddclllcdcebgllllllllfede#lllllllllllll#cag#ggggggfnfnnlllmdddheda#ddl", +"bddddddddddllll.mllllllllllleddflllllllllmf.hllabeflllicjifddclllcdj.je.flllllne#.llllllllllllllllcgllllllllllllllllhdddkedhlcd#", +"#cddcedddddglllcdjglllllllllcddnllllllllllj.nbllkmjkhckcjcianglllgnbm.emcm#llaihegllllllllllllllllcgllllllllllllllllkddddddg#ddl", +"ndddddddddclllleddcigllllll#dddnlllllllllllmaebllhmdee.mcflllllllllllghd.hcbnejjcnlf.e....mmmjjj.mdmiihhhihhhhkhklllkdddcchlkdcl", +"fdddddddddcllllln.cbdhlllllbdddfllllllllllllcaaklladd.glnhllllllllllllf.bdijc#jllehddcfekejk.lc#.hchbiadmcdddd.hgllliddc#llhddcl", +"addddddddddhbgllllbmckm#lllhddelllllllllllll#m.mallabllllekjeeccce.if#.#lg.ddj#llkddc.imm.mm...mee.mm.mcmcddiglllgfacdddc.edddcl", +"fcddddddddddddekglllk.ec#ll.ddbllllllllllllll#jidnlllll#iddddddddddddcellllj.lllfene#lllllllllllllllll#mi.mgllgb..ehcdddddi.ddel", +"ndddddddddddddemce#llgcddgbddd#lllllllllllllllnddellllbdddddddddddddddde#llllllgdcclllllllllllllllllll.cehll#jem.eceddddddhkddcl", +"bddjjddddddddddcdechllgckcdddnlllllllllllllllgmiegll#mddddddddddddddddddckllllnc.j#llllllllllllllllllm.kallh.cidddddddddddjbddcl", +"bdddbddjjdddddddddmmjll#ccddjllllllllllllllllmjjfll#mdddddddddddddddddddddnllljddnllllllllllllllllllajeilljc.dehcdddddddddbhddd#", +"adddmbddddddddddddddd.llecdc#lllllllllllllllnhhalll.dddddddddddddddddddddddbll#cajlllllllllllllllllfdehll.h.cgllnddddddddm#cddd#", +"f.j.iledddddddddddddde..dddc#llllllllllllll#cjjllliddddddddddddddddddddddddcglln.dnlllllllllllllllljhmllihddc.iglcddddd.hicdddd#", +"be..m.dddddddmdddddddcdddddckllllllllllllllfhiallfdddddddddddddddddddddddddd.lllci.lllllllllllllllncdb#bdmdddddelmddcdddddddddd#", +"mddddddddddddgdddddddddddmhfjllllllllllllllicdjlledddddddddddddddddddddddddddnllhdcllllllllllllllldm.mdj.dddneddnkdelfddddccddd#", +"jddddddddddddnkdcddddddde#lecnllllllllllll#enbfjeddddddddddddddddddddddddddddellbemnlllllllllllll#jm#l.cddddfmddikc#l#ddddb#mdd#", +"hddcdddddddddjlmjmddddddc#l.ijllllllllllllbedgll.dddddddddddddddddddddddddddddmm.ecmlllllllllllllaihllmiddddddddg.c#l#ddddk#cddl", +"hddnbdddddddddc#flcddddd.klbdclllllllllllljhc#llcdddddddddddddddddddddddddddddhllked#llllllllllll.khlbcddddddddd.cddjmdddddddddl", +"idddn.eddddddddck#mddddddmlg.m#lllllllllll..illnddddddddddddddddddddddddddddddmllnccglllllllllllgdjnlmhdddddddddddjgddddddddddd#", +"jdddbl#dddddddddddcddddd..llcdn#########l#jballjddddddddddddddddddddddddddddddellfccnlllllllllllncdlleddcdddcdddde#jdddcddd.cd.l", +".dddf.lcddddddddcfnjdddddcll.decddcmceeec.ddglljdddddddddddddddddddddddddddddddgl#cdmkaabananfnnieml#hmdcdddbddddifdddaljdda#dnl", +"mddnndgedddddddddcjbmddddcllmdijkmmijhihemdc#llmdddddddddddddddddddddddddddddddgl#cddjdicicicjceddil#cddddddfcddd.ndddjhfdd.jdcl", +"jddeddjcddddddddddddddddddll#gffafffnaanfffnlllmdddddddddddddddddddddddddddddddgllmmmjmj.jcj.m.eeeal#jmdddddfeddddcdddddjhdddddl", +"iddddddddddddd.eddddddddddllllllllllllllllllllljdddddddddddddddddddddddddddddddglllllllllljlllllllll#ccdddddfjdddddddddddcdddddg", +".dddcddddddddi#bbkcddddde.llllllllllllllllllllljddddddddddddddddddddddddddddddcllllllllllljlllllllll#eedddddcdddddcnmdddddddcdcl", +".dddmddddddddicddmaeddddc.llhhbbabnnnnnffnaf#llbdddddddddddddddddddddddddddddd.lll########m####l##llljmdddddd..dddjllhddddddn.cl", +"mdddddddddddddddddddddddbmladdkmgehmcm.mckdd.ll#ddddddddddddddddddddddddddddddjllbddedcdccceddeddddfledddddddfgdddc#heddddidkmcl", +".dddddcdddddddddddddddddcblkddmmj.mmmje.emcdd#lledddddddddddddddddddddddddddddalljddici.ee..jejedddklkcddddddckddddddddddibdbecl", +"edddcnacddddddddddddddddm#lmmhlllllllll#l#gc.nllmddddddddddddddddddddddddddddd#ll.iifgffggggfgnggjbjllcdddddcnidddddddddenddbcd#", +".ddddmddddddddddddheddddhllddglllllllllllllidjndjedddddddddddddddddddddddddddcj#adc#llllllllllnllgdeglicddddckmdddddddddddddhcd#", +"mdddmddddddddeddddddddddglmimllllllllllllllnj.mflkddddddddddddddddddddddddddc#nmdkcllllllllllgelll.bmlgcidddddddddddddddddddjcd#", +"mdddkbdddddddnncddddddddffcdbllllllllllllll#dcill#cdddddddddddddddddddddddddbllfddklllllllllliellljee#lkkcdddddddddddddddddddddg", +"jddddacddddd.hddddddddddddmmllllllllllllllllfi.glllcdddddddddddddddddddddddhll#ebmllllllllllhdjlllljb.llcddddddddddddddddddddddf", +"jdddejedddd.kcdddddddcdddddnllfnlllllllllllll.ee#llncdddddddddddddddddddddilllidcalllllllllfcdhllllbcjijbmdedddc#ncdddddddndddd#", +"jddcihbjmiabddddddccc#iddddalncglllllllllllllnddilllfcdddddddddddddddddddmlllljdcfllllllllfcddhllllljkdil#maccdd.gedddddcc#cdddl", +"jddejfedddddddddcciilladddddcdiieeejflllllllljcdklllll.dddddddddddddddddnllllllhkcnllllll#cdddmllllllch.gllkegcddddddddc#gfmdddl", +"hddd.lcdddddc.acimnllkjdmcddddddddddd.nllllljmbbllllll.i.ddddddddddddcigllla.nllmjefllll#cddddcllllllgmcikllfidbdhd.dddhjddddddl", +"adddjmdddd.bjijjbll#icke#ndddddddddddddilllikehll#.j#killnjccdddddcecgllllkdddfllmccflllmdddddd#llllll#ebc.#llfiehdbcccbhdddddcl", +"kdddddddddiagllllljdkiklllfdddddebaahcddcl..dnll#eddddlllllll#gf#ll#d#llfecdcmdnlljc.f#eddd.eddkllllllllm.hcillllll#al#hcdddddcl", +"hdddegcdddnllllajj.b.nlllllbdddalllll#bcdceinll#jadccd.alllllllllllldffjed.ngcmcgllmeccddd.#fcdclllllllllbckmeiagllln.cdddddddml", +"eddddeddddallllce#ehllllllllbdhllllllllndddhll#..mfg.ddclll#llllll#fcccedjlllgcccfl#cddddcgllmddalllllllll#mcmdddlllkddddddddbll", +"edddddddddkllllccflllllllllllbgllllllllehddmlgeg.glllbdellgdcc.eedchdjcbllllllfcccaedddd.llllnddcllllllllllllbcdelllbdddddddddcl", +".dddddddddblllle.llllllllllllllllllll#.ehnhdj.cjgllllfdcllgddcddcccihn#llllllllfdddddddc.lllllhddmllllllllllll.dclllbdddidcnmdel", +"fifbcdddddhllllcmlllllllllllllllllll#ebjnllhdkm#lllllnjmllf..bffgglllllllllllllgddddden.g.#llllcdd#lllllllllll.aclllbddddddccddl", +"jgddddddddbllllccbnnnffkfggfggggggggeadgllg.ednllllllfcellgjhllllllllllllllllljdddddc#lgece#lll#cd.lll#llllllledelllbdkcddddccdl", +"ehbdddddddbllllccbck.i.hcidbcheidk.ddefllg.m.he#llllln..llfdillllllllllllllgicdddejdde#l#edcee.eeddcj.c.m.m.i.ddclllbcl.ekdd.mcl", +"ed#eddddddbllllm.jm.mj..c..j.j.m.i.cenllge#mllbelllllahmllfkkllllllllllllfmddddckllbce.#l#eccc.cecddmcccec.cieccelllbeljchdd..dl", +"eddaddddddnlllllllllllll.llllllllllllllfcej#lllamllllncellfcillllllllfh.dddddddclllladd.lllllllll#edclllllllllllllllbdl.dddc#cdl", +"edd.ddddddbllllnaannffnfcfgfgggg##llllnchillllllkklllajckhmmhllllbmeee.mjkngadddhlllladmellll#g#g##cdj###l#ll###llllbd#..mdijdd#", +"eddddddddn#lllldd.dmdjccdcd.ce.ddegllgdd.llllllllk#llbeckkjjillll#ll#llllllllmdddfllllkcd.ll#eddddcddddcec.ccccdhlllbdfeh#dddddg", +"cdddddddddjllllcdmceeeecceceeccdc#lllfdelllllllllllllkbmllacilllllllllllllllllmdd.lllllkdclll#edddeeecddcdececddjlllhdaedddddddl", +"edddddddddhllllc.llllllllll#n.d.#llllfd.lllllllllllllkc.llaaklllllllllllllllll#.ddillllfdd#lll#cjdg###bcb#####eeilllideddddddddl", +"edddddddddhfnakehllllllllllfc#.#lln#lnd.lllllllllllllhb.llacillllllllllllllllll#dddnlllfdd#leglgej.#lllgeallllmamlllmdddddddddc#", +"edddddddddehbande#llllllllnjjclllhc##khmlllllllllllllhdellbnklllllllllllllllllll#eddbllnielldell#edelllllnflllcdilll.dddbfddddd#", +"eddmcdddddhlllldcjjallllladjefllhdcmj.ccannnnnannnffnejellkcillllllllllllllllllllgmdcnlfdclldd.ll#cee#lllllgh.ddjlll.dddm.ddddd#", +".ddmedddddilllledje.enllacamndfbmcellndcidjcjmided.cccdellb#hl##lllllllllllllllllllmdcnn.ellddd.ll#e.e#llgidjcccklll.dddddcddddl", +"edddddddddjllllllnmec.ejhimll#cmddelladddcccec.dececdcc.llbcdeddde.jfllllllllllllllladdccel#cdce.ll#edefjdhcckllllllcddddddddddl", +".dddddddddehkngllllfiiddmhlllhehhj.llggg####lhh#########llkdcjeeejemd.iglllllllllllllfmddel#ccjde.ll#c.ddcmb.lllgnakddddeddjbcdl", +".ddddddddddddddek#l#lnedjlllhh.klc.lllllllllljnlllll##llllgflglllgfh.eedhllllllllllllllkddb#dd#icc.llgcdchllmaheddebbcddddde.ddl", +"nddddddddddddddddd.glllklllmcmbllkillnccececedcccddccdc#llll#faaagllllkddcnllllllllllllnedccdm#lked.ll#m#llgeddddflllidddddddddl", +".ddd.hdddddddddddddchllllljehalllm.llnddkdbmk.bcjedddjgllajeeedcdcemb#lgicdhlllllllllllace#adcallkdj.lllllhddddddmm..ddd..dddddl", +"mdddhnjddddddddddddddmlllfdd.lll#kjllndcbfbanfafaedekllfccdcdcddddddddhllbcijllllllllllbe.l#mijegleddklll.ddddddddddddddhidddddl", +".ddjadddddddddddddddddclllbimflllemllnm.lllllllli.cnl#e.dddddddddddddddcal#eejlllllllllac.lldellllcecll#cdddddddddddddddbcc#cdcl", +"mdcg.dddddddddddddcdddde#lljec#l#bhllbh.llllllla.cflfeecddddckneddddddddcilgmdbllllllllkh.l#ej#llbdjal#edddkf.dddddddddd.ddhcdcl", +"jddacdddddddddddddnbddddjllgemkllcellbc.llllll#deblncdddddcn.bjddddddcddcdklgc.gllllllladjl#dellgdcmll.ddddddddcjddddddddddddddl", +"mddeaddddedddddddddedddddh#eee.glbkllbi.lllllljekl#cddddddcbcdddddddil#.dddhlbdelllllllbhc##jjlljdeidcddddddddef#ddddddddddegcdl", +"jdddiddddckddddddddddccdddea#cch#e.llbj.lllllnc.#l.mdddddddddddddeddcjflmdddfljmnllllllb.el#delldeflgdddd.hkmcnllcdddddddddelccl", +"mdddddddddjddddemcccmfmdddkllbj.#hbllbf.llllljmalacddddddddcddddh.ddddcladddelaee#lllllkg.l#jhgkccllhdddhbcdddd.#cddddddddddlccl", +"idddddddddddddddn.nn.ddddddlllcded.llbddee.m.del#cjddddddcgcdddjeddmacdhfdd.inl.dcecce.dcjl#ddcddjlgddcfedddddddddddddddddddmdel", +"iddddddddddddjddmedddddddddnlleddd.llbddkehnddhlkcdddddddfaddddddddml.ddcdddceladmkekdbcdil#ddjddglbddcakcddddddddddddcahdddddcl", +"hddddddddddddi.dcfdddddddddhllk.ccklln.m.dcmmj#l.eddekk.blcdbbcdddddkbhicddde.f#khhm.bhhb#llkhhkalljddddfaddddddddddddhfcdddddd#", +"hddddddmdddddegcdcadddddddd.llllailllllll.nlllllecddikkafmddekl.ddddddccdddddcbllllbhlllllllllllllledddddbfdhedddbjddddddddddddl", +"idddddddddddddddddbcdddddcdcllllaillllllljnllllaeedddddddddddeeeddddddddddddd.hllllhklllllllllllll#cddedddn#hddcnfcddddddddddddl", +"jdddddddddddddddddddddddchddglllhilllllll.fllllicdddddmaaidddadddddddddddddddd.llll.blllllllllllllnd.cn.dddmddddicddddddddddddcl", +".ddcddddddddddddddddddddcgddjkbfmj#lllllgdbfg#g.mddddd.knjdddiddddddddddddddddchkkhcejhkafglllll#gkdjedddddddddddddddddddddcecjl", +"faedddddibddddddddddddddciddddddddddccccddddddddddcddddddddddedddddddddddddddddddddddddddddillnecdddjcddddddddddddddngiddddcalll", +"l#cdddddcgeddddddddddddddddddddddddddddddddddddhng#acdddddddddddddddddddddddddddddddddddddddgndddddd.cdddddddddddddd#bdddddddgll", +"lmddddddddddddddddddicddddddddnnddddddcdddddddddcilcddddddddddddddddddddddddddddddddddddcdddddddddddc.dddjnnkdddddddmdddddddddll", +"fdddddddddddddddddddddddddddddbjfidddddddddddcddcckdddddddddddddddddcmmdddddddddcm.ddddddddddddddddekhddd.becdddddddddddddddddal", +"bddddddddddddddddddddddddddidddddbaddddddddddcddcc#edddddcacdddddddddcfedddddddddddddddddddddddddddddfdddd.eddddddddddddddddddal", +"bddddddddddddddbbmddddddddddddddddeiddddddddhddd.mlgdddcddflidddddddddeddd.mddddddddddcedddddhjdddcjegmddddbcdd.ddddddddddddddgl", +"fddddddddddddddchfcdddddddddddddddddddddddddejddcenhddefha#j#ndddddiddeiddmeddddddddcjhjdddddcjdddcjhamddddhjddkcdddkcdddddddill", +"l.dddddddcddddddddddddddddddddddmedddddddjecdidddddddcmllgcdd.dddddddddkcddddddddddddddddddckdddddddddddddd.gjdedddd#hddddddd#ll", +"l#cdddddc#mddddddddddddddddddddddnedddddddejcddddddddnlfdddddddddddddddcjdddddddddddddddddddcdddddddmdddddddcdcjddddf#kddddcalll", +"ll#hee.klljdddddd.jcdddcce#fccdccgheeecccccdddddddddcecccdccccccceeececdh.dddddddddddddiddddddddccbj.eecddeeccfj.eeenllnbba#llll", +"lllllllllllgggg#nlll#fglllllll#lllllllllll#ggfffffn#ll#ll#llllllllllllllll#ffgg#gfnggff#ffff#####lllllll##ll#lllllllllllllllllll", +"l#liiiiihkhhhihiiiijjmjmmjjmm..eeecefl#jmjjjmjijjjm.mmmmjmmmmmjll.ee.....eeeeeeeeeeceecemlfe...eeeeeeeee.ee.eeeeeeeeccccccecelll", +"ke#kcddddddccededmdcdcdcddcdcd.cdcddjll.dddcmddd.e..cjdjdjdcdd.l#ddc.emcjchdmdhcjcjdjeddilbdddd..djdidickeicmeiccdedidkddddcbl#l", +"idclbddddd.jmjdidjdcdmccccedmd.edcddclladddd.dddeedddddcdcddddml#ddceejdcdmdmd.dcdcd.cdcllmdddddddcdddddcdddcddddddddddddddall.#", +"iddmfddcmdhbabbcdddmabababbaaaanaa.dchgacm.agg#g##gg###ggj##cjcaicemggffffffffffffggkc.mniddcg#############ll#ncdm#lllgdcdcflecl", +"iddddjkc.dhllllmdekjllllllllll#ggghdeddcceckllllllllllll#ciaemchidcjllllllllllllllllhccmmdddblllllllllllllll#idddnlllfc.ckf.mdcl", +"mcdhd.lbdbdklllhdclamllllllllled..cdddfl#db.lllllllllllllcddde.lld.cllllllllllllllll.i.l#dddlllllllllllllllkddddclllgccdall.ddcl", +"m.dcm.m#fcejbll#ediidm#llllllljciiebeemllhmc#llllnjllllllhdddemlldcdillllllllllllllncmfladcdma.glllllllllnejagfjmll#cicfllehddcl", +"mcdj.ecjlb.gckllidddjnj#llllgb.dkgjlcdd#l#cbillgkmlllllljicbdc.l#dcddhlllllllllllll.jell.eddd.ecgfglllllhcbngllablgeidblljeeceel", +"eid#bdndmladi.nlbddcllgc#ll.ddecadmhdmdnllmcd#bdc#lknllllcdddd.l#ddmdd.lllllllllll#ddhlndcddblfdemmnlll.dddddkli#l.edblljdibimel", +"mcdllnci.jlne.dafddcllhmmll.djlbaddddddmllachjm#.#mblllllgcac.ml#dchcddcnlllllllllkam#lmm.debj#ciiak##.ddddddd.h#cejnllea.flim.l", +"ehdlllk..chlkchcb.dcancmkincckm.fcddddacgllmbdalcecfballllkeceml#dchhdddillllllll#ecil#ceddddd.nllhijeddcmbfgn.ie.mkl#jm.bllhdel", +"mddblllbdfdjlnddckdddd.mbcdcn#k.ddddddcdillac.d.a.cddikbj.ecd.ml#dckl.ddkllllllllam.flieedddddcll#a.ddddhflllljdmdklljdhalllbjel", +".hdd.bllbcmeklnc.dddddjl.ddehbjddddddbdiell#c.dh#mecccdce.cccjjl#ddejeddcjlllllllmc.l#cdcddddddmebfeddddddchl#ddcnll.minllllbdcl", +"meddddehnme.cklacdddddhlhdilkdgjdddimgkedflljcecmfeh.dcemkaic.ml#dedj#bcddmlllll#cjalndhcmcddddddmmdddc.d..cmmdmhllijcklllllkj.l", +"mjdiddi#hddcgdbladcdddcicmellckedddbaklci.ll#midafmhcgllgfkdmkml#dddc#lgcddallllhmclljddfljaedddddddcfll.llhdddhllhcail#ieccddcl", +".icledblndkjc.eklacdddddi#djmddddddhlhk..dgll.edigmhakllllkcdmml#cmddealkddallllc.jlfdmdjech.cddddigll#m.iic.dblljijdcccddddddcl", +"m.clbda#cellie.dklkcddddblaemdccddjmnbmecbkllkjdijhcchl#ain#.n.l#dddedcjjddnlllfecgli.dci#nd#idejnlllf.dk#j.jillki.cdddddddke.el", +"eael#djndjllkddbdblbdeddkllmndklnddgmelbdielllcekllbcl#egl#iddmlgd.i#djlfdcalll.emllcmdhllli.malllln.mladdhcdjlid.cddddcddmfdn.l", +".dellbd.dellcmc.ddblaeddmllgene.cddcc.lejdehllhj.llhilkhgecd.n.lgddcb.ellndcglfeealhkmdfllllllllnmcddfl#c.cb#jecaddddd.##ichidel", +"emellledddgadjhdcedbnecicglla.m.dddfbcj.#djellgdealkllkbedcccjmlgc.cnmdi#lcdilhce#lccdmlblllll#imcdddhgj.cillheedddcj.elgbhlhcel", +"meelllgdddijddmjjdjdd#addclllijidd.llejd.cde#lleh.lllljbdd.f.f.lgddddbdb.hedelmmblf.iel#jllllfe#l.ddddddmkllhd.cddelllm.i#llhdel", +".kelllladdcmdcke#dcccnla.icnklm#kdalkdg#acde.llgde#llledddfgcemlg.mcd.dagcdmgkcellmmcalhgbg.hdblheddddiekllidmddm.e#hjkgllllbdcl", +"e..lllllkddddelaemc..calkchdkljln.#l.djlled.dgllemilln.cealf.amlgdcecaeegadk#cdmlfdkdabb#iid.bemalmddjchllkdecb#lgedk#llllllbcel", +".f.llllll.ddddaljdnjdednlb.c.ginmj..ddd##dh..hllhdd#lll#blllc.mgfdjh.eeddedc.ddnlimdddhlgnedklhbllcdechllhdejlllia.m#lllllllkcml", +".c.lllllllhdddcl#d#ndcddaladmdhaig##cddjfd#cccll#ccblll#aimedddhjddecjkdbbdkec.llceddd#ncck#bem.jcdeiblli.ckllhcjkjnflllllllbcel", +"ebmlllllll#cdddnlj.cdd.icnlhdeeekijhddee.d#kjeblljd.bj.cicmddd.lgddddideehdkcdblji.cmdecdblll.#eddjmhllbdijllhciebbj##llllllbj.l", +"edjlllllla.fecdmlnddddddecnlbccelllleelendf#dd.#kcddcccdce.ihklllgfnhmecccdddd.nddd#bc#hcllllncechdkllkdchllkmmadkjdi.jlllllbjel", +"mamllllljjkb#fddalcdddddjednlncmef#fejlg.cglmjecagddciag.flllllllllllll#gajcdif.dkelmgljjllll#e.c.nlliehi#gjjb..nglcikmlllllkccl", +".imllllljegllnddml.ccde.dcnenlkcjc.kkeknnclladdmllka#lllinlllllllllllllllll#b#lmddil#llj#llllgdmmkllkhcjhhbhmed.l..dniklllllbhel", +".imlllllndgll.ddc#hjgchlc.hednlnddc.ddcdbegacdd.llllllllnbllllllllllllllllllll#cdddklllllllllmjdbllkdeeflllmddd.l.ijeemfflllhdel", +".k.lllljdmmlbddddjlm##j#hmdmndnlfc.difedcdcdciglllllllllljlllllllllllllllllllll#kcdcenllllll.jcflljd.kfeekmf.ddckiaff.cmhlllkecl", +"ecmllljcbl..dddddd#aelfjjibd..ealbcd.fhddcddflllllllllll#ennkhiiihbag#lllllllllll#hccchllllidiblladejllajjdlmcdmlnn#dcfmbnllhe.l", +".h.lll.ilfddddcddd#lbihiealddmadnlndjcfcc.hmflllllllllnjcddddddddddddddjallllllllllnddde#lmedfllhcd.illb#lcai#jd..iemnbhhnllk.el", +"edcfllmdhlmcddkhcdlllhcgh..f#kdicaladddmegl#eglllllamcdddddddddddddb#gnkccmalllllllaehddcecdflliedca.lljlf.fh.addb#gafkbcll#.del", +".ddd.jdieicddelbcalll#hcjagllli.ccaf.cdmglllgmllla.ddddddddddddddddfllll.dddeb#lll#cnlaccddjllkd.jnb.#bnlinllccddina#nfje#keddcl", +"bmdmeddmmddccdec#llllnedjllllllhdgcd#nmllllllb.gcddddddddddddddddddiflllcdddddchllmflllgedjdghddhl#ccddmhkllbdddddddi.dddddmmd.#", +"ll#kcccjdddddhg.lllllladikllllllkecdnllllllllgcddddddddddddddddddddaakjedddddddd.jjllllllflgcechgkfehddddebfhf.ddddigedcidcek#ll", +"g#ll.bm.d.dcdig.flll##me.cnllllllmddmlllllllncddddddddddddddddddddc#llldddddddddddillllllllhdcj#.jcjledddcccifkcddde.dhcjmebllll", +"edi#jll#kdcndddd.llad.khgddalllllecd#llllllhdddddddddddddddddddddddcmkadddddddddddd.#lllllliddbdddegh#hd.##iljibdddd#cch#lkbllll", +"eddccblll#amcd.cd.a#habcadejhlll.mjfllllllmddddddddddddddddddddddde#gn.dddddddddddddefllllll.ddd.nlnilnilliji..c.dmdjb#lllkhgjel", +".ddjc.chglllnmecddd.fh#dcedgfllbkebllllllmdddddddddddddddddddddddd.lll.ddddddddddddddc#lllll#eddkggmlli#lgcg.deemejnllllllhcddcl", +"eidbedddd.nllllkcdm.dchdelg.glndcillllllmddddddddddddddddddddddddddcjiddddddddddddddddd#lllllnddcmdbl.c.j.dd.jdchlllllllbcdacdel", +".cmllgkeicdehgll#fmc.c.ddkllll.bcefllllmddddddddddddddddddddddddddm#g.ddddddddddddddddd.lllllljdel#hjf#bdddmcjf#lllllnmcideec.cl", +"ejmllll#becdeciflllgjemd.chglaccnbeklladdddddddddddddddddddddddddddikcdddddddddddddddddd.lll#h.cdhll#becmdchflllll#b.dhdm.k#ik.#", +"e..lllllll#hdcgcckllllaedcedcdkmlllj.addddddddddddddddddddddddddddilbddddddddddddddddddddblgdklfecnjdd.deallllll#mcckjdi#lllkdel", +".mjlllllllll#bjdcdmjnlllficjmdc#llllkdddddddddddddddddddddddddddddkljddddddddddddddddddddd.mgllljddcheiflllll#k.cicedcflllllhdel", +".hmllllllllllllfjeid..bgllgccdklllllhdddddddddddddddddddddddddddddb#ddddddddddddddddddddddclllllnddchllllllficdmceddhn.#llllkmcl", +"mdjllllllllllllllln.jmidmgnhln#llll#cdddddddddddddddddddddddddddddafdddddddddddddddddddddddblllllbf.llll#hdd.cdddjkhmncbllllhdcl", +".hmlllllllllllllllllf.ede..iglllllljddddddddddddddddddddddddddddddajdddddddddddddddddddddddclllllllkhlamjjmdmbnjgkiadeic#lllkmcl", +".djlllllllllllllll#nkcfmdjhd.lllllgddddddddddddddddddddddddddddddd.dddddddddddddddddddddddddallllllad.dmmmmfllkng#hdcjlenlllkdcl", +"..mllllllllllllljfcdddcddddcilllllicddddddddddddddddddddddddddddddddddddddddddddddddddddddddcllllljddidcnlllllkim.dd#.lkalllbdcl", +"mcjllllllllllliedddemddcc.denllll#cddddddddddddddddddddddddddddddddddddddddddddddddddddddddddallllhddiflllllllljlnjd#hfgglllhjd#", +"mcjllllllllllbdddckgbma#jmdelllllkdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddjllll#cegllllllllgjbnkcng#lllllhec#", +".h.lllllllllcdddcllle#lkjmdhlllll.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddc#lllljnillllllllllabidnlllllllkam#", +".cjllllllliedd.bkllhcmeddciflllllcbgidddddddddddddddddddddddddddddddddddddddddddddddddddddddddbllllic.llgemijinlgmjjllllflllkecl", +"eijlllllliddd.lmmh.dcdmfjdcgllllad#lkkfccdddddddddddddddddddddddddddddddddddddddddddddddddddddjlll#hed#llm.ngljg#cijllaem#hlh.cl", +"mdjlllllgdd.c#jdedbiheehib.lllllmellmglmlfcdddddddddddddddddddddddddddddddddddddddddddddddddddcbmecmdcfll.ddclfk#.hjlgddb.#lhkcl", +".emlllnjeinleed.#bm.bmnjceelllllejllml#hlghfc.dddddddddddddddddddddddddddddddddddddddddddddddddbf#l#ceall.ddciligih.ljddmdllh.cl", +".ccaabddiggmkddjjckjjejbii.llll#dkllilanlkafhlficddddddddddddddddddddddddddddddddddddddddddddddlllllekklfhccbclnehbmkmci.c#lhiel", +".ddckddcidddddcddddddddcddmllll#deij.ama#cfkgllllgjddddddddddddddddddddddddddddddddddddddddddddgllll.ccj.ccdmdjjcc.ededd.dihcddl", +"edccccdckdmdjdkd.dhen.kmedillllfddddddddcdccc...mjicdddddddddddddddddddddddddddddddddddddddddddnlllljceachdnekcncf.bckmiecdmddc#", +"#f#gefffanaabbbbkkhhiiijeinllllfdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddallllaccicec.ccc.cmcmc.ej.cdjddc#", +"lllljllllllllllllllllllfillllllndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddbllllllhkllllllllllllll#llll.gfgl", +"lllljllllllllllllllllllnkllllllndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddkllll##hhllllllllllllllllllljllll", +"jmmjcjikbkbbbabbbkkkhhk.eibllllndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddbllllfccc.mmjiiijbaaanfgg#g#.f#fl", +".dddjdadcdndbebcmcaeijbiedellllfdddddddddddddddddddddddddddddddddddddddddddddibhbimdddccdddddddallllfdd.d.d.ckdbdncndkdidbdjddd#", +".ddmmdecddcd.e.dmjemcdjjccellllgddddddddddddddddddddddddddddddddddddddddddddddmallgcac#fc#k.fadnllllncdmcjeddddddc.md.djcjdhcdd#", +".dclldjeddecmbjdfleace#lmidllllgddddddddddddddddddddddddddddddddddddddddddddddddeki.aelfelbhl#d#llllb.dhejececdddelgcdcf#ffam.c#", +"mdclndcddehl.hdamlbddcelkdd#ll#kddddddddddddddddddddddddddddddddddddddddddddddddddddcjlkjliflfclllllkcchjkibddd.ikaddcllllllkn.l", +".ddkjf.h.#llmddgkfljddmlbjd.mmihcddddddddddddddddddddddddddddddddddddddddddddddddddddd.chlmllkclllll.cdicmddddhlneeddhllllllkjcl", +".ccglk#fllll.ed##.ggnchlfdch#lllidddddddddddddddddddddddddddddddddddddddddddddddddddddddcielljmllll#ceddecdife#ndddde#llllllhael", +"eiclllllllll.dd#l#mmmeel#.nkllllgdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddichllllgddcglf.llelecdjbllllllllijc#", +".d.lllllllllec.#llllll#lljc.lllllcddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddglllladdk#.cbfidmddjlllllllllligjl", +".celllllllghddcheilllllllki.#llll.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddelllllhddhcddddddddc#llllllllllh.cl", +".dmllllll#jndemfed.llllllfddalllladddddddddddddddddddddddddddddddddddddddddddddddddddddddddddhllllledmdedddddj.j#lllllllllllkajl", +"ec.llllhllebdecjcajkllllamddjllll#eddddddddddddddddddddddddddddddddddddddddddddddddddddddddddgllllfddccfkcd.alllllllllllllllk.c#", +"ec.llllmflidcmmjk#lgl#aedcdcklllllkdddddddddddddddddddddddddddddddddddddddddddddddddddddddddmlllllacdbdcianlllllllllllllllllkfj#", +"edellllndkjeg.ll.llfjdddd.dfllllll#dddddddddddddddddddddddddkddddddddddddddddddddddddddddddd#llllllfdedmdecnllllllllllllllllkdd#", +"edellllldikj#femja.dddehflajnblllllhdddddddddddddddddddddddcndddddddddddddddddddddddddddddd.lllllgljblnjcicieh#lllllllllllllkae#", +".d.llllljglb.hddcc.eeblllladdd#llll#cddddddddddddddddddddddbnddddddddddddddddddddddddddddddfllllfdie#lll#jeaehch#lllllllllllkcc#", +"ecellllllmjmddddccigllllhddhddkllllledddddddddddddddddddddcladddddddddddddddddddddddddddddillllljdd.calllllnmedfdealllllllllki.l", +"ec.llllllf.dded.kglllfiedidm.c.#llnmn.dddddddddddddddddddd.lkddddddddddddddddddddddddddddc.flllfcdcide.h#llllnjmcgemb#llllllhccl", +"...llllnjdddceblllln.edbccklgddilimllfddddddddddddddddddddcnjddddddddddddddddddddddddddddff.allckcghek.jchgllll#ij.#cehgllllhhcl", +"edclgjddddck#llllhc.dbdddmfn#ndddnllllndddddddddddddddddddfaedddddddddddddddddddddddddddilllj.kddalllncmmjd.flllllaeclei.nllkdcl", +".dd.cddd.bglllfieecjddchjd.dckcdcllllllidddddddddddddddddcknmddddddddddddddddddddddddddilllllidbjllf##.dce.cc.alllllaicnjj.hmnel", +"eddddcmnllllnmdjced.idblbhn.kcd.mblllllliddddddddddddddddkbmcddddddddddddddddddddddddd.lllllljidnllhdccmjaddmce.alllll#jcnejcmcl", +"eddcc#lll#hddhedmakhdal#mgclgcdddcnlllllliddddddddddddddd#llmddddddddddddddddddddddddmllllllid.hll#lndb#df.#bccmbdm#lllllac..ddl", +"jjb#.llnicecceifla.ec..cmjg#.j..mmcgllllllhddddddddddddddhafedddddddddddddddddddddddj#llllladi.lllamicjlch.al#kd.midjnllllfejddl", +"llll.b.dccmddm##adcbgddddcfidghkfddc#llllllbddddddddddddbfhjdddddddddddddddddddddddhllllll#dddgllllg.dcacg#m#llejecdddenllljlnjl", +"llljdddddddddddefdall.dddddddjl#dbdi#llllll#dedddddddddclllleddddddddddddddddddddcfllllllll.d.mllllllacndhllllljbladdddceifmllll", +"hmcdddehgedddddblmmlgekcfjciclg.cecnfjkllllkb#kcddddddd.hihkcdddddddddddddddddddeklllllll#l#dhdhllllllhjhillllkdbjddddd.heccalll", +"eddddck#lmddddd.hee.cffb#ikfcb.ceifddddallf.lllgmddddddnllgkdddddddddddddddddd.n#.llllllj.#ma..ehlllll#cdenllb.igcdddcdddmihechl", +"eddkdggid..hccdddbl.d#mlaagbjdi.algdmddcmlmflllll#icddcflll#ddddddddddddddddj#lllnelll#edcdilljcejllnimjkjlllc#jjddddkkdcfjcdddg", +"edcidg#ae##ledddclfcdmdghgl.endhlgedei.jdejllllllllgbedceibkddddddddddddd.bgllllllhhlncjcdjmll#.jcijcnjnm.jlleiddddddflic#lgmdd#", +"e.egj.cdckk.edddcg.ddddm.##cc.kl#eddbll.cmdkllllllllllnh.cccddddddddddmkglllllllll#dmddc#ijdhlll.kcde#adc#bnlndddddcc#g.cfllbdd#", +"e..lllmillnc#cddcajnddddcnde.blgdm.blllladcdcnlllllllllllll#fannnngg#mllllllllllllndddddmlbcmjll#mcedce#m#lmnljddd.lkcehhlllbkcg", +"ee.lllihl#jfjmndjlincfiddccdklfe.dbllllllf.cbcjllllllllllllllllllllllmllllllllllnjdddeddkhlkdjjll#.mchj#ghg#jll.ddil#c.allllbhdg", +"ei.ll#i.ne.mmi#e.lkkml#cdddkl#e.dhlllllfbllkdddfllllllllllllllllllllliflllllllgmddche#kcdn#licdhll#eicc.lidhd#lnddnlliblllllb.dg", +".cmlllih..lljidhdgmdddcdmcblgcc.dblllllcfln#ejcll#ealllllllllllllllllkilllnhflfcdil#c#lmdcfgic.djll#ek.d.cdcdjllfc#lgcelllllkhd#", +"ekalllllkdng.jil..manhd.dklfeheddj#lllidfmjf.icmabddeiaglllllllllllllheai.dd.lgddjljhjlbdemibiecdmll#ecddddcdclllhmiceflllllbjc#", +"ed.lllllkcedd.llmd#lbdcdkllchdcciimllgddcdnhcdffedddddcdcmiannglfijm.dcdd.ddcbee.c#effkbdffb.hlmcdhllled.dddddflllcdefllllllbic#", +"eamllllll.db.#ljdnlfddcalncedmmckmc#acd.cdbdaillnddddddddd.eddkljddbdcddcibmfj#lddjlenndcdig#fhddc.ill#efddjbnelllhdblllllllbmd#", +"eemlllll#eh#if.djlfeccklgeccdjajhfbcckilnddhcalliiddmfedcdddddhf.ccihbn##llmmc#lkdc#mkmdddjihicdde.dill#chdnl#dallnddallllllbmcg", +"encllllfcclkdddm#fcedkl#e.edclljm#gdc.fgjdcfc#lleeddclnddmccmjcmcfillllllllbhenlled.alliddflll#dm#cddbll#e.cj.mmll#cdc#lllllk.df", +"ej.lllfml.jmfedccdcdklgcmcddcmmgnm.cddedfae.bllaimdddl#cdiccdcali.mlllbm#lll..mllhddhlllkdeklladngbhmchllbdccch.klliddclllllbjdf", +"ecmllle.jjgllmddddce#g.ecdcdddflamnbnb#hlj.j#llecdddkmjddij..iblh.m#ejc.klllahcglgddcjfl#cgbjedc##hadc.h#maccdfkealndddjllllbmdn", +"ej.llimfl.h#ndddcdjmccdccdddd.fmklllllim.di.llgdejddkl.d.mecddalihm#ddcbjlll#cimll.d.idjnalllh.gll.gcic.caladjcibjhfcdddklllbhdf", +"cd.n.f.flidddddddklfdddklidddcbllllll#kgdcdnllkb.led.lndd#m.kialic.gcdcahllllmmcllfddkbdmm#llh#lnjdfbgj.dkllfce.cl#kdcdacallaicf", +"cid.gfcc.cddddcdklgejcchlnddi#l#fanlllladk.lllcmblgccnfcdj.d.ealiec.cdjlilljbgjknllccilainiblmkjknnhlgjcaekllf.hdbllcdml.c#lb.cf", +"eddc.dddcddcccdhlleedem.kbcfl#keddd.llleddblla.iglfccccddbndbinlhkee.ilfhlhellm..llkdell#nlj.calfikmllihm.efllnendnld.lljdmlkcdf", +"eedddddddihd.cblgcccebcedjlgmddddigcekcdddgllmcelllccfl#mdecccalhe.llla.#gddn#bi.nll.jalgg#cdcmdclnejlaelhdcbllnc..mc#llkddakfdg", +"eddccejbfaebckl#.dedmkfncijdddddd.lfc..mb.lllebnllliddflle.ejjnlijml#hkllbhejimcmilli.e#aakddddddnlih#gdk#ijcbllahicmf#ljddjaedg", +"ejel#lllgdceblleecddkhmdddddddddd.#hblnccfllieelllllmdhlljddecalimc.d.ffkenhblbdl.#lfedbeddcdcdcdeli#n#ddfl.hmnllhe#cc.mddcc.gcf", +"edmllllbcccbl#cecj.ddddddddn#hedddddmjdhell#djhllllllfcalhcdi.alh.egfnnaankkcl.cccjlljkdddddddd.cddblmaddcglhcjk#lacg.#l#n.ddccg", +"ej.lllbcmeblg.idjllfidddddcnll#.ddddddecilla..gllllllledmjjdmmalhhchkkhkbbahcbkfdjcllfe.ddddddchgkem#accdd.llijdmllamjiglllnendg", +"edmlladidflledcdemmmcddddhd.llladdddcdiegllj.illllllll.dml#ckhalidcahjj.mmmjdd#hdejfllc.dccdbfjbm#ahe#ilmddnll.ddfllbmie#lllbcdg", +"eedlhcccnl#cdcd.ddddddddalmhjlkeeceddcejllnmbnllllllllncdjlmmmalib.mlllll#enbd.jbcjellkimcddc#blheblb.ellcddnllji.blladfe#llbadf", +"cedjddealgmdemelnheddddbllgi.jcjl##cdcmnllhec#lllllllllghefjjjnlhmebhllllf#aehc#ge.efll.cdcecjhlgdinkgjbaddchll#hejbllbeh.glamdg", +"ecddddfllcidkfhllllmddbllllfble.lgjeddd#llciillllllllllllfcei.alicdajklllla.flekege.illhnc#lkdcl#c.eecm.cddd.llll.bcfllbjjcgbgcg", +"cddccglgc.dklkd..ccddgllllllllmdeededdhllbjj#llllllllllllledmenlhicacmebll#lle.hflkmc#lgc.klefckjcnahfgc#l#cdjlllljkcbllncfcecd#", +"cdddjlgeechll.dddddmglllllllll#if#jdjc#ll.emllllllllllllllfcmmnlhecjcjaalllghnllll#dhjllijehk#cbnballllhlllcdelllllje.allaeb.idg", +"eddkefcdehllgdddddilllllllllllllll#dc.llgdjklllllllllllllllmmenlhecfdmjbllllllllllle.cggkcjdknchjilllll#blkdddfllllljjcfllajcdc#", +"ee#lndddklllmdddj#llllllllllllllllhccc..ccc#lllllllllllllllmbbhfmfckii.alllllllllllfib.nbcccb.mlllllllllbcddddc#llllljbckllhdddl", +"bglneacilllncdcalllllllllllllllll#ejeffackjllllllllllllllll....iecclll#nllllllllllll..ellbj.hn#llllllllllacddddflllll#ciekfmkddl", +"lllcdddce.edddd.m.mjjjjjiiijjiijm.dekllkdddemmmjmmmm..mmm..cdcaliedhbbkabbkbbbbbbbbhccdnll.dc.m...mm.m.emmcdddce.eeeeedcdddflicl", +"lncdddd.dddcdccdedcddddkejdmm.bincddgll.ddcach.ikbbhicnjfmbeddalhddjmjn.icacndacndhdiddillkddcheacncndnef.neb.gjh.hkhb.gcddhllll", +"lajjjmmjjjjjmmj...m..mmmm...mmmjjm.jlll.ecc.c.e.mmecee.e..meeeblhddeeejc.cmcmdmdedcdedddglfe..m.mmjjmmjjj.jijiiiijiijijijmjjglll", +"lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllfnnnnnfffffffffffgffgfnllllllllllllllllllllllllllllllllllllllll", +"llllllllllfiiijkkhj.e.mjjighe.ee.ceceeee.m.e.ee.e.mme..eeeeccccceeeeeeeeeee..ee.llllllllke.mjm...mjjm..eeeccccec.hceeglfjeekllll", +"lllk.dcjalmdddddddddddddddhcddddcecdddddddddddecdcbcdddcdddddcdddddddd..cdddddddmbi..iafddbllll#llllf.ddddddd.cdckdddnbddddd.#ll", +"ll.ddddddmmddddc.cddddddddedddddiddddddddddddngn.dgjdda#cdddddddddddddgllmncdddddddddddddde..m.m.j#mddmddedddehehhdddjddddjddell", +"lhdddddddddddddcb.ddddddddbdddddcdddddddddcdjkddaddfcf.cmc.lfhdddddcddajcdjcdddddcng#feddddddddccedddcjdbjdddde.l.ddddddddddddhl", +"gdddddddddddddddddddddddddfeddddj.ddddcddddddddckddik#cd.e.ammdddddjddddddeddddddmhdnjnedciddcmdddddddd.nceddddclahdddddddddddml", +"hddddddddddddddddddegcbdddekddd.addddcajdddddddcmdddfhddddejdddddddccdddddddddddddddbddcdcedcddddddddddcdhedddddae.dddddddddddcl", +"iddddddddddddddbddddmdeddddccdikdddddehmdddddddccddd.dc.dd.lakdddddd.ddddddddddddddcbdddddcfccjicddddddcbmddbkddj.ddddddddddddcl", +"nddddddddddddddmdddddmdddddddeiddcddddcb...ddddjmiddddchdd.bijddddddneddddc.c.ddddeahddddddmbghd.jddcddccjmahddddcdddkddddddddjl", +"l.dddddddddddddddddddddddddddcddddddddddjicenddiieddddcbddm.ddddddddjedddddcikddddddddddddddfcdalmdeadddddnidddddddddf.ddddddc#l", +"lfdddddddhjdddddddddddcngj.ddddedddddddddddccdddcdddddcaddjeddddddddddddddddddddddddddddgjdddd.bmedddddddddddddddddddf#edddde#ll", +"lgjddddddhccccee..mmminllllfhjnlfmmmjeddd.cdedddd..mmjhl#gl#gnkdddhffffnijmjihi.edddddddjbcmiijji#ahbkkkkbbbkhjjmjmmcdcddddddehl", +".dddddddddc#lllllllllllllllllllllllllbddclkcldid.lllllllllllllmdddmllllllllllllllcddddddedhlllllllllllllllllllllllllidddddddddjl", +"eddmddddddellllllllllllllllllllllllllkdddbgei.hd.llllllllllllidddddmlllllllllllledddddddcdkllllllllllllllllllllllllljdddddddddil", +"edd.ddddddellllllllllllllllllllllllllkdccddddmkdmlllllllllllidddddddhlllllllllllddddddddddbllllllllllllllllllllllllliddeddddddbl", +".dddddddddellllllllllllllllllllllllllmd.gmdcdkndhllllllllll.dddddddddklllllllllidddddddddeglllllllllllllllllllllllllhddgeddeedhl", +".ddddddddd.lllllllllllllllllllllllll#dddccdcddcdbllllllll#mdddddddd.jd.llllllll.dddddddddcillllllllllllllllllllllllljddgfkcaadjl", +"mddddde.dd.lllllllllllllllllllllllllbdddcdddddddgllllllllmdcdcddejalhddglllllllhddddddddddc#lllllllllllllllllllllllljddackllbdml", +"mdddddcedd.lllllllllllllllllllllllllhdddcdddddddgllllllledddddddiaheddcgllllllladddddddddddblllllllllllllllllllllllljddhddhfcdml", +".dddcmcdddelllllllllllllllllllllllll.ddd.ddddddd#llllllmdddddn.dddddddellllllllgdddddddddddillllllllllllllllllllllllmddbcddddd.l", +"edddc#kcddelllllllllllllllllllllllllcdddcddddddjlllllljddddddgmdddddddckm.alllllcddddddcdccellllllllllllllllllllllll.ddkcdcdddml", +"eddddicdddcllllllllllllllllllllllllkdddddddddddglllllmdddddddadddddddddddddbllllmdddcdchdejdlllllllllllllllllllllllljdd.ddddddjl", +"edddddedddcllllllllllllllllllllllllcddddddddjdelllllmddddddddedddddcddddddddklllfddddddmddkdblllllllllllllllllllllllmdddddddddil", +".dddddddddc#llllllllllllllllllllllfddddddddcjdillllmdddddddddddddddddddddddddfllledddddimdadcllllllllllllllllllllllljdddddddddhl", +"menanijjedcgllllllllllllllllllllllmdddddddddddflll#cdddcddddddddddddddddddddddnllidddddindkddbllllllllllllllllllllllidddddddddbl", +"mmbeeedccddklllllllllllllllllllllkdddddj##iddell#.h.dd.bdddfjdddddddddddddddddcnllcdddjm.dcddc#lllllllllllllllllllllidmb.kcdddnl", +"jmmcdddddddbllllllllllllllllllllgcddddcbcjfaebl#mdddddeadddcdddddddejdddddddddddfladdjmeddddddilllllllllllllllllllllbdc#jlcdcall", +".jmddddddddblllllllllllllllllll#cddddd.cdddefllcdddddddfddddddddddda#ddddddddddddfldd.ddddddddd#llllllllllllllllllllhddac#dddfll", +".hcdddeddddhlllllllllllllllllll.ddddddddddddb#mddddddddkbdddddddddi#kidddddddddddiladdeddddddddcnlllllllllllllllllllbddedidddcbl", +"jhdddeedddcglllllllllllllllllljddddddddddddel.dddddddddblhcddddddcn.djeddddddddddg#g.ddddddddcddmlllllllllllllllllllbddddddddd.l", +"imdddkddddilllllllllllllllllljdddddddddddddheddddddddd.#j#lhcddddmcdddddddddcddddddddddddddddddddklllllllllllllllllladddddddddel", +"idddcbddddcllllllllllllllllljdddckiddddddddcddddddddddhndcancdddddddddddddddfjddddddddddddddddddddnlllllllllllllllll#ecddddddd.l", +"hddddcdddddallllllllllllll#.dddddcncdddhddddddddddddddbkddfdddddddddddddddd.gddddddddddddddddcmcdddbllllllllllllllll#.ddddddddel", +"kddddddddddflllllllllllllgddddddddbddddiddddddddddddddbmd.addddddddddddddddj.ddddddddddddddddekdddddalllllllllllllllkdddddddkdel", +"amjhkkkbbieallllllllllllhcdddddddmbdddedcbdddddc.cddddk.djjddddddddddddddddddddddddddddddddddecddddch.blllllllllllllkdcdddddcdel", +"amka##lahk.kllllllllllf.dddddddddbh.jiddmgddddj#l#mdddh.d..ddddddddddddddddddddddddddddddddddcembddddddekgllllllllllhddiedddddcl", +"nddjkda.dddbllllllllljdddcddmiddddmjddddd.dddmllllljddm.de.ddddddddddddddddddddddddddddddddd.gmehdddddddddefllllllllhddfkdddddcl", +"nddedddcdddhllgnfnj.edddddenfhdcdddddddddddddalllllgddddddeddddddddddddddddddddddddddddddiabmcddcdddddddddddcma#llllkdddddddddel", +"fdddcdddddddccddddddcdddd.fmckdddddddddddddddflllllledddddddddddddddddddddddddddddcddddd.#mddddddddddddcdddddddddmhkedddddddddel", +"nddddddddddddddddddcccddddddeadddddddddddddddhlllllleddddddddddmddddddddddddddddddhdddddbcdddddddddedkllbdddddddddddddddbfglllll", +"ndddddddddddcdddddddddddddcbngcddddddddddddddc#lllladddddddddddbdddddddddddddddmddimddddaddekdddjddkiacenmddd.iddddddddda#eeecml", +"nddddddddddddddddddcmdddddcmdkmdddddddddddddedilllg.ddddddddddcgdddddddddddddddndd.l.dddeddj.ddddddhlcddddd.nf.dddddddddckbcddel", +"fdddddemddddddddddddddddddddddadddddddddddcnlmdeecddddddddddddel.ddddddddddcddc#ddcl#edddddddddddddd.jddddd#mdddddddddddddigdd.l", +"ndddddddddddddddddddddhcddddddmcdddddddddd.llkddddddddddddddddelidddddddddddddc#.efamddddddddddddddddddddddddddcmdddddddcddbidel", +"fddi.ddddddddddddddddegmdddcmacdddddddddddcfl.ddddddddddddddddmlbddddddddddddddgffiddddddddddddddddddddddddddddjkdddddddbmdjgdel", +"ledddddddcdddddddddddjcdddc##ddddddddddddcddddddddddddddddddddjladdddddddddddddhncdddddddddddddddddjjddacddddddceddddddddddmgdel", +"lkddddmddddddddddcdddddchfl#.dddddddddddkgddddddddddddddddddddilfdddddddddddddddddddddddddddmjdddddcffalcddddddddmhjdddjdddmnd.l", +"#dddddhdddddddjdefedcei#lllhdddddddddddd.mddddddcdddddddddddddhlgdddddeaddddddddddddddddddddbiddddddc#llgiecdddddeibeddnmddn.del", +"ljddddddddddcilmnlf#lllllll#.dddddddddddddddddddnjddddddddddddkl#dddddcledddddddddddddddddddnnddddddddglllllficcdddddddd#inbddcl", +"laddcmdddddhlllllllllllllkc.aeddddddddcddddddddde#bdddddddddddkl#dddddclmddddddddddddddddddda#ddddddddmlllllllll#fnkmddd.bjddd.l", +"gdddkddddddklllllllllllljdddeiddddddddc.dddddddddmlkdddddddde.nlleddddclmdddchhdddddddddddddhlidddddddd.#llllllllllladdddcebnd.l", +"fdddjddddddklllllllllll.dddddddddddddddicdddddddddnlfddddci#llllllgkcdml.dd.##cdddddddddddddelleddddddddclllllllllllnddde#lllccl", +"gdddjidddddblllllllll#jddddddddddddddde.ddddddddddc#lg.ca#lllllllllllnffdca##edddddddddddicddabdddddddddd.#llllllllladddddehmdel", +"#dcddhcddddallllllll#.ddddddddddddddddbddddddddddddjllfflllllllllllllllgmflljcddddddddddel.dddddddddddddddelllllllllbdci.cieddcl", +"#dddddaddddhlllllll#dddddddddddddddddmddddddddddddddhllllllllllllllllllllllhdddddddddddd.icdddddddddddddddde#llllllladddddddddd#", +"#hkkecfkdddkllllll#.dddddddddddddddddbddddedddddddddelllllllllllllllllllllkcddddieddddddddddddddddddddcddddde#lllllladdddddddddg", +"#.eecddddddallllll.ddddddddddddddddddedcddmdddddddddhllllllllllllllllllll#cddddc#iddddddddddddddddddddhmddddif#lllllfcddddecddd#", +"nddddddddddnlllllmcdcdddddddddddddddddddddcddddddddclllllllllllllllllllllladdddddd.edddddd..dddddddddedc.ddkhdcglllllfdddcl#hdd#", +"ndddddddcddflll##fdddddddddddddddddddddddddddddddddblllllllllllllllllllllllmddddddbcddddddcdddddddddddddeiihdddegllllbddddamcddl", +"gddddddddddfll#e.ndddddddddddddddddddddddddddddddddgllllllllllllllllllllllladddddddddddddddddddddddddddddigdddddelllkddddc.addc#", +"#cdddddddddflndcddddddddddddddddddddddddddddddddddd#lllllllllllllllllllllll#cdddddddddddddddddddddddddnddacdddddde#lbdcdilgldddg", +"lcdaedeicddfbcdddddddddddddddddddddddddddddddddcejbllllllllllllllllllllllllledddddddddddddddddddddddddnddidddddddd.#hcndn..edddl", +"#ddedddedddmdddddddddddddddddddddddddddddde.iaf#llllllllllllllllllllllllllllkecccdddddddddddddddddddddkddddddddddddeec.cmdddddbl", +"#cdd.dddddddddddddddddddddddddddddddddddcklllllllllllllllllllllllllllllllllllllllgniedddddddddddddddddddddddddddddddddddddmacdml", +"#cddcdmmdddajddddddddddddddddddcddddddddddccc.mihkblllllllllllllllllllllllllll#g#akmcddddddddddddddddddddddddddddddddddijdelmdel", +"lmdddddkdddnlmddddddddddddddddhiddddddddddddddddddd#llllllllllllllllllllllllkedddddddddddddddddddddddddddddddddddddheddnfddnedel", +"nddddddceddnlljddddddddcddddddgiddddddddddddddddddd#llllllllllllllllllllllllcdedddddddddddddcdddddddddddddddddddddhledddn.diedel", +"bddddddddddflll.ddddddccdddddd#ndddddddddddddddddddnlllllllllllllllllllllllfdddddddddddddddeleddcddddddddddddddddkllbcddceddddcl", +"kdddddddddc#lll#edddddidddddddll.ddddddddddddddddddilllllllllllllllllllllllidddddddddddddddc.dddhbjdddddddddddddjllllkddddddddcl", +"hddddddddddgllll#cdddaiddddddd#l#cddddddddddddddddddbllllllllllllllllllllllcdddddddddddddddddddddcbddddddddddddkllllnddddddddddg", +"hddddcde.dc#lllll#.dibddddddddhlleddddddddceddddddddc#llllllllllllllllllllmddddddddddddddddddddddcedddddddddehblllllhdeacdddced#", +"hddddcd.hdc#llllll#aledddddddddagcddddddcb#l#bcddddddmllllllllllllllllllladdddddddddddddddddddddd.cddddddddddglllllljdmlhdddc.dl", +"hdddcdddddclllllllllmddddddddddddddddddddccenlfdddddclllllllllllllllllllliddddddddddddddddddddddehddddddddddillllllljddccddddmd#", +"bdddi.ddddd#llllllllgcdddddddddddddddddddddddb#dddddjllglllllllllllllllll#ddddddddddcdddddddeddcedcedddddddkllllllllidddddddcidg", +"hddddccdddd#lllllllllncddddddddddddddddddddddc#dddde#lnccallllllllllllafllkdddddddddmdddddddeddddddecdddddmlllllllllbdddddccmkd#", +"iddddeedddd#llllllllll#cddddddddddddddddddddddaddddflnddddbf#lllllllhcddbllmddddddddddddddddmdddddddjdddchllllllllllidddddj#lid#", +"idddd.fmeiallllllllllll#edcdddddddddddddddddddcdddhladddd.gddelll..cddddcklfdddddddddddddddddddddddddmdcglllllllllllcdddcdddmjd#", +"iddddccdddclllllllllllllfcdddddddddddddddddddddddelbdddddbndddglgdddddddddhlhddddddddddddddddddddddddkimlllllllllllleddddddd.icl", +"iddddmddddd#lllllllllllllgddddddddddd.dddddddddddbhdddddd#jdddalfdddddddddd.fddddddddcddddddddddddddddglllllllllllll.dddmddd.id#", +"jddd.cdddddchaa#llllllllllfeddccddddd.fjcdddddddmkddddddifcdddklbdddddddddddcmdddddd.cdddddddddddddddallllllllllllll.dddkdddc.d#", +"mdddddddddddddddc.ag#llllllljcncddddddcgfieeedddddddcjm.#kddddklidddddddddddddddddddcdddddddddddddddhlllllllllllllll.e..ndddddcl", +"iddddcdddddddddddddddeifllllll.ddddddddddmb#gcddddddekgllleddd.l.ddddddddddddddddddddddecddddddddddnllllllllllnhjmc.#lll#dddddd#", +".dddddcd.cdddcfcddddddddciflll.ddddddddddddddddddddddddbl#kddde#cddddddddddddddddddddddbeddddddd..fllllll#ajedddddddceceeddddcml", +".dddmdde#eddddcjddddddddddd.nlkdddddddddddddddddddddccc#bcidddc#cddddddddddddddddddddddiddddddddnlllll#amcddddddddddddddddddefg#", +"jdddccdddddddddddddddddddddddcgndddddddddddddddddddmgmll.ddddddaddddddddddddddddddddddneddddddddalllacdddddddd.njdddddddcmdddddf", +"bimm.ecddddddcddddddddddddddcddmcdddddddddcddddddddmbdcb#cdddddcdddddmaddddddddddddddc.ddddddddi#fjedddecdddefhedddddddddedi.ddn", +"fll#llkddddddddddddddddddddcfddddddddddddjfcdddddddejdddkjdddddddddddalicdddddddddddejdddddddddf.dddddhiddddm#ccddddd.iddcdddddb", +"jjkcddddddddddddddddddddddd.adddddddddddbljddddddddddddddddddddddddddnllidddddddddddeddddddddddddddddddddddddl#jddddd.idjfddddda", +"icncddddddddddddddddddddhedccddddddddddd.ncddddddddddddddddddddddddddd.hcddddddddddddddddddddddddddidddddddddmedddddd.kdddddccda", +"hddjddddddddddddddddddddniddddddddb.ddddddddddciddddddddddddddddddddddddddddddddddcdddddddddddddddmbddddddjcdcddddddddcddddcacdf", +"kddcddddddd.m.dddddddddddcdddddddd.lmdddddddddkfdddddddddddddddddddddddddddddddddddddddddddddddddddddddddil.daedddddddddckg#cddg", +"hddddddmhkflll#gnbjedddddddddddddmd..dddddddddkkddddddddddddddddddddddddddddddddddddddddddddddddddddddddmgacdcdb.mjjcddde#nedddg", +"bddddddddd.lllllllllbeddddd.dddddjddddddddddddkmdddddddcdddddddddddddddddddddddddddddddddddddjmiddddddddecddcjallllledddddcdddda", +"hdddddadddelllllllllll#hcddcddddddddddddddddddi.ddddddel.ddddddddddddddddddddddddddddddddddddcckhddddddddck#lllllllleddddddddddb", +"hddmingdddelllllllllllll#hidddh.deddddddddddddemdddddddjddddddddddddddddddddddddddddddddddddddddbddmddcjnllllllllllleddddddddddn", +"kdddddkdddelllllllllllllllndddenemddddddddddddddddddddddddddddddddddddddddcdddddddddddddddddddddkddddefllllllllllllleddddddddddg", +"hdddddddddcllllllllllllllllkddddddddddddddemddddddddddddddddddddddddddddddcfjdddddddddddddddcddiiddcalllllllllllllllcdddddce.ddf", +"bdddddddddclllllllllllllllllnddddddddcm.ddcg.dddddddddddddddddciddddddddddflnddddddddddddddddddhad.glllllllllllllllleda#kbf.dddf", +"ndddddddd.illlllllllllllllllladddddddj#mdddhledddddddddddcdddegmddddddddddn#hddddd.mddddddddddddab#lllllllllllllllllcdegdckdccdg", +"gdddcdaddiklllllllllllllllllllkdddddcachdddclledddccdddddaddb#eddddddddddddcdddddh#cddddddddddddmllllllllllllllllllliddamdicdidg", +"#mddddbdddmlllllllllllllllllllljdddd.edncdddmlfdddhjdddddgngn.ddddddddddddcdddddjlhddddddddcdddcflllllllllllllllllllgcdchdccdcdf", +"#eddddhcdd.llllllllllllllllllll#.ddddddnkddddglfcdgadddddgacdddddddddddddelhdddml#ddddddmcdddddfllllllllllllllllllllljddeddddddf", +"fddddddcddellllllllllllllllllllllmdcdddjlcdddhllgklbdddddbcddddddddddddddj#cddilliddddddciddddjllllllllllllllllllllllfddddddcddn", +"fdddmihcdd.llllllllllllllllllllllfcdddddiddddelllllmdddddhmdddddeddddddddccddm#lledddddddddddmllllllllllllllllllllllmcdddddddddn", +"gdddkaniddelllllllllllllllllllllllhddddddcddddallllcdddddmndddcaidddddddddddelllfddddddddddddfllllllllllllllllllllllcdddcdehddda", +"fdddbcddddmlllllllllllllllllllllllgdddddddcbdd.llllfddddddfdd.lmddddddddccdmlllljdddddddddddhlllllllllllllllllllllllcddddddaddda", +"nddcadddddjlllllllllllllllllllllllliddddddekddclllllndddddmhdcmddddddcddddm#llllcddddddddddcllllllllllllllllllllllllcdddaedidddn", +"nddd.mdddklllllllllllllllllllllllll#cddddddddddflllllncddddgedddddddmmddd.lllllfdddddjcddddhllllllllllllllllllllllllcdddeddddddn", +"fddddmdddelllllllllllllllllllllllllljdddddccdddhllllllndcdddacddddddn.ddhllllllfdddddeddddclllllllllllllllllllllllllcdddddddddda", +"gddddcddddfllllllllllllllllllllllllladddddfbdddcllllllladddd.ncdjddd#idilllllllkddddddddddillllllllllllllllllllllllleddddddddddn", +"gdddddddddhlllllllllllllllllllllllll#cddddmgdddd#llllllladdddjlj#dddjlfllllllllnccddddddddnlllllllllllllllllllllllllcdddddddddda", +"fdddddddddmllllllllllllllllllllllllll.ddeddbjccdflllllllladdddm#gddddglllllllllmcddddddddclllllllllllllllllllllllllleddheddddddn", +"fdddicccdc.llllllllllllllllllllllllllhddddde#eddnlllllllllhddddemddcflllllllllbddddddddddellllllllllllllllllllllllllcddkghedddda", +"fdddajdeddclllllllllllllllllllllllllladcddcdmbddblllllllllledddddddflllllllllliddddddddddjlllllllllllllllllllllllllledddcjeddddn", +"adddanddddellllllllllllllllllllllllllfdeedekgfedilllllllllll.dddddfllllllllllljdddddddddd#lllllllllllllllllllllllllledddddddddda", +"bdcdj.ddddcllllllllllllllllllllllllllfddddddcdddmlllllllllllgeddcallllllllllllmddddddddddkllllllllllllllllllllllllll.ddddddddddf", +"kdddddddddcllllllllllllllllllllllllllfdddddddddd.llllllllllllgddkllllllllllllleddddddddddalllllllllllllllllllllllllleddddddddddf", +"gihedddddmccejmmjihbannbaakbkbnffggffidd.cddddddmlnnffffnbknab.cbffg##l###lll#cddddddddddm#llll#fnngllllijhkbkhjm.ecdijddddd.bbl", +"llgedddddnhdddddddddddddddddddddddddddddm.ddddddemdddddddddddddddddddccdccccecdddddddddddddc.lgeddddddciddddddddddddd#bdddddenll", +"l#cdddddddjddddcccddddcdddddeddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddneddddddddncddddddddddddhddddddddnl", +"lhddddddddddd.lnmcddddddddd.#cddddddddddddcddjadddddddddddddddddddddddddddddddd..ddddddddddddddddcdddbngddddacceedddddddddddddml", +"lcddddddddddd.l.dddddddj.dd.#ddddddddddddddd.fikijddddjiddddddddddddddddddddddcfjddddddddddddddddcdddemfddmdikddddddddddddddddd#", +"lddddddddddddcleddddddclaccj#dddddddddcddddcledddaddddddfjdddddkedddddd.cdddddd.idddddddcddddddddddddd.ndd.kdiedddddddddddddddc#", +"leddddddddddddjmddcdddelgbbbhddddddmaniddddbnaeddjdddddddcddddeladddddcndddcddjljdddddmnadddddefgeddddendddkicadceedddddddddddel", +"liddddddddddddd.ddcbacckddddddddddei.dddddddc#jdcjdcdddddddcdd.l#cdddeee.ddcddh#hdddddeeiddcddddddddddcinmdc.dn.h#.ddcddddddddhl", +"l#ddddddddmdddddddddcdddddddddddiddddddddddefbddddddddddchghddc#lbddddifndddddddcdddddddidddjjddddddddddddddddab.hcddadddddddd#l", +"ll#.dddddffddddddddddddddddddjdcl.ddddddddddcddddddddddddccdddddccdddddcabddddddddddddddhddddcddddccdddddddcdddddcdddg#.ddddegll", +"llllfkik#l#.cddddddddceccjkem#..fg.ceeccccddccdccccddddddcceeee..m.ecccem#eecceeccccdddcbccccccdcdaicceeccccccccedddd#llgaafllll", +"lllllllllllllgfg#gllllll#lllllllllllllll#l##l###lllgfgf##llllllllllllllllllllllllllll##ll#llll####lllllllllllllllabnalllllllllll" +}; diff --git a/pixmaps/m-axp.xpm b/pixmaps/m-axp.xpm new file mode 100644 index 00000000..09f089c7 --- /dev/null +++ b/pixmaps/m-axp.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c #bb0000", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" OO OOOOOO OOOOOOOOO+++++++++++++++++++++++XXXXoo ", +" OO OO OO OOOO OOOO OOOOOO+++++++++++++++++++++++XXXooo ", +" OOO OOO OOOOOOO OO.XOO+@@+@++@+@@@@++@+++++++XXXooo ", +" OOO OOO OOOOO OO.XOO+++++++++++++++++++++++XXXoooo ", +" OOO OO OOO OOOOOO+@@@@+@@+@@@+++++++++++XXXoooo ", +" OOO OO OOOOO OOOOO++++++++++++++++++++++++XXXooooo ", +" OOO OOO OOOOOOO OO.XX++@@@@@@@@@@+@@@@@++++++XXXooooo ", +" OO OO OO OOOO OOOO OO.XX++++++++++++++++++++++++XXXooooo ", +" OOO O OOOO OOOOOO.XX++@@@+@@@@+@@++@@@++++++XXXooooo ", +" OOOOOO .XX++++++++++++++++++++++++XXXooooo ", +" OOO .XX++@+++++++++++++++++++++XXXooooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@@@@+@+@@@+@++++++++++XXXooooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@+@@@@++++++++++++++++XXXooooo ", +" .XXX++++++++++++++++++++++XXXXoooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" ooooooooooooooooooooooooo...oo ", +" ..........................ooo ", +" oooooooooooooooooooooooooooooo ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-blank.xpm b/pixmaps/m-blank.xpm new file mode 100644 index 00000000..3e025ea4 --- /dev/null +++ b/pixmaps/m-blank.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c red", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" .XX+++++++++++++++++++++++XXXXoo ", +" .XX++++++++++++++++++++++++XXXooo ", +" .XX++@@+@++@+@@@@++@+++++++XXXooo ", +" .XX++++++++++++++++++++++++XXXoooo ", +" .XX++@@@@+@@+@@@+++++++++++XXXoooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@@@@@@@@@@+@@@@@++++++XXXooooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@@@+@@@@+@@++@@@++++++XXXooooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@+++++++++++++++++++++XXXooooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@@@@+@+@@@+@++++++++++XXXooooo ", +" .XX++++++++++++++++++++++++XXXooooo ", +" .XX++@+@@@@++++++++++++++++XXXooooo ", +" .XXX++++++++++++++++++++++XXXXoooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" ooooooooooooooooooooooooo...oo ", +" ..........................ooo ", +" oooooooooooooooooooooooooooooo ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-bsd.xpm b/pixmaps/m-bsd.xpm new file mode 100644 index 00000000..d51cf703 --- /dev/null +++ b/pixmaps/m-bsd.xpm @@ -0,0 +1,62 @@ +/* XPM */ +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All Rights Reserved. Reproduced with permission. + */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 9 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"- c gray10", +"O c red", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" OO ", +" OO ........................... ", +" O OOO.XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" OO OOOOOO OOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" OO OOOOOOOO OXX+++++++++++++++++++++++XXXXoo ", +" OOO OOOOOOOO OO.XX++++++++++++++++++++++++XXXooo ", +" OOOO OOOO OO O O.XX++@@+@++@+@@@@++@+++++++XXXooo ", +" OOOOOOO O OO O.XX++++++++++++++++++++++++XXXoooo ", +" OOOOOOO OO OOXX++@@@@+@@+@@@+++++++++++XXXoooo ", +" OOOOO OOOOOOXX++++++++++++++++++++++++XXXooooo ", +" OOOOOOOO OOOOX++@@@@@@@@@@+@@@@@++++++XXXooooo ", +" OOOOOOO OOOOX++++++++++++++++++++++++XXXooooo ", +" OOOOOOOOOO OOX+-@@@+@@@@+@@++@@@++++++XXXooooo ", +" OOOOO OOO OOXX--+--+++++++++++++++++++XXXooooo ", +" OOOOO OOOXX----++++++++++++++++++++XXXooooo ", +" OOOOOOOO .XX---++-++++++++++++++++++XXXooooo ", +" OOOOOO .XX------+@+@@@+@++++++++++XXXooooo ", +" O O OO OO-++++++++++++++++++++++++XXXooooo ", +" OOOOOO OOOO++@+@@@@++++++++++++++++XXXooooo ", +" OOOOO O-OOOX++++++++++++++++++++++XXXXoooo ", +" OOO O- OOXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOOOO-O .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOOO-OO ooooooooooooooooooooooooo...oo ", +" OOOOOO O ..........................ooo ", +" OO OO oooooooooooooooooooooooooooooo ", +" OOOO OOOOO oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" OOOOO OOOOO oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" OOOOOOOOOOOOOOO oooooooooooooooooooooooooooXXXooo . ", +" OOOOOO OOOOO OOOOXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" OOO OOOOO OOOOOOXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" OO OOOOOO OOOOOOO@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" O OO OOOOOOO OOOOOXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" OOOO OOOOOOO OOO@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" OOOXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-dec.xpm b/pixmaps/m-dec.xpm new file mode 100644 index 00000000..40dd35d9 --- /dev/null +++ b/pixmaps/m-dec.xpm @@ -0,0 +1,57 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 9 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"- c #a00000", +"O c white", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" .XX+++++++++++++++++++++++XXXXoo ", +" .XX++++++++++++++++++++++++XXXooo ", +"-----------------------------------@+@@@@++@+++++++XXXooo ", +"----OO-OO--------OO---O---------OO-++++++++++++++++XXXoooo ", +"----OO-OO--------OO--OO---------OO-@+@@@+++++++++++XXXoooo ", +"----OO---------------OO---------OO-++++++++++++++++XXXooooo ", +"-OOOOO-OO--OOO-O-OO-OOOO-XOOO-O-OO-@@@@+@@@@@++++++XXXooooo ", +"OOOOOO-OO-OOOOOO-OO-OOOO-OOOOOO-OO-++++++++++++++++XXXooooo ", +"OO--OO-OO-OO--OO-OO--OO--OO--OO-OO-@@+@@++@@@++++++XXXooooo ", +"OO--OO-OO-OO--OO-OO--OO--OO--OO-OO-++++++++++++++++XXXooooo ", +"OO--OO-OO-OO--OO-OO--OO--OO--OO-OO-++++++++++++++++XXXooooo ", +"OO--OO-OO-OOOOOO-OO--OOO-OOOOOO-OO-++++++++++++++++XXXooooo ", +"-OOOOO-OO--OOOOO-OO---OO-XOOOOO-OO-+@@@+@++++++++++XXXooooo ", +"--------------OO-------------------++++++++++++++++XXXooooo ", +"----------OOOOOO-------------------++++++++++++++++XXXooooo ", +"-----------OOOO--------------------+++++++++++++++XXXXoooo ", +"-----------------------------------XXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" ooooooooooooooooooooooooo...oo ", +" ..........................ooo ", +" oooooooooooooooooooooooooooooo ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-hp.xpm b/pixmaps/m-hp.xpm new file mode 100644 index 00000000..113a4777 --- /dev/null +++ b/pixmaps/m-hp.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c red", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" OOOOO O OOOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" OOOOO O OOOOOOX+++++++++++++++++++++++XXXXoo ", +" OOOOOO O OOOOOO++++++++++++++++++++++++XXXooo ", +" OOOOO O OOOOO++@@+@++@+@@@@++@+++++++XXXooo ", +" OOOO OO OOOO++++++++++++++++++++++++XXXoooo ", +" OOOO O OOOO++@@@@+@@+@@@+++++++++++XXXoooo ", +" OOOO O OOOO++++++++++++++++++++++++XXXooooo ", +" OOOO OO OO OOOO++@@@@@@@@@@+@@@@@++++++XXXooooo ", +" OOO OOO OOO OOO++++++++++++++++++++++++XXXooooo ", +" OOO OOO O O OOO++@@@+@@@@+@@++@@@++++++XXXooooo ", +" OOO O O O O OOO++++++++++++++++++++++++XXXooooo ", +" OOO O O O O OOO++@+++++++++++++++++++++XXXooooo ", +" OOO O O O O OOO++++++++++++++++++++++++XXXooooo ", +" OOOO O O OOO OOOO++@@@@+@+@@@+@++++++++++XXXooooo ", +" OOOO OO OOOO++++++++++++++++++++++++XXXooooo ", +" OOOO O OOOO++@+@@@@++++++++++++++++XXXooooo ", +" OOOO O OOOOX++++++++++++++++++++++XXXXoooo ", +" OOOOO OO OOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOOOOO O OOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOOOOO O OOOOOO ooooooooooooooooooooooooo...oo ", +" OOOOOO O OOOOOO ..........................ooo ", +" oooooooooooooooooooooooooooooo ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-ibm.xpm b/pixmaps/m-ibm.xpm new file mode 100644 index 00000000..8b8ace18 --- /dev/null +++ b/pixmaps/m-ibm.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca 1992 **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c blue", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" .XX+++++++++++++++++++++++XXXXoo ", +" .XX++++++++++++++++++++++++XXXooo ", +" .XX++@@+@++@+@@@@++@+++++++XXXooo ", +" OOOOOOO OOOOOOOO OOOOXX+++OOOO+++++++++++++++++XXXoooo ", +" XX++@ @@+@@@+++++++++++XXXoooo ", +" OOOOOOO OOOOOOOO OOOOXX+++OOOO+++++++++++++++++XXXooooo ", +" XX++@ @@@@@+@@@@@++++++XXXooooo ", +" OOO OO OO OOOXX+++OOO++++++++++++++++++XXXooooo ", +" X++ @@@@+@@++@@@++++++XXXooooo ", +" OOO OOOOOOO OOOOX++OOOO++++++++++++++++++XXXooooo ", +" + ++++++++++++++++++XXXooooo ", +" OOO OOOOOOO OO.OO+OO+OO++++++++++++++++++XXXooooo ", +" @ +@+@@@+@++++++++++XXXooooo ", +" OOO OO OO OO.XOOO++OO++++++++++++++++++XXXooooo ", +" .X @+ @++++++++++++++++XXXooooo ", +" OOOOOOO OOOOOOOO OOO.XXO+++OOO++++++++++++++++XXXXoooo ", +" .XX XXX XXXXXXXXXXXXXXXXXXXXooo ", +" OOOOOOO OOOOOOOO OOO .XXXXXOOOXXXXXXXXXXXXXXXXXXXooo ", +" ooooooooooooooooooooooooo...oo ", +" ..........................ooo ", +" oooooooooooooooooooooooooooooo ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-linux.xpm b/pixmaps/m-linux.xpm new file mode 100644 index 00000000..dee19d63 --- /dev/null +++ b/pixmaps/m-linux.xpm @@ -0,0 +1,181 @@ +/* XPM */ +/* Linux Penguin from logo.gif and logo.txt /usr/src/linux/Documentation +This is the full-colour version of the currenly unofficial Linux logo +("currently unofficial" just means that there has been no paperwork and +that I haven't really announced it yet). It was created by Larry Ewing, +and is freely usable as long as you acknowledge Larry as the original +artist. + +Note that there are black-and-white versions of this available that +scale down to smaller sizes and are better for letterheads or whatever +you want to use it for: for the full range of logos take a look at +Larry's web-page: + + http://www.isc.tamu.edu/~lewing/linux/ + */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char *image_name[] = { +/* width height num_colors chars_per_pixel */ +" 64 38 117 2", +/* colors */ +".. c #000000", +"#X c #f0f0f0", +".# c #b3b3b3", +".a c #d9d9d9", +".b c #7f7f7f", +".c c #556b2f", +".d c #ffffff", +".e c #000000", +".f c #f8f8f8", +".g c #f0c814", +".h c #503800", +".i c #eccc38", +".j c #d09010", +".k c #805800", +".l c #f8c838", +".m c #f0cc20", +".n c #a87c1c", +".o c #e4cc20", +".p c #a4803c", +".q c #e8b010", +".r c #606060", +".s c #c08010", +".t c #a8a8a8", +".u c #685030", +".v c #a0a0a0", +".w c #583800", +".x c #585858", +".y c #707070", +".z c #e0c808", +".A c #888888", +".B c #484848", +".C c #a07008", +".D c #f8cc14", +".E c #e8a810", +".F c #986800", +".G c #606068", +".H c #704800", +".I c #b0b0b0", +".J c #f4d028", +".K c #707078", +".L c #404040", +".M c #704808", +".N c #906000", +".O c #e8b808", +".P c #c08008", +".Q c #e0b008", +".R c #986808", +".S c #383838", +".T c #e8a800", +".U c #e8a808", +".V c #505050", +".W c #989898", +".X c #303030", +".Y c #808080", +".Z c #a8a8b0", +".0 c #c88c10", +".1 c #d09810", +".2 c #282828", +".3 c #906008", +".4 c #885808", +".5 c #a87000", +".6 c #181818", +".7 c #c08800", +".8 c #e0d08c", +".9 c #e8e8e8", +"#. c #a06808", +"## c #d8d8d8", +"#a c #a87008", +"#b c #a06008", +"#c c #f0d008", +"#d c #d89810", +"#e c #b08004", +"#f c #c89008", +"#g c #e0e0e0", +"#h c #101010", +"#i c #d89010", +"#j c #402800", +"#k c #a0a0ac", +"#l c #d09800", +"#m c #b88008", +"#n c #986008", +"#o c #d09808", +"#p c #202020", +"#q c #080004", +"#r c #b07004", +"#s c #c08808", +"#t c #d0d0d0", +"#u c #f0f0e8", +"#v c #b07808", +"#w c #080808", +"#x c #c4a474", +"#y c #d8a000", +"#z c #d8a008", +"#A c #c0c0c0", +"#B c #f8cc08", +"#C c #d09008", +"#D c #bc8c3c", +"#E c #c88808", +"#F c #e0a008", +"#G c #e8b008", +"#H c #e0a808", +"#I c #d89808", +"#J c #f0b010", +"#K c #2c2404", +"#L c #b8b8b8", +"#M c #f0b808", +"#N c #f0c008", +"#O c #b87808", +"#P c #e8c008", +"#Q c #c8c8c8", +"#R c #947404", +"#S c #f8a808", +"#T c #f0b810", +"#U c #f8b810", +"#V c #c0c0e0", +"#W c #f8c008", +"#Y c #404040", +/* pixels */ +"............................#Y#Y#Y#Y#Y#Y#Y#Y....................................................................................", +"..........................#Y..............#Y....................................................................................", +"........................#Y.............6.G#w..#Y.....#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#......................", +"......................#Y..............#p.X#h..#Y...#.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.#....................", +"......................#Y........................#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b................", +"......................#Y..#h#p....#w.....y......#Y.a.a.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.a.b.b................", +"......................#Y..#k.I.6...A.t#Q.v#h....#Y.a.a.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b..............", +"......................#Y..#h.2.y#h#u.f.W.f......#Y.a.a.c.c.d.d.c.d.c.c.d.c.d.d.d.d.c.c.d.c.c.c.c.c.c.c.a.a.a.b.b.b..............", +"......................#Y...6.W.x..#Q....#A......#Y.a.a.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b............", +"......................#Y...f#v#W.z.o.D.u.f......#Y.a.a.c.c.d.d.d.d.c.d.d.c.d.d.d.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b............", +"......................#Y...n#M#N.z.i.o.z.o......#Y.a.a.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"......................#Y..#f#W#B.8.z.o#o#z........#Y.a.c.c.d.d.d.d.d.d.d.d.d.d.c.d.d.d.d.d.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"......................#Y..#Q.h#R.w#I#I.0.Z.....Y#q#Y.a.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"......................#Y..#L#n#z#I.s.s#Q#t#Q...Y..#Y.a.c.c.d.d.d.c.d.d.d.d.c.d.d.c.c.d.d.d.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"......................#Y..#X#A#k#Q#A#V#X.f.f........#Y.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"....................#Y.....f.f#L#A.f.f.f.f.f.A........#Y.c.d.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"..................#Y.....f.f.f.f.f.f.f.f.f.f.f..........#Y.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"..................#Y...K.f.f.f.f.f.f.f.f.f.f.f............#Y.d.d.d.c.d.c.d.d.d.c.d.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"..............#Y.......v#t.f.f#g.f.f.f#X#Q#A#A.f..........#Y.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"..............#Y......#X.f.f.f.f.f.f.f.f.f.f#X#A.....B......#Y.d.d.d.d.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.b.b.b.b.b..........", +"..............#Y.....f.f.f.f.f.f.f.f.f.f.f.f.f.f.f#h.S.2....#Y.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.a.a.a.a.b.b.b.b............", +"............#Y.......f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.6.6........#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b.b..............", +"............#Y#q..#X.f.f.f.f#X.f.f.f.f.f.f.f.f.f.f............#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b.b................", +"..........#Y...S...f.f.f.f.f#g.f.f.f.f.f.f.f.f.f.f............#Y.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.#.#.#.b.b............", +"..........#Y...Y#A.f.f.f.f.f##.f.f.f.f.f.f.f.f.f.f............#Y.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.b.b.b............", +"........#Y.....V#A.f.f.f.f.f##.f.f.f.f.f.f.f.f.f.f....#h......#Y.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b............", +"........#Y....#h#Q.f.f.f.f.f##.f.f.f.f.f.f.f.f.f.f.....S......#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b.b.b.#.#...#.#..", +"..........#Y#W#W.t.f.f.f.f.f##.f.f.f.f.f.f.f.f.f.f#p..........#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.e.e.e.e.e.e.e.a.a.b.b.b.b.....#.....#", +"........#Y#d.D#W.q...f.f.f.f#g.f.f.f.f.f.f.f.f#d.z.p.......6.o.D#Y.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.a.a.a.b.b.b...........#..", +"......#Y#E.q.g#U#W#W..#t.f.f.f.f.f.f.f.f.f.f.f#D#N#a......#R#N#S#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b.b.b.b.............#....", +"#Y#b#J.q.q#W#W#U#W#W#w...S.f.f.f.f.f.f.f.f.f#t#x.O#C.P#v#e.Q#U.g#Y.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b.............b.b.b.b.b.b..", +"#Y#H#W#F.g.J.g.g#W.m#c.....L.f.f.f.f.f.f.f.f.9.p.U.T#H#z#H.m.m#F.m#Y.d.d.d.d.d.d.d.d.d.d.a.a.a.a.a.b.b.......b.b.b.b.b.#.#.#.b..", +"#Y.1#W.g#F.g#F.m#F#W#W.E...r.f.f.f.f.f.f.f.f.f.3#y#M#U#M#N#W#F#W.g.D.a.a.a.a.a.a.a.a.a.a.a.a.a.a.b.b.......b.b.a.a.a.b.b.#.#.b..", +"#Y.0#U#U.g.D.m#W.g.g#F#P#b.f.f.f.f.f.f.f.f.f...4#H#W.g.g#W.D#U#U#F.D.d.d.d.d.d.d.d.d.d.a.a.a.a.b.b.........b.a.a.a.a.a.#.#.b....", +"#Y#i#W#F.l#W.g.g#W.g.g.O#o.f.f.f.f.f.f.f.......F#H.g.g#U#F#W#W.J#U#d.a.a.a.a.a.a.a.a.a.a.a.a.b.b...........b.#.#.#.#.#.b.b......", +"#d#I#H#G#T#U#W.g.m#U#F#W.1#j...................5#H.g#U#U.g#F#U#d#Y.b.b.b.b.b.b.b.b.b.b.b.b.b.b.............b.b.b.b.b.b.b........", +"#Y.3.n#s#f#C#z#H.g.g#U.U#O.M...................N#l#G#T#G#H.j#Y..................................................................", +"........#Y.M.R#.#m#s#s#v.k#K#Y#Y#Y#Y#Y#Y#Y#Y#Y.H#r#s#f.7.C#Y...................................................................." +}; diff --git a/pixmaps/m-linux1.xpm b/pixmaps/m-linux1.xpm new file mode 100644 index 00000000..c1c4c4cd --- /dev/null +++ b/pixmaps/m-linux1.xpm @@ -0,0 +1,58 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 10 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c gray40", +"H c red", +"I c blue", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +"OOOOOOOOOOOOOOOOOOOOOOOOOOOOO........................ ", +"OO OOXXXXXXXXXXXXXXXXXXXXXXXX. ", +" O O O O OXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" OOOOOOOO O O O O OO++++++++++++++++++++++XXXXoo ", +" OHHHHHO O O O O O++++++++++++++++++++++++XXXooo ", +" OOOHHOOO O O O O O O O OO++@@+@++@+@@@@++@+++++++XXXooo ", +" OOHHOOOOOOOOOOOOOOOOOOOOO+++++++++++++++++++++++XXXoooo ", +" OOHHOHHHOHOOHOHOOHOHOOOHO+@@@@+@@+@@@+++++++++++XXXoooo ", +" OHHOOHOOHHOHOHOOHOHHOHHO+++++++++++++++++++++++XXXooooo ", +" OHHOOHOOHHOHOHOOHOOHHHOO+@@@@@@@@@@+@@@@@++++++XXXooooo ", +" OHHOOHOOHHHHOHOOHOOHHHO++++++++++++++++++++++++XXXooooo ", +" OHHOOHOOHOHHOHOOHOOHHHOO+@@@+@@@@+@@++@@@++++++XXXooooo ", +" OHHOOHOOHOHHOHHHHOHHOHHO+++++++++++++++++++++++XXXooooo ", +" OHHOHHHOHOOHOHHHHOHOOOHO+@+++++++++++++++++++++XXXooooo ", +"IIIIIHHIIIIIIIIIIIIIIIIIIIIII++++++++++++++++++++++XXXooooo ", +"IIIIIHHIIIIIHIIIIIIIIIIIIIIII@@@@+@+@@@+@++++++++++XXXooooo ", +" OOHHOOOOOHOOOOOOOOO .XX++++++++++++++++++++++++XXXooooo ", +" OHHHHHHHHHOOOOOOOO .XX++@+@@@@++++++++++++++++XXXooooo ", +" OOOOOOOOOOOOOOOOO .XXX++++++++++++++++++++++XXXXoooo ", +" OOOOOOOOOOO .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOOOOOOOO .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOOOOOOOO ooooooooooooooooooooooooo...oo ", +" OOOOOOO ..........................ooo ", +" OOOOOOO oooooooooooooooooooooooooooooo ", +" OOOOO oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" OOOOO oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" OOO oooooooooooooooooooooooooooXXXooo . ", +" OOO oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" O oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" O oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-sco.xpm b/pixmaps/m-sco.xpm new file mode 100644 index 00000000..c04093ba --- /dev/null +++ b/pixmaps/m-sco.xpm @@ -0,0 +1,58 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 10 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c red", +"+ c darkolivegreen", +"@ c white", +"# c black", +"Y c #E0C000", +"B c #0000A0", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" .XX+++++++++++++++++++++++XXXXoo ", +"YYYYYYYYYYYYYYYYYYYYYBYYYXX++++++++++++++++++++++++XXXooo ", +"YYYYYYYYYYYYYYYYYBBBBBBBBBB++@@+@++@+@@@@++@+++++++XXXooo ", +"YYYYYYYYYYYYYYYYYYYBYYYYYYX++++++++++++++++++++++++XXXoooo ", +"YYYYYYYYYYYYYYBBBBBBBBBBBBB++@@@@+@@+@@@+++++++++++XXXoooo ", +"YYYYYYYYYYYYYYYYYYYBYYYYYYYYY++++++++++++++++++++++XXXooooo ", +"YYYYYYYYYYYBBBBBBBBBBBBBBBBBB@@@@@@@@@@+@@@@@++++++XXXooooo ", +"YYYYYYYYBBBBBBBBBBBBBBBBBBBBB++++++++++++++++++++++XXXooooo ", +"YYYYYYYYYYYYYYYYYYYYBBYYBBYYY@@@+@@@@+@@++@@@++++++XXXooooo ", +"YYYYYYYYYYYYBBBBBBBBBBBBBBBBB++++++++++++++++++++++XXXooooo ", +"YYYYYYYYYYYYYYYYYYYYBBYBYYYYY@+++++++++++++++++++++XXXooooo ", +"YYYYYYYYYYYYYYYYYYYYYBBYYYYYY++++++++++++++++++++++XXXooooo ", +"BBBBBBBBBBBBBBBBBBBBBBBBBBBBB@@@@+@+@@@+@++++++++++XXXooooo ", +"BBBBBBBBBBBBBBBBBBBBBBBBBBBBB++++++++++++++++++++++XXXooooo ", +" .XX++@+@@@@++++++++++++++++XXXooooo ", +" .XXX++++++++++++++++++++++XXXXoooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" ooooooooooooooooooooooooo...oo ", +" ..........................ooo ", +" oooooooooooooooooooooooooooooo ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-sgi.xpm b/pixmaps/m-sgi.xpm new file mode 100644 index 00000000..c37ca75d --- /dev/null +++ b/pixmaps/m-sgi.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c #71717171C6C6", +"o c gray85", +"O c gray50", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" XX XX .ooooooooooooooooooooooooooo. ", +" XXX XXX.oooooooooooooooooooooooooooooOO ", +" XX X X XXoo+++++++++++++++++++++++ooooOO ", +" XX X X XXo++++++++++++++++++++++++oooOOO ", +" XX X X XXo++@@+@++@+@@@@++@+++++++oooOOO ", +" XX XX X X XXoXX+++++++++++++++++++++++oooOOOO ", +" XXXX XXX XXX.XXXX@@@@+@@+@@@+++++++++++oooOOOO ", +" XX XX XXXXX XXoXX++++++++++++++++++++++oooOOOOO ", +" XX XXXXXXXXXooXX@@@@@@@@@@+@@@@@++++++oooOOOOO ", +" XX XXXXXXXXXooXX++++++++++++++++++++++oooOOOOO ", +" XX XX XXXXX XXoXX@@@+@@@@+@@++@@@++++++oooOOOOO ", +" XXXX XXX XXX.XXXX++++++++++++++++++++++oooOOOOO ", +" XX XX X X XXoXX+@+++++++++++++++++++++oooOOOOO ", +" XX X X XXo++++++++++++++++++++++++oooOOOOO ", +" XX X X XXo++@@@@+@+@@@+@++++++++++oooOOOOO ", +" XX X X XXoo++++++++++++++++++++++++oooOOOOO ", +" XXX XXX.oo++@+@@@@++++++++++++++++oooOOOOO ", +" XX XX .ooo++++++++++++++++++++++ooooOOOO ", +" .oooooooooooooooooooooooooooooOOO ", +" .oooooooooooooooooooooooooooOOO ", +" OOOOOOOOOOOOOOOOOOOOOOOOO...OO ", +" ..........................OOO ", +" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ", +" OoooooooooooooooooooooooooooOOOO.. .. ", +" Ooooooooooooooooooo#######ooOOOO . .", +" OOOOOOOOOOOOOOOOOOOOOOOOOOOoooOOO . ", +" OooooooooooooooooooooooooooOOOOO . ", +" OooooooooooooooooooooooooooOO OOOOOO ", +" Ooo@@@@@@@@@@@@@@@@@@@oooooOO OOOOO...O ", +" OooooooooooooooooooooooooooOO OOoooOO..O ", +" Ooo@@@@@@@@@@@@@@@@@@@@ooooOO Oooooo..O ", +" OooooooooooooooooooooooooooOO O.....OO ", +" OOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOO ", +" ", +" "}; diff --git a/pixmaps/m-sol.xpm b/pixmaps/m-sol.xpm new file mode 100644 index 00000000..605cdfc8 --- /dev/null +++ b/pixmaps/m-sol.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c white", +"o c red", +"O c black", +"+ c gray85", +"@ c gray50", +"# c darkolivegreen", +" ", +" . ", +" XXXXoOO.OOO.. ........................... ", +" oXXXXXoOO.OOO.O .+++++++++++++++++++++++++++. ", +" XXoXXXXXOO.OOO.OOO+++++++++++++++++++++++++++++@@ ", +" XXXXXXXXXO...O...O.O+#######################++++@@ ", +" XXXXXXXXXX.......O..O+#.######################+++@@@ ", +" XXXXXXXXXXX.........O.O.#XX#X##X#XXXX##X#######+++@@@ ", +" XoXXXXXXXXXXooooooooo...O#######################+++@@@@ ", +" XXoXXXXXXX..XXooooooo..OO#XXXX#XX#XXX###########+++@@@@ ", +" XXXXXXXX.....XXXXXoooo...OO######################+++@@@@@ ", +" XXXXXXX......XXXXXXooo.....XXXXXXXXXX#XXXXX######+++@@@@@ ", +" XXXXXX.......XXXXXXXoo...OO######################+++@@@@@ ", +" XXXXXX.......XXXXXXXoo..OOO..X#XXXX#XX##XXX######+++@@@@@ ", +" ooXXXX.......XXXXXXXoo.....######################+++@@@@@ ", +" XXXXXXX.......XXXXXXXoo.....X#####################+++@@@@@ ", +" XXXXXX.......XXXXXXXoo...OO######################+++@@@@@ ", +" XXXXXX.......XXXXXXXoo..OOOXXXX#X#XXX#X##########+++@@@@@ ", +" XXXXXX.......XXXXXXXoo....O######################+++@@@@@ ", +" XXXXXXX......XXXXXXooo.....X#XXXX################+++@@@@@ ", +" XXOXXXXX.....XXXXXoooo....O#####################++++@@@@ ", +" OXXXXXXXXX..XXooooooo.O.O++++++++++++++++++++++++++@@@ ", +" XXXXXXXXXXXXooooooooo..OO+++++++++++++++++++++++++@@@ ", +" XXXXXXXXXXX...........O @@@@@@@@@@@@@@@@@@@@@@@@@...@@ ", +" XXXOXXXXXX........................................@@@ ", +" XOXXXXXXX....O...O.O @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" XXXXXXXX...OOO..OO @+++++++++++++++++++++++++++@@@@.. .. ", +" XXXOXXXO.OOOO.. @++++++++++++++++++OOOOOOO++@@@@ . .", +" XOXXXO.OOO . @@@@@@@@@@@@@@@@@@@@@@@@@@@+++@@@ . ", +" .++++++++++++++++++++++++++@@@@@ . ", +" @++++++++++++++++++++++++++@@ @@@@@@ ", +" @++XXXXXXXXXXXXXXXXXXX+++++@@ @@@@@...@ ", +" @++++++++++++++++++++++++++@@ @@+++@@..@ ", +" @++XXXXXXXXXXXXXXXXXXXX++++@@ @+++++..@ ", +" @++++++++++++++++++++++++++@@ @.....@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ ", +" ", +" "}; diff --git a/pixmaps/m-sun.xpm b/pixmaps/m-sun.xpm new file mode 100644 index 00000000..6f36d588 --- /dev/null +++ b/pixmaps/m-sun.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c #4000bf", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" OOO ", +" OOOOO ........................... ", +" OO OOO .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" O OOO OOO .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" OOO OOO OOO .XX+++++++++++++++++++++++XXXXoo ", +" O OOO OOO OOO .XX++++++++++++++++++++++++XXXooo ", +" OOO OOO OOO OOO.XX++@@+@++@+@@@@++@+++++++XXXooo ", +" O OOO OOO OOO O OXX++++++++++++++++++++++++XXXoooo ", +" OOO OOO OOO OOO OOOX++@@@@+@@+@@@+++++++++++XXXoooo ", +" OOO O OOO OOO O OOOXO++++++++++++++++++++++++XXXooooo ", +" OOO OOO OOO OO OOO.OOO+@@@@@@@@@@+@@@@@++++++XXXooooo ", +" OOO OOO OOOOO OOO OOO++++++++++++++++++++++++XXXooooo ", +" OOO OOO OOO OOO OOO OOOXOOO@@+@@@@+@@++@@@++++++XXXooooo ", +" OOO OOO OOOOO OOO OOOXOOOOO++++++++++++++++++++XXXooooo ", +" OO OOO OOO OO OO OOO.OOO+OO++++++++++++++++++++XXXooooo ", +" OOOOO OOO OOO OOOOO OOO+OOO++++++++++++++++++++XXXooooo ", +" OOO OOO OOO OOO OOO OOOXOOO@@@+@+@@@+@++++++++++XXXooooo ", +" OOO OOO OOOOO OOOXOOO++++++++++++++++++++++XXXooooo ", +" OOO OOO OO OOO OOO.OOO+@+@@@@++++++++++++++++XXXooooo ", +" O OOO O OOO OOO O OOOX++++++++++++++++++++++XXXXoooo ", +" OOO OOO OOO OOO OOOXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" O O OOO OOO OOO O.XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOO OOO OOO OOO ooooooooooooooooooooooooo...oo ", +" OOO OOO OOO O ..........................ooo ", +" OOO OOO OOO oooooooooooooooooooooooooooooo ", +" OOO OOO O oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" OOO OO oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" OOOOO oooooooooooooooooooooooooooXXXooo . ", +" OOO oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-x11.xpm b/pixmaps/m-x11.xpm new file mode 100644 index 00000000..fd9bf9a5 --- /dev/null +++ b/pixmaps/m-x11.xpm @@ -0,0 +1,56 @@ +/* XPM */ +/*****************************************************************************/ +/** This pixmap is kindly offered by Ion Cionca - 1992 - **/ +/** Swiss Federal Institute of Technology **/ +/** Central Computing Service **/ +/*****************************************************************************/ +static char * image_name [] = { +/**/ +"64 38 8 1", +/**/ +" s mask c black", +". c gray70", +"X c gray85", +"o c gray50", +"O c red", +"+ c darkolivegreen", +"@ c white", +"# c black", +" ", +" ", +" ........................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" OOOOOOOOOO .XXOOO++++++++++++++++++++XXXXoo ", +" OOOOOOOOOO .XOOO++++++++++++++++++++++XXXooo ", +" OOOOOOOOOO .OOO+@@+@++@+@@@@++@+++++++XXXooo ", +" OOOOOOOOOO OOO++++++++++++++++++++++++XXXoooo ", +" OOOOOOOOOO OOOX++@@@@+@@+@@@+++++++++++XXXoooo ", +" OOOOOOOOOO OOOXX++++++++++++++++++++++++XXXooooo ", +" OOOOOOOOOO OOO.XX++@@@@@@@@@@+@@@@@++++++XXXooooo ", +" OOOOOOOOOO OOO .XX++++++++++++++++++++++++XXXooooo ", +" OOOOOOOOO OOO .XX++@@@+@@@@+@@++@@@++++++XXXooooo ", +" OOOOOOO OOO .XX++++++++++++++++++++++++XXXooooo ", +" OOOOO OOOO .XX++@+++++++++++++++++++++XXXooooo ", +" OOO OOOOOO .XX++++++++++++++++++++++++XXXooooo ", +" OOO OOOOOOOO .XX++@@@@+@+@@@+@++++++++++XXXooooo ", +" OOO OOOOOOOOOO.XX++++++++++++++++++++++++XXXooooo ", +" OOO OOOOOOOOOOXX++@+@@@@++++++++++++++++XXXooooo ", +" OOO OOOOOOOOOOXX++++++++++++++++++++++XXXXoooo ", +" OOO OOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOO OOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" OOO OOOOOOOOOOoooooooooooooooooooooooo...oo ", +" OOO OOOOOOOOOO.........................ooo ", +" OOO OOOOOOOOOOooooooooooooooooooooooooooo ", +" OOO OOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ", +" OOO oXXXXXXXXXXXXXXXXXX#######XXoooo . .", +" oooooooooooooooooooooooooooXXXooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ", +" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ", +" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ", +" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ", +" oooooooooooooooooooooooooooo ooooooo ", +" ", +" "}; diff --git a/pixmaps/m-xlock.xpm b/pixmaps/m-xlock.xpm new file mode 100644 index 00000000..661406ec --- /dev/null +++ b/pixmaps/m-xlock.xpm @@ -0,0 +1,34 @@ +/* XPM */ +static char * image_name[] = { +/* width height num_colors chars_per_pixel */ +" 50 24 4 1", +/* colors */ +". c Black", +"* c White", +"# c Red", +"a c SteelBlue", +/* pixels */ +"..................................................", +".##########................###....................", +"..##########..............###.....................", +"...##########............###......................", +"....##########..........###............aaaaa......", +".....##########........###...........aaaaaaaaa....", +"......##########......###............aaaaaaaaa....", +".......##########....###............aaaa...aaaa...", +"........##########..###.............aaa.....aaa...", +".........#########.###..............aaa.....aaa...", +"..........#######.###...............aaa.....aaa...", +"...........#####.####.......................aaa...", +"............###.######............aaaaaaaaaaaaaaa.", +"...........###.########...........aaaaaaaaaaaaaaa.", +"..........###.##########..........aaaaa.aaa.aaaaa.", +".........###...##########.........aa.aa.....aa.aa.", +"........###.....##########........aa.aa.aaa.aa.aa.", +".......###.......##########.......aa.aa.....aa.aa.", +"......###.........##########......aa.aa.aaa.aa.aa.", +".....###...........##########.....aa.aa.....aa.aa.", +"....###.............##########....aa.aa.aaa.aa.aa.", +"...###...............##########...aaaaaaaaaaaaaaa.", +"..###.................##########..aaaaaaaaaaaaaaa.", +".................................................."}; diff --git a/pixmaps/marino2.xpm b/pixmaps/marino2.xpm new file mode 100644 index 00000000..f49d36c5 --- /dev/null +++ b/pixmaps/marino2.xpm @@ -0,0 +1,327 @@ +/* XPM */ +static char * marino2[] = { +"152 157 167 2", +" c #000000000000", +". c #28281C1C1D1D", +"X c #2E2E29292D2D", +"o c #707040403838", +"O c #383814142828", +"+ c #1E1E39392828", +"@ c #444448482E2E", +"# c #545434344C4C", +"$ c #38382E2E2C2C", +"% c #2A2A2B2B2020", +"& c #101014142828", +"* c #1D1D1C1C1C1C", +"= c #1C1C0C0C1D1D", +"- c #0E0E1A1A0D0D", +"; c #19191B1B0F0F", +": c #1D1D2A2A1C1C", +"> c #C0C0E0E07070", +", c #6C6C70707474", +"< c #444440402E2E", +"1 c #3C3C28280C0C", +"2 c #35354E4E2929", +"3 c #606074744C4C", +"4 c #64645C5C3030", +"5 c #58585C5C3838", +"6 c #58582C2C3838", +"7 c #444430302E2E", +"8 c #181840401010", +"9 c #68687C7C3838", +"0 c #8F8F69691E1E", +"q c #78785C5C3030", +"w c #A0A03C3C3838", +"e c #282814143030", +"r c #90907C7C3838", +"t c #C0C0A8A8B0B0", +"y c #ECECF0F0B0B0", +"u c #C4C478787474", +"i c #DCDCC8C8D4D4", +"p c #C0C0A8A87070", +"a c #1A1A2C2C2828", +"s c #54545C5C3030", +"d c #7C7C88882020", +"f c #7878D0D05858", +"g c #F5F587874F4F", +"h c #C4C47C7CC4C4", +"j c #B4B465652C2C", +"k c #6C6C30307474", +"l c #282830303838", +"z c #2A2A3B3B2D2D", +"x c #3C3C48481414", +"c c #0C0C38381010", +"v c #9494D0D0A0A0", +"b c #DCDCA4A4E0E0", +"n c #B4B4E4E4E0E0", +"m c #38383D3D2C2C", +"M c #54545C5C1818", +"N c #2C2CA8A82828", +"B c #ECECB8B8A0A0", +"V c #C4C438387474", +"C c #2C2C50503030", +"Z c #B4B48F8F3C3C", +"A c #D0D050502020", +"S c #ECECD0D04C4C", +"D c #ECECF0F07C7C", +"F c #C0C0E0E0B0B0", +"G c #F8F8F8F8DCDC", +"H c #F8F8E8E8F8F8", +"J c #A4A464642C2C", +"K c #787898985858", +"L c #888874744C4C", +"P c #6868D0D0A0A0", +"I c #F8F8F8F8F8F8", +"U c #DCDCC8C8F0F0", +"Y c #F8F8B4B4E0E0", +"T c #A0A020201C1C", +"R c #0C0C1C1C1B1B", +"E c #28282B2B0C0C", +"W c #19190B0B0808", +"Q c #0C0C28280808", +"! c #7878D4D4E0E0", +"~ c #F8F8E8E8DCDC", +"^ c #D4D4E8E8F4F4", +"/ c #282830309C9C", +"( c #282810102020", +") c #2C2C50501010", +"_ c #7C7C34344C4C", +"` c #3C3C14142020", +"' c #B4B4C4C4E0E0", +"] c #78789898A0A0", +"[ c #7C7CC4C41C1C", +"{ c #6C6C3C3CC4C4", +"} c #ECECB8B86C6C", +"| c #B4B4A4A4E0E0", +" . c #202038381414", +".. c #707018181818", +"X. c #6C6C7C7C9898", +"o. c #C0C0C8C83C3C", +"O. c #DCDCE8E8D8D8", +"+. c #E8E890904C4C", +"@. c #303048483838", +"#. c #ECEC9F9F4C4C", +"$. c #ECECE8E8F4F4", +"%. c #90904C4C1C1C", +"&. c #202048482E2E", +"*. c #CCCC38384C4C", +"=. c #0F0F2E2E1C1C", +"-. c #C4C484844C4C", +";. c #58583C3C1C1C", +":. c #141430300808", +">. c #6C6C78781C1C", +",. c #CFCF8C8C3B3B", +"<. c #B8B888882020", +"1. c #78789C9CE0E0", +"2. c #CCCC70704C4C", +"3. c #242498983838", +"4. c #C4C43C3CC4C4", +"5. c #B8B874743838", +"6. c #6C6C7C7CD0D0", +"7. c #2C2C48489C9C", +"8. c #CCCC76763030", +"9. c #E0E070703838", +"0. c #181848481414", +"q. c #646470701C1C", +"w. c #E0E0C8C81C1C", +"e. c #D8D884843838", +"r. c #2F2F3F3F2020", +"t. c #F0F078783838", +"y. c #242410109898", +"u. c #282838381010", +"i. c #B8B8C4C42020", +"p. c #A4A47C7C3838", +"a. c #2828A8A81010", +"s. c #E0E03C3C3838", +"d. c #282810100808", +"f. c #D4D464642020", +"g. c #F4F474743030", +"h. c #3C3C28282020", +"j. c #3C3C40400C0C", +"k. c #A8A86A6A1C1C", +"l. c #64645C5C1818", +"z. c #F0F050501C1C", +"x. c #404038382020", +"c. c #545418181818", +"v. c #ACAC4C4C1C1C", +"b. c #EBEB79793030", +"n. c #ECEC64641C1C", +"m. c #F8F880803838", +"M. c #08080A0A1B1B", +"N. c #ECECC8C83838", +"B. c #ACAC78783030", +"V. c #2828A8A89C9C", +"C. c #E0E090902020", +"Z. c #F7F78C8C3939", +"A. c #D4D478783838", +"S. c #303040403838", +"D. c #D0D088882020", +"F. c #DCDC24241C1C", +"G. c #EDED8D8D3838", +"H. c #3C3C10100808", +"J. c #70703C3C1C1C", +"K. c #C4C464642020", +"L. c #DDDD79793030", +"P. c #B4B478781818", +"I. c #989878782020", +"U. c #B8B880803030", +"Y. c #ECEC77771C1C", +"T. c #78785C5C1818", +"R. c #C0C0C0C0C0C0", +" . ", +" X o O + @ X @ # $ X % & * = - * ; : + > , < ", +" 1 2 3 4 @ 5 , 6 7 X * : 8 9 9 0 9 0 q w < @ 6 e 7 ", +" r t y u u i p o a e : . : 2 s d f g u h j k k X X l , < z x c * ", +" @ 3 v b r n i k m M . 8 N > y B V k X a a C N Z Z A S D D D D j % ; ", +" $ $ 5 t F G H p > y J 3 B b u k * C 3 K D y y G L C P I I U Y b u T O R ; E % = ", +" W Q : . * - C ! Y y H ~ I H p # X e C f D j , ^ ^ I I ~ > > h V / e e e & & W : f D J ( ", +" E s J 6 ( ) K > i D H I I I H Z o l s D b O z v I I U h _ k e l 5 4 4 s 3 4 $ * 3 i i _ ` ", +" X : * s 9 Z B D ~ h L ' I I I I H J l ] i p [ > b { k 2 9 p } i > t | ] ' t t 5 e X , t 6 ", +" m O .% [ G D y S y b ..# t I I I I I J a X.^ h V e C N o.y i ' ' U ! O.n ^ O.I Y K 7 * z ", +" X . @ K o.B G y y i y B +.# @.] I I I I H _ + k @ @.9 > F b ' n n n I I I I I H H U i V # + ", +" * 4 J Z #.B $.~ y G y D B y B %.# ] G I I I b $ &.N t v n ' n n ^ I I I I I I I I U | $.h X ", +" * 1 _ *.#.i B B y G G G ~ b g Y B T C v I I I H _ 7 K n n n ^ I I I I I I I I I I I Y t U b 6 ", +" 1 = = = =.% s X X _ L B } y y B w 6 X # 3 -.;.3 n I I I ~ q C ! I $.I I I I I I I n I I I H i v U { O ", +" . ( ; :.>.& L u } X . 7 J S D y ~ ,.K <.. 1 K J X f I I I I u # K ^ I I I I I I I I I I I ^ b 1.n X.e * ", +" O ( M [ D B B H I B } _ # p y y y y G y 2.$ X u # C n I I I Y # z n I I I I I H I I I I I U p v n t L # * ", +" a 3.o.I H U I I I I G V l -.D G G G G G ~ _ . K 2.# N I I I I b 6 K G I I I I n O.I I I Y | n O.^ $.| O ", +" 2 > I $.4.w ' I I I U k X 5.B ~ ~ ~ G G ~ *.. d B ..s F I I I I u z P I I I I ^ I I I H t v ^ I $.h 6./ ", +" . X . 9 y I h 6 7.o.I I I b . 2 8.9.g u g B B y V 2 > #.2.6 ] I I I I b 6 C n I I I I I I $.Y ' O.I I U 6.X.# ", +" . = R 0.q.q.;.1 E ; ; E 0.w I I I y w i I I H v e 6 w w w T _ w 2.} 2.f D b #._ 7 v I I I I _ C v I I I I I Y h v n $.^ ^ U X., # ", +" * :.>.w.D S S S S e.1 . a e 2 D I I I I I I I I h 6 X r.r.2 s 3 M . 7 u #.D y y B t.6 v I I I I u # K I I I H Y | ] v b ^ ' | 1.X.6.y.% ", +" u.q.i.> D D y y y D y +.p.o 1 * % 2 t I I I I I I U h { 7.d o.y y y G y B J @ u B B Y B u _ 5 ^ I I I h $ C I H b t 1.v U n ' n 1.1.] , k = ", +" % a.> D D D y y y D y y D D y s.% d.1 . f.O.I I U b h V e ) f D Y h I I I I I b 7 s.g.B p } g *.C > I I I H k z t t ] v F ^ n ^ n n b 1.t 7.e = ", +" = :.3.[ D y y D y D y y y D y y y D J $ d.: . . h.h.e # @ h u V , # l e K } U h X f I I I I Y 7 5 +.} B B B *.z P I I I $.V $ K ] v n ^ ^ I ^ U | 1.] 6.k = ", +" ( ) T D D D y D y y y y D G y D y D y D } 2.j.1 * ; . = & . $ e $ O _ T m Z $.$.5.> y I I I I Y 7 q 9.g h B g s.2 @.F I b , { X 3.n U ^ H $.^ Y 6.X.1.X.k = R ", +" =.d S y D D y D D y y D D D y D y D D D G D S S <.9 d k.l.A z.A z.g.z.*.x.v I I I I I I I I I h 7 A g #.B B #.B c.@.v b p t v 6 @.! U O.U Y 1.{ X.X.k / e & ", +" 0.[ b B D D y D y y y y y y y y y y y y D y y G y D B g v.b.u 9.n.4.V V E Z I I I I I I I I H V m j m.} Y g u g T e s v b t ' k z ] F $.b | X.L X., / e M. ", +" 2 N.p S S y D D D y D D y D y D D y D D y D y D D D D } ] #.-.g.t., B.w 6 @ ~ I I I I I I I 4.# o 2.#.S p g u g _ X 3 B O.t | k z 9 1.b | , { 9 X.y.( - ", +" M o.b } } S y y y D G y y y y y y y y y y y D y y y y y h S B B 9.{ V u s.6 , | I I I H U h O 6 A g } y h t.g u T X C v n ' X.k & 3., 6., X.7., y.* - ", +" = a 3 6.#.} } S D y D y D y D y y D y D y D y D y D D D B b D B B u V g V 9.*...5 ] X.h V k c.6 A 9.#.S B V u ..5 , @ 3.F U ' 1.6 & C 7.X.V.7.# & - ", +" O W E q.#.#.#.B } } D D y D y y D D y D D D D y ~ D B D y B y D D B B } g g 9.z.w c.` O : E A z.9.g.B y B b.T @.f y S K 1.1.i | { ; C X.7./ e M. ", +" - # Z } g #.} } #.B } } B D B B S B D B } } } } } } h b } Y D Y b i b #.4.h 2.*.v.v.A t.n.9.9.#.} N.g { w X K I U b | ] | ] k & 0.@.& = ", +" . &.r #.#.#.#.#.g p } #.} } #.} #.} } #.} } } } N.B h #.B i y B B y D B { u j 9.b.g b.g } #.D D y B 6._ @ m k k 7 5 ] h { e M.M.R : ", +" W ; 4 } #.} } #.#.#.#.g #.#.#.} #.} } S S D D N.9.*.j #.D D D D D B } #.+.g +.} +.#.} B D D D y g T 5 > D q d.$ q ] X.k & M.Q * ; E ", +" Z #.} } } } } #.#.#.#.N.} S S D } N.g v._ # / E p h B b B i D B h u b } } D B S D y y G B 9.7.N G I V 2 $ @.X.1.6.# R * ) Z 0 . ", +" - :. L g u s.+.} D S D D S } S b._ O e = * % %.[ S D y y y y D y y } } D B D y D B D y D B 2._ f y $.# 9 K $ @., , y. ( 0.[ D B 6 ", +" u.Z %.= O y.% . 6 %.j 5.u v._ _ O ( ( ; u.x $ # v B b b $.~ ~ D i U i i D D D D y D D y D B *.# 9 Y h 5 f G J 6 l 7.$ * 3.N.D h O z ", +" ) Z b.( W - - ; & M. @ L p p 4 D _ y._ b B i D G H y y D y y D y D D y B #._ e 2 s @ a C h b k : 5 O E $ >.o.S -.@ s $ ", +" 0.C.Z.d. ;.0 _ t y D T < # 6 7 o.y D y D y D D D y D D y D B g _ N D G u 4 @ =.= * R z ( ) ..N N.#.A.K _ X z m ", +" 0.i.A W X X z K b B , ..7 X e K G i b B ~ y y y y y G y y B g 4 w I Y k v G p c.$ # e C % 0.M 6 q.#.N.e._ 2 R O * . * ", +" ( ) K ..= . O R O _ u b ~ B +.L L p D y B y y D y y y y D y y } s.o p U H w v H b k e a e : ) @ 2 6 M w.#.J 9 q M >.d 6 d. ", +" Q d N...E . ; : u.l / y.{ { h t.B G G I I I G G G G D G y y B g _ e y.X / X 3 U h # @.@ e $ - q.q M 6 N g 6 K B D D D h T X ", +" = ) N.#.T e .K o.p 5 4 7 # # y., t D ~ B y y D y D D D y D D +._ 9 2 Z %.$ $ # l e S., O l 2 u.3.9.D.g.Z.T x k.g.z.2.j k X @ ", +" = :.>.#.F. X ( ) w.y y y D y D S #.6 6 q u B y y y D y y D y D B } _ f I I Y _ K #.o e + # X X % K ;.9 Z.Z.Z.T $ M b.z...e = M.- R ", +" W - ) d N.f. e =.N D y y b i B b b V +.o x.# , ] i D y D y y y y #.g 6 f I I 4.4 F H u # @ # a * 3 @ 9 g.G.z.7 2 ,.9.g v.` . 1 1 ", +" a * 0.q.Z C.w.S #.w = 2 > y y y i ~ y B y $.~ y D } 6 6 , L B y y y y G B g.# > I h k 6 , h k 5 X.# z + 3 9 #.A O q.v.T 6 c.h.( = : ", +" : M C.N.w.S t.F.s q : M > D y G I y I I H I G G y I D ,.@ e z > G y y y g s.5 > b 6 ( * % a l &.X.# C l K f #.6 0.Z x.u.) H.; ; Q ", +" ) d S w.G.f.T O = =.L = ) f D y D y B ~ y H ~ i y y y y i > p +.6 @ p D y B } F.5 y n ~ j 4 > j # + 5 / + &.o.p %.M [ N.#.#.A ;.;. ", +" ) w.N.Z.s.c.= = ; W 0.5 X K S y I y y y y G G y D G y G y y y G G B c.@.> y B g w 3 F I H 4., n b { @ 7.# a C > B ,.w.D #.Z.g.$ m ", +" c K #.A c. ` 0.5 l % 2 w.D D B D B Y B y $.~ b y B y y b y B D D 2.O @ > B #.V 4 y I I V C F h V @.3 , l : ] D D Z.f.v.v. m # ", +" 0.d C.J.d. O + 3 . z K S y y } D B i y i i y i y y y y i ~ ~ D G B e.6 X q +.s.@ v I H k 5 O.h o @.7.e & ) > y V % - - : 2 # e - M.a = * @.", +" * d w.v.O :. e r.@ . ) o.B } S y D y $.~ D I y U h 4.9.4.b b y D D B B t.c.$ u g w v I b k 7 F ~ L # # & a : O 3.u V u $ u. $ e &.O M.- c a.#.6 $ . ", +" ( =.Z #...X ` C 6 $ * ) } #.S y S D B Y y g b u { k X $ 6 y.k u B B } } B +.-.g 9.# K I $.p 4 v $.h e e 8 3.6 * * ) L 2 a X 2 # l X # % E x.X ; 3.C.#.' 6 X % ", +" ; ) 9.T = O 2 @ _ * C > D S B D B #.B } < e @ 4 p i y ~ u _ m 9 #.} S } #.g u #.} y ~ Y b h _ O e a 2 K v u & a X 3.L X 8 7 ; 8 1 l.0 6 ;.0 #.S _ . % @ ", +" c l.V ` e &.@ @ a ) d ,.B h s.s._ 7.6.6.+.F.#.t.I G I I $.] 6 + K S } } D } -.b u h n e e = & ) K o.P t ^ b = : ) @ e * ) o 2 Z w 4 } w %.K.g B 6 1 O m ", +" 0.,._ O O C q # # 7 5 _ 6 ..c.e * = X M.a i I I I I I I I I ~ _ $ d B g g u g T O O e y.R a C p o.F | t | 1.h X 0.9 X < =.N p.L z.6 @ f.%.4 b.g V R s X $ ", +" * a.S V M. e 0.# # # e & = R ; : =.=.0.q.;.C [ 6 , I I h ^ I I I I I u e l e & e X & & =.a 8 ) 3.>.> O.' U h , 6.! k a # e 3.k # $ N u V *...o v.9 r 9.*.C K _ # z ", +" * 9 -.y. X + X 7 # X 6 X e e a 0.) q.9 d K f t v v v F v K > , l b i 6.] U ' I I I 1.c.$ 2 s s 9 5 K K K F Z ' t | { k , , 7.# O e & & * 6 ( * * + _ . e C , q q n.G.v.s.%.o T K q k . l m ", +" = : d n.1 ( C o $ X X : : a a : + s 3.d f O.n ! n ! n ! ! ! n ! | n ! | 7.2 Z t X 5 t X.' I $.h # X ] O.| i ' i U b 6.X.5 7.@ C C 7.5 / = & + z l X ;.0 g e.%.E 1 . a e x X 5 +.*.T 6 E M d Z } o ;.; ; % ", +" 7 ( R d V X O 2 L % s a R a Q ) X N ,.K f o.o.v n F n n ! ! n ! ! ' ' ' ! n n | ! ' > 7.3 Z i _ l X.| v I Y b V X C ! b 1.{ 1.] { @.7., 7., 7.7., P { . E 3 o X 6 < O = % _ z.Z.Z.n.$ = =. @.o l * C d K c.e * [ L.Z.N.g ..w g.D F.= ", +" X * & M.W Q # = X 2 p _ e C v ;.= R a * C 5 q.K P > v B ' v ' ' ! | ! n ! ! n ! ! ! n ! ! n n ! n ! ! ' ! 1.$ 9 i U l @.v | O.$.| ' 6.6 3 ] , 6., 7.X., 7.3 7.@.7.6., 7.1., O M.a , o 6 ` W d.d.= : q ,.Z.8...- @ # 7 X z 2 4 o.G j 5 0 Z Z.T 6 L.g.%.X , > > w ", +" e M.=.3.K K 9 z = : % @.@.X X X C 6 z X X X * a ) [ y , e 9 > t P ' 1.! 1.! ' ' ! ! ! ! 1.! ! ! ' ! ! n ' ! ' ' | 1.{ 1.1.| { 1.{ # X > I U 6 @.v n i | v | k @.X.] 1., 6., 7.7., , 7.6.7.1.6.] 1.1., e E x.6 e 1 c.F.s.....- u.<.N.T E M _ @ X $ 8 9 K J _ X X.V L D D S #.f.= % q N.2.O e y.e ", +" R W q.Z e.B F q : * W - = c X X e e X e - W =.0.) [ o.D I I , X 3.i P 1.1.P | ! 1.! F | ! ' ! n | | 1.! b 1.| | 1.{ { k y.a e y.l / X C 7.E B I n 7.@ p b ' ] i n 6 C ] ] | 6.6.] X.6.1.K t 1.P | 1.1.] | { O C O M.m q z.%.z.T F.F.0.E r v.d.; . $ a.[ #.t.{ 6 X : x.z : @ p D N.#.P.* ) X / = = e & ", +" * @ v ~ H I I H B y J . 3.Z J 7 * X 7 O = Q :.) d f > D y I I I I I , e C ] 1.1.! 1.! 1.! ' n ! ' | ' 1.1.| { , k / # / k # a & R - M.R % : X 7 X K ~ I k @ X.' t ' i ^ , O C ] ! O.' n b ] 1.n n n n 1.] 6., 1.1.k a e * . 0 n.g n.s.T A s...; M Z.v.1 x 4 j V # X X X $ ; E M o.#.2.c.. W X ", +"X - * @.1.! | $.I I I Y 5 d v H V 7 = R Q ) [ v D y I I I I I I I ^ I h R 3.P ! 1.n 1.| 1.| 1.P { { 7.y./ # k & M.M.; R 0.C ) f i.i.I.$ M 9.w 7 C w } b P 7.9 K i ] y G ~ k @ 3.1.! ^ i ^ $.^ n n F n ' b ] 6.7.X.' / d.; J.A z.z.Z.g.z.s.z.z.F.d.) #.Z.g.T O a a 7 d.W ", +"# = M.M.& e &.P G I I I O.h p b k K p f f D G G I I I I I I I I I I $.k : C 1.6.{ 6.{ 7.X.{ , X.l a X $ = R =.8 M l.s o.D D G y I O.i _ X a C f } y $.{ z 5 X.v U I O.H h # C X.! O.I $.^ ^ n ^ ^ n | { 6.1.1.] 1.{ 6 * ;.A s.s.z.g.b.U.2.z.s.F.d.x C.#.T * a 2 ", +"5 # W 0.f F y G I I I I U k K t 7 N I I I I I I I I I I I I I I H I U # * &.# l z : : .: X + &.&.< X C K f D t i V 3 n I I I I I I Y t p u B B h k y.C 3 K 6.n n ^ U 4./ C ] X.P n ^ ^ ^ ^ | | ] | | ] , ] h 6.k * s <.G.#.Y.z.z.z.g.Z.2.s.s.F.F.; q.C.T R : ", +"X a = [ y O.^ I I ^ I I U @ f H _ N I I I I I I I I I I I I I I H Y k &. # e : N > I Y X ] V C F I I I I I I b ] h e y.e 7.7.@ o 4 ] ] n H n { # 0.9 ] 1.F I $.n $.I i t | F t ] h 1.h y.1 @ D.#.N.#.N.g.z.z.F.z.V 9.z.z.z.c.9 #.K.( ", +"e C L y I ^ I I I I I I b 6 3 F k K i H I I I I I I I I I I H O.O.h e $ z N y I I b 7 K h @ y H I I I I I Y i h # X 0.&.@ X.] | B F n | { # a 3.t ] 1.O.$.$.H $.$.Y n U ' | 1.1.{ O . x 9 C.N.N.N.N.#.Y.z.z.z.Z.9.z.F.F.` d N.T d. ", +"R 9 B I I I I I I I I I 4.# C , 6 a k k 1.Y I H I I I I H O.O.^ ' k X N D I I I U K K I 6 F $.I I I I I ^ ^ | y.s ] 3 q p > D n n Y k l a &.X.P 1.v H H $.$.Y $.U H Y O.1.u 6.O * M D.#.N.N.N.w.N.N.} g.s.z.4.z.s.F.F.1 d g... ", +"* s O.U 4., n I I I I h , K L O X X X & & X , X.| $.^ H $.^ ' F u O X e 3.D I I I I I s.5 P 6 P I ^ I $.I I U ' { 6 a 5 h Z 6.U ^ | k k e &.&.] X.1.! $.H $.U $.$.$.U Y 1.1., { y.$ q.d #.N.N.N.S S w.N.Z.z.z.g.9.z.z.F.F.1 l...: ", +"M.R _ # 0.[ F I I H { ` = & e $ W ; * ( - & e X 7., t V e a e &.N D I I I I I I | # C L 5 G I I ' ' U $.' b X.4 @ e 7.& & e e &.+ C 9 1.X.6.v O.^ ^ U ^ ^ ^ n ^ 6.] X.{ 7 ) Z N.N.N.N.S S S S S N.Z.z.z.g.+.9.z.F...W - ", +" y.R a.> I I I 4.O e : O C #.7 E R - M.W - & e X &.f z.I I I I I I I ! / &., e , I I Y ] 1.i Y b | 1.| , c.5 @.& @., V.6.1.7.X.P ^ $.^ U ^ U ^ n U n H 1.f $ s #.N.S N.N.N.S S D w.S N.N v.s.z.V z.*...W ", +" R 5 F I I n 6.X X O s u # N > H I I I I I I H U L e 3 q z v I I t b i b i t t | ] | 1.' 6.X.7.] 7.X.X.v ^ ^ $.I ^ $.^ U $.U U Y k # s C.S N.D w.S S S D w.S w.N.Z.n.z.s.s.z.T d. ", +" R c , 6., O 6 $ = * ) , $ C f y I I I I I I I H U h # @ t o < ] I I i i ^ | | 1.' 1.P 1.] 3.] { X.X.! y ^ $.O.$.U $.Y U Y U b { { 7 2 o.S S w.S S S S S w.D w.N.G.g.z.s.Z.s.c.a ", +" W W M.= X 9 %.. X C q @ C [ > I I I I I I I I I $.b , # 7.^ q l ] I I t n b ! n | F f P o 7.7.X.V.n I I $.H $.I H U U U b | | k X 9 T S N.[ S S S S S S w.w.N.v.Z.g.z.F.z.{ ", +" 1 W c [ o.2.` 6 C 5 # + [ v y I I I I I I I I I $.| ! k @.] > w @.] I O.| ' n O.n n F v t v t P O.I H U U U U U U U U | | | k e q.#.o.S S D S D w.D w.w.N.S C.B Z.Z.T c.. ", +" e c 9 o.8.d. 6 C 5 e 3.D G I I I I I I I I I I I ' | 1.7 @.1.I p @ v I i 1.' n I G t y H I H I H $.U U ^ U ^ U | ' | 1.] , e 2 o.w.h D S S S S S w.N.N.N.N.#.{ Z.F.= E ", +" ( = ) > f.( X C , 3.f y I I I I I I I I I I I I ^ ' | , 7 5 ! H L X ] I ~ t 1.' I I H $.$.$.' U | n U ' | ' | ' { X., h w q.i.S D Z.S S S S S w.S N.N.C.N.N.9.A = ; . ", +" % W 0.d #.c. O s # 3.f y I I I I I I I I I I I I I I I t b , 6 m ] H p 4 X.' I O.F ! n ^ n n ' ^ ' ! n ' ^ | ' | { X @ r } N.S S S S B S S S S S w.w.N.G.#.C.Z.k O x . ", +" = c i.#.... e 0.o X E f y I I I I I I I I I I I I I I I I U ' | X.e X ] I Y 1 z u U H t n ' ' b ! H ' $.| ^ Y 6.t h X 5 #.N.N.S S S S S h D S S w.w.N.#.#.C.G.Z...y.@.5 7 ", +" - @ #.b.J.1 ; * * $ ` $ X = 0.X % C f I I I I I I I I I I I I I I I I I $.| ' t ] # @.L | B r 5 l 7.t v t ' ' ^ b ' U Y b 4.X.X.y.7 Z N.N.S S S S S S D S D w.S S N.#.C.N.G.T X C C @ e ", +" . ; @ Z N.N.C.j 0 J.E d.W ) # C N G I I I I I I I I I I I I I I I I I I ' ] 1.1.' ] # X , b H y 2.o L , { X.| b | | b X., 6./ ;.d S D S S S D w.S S B N.w.S w.N.C.N.#.n.T E 2 s X.7.@. ", +" h.W - 8 <.g N.N.#.N.G.T ; 0.6 o X ) v I I I I I I I I I I I I I I I I I I I I | ] 1.| 1.h 5 * l 7.4.| { z M @ # # / / { 6.{ / # e C p w.S S S S S S S w.A N.S w.#.Z.#.w.z.` =.) X., { 7.X ", +" w %.8.Z.e.T E . z . N F I ^ I I I I I I I I I I I I I I I I I I I O.| ' | 1.| ] q q X l ] w | t k @ 0 0 x a m ) s $ 2 i.S S S S S w.S S S B N.N.#.C.#.Y.T ` u.s 5 , X.7.5 l M. ", +" W ; ) C.#.Y.c.- E X e f F I I I I I I I I I I I I I I I I I I I I I I H i b t ! Y 1.b L 7 e y.7.k , , h B B z.g u #.6 @.i.N.S D w.D w.S S S 4.N.#.N.N.n.T = 2 B.L , 7.] 7.3.# = ", +" W ; M C.Z.c.W : O l f I I I I I I I I I I I I I I I I I I I I I I I G H | ' | 1.n ' 6.! X.3 @ z e & & e y.X e e 7.6 @ f N.S S w.S S w.w.w.B #.#.C.n.c.: l s 5 7.7.5 C X.X./ . ; ", +" u.( W u.p...; : X * f O.I I I I I I I I I I I I I I I I I I I I I I I I ' v ' ! 1.! 1.| ' ' | 1.t ] ] , , 3 , , 3 # $ d S S D w.D w.N.N.#.u Z.Z.8.c.* C @ @.7., 7.X.X.X.7.@.W % ", +" . e = - M T - 0. R e N y I I Y I I I I I I I I I I I I ^ I ^ I I ^ I I I I ' $.I Y U ^ | ' | ' U i 6.| | ] ] 1.' 1.X $ 4 #.w.w.w.Z.N.Z.#.Z.w w c.$ 6 q + 7.7., 7.6.V.6.6.7.+ - W : ", +" O W W Q ) * E X . N y i 4.@.! I I I I I I I I I I I I I I I I I I I I I I I U $.H ~ U U U | | | 1. ! n n n ' 1., # * M <.L.G.C.G.D.L.%.y...- E C @.7., 7.X.6.X.7.P 3 e a @ O : ", +" . = W c E * a e K n L X 2 o.I I I I I I I I I I I I I I I I I I I I I I U ' H U H $.U $.| ! ! | ! ' n | 1.! | X.X.# a 4 U.n.9.g.A J.c.y.: ) C , 7.X.6.] ] 6.1.X.K 7.R * a # 7 z ", +" = W W - e e 3.F b o C P I I I I I I I I I I I I U I I I I I I I I I $.| U ^ ^ U ^ n n n ^ ' ! n n ! ' ' ! X.{ 5 X a h.$ c.c.$ d.; + 2 s &.6.7.X.P 6.X.X.6.7.< & a < * : X e + ", +" Q = R = ) P F H y y I I I I I I I I I I U b | i I I I I I I I I U ' n ^ ^ ^ ^ U U ^ U n b n U U n U b | , { , # s 4 4 @ ;.< 4 # 3 7./ @.] | 6.X.{ 7.7.@.@.a C 5 , 7 m W ; * ", +" e = - W C v b V t I I I I I I I I I I I { e a 3.^ I I I I I I I U t n U n U ' U U U $.U $.$.U H $.$.U ! 6.] 6., 7.q.5 s 3 5 , X., 7.< ) 3., , X.7.P 7.# e z @., 1.h { 0 e ", +" @ C E : X 2 6.' ] t ' $.I I I I I I I I V a z 3.O.I I I I I I I U F $.$.U Y h h ^ U U H U U ^ U ' ' ' Y { ] 6.] X.@ X.X., 7.X.3.1.v F y g , X.6.7.7.k e &.@.{ 7.] ] ] , 6 M.; ", +" @.K > Z o.L $ X @.X.| ] ] | ' ^ H I I I I $.F o.F G I I I I I I I $.| U H U k e a ] ' ' n ' ' ' ! ' | | 7.C 3 X., { V.7., { X.1.p i Y h h 7.7.{ 7.l e e C C 9 X.V.X.] ] 1., e * X ", +" * N D G I I I y J 7 * 3 | v F ] X.1.b I I I I I I I I I I I I I I I H t ' U ^ L # $ 3 n U ! b ! ' ! ' | 6.z 3 K X., 7.X.7.X.6.' t | h 6.6.7., X.7.O a 0.C , 7.X.] ] 6., X.1.6.` * ", +" a N D G G I I I I I B q a l { ] u 1.] ] 6.t U H $.H I I I I I I I I I H t ] n n n t p f F n ' ^ n U b ' ^ 4.m z 5 1.6.1.] 6.| B ] X.| X., , { 7.# e z @.3 7.7.K ] X.6.] ] ] | { X ", +" 0.N > I I I I I I I I I I p o E * K , b | h ] 1.X.b | | U H Y b I I I $.I U ] ! H ^ $.n $.^ ^ U n U U ' b Y | , L p u | | u t ] { ] X.1.! h 6.y.a R C @.7.7., X.] ] 6.1.7.6.1., y.W ", +" e * 3.f D I I I I I I I I I I I ~ B q @.a X.1.1.| ' ] ] 6.] ] | 1.] X.n | | | h X.| | h 1.Y | b | 1.| h 1.h 6., 6.X.u 6.X.X.X.1.X.1.] h 6.X.k y.X * z 3 f , , 7.] v p ] X.] ] X.1.# M. ", +" = 0.[ G I I I I I I I I I I I I I I I 9 , . X l # 7., X.6.1.1.u 6.| 1.' | t ] ] , 7.7., X.X.6.X.6.] 6.X.6.6.6.1.6.] 1.X.6., 7.k / X l , X.3.# C 5 3 , ] ] 1.' n F b 1.] 1.] 1.] , & R ", +" :.N D I I I I I I I I I I I I I I I ^ I H S #.s ) % & & X y.y.e & y./ / k k 4.b { k X.6.1.1.] 6.6.6.6.6.1., 7.k { 1.h 6.k O e a + Z f u X.X.X.] ] ] 1.' i 1.O.H Y 1.| ] ] | ] { e * ", +" c K O.I I I I I I I I I I I I I I I I I I I I G y t Z 3 9 >.q.>.3 M M x m + . X X . =.a X k e e y.X l / @.e e R R C e X X s 3 o o @ X.h t ] 1.! | n n F n n ' U | 1.p ! h , y.a ", +" a K I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I O.I G y y y y > F B K L 5 3 K 0 L T.L K K o.B B u y u i u u , k e z @., P ' ' ! n n ' | | 1.! 1.| v ' 6., & ", +" a X.^ I I I I I I I I I I I I I I I I I I I I I I ^ ^ n I ^ ^ I n I I I U | U ^ U U U i y $.i U i R.$.i H $.^ U i h k y.k w 6 = l 7.# &.! n i ! U n ' | ! | | | | 6.k = ", +" . R l ] ' I I I I I I I I I I I I I I I I I I I I I ^ I ^ I I I I I I I b n U ^ $.n H H H $.U U U U U $.U i ' U | k a < w z.s.T ( X @., , ! U i n U b ' h t 1.1.X., = & ", +" . = * a h H I I I I H I I I I I I I I I I I I I I I I I I I I I I I Y n i ~ U Y $.U ^ b ! n ' n ' n ' 1.{ O 7 %.z.z.z.z...d.C 7.5 6.! | | ' ' 1.| ! b k O e M. ", +" 1 = - X ] ] O.H I I I I I I I I I I I I I I I I I I I I I I I I H Y ' U O.$.^ $.$.$.$.^ ^ ^ ^ ^ n ^ ^ n U | O l _ s.z.z.s.z.s...S.X.7.K ^ i ' ' ' ' | 1.k e & ", +" d.E z ] U I H I I I I I I I I I I I I I I I I I I I I I U n ^ ^ n n U ^ U n $.U ^ ^ U U U I $.U U X.# _ A 9.z.g.z.z.z.T $ s @.V.| ! ' | { { 7.6 y.X ", +" = * @.h U I H Y $.Y H I I I I I I I I I I I I I H ^ | n ^ ^ ' $.n $.n $.U $.H $.H H H H U U Y k e 6 z.z.g.s.g.s.n.*.d.= e l k { k e e R M.M.E ", +" * & 7.@.{ ' b | n | | ' I I I I I I I I I I I I U ' n ^ ^ $.^ U H U U H U $.U H H $.$.U ^ h k e o z.g.z.g.z.z.z.s.c.& O J.6 @ e * . J.c.d. ", +" = & * 6 e 6.U ^ B X.X.n I I I I I I I I I $.Y ^ Y U U $.U U $.$.$.U H $.$.H $.U n I $.| e $ v.n.z.z.9.s.9.s.z.T c %.n.z.%.w s.z.F.c.W ", +" - & R R 3 # k _ # @ X.1.' H H I H I I H Y U U $.H U U $.U U $.U $.U ^ $.^ $.^ ^ ' h X e w n.s.9.z.z.z.*.T A w z.z.z.s.z.z.C...* ", +" - - $ c.7 1 . * * z 6 _ k , 4.h h h h , 1.h 1.b b ^ Y U U U U ' U U b | h { X.{ k e 7 v.z.g.s.g.z.s.c.* A k z.z.z.V z.T = d.` ", +" = * %.s.z.z.T O W - c.X c.7 7 _ # o , , 6.X.X.X., 4.6.1.| h { h 7.7.5 , 7.o # # e X w z.z.z.g.s.T = ;.z.s.z.z.z.s.T = d.- : ", +" W y.6 T s.z.z.T c.1 ( E d.* e O e X # 7.k , { , 7.X., , 6.7.5 k { 7.# e e & & e W E A z.z.z.F.e J.v.z.{ z.s.s.y.O . ", +" W W - ` ..T o A z.z.z.z.F.T J.6 c.c.. e = =.& a e l O y.O & & * = ( 6 T z.s.J.v.A z.z.*.T O 6 A z.s.k T c.` ( ", +" Q - W - * ..w f.s.z.n.z.z.z.z.z.z.z.F.T 1 O ( O X 1 1 v.J.c.v.z.z.z.z.z.z.z.z.z.F.c.= = ` c.T c.e ( = E ", +" W * ; 1 c.T w z.z.z.z.s.z.z.g.z.z.z.z.z.z.z.z.z.z.z.z.z.z.s.z.z.z.s.z.s.F...= ( W W M.W = W Q ", +" ( M.- - M.c.6 F.w z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.s.s.s.c. ( - c.T T H.W 8 ", +" - W W - - ( 6 s.s.z.z.z.z.s.z.z.z.z.s.s.z.s.z.s.z.s.z.F.{ c.O R ` E J.F.T = . ", +" ( - W - c...w s.s.s.z.2.s.s.s.s.z.s.s.F.T ....c.O . * ` d.;.s.F.M.; ", +" 1 W W - W W = . ..T F.T ` d.( c.( = R R R = * ;.w F.e d. ", +" m ( ; 1 T T H.W - ; - % ; : O E J.s.F.e d. ", +" ( d.$ A F...% O . 1 s.s.e = - ", +" O ( J.F.A _ c. - c.w s.T c.d. ", +" ; ;.s.s.T = W E T s.y.d.W % ", +" ( 6 z.s.T * u. 4 = ; 6 A F.c.= . ", +" d.1 z.s.s.` * 6 a $ s - W ;.F.k T = ( ", +" . . A s.z...( ( a s o 7 O - 1 F.k F.( W ", +" E s.z.s.T ( 6 * ) # 6 M.- _ 4.s.` = a ", +" * w s.z.T ( o = :.9 * # * 1 s./ s.F.M.Q ", +" = ;.s.s.T e ( - 8 K e E 6 A s.s.A ..E ", +" W * w z.F.` M.0.p O * u.1 ..k z.s.k W ", +" . d.J.s.F.... Q ) v w X x.. k s.s...= 7 ", +" % T A g.T * Q 3.F k = - * J.O / F.s.V ` a < ", +" E 6 s.s.T X X # $ 2 ;.W : o . X _ z.w e ( ( X ", +" %.s.s.T e M.- 9 F B _ ( W : 7 4 # x.` W 1 w *.6 M.c >.o ", +" 6 s.s.+.O = - a 9 k * u.= W - ( C x x . = 1 T k y.- K J # ", +" J.z.s.F.O d. =.+ * 3.f J ;.h.= R 2 # = 2 D B 0 * * * z l.D.%.X ", +" * ;.F.s.s.c. * W - . @ ] y D J ( * M.& & =., I i Z.#.N.S u y.X C ", +" q.5 = 1 _ s.s.c. * W W Q m t B _ 5 Z q - E - a ] V 6.v y i , e C [ ", +" $ f V W E A s.F.O ( - u.e @.B G D p } l.x 3.K , f y ~ ~ b D G y u < : ", +" = p X 7. . 1 w s.s... d.R & - X.b Y b ~ o.D D D g.G H ^ O.^ O.I I G S _ ", +" : @ y 6 e a X 7 w s.z.T . j.* e a X 6.] i i O.F ^ I ^ I G G G I I H u k ", +" q.] 6 R R W a 6 6 z.s.s.T ( * . X z . e e R l l , n G ~ U y I H $.i i h # e ", +" 7 C ` ,.O & W R c.;.F.z.s.s.T ( - Q ) 5 M.O R M.R C I { { t U ^ ", +" N } 4.x ; l.c.W * . x x.6 w *.s.T O u.q.J J 3 @ ` ", +" > b k N F.I V ` - W & X K J ( W = = = ) [ o # 7.5 ", +" O K H h k M K r x.= - W R * * = . $ @ ..: s O.p 0 >.d o.f y O a % . ", +" : k e % f I I { M K K [ p Z q m * * :.- ; C n I G I I I u @ s q.M x % ", +" & M.- a ] 1.# N D I I I I O.D N > #.>.l.N o.n I I n I O.F > > y p X ", +" ; * e e z , h ' I H H $.O.O.n F o.K p n b ^ ^ ' n O.n O.O.h % ", +" : * M.R a X.{ F n $.n v D n y v f ] ] v v O.^ I I ~ k % ", +" * @.< # C K ] ] v O.O.O.y y F y G $.n U 6.y.c.M. ", +" m 5 X.X.t h , ] t h t 4.7 ( M.W ", +" % &.@ X # c E * "}; diff --git a/raster/scream.ras b/raster/scream.ras new file mode 100644 index 0000000000000000000000000000000000000000..986728178587ba721a263011c2a73c35c4681e02 GIT binary patch literal 14810 zcmY+LO^@T)b%x2VYfjTuid_=PQFEw!DOEz1#Rv#y7htx*05kKg?G>4*RP;oEPk|GRp-^5Y-;{I070^zpmjfBW6XZ$DMv zuyGx)Pe1(O>lpiYAH8bZzOUM2Zky7y(>b+GdOViWCcZXpIk%ZtQ_4A)Ym@Ie&pD4} zE;%-K%7>Jjmc!>UpFKFTKl_%?9~k2Jn9{ku&UqY5DSX_=d>`*@W5uu_ow>lvi{s8k zSkXDyj+raO;c!^JO_==%NgG6A&>D9)W(qjS|e~jP4~JK|~jHnp@1F8_L;- z)Pjr+fM>1S@beW(MzmzeR!_Rl zSM11LZFmI!${hiAW<0*ajE8h*5Y=}>M%(*bDh&pKxT#3Shj+kfj1l5%Gmf3Nuts^q zyMwupcoHu7UXOyG63Nlg3mF^HdfO< z#QB1v|UG-|OOA>*J@o|{uX2$~&s`M>DabxvWl~SQ&_yE_5qpBcA>;n>EeTGz1 zf%J0`Fzvbl0EaVk!jR*0&g+K){T%fMf&IIOfdy3#hRtoI(i&w`5e9WdhEYpyMgUAu z&f7&91HK|1C&KF(6tq!=`5wp&C&47Z(82f3r54O=2p!wRE$FMq`1jd--iD+y4XVD$ zB}ir(!X-i`M0L~2!IK7V7o0-?K|+{X_VS{Vgu0}ozE;n;FJ#=#Jz#mhrw%`E9N`36DeihH2=m7MEcx&){w z+-Bkg4JB9`SO%^j1QQ^pdMIf~Lp}J#4Urhc@v(#(VVc{e;2pC`Oj8pBGcLVcEA;Rx zTm~mH41@wNSXNI`!xf#WEZeXt4P8q6eyY;}(4kJlz6Ta`HB@=I(X7`fNT`gbi96mN z3!#L<55`LrUn|)%~7tJ!E(F)R+BK3}SAT zQtp@+@`U#GcE)Z(-DQ3)xl$=IuF8oJ1_U^eG=ZWxh@P4YngI)NmkywnK0OchA)z|J zeBh&WA)pX3bBiCFD+FZ#jN3pl+G38%E-IbTaI0le7C%s${EC-Ky3`m-IrT|)fl9!F z-FMnI9r#q5VcMrfJ5%Se?hS$8@%3BO-YApiTx#@9cv9ENw5lt}@QhyzJMfPyPL9X`-a=+Hn{7N3qFE(gA-Gf;mcO@? z=F89zgU~v-zqulfBff-+08be88Q^-*yw5{Fp>y3yKfu!-{&3@P3(QP?HC8CzWx=`4 zJg8hTG*`@&cZ1G4$_Ktw&J$%c?$#H$m|&^Ffli?Kmr&AAzozGj-44F@Y2aEC2HJAt zNCINSyIv)qOL^sNQ!0*`gO*}!ND2}5;5<4O_E>tcwWCp{n%PNtEJ%av7lbE3Wrqul`5bQo}{=flv8 zj9VMXz;@4ul=_0n->fEzZQ@?&E7-AcSL}p7N&W(6Z&-EN0xqqi>QN3EalIacqTO(=6X3}XOduFbC$JjMbS413tW6}5>xY>jp1 z1L_SS@1)KJUCqJN0Q_hW;S+Z7*NgXf;QZgQb9+!Pvk)bx*_7Q~&fCm4h3+r;%(@ z&Cr<-Q;15DLJi#`Wg%D8q_a7t*)R~0d?8xC5Y@3WUI&UU4oh-y++Xpp2l#-}nD}rC z)gk(%#!`)0>|A_FAZk;0Z{<~T!v=*o+Pnt@P=IZihVlXMNH5Qw(1W7*au4dMd(XH} zP~1I9I6~}nGY?3;sQ7q2t)`lyO&Jzq<*w8utMuqz1?*x&6qpJ@^DibO-%IYx0&tn? ziA)^oq7e|g?rC?zyx93EH~@Iq5ky@#9Zs|b*pTvo+&Hop4C|UAnfp0n6)vtYY^Vtj z5kkO%4pgCTC6eFX!3Hos1A{8Qo*k~HU3Wd1gStT`FXb}Tl7)4hViS$~M1z)&uX0b_ zPt0@@B~Z=rGUT}g%Q=(vluhG8@>By#t@9<(VD1Rv9q9u#IeG|F6W`=(AjzvLV*=!l z{tjQpuSmbVs%APKr$<7#oj^2(L0>frfJ05Ar@ExT(w``}TM7nHUIq1q9|f@Qhhc9Q zlr99RQmcaWqOM+5rsNERd<7=j6SKOIvrzQrV&ZmyTyAI?*KWeD(OwG8bmYSZ%R3wZ zNV`E!0k%hD^}S%^NL!){&d??)^>3>v4~iA894FVYtQwaA_XfA^6ZL@c5=q!jvft@Z zykt0t*VmDgoE4uvgPY)1RfvS}ntmDB#|W@gsT@r^3IfiARz}>v6?23nKn;774Ko#~ z6w-$Z>Q%c3k*yVY6P3z-i$9Dq{7UNLqXjX%1f#V;{g4CZvU&=4JG}Ra6MNUEpZ$X_`NT<7YR)H$?IYB5}Xy{SvwhM_^7@F^%y*mqT5Q9(09 zM%$&+R)WVXkqPhfFN)=z}mKCa@3Mw9R6!GzpNtbj2fWne2*zT{a{QKbnX5G}>w}>xh zYf&kux*?20VThL4-%!${MPtreBSqC1RV=rX%#3GXxyNnnPBu2k)FL@48qOIUQ_@L- z<-e~sOgjvqi7zGSz$RnV4Qi=T5N$KhcAN_Gq_(aekC5uwNR?|QRqB12*Lm2S>R zI1FWG*zbbb^pkmEc<9OnJp9~do=%I2(uKJbY{jJc+9q^lb~TVCOU;0#I+7k)zW|CE z1XPC^jOCI}L=wVT9rV%;vkj+icOoNg48t{ylb449DMdzMJeoKv7xaUppc$MfMRkHd zj;G(0Djiu5WrN_mL5HBFVXZeWF#}=*^@Uo@i{7}g^O2$3>>GUZR!1%|VcE-a=ZYCa zUp1h?5Fs+aB}sH)z1>uD!J8IRM_LE8$D=9R{lgb(3IV)_7GTq&t0F9G$xUs|%Ki>S z&r5TUeF@_Fb43cx>H%&sxysYWKBgwM*w_W_3xcBYmb~7V7v}Kr0=W8`JCONVt?1xD z5?uiZ?Otz_2o2It`9(&V5`|aMMru{Avsx%l^%(2KM3C%t79(mA?5)S2$r7UDu3#nIRVH z!frBUc{lN-&k)d9GO(;wW((k9*QuJt*^)SMm^e^hxWahEA(1OA`46iLTdJBBv~-+s z=<}Kz+?iyB0Ekc{H_{C;g(nZ~HL6pvP!WqFfZqe#uTgu+Eb5E8!If?WWUTb`SUl-g zkWmePQ*KNrT7 zr`krBS!%h^+JTH;MSJsVlC+jJdRw|w2Y@NLOLop++*n`Z9vT^$W>#zqlduGC>RCOb z-=M)Kjniv1n?J*{6C?#F1Ic-66b7=;x39Z*SXpw%%LvHKzmcS6z*$rbK60G)g+y>P zFwqLB)C3#~VAfVlrNjP&-(w<_iyPl~&M|~UQy$g7LQ-5}06DR`q^9}8q7O9Zg*jl{ zjT7lc&>7VrV66e9YhaA1y06jS&KK*xP^d4|OtW(^ho6#?0i~P7>dI2BWq{@W@UD9| zEZNmwTuNZ@DO)5+h?W}o4UL`dQIbL;BMqeuE(~$vJbvF3L*`<$vCiz))}tm*M_E>w z%8RgZuX}YEd21~3Z*PFNNIN(dOrK7n@QFN(foWA4iXN8c_8Ix82f&&fw$yL(5COmP z(=zz-I2E0a+*C17iw3nvWkP{GB{l>(L&9~SkO2gabcKC!Fq{g5>E+0bd*LE=U?K;w z{RLCQ03!g*-=?LW%+XC>n7ELvp_=@B#!vU_^d7AJ{fOTJL8MxSYznL0_`%T<6q$f4WtW(@hcKL z>RzkceYq{`ir+(Zf9Q8Td6t9?viT#?x7s?_^t;?0j%6=}SDEKGg~6d_?5PK&M5Czit{fV#t1Aqi3YAJYOs*6W0>T#U z>FEiLF|c#g(~f|}!iEm&O~3xdgI-8IGM6zrR(A>ML|4Rlc*D$`30Rveb|UBi=RBjp z!dziqmb6^_TaOaO{I5LNqu=Ndjr_DahwHr0h)z`r^Ak(76+?OB;_8L>5-a*XO4CjuINC( zGv3UTGdx%!;(o)9i*+GEd4bH_8qu8mi;Kl?JeIwIOyI0isAnH`tUhiso3u<&$m$)Z z046`!WkM%+*uM^^w0|LKB%RB7Rk-anyLg1QBC|-PxQtPQ%gQVI-f(O36n@>{7UZM; z@N{^JAZMb)@{ziQ?B!wifQ7Li(gTpJR8bh;%xg;5JC+DkLj1GJwW}MRsb`-5a>01x zsTN%Ol*NAgWlNjyfJQp=BS`^$Yus0ykX-T>AK+ACK1AeQo%YFedIF~INFswh5zb2M5L++h2L2LC6o>j zGSG^Xi0L)hSvV5PIm&_-V11G}MQ6C?d9XP|->Mr7I*>s615NBe?lnK?SPVt2Kj@tR zi;N?h)*n1gGKqqZqKnZl@HM*At({}Jh4|20IbQ011;+t zdpIzGq;}iA%-QTEhrOCb@(gDd6aW~e_FIHWJdzW#x{jpGUJ|H22Dy*X3gTVnTdasZ zL6ztjjA}!|!lN03Ka&}&rrlH)qfjbq@{N^+O??BxOIcQ-2T@VGHj zW)QNz)KV1(8V!?u?}KWU4up6NSmCYphfJFO=@Sm&V>kg>G0`qEQ7OP0e;L8A5Ih8P_V-s zj2M%jurIVQ?}27E(cqgn@|ad!rP^2m{1TH2>yf!+O~V8I4BqDSX&c;xEhSDVTv%a} z>f|1+5KjSu8nV7Wa}a?o{E9uzjbDYI`-MVJC%aJYX@#66D25FWi$v5Ka-8$%d%iXu zEsyK7WF}xq-ptXMCQxRr7~!+n7ZqG(=dS!p0)=G}(H?BpV`E=|RAt1qvQ;%oRNP8L zGtp#1{}xAMeq|jRdxyUCRxIz^Mq|>owmNz{L*XyPr3tmp&1-l+>+1mdK&w(3eR~52 z^nNSE+0CDYEwGHa#~Y>HfQ18l6UbvF4||)mnI`Z~^~DXBLImn>MhncDI9M=a5?~vs zXF>L6V(c61b*`mwRk#+-%7q`MMIyo4tPsm5<6cba@le;^f(J^|b8Qp*JWMC%ylcMk zxXm~>Ss0j($Re3a@nDuv?TBy^Llvi%&UDElQt1s%U$a2&IF|K+$uz<=uIP_mH zIFdC+<^74mb>$(HWtJ{k6GU99BKKf`s9ebBC>j`8wA8k-xywA1g6qmrD9i_hvA~n< zHc=TQlqQ^6s|oAILwc`;c+!}8f@B$U4|%RBDp;O8g?&9h!obg{7b|dtQarZ01kVVp zvLT&IW-2M;&d;dGD2xdq+Hw3b5!r#@bb91kOXLZLR7P}UGH7XF1PcxCJfA>O(}AkF zj{wZO4FwwoM)Pf~uH|(u=l!oi8DZJq&C)RF$wh1%QL+PJ=k)x zg&$2gs+mB^NBoJajTw+3IwrN3ibFapV}Q&P*sU%V5E(?R)p=`*H2}!;V(}fDF?XrI zU?|!I>_XrGq!Nk&PZ5laZ0M58h+iO@XnN>lA%D0KhZvcRv$7(Jo&+Fj^A}Eveeqsa zJY?C#A(tA6kLZ{Q_@HK4uE>BNVO_n1Keh-V8Brj|!Ji3r%53NSpQkPqPJi73Y>RCW zS-%?Tnqqu^*9$gkAS&}Oz1cj*&ES~f!uhSBfJ7)z<+KM3>p%8ET!qr!mgKP97uA>)Tut69RY7iOnZFmq(1GB)*r$$jBgbkG+xmcv39099ap_m>`qah23}uHRPz+#>QbSME^6d=5srlzeK%w;jjuIwJ60~ezs2;*W`frHX0gXntzl?2D| z&RYS;hb5X-0J}#>+?3@UlmLvoGqCXt&U)3YQ4b5R_VDyqNXP{OM;>E{P?qdzGgOAuW*aXs7pHZ3ko~m$Am~hLdW&6hTF_1 zl1D#zkyEl8Sr!g7AsMxn1G|G{7+^8O$q{m4Z>Ot5eCS?ldB#E_ue0Amc`m zVMFNOe#pnrcsgAkTo^~Z_eIbkn!_l{vo%tY{)6j>KmmSV$o3w%@qZrZyNn3kriMBw zm*%<}Z=9wC0k5~csrzPNs3xsI8~Ga#;2QM;na_oY9-bRUfp_E~wl`Gpuy-_u_mwi% zu2*z~?FeL)HiLyfV@Jb9Wf}18XK?J{MJthyx@bkG;_OM1JhT zZ`-y6V>P_Ik> z0u)4jnSC`XEX8+b&8uaV4P>CIV0~LTLlUlxIO1n%+{kW(U(XsV!19TZ1TcSQGsv(L z+PKx|u@{=g8j&onh1qdW2wQR#)Ka^aie!O}Viw5Zs79QWJ%39`|G>56TWo|%tnJ;* z8-X0_As+Mqn|q%(^R$y`=)bU-f9SoR__Z3EvR&u5&18I?FjjW-Wqt{$x@<6oL6kr% z8r5vSr5MhwT6l5&(YZluq(g7hvZpm`-3oY|S<+gp=xL9wx&I!?@wL zfH`Z@u5Zr$GrZ5c28i+?cj4&;3)@(h5a!*^tYS6~a8zE%H3I-dx?*tl$jAUkk18y~ z1SO_vUuqw`Z(RS3XbloP-(Livq{bk@DtLMQfu2WI4Wo@1NB zRDwY{2sNtoQ@;4DYkc0Y3>%YprZ_7*2Ab0?7ty}lE$l5QyLHR$M%LlWp_M+(>%9@0bq)tJM+csrvK$Hzt)d?VToosD@@(bC^st!p}~r8F&J z8){f1R8x}eqld|bx+I3MtS^IX0|?B)!V!>7Q7*j~NZB*4Mbd7$ zJXB)bEi+1vXbGZgnx2I4loHA^SPbcg@u}n)EA#!X+vmEwUDxGYvIUz#alp+}E_X`N zid%rLHJ3A<^&d0aG{KpW7-S?=#}32+Yf4Kz0~uJ23zx=RZ#&N>G{%YsiJO!<8A?(- z&v)k7FE9A*g{AUAT@hyv(?Kqr!_cv%?in`}iAzAFUOcO#+!3HUfusmgb19nPO9CN43wqLnZtTle5{7xUsh@4$|;#E^WdQM)50-;YW zy*$yh1NtAM4k?S2MomSj4IDktaE;Een~M>~LgCcogS_uymKP%ddC17pSAh=uTr*vs znxX;1Z6&_r7w6{84Od*duqVUQnu-@~_IBg*i%OU2&Rv)}`?VQ#`XC$^{NU_m@#}&& zswtr@o0Y(pS~z)S_L9=lNmgdB%}lNIbcXkH;#3zJW0mFR>Y+T<0$aBQ0V7FLJU>}% zYYSaGdujIcC8e!VtuV&g4V;*}8@Uz88=G%fwyXf%Zw<4g|&+hWuP zbfyRHA%rvwo`)9zr%^RZ$As|Zh)V;hR+<&w`jG~nQM`i-f3MJOxM`@8C^BxVk!gXs! z00H9<-r!~T*M+&IBL`ivvWsU2>vfl>s9~}!l~@XeWr9F)3J zQkfAgW=Q4W6bZQnBpa3m;0+62SzSIbTuWyG)y#23$;|PT|Uc~T^0N7U#8eW$?_)Hc$wbZ=1$=GCYci>UEnG-|1|$BOG(IBV`@ zWmZ18@AlBjLbj1Ux}(nLbuV@}1LK-JTc=iOXK9#Bkb!FY9=Vkov@LFPGhL;_8rKh) z!v4{&=Z$B4z|I+~rah!AhW`gi-{c03GeVP=79nxeP^!$P;euKW*U57VE_w9d+YRoS~rJF0>#CUU;rBPniH6>TC z53;>ac?qWvV;K*pPKp+?^EY5u+ z#EpA)II{BP7mfMrOGYScl&Q|?<@3!8m%L}XqHNjPwJjX&oBQnYoBV!aOKV{7?4`!^ zMZ0_Rw&2#y0f!iKXFqT7r-Om^_U`VE-r8qprlzLOJ=oUX5l%MFeDKlf#eF=`t0-Ec zxqAMelV_&HYNWk=V_Qd;`TZB4d^|gMBip|IwXN~Yx6`L)sTFE#ZSUB;DRFq;%;eDM3mhSxA>ErL8x#rbkot?^7L(I-hfAHSv)Bk!JZf)=E z*sRS>pE~~D?7G{MTn^7tM~=_5bmDTSxTy zXCI&b^ftHRuf6_SSMQP2$IqOaa;;FcRp{e&y%ziS}wK>_cej}tEYtFv&{)zWaPttAOufM*bH4wh^&#B`doSHmm z7@OKcORu!dB-wwz|Jj$5bVIP~KR33vbkb{&K7Z%q6UWci<6W(-|Jbmh=M=U$bK;%% z7v?tgY-tHu*Z+QQvgiH(Ix}*)B;m%V%$&V6&3rbu3#n#xlQ25L5%}*yIlgD#s zzX%4k_E+Pbtvk%%r7!v}PS&e4;Sg80=pn^!{QP)!o}XzCPqqJfvg780(lf+EH!pXu z&i1%h?cp!IIqsP~R%chJE1WbAh`B3XV`wOYc1(=~)m}BB?9)?kDc6VBf4a5%gE09b z8M)caET7hnOzQWh%d^wB7QTE`jDNG0KI<%3L;F4J#&DGk=#g?#;mA1AC?R2*NZ3wn zR8MG$sxvendyr8JMGXK}qjjr;{W~usawD@Hkn_9=elVMLt7ak5o(@)3x}J zQT;=AvoYT5aBE>7^Gaxw4h@MCe{0WJ(`(M&TyBmbL&@B2*~1US_nx@N8=U=+M`kTNOTw1GU=qv!ZFHvjH}I=M4-}aT&J5lgW(J@(DVHutCzjr z5ne|^&-2pmoT%4!xb>mK<4CnBv|J@r(lR%pos&R>JdJE7(>f{@;E^o;@K+e>za65_ zLO(r7?EfKF=SD@K{mBqvv4_RVeUvUGtU#t#kYRzK={)CkWJD*6WGu50+7cIyj4K9Z zmM+M;0vn=rlDS`gd_s0a<|nkgwW&qsGwM9*3Fc}yjl^vyIi8jx(xRj1Q$`uxAFuPl z-ALUohmw(-p_0C@;*S#d4k$;`? zrII;6nUsB!ETR0K6!wA`prLvd)teY`-3qwnWF>KF^%=#$Uo<0R)$u#i;LdRw zHt3t-atNPDz$`EKkfR6?Y8v0e=t1#c7O^Ldz)`TGBpPz}SNb_ap9g(lF4^}(X#7Dc zyp0t(zj*TR7o~KN54}MGiFD0aCKR%$T|~*hRyVGN(AwsB+h6Xw<5EB2?irH&Wl1C> z5j$-kz#K-lL9Q5vYesP;&Fjy9{D^ntCUT%6PXqC5^OsV}DAVF#?t4mxgI&MdzU$koEAeP7 zeckg09^J3*x!G9e&8B$Z-NbI+-`at$pUyR3R0f-RX5jp@IZxk~K1{=*hiZ4g(RzcV zHxNi@+X7jlCdV=fo0>c{C`==lew44zN4I;6V`lS*hht6g*j#XT*|{Aw`J>1h_iCe~ z3y0J7gKyT0$BdHZG=j!m!;B>N^(GI8^2#qjv~Nh92qmTwJ4n8ZS?Qg>Db2zYmH%pE zC{eI-D~@AV&62*WoU+^!CnNWyfuFMBy+>_(>2Nl8U1UqMi-OKPub2x5CW2Q7oG6`$ zDMd?B!?{>ULPp|9S+#S8xXR*zXn};|uA(GNTScWv^u2Y9^YPu(`_3Kk8inPHGh>a* zm&d9%VZP4Dn%b?WTX&C|e(Hc42q?)9rjhUod6)^OU`Y|~6~C>?+>~^)x#)>~NE1>3pQPZ@E=diO zQ^{2djr|-XFbR=stuT5}i6K%8h~u}rRoF#{$CA1CTvU-AD(-}|(NTdhB+@GcLH~#; zuhd_<6oSd6@&}J3KY1HtQ`wPY!x3H`+OsxC0-G^ds=&~0``%m=7V1IEs*8cpOTxqg z1X1ud8axxm#(_|kP|zoTB!YN?;BvkRR(>|Bad!eMpS|!NWA#3{SZ0ZV?NyAOd9{vn z@&C!ivr5%h39|Zv>uWBhrXf+*Wup%`5gTFSIU6$>=&8rSJ~{NCydt%nv(=Y zI&cdRjp0^y&f~zEEWQ%2!h024x9i(TS=U9kkxntMV+9TV-1h!H(x*d zOE$Ze$)tDgrh#-O%P`DY@B6JZ4F-6hdCz;+>-FX)QlA^m4#vSSok3?X7{H8jO1I`F zOSy9wkgCYsWDF()XolksimJ=?1tPqE@wNgvU}TcCJAUh0O}a^{ipou!Ze{4_KmPhO z`{CCwm`B;8+4sNsarX?vwA8;|L)U_p!AYCbVkf|W7)843np)_##yW;NUQ1RxNU*9# zpciQ+ou1a_Q?E5Jo(mr5QJ0qnyHKA~pt>4p`n&Q#I|FI}%LFd}ng!6afj)iOn_Kww z`ptAImA;+M>}Rvj!D29v81E^DdDrVb$DF2{fyg#b68S#XL;~fjEKZWL5f;it*gX{Gq^jD$3VldDZTjKw7e9P{@h>gU zYky`MXv$gZpllQYMsU?T8yv^Uv-Qq%b@atLrshmz6T`S!odKw6yka2Vpx4p=HWFrMu;6zh3<*0Iky&_SKX^%m)A~8)+jan={nIL2$EiTvLJCT_+(oSY? z?=YFv!m?E@tS*B>1Bt|fO+$8hwFuB5DOEqz~C zH5R&Igao!$6Yc1A&vJP>iLRhooAGo0sD#D$Zk82DiM#hyr|qbJALQm&Fizb z7$Z0NfBxpz9y|aq+@~$3AzxC!$}5x#dFb_^KOvK?3|{RV7#j42?@G!9D5;Y|QUv01 zcv8}>Qn+R(qFC9=r7J;cJ}VQL*{*qOXhh3lu_1)ZQKUxWYN3AQYKL!nA{a_&gcWv5 zBj73`RqUeg!&A}dlrL!J7IGkIDG#}od|eK|=1^dv!lG6!urR_7l zSQ+cQeAU+oVSaHrU(u)# zNKw;I(O`E^FyJ45PDDdv@kxJZTPNef(+V!c6G#N2*uc`Uq_@-zCA_kp&g#<3j*2$pnzGZgn#3kN7VK7WPp!%r5)c^X14uaC&(U7qAP93i4ig_0XaGGSkXFVtnj4ytUX@Mo54G)ct3{5P4XVO;+`6Wfgh3pb;DZd;x7#iY% z-hlz1FE}$k6dsDMWW3czxl}C?z-p6LQxD9K!EDfBYFH{4^UDQ%PH~w~C{Q*&&8DV7 zhv48~f8W4>KNJd2FYmlVBH~IImKzYM0@1*b)`c5vq(!HcNWqyBS86cwy~XI%)a2;M z$mq!UL^K|oi7kHS!c>qD7K;Rs80PbYxnn0&DpZ)8@-hx!d0aoQ#%7{3Q!_J@6T@IC zQ&VFzi~CuI(8^#~434QpE)`1^GMQ9q0P}U%HDD&k%ZF4;YI&1>yuFcTGPjaTcasZ| z*yd6q&DeoiS4t73TnbA-e;6ocz^vr62lPk#>GXPHc5Zn!wV4Jf1ZW2*r(Xyg?TB!ViWa;03ZRH@WvvWYqWWqKpIp1GMwC6meJ^w*ESJw|)#b7r;X z9j37{a}HQlV8|()Xl*2MhoNDbZKKhvKr2Q zpho1Cs0dQ&D$Ugy=1%j}{FldQT&)&LQI+AH%z8XFoQT~|q|;}VxXz$<)~5E?lgqH7 zcTp#mBW6yq>8G#m&-;5uua94^;FgsZ<*|4gVy5%czh3U>3N9r+S@z32dAuMth@sU^9xGGdVQeDz#^o7 zR*jKM16{p=@H{3gD&??PJT-YVJr)SZU)tcJ!w2&U3I$@K{nL(~&}`ho6*etQ1$-T! zUg;05s<;L0(vlL9?%k|69luepsSuQ~3W^1lmiT=5(@QXnc}RUr|SmBX5b8C?--eci(bUVbro&q?l{amu)5 zB7p#Gw1m%Q^JMy(&8QCV>`iEjI8|%9wVw7%SA2fo6vNFcelY(}iaBZ%u*)Qn2v*uH zd=7`NBRzM>vADJHtU%lL$WbUO&K^_}Y!9{F7qE}YP>uOLjUkpwx<$al4oehshBJtT+ zot(Vm1~EY*=$~9o#G<#U3m2*_;?fdc8J}BN%;gECw#`U*a4hs4++D4d7SS>In_R=N5Ac3(LU+ul6u?uHE=ZXlPUTHnW{=FkmY1^b7gi60T5=HeC<#*($Z4C2oh_FbDzfoeZ9TCU0r>Fp_$}!yAD-CLP-TA z;KNF((p`k;SkY9uw=9cx}8Em zVsbhWor*c>Mr5CcC0u;ipoqgIFoCG29JP%J|o zdrRrmVs!H6x&6d!JU$r?1Onlav6&l>TxOL*DwjyL0HmODrOu$$n^3bA(*c}fMigo# z5L2N+b(j&sndTP^v$dQ|-n^B*wUOQ1*i5CCSJE4c>8*u$JieGrZhO zL@5FBOwJLBWlELS0RR^XJPgC^>zRm4RPE}F+XK9>nVVbzG0exnRn*A1*oxts2@cBbs*RU z8IwV$Q6p+F4>f=l8jS&93xf$K9gZ9d^ghd^QfrCCTw-x;6==1UUQea(0W6ng9zM)$ zrJsXLU2P6U0MM3$B>-AsRvh3cfTV!N)*QUBZAP1)vsiL^(8sTWyUvX!91`1j6(-hC12Y3IHF~=BzuKLtLb*8X!iXxyOmonHN~? zQU5h_e zNz~6L0z=WUPF>j<>$4Gr`KQ4l8zV!i%NTytxn zcW6%|GDXLiH6;ZcS>wuj1Ma>+7!~45?Jh9m%jxyV`e<;H!M{kY%$gy4`lznTgq(7#l{UAITNLOvm6kyI z>u(Bfb+!*o&2CR8L&mE*d$eYub72!cQztgrdah6=wx3g+xkVG@BXf^=3hN zbeB`AlvXV|PxW^Or^A!cm`hX!DJs

pq5l5}!*g%q6z90=|&TV)G=f8}m0}{lU>y zk{~p2rAFt8PVOvE%##k2OeqtJUte{&l8;Qab`jK?wl&OcpI)4L_(gmVzG&d8;sIjloPg>aq{% z+RPVj3~#=hsc*TJ`r3i&F$^`6q`Ng|c7fTjxLX@O`JT?ctRtz5na4E!Mf!VS8UclX z<4)XQ0gMK12WHMy52%-1kPfmSTtbaT9i}ro05|8PYaM{8s0IWH?fp%6%6VI+CPy}n}wb<13 z#KcrI@zkybtsHnG<@`9c^z`1)=QnBuoRUHw;`l5vmkb93eg33b$%9~p0!8$zApmH4 z0x?2d%E~)<;BWy?abb37pr@;6a4fA7g1}pFo&X)r0w^8{w(p zvBcoDzR*_Lq5J}#Rtt-y-}NkhX@(0A{P9l*i;=G~x95W0?N^6fLM{&maR!+Pc3kP~ z8(KcznJH3w3q2cU-;N6WWrp4gsZDh1|-= zBi)_7!N>~>BH{v^W{vfAbaY(vg@@;LoP&xT*uXl#&F+4kQak(nu@!|-uVk}|N>y0` zT^#JX(&6(Dj=z)^95~D_E-n=?zMg@==*aNr0ObqB5;5Vwe5IoYc)3-$pkQ>B$H^~U z9a2K~=Y4)>?s8l)_z8(&aL>>rv zrFr@Jg{5VtFDC&sy>bcc<$XP$edxg9JQi1Wd!(nMqq8R%eqTFEH&Ea*9ifxf&`F=(&2;H_;iANQLaY!v_nbB4iBEJ-vb94Sp%7@bDovPx%u3;Y~5O;MD?7 zelfZ>Hxdd5<7Px&b~v96X5BE{)7f#kqjz{uRmM7W=x`pJZ&(QQbYAJ`3&-jzg*>jP z0#XG#Vxi8Sk%Xm^6y=v7a-n5!ZTh@@K7t9=DhRG17N+M$28QR~)mAk2>ww1nVvzkJX3V~+1(K!_e4NWEItA#=#k6p|a z$ZapeJy$y}U2ebTpWe{(O1MP;fiOR%!@Lt4z^Ty{!6K$we1FKz2Kc8J$Pu$pZS`Y=`<^W@E z_;6!pY9tg0jYXzsGtG<@Gn>^00=%uLtF{0*geWxNZIM*2LuGO+f+$reiKqz=jbD8E zXgm8bv);m-JGMbK)FodePaFSBhMYmV}BjhDp8>t63Y2#c|8Ev7KAeDYFvaRiKdC$?u`v9 zhD}#ZyJo*UmPs2T=9E2!xqj5%Gdp!wi`r~c8f}WZ2+>3~pCnfdbL6}WFfTPTrnqa? z{xcERMv;W^TUDl_*)D6*AD2IOV(#M@p4I9N<_fJwSpyT2$Ca4Psz_9R>u4iuAD+kJ znz(tTK2iO64O=}@LwVGz*WE+~(ihruLgvz8>9Yb0HoT^i=sCEtKOkW$_CtOvQefeBP61l59<1kxX zRmh5Z8BI0*n%2)-5=asr)7)~*8J3&wS)3E#ej6Gq$s9LX||dh?h$7{Zax0^ z5%W2{YFWCw|98i{ew}=wnwP9sY*gMtTOGB|Bg97KqUyNf zRBf%d*FRD3H6RP>+t>sAYy7S{q1mzA(QmumZ)B`($FR2zA4+!=b+S9qt;$W=DP5*A zUKx``wdscY)a#j($G)t;Rrl42&s@unRmYqyW{41rzuZder_qhmlzr3D?ARh|T+h&( z4u^-dwwh|ybvj(9BavEERVTe5aaYtJIHI$n9=%=PVEx5GHG4f5oyY5s)Ya1`&$oO- zW?M4&gBM51RMVZezfU!<&|f_`wcwsLUVpwtJ^VFo%i>AX7xr5)oGauuxa_m03s`cON)^xM(Xe* znAL432m-tw2B?5?+Hl&ftA4{_rYTP~2w4HEUE6x3zA1CAasR7#ch5fGZ*0B$i8uSp zPY=$Y%4WSk9eFp~K<%Ay9jR_;wp;4J`$PihXdta-FL-_YA(LZbayjtJ<^Ga;5&Zv7 zAN{+k$?FB|#tCl=i10wD2V&F{xyrK)a~=r#clvja-^+gf?e_J*8~iqKPJ{m~T?B=U z_mlsv>VL}4e#Be=EX)5T@&BK_@IIId!(7M-$=yB#qrB_=z%5k&+ literal 0 HcmV?d00001 diff --git a/sounds/not-programmed.au b/sounds/not-programmed.au new file mode 100644 index 0000000000000000000000000000000000000000..d361ddba216d0b2d6f894e7a47f4d24052173a17 GIT binary patch literal 22537 zcmXuLWqVuMwl#SAdp}R#bMJjmL70pJTNX1jm_cAUW_F;$Q2*fVd;12%MYJxTNG7IU+#i`IBIUG zI=*@I@`r;5Z_BS)B6>Z{FW7 z`y{<1eOOy{L;m*K+TrTv;zDxw!BIn7Sw&%aQ|XQJy$8q1S8FdeHjkbizr26qveBftK9 zUGg#+pOrqCi|u`ENN!YA3mTfPlou{5@=9d!*E?-DW)geV#d~uKxpHahxU}F^eT|?b zF|}H^v*DUt_%t{2=CD~hTUy4G9N$zFm(HwLwpPa%FX!Gk+*>G8)@-kpRaGRCFXitS zUdrn@gW66g8jg?!9=u zd279X?N;Mn^+9cId1;kWE~{4D-Fd&V5uYAkUVe6XSD7a*$t{-3Z?&zjCRaWzCFGgD zUw6Ja>H6zmC%^f2=BG!PQ`}#4-+zO9{5RG4Z&Qrjzr%BfRK=Il#F}oM08hvj(k3-J z1swjoU&Xxy9emU)yl@I;>*}&F;Tf5fF?FZ59G;QWx&%)VcmCt&#D%kXlLK)v%hjbr zr{nccdOTtR9GWc}b=)G_AL&m2=NaSQ|L#41UZ62ju*Yt9el`pn>wer@bnZM$KM>7= zlW*3NiELp=)9b$QT}I#k{LOahVztggz$DEc3IvL(()FlD2-!H6R4&R@RR2~?!(rMq zecZEYuAl#Dgu`nr0WzU16e*?6xC=pyeJ6M^8kH5%t@GM4##e2s@83Y0P~zwAZ8GQ_)(Hvjma-J&ew>LiERGBaI7 zBGDS%2E9Xp%^|M@*BNM{SSa8!OXDWBFY_X$@2AHBJgIz-Nf571)zZlnQOstrZn228 z`d4xhja?|_3k$2?j1HQx7vQE}e$kU~dAocpb1~LRA+jV3F1^lALE#G%Go@54kzZKI z=6#CWbqks4MP2`V5+>8?YKX+z_@oF=7Q9J}SWF%3XC`D=DB_uItcWF)GpQl9 z%1c7x>Eg2M_jxq7Ah%4B47-f-Oyp>HyV~vffXc|^x;?Y^T8nTwGW~$%0iRC55M?{E zQkj^=D||Q+vbZr>iovdav(d$Xq-NiUErmUCCXy7lIh?)(ABn^>MYrQq3ce)2OhtG+vWY49`H{kjp|&cNwX8Z6e@t&rog>aKJ6;SYcIJY2 z*pd~;;NYM}KPn~TFxHn=5kLrUan+gQ3NuXMCN`O^ZLAQySJ{Oaz5yG*)6W< zc9lpd;PH4YDqB=sRP}cKcBxn_5po#}e*Kp_TTz#D*ynM%{gI&0ADP|U*{&6Fm?S(F zizjo+=fZ(NcyeDZWN|rE3M2Q{=H!UeYIWGHW~(O<@Fyy{R1yw_L}LgP@w50?XySQ! zE}u!GP-wjTD{~`OgHEF}3>j_S`1JGxHW75Bzz8wMWwPOZS!Dz z=rn5Gkils8gk~0+*#tBK27w|l1V+KmR3g5p-Ts9Pv34vqT zx5mc;k=ff~CYj9Si=_?EBQEQpMm;c~(V1-S(2XaOu?p{eAu5VzWCTWniC@}o8XJc-&R@K+r)2~wN z%>Eq-1qI7YPtSm1Xu0o}_ZnKRRtiXX0)a>u{19@Rz>etc?H^EUO`cUD2?>K_W@JE- zWd7|$bmDgjk4+O1xApOk&y{UQ^ePIHxBAW6e58@ zqA*33YXO&0-Ph9vMxY%uyT?n(2uOO`*AY+zO-qw2ZG~(SIx8DZVoSdGZAMLBPj^>O zpK8$RNmPM=fMlenXTtG3#nDV+UNE^s&gf<#2@Qv&r>16R z;n;1nk?`c|ZV{V=#~=y3vii8qr~?bp)34TOO(XO5Ok6e`lA4~GgX1f-yB#w1_f|rQQ+=I}|Ngf}7I^BVlP5Dny(*XgGCnN@E6)=t z*Tt|jD2m8_=JZ%PR5__I^RJH{{q)N~)`?RokgU1RM>_1KbSRu@?=$eSAnBLVSPs4O zcXqK?y_pJ){QCDtPkVH^XHTSZC#Rem3;x_0L`bI_G{4U{c^a~+*O;E+v*GxWj&4B~ zQT?b>J*crD&RoPNW}n5qb+9z7TVQB4e*qlfnR>@wRy$q z=TneAlQBWg%FNla>KrX(7>p#n(O4o=0i3w<{- zolm0Y{jm01G8EQ#^b1lhmUR65*h9gS@o*S%(cuHLfI2oC$5<#d3Bpi;++8Ob9=Woe!XI(m-^N=N2bD9j6-~(bd$W^@NxA%l}hVafzByn5DrIKlq zy^z}lD#6RmnA>7?#}*E^7Z(=m3ItR#Rr2aQJKerWG!`H82S@y~4;4ze zyzOB1M!rOPbNxkIy_mzGP*@^my-dVriCdS#qrp%t7K;WvPIq{IeP?rPex+U_D7gFk zVO6n^$)=MTWjj+dO+v1q70=y>V|n9-nyj;dyd-d1h{9_w)LAVroyyW${IY zrA>#)*QH`X!JC=rREu1uR4QvWqoHRvKD?TnIXswO+1Q^<%uYNkWHUv1($5Qt<+f6x zNU=RWk^KDfxTUc8x9clgM@RDuyA73n_nILcDc5`?!nR4i)#%{ zcW!@r`P;|V`kP<&_L8f~*Gie9?Rb6b+0peXxw3w5YGQf&V?}ZC<>P}}6|xGYva0TQ zWBJ+hS8q1gR;DN0nky^b9lyJO_s63LHJ4l8A0ORSmVsyNY#i2>mDe^kUVU(|zOuHn zwlFhh`^mBsne<~xnGw~~qIu#GzwahD54KhoW|Di`bJGjkEj8uk$S)mRDV_ z|Knh9_waD%U2AoD-R<9YmS-m7lZ$&-9=_S#zTc!QD=93IR$sZ+R$pJ=eEZ@4(qeLB zJ-PVo;O+bOZTIiqdjE3&_o_m%?Al)P_`&s>>T>1%?UjYawcqL+uDsn?-#PgF`?cE- z_MYwUzW?&-_~_{9wX&>C(cIcp*Vy{t?ThW@naRY|@&S02{Nl30veMG>%M~rJwzpRo zR~9B`=aP48%gY;DYQRXZyxv-zpP!jqUEM8jIjU}~la(p2H!51Hq~$k{59ViPmJZ%O z{8%NE*FUJJdsV4?`{m_sa^Y}uZYdF$SByW9-VtAoFnKKY{8k(D$g>um;IgN5LGovJ ziF}%tvpwWl5;6B1==F55-b>;Hwgly~#*u8XLs(#wA?$i8N;o5>I1Lc8YDAK|7_M6i z5wXriB-dqPVwZKE;%c(rMn=AH1_WHYn}*BvImBrUov8>RURfSnyFY9tpkvS75jer5 znU~{o1~oYdooi1-oCz1gDMkyQFcG@ff|Cq}axOb4taprg!?1AT3w9-V_^LU%y(B31 z`Gow1tz#_SqjQn76qZQYjn<`zM7YvMqkb9olr;K6jd^@!;?|4h!m&2=xP69+q_{MJ zjEohR?=p3CD3V8{yPPH7>0>tq6?BwR*c-t$3dv&<Pd%bav_qJdOn>P;=+{@im_i$O@Z(A{Hii^ zKIzAuJbCIuMy65?falPVb`Ft~aWNAL0D;>yWL#{fK@rBk{_p?&*C$5IfBc{S*9n$k zV&=({(J`O3+XOvx>icg`LOeRBV>E1Z=FeCf@netw=fD5)RJ#H_@o)cjW=EqRwyR9! zY|NA$b?(fmQ>QL)`Z}}*W50ShVzY=Ny}$nLrw)x5dHS1w`%7AZWzcEsv7zAU_z3>u zg>z?8GaGw*1~db`-RjUTiEZfk`KMnxbdr?s|NOts5Zx}1Lv0qI;ba8`lA3bvLK?%S z0*Dwue)BLLR-k$O^RMkswX}18`OlMSgeLc(#_W}&@o+dOnDF%UY;p*IM>PQFJvst} z;OJ=Y?dwv%KKISHr&FP%*r3j}^Wf;d2#-QQQZJ?9L0RnY=~fwZ{R5jYSibsckGi+t z1O4vXQz=jc)o(D_53kOM=v*QuD=iI1T6b%^o^+{oYV|BUlVIuU(W(awoU`AbI1A7d z#|PTgh(m9?i_A<*OG$;_AMESy>h9Bmhf-iLhFPW3sI_j)`LF8&MKf3JW}D4ovc1B? z(gD6jRhs*{x_Srtdv)?`7|CO>xg0~5{EV|_)8TL^j2dNFzRIdrl`g_=;lH*5JVg_Ed%!|>~R`Z{n{C9W?Ci;K`irV`arkP-Jy=) zV0ej~L!cym;Wi?U!eQiOq{Hx)<9?%NKxN${5Pi0=Cpm0Po2~Xm* zPRzIPnN&O?Gd&Z#Y111_2A$rynk$kNO1OMk$f!|kj3bMM|H9mCfmr%x@vw+R#Ad_b z820*z!)h^GY_73ni8!~Qq-HZes7i9%tDb89}$Qf z+blLmVCj8HX~nzo5tqZ^_C%{hOi6`ORxHfTXVEBhK{+5&=u8HkUpeEkJ6wVI+^yPs zyW>HhXT%?fEd5YX^JeWgrBYg6CuVab71t{AM0_6TQ(0vX7snUpXXij+iF;iRm&X^3 z%ze1JH@|e)P*R*HU;(D2LM{a@GmAv#2<6Rf4f491FQ2W9k9l35(Li9tH#RdHA6r(I zi)E#Jwpe^wak;EOS|n!i`L*@89w=&+xJ(mlu|9Rf<^o zwN1*~^86wmkI53`OJ!xH<;|b&9Ive(yubeA?(><@=&*0pKN?Ofer{>47Z;T&t1GGt zMFO5s`nB#<*3|&cb36I)vQ(z5s=ohhCKwEijEn@Q_Ux31jY-&$Xsiv>qRiRro3gPO96m)mdt_)@Q1{rSa>vSiOLs8oUS}1 z+iQ;FbBg>UGBhtr6AHS|&8B{6-P)rUyPQ+=bMe50keQt1(&blHC*>uP zX&xh2Oy^g;^Vkw$izi%)GmpHJLGbhhxz{oLe`=j@^czuUUwf}%u)T|UA2`YGiTGJDs61e zYD(fu=7iah94s`GJm)YC=`=&3P|qW0Ce8}D5mkpXfA$6aIbn3*ZQ|C~D0ret{%d2bJaXS<=3I+;6l}9}W zjY=0@?0#f~z+8P=ld8`MJNf;o)0c=2jZH`wN<_~F2820y6kS3%cCVJlgHC%u-|<)v zO`lK?^!2G-(39VOdlEipR9V>=Jo!_^uF|#A(STnOhW!yYNC3+H-bcpNRA0AhsK3LJ z`u&O1XEUo*y?!hlMJgWd?{MY-t{b;Jq_IoOu8Bo=obCVY%Sfqk>H2z}=rT`ycj9zr zvAWYlgg~JDaZR5-!G>odakEb67`T04BiQ$IFXW7HP_0(?4#G}+cQTbQr|BKePPqgx zcJ+4~+Hep^R)Ixpa4eKdTI!-bkGjz*1cyeW?p0CFfMy+4ZqS5~Y3bQwi%RDbq0v~% zti$ezUsg6Q1a19~`yuDZ7L`iZry_%@luEp9PzQ18X^3|Yz1EPR!r>@J)M9hT-Y(C* zi)h+=aF+;Py-wHLJ)3^|)cH(Q(&*yBAcQ*)qCrz90Q zs@0j)9cC2R+i6gm$2vyI!itX*e!ExBrjm%VgxeM0S&h$z?CK5;DZAKjF`3l^0n~*v zmolI@#jcV;=Db|q^jUp!CWRubIttkABk`a&9yVx3xWY-N#TD_nZzG@xEDnjl(=c#M zX~-Y+I9$_Wmat6mG8!Bi4R}0}F}ts9- zzIC&<^>)LDwb}8w%jj5~bLe#@r^6cN5Q$U{8I8ffQd81lDEeo>PnqrR=)%!ud2Pd9 zJRJ6#v}U)>WHB0D!D}oQhe4$faY$&|rAw)qIlPsieMoPzx`WY`J3F%zVgImIZ?YS8 zCWp%#c|`%m60mQ0G%O<}B`q_D(J*E+=mtUIi_9JUvA($(^?S^Ei%Dm&*<7(b36V@A zU0!|fdOe94a2lvxx0AMrQ z?RIw{5*+pU0)PXay;3A#Q*dYu8iU2*aX1Vz8=j426s-(fhICr(puu3W*oTARP<#Tk z+tF}RCgxE{7$gRdCy;>{0%$HY8qW}a3ObB~I<0QdWVX3RV~LrirK!jmXwM6IbOQb> zCqSXH_yUoDNh08hEOF(e2OuGX$!d2vU7kQRl2~1wTUdD|FD_t_sT2x>4KC*KMPfdS z&JgE`tDjB9<3YD)*bU&~C@83jXmE5S7@IpP;nHbTI)?{XZ#I*~;&a6%1qDEU{Qai9 z;m)i1pa%rG+w1droZ#CNTy8Al)5&BShfQS*#X=67%#;)~?;ad&KP=A|i{)=O=O*Lv zM0C_;vly+TK7VrIbGbrRD&+I{EGCP|1)Q`*Dr@{yE0c>k!m=w{D|4&sv(qvEh|lBk zj6^49mSz&OOAl%)6%wIX!liM6w89lj1Y9ncBbLgJ=cYGSX86FfLxku z5bH+i#7rVST_o|2=z0yq4&!js>T?_dy-9YDM?;h7!V;cz z3^Hk(`7AQ(Fq>^gV_p_ZL?Z*%(m&MC!t78=8aT%*_aS?nP!I`hPdli!`ZhzzQ_e*J&`yHnjU_^zCr z%Yb0>(d6RngiAXABcWJEk`pCiCi^B1mX-#Ez$C*)P5VDO^^e+3L+T;7K(r0NM8}>? z1w3I6VU) zcY)W{8+B^H1{-Xi_);yO&!I3l98s=-M@HvBGcz+GKqsi086EaGoj^@78V!RwkUqT8 z**gk(X<1%jYo)BUBA-V_!N1094v{HdogN3!&JR{Q8UuU9VFBT#(;KW#-$J8=K>!&6 zi$tNa;V?KnD+f>E)vZR|HlrSdpuy&_yZoab?^q-fpIP}$As5lv3>t+@p^sT(3Di3liXGKJ1y^Moua8F2boBB$_q)ME$X z>IU1~X|q_&W``%7JgDH%SqzpSudr0aW8yIw6cSINi*GMXB*sR=Q)?d;WmOO7$6OXr zbaZ-)V|aYKtyIKjv*}ba7)}lxya57*7d9*n+iW%<+IT~wBVG`zK=&Jq&8)ntuaMn& zTi&Y37Z-^cbTST&$j-?|k$Fwy0k6mB9RXY+P`=DYqs{4#Of5AOikM6$i6&sML2$Fk zBnpW_XXbvG33x#tF}?b#;nVh1!0!bM;RFHb39ly=91)Kz=1a;%VgV5YMg%65o%bvj z8V!U!t`Vo*ZZ-@J8clZh*m7Gjp9N@03X21RQ_NwK33xy+6DYY=8xeo-Yc$8dvX@qq zacIa2=4bPMy`oOS5_7>!f*e325rM|^ReIr<+)9i_Mm#RN-C{DD^kyrV{PCq^T}hdk z%VAT9g@{WU1H?)?w+T<-Ly;q+aI|{V(I0VW_^U$-r#5I98ndr{am^k+7w6%zJO+bB z6>mm+zZ}Ub$$wlm6J`(fx|Lk7*2lm z+`QAaG#(XA9gDV#ipG>dV_4m9?HTZB+)cwgY#}y>1k1)ia&Q=#tif{_o8|JbXi5%Q zUO4p1-*ZLN9`1P@@9tv_jlkA98D!W+5F!{-&Vfs!9}@VUL&eB6Dk>*x@sD*lj6dlI z{$bTT76c6G6ydp?tkY>1PGx3ew}MWC#XJ3skHKWY=yJHnTJY$J=5Igu{?r}NZ9wVp za~Ub8&Zb^~Y|2Kut;T*4_r`^^>~qkxG#1I#Kk)P4fBK()K4~}JTY{yfo;q{pbOw~@ zGWU0=)OI2&_2jA3r&7*kaLDTR?!W%`KmO|Tzf9z%CVX z>cn^7oj!F2g@4}F-Tq(y^Vk3Ssk8qW0l#<#e9l8Lx3s-aA9eN(vEdiL|L)uG&Yr#` zV%Q&b{rrFb<8OcM(6~_fDqt5*eEZG!XV0ZD>mpCv+yDBv zpZ@W9(9Ot~Rq(kfFrJer%n{Q5>Pf4$x@H~F>_^*Ha`R6XTA}i(G z`3o1o)GslX#pMo_y5mv%<40YCel9!>z>{nOvDN3&sZ{-{!QldQ>gm&`PM*&|-%S2&_l9rg)Z8n+=R{sVak$&;Q zg_O)}?%42%UZoiT@}kZWsb`Q0z&IjPD()wrZ$zT=$#(^0R5lC>M-gbUI7o5kp+TL| zsI&P-cj|6PN)**fK8ePlh;obNg%vUhhe9NhsZ3tkynA$E1O&XrX0W)1{bQ>STjbSz zItHkDB(|t>`)Efg6*542=kxLu^P|yuryBr4ps?88iTR|wOvs{xp%8#%B2iX0{CHVb zEarm*$rn{k20_tumjwu-c2{WbwusB3(76Hun?ATIK#|ij7s}1lZ-m%!!i=$S6 zVIHfP*(qLF&+U~&<&7~Cmi&Tg4`L3&40Nf%@?w{Tq==(M&U37 znxM3PeF~tGM0|W@YIbQV9(4Kqc2B@H5|1u?XeyA1xO@toMZ^&>7$SvVvNsTLZQ^6w#Fh22@o*4~ z#}tX0f{8)rf+O%@Gnc`^5vZWL--RPKUEHM&*fs7E zb7Z-WMn`3nvXMAwc2*_|ho4{YYRne>#Qq+)P*Bh$jRhU*h`oEv-sv1uO&8uFfZPsr zK12#ED-BgZTen#NCb5nr3K@k|g1k`XH=2E_0b6IcO{Hy{kicN+Dd}lYz%fFzsnq#V zbH7I0?_C|o;VDQ8R~+*K#NIieeylR|MG6ieX|M|^px8rzj{!&L_#KvhwO%*UC?jGp zIGXTQz|=pW>*&!w>9cFS>|$(MM*7(dC}8T+A!rnFH)vP)skPd$vKWsc(MtCd7R|um zKo96MEhbADhXPGWzjO%#Ny~(!K{3R7mqF9rtI;@iODH%Dnk=jg*wmeU{ZCceKI5Ff zBpU@gdnx@wCK?7qflw#2W-Qi$4wXt3cz2bIB9fSE5r<9%=*(`7Pv<8qi5Xd$mw@OF z%gTX5VUQd=ch(8A$dfLuAy8UQBZ+dqOoo90p+~FIjM_&@d~zl<^HM5kMzY|*2a%58 z7kN~D9UvX33^4&8k0i0gGj6x8r%R{l-HBMTbEIh*=!+>(K%1h_Pz(XVAD5u7fDrg^J5EMQKmxqLsvSE@fpT4iNr~RoxXCrf& zFr1hNdP&_tkI}B%kow6;HUgRhNlnWD9S;sPG4!1gyQ;sdy=OqTR7ip6pfQaBClKzR zwh!0_XHXPe8Vm`HAz2wPB0PrzhawQze5XP4q`l)wk3A;FX2EfEG3ZkI`g$H~<{i~= z5-I}@M|BBV%l;TNke_#9KPL*{TpN-B&<-N1%G=1H@Px~tqw;?d#3xMKj z2(k=|XP^K}41u6a0z<0y$4}ck4c_PE92l0uoV9_O9q8=~TyH`{;Tg~@B$>vd5P{zS z3(tgQq3LnG>gl6L?cKTnACJvKaS9VQvtv92@VHw`!VlmmkX@duV5TqaA*vLU)FqF~>D=2OqUA;PY zQl86TN$XyPM@C13qu$Z!5(W{E%0XhtAWs1JLuHUCWME36i5GoeT@wSqZsYLyqp`)s z7iCg~tg8Ozhj$_}iGahAfYpYd%c0W%n@r~L7~;0)afd;p1>T>py>K8nF}szg$P?YW zuGo6Rrx6Gg0-3>=idi5Z5eZ~EOC-o`TX&m`S}j12?!@v`^5e$rTJym)FnbOA#1s*U zK&BMdT;40C5m5-Rgm?m#TN!t2`}+F(^jvJ z2sjKFXkgh0VykUX-|?guR7WKOo|z8I5&5j@{ysp?5AIM=5IBOo8MK*Y$n^6U&H#oF ztB4ME_jb4Usci?OlyhmB2%#77@{cm4G0T~DAi7}Pyoy?q+b`-VUW3zpKxQmQ)%J^*U>Mnqrb8P?pZV@T{_UGHOl{|{zdq?U#jD69I)Tt8 z-_>-q_vp+GL?Se&&Dr&+hj->&2Apl}?sro!eDfdw{+E=6?nmt%Jwu~A`}>Rlqb@Q87|nxoC(l7&Si2vqR-q>VcFTAMOgX(e8HLFST4M3vh0n(Az>ek>laSaS zCf!R4&yu2PX?L@X94^~jcJ~A4*EoRUhSwA81|;6bVmW?Vdz zk<&QX-)*90o<4cvB*LwJ(xtN(B2yo6pf41gWwn%-YbOzz&iTPXP$v=|M>(FQJP`kGv3gJo0#2evUn{g}-j z6T;I{Gjf(QhAJ3{8xUMS*25pG*Hr%TahjQAu8|n8%@! zSz?h$a(N~01$~jp3gjKD)fY(|H5FggU4Ih~2ZA#ThecuzTP%{~vp8HPM<8n4x%Tc>QLaQRQ`~r8-&Rw8 z90e?q-7&gwC@=o9Jnr{+gVC)D2|u^6Mk?Vm0K=ka`f{}_mrbIuxWz3WHX43gP7He- zR`8tl&5bKBmSTaiNNi0ZV$SCWlCS)MF{{CIyOf%l3Clo8#P^Q#DM&Ot6NN@lB&!Zx|I?1A z?LAt@p@@X%vm_BNXxA!3fm+@~P4BYjiB|b3$QAGKF95wdmBqu>wb}Yx0oKWPHWk zR3@O&@ql7s$W~_JONC5OH$mm3(CPe^m>p;&eZa@5(+>?<9G>waHjRYGvd9z2P~Wza=p&@hnsZ3(x&zpJC; zDcA@DTC-=dm<1RYpf%&sXz GcxEy$aFTF$>g%hSS&;GIpWavcXxJn_kdsMf#vgI zfdJ?TOdf*(NN7xU777cPFdV=#;L$V!mdLxh;QeZU?f%!u0L&Optkvi8=rlHq@)eQ* z12YPZLIS>C4)peb_y1}ZwRj?nO?+U1W6)?s!q*>RfMFL;!~;wM z)&-D0B)XtA4AurXa(jA!%B~$UyJIU#E)^Ky0EwQ1L}GAQpn8!=BnpGY<#Pddd1wgG z@jCsW(drmkX)b0`$iU{9ot2Z51G*{-jUgzIDX;8rY(D$)A$c@68TGgT(P+0?O$LL( z4E)%$Z;E(KA{LKB0}TWR;*SD2bD^a4#;eWwnThdeCg{Yi77c@Z9|-%$fUkQxK3_63vpTtP^f9@=y|$TLSzg}# ztjsGYk+8W`0*Op!3561AnPU1tIecZx9&`aB=7yMho*3IQR$0db{5dk?8ETX=O6q8@f6;~a%#wYVyl5D* z5)ZqO4h}<5XC1bo{?0CSkcUdScF>S)+VaJ0QrxLm zb@yqseg+N+K@gj4Iz2$Lz%-;)>BbxBa1Zjq=!l6LaM_urp7n}R0uhxMA?r|nOA z2K}$(`E9Fn9za%s00fX|^;m>~Ly;^3Uh=t)oN?~_nNw#{p(xRkV^H1s>!YWgD*MP{ zf$aGNIG$p$IxOCXL;puQ4u}eH6qUsyfQoSO%q19_AX$x%*)=_&7wj6a_&?{}hz49v zmuoI}JGLJ2y%n=ysSr4v#$^jB**RGNyOFrR?JY!SMgRov2guE8vO0`LhsPbQpyB`_ z!`~7Rh*(mwgwrrDqhsN4IFJ(17&2Gxw;O=VNu?SD1G3rOUtPJ;KSTntL<|H9pu|x4 zqP!b*TnYi4OM!t#880Z^a1CnJz=Wk8wAsuyhZV5vlkb|oG!{!l93p^TK>Q<RH+K~IUUltPFIvKkex3?o;W&NtUq? zIKP-L0JRESk4D4cXdDiYMPbod2xLwcG6&7u3!1?*+QFxzuU~6&Mdx?RXyA>(13)$W znyf)#B;kpG0YhYGqmbDc-rA^53(Q|no&f)sT07_nhi2Op5+EZ}PzW5jk_i5Q(Shf{ z5C}LFiol6h++bBYJ32eSxWJTI+@q88`Ft*0K*Q#sz%y_}zyc63pg#w0Ffe1;`22(e z&>fxsdX)jqklpQHuFMzkIcyq@fF=+@JtNZSz@ZM*UpN$=orSrNz`IN)L244#KU>l^QOWgNc#DcXHwEo0&(Sh ze8L47xGsyicgU)-xePXMcs#@>EK8)07X&;3fw{6Ub?+2igJlhN1OUVOy7%!A`FIRr*& zadi<23BL%QgT&^@-prb`1K{}1VE=$sV;(UKdkr3!=e?4hUqInw5f}u9Ma=u1K*9rg z_aX$ANntRChi%|k4#*H%y~}3xnQUVg+hQz|Tlt#IV?mJ^2uVPyY-3VL(9A60se~i= z{C&3#facB~wc6;gdfYaT*E$w+t~Y&9LN&^VRFQyM$R`s)4J2ZTU#$kfSqIK9;<@bn*sq4x(AF3 zgU$jZU~cVfGUNtZ-|GfVy~(V#_<(Y0^UUw~WaK-wD9#}cz(!OKfeRz^5qKe5Fi+5<)>O}Of-6j}YE$w3ZP7jA6o zPb6Za9+_vjMQ$N4>p6=@#nD3K&IWb{e;qfAB9TO6=i{wRgeOq%=WC*pgpM(;Ez?n2 zv~^@%2y2#GSX`H2k>g=060i^WY0@$SUNX#s8?Li*M&qkwkp`V`*~vVMLxEEJ>BIpm zhNU*b3pJ%!cZrEaGS9-;1_-gRu8mL-VJezpgvA!A5iuMTP)3~uGi%04U$GtJ1t#M8 zxkE{2p5__8Kr2c!$LC;fB_>KU5%7bIV&>EX+%nBgo)y(h+})f_C<8Sfel$G2R6eo2 zfVKM2F*mAikMAbZ9QUyCDfV#woC9uE@SMVRz7sY115Sq-nX5~LBxG9|XQ82RPH^;Q zmox9ec=D$USC&P-f|xLrpNvQj#uUN`Yq-92IIl$fWv-T4IZm7pGRI|eOT6gEI%(l@ z^E%xb<;|^Fc$H(JYOIM}#M)V4Ot!`OqM|pvcqu;=sfiJTb0R0hQ#C4@R#M%J!+Bm< zFfqmseHjz)HJ2|k=NrcPi$`Ubo5G}IoN7bOhnP{S6a2RUtIHI3+3I>*Vu9_tyEaiC zD~MA(mjxk8P?28{C{@Upo=Il+W8~46;)lNn^4KE_I47xORv0Y!lD8d3S!*zAl)0|L zK^a1L-ZdLhgUGpYoE2)8QEV6+=iMAym$fpAwko#rqKh~eG3LYAi-&((@Cj#mfpzkN zWU7E7Upo+ud>c*~-rTu*M8JsDU2v8os^XU;?^ zrA;&oqj{-Go{TWV^Ou7Rj-66nDpkznmO64}%LNmS!m;V+SL&SWw>PJPp0C~G`)z6}$ql{iTwg0W|GqQc71jWAb8G|7CCXR>^j8BK`R zg$YhsoH{Od{V^0S(-9a-T=oQnr9s7qVirf4WeB(EMb*&Y3LNeS5ji?Wwnn%{>7;9! z6}RF70hU)R87awC1gj`X>I^++6d$L4G>~k`u({M0iM`7UGiUcma{`G#u+LSLU%9n( zr0_RRy%mgJ=B+NvmrIGqOxCn`fBMb**vf=)B0l`%*i2Eql$Hk?lA8LRro7uzoKi)} z9KU&Saiz*1p59vVOl;JZ6p#c|sTAKV;hEkfYB3*?BTI;R&iq0KeD|2na7|57A`#v4$Z_1)jOZT{lls`z|#Olkwq>SA~RDjoj;qN z2^2z-M0Px803I5<&N;GI5s0>%6LH_Pwee)?ni?Wd1Vo`=K7 zcOHyhxd)t`6DLmm@E`yA1B?p)aq=nxc-t>fx`P%MdLtNvzghkiTluh>Mqw6p>DINI zW7n=-hMM{xP+P)W^vwB(+$WG20Q~Xf$rAwEpAX4`U;g;Cw(=bV@(l>HK{I~t#EH`& zf(F*q$+JH`+>gF__86+y|AiX)@v|2IwXUv*HxudlgyQby8vy8BK7ac3u%Q6n)JYh8 z+}r;GY>t0|egw+!$G<#%_Tu%MzgEL!rT6f`?JH2_59e4g#XE80)CpjmUcGu>qxk*? z)(t|4f5S3Qo{=?U8Z(9L8D?nr}!8bG$!(|Cmm_&lm`{#fD-_HOq4LMqG*VZ{ia&P?J zaQt@W?D>(A;m+s>`st^8QfikAue^Eo3?463);{Y#S7<7oq=Wu z05iDG*%2s7ZroOp^y;5)U;XwJa9daigyqTem+#(x*?Dm7*2S~u&z?GU_Vk$%_zj2_ z%&@QjbY+4vg}=Xh2et&zeg6s&*5hBEJ$v~soVQItC;8*Wv!{TN2A_f{`{^_1FONz` z?@ZQMkc~t70UsNnMF{$f<-b>AnsMoU;G}_C6gsGplPAx>)c`WPdiTBrbEVfleOP`D zLqaIWhKqUn+nbMnhWpsm=(TGKQg2_+=Pn|PVjPwfc)c6U|hU<4Z@d~KvR3Q{O;rG?yUOm?a`~3Kv{q8 z!g=Vo&!2~`^~!^LX}=+pk|OFTZ@X{QAwu&mX@ew$}Hx#|P6AP^DbE1PL}| z*!aI_~`i9^{e;CZ(Ijx zabjvp)z9zNKyVlV#1C$68SsFw>(R|v*-Ic(5|suUA4Mdi&>-Kvcm1c^*KgjrKd#kV z8#(UF`#;~mdbRxK^~b+HhcnqGuGmk^t7~zPp$COjyrRhlsb^@SWt34&lYHG)jY5E%@9>iNwm zM<+JJk@Y`5eEqr-&Cbu-OiIbav1zqIr8e6&=61-XkYkqMVm=v-7DRq?<=g7&hF_}0 zdmG49)^)rpHyKMnU>z#SdXw6Uv!D0&M7W>W{d_@ ziy|1}uzR^8Q!TDBjU97KY+Jiko-2}u`9sQXGMZ2=5fC!8z(wNzYKCy`DCL;jsdG1? zWwMk=Zxgnoq8rBnEzt!s_4#Ustrsf-B}E^h<2boj;ES1!HM-ym3ZZtV;)j_zI`4AT z>PI{6KGlwe6OU{*gU*baLryJ1`WHx(H8e1hbyg4?$Ft6(R?9M0e3#dH*C)g1jo^*~J1xkk_Y!1DZnzb9Lz1ASu>=Ltt7AHbIK3gv^ zOubPT*v%MNQcX*y)R@uJd=%{Ei}`GOzs_=8wzAWiF`G~YiXl2IP;XUgGj_k5B&lGv z?DGp=qn~5b8<8+wVtc`Afn@~}L*!`V(jBl=Om2)+vEw>rX??HM{#d@BpEE;rjxkjZPe>ge?j#G_H z3b2mN=;~18wVs{>X&r%UWs*sYm7LLgXIvewaL}>iTCGm2RAXihVnye6GqKpp%GwIN zydceP9FwX^>68TV_QbZsY9b#E>KxZ;u&HEuDTGO2mz624u2670TbsA>wLBZ$O4MpVhYOI$ZFfKxxOka|TICr?jT|nt&&a@i(NaRRVWZtiC8Q3nKB3_*fi%h!cOWF7cBmA ziLb@uG*hb|9xqyqD(S?yROMJ87V><(z@^1rW1w?1_)e=-;ApO}s8PtYD%CzsGrWT` zyE1fQJ(4Ky3B@J*T)*W&iOk(L{7(bM^a1oMv-7fy%bt9w3dF za|x46)#Ia5sn+BGLBC#$I(MqgY~=gu_b=bRCyJ?*j}VXCHr!0FZwWY}GBI_>+#PJ@d@^L{5HldG*p z6f>2$8p{<6ba7_3u}7*jW=pM+g{>J5+v>bVhfgc4A%Zj@dd%qP_KI0wSFER)MeE^? z6C=E&hwu0ny9`}sYWvxAJYLwZa6ykvtAbrhtER)r@ql|lg`7?~Og zRCjZYVia^yLt1L0Xd~e~LVUiZ<`QISy*e{j&6Kx;de|+o8P~ks&=*19z z-`3f(h)+x^fnq$V0aL>=&CHt@9dd~lw^d_oBPei8wm~}l{@~1UOK9d2nL?%6nA0Pu zN~&=an9aINm$U4k&E>0wwnuDr^3{;nRZeXaaMGJ+2x955S=(7`)|?#z?;IR&7Yd;6 zExW`*u_y$@9;ut2d?=$ZrR%`CfLmN*ilO7{5oXD?AK+QAsi0fdd2fp1nWL%_RbZL` zF{SYf$NnJV47w;|zfeer6Sa1*DUzO2X^HaN)v#TuwMMd?i0e?J`%q}|Nw$u^PE4v)Au!058|tM>sX5GyYY%CH5E)W+y@EI|SXKoSK zsMQ$Qcc@UzU1c}JG|N^J0%3)1RWc?~C@`I~oPzf=9Nq+n6^=bV)99<~T z@nj}R=b@}fXUhDZcdyso-R&JUTFyC#yWMMxOE!xUMfG43qC=HhgV|&v1G`n0q0{Mj zl7Z*Fo+wkO20<)6h}EtW4sb9Zq3l+x2UFS>xfFPX#4^RgE(KTBs8kxQT!~=r?FJ9j zfeoP7tVbD6bfB2sLg>{hWYIjWHnopj+Z*u)Q*@}Nv0y)=m4e?<@91!TJ|I#d!7cFO zV4>&tSP%B3dI*ZzXQ5nJ`5rBadmeZMRx_fIE94JHRj5ii3E6} zXe>#`;u(g6H?`r_L-dUrc(|aRlW8&XkWEB3;LpiKA`E*z7@C%vluoM|it8r9hrnVt zy1ZT9hR*i5WHKo(abl$=aGRX9VH!H6m?*;6VAD_wbUbY05p3=biv>5&HUq6n$T{mF zeL}gINC@Rxt!27C0*#mZ!LZi??Vyh91f|OqkZ*G9g zORdqYZaWQn1l~eDCN-cqVQ=#sv;qZT?_glZ2@|4#dO~CDmSOh?IpbC$QECpH?mfP? zU^9Vzkj2&KoBO;l$S2{fN^^yJQ|vdY zHL+F~t72!N>t5h%g8$HCGwY~%_w3MAMx)f)7G_Dp>V8x!aWs>Gd={8Qxzs9T%RA+| zkWSU=2P(v>l&O@mX&Ly0DRqt=E&^1P)s1L82CwJ#5#kG&=Wqu!aC1SizP%(CMZUyV p+ms$RAh?}`*H$q;hNCv0v0Y#`!ND*_$5Tu;O=DuF#m+As{y!CKum%7C literal 0 HcmV?d00001 diff --git a/sounds/thank-you.au b/sounds/thank-you.au new file mode 100644 index 0000000000000000000000000000000000000000..2c15213d4f48bed6357593d970d6d1a5165b5d05 GIT binary patch literal 15047 zcmXB5cUN0kwlCW66TE-kIOlYibHYTCL0O=jBgz3VIXad@;p%U2&l~Ta?yf2aY-3|G zn5ZmJ&Knd^mIww+cFuO)<$m%QmdCK9z4zK{&iPBb;7V7+U;gr!6My*&;wgClzy9)< z4BMq&!;+k3u$%q;ue9`9l> z8eLxU+Dt~BR-@G$%npwaimbMY=p-Blg@9MW5hy&BB~%D#cr*%yqp<5gN8JlL^~|%0 z@$qLcQLkhTSO({v1k;$5{V_z*wWg@mbSLGMnzrw zLB!{DIW6;Mo6X^dqU+yVrE+;w$LppQe$hBnp{Aq}1Pt1_EB6e>t<)-6D~yn!k6oh?p#H{l!H1)rv|s#E(W6Mo&D`hED~4>M$!jY zF5UXxA_5CVp^JoK0blX=ov;V&KC{)~UF%@su^2QOM<7yIbP}G-rZH+bHOf~jOCH;T zdEV~u1(s9s^>i!}4hI)~UYFfsb$NoT9V~KHRW*?zz0vcwLm_7nKz$()s45y;u>(0R zCZloQxwv|}T_I`c+)VgwW|P?+K9DmhRn-*1rKs2K0vm2=3GxQQiM>_<18fOQRW-f} zhr?h%wGt@2w)JJN-E7bqO!G#gL2opg<}Egx+n?CEEM*Y!Rd@o0CH^^+c=5JFrQkEj zBm%w~i^bsZWI9Jy*YP@RH)`i*r)TE02D8(jdVaH3$mP;01UwFlMWIocDl-3j*a?1G zr`PEX^Y-W!F_lOllSm{2v5G{c@oIW95hv&kpi1YhPXBT&99h|It)W$6FgPMj*me+K zf)>-)q--jgLZ%CpZR_C>xP4wIoVwnrlA!I7DY+xvU(K7M;1a4i^r ze8oC%nzwmF>90)^Hj_qYOE2w4eQu{WnB44;iEHHY3(eiHcXzuR1avZ3P|!8eXf%e% zy08;;nim$V?#N{kgD$)pb((Z@pr|wkvpW!pM<5>r_FcDFz~xYhpuCaDAFT#M;xu;e z?QFl12?Zi?{kCsjKQ}!!tDW~i$*r5MGCJr<;5@6ToZ61ppRTsoH8g+NPWZttTbQ?c zW9xhS8{3QQ>fp9RATs^$h+17sf`u^_Q+n294D`hf8ol+>^@|k2j zk-};E`)bf@HiD(pX|)=YdBNsgPHnUZ87vlyNg-C_Ft{orxM_3>g+e0`C{(aze#u0^ zz6Gy&^SnW))9MVy1#k*CqB(2B8Xz!Vu{U8oPdb z8FG7lPOm4lo>=lYt)Snzyop<_LMGU9BpQXK5=#Yi8oNfSl1b~kE`B)7_+6&?1+&=` zO)5ovVZ(j|ve}%jVCt(%$YC=<5#COCoetmPcB2F=6WFwvY9d`Cy%zR^f=_O(Ec=~i zlfh)Md6GBk>gZ?;je#R@1RUoatn?G}Mq9_6{N48D?W)uh-Tgf6lDFfP#~2B&$uz9brxLer&A@^RAt&*!0dCOgb}Ub%3etv`I(| zH2hUavW725m%^&i7(P|$@Ol?qnz5-_69#EpNP5J^;mXsf(cga4@V3zBj~&H0Q3b`6 z(Z2EF3Do&hN6!{!pDMZZtoQz%f88C{<4U}+|NE!ln6xbLa?Ze*Ui9&^!VNaA7*mavd9_nxgS~g}-n;YLA9n{F z+=|mb9X)mCY<^)$C87!ehi9E92y>5?PmH@DC$sqY@#1y&+>?8E?%u!izyEc&clepD z90m%psA#VqR$N(Dlzlo6RP*_>#Kk5Fp&FTi1)>&} zQ&5nXe?FJ68KhJ!3``kkq0*e}?5tdheRg!9udnys{oej@O+bPzLt;t_u%!I#Vpw*5 zA?mxhn&mh77Ib?RB?VdMVfcW4yua`1le>3&9}G1^K7WhS1GmMaYM&mTj zc|>AtSz#Hm)jB#j*w=UO-oxGpqb3Kd3uWf$8IBzh3uY#TmCXw0X3ic}HN24`vYt{0at) zFp;FCUBIrnpc2cwZ*Om`Cie~#%OStp7l}us@l-6j8Ugsm;c&$_x~G^aC6duO#SJzMT%(;y4v$pq8{|FB1+Sqe&IVrDC<2#+qxI|i4L z#;G`J8D_aPW7*UB9K&9;J!r8o7}%0362Yd{jtmby9UiiMwaGAL=TBy5Y)jZ-j~FcRTsh-Re1N>yumVMH|x_RZclj`t~3|+g}^d4wfnX^x)2;RUjnK(8d$+(WHUZY~j=ngr>sa>_q0Aw5ce5K|24wa##lhQR9 zAJnkwfnK-`#+Q)B)#xC3z-jIargfWDT>Z8e0LflINO_xW}g@rHGoB@Z(YI2OK? z9OR2VW`k*Ve0p+nc78Q_NFkEABs7J=FRL)d(Yv!I{Jx$Bm;XsXky)4u#D#5IeA;^R z*#x;`?kcuX&LGnj>9(!0*~H|i!DCAhv6ZD&6{TD;CjmCC#%MPBFVr=$dGMSXQ!!@3 zS<293a_Nkc@@hPm4^5AZk3Jn5R~rq_(ad%<{-sTCniv|Ne5OxvXo%8+)5ne-{psk* zGx_*c^-zC*@0}+jeM3H%Wi6v3G9ytWD#0ql`&)_PE-oHXNk$f6-gI=&4NXrEjT!^4 zTO<^$1YJ==j=gADnDzMq@`a+I7A&l|s;Gc)sU>dGYQ{!&v%`93##EI@d0j!(zC=e& z+XPx29)-dnVTI*r5|(eCHO`L>P0o&v8bWqI8I8hX$`RERCU4KPkm#}-P1fY9J6=t+ zK{%!}!-DiHR}70pRtK(v1kbIk`Q};lYc(##j(!b=s=$&f%X$9&2E(*fJ32n2i3(q@ zU<%MO1U3vU>nA2AXZFi6q~hG1ypk#^$vvsHSd5x^mu_M0dozVS@5B((Y^MDKGCs>G z_34nr#QZ>TH$4twxy+I5vv z<5ye0e!rOV#8?c!_qqaKec+CHMIvU*#xwzm5Cq=Qhzur|iA7fn0y@1v<~C>z z&~ohamKa${+Op33FV;5Hbi~@2zb=@PVh%fK{!F0nMiRHk04!Bg@KyX>f2!#q;j#Mt z=6Sb@$O1Iq=n$i+KOY8cp$+$f3wmFLVas1Gz7<`GY%|eF3?~(Tx!F^{mA=pnK|7x! z(Y54tL5*Cw`H@d&Hu*Galf$CbIBo)phQ*Qje5sI(7Xv!si3C6!fod^u&>ICz44TTl z0C`sAWHcE9WZvO5s5Lsh4f5C*OwLXkg+`^bm|VrjfZHGc%B3*mttwtMyc~|9isS-n z6@k@}j_v;P_H`0;BmnRo0R9@B=|*Yem!#L?T8zAtw7#!v-ft0ibTs_(D*$>trIafa za~Ncb;{7)vRTPK(;TATZO{EZsvfVd3algyy-?+S=-p@czlYYVGaF_sffOcBs!ltVo z*S_C+wY!x}9X3h%fUz@~G$NTqrqF443=&Od@MH~_uQiC|ZEasJ)pd41_n3`ZtzK`O zH(Q+!w+{+K4wuWb91N^nZIm&Y3^J8QV^Hz9AA1~)t;XXC1e*Bm#*IvPEd+r}G68+V z;_=KI?cSZ9^eY92E5EXy$|RD2NMyF6nN~g(s0E~d^GQ|Pr?l4t0XDSXt`tl7^pTmCxWcDaFqv=q<0*ltr@kVv?^`q~C5kATIXh-7BnwKr>> z5?TFgpVw@1In0h|YVRQ7U)sCb^1f54l-9Lhy?Q~a=<2Hfv=WajCpX@&1{3=oa-pc{ z)&-vI)5~j3id)Ip^Q})^--XobDiQ@y7jDR)u_VJBn_VqU$?bNI9#r%VG}3Fh$!B#rx zwWz0Orss4fcj6is6abz~;`Myld8HK80J;v~A{Hztn1prB3WZF-<4LZ>0B`p?Eq0e@ zF%0C<5WpLNpc`~1n>(J#e7f3pF&SD8EA3+RLZ8E^^Mi%K(t!%+1;V74pj|VNLKS}*4DS>WdImDfKUt}ZX8x+U_RNF)k`MVmYN z_T~C!XXBOq&F6n_mnm=F>H%i~R5r-#Tgu$}`P%h5K1V2&ig*kvXeVqYgD+r`tBEv` zL?lxkM*V&t1lG;&a@*#uF0UVGbWU#of})v~^>{S7(<nKr`}4!ka-gn~@YQ4{Q2)~ZuEjw5 zP$?AE|M~e-&$pLf>$yw-DEYja_K4lIVA2^D{Ht4QklP&!20V7};>wHEZ7#8jNTac6 zU^7bON|}gF1yU1%O692j4E?C2AQXOnxVsD(pxK}Ws;*~UCFAp0%-W8+#@pNRNGiSY zd9Pcc0!kOSm70Pga{4m)HGZ_>$C$mw3Z&1LXvm23t>C=<$Lm!gRS1^b6+O0Bt- zdeQz_ab+tJ@H-tIC>KDTqI z6iKaI#1viJ+yDCQbI;E*0gFm!2;0>9{;}Rciq!uv;ylvHHEffY0v-a#-Yxlug2- zz?MK`fOd!i$`+6x8#+}&iL&GBtzXuCE{7)sMEpp4CB7UF2fWq=AeY-6(CWs{&5dL# zvbOW$rd+D*x}{>^(SVYGE=gg43!%{X;#vh)+|(%9N825ZX(^5_p8ysDbamNs_%`W7@Q zAV;dzdY~s77hK_$T0WP_Vslsmky0v>2m~w|&>g|3W(a?|aiQ(a9-uIwgj^o5jiJy= zPuJD&uXbJ>Zmq7rzS`B%)lny6(#RBMP5t$*&d)okm7Tp$AJ)>zOmfNR@%WY#>q;(# zNMqIrI4rJ+%@@h*rShh(Z@W=|3V?dP1c->+?fy}9~OPVWq>EuYO~Rt-n`hF z-ffjLsSGNKK%mm9aah2;zzD%$!9Q@|0vY126y%=QOiheGn^EiMouFZuEWYLVMuV6y zzr6Okd-r2kdxKm+BLU9_4a8uopth}s&E`wwb?*aE;;`xM>S`+HbJ&1r84E#6kl*Kl z{9cdE2KvrY^rnExmP=DKU<6Rf1QLTKkv8nSzuC-X@Ks$08NUteBrD)y77N&z zfp=|kAq5<)stQQq1h9!%HLcfMJJ%rpB9L@#cCQx{5d=oc59KWp32!T;bqbZd<5Sqb zwArALNI>r43Q*zwdD4AA|b!uzm!TPw;IIP6K;dHd5*2kGtZqH~}$qgM&p9n=ij~DjJ&st7J3jEMARF!sduM z+^*LmUM+(r;jtxrj!M=1F&&I2mt(6hlIa(zh|dc4ng)8wZhYHaZ&ADn`GNEG?R93iNx7MbC*n(f&=v!WOVRBW(3)u_7o1CnnfuW*fLjzNbl_=@C{d;#F zB6DFx@09*hMLr(VYjtK(<*$}DI;tSQ6eW%OECLn|UV)<2L@oy%KEsT0TJtuvF0!g6 z$PyH%L%YOGIz0}(#@+*Y_PAB+-u3napIPs1pjT8B6e23H090T;#DkH=_h;H4G!lG+rvn$|IJBB2b)6wxu5q(SSD0+h7t@8D9=^yvJY z)@spf^o}^OthlnKjZUE^K%4R{dJMW(1T^9O(gg;Y{4KLXr`u-KHZZJ1-{lN?4X`9B zuRgN7gNvag6l~@aF$g4vu3#f8`8EJZ9G-dg=*Vo8JvD$hdYm~rGOfx!o<-fM$SrP} zdwT!g!zXiB>D?QDM5iF4&UjvZufHVk&^uRrB7y}IGv-~aKy|L3eOpYcAd`iS-JvjDb2{>@KFELktwyQ2UT2{3#j<9qeqUP%_*k%)nkwE z-5==tVG;gsx~{7CHcj$tTWl=6=kFipL1$>aA;^~WNIO_ zD?k<$W6BHR(o1B4HzMh>*yIEz3t0lIC@X*=Wn6}DW_;$^;Na-+(-E!7XVptBG0Lv+-p$d@EQ1{}@vpMy|l>76V6jg@6!qK9PO5xDx4ZwaiKw^F? zvY-@QoC|NLMx?Y(>)4YgkM0keM;=b2nI^>16R@nGj^q~Rz$oA=6NAI!>ILgM5nEn} z#Z)xuHP15xbFT)5^d_sB{6mR7bNp-p63x?&4fa2{``f>Us88?Az+f)wu_I^B96xgO zHrn%B&XJ?tGC9RT7>Mc&DyKmFH#9R>GZYMmW=^x(Ju z_YceDKmR#{i@MA6vXB0By5RJYGc3=ymD!PzQ3Jo4h{`>c&ptFw4n2PG`|m*B9*@KG z&Kx}ge&pD>oC2D0r2o;q-+v$V4E6R+dTDtD`21tX&KDOIBT;iMr?c~5UPBUj<*&0i(l?`~go*<*27t^U|@s+|kO0s=7ZSh5;^Q_O16>p_CTf55Cl zm6w!MAW>K{ciZo@n`WOqo19kbY`)k9F_0Jp^$j9{ReV+tb zih$GVG@HHg-K$*S;a3x=HOiJ9$fj3o^hTY*wwT2RI4{6U%#@bPA0`XMh&YV2f(%T5rb!F5qAronZ3sZ0(4}3Xw$hGU#`^ z0Pb+Cw24F%upC$-hs73rOMm#10K9zXwN!cY;MaqV%yZye`2wkfPE~jJue+(}uN}XB z{=5;}kV)jVmv+~>S`YSiWAXREJ7fW!S<<$@f4IAzh{cn8S9%(o)}yg_!0m-1ne}(g z^|eYagUMEYdHbgM%Ifp&mK!e{l`Z@02iJPO{o1V(fa8nBO*h`Wezm%hjz+?3sr8r9 z03fHq=zd4f^WA!3jj)C<64zYVU;o~Gp`)u=+41dQ@8a!^*y_7m88&F<-y&dese16quug?6Lpw$X$Jx1O z&Xx7p6R5m=!@WNS^Z)bzIXnIPA5#T?`_E(B_x|x)f9<(rXGz+znU2Doe5`5ULEqSN zHL^++kGIp2m1uTYZ*(j1cot;Pc~pp^Vr;{bYn51BhO9MDj;R-^G>KzkWNgOVL}#?c zy+%Wr0xw5gaGKJ%GFUO{tPWm- zHjT!0fs3wI2B2Cz5{YFr^9X1hReC8AiaD1%UPES^1FEmaF}pm5g@m-}Dl{{#vt6tz zM_`EZu1{iBOT@0zEF?%oB9&E*Mc{~liMj8@=Q(J%tbIzSQaq?^~GOZp2R@|du-O{pQY-l1@cKWCP_^+d<3y9nH>469L?>`)IAnc$?>Pim>~}$zd>JpJ|MsnGa4TOV1qp0S5B1 z%bL-?`@jzE8;1~CCr+L(-I;g{PV33=q$y1+IS;xRXk%Hquu^QdX=3>4l;>kdk!o=P9;-u{>1Uqxs~*H9^=gL6VQjBjHfEH03yl7S;hvQfF5hU zf&&2N-)E8sr|@@2M6vvqFd$-{?zgLCry<42F3hKZ*h-T`**NB~oudp;{GI~P`lrUUOwE^oLT@hwb` z4G#>A&nJ}hT8}r4%R6)Y_~|@sNqejU0eiE5+$P7M#Ru!{gwmX>^ZBS2yLw_|XlQs$6GCSnKXyE; za(V2>+4Spi*(Xn&&8s9)@u;$beDJ3XQ*Ru7(tGdT{rgX}oWh&}wsve(Q=N7E*qM?o z{nX@~7T}uc1!DHGpN^eJJ4PM?fH+{poI8FZ8@cQ9DNscPuyQou{^ZxX;UD{=_Zcn! zY&Lo3>A-Z=nPbPYkQ?@lMD$WW+&^rnK6mVRoBu>fSz{%GPLp2> z4B8wRL(_lnk3a4_U98B3iO2c|H1N~MP8J9ax;P2jsu_4Z>?}Qf>`dv7-k_NrxcA4s zv8ppiPnM)L+P9^-Ir(K3u$-)%iVrh`0GizE50>ZVUmNTlu)&TVInOc7&SUaRJ7x#^ zpD_z^3aXY2o<@md2r!lTf|Dm=zNmB3&H`Gu906>$2V zb@b66zdu#v=UsgK$30E%k)O_gnbW^P6rugI(^d*B54qu3lHgE3kM#Bqm`l#(SJ%H) zVi0sN#dC7<%7uIkann8d_`$v2iK=|k)cxOkJvpb(!Q^Y?iVEU}e$GiQ2jic?Aqu{& zkKe!hU^J0`4u&EMdjx{TR{$*L=9YjY5HsTg<#q4wFh0K=dV1&XC=QtId6gBgLd->v zdfLgxS64B9smd>DpYHE{IOgw=GDvhHqB`wPim}B-2m%FFTfesTA}2%tE+F0Lc6c2Is6^K_p8K^WjnWlkG!BY=na;@hm8M+P^NbS`J(nh>)T5rkm+Rc zYC8l(pdnGPRWw0E%T{tZ1QaK~-y2ksFc<<$`8l(BxVMsk=Ji^eKfJcObr@X?@3x9n zzpOzqpyg267cw9p7+(&iwv=oNnJMqC6R-szArN4?t^g(uVCHN#2rAaC_^dy?Y>)>6 z>A`sLvk*j(WH*#dGH^5a4XzUNb=i3LFfXCtR2Df&T z0pNtCIwjJz1zRxg27bINQ_p7dWHPDh_Vz(%TN4wDB(ke3(F|6H%W9YpStiGg3MP%& z$SuuBeU_4h3YAMeIW{q$e&O+FbD5@IX>+P zMi`jS&qgD~Svg$;gGLgpPHiZ!-6@(iOEd(F}-#j(>y%NcAYfSW# z3f1h$xCdKOjNUUCFPG=#A#OWufzIclgx{n!Z1HQp0JCDFhRsx6UB5!YbGNL{X#B;p zcV4>yF-nUnR0jQb*!jY(@!@91d6efPcmH*FoLK^ADa3R#Fu3?O%>tv~+_~I>+??DJq2cjA z|G$6r&CLxycrdg;sVFSS&&@dt`hE_UQJIe%`{#fEPd_!kM7a2dQVxT`_YG!7?up}P za?YPRUBEOw{o^11yweLhUGIpihApPUb5EZ*bv8R6R&efQuI=7G?#>X<2U=}_g~5ug z<70YyepYtQsUv^=>2!sE`2HP`i~8fv!%+ipYYyqC@jYLu^($MXxNw;>!v^ zdIkZ@E;8P~JG9UA%v!0Hm@YS{hqZk_gv~jAG7I3NJnrn1-n;kiKj<6Mt*kpCT1g2; zL<4~(1O-c@l;+c(-hH}@Th>4b7*ZUxTG!~UCJ*9#b|LKS$?P)1?quJ+J9ofb*I5?7 zwceT~>gqFVFAk>z!FM&U#SAl_<{YHW_=U`Q^qN+dyigKS&&;m{LrTD1N`=W|74&dH~ZY#oN^Qb$8Hj!E6R#Nio2Nb z?2$$ZMy`56Z@W-hK*Sf9)0g+J2W(nk147l+}vkjifc~(Ukt17RUE3YPRIGxX*gUCcBfdD7DX4TK0JbLtW zTWH3ZgpQ#8Xep(1^t}V-!`F7nZ?t%b9p|Qg71E%;_yq z3l&>|>PhaHKuTQlCU?oVUHyF3ut_os{-$1h; z?pG-LM>B4X`63lVVHX$BKGm~FU%TOcqkG+HwS@)mA`k{07{-T`S+NxJXj%;(ybmI z8Sd*FH#t-Y7-%GCbMkWwDlpV5aj$wxKRv1jyg)B9Pr5pH3?5uH8wBvs;Nc1Mn`FSL zn>N{Wb`?m0m!W9vG%)YyrcD7~oQSNhECe^Xw6v<`dfcg=R!@zMsny`q?wdQYI56Af z%&H&r8~{SR!ei3SPEKl_{ud1JSO$;1dNh{uyb#1)B!(X2)jKmW2FiU@WAWaiV&LVKC^U+(eeIjg zlw9$|s0b9Yw6FxoBQ&epj&E@1j>oiuYAg)z(Wnkg?JcxG&_ z)HEc(Y}X)+=rTpmxN(OJ-A%3DDn!Pa1r;;I zY}*(NIlh5k%+wmZwYJeq$T0&2OgO0>C}XgU71rQOXJ8zMhy#N6idtu zdi+wc%#O)d&GSnrYA?Fg={uyc7H(Bg7P`w;mgpaXY==p@G-GYjsD(a9^7~d>$HE?C zSJ#d9axfGDt314ml=vH2U%q?gRTsR~NWB6l^trhgV|@Jz%socPRSy&wjXlFtH4cNY zYQgNyLp)L(XZ6KSx<`c2uoWt}lX1^IMFB`>{ zPe}`w#_~~5UFV&{NV18NQWFa_&kE7H45pRti%>fPS_r|=2dm1a7P5`gM6z0fnc@_g zo)uso31DM}il82eo7pM#sX3B44%{0c;iO$C29h4fEkSHwnsCh?`~eBHN~o3@(h?Y20l^vOWgs^ve5vZ< zDi&j3LNT`FgtT4wtJk%qR0M()#-2ai-sKs}(Ur1eQ`dNMgkr~13#zBwAr;&Hln(pEc_%sB`m@ur3DJ(DYC z-JrXd@VMu`QmlhT;^sCCy1X^Jbmu zB2DRAZg2e5`Hcn#i6vZ>Fkmz4W@e10KvN5!!d6^(zZu>Jz?_Y%tZG#X7v|LClLnK) zxz_!$jaerFSpXay{$uhMmm=9aLA!nq=#+ZB)oKM9efzv+hrz9?KvtF$S9oj z3*Bw)Qo8U)CZ0(pK0e>NcIgc;Ow$2(YA@-Bx;A3+D{n>MsR$ezOTtvk+OJ>CEV;dV zEr(kw$*SGuG|oGmz94XvrLSHnYP#0HUi#MhalcJb+alx16(nY}kj0TUUg=idOkHo? z-n!Jh_o1cZ%FWH>=GtQT%Hi_o?sR%55r6q&bL++T&X;Rz2Y>D)mN&(cD@wMgv$o}M z@5NS^O7(+LvH41|a_hrpXgLiY|AXY;YP;nrMOQmB;3NcMo&tZ#2!ur{dyX3USkSsq*hX zH#UEIe{Da#ycAACzEBDz09FqYvF&SH8y`P6cirsnywKX-(tfkKpI;zj*oex7B5EI0!&?o6`p@;??BygGg}o#qQT@?II43LBQdwFjYh{oyn?c zX}*$J0w%0)F|-VLj^Aaqx_vHRc;(UfoTswkQ=`5N#n-C}b+g{c)rM4tPoq-1v?!+iQ_v z1Ol-{K;yu(bxy08EyPUZt=YsT370?)e%=ogBlG3t@N>nxPO#}oyK$6d4 zw}6xhc;aauJP$b!ZlK*4-g&dS{``YV!l&S|-~l9%Km!4^p66?sox@*c0#OYgkha#1 zonJrff4!ASrc&#NfJs9j(*GJVv+n(EeJPBL=7$7@2+>( zT>!>?=c~2YBKY`HIG%|ocHaG5D+SMONrcUpdk!`ac0d*(x{=v>d%Lyy@~f@=cOTwA XZvK8q*68BIli*ANIr<2(NctFC(M literal 0 HcmV?d00001 diff --git a/xalock/Imakefile b/xalock/Imakefile new file mode 100644 index 00000000..0093d604 --- /dev/null +++ b/xalock/Imakefile @@ -0,0 +1,37 @@ +#ifndef XCOMM +#define XCOMM /**/# +#endif +XCOMM @(#)Sub Imakefile xlockmore +XCOMM + +#include "../iconfig.h" + +top_srcdir = .. +UTILSDIR = . + +XCOMM List of object files +XALOCKOBJS = multireq$(O)$(S)xalock$(O) + +XCOMM List of source files +XALOCKSRCS = multireq$(C) xalock$(C) + + +#ifdef XawLibrary +AllTarget(xalock) +NormalProgramTarget(xalock, $(XALOCKOBJS), $(DEPXLIB), $(ALIBS), NullParameter) +#else +clean:: + $(RM) xalock +#endif + +DependTarget() +LintTarget() + +#ifdef XawLibrary +InstallProgram(xalock$(E),$(BINDIR)) +#endif + +distclean:: clean + $(RM) Makefile config.status config.cache config.log config.h + +clean.all:: distclean diff --git a/xalock/Makefile.in b/xalock/Makefile.in new file mode 100644 index 00000000..b482c71f --- /dev/null +++ b/xalock/Makefile.in @@ -0,0 +1,193 @@ +# $Id : Makefile.in 4.04 1997/07/10 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +# @SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ + +N= +O = .o +#O = .obj +C = .c +# C = .cc +S = $(N) $(N) +#S = , + + +# please define +# C as the C source code extension +# O as the object extension +# S as the separator for object code + +#################################################################### +# List of object files +XALOCKOBJS = multireq$(O)$(S)xalock$(O) + +# List of source files +XALOCKSRCS = $(VPATH)multireq$(C) $(VPATH)xalock$(C) + +# default target +all : @XALOCK@ + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ +#UTILDIR = $(top_srcdir)/xlock/ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@/man1 +xapploaddir = @APPDEFAULTS@ + +CONFIGDIR = $(srcdir)/config/ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTPGMFLAGS = @INSTPGMFLAGS@ + +#CC = cc -g +#CC = cc -Ac -g +#CC = cc -Xc -g +#CC = acc -g +#CC = CC -g +#CC = gcc -g -Wall -ansi -pedantic +#CC = gcc -g -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes +#CC = g++ -g -Wall +CC = @CC@ + +LINT = lint +#LINT = alint + +#DEPEND = makedepend +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +LN_S = @LN_S@ +RM = rm -f +RM_S = $(RM) +ECHO = echo + +#BLN_S = set file/enter=[] +#RM = delete/noconfirm/nolog +#RM_S = set file/remove/nolog +#ECHO = write sys$output + +DEFS = @DEFS@ $(DEFINES) +XALOCKINC = @XALOCKINC@ -I.. -I$(top_srcdir) +# -I$(UTILDIR) +CFLAGS = @CFLAGS@ +#CFLAGS = -O +#CFLAGS = -g +XALOCKLDFLAGS = @XALOCKLDFLAGS@ +XLIBS = @XLIBS@ +XALOCKLIBS = @XALOCKLIBS@ +#If you have purify, and want to use it, uncomment this definition or +# run the make as `make PURIFY=purify' +# or run configure with the --with-purify argument. +PURIFY = @PURIFY@ + +xalock : $(XALOCKOBJS) + $(PURIFY) $(CC) -o $@ $(XALOCKOBJS) $(XALOCKLDFLAGS) $(XALOCKLIBS) + @ $(ECHO) "$@ BUILD COMPLETE" + @ $(ECHO) "" + +.SUFFIXES : $(C) $(O) + +$(C)$(O) : + $(CC) -c $(CPPFLAGS) $(DEFS) $(XALOCKINC) $(CFLAGS) $< + +install : @INSTALL_XALOCK@ + +install_xalock : install-program install-man install-ad + @ $(ECHO) "$@ COMPLETE" + @ $(ECHO) "" + +install-program : xalock + $(top_srcdir)/mkinstalldirs $(bindir) + $(INSTALL_PROGRAM) xalock $(bindir) + +install-man : + +install-ad : + +uninstall : @UNINSTALL_XALOCK@ + +uninstall_xalock : uninstall-program uninstall-man uninstall-ad + +uninstall-program : + $(RM) $(bindir)/xalock + +uninstall-man : + +uninstall-ad : + +lint : + $(LINT) -ax -DLINT $(DEFINES) $(XALOCKINC) $(XALOCKSRCS) + +xrdb : + +man : + +html : + +hlp : + +clean : + $(RM) *.o core *~ *% *.bak *.orig *.rej make.log MakeOut xalock + +distclean : clean + $(RM) Makefile + +clean.all : distclean + +# Adds all current dependencies to Makefile +depend : + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(XALOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XALOCKSRCS) + +# 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. -w 0 +distdepend : + @echo updating dependencies in `pwd`/Makefile.in... ; \ + $(DEPEND) -w 0 -f - \ + -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ + $(XALOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XALOCKSRCS) | \ + ( \ + awk '/^#.*Id : Makefile.in/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +multireq.o: multireq.h +xalock.o: ../config.h +xalock.o: multireq.h +xalock.o: xalock.h +xalock.o: modes.h + diff --git a/xalock/modes.h b/xalock/modes.h new file mode 100644 index 00000000..27b9062a --- /dev/null +++ b/xalock/modes.h @@ -0,0 +1,129 @@ +static char *LockProcs[] = +{ +"ant", +#ifdef USE_GL +"atlantis", +#endif +"ball", +"bat", +"blot", +"bouboule", +"bounce", +"braid", +"bubble", +"bubble3d", +"bug", +#ifdef USE_GL +"cage", +#endif +#if defined( USE_XPM ) || defined( USE_XPMINC ) +"cartoon", +#endif +"clock", +"coral", +"crystal", +"daisy", +"dclock", +"deco", +"demon", +"dilemma", +"discrete", +"drift", +"eyes", +"fadeplot", +"flag", +"flame", +"flow", +"forest", +"galaxy", +#ifdef USE_GL +"gears", +#endif +"goop", +"grav", +"helix", +"hop", +"hyper", +"ico", +"ifs", +"image", +"julia", +"kaleid", +"kumppa", +"laser", +"life", +"life1d", +"life3d", +"lightning", +"lisa", +"lissie", +"loop", +"mandelbrot", +"marquee", +"maze", +#ifdef USE_GL +"moebius", +#endif +#ifdef USE_GL +"morph3d", +#endif +"mountain", +"munch", +"nose", +"pacman", +"penrose", +"petal", +#ifdef USE_GL +"pipes", +#endif +"puzzle", +"pyro", +"qix", +"roll", +"rotor", +#ifdef USE_GL +"rubik", +#endif +"shape", +"sierpinski", +"slip", +"sphere", +"spiral", +"spline", +#ifdef USE_GL +"sproingies", +#endif +#ifdef USE_GL +"stairs", +#endif +"star", +"starfish", +"strange", +#ifdef USE_GL +"superquadrics", +#endif +"swarm", +"swirl", +"tetris", +"thornbird", +"triangle", +"tube", +"turtle", +"vines", +"voters", +"wator", +"wire", +"world", +"worm", +"xjack", +"blank", + +#ifdef USE_BOMB +"bomb", +"random" +#else +"random" +#endif +}; + +static int numprocs = sizeof (LockProcs) / sizeof (LockProcs[0]); diff --git a/xalock/multireq.c b/xalock/multireq.c new file mode 100644 index 00000000..5377c93d --- /dev/null +++ b/xalock/multireq.c @@ -0,0 +1,215 @@ +/* + * A simple form-fillout function that lets you pass an array of + * Tag's that describe a form and it will pop up a window and let + * a user fill out a form that describes the values you'd like. + * + * The main function is GetValues(). See the demo program in this + * same directory (main.c, in the function edit()) for a more + * detailed example. + * + * Written by Allen Martin, (amartin@cs.wpi.edu). + */ + +#include +#include +#include + +#include +#include "multireq.h" + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + +typedef struct { + Widget window; + int cancelled; + + Widget *w; + TagList *tags; + +} MReqData; + + +static void +mreq_ok(Widget w, MReqData * mdata) +{ + int widg_num; + TagList *tagptr; + char *cptr; + + /* extract the info from the widgets */ + for (widg_num = 0, tagptr = mdata->tags; tagptr->tag != TAG_DONE; tagptr++) { + switch (tagptr->tag) { + case TAG_STRING: + cptr = GetStringEntry(mdata->w[widg_num++]); + (void) strcpy(tagptr->data, cptr); + break; + case TAG_INT: + cptr = GetStringEntry(mdata->w[widg_num++]); + *((int *) tagptr->data) = atoi(cptr); + break; + case TAG_FLOAT: + cptr = GetStringEntry(mdata->w[widg_num++]); + *((float *) tagptr->data) = atof(cptr); + break; + case TAG_WINDOW_LABEL: + case TAG_LABEL: + break; + default: + (void) fprintf(stderr, "GetValues() : Invalid tag item %d\n", tagptr->tag); + } + } + + mdata->cancelled = FALSE; + SetCurrentWindow(mdata->window); + CloseWindow(); +} + +static void +mreq_cancel(Widget w, MReqData * mdata) +{ + mdata->cancelled = TRUE; + SetCurrentWindow(mdata->window); + CloseWindow(); +} + +int +GetValues(TagList * tags) +{ + MReqData mdata; + int num_tags = 0, num_widg = 0, num_labels = 0; + int i, w, l; + Widget *label_w, ok_w, cancel_w; + char string[256], window_name[256] = "Requestor"; + int maxwidth = 0, widest_label = -1; + + /* first count the number of tag items and required widgets */ + for (; tags[num_tags].tag != TAG_DONE; num_tags++) { + if (tags[num_tags].tag == TAG_LABEL) { + num_labels++; + continue; + } else if (tags[num_tags].tag == TAG_WINDOW_LABEL) { + if (!tags[num_tags].label) { + (void) fprintf(stderr, "Invalid window name passed to GetValues()\n"); + return (TRUE); + } + (void) strcpy(window_name, tags[num_tags].label); + continue; + } + /* determine the widest label */ + if (strlen(tags[num_tags].label) > maxwidth) { + maxwidth = strlen(tags[num_tags].label); + widest_label = num_labels; + } + num_labels++; + num_widg++; + } + + /* allocate mem for the widgets */ + if (!(mdata.w = (Widget *) malloc(num_widg * sizeof (Widget)))) + return (TRUE); + if (!(label_w = (Widget *) malloc(num_labels * sizeof (Widget)))) { + (void) free((void *) mdata.w); + return (TRUE); + } + mdata.window = MakeWindow(window_name, SAME_DISPLAY, EXCLUSIVE_WINDOW); + mdata.tags = tags; + + /* create the label widgets first */ + for (i = 0, l = 0; i < num_tags; i++) { + if (tags[i].tag == TAG_WINDOW_LABEL) + continue; + + label_w[l] = MakeLabel(tags[i].label); + if (l) + SetWidgetPos(label_w[l], PLACE_UNDER, label_w[l - 1], NO_CARE, NULL); + l++; + } + + for (i = 0, w = 0, l = 0; i < num_tags; i++) { + switch (tags[i].tag) { + case TAG_STRING: + if (tags[i].init) + mdata.w[w] = MakeStringEntry((char *) tags[i].data, 250, NULL, NULL); + else + mdata.w[w] = MakeStringEntry(NULL, 250, NULL, NULL); + + if (l) + SetWidgetPos(mdata.w[w], PLACE_UNDER, label_w[l - 1], + PLACE_RIGHT, label_w[widest_label]); + else + SetWidgetPos(mdata.w[w], PLACE_RIGHT, label_w[widest_label], + NO_CARE, NULL); + + l++; + w++; + break; + + case TAG_INT: + if (tags[i].init) { + (void) sprintf(string, "%d", *((int *) tags[i].data)); + mdata.w[w] = MakeStringEntry(string, 250, NULL, NULL); + } else + mdata.w[w] = MakeStringEntry(NULL, 250, NULL, NULL); + + if (l) + SetWidgetPos(mdata.w[w], PLACE_UNDER, label_w[l - 1], + PLACE_RIGHT, label_w[widest_label]); + else + SetWidgetPos(mdata.w[w], PLACE_RIGHT, label_w[widest_label], + NO_CARE, NULL); + + l++; + w++; + break; + + case TAG_FLOAT: + if (tags[i].init) { + (void) sprintf(string, "%f", *((float *) tags[i].data)); + mdata.w[w] = MakeStringEntry(string, 250, NULL, NULL); + } else + mdata.w[w] = MakeStringEntry(NULL, 250, NULL, NULL); + + if (l) + SetWidgetPos(mdata.w[w], PLACE_UNDER, label_w[l - 1], + PLACE_RIGHT, label_w[widest_label]); + else + SetWidgetPos(mdata.w[w], PLACE_RIGHT, label_w[widest_label], + NO_CARE, NULL); + + w++; + l++; + break; + + case TAG_LABEL: + l++; + break; + case TAG_WINDOW_LABEL: + break; + + default: + (void) fprintf(stderr, "GetValues() : Invalid tag item %d\n", tags[i].tag); + } + } + + ok_w = MakeButton("Ok", (ButtonCB) mreq_ok, &mdata); + SetWidgetPos(ok_w, PLACE_UNDER, label_w[num_labels - 1], NO_CARE, NULL); + + cancel_w = MakeButton("Cancel", (ButtonCB) mreq_cancel, &mdata); + SetWidgetPos(cancel_w, PLACE_UNDER, label_w[num_labels - 1], + PLACE_RIGHT, ok_w); + + ShowDisplay(); + MainLoop(); + + SetCurrentWindow(ORIGINAL_WINDOW); + + /* check for cancel */ + if (mdata.cancelled) + return (TRUE); + + (void) free((void *) mdata.w); + (void) free((void *) label_w); + + return (FALSE); +} diff --git a/xalock/multireq.h b/xalock/multireq.h new file mode 100644 index 00000000..a908eb37 --- /dev/null +++ b/xalock/multireq.h @@ -0,0 +1,24 @@ +typedef struct { + int tag; + char *label; + void *data; + int init; +} TagList; + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#define TAG_NULL 0 +#define TAG_STRING 1 +#define TAG_INT 2 +#define TAG_FLOAT 3 +#define TAG_LABEL 4 +#define TAG_WINDOW_LABEL 5 +#define TAG_DONE 99 + +#define TAG_INIT 1 +#define TAG_NOINIT 0 + +int GetValues(TagList * tags); diff --git a/xalock/xalock.c b/xalock/xalock.c new file mode 100644 index 00000000..843a5fab --- /dev/null +++ b/xalock/xalock.c @@ -0,0 +1,387 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)xmlock.c 4.08 98/02/18 xlockmore"; + +#endif + +/*- + * xalock.c - main file for xalock, the gui interface to xlock. + * + * Copyright (c) 1997 by Charles Vidal + * + * See xlock.c for copying information. + * + * Requires -lxs -lXmu -lXaw + * libsx.h is assumed to be installed in + * for the ressource file , launcher editres. + * thank's to Dominic Giamapolo for his library libsx. + * + * Revision History: + * Jun-25-97: written. + */ + +#include +#include +#include +#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#else +#define HAVE_UNISTD_H 1 +#endif /* HAVE_CONFIG_H */ +#if HAVE_UNISTD_H +#include +#endif + +#include /* gets us in the door with libsx */ +#include "multireq.h" +#include "xalock.h" + +#define NBTOGGLE 15 + +#define XLOCK "xlock" +#define WINDOW_WIDTH 160 +#define WINDOW_HEIGHT 100 +#define WINDOW_GEOMETRY "160x100" + +static int delay; +static int count; +static int cycles; +static int nicer; +static int timeout; +static int untillock; +static int saturation; +static int delta3d; +static int right3d; +static int left3d; + +/* variable for popup */ + +static char nameprog[1024]; +static char namefile[1024]; +static char namemesg[1024]; +static char namepass[1024]; +static char nameinst[1024]; +static char namevalid[1024]; +static char nameinvalid[1024]; +static char nameprompt[1024]; +static char namegetprog[1024]; +static char namefmtfile[1024]; +static char namefont[1024]; +static char nameback[1024]; +static char namefor[1024]; +static char namegeom[1024]; + +static Widget ListMode; +static Widget Drawxlock; /* the widget where is xlock show */ + +static pid_t numberprocess = -1; /* PID of xlock process */ + +#include "modes.h" + +static ToggleType toggle_table[] = +{ + {"mono ", "turn on/off monochrome override", 0}, + {"nolock ", "turn on/off no password required mode", 0}, + {"remote ", "turn on/off remote host access", 0}, + {"allowroot ", "turn on/off allow root password mode (ignored)", 0}, + {"enablesaver", "turn on/off enable X server screen saver", 0}, + {"allowaccess", "turn on/off allow new clients to connect", 0}, + {"grabmouse ", "turn on/off grabbing of mouse and keyboard", 0}, + {"echokeys ", "turn on/off echo '?' for each password key", 0}, + {"usefirst ", "turn on/off using the first char typed in password", 0}, + {"verbose ", "turn on/off verbose mode", 0}, + {"inwindow ", "turn on/off making xlock run in a window", 0}, + {"inroot ", "turn on/off making xlock run in the root window", 0}, + {"timeelapsed", "turn on/off clock", 0}, + {"install ", "whether to use private colormap if needed (yes/no)", 0}, + {"use3d ", "turn on/off 3d view", 0}, + {NULL, NULL, 0}}; + + +static TagList programopt[] = +{ + {TAG_LABEL, "Program options", NULL, TAG_NOINIT}, + {TAG_STRING, " program to get messages from:", nameprog, TAG_INIT}, + {TAG_DONE, NULL, NULL, TAG_NOINIT} +}; + +static TagList messagesopt[] = +{ + {TAG_LABEL, "Messages options", NULL, TAG_NOINIT}, + {TAG_STRING, "file message to say:", namefile, TAG_INIT}, + {TAG_STRING, "message to say:", namemesg, TAG_INIT}, + {TAG_STRING, "Password prompt:", namepass, TAG_INIT}, + {TAG_STRING, "instructions:", nameinst, TAG_INIT}, + {TAG_STRING, "validating password message:", namevalid, TAG_INIT}, + {TAG_STRING, "invalid password message:", nameinvalid, TAG_INIT}, + {TAG_STRING, " Name prompt:", nameprompt, TAG_INIT}, + {TAG_STRING, "program to get messages from:", namegetprog, TAG_INIT}, + {TAG_STRING, "formatted file message to say:", namefmtfile, TAG_INIT}, + {TAG_DONE, NULL, NULL, TAG_NOINIT} +}; + +static TagList timeopt[] = +{ + {TAG_LABEL, "Times options", NULL, TAG_NOINIT}, + {TAG_INT, "microsecond delay updates:", &delay, TAG_INIT}, + {TAG_INT, "number of things per batch:", &count, TAG_INIT}, + {TAG_INT, "number of cycles per batch:", &cycles, TAG_INIT}, + {TAG_INT, "nice level for xlock process:", &nicer, TAG_INIT}, +{TAG_INT, "number of seconds before password times out:", &timeout, TAG_INIT}, + {TAG_INT, "number of seconds until lock:", &untillock, TAG_INIT}, + {TAG_DONE, NULL, NULL, TAG_NOINIT} +}; + +static TagList lookopt[] = +{ + {TAG_LABEL, "Font & colors & geometry options", NULL, TAG_NOINIT}, + {TAG_STRING, "font to use for password prompt:", namefont, TAG_INIT}, + {TAG_STRING, "background color :", nameback, TAG_INIT}, + {TAG_STRING, "foreground color :", namefor, TAG_INIT}, + {TAG_STRING, "geometry for non-full :", namegeom, TAG_INIT}, + {TAG_INT, "saturation of color ramp :", &saturation, TAG_INIT}, + {TAG_DONE, NULL, NULL, TAG_NOINIT} +}; + +static TagList treeDopt[] = +{ + {TAG_LABEL, "3D options", NULL, TAG_NOINIT}, + {TAG_INT, "delta3d :", &delta3d, TAG_INIT}, + {TAG_INT, "right3d :", &right3d, TAG_INIT}, + {TAG_INT, "left3d :", &left3d, TAG_INIT}, + {TAG_DONE, NULL, NULL, TAG_NOINIT} +}; + +static void +strcat2(char *dest, char *src1, char *src2) +{ + (void) strcat(dest, src1); + (void) strcat(dest, src2); + (void) strcat(dest, " "); +} + +static void +strcatint2str(char *dest, char *src1, int num) +{ + char tmp[50]; + + (void) sprintf(tmp, "%d", num); + (void) strcat(dest, src1); + (void) strcat(dest, tmp); + (void) strcat(dest, " "); +} + +static void +getoptions(Widget w, void *data) +{ + (void) GetValues(data); +} + +static void +toggleYes(Widget w, void *data) +{ + toggle_table[(int) data].value = TRUE; +} + +static void +toggleNo(Widget w, void *data) +{ + toggle_table[(int) data].value = FALSE; +} + +static void +Help(Widget w, void *data) +{ + GetYesNo((char *) data); +} + +/*- + Make the commande + */ +static void +launch(Widget w, void *data) +{ + int i; + int index = 0; + char strcommand[1024]; + char tmp[512]; + + if ((index = GetCurrentListItem(ListMode)) == -1) { + GetYesNo("Select one Mode please ... "); + return; + } + (void) memset(strcommand, 0, 1023); /* 1023 to make sure it will not core dump */ + (void) sprintf(tmp, "%s %s ", XLOCK, (char *) data); + (void) strcat(strcommand, tmp); + for (i = 0; i < NBTOGGLE; i++) + if (toggle_table[i].value == TRUE) { + (void) sprintf(tmp, "-%s ", toggle_table[i].name); + (void) strcat(strcommand, tmp); + } + if (strlen(nameprog) > 0) + strcat2(strcommand, "-program ", nameprog); + if (strlen(namefile) > 0) + strcat2(strcommand, "-messagefile ", namefile); + if (strlen(namemesg) > 0) + strcat2(strcommand, "-message ", namemesg); + if (strlen(namepass) > 0) + strcat2(strcommand, "-password ", namepass); +/*if (strlen(nameinst)>0) strcat2(strcommand,"%s\n", nameinst) ; */ + if (strlen(namevalid) > 0) + strcat2(strcommand, "-validate ", namevalid); + if (strlen(nameinvalid) > 0) + strcat2(strcommand, "-invalid ", nameinvalid); + if (strlen(nameprompt) > 0) + strcat2(strcommand, "-username ", nameprompt); +/*if (strlen(namegetprog)>0) strcat2(strcommand,"%s", namegetprog) ; */ + if (strlen(namefmtfile) > 0) + strcat2(strcommand, "-messagesfile ", namefmtfile); + if (strlen(namefont) > 0) + strcat2(strcommand, "-font ", namefont); + if (strlen(nameback) > 0) + strcat2(strcommand, "-bg ", nameback); + if (strlen(namefor) > 0) + strcat2(strcommand, "-fg ", namefor); + + if (delay != 0) + strcatint2str(strcommand, "-delay ", delay); + if (count != 0) + strcatint2str(strcommand, "-batchcount ", count); + if (cycles != 0) + strcatint2str(strcommand, "-cycles ", cycles); + if (nicer != 0) + strcatint2str(strcommand, "-nice ", nicer); + if (timeout != 0) + strcatint2str(strcommand, "-timeout ", timeout); + if (untillock != 0) + strcatint2str(strcommand, "-lockdelay ", untillock); + if (saturation != 0) + strcatint2str(strcommand, "-saturation ", saturation); + if (delta3d != 0) + strcatint2str(strcommand, "-delta3d ", delta3d); + if (right3d != 0) + strcatint2str(strcommand, "-right3d ", right3d); + (void) strcat2(strcommand, "-mode ", LockProcs[index]); + (void) printf("%s\n", strcommand); + (void) system(strcommand); +} + +/* + * quit() - Callback function for the quit button + */ +static void +quit(Widget w, void *data) +{ + int n; + + if (GetYesNo("Quitter ???") == TRUE) + if (numberprocess != -1) { + (void) kill(numberprocess, SIGKILL); + (void) wait(&n); + } + exit(0); +} + +static void +execxlock(Widget w, char *str, int index, void *data) +{ + char numberwidget[50]; + int n; + + (void) sprintf(numberwidget, "%ld", XtWindow(Drawxlock)); + if (numberprocess != -1) { + (void) kill(numberprocess, SIGKILL); + (void) wait(&n); + } +#ifdef VMS +#define FORK vfork +#else +#define FORK fork +#endif + if ((numberprocess = FORK()) == -1) + (void) fprintf(stderr, "Fork error\n"); + else if (numberprocess == 0) { + (void) execlp(XLOCK, XLOCK, "-parent", numberwidget, + "-mode", str, "-geometry", WINDOW_GEOMETRY, "-delay", "100000", + "-nolock", "-inwindow", "+install", 0); + } +} + +/* This function sets up the display. For any kind of a real program, + * you'll probably want to save the values returned by the MakeXXX calls + * so that you have a way to refer to the display objects you have + * created (like if you have more than one drawing area, and want to + * draw into both of them). + */ +static int +init_display(int argc, char **argv, void *data) +{ + Widget w[20]; + Widget tog[NBTOGGLE]; + Widget togYes[NBTOGGLE]; + Widget togNo[NBTOGGLE]; + Widget togHelp[NBTOGGLE]; + int i; + + argc = OpenDisplay(argc, argv); + if (argc == FALSE) + return argc; + w[0] = MakeMenu("Options"); + w[1] = MakeMenuItem(w[0], "Program Option", getoptions, programopt); + w[2] = MakeMenuItem(w[0], "Messages Options", getoptions, messagesopt); + w[3] = MakeMenuItem(w[0], "Times Options", getoptions, timeopt); + w[7] = MakeMenuItem(w[0], "Font Colors and Geometry options", getoptions, lookopt); + w[6] = MakeMenuItem(w[0], "3D Options", getoptions, treeDopt); + + w[10] = MakeScrollList((char **) LockProcs, 150, 250, execxlock, NULL); + ListMode = w[10]; + w[8] = MakeButton("Launch", launch, ""); + w[9] = MakeButton("Quit", quit, data); + w[12] = MakeButton("Launch in window", launch, "-inwindow "); + w[14] = MakeDrawArea(WINDOW_WIDTH, WINDOW_HEIGHT, NULL, NULL); + Drawxlock = w[14]; + + /* Create toggle */ + for (i = 0; i < NBTOGGLE; i++) { + tog[i] = MakeLabel(toggle_table[i].name); + togYes[i] = MakeToggle("Yes", FALSE, NULL, toggleYes, (void *) i); + togNo[i] = MakeToggle("No", FALSE, togYes[i], toggleNo, (void *) i); + togHelp[i] = MakeButton("Help", Help, toggle_table[i].help); + } + + SetWidgetPos(w[9], PLACE_RIGHT, w[14], NO_CARE, NULL); + SetWidgetPos(w[14], PLACE_UNDER, w[0], NO_CARE, NULL); + SetWidgetPos(w[10], PLACE_UNDER, w[14], NO_CARE, NULL); + SetWidgetPos(w[8], PLACE_UNDER, w[10], NO_CARE, NULL); + SetWidgetPos(w[12], PLACE_RIGHT, w[8], PLACE_UNDER, w[10]); + + SetWidgetPos(tog[0], PLACE_RIGHT, w[14], PLACE_UNDER, w[9]); + SetWidgetPos(togYes[0], PLACE_RIGHT, tog[0], PLACE_UNDER, w[9]); + SetWidgetPos(togNo[0], PLACE_RIGHT, togYes[0], PLACE_UNDER, w[9]); + SetWidgetPos(togHelp[0], PLACE_RIGHT, togNo[0], PLACE_UNDER, w[9]); + for (i = 1; i < NBTOGGLE; i++) { + SetWidgetPos(tog[i], PLACE_RIGHT, w[14], PLACE_UNDER, tog[i - 1]); + SetWidgetPos(togYes[i], PLACE_RIGHT, tog[i], PLACE_UNDER, tog[i - 1]); + SetWidgetPos(togNo[i], PLACE_RIGHT, togYes[i], PLACE_UNDER, tog[i - 1]); + SetWidgetPos(togHelp[i], PLACE_RIGHT, togNo[i], PLACE_UNDER, tog[i - 1]); + } + ShowDisplay(); + GetStandardColors(); + + return argc; +} + +int +main(int argc, char **argv) +{ + argc = init_display(argc, argv, NULL); /* setup the display */ + if (argc == 0) + exit(0); + + MainLoop(); /* go right into the main loop */ +#ifdef VMS + return 1; +#else + return 0; +#endif +} diff --git a/xalock/xalock.h b/xalock/xalock.h new file mode 100644 index 00000000..17cbcbac --- /dev/null +++ b/xalock/xalock.h @@ -0,0 +1,5 @@ +typedef struct ToggleType { + char *name; + char *help; + int value; +} ToggleType; diff --git a/xglock/Makefile.in b/xglock/Makefile.in new file mode 100644 index 00000000..ba392f4a --- /dev/null +++ b/xglock/Makefile.in @@ -0,0 +1,151 @@ +############################################################ +# +# $Id : Makefile.in 4.04 1997/07/10 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +# @SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ + +N= +O = .o +#O = .obj +C = .c +# C = .cc +S = $(N) $(N) +#S = , + + +# please define +# C as the C source code extension +# O as the object extension +# S as the separator for object code + +#################################################################### +# List of object files +XGLOCKOBJS = xglock$(O) + +# List of source files +XMLOCKSRCS = $(VPATH)xglock$(C) + +# default target +all : @XGLOCK@ + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@/man1 + +CONFIGDIR = $(srcdir)/config/ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTPGMFLAGS = @INSTPGMFLAGS@ + +#CC = cc -g +#CC = cc -Ac -g +#CC = cc -Xc -g +#CC = acc -g +#CC = CC -g +#CC = gcc -g -Wall -ansi -pedantic +#CC = gcc -g -Wall +#CC = g++ -g -Wall +CC = @CC@ + +LINT = lint +#LINT = alint + +LN_S = @LN_S@ +RM = rm -f +RM_S = $(RM) +ECHO = echo + +#BLN_S = set file/enter=[] +#RM = delete/noconfirm/nolog +#RM_S = set file/remove/nolog +#ECHO = write sys$output + +DEFS = @DEFS@ $(DEFINES) +XGLOCKINC = @XGLOCKINC@ -I.. -I$(top_srcdir) +CFLAGS = @GTK_CFLAGS@ @CFLAGS@ +#CFLAGS = -O +#CFLAGS = -g +XGLOCKLDFLAGS = @XGLOCKLDFLAGS@ +XLIBS = @XLIBS@ +XGLOCKLIBS = @XGLOCKLIBS@ +#If you have purify, and want to use it, uncomment this definition or +# run the make as `make PURIFY=purify' +# or run configure with the --with-purify argument. +PURIFY = @PURIFY@ + +xglock : $(XGLOCKOBJS) + $(PURIFY) $(CC) -o $@ $(XGLOCKOBJS) $(XGLOCKLDFLAGS) $(XGLOCKLIBS) + @ $(ECHO) "$@ BUILD COMPLETE" + @ $(ECHO) "" + +.SUFFIXES : $(C) $(O) + +$(C)$(O) : + $(CC) -c $(CPPFLAGS) $(DEFS) $(XGLOCKINC) $(CFLAGS) $< + +install : @INSTALL_XGLOCK@ + +install_xglock : install-program install-man install-ad + @ $(ECHO) "$@ COMPLETE" + @ $(ECHO) "" + +install-program : xglock + $(top_srcdir)/mkinstalldirs $(bindir) + $(INSTALL_PROGRAM) xglock $(bindir) + +install-man : + +install-ad : + +uninstall : @UNINSTALL_XGLOCK@ + +uninstall_xglock : uninstall-program uninstall-man uninstall-ad + +uninstall-program : + $(RM) $(bindir)/xglock + +uninstall-man : + +uninstall-ad : + +depend : + +lint : + $(LINT) -ax -DLINT $(DEFS) $(XGLOCKINC) $(XGLOCKSRCS) + +xrdb : + +man : + +html : + +hlp : + +clean : + $(RM) *.o core *~ *% *.bak *.orig *.rej make.log MakeOut memdiag* xglock + +distclean : clean + $(RM) Makefile + +clean.all : distclean + +xglock.o: xglock.c lmode.h diff --git a/xglock/README.xglock b/xglock/README.xglock new file mode 100644 index 00000000..bc6d93d5 --- /dev/null +++ b/xglock/README.xglock @@ -0,0 +1,18 @@ +Author: Charles Vidal / Remi Cohen-Scali +Status: under construction + +This uses GNU's GTK. + +It also use the gtk fontsel widget if available as a library. If not a default +dialog is created (just a poor list and text field). Some packages for this +library can be found at: + http://perso.wanadoo.fr/remi.cohenscali/pub/fontsel-0.4.tar.gz + http://perso.wanadoo.fr/remi.cohenscali/pub/fontsel-0.4-1.src.rpm + http://perso.wanadoo.fr/remi.cohenscali/pub/fontsel-0.4-1.i386.rpm + +Dowload it and enjoy it ! It is free ! Please send any question about fontsel +library generation to me (R.CohenScali@pobox.com) but any code related question +have to be routed directly to the fontsel author, Damon Chaplin . + + Thank You ! + R. Cohen-Scali diff --git a/xglock/lmode.h b/xglock/lmode.h new file mode 100644 index 00000000..df379008 --- /dev/null +++ b/xglock/lmode.h @@ -0,0 +1,514 @@ +/*- + * @(#)lmode.h 4.00 97/01/01 xlockmore + * + * lmode.h - mode management for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * + * 08-Jul-98: Adapted to xglock by Remi Cohen-Scali + * 18-Mar-96: Ron Hitchens + * Extensive revision to define new data types for + * the new mode calling scheme. + * 02-Jun-95: Extracted out of resource.c. + * + */ + +/*- + * Declare external interface routines for supported screen savers. + */ + +#ifndef _LMODE_H_ +#define _LMODE_H_ + +/* -------------------------------------------------------------------- */ + +typedef struct LockStruct_s { + gchar *cmdline_arg; /* mode name */ + gint def_delay; /* default delay for mode */ + gint def_batchcount; + gint def_cycles; + gint def_size; + gfloat def_saturation; + gchar *desc; /* text description of mode */ + void *userdata; /* for use by the mode */ +} LockStruct; + +LockStruct LockProcs[] = +{ + {"blot", + 200000, 6, 30, 1, 0.4, + "Shows Rorschach's ink blot test", (void *) NULL}, + {"bouboule", + 5000, 100, 1, 15, 1.0, + "Shows Mimi's bouboule of moving stars", (void *) NULL}, + {"bug", + 75000, 10, 32767, -4, 1.0, + "Shows Palmiter's bug evolution and garden of Eden", (void *) NULL}, + {"clock", + 100000, -16, 200, -200, 1.0, + "Shows Packard's clock", (void *) NULL}, + {"crystal", + 60000, -40, 200, -15, 1.0, + "Shows polygons in 2D plane groups", (void *) NULL}, + {"daisy", + 100000, 300, 350, 1, 1.0, + "Shows a meadow of daisies", (void *) NULL}, + {"dclock", + 10000, 1, 10000, 1, 0.2, + "Shows a floating digital clock", (void *) NULL}, + {"demon", + 50000, 0, 1000, -7, 1.0, + "Shows Griffeath's cellular automata", (void *) NULL}, + {"eyes", + 20000, -8, 5, 1, 1.0, + "Shows eyes following a bouncing grelb", (void *) NULL}, + {"flag", + 50000, 1, 1000, -7, 1.0, + "Shows a flying flag of your operating system", (void *) NULL}, + {"flame", + 750000, 20, 10000, 1, 1.0, + "Shows cosmic flame fractals", (void *) NULL}, + {"grav", + 10000, -12, 1, 1, 1.0, + "Shows orbiting planets", (void *) NULL}, + {"helix", + 25000, 1, 100, 1, 1.0, + "Shows string art", (void *) NULL}, + {"hyper", + 10000, 1, 300, 1, 1.0, + "Shows a spinning tesseract in 4D space", (void *) NULL}, + {"ico", + 100000, 0, 400, 0, 1.0, + "Shows a bouncing polyhedra", (void *) NULL}, + {"image", + 2000000, -10, 1, 1, 1.0, + "Shows randomly appearing logos", (void *) NULL}, + {"kaleid", + 20000, 1, 700, 1, 1.0, + "Shows a kaleidoscope", (void *) NULL}, + {"laser", + 20000, -10, 200, 1, 1.0, + "Shows spinning lasers", (void *) NULL}, + {"life", + 750000, 40, 140, 0, 1.0, + "Shows Conway's game of Life", (void *) NULL}, + {"life1d", + 10000, 1, 10, 0, 1.0, + "Shows Wolfram's game of 1D Life", (void *) NULL}, + {"life3d", + 1000000, 35, 85, 1, 1.0, + "Shows Bays' game of 3D Life", (void *) NULL}, + {"lightning", + 10000, 1, 1, 1, 0.6, + "Shows Keith's fractal lightning bolts", (void *) NULL}, + {"lisa", + 25000, 1, 256, -1, 1.0, + "Shows animated lisajous loops", (void *) NULL}, + {"lissie", + 10000, -2, 2000, -200, 0.6, + "Shows lissajous worms", (void *) NULL}, + {"loop", + 100000, 1, 1600, -12, 1.0, + "Shows Langton's self-producing loops", (void *) NULL}, + {"marquee", + 100000, 1, 1, 1, 1.0, + "Shows messages", (void *) NULL}, + {"nose", + 100000, 1, 1, 1, 1.0, + "Shows a man with a big nose runs around spewing out messages", (void *) NULL}, + {"penrose", + 10000, 1, 1, -40, 1.0, + "Shows Penrose's quasiperiodic tilings", (void *) NULL}, + {"petal", + 10000, -500, 400, 1, 1.0, + "Shows various GCD Flowers", (void *) NULL}, + {"puzzle", + 10000, 250, 1, 1, 1.0, + "Shows a puzzle being scrambled and then solved", (void *) NULL}, + {"pyro", + 15000, 100, 1, -3, 1.0, + "Shows fireworks", (void *) NULL}, + {"qix", + 30000, 1, 64, 1, 1.0, + "Shows spinning lines a la Qix(tm)", (void *) NULL}, + {"roll", + 100000, 25, 1, -64, 1.0, + "Shows a rolling ball", (void *) NULL}, + {"rotor", + 10000, 4, 20, 1, 0.4, + "Shows Tom's Roto-Rooter", (void *) NULL}, + {"shape", + 10000, 100, 256, 1, 1.0, + "Shows stippled rectangles, ellipses, and triangles", (void *) NULL}, + {"sierpinski", + 400000, 2000, 100, 1, 1.0, + "Shows Sierpinski's triangle", (void *) NULL}, + {"spline", + 30000, -6, 2048, 1, 0.4, + "Shows colorful moving splines", (void *) NULL}, + {"star", + 40000, 100, 1, 100, 0.2, + "Shows a star field with a twist", (void *) NULL}, + {"swarm", + 10000, 100, 1, 1, 1.0, + "Shows a swarm of bees following a wasp", (void *) NULL}, + {"triangle", + 10000, 1, 1, 1, 1.0, + "Shows a triangle mountain range", (void *) NULL}, + {"tube", + 25000, 1, 20000, -200, 1.0, + "Shows an animated tube", (void *) NULL}, + {"turtle", + 1000000, 1, 20, 1, 1.0, + "Shows turtle fractals", (void *) NULL}, + {"wire", + 500000, 1000, 150, -8, 1.0, + "Shows a random circuit with 2 electrons", (void *) NULL}, + {"world", + 100000, -16, 1, 1, 0.3, + "Shows spinning Earths", (void *) NULL}, + {"worm", + 17000, -20, 10, -3, 1.0, + "Shows wiggly worms", (void *) NULL}, +/* NORMALLY HIGH CPU USAGE MODES (kind of subjective) */ + {"ant", + 1000, -3, 40000, -7, 1.0, + "Shows Langton's and Turk's generalized ants", (void *) NULL}, + {"ball", + 10000, 10, 20, -100, 1.0, + "Shows bouncing balls", (void *) NULL}, + {"bat", + 100000, -8, 1, 0, 1.0, + "Shows bouncing flying bats", (void *) NULL}, + {"bounce", + 10000, -10, 1, 0, 1.0, + "Shows bouncing footballs", (void *) NULL}, + {"braid", + 1000, 15, 100, 1, 1.0, + "Shows random braids and knots", (void *) NULL}, + {"drift", + 10000, 30, 1, 1, 1.0, + "Shows cosmic drifting flame fractals", (void *) NULL}, + {"forest", + 400000, 100, 200, 1, 1.0, + "Shows binary trees of a fractal forest", (void *) NULL}, + {"galaxy", + 100, -5, 250, -3, 1.0, + "Shows crashing spiral galaxies", (void *) NULL}, + {"hop", + 10000, 1000, 2500, 1, 1.0, + "Shows real plane iterated fractals", (void *) NULL}, + {"ifs", + 1000, 1, 1, 1, 1.0, + "Shows a modified iterated function system", (void *) NULL}, + {"julia", + 10000, 1000, 20, 1, 1.0, + "Shows the Julia set", (void *) NULL}, + {"maze", + 1000, 1, 300, -40, 1.0, + "Shows a random maze and a depth first search solution", (void *) NULL}, + {"mountain", + 1000, 30, 100, 1, 1.0, + "Shows Papo's mountain range", (void *) NULL}, + {"pacman", + 100000, 10, 1, 0, 1.0, + "Shows Pacman(tm)", (void *) NULL}, + {"slip", + 50000, 35, 50, 1, 1.0, + "Shows slipping blits", (void *) NULL}, + {"sphere", + 10000, 1, 20, 0, 1.0, + "Shows a bunch of shaded spheres", (void *) NULL}, + {"spiral", + 5000, -40, 350, 1, 1.0, + "Shows helixes of dots", (void *) NULL}, + {"strange", + 1000, 1, 1, 1, 1.0, + "Shows strange attractors", (void *) NULL}, + {"swirl", + 5000, 5, 1, 1, 1.0, + "Shows animated swirling patterns", (void *) NULL}, + {"voters", + 1000, 0, 327670, 0, 1.0, + "Shows Dewdney's Voters", (void *) NULL}, + {"wator", + 750000, 1, 32767, 0, 1.0, + "Shows Dewdney's Water-Torus planet of fish and sharks", (void *) NULL}, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + {"cartoon", + 10000, 1, 1, 1, 1.0, + "Shows bouncing cartoons", (void *) NULL}, +#endif +#ifdef USE_GL + {"atlantis", + 100, 4, 250, 6000, 1.0, + "Shows moving sharks/whales/dolphin", (void *) NULL}, + {"cage", + 1000, 1, 1, 1, 1.0, + "Shows the Impossible Cage, an Escher-like GL scene", (void *) NULL}, + {"gears", + 1000, 1, 2, 1, 1.0, + "Shows GL's gears", (void *) NULL}, + {"moebius", + 1000, 1, 1, 1, 1.0, + "Shows Moebius Strip II, an Escher-like GL scene with ants", (void *) NULL}, + {"morph3d", + 1000, 0, 1, 1, 1.0, + "Shows GL morphing polyhedra", (void *) NULL}, + {"pipes", + 1000, 2, 5, 500, 1.0, + "Shows a selfbuilding pipe system", (void *) NULL}, + {"sproingies", + 1000, 5, 0, 400, 1.0, + "Shows Sproingies! Nontoxic. Safe for pets and small children", (void *) NULL}, + {"stairs", + 1000, 1, 1, 1, 1.0, + "Shows Infinite Stairs, an Escher-like GL scene", (void *) NULL}, + {"superquadrics", + 1000, 25, 40, 1, 1.0, + "Shows 3D mathematical shapes", (void *) NULL}, +#endif +/* NEW POSSIBLY, BUGGY MODES */ +#ifdef USE_HACKERS + {"fadeplot", + 30000, 1500, 1, 1, 1.0, + "Shows fadeplot", (void *) NULL}, +#endif +/* SPECIAL MODES */ + {"blank", + 3000000, 1, 1, 1, 1.0, + "Shows nothing but a black screen", (void *) NULL}, +#ifdef USE_BOMB + {"bomb", + 100000, 10, 20, 1, 1.0, + "Shows a bomb and will autologout after a time", (void *) NULL}, + {"random", + 1, 1, 1, 1, 1.0, + "Shows a random mode from above except blank and bomb", (void *) NULL}, +#else + {"random", + 1, 1, 1, 1, 1.0, + "Shows a random mode from above except blank", (void *) NULL}, +#endif +}; + +/* Number of modes (set in main) */ +guint nb_mode = 0; + +/* Defaults values available */ +#define DEF_DELAY 0 +#define DEF_BATCHCOUNT 1 +#define DEF_CYCLES 2 +#define DEF_SIZE 3 +#define DEF_SATURATION 4 +#define NB_DEFAULTED_OPTIONS 5 + +/* Default values options names */ +static gchar *defaulted_options[NB_DEFAULTED_OPTIONS] = { + "delay", + "batchcount", + "cycles", + "size", + "saturation", + }; + +/* Number of default values options */ +static guint nb_defaultedOptions = NB_DEFAULTED_OPTIONS; + +/*------------------------------------*/ +/* Boolean xlock options */ +/*------------------------------------*/ + +/* boolean option entry */ +typedef struct struct_option_bool_s { + gchar *cmdarg; + gchar *label; + gchar *desc; + gchar defval; + gchar value; +} struct_option_bool; + +/* Description of the boolean options */ +struct_option_bool BoolOpt[] = +{ + {"mono", "mono", "The mono option causes xlock to display monochrome", '\000', '\000'}, + {"nolock", "nolock", "The nolock option causes xlock to only draw the patterns and not lock the display", '\000', '\000'}, + {"remote", "remote", "The remote option causes xlock to not stop you from locking remote X11 server", '\000', '\000'}, + {"allowroot", "allowroot", "The allowroot option allow the root password to unlock the server", '\000', '\000'}, + {"enablesaver", "enablesaver", "This option enables the use of the normal Xserver screen saver", '\000', '\000'}, + {"resetsaver", "resetsaver", "This option enables the call of XResetScreenSaver", '\000', '\000'}, + {"allowaccess", "allowaccess", "For servers not allowing clients to modify host access, left the X11 server open", '\000', '\000'}, +#ifdef USE_VTLOCK + {"lockvt", "lockvt", "This option control the VT switch locking", '\000', '\000'}, +#endif + {"mousemotion", "mousemotion", "Allows to turn on/off the mouse sensitivity to bring up pass window", '\001', '\000'}, + {"grabmouse", "grabmouse", "This option causes xlock to grab mouse and keyboard", '\001', '\000'}, + {"grabserver", "grabserver", "The grabserver option causes xlock to grab the server", '\001', '\000'}, + {"echokeys", "echokeys", "This option causes xlock to echo a question mark for each typed character", '\000', '\000'}, + {"usefirst", "usefirst", "This option enables xlock to use the first keystroke in the password", '\000', '\000'}, + {"verbose", "verbose", "verbose launch", '\000', '\000'}, + {"debug", "debug", "This option allows xlock to be locked in a window", '\000', '\000'}, + {"wireframe", "wireframe", "This option turns on wireframe rendering mode for GL", '\000', '\000'}, + {"install", "install", "Allows xlock to install its own colormap if xlock runs out of colors", '\000', '\000'}, + {"sound", "sound", "Allows you to turn on and off sound if installed with the capability", '\000', '\000'}, + {"timeelapsed", "timeelapsed", "Allows you to find out how long a machine is locked", '\000', '\000'}, + {"fullrandom", "fullrandom", "Turn on/off randomness options within modes", '\000', '\000'}, + {"use3d", "use3d", "Turn on/off 3d view, available on bouboule, pyro, star, and worm", '\000', '\000'}, + {"mouse", "mouse", "Turn on and off mouse interaction in eyes, julia, and swarm", '\000', '\000'}, +#if 0 + {"dtsaver", "dtsaver", "Turn on/off CDE Saver Mode. Only available if CDE support was compiled in", '\000', '\000'}, +#endif +}; + +/* Number of boolean options (set in main) */ +guint nb_boolOpt = 0; + +/* Boolean option dialog callback struct */ +typedef struct struct_option_bool_callback_s { + GtkWidget *boolopt_dialog; +} struct_option_bool_callback; + +/*------------------------------------*/ +/* General options */ +/*------------------------------------*/ + +/* Gen option entry struct */ +typedef struct struct_option_gen_s { + gchar *cmdarg; + gchar *label; + gchar *desc; + gchar *help_anchor; + GtkWidget *text_widget; +} struct_option_gen; + +/* Description of the general option */ +struct_option_gen generalOpt[] = +{ + {"username", "username", "text string to use for Name prompt", "opt_gen_", (GtkWidget *)NULL}, + {"password", "password", "text string to use for Password prompt", "gen_opt_", (GtkWidget *)NULL}, + {"info", "info", "text string to use for instruction", "gen_opt_", (GtkWidget *)NULL}, + {"validate", "validate", "text string to use for validating password message", "gen_opt_", (GtkWidget *)NULL}, + {"invalid", "invalidate", "text string to use for invalid password message", "gen_opt_", (GtkWidget *)NULL}, + {"message", "message", "message to say", "gen_opt_", (GtkWidget *)NULL}, + {"delay", "delay", "The delay option sets the speed at which a mode will operate", "gen_opt_", (GtkWidget *)NULL}, + {"batchcount", "batchcount", "This option sets number of things to do per batch to num", "gen_opt_", (GtkWidget *)NULL}, + {"cycles", "cycles", "This option delay is used for some mode as parameter", "gen_opt_", (GtkWidget *)NULL}, + {"ncolors", "ncolors", "This option delay is used for some mode as parameter", "gen_opt_", (GtkWidget *)NULL}, + {"size", "size", "This option delay is used for some mode as parameter", "gen_opt_", (GtkWidget *)NULL}, + {"saturation", "saturation", "This option delay is used for some GL mode as parameter", "gen_opt_", (GtkWidget *)NULL}, + {"nice", "nice", "This option sets system nicelevel of the xlock process", "gen_opt_", (GtkWidget *)NULL}, + {"lockdelay", "lockdelay", "This option set the delay between launch and lock", "gen_opt_", (GtkWidget *)NULL}, + {"timeout", "timeout", "The timeout option sets the password screen timeout", "gen_opt_", (GtkWidget *)NULL}, + {"geometry", "geometry", "geometry of mode window", "gen_opt_", (GtkWidget *)NULL}, + {"icongeometry", "icongeometry", "geometry of mode icon window", "gen_opt_", (GtkWidget *)NULL}, + {"glgeometry", "geometry", "geometry of GL mode window", "gen_opt_", (GtkWidget *)NULL}, + {"delta3d", "delta3d", "Turn on/off 3d view, available on bouboule, pyro, star, and worm", "gen_opt_", (GtkWidget *)NULL}, + {"neighbors", "neighbors", "Sets number of neighbors of cell (3, 4, 6, 9, 12) for automata modes", "gen_opt_", (GtkWidget *)NULL}, + {"cpasswd", "cpasswd", "Sets the key to be this text string to unlock", "gen_opt_", (GtkWidget *)NULL}, + {"program", "program", "program used as a fortune generator", "gen_opt_", (GtkWidget *)NULL}, +#ifdef USE_AUTO_LOGOUT + {"forceLogout", "forceLogout", "This option sets minutes to auto-logout", "gen_opt_", (GtkWidget *)NULL}, +#endif +#ifdef USE_BUTTON_LOGOUT + {"logoutButtonHelp", "logoutButtonHelp", "Text string is a message shown outside logout", "gen_opt_", (GtkWidget *)NULL}, + {"logoutButtonLabel", "logoutButtonLabel", "Text string is a message shown inside logout button", "gen_opt_", (GtkWidget *)NULL}, +#endif +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) + {"logoutFailedString", "logoutFailedString", "Text string is shown when a logout is attempted and fails", "gen_opt_", (GtkWidget *)NULL}, +#endif + {"startCmd", "startCmd", "Command to execute when the screen is locked", "gen_opt_", (GtkWidget *)NULL}, + {"endCmd", "endCmd", "Command to execute when the screen is unlocked", "gen_opt_", (GtkWidget *)NULL}, +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) + {"logoutCmd", "logoutCmd", "Command to execute when the user is logged out", "gen_opt_", (GtkWidget *)NULL}, +#endif + {"mailCmd", "mailCmd", "Command to execute when mails are checked", "gen_opt_", (GtkWidget *)NULL}, +#ifdef USE_DPMS + {"dpmsstandby", "dpmsstandby", "Allows one to set DPMS Standby for monitor (0 is infinite)", "gen_opt_", (GtkWidget *)NULL}, + {"dpmssuspend", "dpmssuspend", "Allows one to set DPMS Suspend for monitor (0 is infinite)", "gen_opt_", (GtkWidget *)NULL}, + {"dpmsoff", "dpmsoff", "Allows one to set DPMS Power Off for monitor (0 is infinite)", "gen_opt_", (GtkWidget *)NULL}, +#endif +}; + +/* Number of general options (set in main) */ +guint nb_genOpt = 0; + +/* General option dialog callback struct */ +typedef struct struct_option_gen_callback_s { + GtkWidget *gen_dialog; + GtkWidget *text_widget; +} struct_option_gen_callback; + +/*------------------------------------*/ +/* Font/File/Color options */ +/*------------------------------------*/ + +/* Option type (font/color/file) */ +typedef enum enum_type_option_fntcol_e { + TFNTCOL_FONT = 0, + TFNTCOL_COLOR, + TFNTCOL_FILE +} enum_type_option_fntcol; + +/* Font/Color/File option entry struct */ +typedef struct struct_option_fntcol_s { + enum_type_option_fntcol type; + gchar *cmdarg; + gchar *label; + gchar *desc; + gchar *help_anchor; + GtkWidget *entry; + GtkWidget *drawing_area; +} struct_option_fntcol; + +/* Description of the font and color option */ +struct_option_fntcol fntcolorOpt[] = +{ + {TFNTCOL_COLOR, "bg", "background", "background color to use for password prompt", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_COLOR, "fg", "foreground", "foreground color to use for password prompt", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_COLOR, "none3d", "none3d", "color used for empty size in 3d mode", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_COLOR, "right3d", "right3d", "color used for right eye in 3d mode", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_COLOR, "left3d", "left3d", "color used for left eye in 3d mode", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_COLOR, "both3d", "both3d", "color used for overlapping images for left and right eye in 3d mode", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FONT, "font", "font", "font to use for password prompt", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FONT, "messagefont", "msgfont", "font to use for message", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FONT, "planfont", "planfont", "font to use for lower part of password screen", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FILE, "messagesfile", "messagesfile", "file to be used as the fortune generator", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FILE, "messagefile", "messagefile", "file whose contents are displayed", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FILE, "bitmap", "bitmap", "sets the xbm, xpm, or ras file to be displayed with some modes", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FILE, "lifefile", "lifefile", "sets the lifeform (only one format: #P xlife format)", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, + {TFNTCOL_FILE, "life3dfile", "life3dfile", "sets the lifeform (only one format similar to #P xlife format)", "opt_fntcol_", + (GtkWidget *)NULL, (GtkWidget *)NULL}, +}; + +/* Number of font/color/file options (set in main) */ +guint nb_fntColorOpt = 0; + +/* Font/Color/File option dialog callback struct */ +typedef struct struct_option_fntcol_callback_s { + GtkWidget *fntcol_dialog; + GtkWidget *entry; + GtkWidget *drawing_area; +} struct_option_fntcol_callback; + +/* Colors handling */ +GdkVisual *gdkvisual; +GdkColormap *gdkcolormap; + +#endif /* !_LMODE_H_ */ diff --git a/xglock/xglock.c b/xglock/xglock.c new file mode 100644 index 00000000..59999542 --- /dev/null +++ b/xglock/xglock.c @@ -0,0 +1,1800 @@ +/*- + * xglock.c - main file for xglock, the GTK+ gui interface to xlock. + * + * Copyright (c) 1998 by An Unknown author & Remi Cohen-Scali + * + * See xlock.c for copying information. + * + * Revision History: + * Jul-98: Continual improvements by Remi Cohen-Scali + * ?? -98: First written by Charles Vidal . + */ + +/*- + XgLock Problems are almost the same as XmLock's ones. + 1. Allowing only one in -inroot. Need a way to kill it. (a menu ?) + 2. Still missing many options (TO DO). + 3. Need a clean rewritting. + */ + +#include +#include +#include +#include + +#include +#include +#include + +#if 0 +# define XGLOCK_DEBUG 1 +#else +# undef XGLOCK_DEBUG +#endif + +#ifdef HAVE_CONFIG_H +# include +#else +# define HAVE_UNISTD_H 1 +#endif + +#if HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_VFORK +#define FORK vfork +#define FORK_STR "vfork" +#else +#define FORK fork +#define FORK_STR "fork" +#endif + +#include +#include +#ifdef HAVE_GTK_FONTSEL_WIDGET +#include +#endif + +#include "lmode.h" + +/* Alloc args by chunks of */ +#define ARGS_CHUNK 20 +#define MODE_STRING "-mode" + +#define XLOCK "xlock" +#define WINDOW_WIDTH 160 +#define WINDOW_HEIGHT 100 +#define WINDOW_GEOMETRY "160x100" + +#define XGLOCK_SPACING 3 +#define XGLOCK_TABLE_HOMOGENEOUS ARG_HOMOGENEOUS +#define XGLOCK_TABLE_SPACING XGLOCK_SPACING +#define XGLOCK_TABLE_ROW_SPACING XGLOCK_SPACING +#define XGLOCK_TABLE_COL_SPACING XGLOCK_SPACING +#define XGLOCK_TABLE_BORDER_WIDTH XGLOCK_SPACING + +#define FRAME_WIDTH 500 +#define FRAME_HEIGHT 300 + +#define FONT_DIALOG_WIDTH 600 +#define FONT_DIALOG_HEIGHT 400 + +#define MAX_WIDGET_NUMBER_LEN 25 + +static char numberwidget[MAX_WIDGET_NUMBER_LEN]; +static pid_t numberprocess = -1; +static pid_t *launchedprocesses =(pid_t *)NULL; +static int num_launchedprocesses = 0; +static int sz_launchedprocesses = 0; +static int selected_mode = -1; +#ifndef HAVE_GTK_FONTSEL_WIDGET +static GtkWidget *font_sel_entry =(GtkWidget *)NULL; +#endif + +/* Prototypes */ +#if defined( __ANSI_C__ ) || defined( NeedFunctionsPrototypes ) +# define __PROTO( name, args ) name args +#else /* ! __ANSI_C__ && ! NeedFunctionsPrototypes */ +# define __PROTO( name, args ) name () +#endif /* ? __ANSI_C__ && ! NeedFunctionsPrototypes */ + +#define STD_CB_ARGS (GtkWidget *, gpointer) + +static void *__PROTO( secured_malloc, (size_t) ); +static void *__PROTO( secured_calloc, (int, size_t) ); +static void *__PROTO( secured_realloc, (void *, size_t) ); +static gchar *__PROTO( check_quotes, (gchar *str) ); + +static void __PROTO( mode_list_item_select_cb, STD_CB_ARGS ); +static void __PROTO( mode_list_item_unselect_cb, STD_CB_ARGS ); +static void __PROTO( compose_xlock_command, (char *) ); +static void __PROTO( kill_xlock_cb, STD_CB_ARGS ); +static void __PROTO( launch_xlock, STD_CB_ARGS ); +static void __PROTO( exit_xglock, STD_CB_ARGS ); +static void __PROTO( bool_option_clicked_cb, STD_CB_ARGS ); +static void __PROTO( destroy_window, STD_CB_ARGS ); + +static void __PROTO( color_selection_cancel_cb, STD_CB_ARGS ); +static void __PROTO( color_selection_ok_cb, STD_CB_ARGS ); +static void __PROTO( color_selection_changed_cb, STD_CB_ARGS ); +static void __PROTO( create_color_selection_dialog, STD_CB_ARGS ); + +#ifndef HAVE_GTK_FONTSEL_WIDGET +static void __PROTO( font_select_item_select_cb, STD_CB_ARGS ); +#endif +static void __PROTO( font_select_cancel_cb, STD_CB_ARGS ); +static void __PROTO( font_select_ok_cb, STD_CB_ARGS ); +static void __PROTO( create_font_selection_dialog, STD_CB_ARGS ); + +static void __PROTO( file_selection_cancel_cb, STD_CB_ARGS ); +static void __PROTO( file_selection_ok_cb, STD_CB_ARGS ); +static void __PROTO( create_file_selection_dialog, STD_CB_ARGS ); + +static void __PROTO( contextual_help_dialog, STD_CB_ARGS ); +static void __PROTO( window_help_dialog, STD_CB_ARGS ); +static void __PROTO( global_help_dialog, STD_CB_ARGS ); +static void __PROTO( about_dialog, STD_CB_ARGS ); + +static GtkWidget * __PROTO( create_file_menu, (GtkWidget *) ); +static GtkWidget * __PROTO( create_help_menu, (GtkWidget *) ); + +static void __PROTO( create_fntColorOptions_entries, (GtkWidget *) ); +static void __PROTO( create_genOptions_entries, (GtkWidget *) ); +static void __PROTO( create_boolOptions_buttons, (GtkWidget *) ); + +/* + * secured_malloc + * -------------- + * Return an allocated string of bytes + */ +static gpointer +secured_malloc(gulong sz) +{ + gpointer allocated =(gpointer)NULL; + allocated =(gpointer)g_malloc( sz ); + g_assert( allocated ); + return allocated; +} + +/* + * secured_calloc + * -------------- + * Return an allocated string of bytes + */ +static gpointer +secured_calloc(gulong n, + gulong sz) +{ + gpointer allocated = NULL; + + allocated =(gpointer )g_malloc( n * sz ); + g_assert( allocated ); + return allocated; +} + +/* + * secured_realloc + * --------------- + * Return an allocated string of bytes + */ +static gpointer +secured_realloc(gpointer ptr, + gulong sz) +{ + gpointer allocated = NULL; + + allocated =(gpointer )g_realloc( ptr, sz ); + g_assert( allocated ); + return allocated; +} + +/* + * compose_xlock_command + * --------------------- + * This function scan the string passed as argument to see if + * it is necessary to suround it with quotes for using it as a command + * line argument. + */ +static gchar * +check_quotes(gchar *str) +{ + static gchar *req_dbl = "'#&;* "; + static gchar *req_simple = "\""; + gint len = strlen( str ); + gint dbl_cspn = strcspn( str, req_dbl ); + gint simple_cspn = strcspn( str, req_simple ); + gchar *quotes = ""; + + if ( dbl_cspn != len ) + quotes = "\""; + if ( simple_cspn != len ) + quotes = "'"; + return quotes; +} + +/* + * compose_xlock_command + * --------------------- + * This function scan all the selected options and build an according + * command line for running xlock. + */ +static void +compose_xlock_command(gchar ***cmd_argv_p, + gulong *cmd_argv_sz, + gulong *cmd_argc) +{ + gint i; + gulong n = *cmd_argc; + gulong sz = *cmd_argv_sz; + gchar **cmd_argv = *cmd_argv_p; + +#ifdef XGLOCK_DEBUG +# define CHECK_REALLOC(num, size, need) \ + fprintf(stderr, \ + "check realloc: current=%ld need=%d size=%ld\n", \ + num, need, size ); \ + if (size <= num+need) { \ + fprintf(stderr, \ + "must realloc: size <= num+need is %s\n", \ + size<=num+need?"TRUE":"FALSE"); \ + cmd_argv =(char **)secured_realloc((gpointer)cmd_argv, \ + (gulong)(size+ARGS_CHUNK)*sizeof(char **)); \ + size+= ARGS_CHUNK; \ + } + +#else /* ! XGLOCK_DEBUG */ +# define CHECK_REALLOC(num, size, need) \ + if (size <= num+need) { \ + cmd_argv =(char **)secured_realloc((gpointer)cmd_argv, \ + (gulong)(size+ARGS_CHUNK)*sizeof(char **)); \ + size+= ARGS_CHUNK; \ + } + +#endif /* ? XGLOCK_DEBUG */ + + for (i = 0; i < nb_boolOpt; i++) + if (BoolOpt[i].value) { + + /* Check dynamic tab size */ + CHECK_REALLOC( n, sz, 1 ); + + /* Add the arg */ + cmd_argv[n] = secured_malloc( strlen( BoolOpt[i].cmdarg )+2 ); + (void) sprintf( cmd_argv[n], "-%s", BoolOpt[i].cmdarg ); + n++; + } + + /* General options */ + for (i = 0; i < nb_genOpt; i++) + { + gchar *val; + + if ( !( GTK_IS_ENTRY( generalOpt[i].text_widget ) ) ) continue; + + val = gtk_entry_get_text( GTK_ENTRY( generalOpt[i].text_widget )); + if ( strlen( val ) > 0 ) + { + gint j; + gchar *quotes; + + for ( j = 0; j < nb_defaultedOptions; j++ ) + if ( !strcmp( generalOpt[i].cmdarg, defaulted_options[j] ) ) + break; + if ( j < nb_defaultedOptions ) + { + gint defval = 0; + + switch ( j ) + { + case DEF_DELAY: + defval = LockProcs[selected_mode].def_delay; break; + case DEF_BATCHCOUNT: + defval = LockProcs[selected_mode].def_batchcount; break; + case DEF_CYCLES: + defval = LockProcs[selected_mode].def_cycles; break; + case DEF_SIZE: + defval = LockProcs[selected_mode].def_size; break; + case DEF_SATURATION: + defval = LockProcs[selected_mode].def_saturation; break; + } + + if ( defval == atoi( val ) ) +#ifdef XGLOCK_DEBUG + { + fprintf(stderr, + "Option %s has its default value (%d): discarded\n", + generalOpt[i].cmdarg, defval); +#endif + continue; +#ifdef XGLOCK_DEBUG + } +#endif + } + + /* Check dyntab size */ + CHECK_REALLOC( n, sz, 2 ); + + cmd_argv[n] = secured_malloc( strlen( generalOpt[i].cmdarg )+2 ); + (void) sprintf( cmd_argv[n], "-%s", generalOpt[i].cmdarg ); + n++; + + quotes = check_quotes( val ); + + cmd_argv[n] = secured_malloc( strlen( val )+3 ); + (void) sprintf( cmd_argv[n], "%s%s%s", quotes, val, quotes); + n++; + } + } + + /* font and color options */ + for (i = 0; i < nb_fntColorOpt; i++) + { + switch ( fntcolorOpt[i].type ) + { + /* Handle color parameter */ + case TFNTCOL_COLOR: + { + gchar *val = gtk_entry_get_text( GTK_ENTRY( fntcolorOpt[i].entry ) ); + gushort R, G, B; + gdouble T; + gchar opt[50]; + + if ( strlen( val ) > 0 ) + { + CHECK_REALLOC( n, sz, 2 ); + + cmd_argv[n] = secured_malloc( strlen( fntcolorOpt[i].cmdarg )+2 ); + (void) sprintf( cmd_argv[n], "-%s", fntcolorOpt[i].cmdarg ); + n++; + + sscanf( val, "#%4hx%4hx%4hx (%lf)", &R, &G, &B, &T ); + sprintf( opt, "#%04x%04x%04x", R, G, B ); + + cmd_argv[n] = secured_malloc( strlen( opt )+3 ); + (void) sprintf( cmd_argv[n], "\"%s\"", opt ); + n++; + } + break; + } + + /* Handle font or file parameters */ + case TFNTCOL_FONT: + case TFNTCOL_FILE: + { + gchar *val = gtk_entry_get_text( GTK_ENTRY( fntcolorOpt[i].entry ) ); + gchar *quotes; + + if (strlen( val ) > 0) + { + CHECK_REALLOC( n, sz, 2 ); + + cmd_argv[n] = secured_malloc( strlen( fntcolorOpt[i].cmdarg )+2 ); + (void) sprintf( cmd_argv[n], "-%s", fntcolorOpt[i].cmdarg ); + n++; + + quotes = check_quotes( val ); + + cmd_argv[n] = secured_malloc( strlen( val )+3 ); + (void) sprintf( cmd_argv[n], "%s%s%s", quotes, val, quotes); + n++; + } + break; + } + } + } + + /* Add a NULL ptr */ + CHECK_REALLOC( n, sz, 1 ); + cmd_argv[n++] =(char *)NULL; + +#undef CHECK_REALLOC + + /* Return argv, argc, argsz */ + *cmd_argc = n; + *cmd_argv_sz = sz; + *cmd_argv_p = cmd_argv; +} + +/* + * kill_xlock_cb + * ------------- + * Callback associated wih the Kill xlock file menu entry + */ +static void +kill_xlock_cb(GtkWidget *w, + gpointer udata) +{ + guint i; + gint dummy = 0; + + for ( i = 0; i < num_launchedprocesses; i++ ) + if ( launchedprocesses[i] != -1 ) { + (void) kill( launchedprocesses[i], SIGKILL ); + (void) wait( &dummy ); + launchedprocesses[i] = -1; + } + num_launchedprocesses = 0; +} + +/* + * launch_xlock + * ------------ + * This callback launch the xlock command accordingly to the selected + * modes and options. The xlock process is launched in root window, in + * a window or in normal mode. + */ +static void +launch_xlock(GtkWidget *w, + gpointer udata ) +{ +#ifdef XGLOCK_DEBUG + gint i; +#endif + gchar *launch_opt =(char *)udata; + gulong args_size = 0, + args_cnt = 0; + gchar **cmd_argv =(char **)NULL; + + if ( selected_mode >= 0 && selected_mode < nb_mode ) + { + /* Alloc argv table */ + args_size = ARGS_CHUNK; + args_cnt = 0; + cmd_argv =(char **)secured_calloc( ARGS_CHUNK, sizeof(char *) ); + + /* First arg is xlock itself */ + cmd_argv[args_cnt] = secured_malloc( strlen( XLOCK )+1 ); + (void) strcpy(cmd_argv[args_cnt], XLOCK); + args_cnt++; + + /* If launch in window/root */ + if ( launch_opt ) + { + cmd_argv[args_cnt] = secured_malloc( strlen( launch_opt )+1 ); + (void) strcpy(cmd_argv[args_cnt], launch_opt); + args_cnt++; + } + + /* Mode arg */ + cmd_argv[args_cnt] = secured_malloc( strlen( MODE_STRING )+1 ); + (void) strcpy(cmd_argv[args_cnt], MODE_STRING); + args_cnt++; + + /* Mode name */ + cmd_argv[args_cnt] = secured_malloc( strlen( LockProcs[selected_mode].cmdline_arg )+1 ); + (void) strcpy(cmd_argv[args_cnt], LockProcs[selected_mode].cmdline_arg); + args_cnt++; + + /* Add other user selected args */ + compose_xlock_command( &cmd_argv, &args_size, &args_cnt ); + +#ifdef XGLOCK_DEBUG + fprintf( stderr, "Running command: " ); + for ( i = 0; i < args_cnt; i++ ) + fprintf( stderr, "%s ", cmd_argv[i] ? cmd_argv[i] : "\n" ); +#endif + /* Allocate the launched pid_t dyntab */ + if ( !launchedprocesses ) + { + launchedprocesses = secured_calloc( 10, sizeof( pid_t ) ); + sz_launchedprocesses = 10; + } + /* Grow dyntab */ + if ( num_launchedprocesses == sz_launchedprocesses ) + { + launchedprocesses = secured_realloc(launchedprocesses, + (sz_launchedprocesses+10)*sizeof( pid_t ) ); + sz_launchedprocesses+= 10; + } + /* Fork process to run xlock */ + if ( (launchedprocesses[num_launchedprocesses] = FORK() ) == -1 ) + { + perror( FORK_STR ); + fprintf(stderr, + "Cannot " FORK_STR " process for xlock !\n" ); + } + /* Child process */ + else if ( launchedprocesses[num_launchedprocesses] == 0 ) + (void) execvp( XLOCK, cmd_argv ); + else + num_launchedprocesses++; + } + + /* Free resources */ + while ( args_cnt-- ) + (void) free( cmd_argv[args_cnt] ); + (void) free( cmd_argv ); + cmd_argv =(char **)NULL; +} + +/* + * exit_xglock + * ----------- + * This callback terminates the xglock process. It kills the root + * widget and break the gtk main loop. + */ +static void +exit_xglock(GtkWidget *w, + gpointer udata ) +{ + GtkWidget *root =(GtkWidget *)udata; + + gtk_main_quit(); + gtk_widget_destroy(root); +} + +/* + * destroy_window + * -------------- + * Callback for destroying window + */ +static void +destroy_window(GtkWidget * widget, + gpointer udata) +{ + gtk_widget_destroy( (GtkWidget *)udata ); +} + +/* + * bool_option_clicked_cb + * ---------------------- + * This callback is called when a check button is clicked. It's + * state is then saved in the structure. + */ +static void +bool_option_clicked_cb(GtkWidget *w, + gpointer udata ) +{ + guint optnr =(guint)udata; + + if ( !( GTK_IS_CHECK_BUTTON(w) )) return; + + BoolOpt[optnr].value = !BoolOpt[optnr].value; +#ifdef XGLOCK_DEBUG + fprintf(stderr, + "Option #%ud %s is %s\n", + optnr, BoolOpt[optnr].cmdarg, + BoolOpt[optnr].value ? "ACTIVE":"INACTIVE" ); +#endif +} + +/* ================================================================= */ +/* */ +/* List items' callbacks */ +/* */ +/* ================================================================= */ + +/* + * mode_list_item_select_cb + * ------------------------ + * Callback called when a mode list item is selected in the list. + * It fork the process and exec xlock in the specified mode. + */ +static void +mode_list_item_select_cb(GtkWidget *w, + gpointer mode_nr ) +{ + gint mode =(gint)mode_nr; + gint i; + + if (w->state != GTK_STATE_SELECTED ) return; + + if ( mode < 0 || mode >= nb_mode ) return; + + selected_mode = mode; + + for ( i = 0; i < nb_defaultedOptions; i++ ) + { + gchar temp[30]; + gint defval = 0, j; + + for ( j = 0; j < nb_mode; j++ ) + if ( !strcmp( generalOpt[j].cmdarg, defaulted_options[i] ) ) + break; + if ( j == nb_mode ) break; + switch ( i ) { + case DEF_DELAY: + defval = LockProcs[selected_mode].def_delay; break; + case DEF_BATCHCOUNT: + defval = LockProcs[selected_mode].def_batchcount; break; + case DEF_CYCLES: + defval = LockProcs[selected_mode].def_cycles; break; + case DEF_SIZE: + defval = LockProcs[selected_mode].def_size; break; + case DEF_SATURATION: + defval = LockProcs[selected_mode].def_saturation; break; + } + sprintf(temp, "%d", defval ); + gtk_entry_set_text(GTK_ENTRY(generalOpt[j].text_widget), temp); + } + + if ( ( numberprocess = FORK() ) == -1 ) + fprintf( stderr, "Fork error !\n" ); + else if ( numberprocess == 0 ) { + (void) execlp(XLOCK, XLOCK, "-parent", numberwidget, + MODE_STRING, LockProcs[mode].cmdline_arg, "-geometry", WINDOW_GEOMETRY, "-delay", "100000", + "-nolock", "-inwindow", "+install", 0); + } +} + +/* + * mode_list_item_unselect_cb + * -------------------------- + * Callback called when a mode list item is deselected in the list. + * It kills the child process forked to display preview in the + * preview window. + */ +static void +mode_list_item_unselect_cb(GtkWidget *w, + gpointer udata ) +{ + gint dummy = 0; + + if ( w->state == GTK_STATE_SELECTED ) return; + + selected_mode = -1; + + if ( numberprocess != -1 ) { + (void) kill( numberprocess, SIGKILL ); + (void) wait( &dummy ); + numberprocess = -1; + } +} + +/* ================================================================= */ +/* */ +/* Color selection dialog */ +/* */ +/* ================================================================= */ + +/* + * color_selection_cancel_cb + * ------------------------- + * Cancel callback for color selection dialog + */ +static void +color_selection_cancel_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr =(struct_option_fntcol_callback *)udata; + gtk_widget_hide(cbs_ptr->fntcol_dialog); + gtk_widget_destroy(cbs_ptr->fntcol_dialog); + (void) g_free(udata); +} + +/* + * color_selection_ok_cb + * --------------------- + * Ok callback for color selection dialog + */ +static void +color_selection_ok_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr =(struct_option_fntcol_callback *)udata; + GtkColorSelection *colorsel; + GdkColor gdkcol_bg; + GdkColor gdkcol_fg; + gdouble colors[4]; + gchar colorstr[30]; + + colorsel = GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->colorsel ); + + gtk_color_selection_get_color(colorsel, colors); + gtk_color_selection_set_color(colorsel, colors); + + sprintf(colorstr, "#%04x%04x%04x (%3.2f)", + (gushort)(colors[0] * 0xffff), + (gushort)(colors[1] * 0xffff), + (gushort)(colors[2] * 0xffff), + colors[3]); + + gdkcol_bg.red = (gushort)(colors[0] * 0xffff); + gdkcol_bg.green = (gushort)(colors[1] * 0xffff); + gdkcol_bg.blue = (gushort)(colors[2] * 0xffff); + gdk_color_alloc(gdkcolormap, &gdkcol_bg); + +#ifdef XGLOCK_DEBUG + fprintf(stderr, + "Parsed bg color: color=#%04x%04x%04x pixel=%lx\n", + gdkcol_bg.red, + gdkcol_bg.green, + gdkcol_bg.blue, + gdkcol_bg.pixel); +#endif + gdkcol_fg.red = (gushort)((1 -colors[0]) * 0xffff); + gdkcol_fg.green = (gushort)((1 -colors[1]) * 0xffff); + gdkcol_fg.blue = (gushort)((1 -colors[2]) * 0xffff); + gdk_color_alloc(gdkcolormap, &gdkcol_fg); + +#ifdef XGLOCK_DEBUG + fprintf(stderr, + "Parsed fg color: color=#%04x%04x%04x pixel=%lx\n", + gdkcol_fg.red, + gdkcol_fg.green, + gdkcol_fg.blue, + gdkcol_fg.pixel); +#endif + + gdk_flush(); + gdk_window_set_background(GTK_WIDGET(cbs_ptr->drawing_area)->window, &gdkcol_bg); + gtk_entry_set_text( GTK_ENTRY(cbs_ptr->entry), colorstr ); + gtk_widget_hide( cbs_ptr->fntcol_dialog ); + gtk_widget_destroy(cbs_ptr->fntcol_dialog); +/* XFlush( GDK_WINDOW_XDISPLAY( GTK_WIDGET(cbs_ptr->drawing_area)->window ) ); */ +/* gdk_flush(); */ + (void) g_free(udata); +} + +/* + * color_selection_changed_cb + * -------------------------- + * Color changed callback for color selection dialog (update the current color) + */ +static void +color_selection_changed_cb(GtkWidget *w, + gpointer udata) +{ + GtkWidget *colorsel_dialog =(GtkWidget *)udata; + GtkColorSelection *colorsel; + gdouble colors[4]; + + colorsel = GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG(colorsel_dialog)->colorsel ); + gtk_color_selection_get_color(colorsel, colors); +} + +/* + * create_color_selection_dialog + * ----------------------------- + * Create a color selection dialog. Is the callback for a color option + * choice button + */ +static void +create_color_selection_dialog(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol *optentry =(struct_option_fntcol *)udata; + gdouble colors[4]; + gchar *val; + struct_option_fntcol_callback *cbs_ptr; + + cbs_ptr =(struct_option_fntcol_callback *)secured_malloc(sizeof(struct_option_fntcol_callback)); + + gtk_preview_set_install_cmap(TRUE); + gtk_widget_push_visual(gtk_preview_get_visual()); + gtk_widget_push_colormap(gtk_preview_get_cmap()); + + cbs_ptr->fntcol_dialog = gtk_color_selection_dialog_new("color selection dialog"); + cbs_ptr->entry = optentry->entry; + cbs_ptr->drawing_area = optentry->drawing_area; + + val = gtk_entry_get_text( GTK_ENTRY(cbs_ptr->entry) ); + if ( strlen( val ) > 0 ) + { + gushort R, G, B; + + sscanf( val, "#%04hx%04hx%04hx (%lf)", &R, &G, &B, &colors[3]); + colors[0] = R /(gdouble)0xffff; + colors[1] = G /(gdouble)0xffff; + colors[2] = B /(gdouble)0xffff; + gtk_color_selection_set_opacity(GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->colorsel), + colors[3] < 1.0); + gtk_color_selection_set_color(GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->colorsel), + colors); + } + + gtk_color_selection_set_opacity(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->colorsel), + TRUE); + + gtk_color_selection_set_update_policy(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->colorsel), + GTK_UPDATE_CONTINUOUS); + + gtk_window_position(GTK_WINDOW(cbs_ptr->fntcol_dialog), GTK_WIN_POS_MOUSE); + gtk_signal_connect(GTK_OBJECT(cbs_ptr->fntcol_dialog), "destroy", + (GtkSignalFunc) destroy_window, + (gpointer) cbs_ptr->fntcol_dialog); + + gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->colorsel), + "color_changed", + (GtkSignalFunc) color_selection_changed_cb, + (gpointer) cbs_ptr->fntcol_dialog); + + gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->ok_button), + "clicked", + (GtkSignalFunc) color_selection_ok_cb, + (gpointer) cbs_ptr); + + gtk_signal_connect_object(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(cbs_ptr->fntcol_dialog)->cancel_button), + "clicked", + (GtkSignalFunc) color_selection_cancel_cb, + (gpointer) cbs_ptr); + + gtk_widget_pop_colormap(); + gtk_widget_pop_visual(); + gtk_widget_show(cbs_ptr->fntcol_dialog); +} + +/* ================================================================= */ +/* */ +/* Font selection dialog */ +/* */ +/* ================================================================= */ + +/* + * This code is used when xglock is compiled with the marvelous Gtk + * Font Selection Widget written by Damon Chaplin. The problem is that + * this widget is GPL'ed and xlockmore is BSD licensed. This widget cannot + * be embedded in this code. In order to use it, build a libgtkfontsel.a, + * library, install it in /usr/local/lib. Install gtkfontsel.h in + * /usr/local/include. + * Then use the --with-gtk-fontsel-prefix=/usr/local to enable this code. + * If you do not have this widget, you'll have a list of font names. + */ +#ifdef HAVE_GTK_FONTSEL_WIDGET + +/* + * font_select_cancel_cb + * --------------------- + * Font dialog cancel button callback + */ +static void +font_select_cancel_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr = (struct_option_fntcol_callback *)udata; + gtk_widget_hide(cbs_ptr->fntcol_dialog); + gtk_widget_destroy(cbs_ptr->fntcol_dialog); + (void) g_free(udata); +} + +/* + * font_select_ok_cb + * ----------------- + * Font dialog ok button callback + */ +static void +font_select_ok_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr = (struct_option_fntcol_callback *)udata; + gtk_widget_hide(cbs_ptr->fntcol_dialog); + gtk_entry_set_text(GTK_ENTRY(cbs_ptr->entry), + gtk_font_selection_get_font_name(GTK_FONT_SELECTION(cbs_ptr->fntcol_dialog))); + gtk_widget_destroy(cbs_ptr->fntcol_dialog); + (void) g_free(udata); +} + +/* + * create_font_selection_dialog + * ---------------------------- + * Create a font selection dialog for font parameters + */ +static void +create_font_selection_dialog(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol *optentry =(struct_option_fntcol *)udata; + struct_option_fntcol_callback *cbs_ptr; + gchar *fontname; + + cbs_ptr =(struct_option_fntcol_callback *)secured_malloc( sizeof(struct_option_fntcol_callback) ); + cbs_ptr->fntcol_dialog =(GtkWidget *)NULL; + cbs_ptr->entry = optentry->entry; + cbs_ptr->drawing_area =(GtkWidget *)NULL; + + cbs_ptr->fntcol_dialog = gtk_font_selection_new(NULL); + fontname = gtk_entry_get_text(GTK_ENTRY(optentry->entry)); + if ( fontname && strlen(fontname) ) + gtk_font_selection_set_font_name(GTK_FONT_SELECTION(cbs_ptr->fntcol_dialog), fontname); + gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION(cbs_ptr->fntcol_dialog)->ok_button), "clicked", + GTK_SIGNAL_FUNC(font_select_ok_cb), + (gpointer) cbs_ptr); + gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION(cbs_ptr->fntcol_dialog)->cancel_button), "clicked", + GTK_SIGNAL_FUNC(font_select_cancel_cb), + (gpointer) cbs_ptr); + gtk_widget_show(cbs_ptr->fntcol_dialog); +} + +#else /* ! HAVE_GTK_FONTSEL_WIDGET */ + +/* + * font_select_item_select_cb + * -------------------------- + * Font dialog callback called when a font item is selected in + * order to update dialog entry + */ +void +font_select_item_select_cb(GtkWidget *w, + gpointer udata) +{ + gchar **fontnames; + gint num_fonts; + gint font_nr =(gint)udata; + + fontnames = XListFonts (gdk_display, "-*-*-*-*-*-*-0-0-75-75-*-0-*-*", 32767, &num_fonts); + gtk_entry_set_text(GTK_ENTRY(font_sel_entry), fontnames[font_nr]); +} + +/* + * font_select_cancel_cb + * --------------------- + * Font selection dialog cancel callback + */ +void +font_select_cancel_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr =(struct_option_fntcol_callback *)udata; + + gtk_widget_hide( cbs_ptr->fntcol_dialog ); + gtk_widget_destroy( cbs_ptr->fntcol_dialog ); + (void)g_free( udata ); +} + +/* + * font_select_ok_cb + * ----------------- + * Font selection dialog ok callback + */ +void +font_select_ok_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr =(struct_option_fntcol_callback *)udata; + + gtk_widget_hide( cbs_ptr->fntcol_dialog ); + gtk_entry_set_text(GTK_ENTRY(cbs_ptr->entry), gtk_entry_get_text(GTK_ENTRY(font_sel_entry))); + gtk_widget_destroy( cbs_ptr->fntcol_dialog ); + (void)g_free( udata ); +} + +/* + * create_font_selection_dialog + * ---------------------------- + * Create a font selection dialog for font parameters + */ +void +create_font_selection_dialog(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol *optentry =(struct_option_fntcol *)udata; + struct_option_fntcol_callback *cbs_ptr; + GtkWidget *window; + GtkTooltips *tooltips; + GtkWidget *box1; + GtkWidget *box2; + GtkWidget *scrolled_win; + GtkWidget *list; + GtkWidget *list_item; + GtkWidget *button; + gchar **fontnames; + gint num_fonts, + i; + gchar temp[255]; + gchar *val; + gint ftfound = -1; + + cbs_ptr =(struct_option_fntcol_callback *)secured_malloc( sizeof(struct_option_fntcol_callback) ); + cbs_ptr->fntcol_dialog =(GtkWidget *)NULL; + cbs_ptr->entry = optentry->entry; + cbs_ptr->drawing_area =(GtkWidget *)NULL; + font_sel_entry =(GtkWidget *)NULL; + + cbs_ptr->fntcol_dialog = window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_widget_set_name(window, "main window"); + gtk_window_set_title(GTK_WINDOW(window), "xlock"); + + tooltips = gtk_tooltips_new(); + + box1 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(window), box1); + gtk_widget_show(box1); + + scrolled_win = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_set_usize(scrolled_win, 600, 400 ); + gtk_container_border_width(GTK_CONTAINER(scrolled_win), 1); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(box1), scrolled_win); + gtk_widget_show(scrolled_win); + + list = gtk_list_new (); + gtk_list_set_selection_mode(GTK_LIST(list), GTK_SELECTION_BROWSE); + gtk_container_add(GTK_CONTAINER(scrolled_win), list); + gtk_container_set_focus_vadjustment (GTK_CONTAINER (list), + gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win))); + GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (scrolled_win)->vscrollbar, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, list, "Select the font you want",(gchar *)NULL); + + val = gtk_entry_get_text( GTK_ENTRY(cbs_ptr->entry) ); + + fontnames = XListFonts (gdk_display, "-*-*-*-*-*-*-0-0-75-75-*-0-*-*", 32767, &num_fonts); + for (i = 0; i < num_fonts; i++) + if ( !strcmp( val, fontnames[i] ) ) + { + ftfound = i; + break; + } + for (i = 0; i < num_fonts; i++) { + sprintf(temp, "%s", fontnames[i]); + list_item = gtk_list_item_new_with_label(temp); + gtk_container_add(GTK_CONTAINER(list), list_item); + gtk_signal_connect (GTK_OBJECT (list_item), "select", + (GtkSignalFunc) font_select_item_select_cb, + (gpointer) i); + gtk_widget_show(list_item); + } + gtk_widget_show( list ); + + font_sel_entry = gtk_entry_new(); + if ( ftfound >= 0 ) + gtk_entry_set_text( GTK_ENTRY(font_sel_entry), val ); + gtk_tooltips_set_tip(tooltips, font_sel_entry, "Selected font",(gchar *)NULL); + gtk_box_pack_start(GTK_BOX(box1), font_sel_entry, FALSE, TRUE, 0); + gtk_widget_show(font_sel_entry); + + if ( ftfound >= 0 ) + { + gtk_list_unselect_item( GTK_LIST(list), 0 ); + gtk_list_select_item( GTK_LIST(list), ftfound ); + } + + /* HBox for buttons */ + box2 = gtk_hbox_new(FALSE, 10); + gtk_container_border_width(GTK_CONTAINER(box2), 10); + gtk_box_pack_start(GTK_BOX(box1), box2, FALSE, FALSE, 5); + gtk_widget_show(box2); + + /* button OK */ + button = gtk_button_new_with_label("Ok"); + gtk_widget_set_usize(button, 50, 20 ); + gtk_container_border_width(GTK_CONTAINER(button), 1); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, "Accept selected font",(gchar *)NULL); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) font_select_ok_cb, + (gpointer) cbs_ptr); + gtk_box_pack_start(GTK_BOX(box2), button, TRUE, FALSE, 5); + gtk_widget_show(button); + + /* button Cancel */ + button = gtk_button_new_with_label("Cancel"); + gtk_widget_set_usize(button, 50, 20 ); + gtk_container_border_width(GTK_CONTAINER(button), 1); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, "Accept selected font",(gchar *)NULL); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) font_select_cancel_cb, + (gpointer) cbs_ptr); + gtk_box_pack_start(GTK_BOX(box2), button, TRUE, FALSE, 5); + gtk_widget_show(button); + + gtk_widget_show(window); +} + +#endif /* ? HAVE_GTK_FONTSEL_WIDGET */ + +/* ================================================================= */ +/* */ +/* File selection dialog */ +/* */ +/* ================================================================= */ + +/* + * file_selection_cancel_cb + * ------------------------ + * File selector Cancel callback + */ +static void +file_selection_cancel_cb(GtkWidget *w, + gpointer udata) +{ + struct_option_fntcol_callback *cbs_ptr= (struct_option_fntcol_callback *)udata; + gtk_widget_hide( cbs_ptr->fntcol_dialog ); + gtk_widget_destroy( cbs_ptr->fntcol_dialog ); + (void) g_free(udata); +} + +/* + * file_selection_ok_cb + * -------------------- + * File selector OK callback + */ +static void +file_selection_ok_cb(GtkWidget *w, + gpointer udata) +{ + struct stat stbuf; + struct_option_fntcol_callback *cbs_ptr= (struct_option_fntcol_callback *)udata; + gchar *filename; + + /* Be sure file exist. We could be more paranoia */ + filename = gtk_file_selection_get_filename(GTK_FILE_SELECTION(cbs_ptr->fntcol_dialog)); + if ( stat(filename, &stbuf) != -1 ) + { + gtk_widget_hide(cbs_ptr->fntcol_dialog); + gtk_entry_set_text(GTK_ENTRY(cbs_ptr->entry), filename); + gtk_widget_destroy(cbs_ptr->fntcol_dialog); + (void) g_free(udata); + } +} + +/* + * create_file_selection_dialog + * ---------------------------- + * Create a file selection dialog for file path parameters ( + */ +static void +create_file_selection_dialog(GtkWidget *w, + struct_option_fntcol *optentry ) +{ + struct_option_fntcol_callback *cbs_ptr; + + cbs_ptr =(struct_option_fntcol_callback *)secured_malloc( sizeof(struct_option_fntcol_callback) ); + cbs_ptr->fntcol_dialog = gtk_file_selection_new("file selection dialog"); + cbs_ptr->entry = optentry->entry; + cbs_ptr->drawing_area =(GtkWidget *)NULL; + gtk_window_position(GTK_WINDOW(cbs_ptr->fntcol_dialog), GTK_WIN_POS_MOUSE); + gtk_signal_connect(GTK_OBJECT(cbs_ptr->fntcol_dialog), "destroy", + (GtkSignalFunc) destroy_window, + (gpointer) cbs_ptr->fntcol_dialog); + gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(cbs_ptr->fntcol_dialog)->ok_button), + "clicked", (GtkSignalFunc) file_selection_ok_cb, + (gpointer) cbs_ptr); + gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(cbs_ptr->fntcol_dialog)->cancel_button), + "clicked", (GtkSignalFunc) file_selection_cancel_cb, + (gpointer) cbs_ptr); + gtk_widget_show(cbs_ptr->fntcol_dialog); +} + +/* ================================================================= */ +/* */ +/* Help dialogs routines */ +/* */ +/* ================================================================= */ + +static void +contextual_help_dialog(GtkWidget *w, + gpointer udata ) +{ + fprintf(stderr, "contextual_help_dialog !\n"); +} + +static void +window_help_dialog(GtkWidget *w, + gpointer udata ) +{ + fprintf(stderr, "window_help_dialog !\n"); +} + +static void +global_help_dialog(GtkWidget *w, + gpointer udata ) +{ + fprintf(stderr, "global_help_dialog !\n"); +} + +static void +about_dialog(GtkWidget *w, + gpointer udata ) +{ + fprintf(stderr, "about_dialog !\n"); +} + + +/* ================================================================= */ +/* */ +/* Menu bar creation routines */ +/* */ +/* ================================================================= */ + +/* + * create_file_menu + * ---------------- + * Create the file menu attached to file menubar item + */ +static GtkWidget * +create_file_menu(GtkWidget *window) +{ + GtkWidget *menu; + GtkWidget *menu_item; + GtkAcceleratorTable *table; + + menu = gtk_menu_new(); + table = gtk_accelerator_table_new(); + gtk_menu_set_accelerator_table (GTK_MENU (menu), table); + + menu_item = gtk_menu_item_new_with_label("Kill xlock"); + gtk_container_add( GTK_CONTAINER (menu), menu_item); + gtk_widget_install_accelerator(menu_item, table, + "activate", 'K', + 0); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + (GtkSignalFunc) kill_xlock_cb, + (gpointer) window); + gtk_widget_show(menu_item); + + menu_item = gtk_menu_item_new_with_label("Quit"); + gtk_container_add( GTK_CONTAINER (menu), menu_item); + gtk_widget_install_accelerator(menu_item, table, + "activate", 'Q', + 0); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + (GtkSignalFunc) exit_xglock, + (gpointer) window); + gtk_widget_show(menu_item); + + return menu; +} + +/* + * create_help_menu + * ---------------- + * Create the help menu attached to help menubar item + */ +static GtkWidget * +create_help_menu(GtkWidget *window) +{ + GtkWidget *menu; + GtkWidget *menu_item; + GtkAcceleratorTable *table; + + menu = gtk_menu_new(); + table = gtk_accelerator_table_new(); + gtk_menu_set_accelerator_table (GTK_MENU (menu), table); + + menu_item = gtk_menu_item_new_with_label("Context help"); + gtk_container_add( GTK_CONTAINER (menu), menu_item); + gtk_widget_install_accelerator(menu_item, + table, + "activate", + 'C', + 0); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + (GtkSignalFunc) contextual_help_dialog, + (gpointer) window); + gtk_widget_show(menu_item); + + menu_item = gtk_menu_item_new_with_label("Window help"); + gtk_container_add( GTK_CONTAINER (menu), menu_item); + gtk_widget_install_accelerator(menu_item, + table, + "activate", + 'W', + 0); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + (GtkSignalFunc) window_help_dialog, + (gpointer) window); + gtk_widget_show(menu_item); + + menu_item = gtk_menu_item_new_with_label("Global help"); + gtk_container_add( GTK_CONTAINER (menu), menu_item); + gtk_widget_install_accelerator(menu_item, + table, + "activate", + 'G', + 0); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + (GtkSignalFunc) global_help_dialog, + (gpointer) window); + gtk_widget_show(menu_item); + + menu_item = gtk_menu_item_new_with_label("About XgLock"); + gtk_container_add( GTK_CONTAINER (menu), menu_item); + gtk_widget_install_accelerator(menu_item, + table, + "activate", + 'A', + 0); + gtk_signal_connect (GTK_OBJECT (menu_item), "activate", + (GtkSignalFunc) about_dialog, + (gpointer) window); + gtk_widget_show(menu_item); + + return menu; +} + +/* ================================================================= */ +/* */ +/* Special parameters' dialog creation */ +/* */ +/* ================================================================= */ + +/* + * create_fntColorOptions_entries + * ------------------------------ + * Create all entries for font and color options. + */ +static void +create_fntColorOptions_entries(GtkWidget *window) +{ + gint i; + GtkWidget *box0; + GtkWidget *box1; + GtkWidget *table; + GtkWidget *label; + GtkWidget *entry; + GtkWidget *button =(GtkWidget *)NULL; + GtkTooltips *tooltips; + GdkColor gdkcol_bg; + GdkColor gdkcol_fg; + + tooltips = gtk_tooltips_new(); + + box0 = gtk_hbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(window), box0); + gtk_widget_show(box0); + + table = gtk_table_new(nb_fntColorOpt,6,0); + gtk_table_set_row_spacings(GTK_TABLE(table),XGLOCK_TABLE_ROW_SPACING); + gtk_table_set_col_spacings(GTK_TABLE(table),XGLOCK_TABLE_COL_SPACING); + gtk_container_border_width(GTK_CONTAINER(table),XGLOCK_TABLE_BORDER_WIDTH); + gtk_box_pack_start(GTK_BOX(box0),table,TRUE,TRUE,XGLOCK_SPACING); + gtk_widget_show(table); + + for (i = 0; i < nb_fntColorOpt; i++) { + + label = gtk_label_new(fntcolorOpt[i].label); + gtk_table_attach(GTK_TABLE(table),label, + 0,1,i,i+1, + GTK_EXPAND|GTK_FILL, + GTK_EXPAND|GTK_FILL, + XGLOCK_TABLE_SPACING, + XGLOCK_TABLE_SPACING); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); + gtk_widget_show(label); + + fntcolorOpt[i].entry = entry = gtk_entry_new(); + gtk_entry_set_editable(GTK_ENTRY(entry), False); + gtk_widget_set_usize(entry, 0, 21); + gtk_tooltips_set_tip(tooltips, entry, fntcolorOpt[i].desc,(gchar *)NULL); + gtk_table_attach(GTK_TABLE(table),entry, + 1,5,i,i+1, + GTK_EXPAND|GTK_FILL, + GTK_EXPAND|GTK_FILL, + XGLOCK_TABLE_SPACING, + XGLOCK_TABLE_SPACING); + gtk_widget_show(entry); + + switch ( fntcolorOpt[i].type ) { + + case TFNTCOL_COLOR: + box1 = gtk_hbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(box1),XGLOCK_TABLE_BORDER_WIDTH); + gtk_table_attach(GTK_TABLE(table),box1, + 5,6,i,i+1, + GTK_EXPAND|GTK_FILL, + GTK_EXPAND|GTK_FILL, + XGLOCK_TABLE_SPACING, + XGLOCK_TABLE_SPACING); + gtk_widget_show(box1); + + gdkcol_bg.red = 0x0000; + gdkcol_bg.green = 0x0000; + gdkcol_bg.blue = 0x0000; + gdk_color_alloc(gdkcolormap, &gdkcol_bg); + gdkcol_bg.red = 0xffff; + gdkcol_bg.green = 0xffff; + gdkcol_bg.blue = 0xffff; + gdk_color_alloc(gdkcolormap, &gdkcol_fg); + tooltips = gtk_tooltips_new(); + button = gtk_button_new_with_label( "Select color ..." ); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) create_color_selection_dialog, + (gpointer)&fntcolorOpt[i]); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, fntcolorOpt[i].desc,(gchar *)NULL); + gtk_box_pack_start(GTK_BOX(box1), button, FALSE, TRUE, 0); + gtk_widget_show(button); + + fntcolorOpt[i].drawing_area = gtk_drawing_area_new(); + gtk_tooltips_set_tip(tooltips, fntcolorOpt[i].drawing_area, fntcolorOpt[i].desc,(gchar *)NULL); + gtk_widget_set_usize(fntcolorOpt[i].drawing_area, 10, 21); + gtk_container_add(GTK_CONTAINER(box1), fntcolorOpt[i].drawing_area); + gtk_widget_show(fntcolorOpt[i].drawing_area); + + break; + + case TFNTCOL_FONT: + button = gtk_button_new_with_label( "Select font ..." ); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) create_font_selection_dialog, + (gpointer)&fntcolorOpt[i]); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, fntcolorOpt[i].desc,(gchar *)NULL); + gtk_table_attach(GTK_TABLE(table),button, + 5,6,i,i+1, + GTK_EXPAND|GTK_FILL, + GTK_EXPAND|GTK_FILL, + XGLOCK_TABLE_SPACING, + XGLOCK_TABLE_SPACING); + gtk_widget_show(button); + break; + + case TFNTCOL_FILE: + button = gtk_button_new_with_label( "Select file ..." ); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) create_file_selection_dialog, + (gpointer)&fntcolorOpt[i]); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, fntcolorOpt[i].desc,(gchar *)NULL); + gtk_table_attach(GTK_TABLE(table),button, + 5,6,i,i+1, + GTK_EXPAND|GTK_FILL, + GTK_EXPAND|GTK_FILL, + XGLOCK_TABLE_SPACING, + XGLOCK_TABLE_SPACING); + gtk_widget_show(button); + break; + + default: + fprintf(stderr, + "Program Inconsistency: Unknown parameter type #%d !\n", + fntcolorOpt[i].type ); + } + + if ( fntcolorOpt[i].drawing_area && GTK_WIDGET(fntcolorOpt[i].drawing_area)->window ) + gdk_window_set_background(GTK_WIDGET(fntcolorOpt[i].drawing_area)->window, + &gdkcol_bg); + } +} + +/* ================================================================= */ +/* */ +/* Create general optrions entries */ +/* */ +/* ================================================================= */ + +/* + * create_genOptions_entries + * ------------------------- + * Create all entries for general options (text fields). + */ +static void +create_genOptions_entries(GtkWidget *window) +{ + gint i; +/* gint j; */ + GtkWidget *box0; + GtkWidget *box1; + GtkWidget *box2; + GtkWidget *entry; + GtkWidget *label; + GtkTooltips *tooltips; + + tooltips = gtk_tooltips_new(); + + box0 = gtk_hbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(window), box0); + gtk_widget_show(box0); + + box1 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(box0), box1); + gtk_widget_show(box1); + + box2 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(box0), box2); + gtk_widget_show(box2); + + for (i = 0; i < nb_genOpt; i++) { + label = gtk_label_new(generalOpt[i].label); + gtk_widget_set_usize(label, 60, 21); + gtk_box_pack_start(GTK_BOX(box1), label, FALSE, TRUE, 0); + gtk_widget_show(label); + } + for (i = 0; i < nb_genOpt; i++) { + entry = gtk_entry_new(); + gtk_widget_set_usize(entry, 350, 21); + gtk_tooltips_set_tip(tooltips, entry, generalOpt[i].desc,(gchar *)NULL); + gtk_box_pack_start(GTK_BOX(box2), entry, FALSE, TRUE, 0); + gtk_widget_show(entry); + generalOpt[i].text_widget = entry; + } +} + +/* ================================================================= */ +/* */ +/* Create boolean options check buttons */ +/* */ +/* ================================================================= */ + +/* + * create_boolOptions_buttons + * -------------------------- + * Creates all toggles buttons for boolean options + */ +static void +create_boolOptions_buttons(GtkWidget *parent) +{ + gint i; + GtkWidget *box0; + GtkWidget *box1; + GtkWidget *box2; + GtkWidget *button; + GtkTooltips *tooltips; + + tooltips = gtk_tooltips_new(); + + box0 = gtk_hbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(parent), box0); + gtk_widget_show(box0); + + box1 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(box0), box1); + gtk_widget_show(box1); + + box2 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(box0), box2); + gtk_widget_show(box2); + + for (i = 0; i < nb_boolOpt; i++) { + button = gtk_check_button_new_with_label(BoolOpt[i].label); + gtk_tooltips_set_tip(tooltips, button, BoolOpt[i].desc,(gchar *)NULL); + gtk_box_pack_start(GTK_BOX(i%2 ? box1 : box2), button, TRUE, TRUE, 0); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) bool_option_clicked_cb, + (gpointer)i); + gtk_widget_show(button); + } +} + +/* ================================================================= */ +/* */ +/* Main function */ +/* */ +/* ================================================================= */ + +gint +main(gint argc, gchar *argv[]) +{ + GtkWidget *xglockroot; + GdkWindow *gdkwin; + Window *xwin; + + GtkWidget *box0; + GtkWidget *box1; + GtkWidget *box2; + GtkWidget *box3; + GtkWidget *scrolled_win; + GtkWidget *list; + GtkWidget *list_item; + GtkWidget *button; + GtkWidget *separator; + GtkWidget *menubar; + GtkWidget *menuitem; + GtkWidget *menu; + GtkWidget *previewButton; + GtkWidget *notebook; + GtkWidget *frame; + GtkWidget *label; + GtkTooltips *tooltips; + gint i; + gchar temp[100]; + + /* Init for some data */ + nb_mode = sizeof (LockProcs) / sizeof (LockProcs[0]); + nb_boolOpt = sizeof (BoolOpt) / sizeof (BoolOpt[0]); + nb_genOpt = sizeof (generalOpt) / sizeof (generalOpt[0]); + nb_fntColorOpt = sizeof (fntcolorOpt) / sizeof (fntcolorOpt[0]); + + gtk_init(&argc, &argv); + gtk_rc_parse("simplerc"); + + gdkvisual = gdk_visual_get_best(); + gdkcolormap = gdk_colormap_new(gdkvisual, 0); + + xglockroot = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_widget_set_name(xglockroot, ""); + gtk_window_set_title(GTK_WINDOW(xglockroot), "GTK+ XLock tester"); + gtk_window_set_wmclass (GTK_WINDOW (xglockroot), "XgLock", "XLock"); + + tooltips = gtk_tooltips_new(); + + box1 = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(xglockroot), box1); + gtk_widget_show(box1); + + box0 = gtk_vbox_new(FALSE, 10); + gtk_container_border_width(GTK_CONTAINER(box0), 10); + gtk_box_pack_start(GTK_BOX(box1), box0, TRUE, TRUE, 0); + gtk_widget_show(box0); + + box2 = gtk_hbox_new(FALSE, 10); + gtk_container_border_width(GTK_CONTAINER(box2), 10); + gtk_box_pack_start(GTK_BOX(box1), box2, TRUE, TRUE, 0); + gtk_widget_show(box2); + + /* menu bar */ + menubar = gtk_menu_bar_new(); + gtk_box_pack_start(GTK_BOX(box0), menubar, FALSE, TRUE, 0); + gtk_widget_show(menubar); + + /* File menu and File menu bar item */ + menu = create_file_menu(xglockroot); + menuitem = gtk_menu_item_new_with_label("File"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); + gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); + gtk_widget_show(menuitem); + + /* File menu and File menu bar item */ + menu = create_help_menu(xglockroot); + menuitem = gtk_menu_item_new_with_label("Help"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); + gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); + gtk_widget_show(menuitem); + + /* Third box containing preview button */ + box3 = gtk_hbox_new(FALSE, 10); + gtk_widget_set_usize(box3, WINDOW_WIDTH+20, WINDOW_HEIGHT ); + gtk_container_border_width(GTK_CONTAINER(box3), 1); + gtk_box_pack_start(GTK_BOX(box0), box3, TRUE, TRUE, 0); + gtk_widget_show(box3); + + /* Preview button (button because I need here an X window) */ + previewButton = gtk_button_new_with_label( "Preview window" ); + gtk_widget_set_usize(previewButton, WINDOW_WIDTH, WINDOW_HEIGHT ); + gtk_box_pack_start(GTK_BOX(box3), previewButton, TRUE, FALSE, 10); + gtk_tooltips_set_tip(tooltips, previewButton, "This is the preview window",(gchar *)NULL); + gtk_widget_realize(previewButton); + gtk_widget_show(previewButton); + + /* Getting X window id through GDK */ + gdkwin = GTK_WIDGET(previewButton)->window; + xwin =(Window *)GDK_WINDOW_XWINDOW( gdkwin ); + (void) sprintf(numberwidget, "%ld",(unsigned long)xwin ); + + /* notebook */ + notebook = gtk_notebook_new(); + gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); + gtk_box_pack_start(GTK_BOX(box2), notebook, TRUE, TRUE, 0); + gtk_widget_show(notebook); + + /* list of modes */ + frame = gtk_frame_new("Choice of the mode"); + gtk_container_border_width(GTK_CONTAINER(frame), 10); + gtk_widget_set_usize(frame, FRAME_WIDTH, FRAME_HEIGHT); + + /* list */ + scrolled_win = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(frame), scrolled_win); + gtk_widget_show(scrolled_win); + + list = gtk_list_new(); + gtk_list_set_selection_mode(GTK_LIST(list), GTK_SELECTION_SINGLE); + gtk_container_add(GTK_CONTAINER(scrolled_win), list); + gtk_container_set_focus_vadjustment (GTK_CONTAINER (list), + gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win))); + GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (scrolled_win)->vscrollbar, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, list, "Select the mode you want to try",(gchar *)NULL); + + for (i = 0; i < nb_mode; i++) { + sprintf(temp, "%s :%s", LockProcs[i].cmdline_arg, LockProcs[i].desc); + list_item = gtk_list_item_new_with_label(temp); + gtk_container_add(GTK_CONTAINER(list), list_item); + gtk_signal_connect (GTK_OBJECT (list_item), "select", + (GtkSignalFunc) mode_list_item_select_cb, + (gpointer) ((long) i)); + gtk_signal_connect (GTK_OBJECT (list_item), "deselect", + (GtkSignalFunc) mode_list_item_unselect_cb, + (gpointer) NULL); + gtk_widget_show(list_item); + } + gtk_widget_show( list ); + + label = gtk_label_new("choice the mode"); + gtk_widget_show(frame); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); + + /* Options */ + + frame = gtk_frame_new("Options booleans"); + gtk_container_border_width(GTK_CONTAINER(frame), 10); + gtk_widget_set_usize(frame, FRAME_WIDTH, FRAME_HEIGHT); + gtk_widget_show(frame); + + scrolled_win = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(frame), scrolled_win); + gtk_widget_show(scrolled_win); + + create_boolOptions_buttons(scrolled_win); + label = gtk_label_new("Options"); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); + /* General Options */ + + frame = gtk_frame_new("General Options"); + gtk_container_border_width(GTK_CONTAINER(frame), 10); + gtk_widget_set_usize(frame, FRAME_WIDTH, FRAME_HEIGHT); + gtk_widget_show(frame); + + scrolled_win = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(frame), scrolled_win); + gtk_widget_show(scrolled_win); + + create_genOptions_entries(scrolled_win); + label = gtk_label_new("General Options"); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); + /* Color Options */ + + frame = gtk_frame_new("Color Options"); + gtk_container_border_width(GTK_CONTAINER(frame), 10); + gtk_widget_set_usize(frame, FRAME_WIDTH, FRAME_HEIGHT ); + gtk_widget_show(frame); + + scrolled_win = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add(GTK_CONTAINER(frame), scrolled_win); + gtk_widget_show(scrolled_win); + + create_fntColorOptions_entries(scrolled_win); + label = gtk_label_new("Font & Color Options"); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); + + /* end of notebook */ + separator = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(box1), separator, FALSE, TRUE, 0); + gtk_widget_show(separator); + + /* Last Hbox for buttons */ + box2 = gtk_hbox_new(FALSE, 10); + gtk_container_border_width(GTK_CONTAINER(box2), 10); + gtk_box_pack_start(GTK_BOX(box1), box2, FALSE, TRUE, 0); + gtk_widget_show(box2); + + /* buttons */ + button = gtk_button_new_with_label("launch"); + gtk_widget_set_usize(button, 60, 30); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, "Launch xlock in selected mode",(gchar *)NULL); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) launch_xlock, + (gpointer) NULL); + gtk_box_pack_start(GTK_BOX(box2), button, FALSE, TRUE, 4); + gtk_widget_show(button); + + /* launch in root button */ + button = gtk_button_new_with_label("launch in root"); + gtk_widget_set_usize(button, 95, 30); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, "Launch xlock in root window",(gchar *)NULL); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) launch_xlock, + (gpointer) "-inroot" ); + gtk_box_pack_start(GTK_BOX(box2), button, FALSE, TRUE, 4); + gtk_widget_show(button); + + /* launch -- in window -- button */ + button = gtk_button_new_with_label("launch in window"); + gtk_widget_set_usize(button, 115, 30); + GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + gtk_tooltips_set_tip(tooltips, button, "Launch xlock in a window",(gchar *)NULL); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) launch_xlock, + (gpointer) "-inwindow" ); + gtk_box_pack_start(GTK_BOX(box2), button, FALSE, TRUE, 4); + gtk_widget_show(button); + + /* exit button */ + button = gtk_button_new_with_label("exit"); + gtk_tooltips_set_tip(tooltips, button, "Exit xglock",(gchar *)NULL); + gtk_signal_connect_object(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) exit_xglock, + (gpointer)xglockroot ); + gtk_box_pack_start(GTK_BOX(box2), button, TRUE, TRUE, 4); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + gtk_widget_grab_default(button); + gtk_widget_show(button); + + gtk_widget_show(xglockroot); + + gtk_main(); + + return 0; +} diff --git a/xlock/Imakefile b/xlock/Imakefile new file mode 100644 index 00000000..152a3172 --- /dev/null +++ b/xlock/Imakefile @@ -0,0 +1,51 @@ +#ifndef XCOMM +#define XCOMM /**/# +#endif +XCOMM @(#)Sub Imakefile xlockmore +XCOMM + +#include "../iconfig.h" +top_srcdir = .. +UTILSDIR = ./ +UTILOBJDIR = ./ + +DU = $(UTILDIR) +DOU = $(UTILOBJDIR) +OU = $(O)$(S)$(DOU) +CU = $(C) $(DU) + +XCOMM List of object files +XLOCKUTILOBJS = $(DOU)xlock$(OU)passwd$(OU)resource$(O)$(S)\ +$(DOU)util$(OU)logout$(OU)mode$(OU)ras$(OU)xbm$(O)$(S)\ +$(DOU)vis$(OU)color$(OU)random$(OU)iostuff$(OU)automata$(O)$(S)\ +$(DOU)spline$(OU)erase$(OU)sound$(O)$(S)\ +$(DOU)vtlock$(O) +#ifdef Check +XLOCKCHECKOBJS = $(S)memcheck$(O) +#endif + +XCOMM List of source files +XLOCKUTILHDRS = xlock.h mode.h vroot.h ras.h version.h config.h +XLOCKUTILSRCS = $(DU)xlock$(CU)passwd$(CU)resource$(C) \ +$(DU)util$(CU)logout$(CU)mode$(CU)ras$(CU)xbm$(C) \ +$(DU)vis$(CU)color$(CU)random$(CU)iostuff$(CU)automata$(C) \ +$(DU)spline$(CU)erase$(CU)sound$(C) \ +$(DU)vtlock$(C) +XLOCKCHECKSRCS = $(DU)memcheck$(C) + +XCOMM default target + +all:: $(XLOCKUTILOBJS) $(XLOCKDEBUGOBJS) + +DependTarget() +LintTarget() + +InstallProgram(xlock,$(BINDIR)) +InstallAppDefaults(XLock) +InstallManPage(xlock,$(MANDIR)) + +distclean:: clean + $(RM) Makefile config.status config.cache config.log config.h memdiag.xlock-* + +clean.all:: distclean + diff --git a/xlock/Makefile.in b/xlock/Makefile.in new file mode 100644 index 00000000..62dc9d73 --- /dev/null +++ b/xlock/Makefile.in @@ -0,0 +1,290 @@ +# $Id : Makefile.in 4.13 1999/03/08 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +# @SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ +BITMAPDIR = @BITMAPDIR@/ +UTILDIR = $(top_srcdir)/xlock/ +UTILOBJDIR = ./ + +N = +O = .o +#O = .obj +C = .c +#C = .cc +S = $(N) $(N) +#S = , + +DU = $(UTILDIR) +DOU = $(UTILOBJDIR) +OU = $(O)$(S)$(DOU) +CU = $(C) $(DU) + +# please define +# C as the C source code extension +# O as the object extension +# S as the separator for object code + + +# This debugging is new and is untested on many systems. +@CHECK@CHECKDEF = -DDEBUG +@CHECK@XLOCKCHECKOBJS = $(DOU)memcheck$(O) + +# List of object files +XLOCKUTILOBJS = $(DOU)xlock$(OU)passwd$(OU)resource$(O)$(S)\ +$(DOU)util$(OU)logout$(OU)mode$(OU)ras$(OU)xbm$(O)$(S)\ +$(DOU)vis$(OU)color$(OU)random$(OU)iostuff$(OU)automata$(O)$(S)\ +$(DOU)spline$(OU)sound$(OU)erase$(O)$(S)\ +$(DOU)vtlock$(OU)vtlock_proc$(O)$(S)$(XLOCKCHECKOBJS) + +XLOCKCHECKSRCS = $(DU)memcheck$(C) + +XLOCKUTILHDRS = xlock.h mode.h vroot.h ras.h version.h config.h +XLOCKUTILSRCS = $(DU)xlock$(CU)passwd$(CU)resource$(C) \ +$(DU)util$(CU)logout$(CU)mode$(CU)ras$(CU)xbm$(C) \ +$(DU)vis$(CU)color$(CU)random$(CU)iostuff$(CU)automata$(C) \ +$(DU)spline$(CU)sound$(CU)erase$(C) \ +$(DU)vtlock$(CU)vtlock_proc$(C) $(XLOCKCHECKSRCS) + +# default target +all : $(XLOCKUTILOBJS) + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@/man1 +xapploaddir = @APPDEFAULTS@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTPGMFLAGS = @INSTPGMFLAGS@ + + +#CC = cc -g +#CC = cc -Ac -g +#CC = cc -Xc -g +#CC = acc -g +#CC = CC -g +#CC = gcc -g -Wall -ansi -pedantic +#CC = gcc -g -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes +#CC = g++ -g -Wall +CC = @CC@ + +LINT = lint +#LINT = alint + +#DEPEND = makedepend +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +LN_S = @LN_S@ +RM = rm -f +RM_S = $(RM) +ECHO = echo + +#BLN_S = set file/enter=[] +#RM = delete/noconfirm/nolog +#RM_S = set file/remove/nolog +#ECHO = write sys$output + +DEFINES = -DDEF_FILESEARCHPATH=\"$(xapploaddir)/%N%C%S:$(xapploaddir)/%N%S\" $(CHECKDEF) +DEFS = @DEFS@ $(DEFINES) +XLOCKINC = -I. -I.. -I../.. @XLOCKINC@ +CFLAGS = @CFLAGS@ +#CFLAGS = -O +#CFLAGS = -g + +#If you have purify, and want to use it, uncomment this definition or +# run the make as `make PURIFY=purify' +# or run configure with the --with-purify argument. +PURIFY = @PURIFY@ + +.SUFFIXES : $(C) $(O) + +$(C)$(O) : + $(CC) -c -o $@ $(CPPFLAGS) $(DEFS) $(XLOCKINC) $(CFLAGS) $< + +install : + +install-program : + +install-man : + +install-ad : + +uninstall : + +uninstall-program : + +uninstall-man : + +uninstall-ad : + +lint : + +xrdb : + xrdb $(UTILDIR)XLock.ad + +man : + nroff -man $(UTILDIR)/xlock.man | more + +html : + man xlock | man2html > $(UTILOBJDIR)xlock.html + +hlp : + (echo '1 XLOCK' ; \ + nroff -man < $(UTILDIR)xlock.man \ + | sed -e 's/.^H//g' -e 's/^ *Page [0-9].*//' \ + -e 's/^ *Xlock(.*//' \ + -e 's/^ //' \ + -e 's/^NAME.*//;s/^SYNOPSIS//;s/^DESCRIPTION//' \ + -e 's/\(Copyright\) .*c.*\(19\)/\1 (C) \2/' \ + -e 's/^\([A-Z][A-Z]*\) \([A-Z][A-Z]*\)/\1_\2/' \ + -e 's/^\([A-Z]\)/2 \1/' \ + | more -flsu | cat ) \ + > $(UTILOBJDIR)xlock.hlp + +clean : + $(RM) *.o core *~ *% *.bak *.orig *.rej make.log MakeOut xlock memdiag.xlock-* + +distclean : clean + $(RM) Makefile + +clean.all : distclean + +# Adds all current dependencies to Makefile +depend : + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(XLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XLOCKUTILSRCS) + +# 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) -- \ + $(XLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XLOCKUTILSRCS) | \ + ( \ + awk '/^#.*Id : Makefile.in/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@^\.\./xlock@$$(UTILOBJDIR)@' \ + -e 's@\.\./bitmaps@$$(BITMAPDIR)@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +$(UTILOBJDIR)/xlock.o: xlock.h +$(UTILOBJDIR)/xlock.o: ../config.h +$(UTILOBJDIR)/xlock.o: mode.h +$(UTILOBJDIR)/xlock.o: random.h +$(UTILOBJDIR)/xlock.o: color.h +$(UTILOBJDIR)/xlock.o: util.h +$(UTILOBJDIR)/xlock.o: iostuff.h +$(UTILOBJDIR)/xlock.o: $(BITMAPDIR)/mailempty.xbm +$(UTILOBJDIR)/xlock.o: $(BITMAPDIR)/mailfull.xbm +$(UTILOBJDIR)/xlock.o: vroot.h +$(UTILOBJDIR)/passwd.o: xlock.h +$(UTILOBJDIR)/passwd.o: ../config.h +$(UTILOBJDIR)/passwd.o: mode.h +$(UTILOBJDIR)/passwd.o: random.h +$(UTILOBJDIR)/passwd.o: iostuff.h +$(UTILOBJDIR)/resource.o: xlock.h +$(UTILOBJDIR)/resource.o: ../config.h +$(UTILOBJDIR)/resource.o: mode.h +$(UTILOBJDIR)/resource.o: random.h +$(UTILOBJDIR)/resource.o: vis.h +$(UTILOBJDIR)/resource.o: iostuff.h +$(UTILOBJDIR)/resource.o: version.h +$(UTILOBJDIR)/util.o: xlock.h +$(UTILOBJDIR)/util.o: ../config.h +$(UTILOBJDIR)/util.o: mode.h +$(UTILOBJDIR)/util.o: random.h +$(UTILOBJDIR)/logout.o: xlock.h +$(UTILOBJDIR)/logout.o: ../config.h +$(UTILOBJDIR)/logout.o: mode.h +$(UTILOBJDIR)/logout.o: random.h +$(UTILOBJDIR)/mode.o: xlock.h +$(UTILOBJDIR)/mode.o: ../config.h +$(UTILOBJDIR)/mode.o: mode.h +$(UTILOBJDIR)/mode.o: random.h +$(UTILOBJDIR)/ras.o: xlock.h +$(UTILOBJDIR)/ras.o: ../config.h +$(UTILOBJDIR)/ras.o: mode.h +$(UTILOBJDIR)/ras.o: random.h +$(UTILOBJDIR)/ras.o: iostuff.h +$(UTILOBJDIR)/ras.o: ras.h +$(UTILOBJDIR)/xbm.o: xlock.h +$(UTILOBJDIR)/xbm.o: ../config.h +$(UTILOBJDIR)/xbm.o: mode.h +$(UTILOBJDIR)/xbm.o: random.h +$(UTILOBJDIR)/vis.o: xlock.h +$(UTILOBJDIR)/vis.o: ../config.h +$(UTILOBJDIR)/vis.o: mode.h +$(UTILOBJDIR)/vis.o: random.h +$(UTILOBJDIR)/vis.o: vis.h +$(UTILOBJDIR)/color.o: xlock.h +$(UTILOBJDIR)/color.o: ../config.h +$(UTILOBJDIR)/color.o: mode.h +$(UTILOBJDIR)/color.o: random.h +$(UTILOBJDIR)/color.o: color.h +$(UTILOBJDIR)/iostuff.o: xlock.h +$(UTILOBJDIR)/iostuff.o: ../config.h +$(UTILOBJDIR)/iostuff.o: mode.h +$(UTILOBJDIR)/iostuff.o: random.h +$(UTILOBJDIR)/iostuff.o: vis.h +$(UTILOBJDIR)/iostuff.o: color.h +$(UTILOBJDIR)/iostuff.o: iostuff.h +$(UTILOBJDIR)/iostuff.o: ras.h +$(UTILOBJDIR)/automata.o: xlock.h +$(UTILOBJDIR)/automata.o: ../config.h +$(UTILOBJDIR)/automata.o: mode.h +$(UTILOBJDIR)/automata.o: random.h +$(UTILOBJDIR)/automata.o: automata.h +$(UTILOBJDIR)/spline.o: xlock.h +$(UTILOBJDIR)/spline.o: ../config.h +$(UTILOBJDIR)/spline.o: mode.h +$(UTILOBJDIR)/spline.o: random.h +$(UTILOBJDIR)/spline.o: spline.h +$(UTILOBJDIR)/sound.o: xlock.h +$(UTILOBJDIR)/sound.o: ../config.h +$(UTILOBJDIR)/sound.o: mode.h +$(UTILOBJDIR)/sound.o: random.h +$(UTILOBJDIR)/erase.o: xlock.h +$(UTILOBJDIR)/erase.o: ../config.h +$(UTILOBJDIR)/erase.o: mode.h +$(UTILOBJDIR)/erase.o: random.h +$(UTILOBJDIR)/vtlock.o: xlock.h +$(UTILOBJDIR)/vtlock.o: ../config.h +$(UTILOBJDIR)/vtlock.o: mode.h +$(UTILOBJDIR)/vtlock.o: random.h +$(UTILOBJDIR)/vtlock_proc.o: xlock.h +$(UTILOBJDIR)/vtlock_proc.o: ../config.h +$(UTILOBJDIR)/vtlock_proc.o: mode.h +$(UTILOBJDIR)/vtlock_proc.o: random.h + diff --git a/xlock/Makefile.inxs b/xlock/Makefile.inxs new file mode 100644 index 00000000..2d0be0b4 --- /dev/null +++ b/xlock/Makefile.inxs @@ -0,0 +1,314 @@ +# xlock/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski. +# the `../configure' script generates `xlock/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) +SGI_VIDEO_OBJS = @SGI_VIDEO_OBJS@ +SGI_VIDEO_LIBS = @SGI_VIDEO_LIBS@ + +XS = $(srcdir)/../.. +XLOCK_SRC = $(srcdir) +XLOCK_BIN = . +HACKS_SRC = $(XS)/hacks +HACKS_BIN = ../../hacks +UTILS_SRC = $(XS)/utils +UTILS_BIN = ../../utils + +INCLUDES = -I$(srcdir) -I$(srcdir)/../.. -I$(UTILS_SRC) -I$(HACKS_SRC) -I../.. @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 \ + $(UTILS_SRC)/erase.c $(UTILS_SRC)/sgivideo.c +UTIL_OBJS = $(UTILS_BIN)/alpha.o $(UTILS_BIN)/colors.o \ + $(UTILS_BIN)/grabscreen.o $(UTILS_BIN)/hsv.o \ + $(UTILS_BIN)/resources.o $(UTILS_BIN)/spline.o \ + $(UTILS_BIN)/usleep.o $(UTILS_BIN)/visual.o \ + $(UTILS_BIN)/xroger.o $(UTILS_BIN)/yarandom.o \ + $(UTILS_BIN)/erase.o $(UTILS_BIN)/sgivideo.o + +SRCS = xlock.c automata.c iostuff.c spline.c xbm.c + +OBJS = xlock.o automata.o iostuff.o spline.o xbm.o + +EXES = + +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 $(XLOCK_OBJS)/xlockmore.o $(COLOR_OBJS) $(HACK_OBJS_1) +COLOR_OBJS = $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o +GRAB_OBJS_1 = $(UTILS_BIN)/grabscreen.o $(SGI_VIDEO_OBJS) +GRAB_OBJS = $(GRAB_OBJS_1) $(COLOR_OBJS) +GRAB_LIBS = $(SGI_VIDEO_LIBS) + +HDRS = xlock.h mode.h +MEN = +STAR = * +EXTRAS = README Makefile.in xlock.h .gdbinit \ + vidwhacker \ + images/$(STAR).xbm \ + images/bubbles/$(STAR).pov \ + images/bubbles/$(STAR).xpm \ + images/noseguy/$(STAR).xbm \ + images/noseguy/$(STAR).xpm \ + images/puzzle/$(STAR).xbm \ + +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: + @if [ ! -d $(HACKDIR) ]; then mkdir $(HACKDIR) ; fi ; \ + for program in $(EXES); do \ + echo $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ; \ + $(INSTALL_PROGRAM) $$program $(HACKDIR)/$$program ; \ + done + +install-man: + @if [ ! -d $(mandir) ]; then mkdir $(mandir) ; fi ; \ + if [ ! -d $(man1dir) ]; then mkdir $(man1dir) ; fi ; \ + 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' \ + -e 's@ $$(srcdir)/\(.*config.h\)@ \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 generating the VMS makefiles on Unix, so that it doesn't have to +# be done by hand... +# +VMS_AXP_COMPILE_1=$$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE +VMS_AXP_COMPILE_2=)/INCL=([],[-],[-.UTILS]) + +compile_axp.com: Makefile.in + @echo generating $@ from $<... ; \ + ( for c in $(SRCS) ; do \ + c=`echo $$c | tr a-z A-Z` ; \ + echo "$(VMS_AXP_COMPILE_1)$(VMS_AXP_COMPILE_2) $$c" ; \ + done ; \ + foo="$(VMS_AXP_COMPILE_1),XLOCKMORE$(VMS_AXP_COMPILE_2)" ; \ + echo $${foo}/OBJ=SCREENHACK-XLOCK.OBJ SCREENHACK.C ; \ + ) | sort > $@ + +compile_decc.com: compile_axp.com + @echo generating $@ from $<... ; \ + sed 's/axp/decc/g' < $< > $@ + +#### TODO: generating link_axp.com is kinda tricky... + +link_decc.com: link_axp.com + @echo generating $@ from $<... ; \ + sed 's/axp/decc/g' < $< > $@ + +$(srcdir)/../setup.com: Makefile.in + @echo generating $@ from $<... ; \ + ( echo '$$! Xscreensaver - definition of various DCL symbols' ; \ + echo '$$ set NOON' ; \ + echo '$$ set def [.HACKS]' ; \ + echo '$$ mydisk = f$$trnlmn("SYS$$DISK")' ; \ + echo '$$ mydir = mydisk+f$$directory()' ; \ + ( for c in $(EXES) ; do \ + c2="$${c} " ; \ + c2=`echo "$${c2}" | sed 's/^\(........*\) $$/\1/'` ; \ + echo '$$' "$${c2}:== $$'mydir'$${c}" ; \ + done ; \ + ) | sort ; \ + echo '$$ set def [-.DRIVER]' ; \ + echo '$$ mydir = mydisk+f$$directory()' ; \ + echo "$$ xscreensaver :== $$'mydir'xscreensaver" ; \ + echo "$$ xscreen*command :== $$'mydir'xscreensaver-command" ; \ + echo '$$ set def [-]' ; \ + echo '$$ exit' ; \ + ) > $@ + +distdepend:: compile_axp.com compile_decc.com +distdepend:: link_axp.com link_decc.com +distdepend:: $(srcdir)/../setup.com + + +# Rules for noticing when the objects from the utils directory are out of +# date with respect to their sources, and going and building them according +# to the rules in their own Makefile... +# +$(UTILS_BIN)/alpha.o: $(UTILS_SRC)/alpha.c +$(UTILS_BIN)/colors.o: $(UTILS_SRC)/colors.c +$(UTILS_BIN)/grabscreen.o: $(UTILS_SRC)/grabscreen.c +$(UTILS_BIN)/sgivideo.o: $(UTILS_SRC)/sgivideo.c +$(UTILS_BIN)/hsv.o: $(UTILS_SRC)/hsv.c +$(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c +$(UTILS_BIN)/spline.o: $(UTILS_SRC)/spline.c +$(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 +$(UTILS_BIN)/erase.o: $(UTILS_SRC)/erase.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 $(SPL) +GRAB = $(GRAB_OBJS) +ERASE = $(UTILS_BIN)/erase.o +COL = $(COLOR_OBJS) + +CC_HACK = $(CC) $(LDFLAGS) + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +xlock.o: $(srcdir)/../../hacks/screenhack.h +xlock.o: ../../config.h +xlock.o: $(srcdir)/$(UTILS_SRC)/yarandom.h +xlock.o: $(srcdir)/$(UTILS_SRC)/usleep.h +xlock.o: $(srcdir)/$(UTILS_SRC)/resources.h +xlock.o: $(srcdir)/$(UTILS_SRC)/hsv.h +xlock.o: $(srcdir)/$(UTILS_SRC)/colors.h +xlock.o: $(srcdir)/$(UTILS_SRC)/grabscreen.h +xlock.o: $(srcdir)/$(UTILS_SRC)/visual.h +xlock.o: $(srcdir)/mode.h +automata.o: $(srcdir)/$(UTILS_SRC)/utils.h +automata.o: ../../config.h +automata.o: $(srcdir)/automata.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/utils.h +iostuff.o: ../../config.h +iostuff.o: $(srcdir)/mode.h +iostuff.o: $(srcdir)/../../hacks/screenhack.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/yarandom.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/usleep.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/resources.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/hsv.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/colors.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/grabscreen.h +iostuff.o: $(srcdir)/$(UTILS_SRC)/visual.h +iostuff.o: $(srcdir)/iostuff.h +iostuff.o: $(srcdir)/ras.h +spline.o: $(srcdir)/$(UTILS_SRC)/utils.h +spline.o: ../../config.h +spline.o: $(srcdir)/spline.h + diff --git a/xlock/XLock.ad b/xlock/XLock.ad new file mode 100644 index 00000000..19d04b96 --- /dev/null +++ b/xlock/XLock.ad @@ -0,0 +1,660 @@ +!!!! +! XLock: Class resource for xlock (xlockmore-4.13) +!!!! +XLock.mode: random +!XLock.mode: blank +!XLock.mode: life +!XLock.erasemode: no_fade +XLock.erasedelay: 400 +XLock.font: -b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*-iso8859-1 +!XLock.font: -*-times-*-*-*-*-18-*-*-*-*-*-*-* +!XLock.background: White +!XLock.foreground: Black +XLock.background: Black +XLock.foreground: White +!XLock.foreground: AntiqueWhite +!XLock.username: Name: +!XLock.password: Password: +!XLock.info: Enter password to unlock; select icon to lock. +!XLock.validate: Validating login... +!XLock.invalid: Invalid login. +XLock.nolock: off +XLock.inwindow: off +XLock.inroot: off +XLock.remote: off +XLock.mono: off +XLock.allowaccess: off +XLock.vtlock: off +XLock.allowroot: off +XLock.description: on +XLock.echokeys: off +XLock.enablesaver: on +XLock.resetsaver: on +XLock.grabmouse: on +XLock.install: on +XLock.mousemotion: off +XLock.sound: off +XLock.timeelapsed: off +XLock.usefirst: on +XLock.verbose: off +XLock.nice: 10 +XLock.lockdelay: 0 +XLock.timeout: 30 +!XLock.geometry: 64x64 +!XLock.icongeometry: 4x4 +XLock.icongeometry: 64x64 +!XLock.icongeometry: 256x256 + +! For bouboule, pyro, star, & worm modes +XLock.use3d: off +XLock.delta3d: 1.5 +XLock.right3d: Red +XLock.left3d: Blue +XLock.both3d: Magenta + +! For marquee & nose modes +!XLock.program: fortune -o +XLock.program: fortune -s +!XLock.program: fortune +!XLock.program: finger +!XLock.messagesfile: fortune.dat +!XLock.messagefile: /etc/hosts +!XLock.message: "Go away, no one is here" +XLock.messagefont: -b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*-iso8859-1 +!XLock.messagefont: -*-times-*-*-*-*-18-*-*-*-*-*-*-* + +! For modes with images +!XLock.*.bitmap: bitmaps/m-xlock.xbm +!XLock.*.bitmap: pixmaps/m-xlock.xpm +!XLock.*.bitmap: raster/scream.ras + +! For mailbox check application +!XLock.mailCmd: /usr/ucb/mail -e +!XLock.mailCmd: /usr/local/bin/chkmbox +!XLock.mailIcon: +!XLock.nomailIcon: + +! For automata modes +!XLock.neighbors: 6 +!XLock.neighbors: 4 +XLock.neighbors: 0 + +! For eyes, julia, & swarm modes +XLock.mouse: off + +! 0 defaults to maximum defined value +XLock.logoutAuto: 0 +! 0 defaults to maximum defined value +XLock.logoutButton: 0 +XLock.logoutButtonLabel: Click here to logout +XLock.logoutButtonHelp: \ +You may log out this session if no terminals are available. +XLock.logoutFailedString: \ +Logout attempt FAILED.\n\ +Current user could not be automatically logged out. + +! Mode options: If count, cycles, or size options are set to 1 ... +! they are probably not used by the mode. +XLock.ant.delay: 1000 +XLock.ant.count: -3 +XLock.ant.cycles: 40000 +XLock.ant.size: -12 +XLock.ant.truchet: on +XLock.ant.saturation: 1.0 +XLock.atlantis.delay: 1000 +XLock.atlantis.count: 4 +XLock.atlantis.cycles: 250 +XLock.atlantis.size: 6000 +XLock.atlantis.saturation: 1.0 +XLock.ball.delay: 10000 +XLock.ball.count: 10 +XLock.ball.cycles: 20 +XLock.ball.size: -100 +XLock.ball.saturation: 1.0 +XLock.bat.delay: 100000 +XLock.bat.count: -8 +!XLock.bat.cycles: 1 +XLock.bat.size: 0 +XLock.bat.saturation: 1.0 +XLock.blot.delay: 200000 +XLock.blot.count: 6 +XLock.blot.cycles: 30 +!XLock.blot.size: 1 +XLock.blot.saturation: 0.3 +XLock.bouboule.delay: 10000 +XLock.bouboule.count: 100 +!XLock.bouboule.cycles: 1 +XLock.bouboule.size: 15 +XLock.bouboule.saturation: 1.0 +XLock.bounce.delay: 5000 +XLock.bounce.count: -10 +!XLock.bounce.cycles: 1 +XLock.bounce.size: 0 +XLock.bounce.saturation: 1.0 +XLock.braid.delay: 1000 +XLock.braid.count: 15 +XLock.braid.cycles: 100 +!XLock.braid.size: 1 +XLock.braid.saturation: 1.0 +XLock.bubble.delay: 100000 +XLock.bubble.count: 25 +!XLock.bubble.cycles: 1 +XLock.bubble.size: 100 +XLock.bubble.saturation: 0.6 +XLock.bubble.boil: off +XLock.bug.delay: 75000 +XLock.bug.count: 10 +XLock.bug.cycles: 32767 +XLock.bug.size: -4 +XLock.bug.saturation: 1.0 +XLock.cage.delay: 1000 +!XLock.cage.count: 1 +!XLock.cage.cycles: 1 +!XLock.cage.size: 1 +XLock.cage.saturation: 1.0 +XLock.cartoon.delay: 10000 +!XLock.cartoon.count: 1 +!XLock.cartoon.cycles: 1 +!XLock.cartoon.size: 1 +XLock.cartoon.saturation: 1.0 +XLock.clock.delay: 100000 +XLock.clock.count: -16 +XLock.clock.cycles: 200 +XLock.clock.size: -200 +XLock.clock.saturation: 1.0 +XLock.coral.delay: 60000 +XLock.coral.count: -3 +!XLock.coral.cycles: 1 +XLock.coral.size: 35 +XLock.coral.saturation: 0.6 +XLock.crystal.delay: 60000 +XLock.crystal.count: -500 +XLock.crystal.cycles: 200 +XLock.crystal.size: -15 +XLock.crystal.saturation: 1.0 +XLock.crystal.nx: -3 +XLock.crystal.ny: -3 +XLock.crystal.cell: on +XLock.crystal.grid: off +XLock.crystal.centre: off +XLock.crystal.maxsize: off +XLock.crystal.shift: on +XLock.daisy.delay: 100000 +XLock.daisy.count: 300 +XLock.daisy.cycles: 350 +!XLock.daisy.size: 1 +XLock.daisy.saturation: 1.0 +XLock.daisy.garden: off +XLock.dclock.delay: 10000 +!XLock.dclock.count: 1 +XLock.dclock.cycles: 10000 +!XLock.dclock.size: 1 +XLock.dclock.saturation: 0.3 +XLock.deco.delay: 1000000 +XLock.deco.count: -30 +XLock.deco.cycles: 2 +XLock.deco.size: -10 +XLock.deco.saturation: 0.6 +XLock.demon.delay: 50000 +XLock.demon.count: 0 +XLock.demon.cycles: 1000 +XLock.demon.size: -7 +XLock.demon.saturation: 1.0 +XLock.dilemma.delay: 200000 +XLock.dilemma.count: -2 +XLock.dilemma.cycles: 1000 +XLock.dilemma.size: 0 +XLock.dilemma.saturation: 1.0 +XLock.dilemma.bonus: 1.85 +XLock.dilemma.conscious: on +XLock.discrete.delay: 1000 +XLock.discrete.count: 4096 +XLock.discrete.cycles: 2500 +!XLock.discrete.size: 1 +XLock.discrete.saturation: 1.0 +XLock.drift.delay: 10000 +XLock.drift.count: 30 +!XLock.drift.cycles: 1 +!XLock.drift.size: 1 +XLock.drift.saturation: 1.0 +XLock.drift.grow: off +XLock.drift.liss: off +XLock.eyes.delay: 20000 +XLock.eyes.count: -8 +XLock.eyes.cycles: 5 +!XLock.eyes.size: 1 +XLock.eyes.saturation: 1.0 +XLock.fadeplot.delay: 30000 +XLock.fadeplot.count: 10 +XLock.fadeplot.cycles: 1500 +!XLock.fadeplot.size: 1 +XLock.fadeplot.saturation: 0.6 +XLock.flag.delay: 50000 +!XLock.flag.count: 1 +XLock.flag.cycles: 1000 +XLock.flag.size: -7 +XLock.flag.saturation: 1.0 +XLock.flame.delay: 750000 +XLock.flame.count: 20 +XLock.flame.cycles: 10000 +!XLock.flame.size: 1 +XLock.flame.saturation: 1.0 +XLock.flow.delay: 1000 +XLock.flow.count: 1024 +XLock.flow.cycles: 3000 +!XLock.flow.size: 1 +XLock.flow.saturation: 1.0 +XLock.forest.delay: 400000 +XLock.forest.count: 100 +XLock.forest.cycles: 200 +!XLock.forest.size: 1 +XLock.forest.saturation: 1.0 +XLock.galaxy.delay: 100 +XLock.galaxy.count: -5 +XLock.galaxy.cycles: 250 +XLock.galaxy.size: -3 +XLock.galaxy.saturation: 1.0 +XLock.galaxy.tracks: off +XLock.gears.delay: 1000 +XLock.gears.count: 1 +XLock.gears.cycles: 2 +!XLock.gears.size: 1 +XLock.gears.saturation: 1.0 +XLock.goop.delay: 10000 +XLock.goop.count: -5 +!XLock.goop.cycles: 1 +!XLock.goop.size: 1 +XLock.goop.saturation: 1.0 +XLock.grav.delay: 10000 +XLock.grav.count: -12 +!XLock.grav.cycles: 1 +!XLock.grav.size: 1 +XLock.grav.saturation: 1.0 +XLock.grav.decay: off +XLock.grav.trail: off +XLock.helix.delay: 25000 +!XLock.helix.count: 1 +XLock.helix.cycles: 100 +!XLock.helix.size: 1 +XLock.helix.saturation: 1.0 +XLock.helix.ellipse: off +XLock.hop.delay: 10000 +XLock.hop.count: 1000 +XLock.hop.cycles: 2500 +!XLock.hop.size: 1 +XLock.hop.saturation: 1.0 +XLock.hop.martin: off +XLock.hop.popcorn: off +XLock.hop.ejk1: off +XLock.hop.ejk2: off +XLock.hop.ejk3: off +XLock.hop.ejk4: off +XLock.hop.ejk5: off +XLock.hop.ejk6: off +XLock.hop.rr: off +XLock.hop.jong: off +XLock.hop.sine: off +XLock.hyper.delay: 100000 +XLock.hyper.count: -6 +XLock.hyper.cycles: 300 +!XLock.hyper.size: 1 +XLock.hyper.saturation: 1.0 +XLock.ico.delay: 100000 +XLock.ico.count: 0 +XLock.ico.cycles: 400 +XLock.ico.size: 0 +XLock.ico.saturation: 1.0 +XLock.ifs.delay: 1000 +!XLock.ifs.count: 1 +!XLock.ifs.cycles: 1 +!XLock.ifs.size: 1 +XLock.ifs.saturation: 1.0 +XLock.image.delay: 2000000 +XLock.image.count: -10 +!XLock.image.cycles: 1 +!XLock.image.size: 1 +XLock.image.saturation: 1.0 +XLock.julia.delay: 10000 +XLock.julia.count: 1000 +XLock.julia.cycles: 20 +!XLock.julia.size: 1 +XLock.julia.saturation: 1.0 +XLock.kaleid.delay: 60000 +XLock.kaleid.count: -8 +XLock.kaleid.cycles: 40 +XLock.kaleid.size: -9 +XLock.kaleid.saturation: 0.6 +XLock.kaleid.alternate: off +XLock.kaleid.serial: off +XLock.kaleid.disconnected: on +XLock.kumppa.delay: 10000 +!XLock.kumppa.count: 1 +!XLock.kumppa.cycles: 1000 +!XLock.kumppa.size: 1 +XLock.kumppa.saturation: 1.0 +XLock.laser.delay: 20000 +XLock.laser.count: -10 +XLock.laser.cycles: 200 +!XLock.laser.size: 1 +XLock.laser.saturation: 1.0 +XLock.life.delay: 750000 +XLock.life.count: 40 +XLock.life.cycles: 140 +XLock.life.size: 0 +XLock.life.saturation: 1.0 +!XLock.life.rule: P +XLock.life.rule: G +!XLock.neighbor: 8 +!XLock.life.rule: S23/B3 +!XLock.neighbor: 6 +!XLock.life.rule: S2b34/B2a +!XLock.life.rule: S2a2b4a/B2b3a4b +!XLock.life.rule: S12b2c3a4b4c6/B2a3b3c5 +!XLock.life.rule: S12b2c3c4a56/B23a3c4b4c6 +!XLock.life.rule: S13b/B2a2c6 +XLock.life.callahan: off +XLock.life.andreen: off +XLock.life1d.delay: 10000 +!XLock.life1d.count: 1 +XLock.life1d.cycles: 10 +XLock.life1d.size: 0 +XLock.life1d.saturation: 1.0 +XLock.life1d.totalistic: True +XLock.life3d.delay: 1000000 +XLock.life3d.count: 35 +XLock.life3d.cycles: 85 +!XLock.life3d.size: 1 +XLock.life3d.saturation: 1.0 +!XLock.life3d.rule3d: P +XLock.life3d.rule3d: G +!XLock.life3d.rule: S45/B5 +!XLock.life3d.rule3d: S567/B6 +!XLock.life3d.rule3d: S56/B5 +!XLock.life3d.rule3d: S67/B67 +XLock.lightning.delay: 10000 +!XLock.lightning.count: 1 +!XLock.lightning.cycles: 1 +!XLock.lightning.size: 1 +XLock.lightning.saturation: 0.6 +XLock.lisa.delay: 25000 +XLock.lisa.count: 1 +XLock.lisa.cycles: 256 +XLock.lisa.size: -1 +XLock.lisa.saturation: 1.0 +XLock.lissie.delay: 10000 +XLock.lissie.count: 1 +XLock.lissie.cycles: 2000 +XLock.lissie.size: -200 +XLock.lissie.saturation: 0.6 +XLock.loop.delay: 100000 +!XLock.loop.count: 1 +XLock.loop.cycles: 1600 +XLock.loop.size: -12 +XLock.loop.saturation: 1.0 +XLock.mandelbrot.delay: 25000 +XLock.mandelbrot.count: -8 +XLock.mandelbrot.cycles: 20000 +!XLock.mandelbrot.size: 1 +XLock.mandelbrot.saturation: 1.0 +XLock.mandelbrot.increment: 1.0 +XLock.marquee.delay: 100000 +!XLock.marquee.count: 1 +!XLock.marquee.cycles: 1 +!XLock.marquee.size: 1 +XLock.marquee.saturation: 1.0 +XLock.maze.delay: 1000 +!XLock.maze.count: 1 +XLock.maze.cycles: 3000 +!XLock.maze.size: 8 +XLock.maze.size: -40 +XLock.maze.saturation: 1.0 +XLock.moebius.delay: 1000 +!XLock.moebius.count: 1 +!XLock.moebius.cycles: 1 +!XLock.moebius.size: 1 +XLock.moebius.saturation: 1.0 +XLock.moebius.solidmoebius: off +XLock.moebius.noants: off +XLock.morph3d.delay: 1000 +XLock.morph3d.count: 0 +!XLock.morph3d.cycles: 1 +!XLock.morph3d.size: 1 +XLock.morph3d.saturation: 1.0 +XLock.mountain.delay: 1000 +XLock.mountain.count: 30 +XLock.mountain.cycles: 4000 +!XLock.mountain.size: 1 +XLock.mountain.saturation: 1.0 +XLock.munch.delay: 5000 +!XLock.munch.count: 1 +XLock.munch.cycles: 7 +!XLock.munch.size: 1 +XLock.munch.saturation: 1.0 +XLock.nose.delay: 100000 +!XLock.nose.count: 1 +!XLock.nose.cycles: 1 +!XLock.nose.size: 1 +XLock.nose.saturation: 1.0 +XLock.pacman.delay: 100000 +XLock.pacman.count: 10 +!XLock.pacman.cycles: 1 +XLock.pacman.size: 0 +XLock.pacman.saturation: 1.0 +XLock.penrose.delay: 10000 +!XLock.penrose.count: 1 +!XLock.penrose.cycles: 1 +XLock.penrose.size: -40 +XLock.penrose.saturation: 1.0 +XLock.penrose.ammann: off +XLock.petal.delay: 10000 +XLock.petal.count: -500 +XLock.petal.cycles: 400 +!XLock.petal.size: 1 +XLock.petal.saturation: 1.0 +XLock.pipes.delay: 1000 +XLock.pipes.count: 2 +XLock.pipes.cycles: 5 +XLock.pipes.size: 500 +XLock.pipes.saturation: 1.0 +XLock.pipes.fisheye: on +XLock.pipes.tightturns: off +XLock.pipes.rotatepipes: on +XLock.puzzle.delay: 10000 +XLock.puzzle.count: 250 +!XLock.puzzle.cycles: 1 +!XLock.puzzle.size: 1 +XLock.puzzle.saturation: 1.0 +XLock.pyro.delay: 15000 +XLock.pyro.count: 100 +!XLock.pyro.cycles: 1 +XLock.pyro.size: -3 +XLock.pyro.saturation: 1.0 +XLock.qix.delay: 30000 +XLock.qix.count: -5 +XLock.qix.cycles: 32 +!XLock.qix.size: 1 +XLock.qix.saturation: 1.0 +XLock.qix.complete: off +XLock.roll.delay: 100000 +XLock.roll.count: 25 +!XLock.roll.cycles: 1 +XLock.roll.size: -64 +XLock.roll.saturation: 0.6 +XLock.rotor.delay: 10000 +XLock.rotor.count: 4 +XLock.rotor.cycles: 20 +XLock.rotor.size: -6 +XLock.rotor.saturation: 0.3 +XLock.rubik.delay: 10000 +XLock.rubik.count: -30 +XLock.rubik.cycles: 5 +XLock.rubik.size: -6 +XLock.rubik.saturation: 1.0 +XLock.shape.delay: 10000 +!XLock.shape.count: 1 +XLock.shape.cycles: 256 +!XLock.shape.size: 1 +XLock.shape.saturation: 1.0 +XLock.shape.border: off +XLock.shape.shade: on +!XLock.shape.stipple: on +XLock.sierpinski.delay: 400000 +XLock.sierpinski.count: 2000 +XLock.sierpinski.cycles: 100 +!XLock.sierpinski.size: 1 +XLock.sierpinski.saturation: 1.0 +XLock.slip.delay: 50000 +XLock.slip.count: 35 +XLock.slip.cycles: 50 +!XLock.slip.size: 1 +XLock.slip.saturation: 1.0 +XLock.sphere.delay: 5000 +!XLock.sphere.count: 1 +!XLock.sphere.cycles: 1 +!XLock.sphere.size: 1 +XLock.sphere.saturation: 1.0 +XLock.spiral.delay: 5000 +XLock.spiral.count: -40 +XLock.spiral.cycles: 350 +!XLock.spiral.size: 1 +XLock.spiral.saturation: 1.0 +XLock.spline.delay: 30000 +XLock.spline.count: -6 +XLock.spline.cycles: 2048 +!XLock.spline.size: 1 +XLock.spline.saturation: 0.3 +XLock.spline.erase: off +XLock.sproingies.delay: 1000 +XLock.sproingies.count: 5 +XLock.sproingies.cycles: 0 +XLock.sproingies.size: 400 +XLock.sproingies.saturation: 1.0 +XLock.stairs.delay: 200000 +!XLock.stairs.count: 1 +!XLock.stairs.cycles: 1 +!XLock.stairs.size: 1 +XLock.stairs.saturation: 1.0 +XLock.star.delay: 75000 +XLock.star.count: 100 +!XLock.star.cycles: 1 +XLock.star.size: 100 +XLock.star.saturation: 0.3 +!XLock.star.saturation: 1.0 +XLock.star.straight: off +XLock.star.rock: off +XLock.star.trek: 50 +XLock.starfish.delay: 2000 +!XLock.starfish.count: 1 +!XLock.starfish.cycles: 1000 +!XLock.starfish.size: 1 +XLock.starfish.saturation: 1.0 +XLock.starfish.cyclespeed: 3 +XLock.starfish.rotation: -1 +XLock.starfish.thickness: -20 +XLock.starfish.blob: off +XLock.starfish.cycle: on +XLock.strange.delay: 1000 +!XLock.strange.count: 1 +!XLock.strange.cycles: 1 +!XLock.strange.size: 1 +XLock.strange.saturation: 1.0 +XLock.superquadrics.delay: 1000 +XLock.superquadrics.count: 25 +XLock.superquadrics.cycles: 40 +!XLock.superquadrics.size: 1 +XLock.superquadrics.saturation: 1.0 +XLock.superquadrics.spinspeed: 5.0 +XLock.swarm.delay: 15000 +XLock.swarm.count: 100 +!XLock.swarm.cycles: 1 +!XLock.swarm.size: 1 +XLock.swarm.saturation: 1.0 +XLock.swirl.delay: 5000 +XLock.swirl.count: 5 +!XLock.swirl.cycles: 1 +!XLock.swirl.size: 1 +XLock.swirl.saturation: 1.0 +XLock.tetris.delay: 50000 +!XLock.tetris.count: 1 +!XLock.tetris.cycles: 1 +XLock.tetris.size: 0 +XLock.tetris.saturation: 1.0 +XLock.thornbird.delay: 1000 +XLock.thornbird.count: 800 +XLock.thornbird.cycles: 16 +!XLock.thornbird.size: 1 +XLock.thornbird.saturation: 1.0 +XLock.triangle.delay: 10000 +!XLock.triangle.count: 1 +!XLock.triangle.cycles: 1 +!XLock.triangle.size: 1 +XLock.triangle.saturation: 1.0 +XLock.tube.delay: 25000 +XLock.tube.count: -9 +XLock.tube.cycles: 20000 +XLock.tube.size: -200 +XLock.tube.saturation: 1.0 +XLock.turtle.delay: 1000000 +!XLock.turtle.count: 1 +XLock.turtle.cycles: 20 +!XLock.turtle.size: 1 +XLock.turtle.saturation: 1.0 +XLock.vines.delay: 200000 +XLock.vines.count: 0 +!XLock.vines.cycles: 1 +!XLock.vines.size: 1 +XLock.vines.saturation: 1.0 +XLock.voters.delay: 1000 +XLock.voters.count: 0 +XLock.voters.cycles: 327670 +XLock.voters.size: 0 +XLock.voters.saturation: 1.0 +XLock.wator.delay: 750000 +!XLock.wator.count: 1 +XLock.wator.cycles: 32767 +XLock.wator.size: 0 +XLock.wator.saturation: 1.0 +XLock.wire.delay: 500000 +XLock.wire.count: 1000 +XLock.wire.cycles: 150 +XLock.wire.size: -8 +XLock.wire.saturation: 1.0 +XLock.world.delay: 100000 +XLock.world.count: -16 +!XLock.world.cycles: 1 +!XLock.world.size: 1 +XLock.world.saturation: 0.3 +XLock.worm.delay: 17000 +XLock.worm.count: -20 +XLock.worm.cycles: 10 +XLock.worm.size: -3 +XLock.worm.saturation: 1.0 +XLock.xjack.delay: 50000 +!XLock.xjack.count: 1 +!XLock.xjack.cycles: 1 +!XLock.xjack.size: 1 +XLock.xjack.saturation: 1.0 + +XLock.blank.delay: 3000000 +!XLock.blank.count: 1 +!XLock.blank.cycles: 1 +!XLock.blank.size: 1 +XLock.blank.saturation: 1.0 +XLock.bomb.delay: 100000 +XLock.bomb.count: 10 +XLock.bomb.cycles: 20 +!XLock.bomb.size: 1 +XLock.bomb.saturation: 1.0 + +XLock.random.duration: 60 +!XLock.random.duration: 0 +XLock.random.modelist: all +!XLock.random.modelist: allnice +!XLock.random.modelist: all3d +!XLock.random.modelist: allgl +!XLock.random.modelist: allautomata +!XLock.random.modelist: allfractal +!XLock.random.modelist: allgeometry +!XLock.random.modelist: allspace +XLock.random.fullrandom: on +XLock.random.sequential: off diff --git a/xlock/automata.c b/xlock/automata.c new file mode 100644 index 00000000..a2ba430b --- /dev/null +++ b/xlock/automata.c @@ -0,0 +1,64 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)automata.c 4.10 98/04/28 xlockmore"; + +#endif + +/*- + * automata.c - special stuff for automata modes + * + * Copyright (c) 1998 by David Bagley + * + * Revision History: + * + * Changes maintained by David Bagley + * 20-Apr-98: Separated out of util.c + * + */ + +#if STANDALONE +#include "utils.h" +#else +#include "xlock.h" +int neighbors; + +#endif +#include "automata.h" + +XPoint hexagonUnit[6] = +{ + {0, 0}, + {1, 1}, + {0, 2}, + {-1, 1}, + {-1, -1}, + {0, -2} +}; + +XPoint triangleUnit[2][3] = +{ + { + {0, 0}, + {1, -1}, + {0, 2} + }, + { + {0, 0}, + {-1, 1}, + {0, -2} + } +}; + +unsigned char stipples[NUMSTIPPLES][STIPPLESIZE] = +{ + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* white */ + {0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22}, /* grey+white | stripe */ + {0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00}, /* spots */ + {0x88, 0x44, 0x22, 0x11, 0x88, 0x44, 0x22, 0x11}, /* lt. / stripe */ + {0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66}, /* | bars */ + {0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa}, /* 50% grey */ + {0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}, /* - bars */ + {0xee, 0xdd, 0xbb, 0x77, 0xee, 0xdd, 0xbb, 0x77}, /* dark \ stripe */ + {0xff, 0x99, 0x99, 0xff, 0xff, 0x99, 0x99, 0xff}, /* spots */ + {0xaa, 0xff, 0xff, 0x55, 0xaa, 0xff, 0xff, 0x55}, /* black+grey - stripe */ + {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} /* black */ +}; diff --git a/xlock/automata.h b/xlock/automata.h new file mode 100644 index 00000000..8b1c74c9 --- /dev/null +++ b/xlock/automata.h @@ -0,0 +1,13 @@ +#ifndef _AUTOMATA_H_ +#define _AUTOMATA_H_ + +extern XPoint hexagonUnit[6]; +extern XPoint triangleUnit[2][3]; + +#define NUMSTIPPLES 11 +#define STIPPLESIZE 8 +extern unsigned char stipples[NUMSTIPPLES][STIPPLESIZE]; + +/* extern unsigned char **stipples; */ + +#endif /* _AUTOMATA_H_ */ diff --git a/xlock/color.c b/xlock/color.c new file mode 100644 index 00000000..63e1d855 --- /dev/null +++ b/xlock/color.c @@ -0,0 +1,1158 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)color.c 4.00 97/01/01 xlockmore"; + +#endif + +/*- + * color.c - extracted from swirl.c, xlock.c and util.c + * + * See xlock.c for copying information. + * + * xlock.c and util.c Copyright (c) 1988-91 by Patrick J. Naughton. + * swirl.c Copyright (c) 1994 M.Dobie + * + */ + +#include "xlock.h" +#include "color.h" +#include "vis.h" + +/* Formerly in util.c */ +/*- + * Create an HSB ramp. + * + * Revision History: + * Changes maintained by David Bagley + * 22-Jun-94: Modified for VMS + * + * Changes of Patrick J. Naughton + * 29-Jul-90: renamed hsbramp.c from HSBmap.c + * minor optimizations. + * 01-Sep-88: Written. + */ + +static void +hsb2rgb(double H, double S, double B, + unsigned char *r, unsigned char *g, unsigned char *b) +{ + int i; + double f, bb; + unsigned char p, q, t; + + H -= floor(H); /* remove anything over 1 */ + H *= 6.0; + i = (int) floor(H); /* 0..5 */ + f = H - (float) i; /* f = fractional part of H */ + bb = 255.0 * B; + p = (unsigned char) (bb * (1.0 - S)); + q = (unsigned char) (bb * (1.0 - (S * f))); + t = (unsigned char) (bb * (1.0 - (S * (1.0 - f)))); + switch (i) { + case 0: + *r = (unsigned char) bb; + *g = t; + *b = p; + break; + case 1: + *r = q; + *g = (unsigned char) bb; + *b = p; + break; + case 2: + *r = p; + *g = (unsigned char) bb; + *b = t; + break; + case 3: + *r = p; + *g = q; + *b = (unsigned char) bb; + break; + case 4: + *r = t; + *g = p; + *b = (unsigned char) bb; + break; + case 5: + *r = (unsigned char) bb; + *g = p; + *b = q; + break; + } +} + + +/*- + * Input is two points in HSB color space and a count + * of how many discreet rgb space values the caller wants. + * + * Output is that many rgb triples which describe a linear + * interpolate ramp between the two input colors. + */ + +static void +hsbramp(double h1, double s1, double b1, double h2, double s2, double b2, + int count, unsigned char *red, unsigned char *green, unsigned char *blue) +{ + double dh, ds, db; + + dh = (h2 - h1) / count; + ds = (s2 - s1) / count; + db = (b2 - b1) / count; + while (count--) { + hsb2rgb(h1, s1, b1, red++, green++, blue++); + h1 += dh; + s1 += ds; + b1 += db; + } +} + + +/* Formerly in xlock.c */ + +unsigned long +allocPixel(Display * display, Colormap cmap, const char *name, const char *def) +{ + XColor col, tmp; + + (void) XParseColor(display, cmap, name, &col); + if (!XAllocColor(display, cmap, &col)) { + (void) fprintf(stderr, "could not allocate: %s, using %s instead\n", + name, def); + (void) XAllocNamedColor(display, cmap, def, &col, &tmp); + } + return col.pixel; +} + +static void +monoColormap(Screen * scr, ScreenInfo * si, char *foreground, char *background) +{ + si->black_pixel = BlackPixelOfScreen(scr); + si->white_pixel = WhitePixelOfScreen(scr); + if (strcmp(foreground, "White") == 0 || strcmp(foreground, "white") == 0 || + strcmp(background, "Black") == 0 || strcmp(background, "black") == 0) { + si->fg_pixel = WhitePixelOfScreen(scr); + si->bg_pixel = BlackPixelOfScreen(scr); + } else { + si->fg_pixel = BlackPixelOfScreen(scr); + si->bg_pixel = WhitePixelOfScreen(scr); + } + si->pixels[0] = WhitePixelOfScreen(scr); + si->pixels[1] = BlackPixelOfScreen(scr); + si->npixels = 2; +} + +void +fixColormap(Display * display, Window window, + int screen, int ncolors, float saturation, + Bool mono, Bool install, Bool inroot, Bool inwindow, Bool verbose) +{ + Screen *scr = ScreenOfDisplay(display, screen); + extern ScreenInfo *Scr; + Colormap cmap = Scr[screen].colormap; + Colormap dcmap = DefaultColormapOfScreen(scr); + XColor xcolor; + unsigned char *red, *green, *blue; + int colorcount, i, fixed, visualclass; + extern char *foreground; + extern char *background; + +#ifdef USE_DTSAVER + extern Bool dtsaver; + +#endif +#ifndef COMPLIANT_COLORMAP + Bool retry = False; + +#endif + + if (mono || CellsOfScreen(scr) <= 2) { + if (Scr[screen].pixels) + return; + Scr[screen].pixels = + (unsigned long *) calloc(2, sizeof (unsigned long)); + + monoColormap(scr, &(Scr[screen]), foreground, background); + return; + } + colorcount = ncolors; + red = (unsigned char *) calloc(ncolors, sizeof (unsigned char)); + green = (unsigned char *) calloc(ncolors, sizeof (unsigned char)); + blue = (unsigned char *) calloc(ncolors, sizeof (unsigned char)); + + visualclass = Scr[screen].visual->CLASS; + fixed = (visualclass == StaticGray) || (visualclass == StaticColor) || + (visualclass == TrueColor); + if ( +#ifdef USE_DTSAVER + dtsaver || /* needs to be in focus without mouse */ + +#endif + inroot || (!install && !fixed) || cmap == None) { + cmap = dcmap; + } + if (cmap != dcmap && Scr[screen].pixels) { + XFreeColors(display, cmap, Scr[screen].pixels, Scr[screen].npixels, 0); +#ifndef COMPLIANT_COLORMAP + XFreeColors(display, cmap, &(Scr[screen].black_pixel), 1, 0); + XFreeColors(display, cmap, &(Scr[screen].white_pixel), 1, 0); +#endif + XFreeColors(display, cmap, &(Scr[screen].bg_pixel), 1, 0); + XFreeColors(display, cmap, &(Scr[screen].fg_pixel), 1, 0); + (void) free((void *) Scr[screen].pixels); + Scr[screen].pixels = + (unsigned long *) calloc(ncolors, sizeof (unsigned long)); + } else { + if (Scr[screen].pixels) { + (void) free((void *) Scr[screen].pixels); + /* (void) printf("pixels: this case is possible?\n"); */ + } + /* if (cmap) { (void) printf("cmap: this case is possible?\n"); } */ + Scr[screen].pixels = + (unsigned long *) calloc(ncolors, sizeof (unsigned long)); + + /* "allocate" the black and white pixels, so that they + will be included by XCopyColormapAndFree() if it gets called */ + } +#ifdef COMPLIANT_COLORMAP + Scr[screen].black_pixel = BlackPixelOfScreen(scr); + Scr[screen].white_pixel = WhitePixelOfScreen(scr); +#else + Scr[screen].black_pixel = allocPixel(display, cmap, "Black", "Black"); + Scr[screen].white_pixel = allocPixel(display, cmap, "White", "White"); +#endif + Scr[screen].bg_pixel = allocPixel(display, cmap, background, "White"); + Scr[screen].fg_pixel = allocPixel(display, cmap, foreground, "Black"); + hsbramp(0.0, saturation, 1.0, 1.0, saturation, 1.0, colorcount, + red, green, blue); + + Scr[screen].npixels = 0; + for (i = 0; i < colorcount; i++) { + xcolor.red = red[i] << 8; + xcolor.green = green[i] << 8; + xcolor.blue = blue[i] << 8; + xcolor.flags = DoRed | DoGreen | DoBlue; + + if (!XAllocColor(display, cmap, &xcolor)) { +#ifdef COMPLIANT_COLORMAP + if (!install || cmap != dcmap) + break; + if ((cmap = XCopyColormapAndFree(display, cmap)) == dcmap) + break; + if (verbose) + (void) fprintf(stderr, "using private colormap\n"); + if (!XAllocColor(display, cmap, &xcolor)) + break; +#else + if (verbose) + (void) fprintf(stderr, "ran out of colors on colormap\n"); + if ((saturation != 1.0 || ncolors != 64) && Scr[screen].npixels < 2) { + if (verbose) + (void) fprintf(stderr, + "retrying with saturation = 1.0 and ncolors = 64\n"); + retry = True; + } + break; +#endif + } + Scr[screen].pixels[i] = xcolor.pixel; + Scr[screen].npixels++; + } + (void) free((void *) red); + (void) free((void *) green); + (void) free((void *) blue); + if (verbose) + (void) fprintf(stderr, "%d pixel%s allocated\n", Scr[screen].npixels, + (Scr[screen].npixels == 1) ? "" : "s"); + if (Scr[screen].npixels <= 4) { + XFreeColors(display, cmap, Scr[screen].pixels, Scr[screen].npixels, 0); +#ifndef COMPLIANT_COLORMAP + XFreeColors(display, cmap, &(Scr[screen].black_pixel), 1, 0); + XFreeColors(display, cmap, &(Scr[screen].white_pixel), 1, 0); +#endif + XFreeColors(display, cmap, &(Scr[screen].bg_pixel), 1, 0); + XFreeColors(display, cmap, &(Scr[screen].fg_pixel), 1, 0); +#ifndef COMPLIANT_COLORMAP + if (retry) { + fixColormap(display, window, screen, 64, 1.0, + mono, install, inroot, inwindow, verbose); + return; + } +#endif + monoColormap(scr, &(Scr[screen]), foreground, background); + Scr[screen].colormap = cmap = DefaultColormapOfScreen(scr); + return; + } + Scr[screen].colormap = cmap; + if ((install || fixed) && !inroot && Scr[screen].npixels > 2) { +#if 0 + XGetWindowAttributes(display, window, &xgwa); + if (cmap != xgwa.colormap) +#endif +#if 1 /* Turn off to simulate fvwm and tvwm */ + setColormap(display, window, cmap, inwindow); +#endif + } +#if 0 + else { + /* white and black colors may not be right for GL modes so lets set them */ + Scr[screen].black_pixel = BlackPixelOfScreen(scr); + Scr[screen].white_pixel = WhitePixelOfScreen(scr); + /* foreground and background colors may not be right.... */ + BlackPixelOfScreen(scr) = Scr[screen].black_pixel; + WhitePixelOfScreen(scr) = Scr[screen].white_pixel; + } +#endif +} + +void +setColormap(Display * display, Window window, Colormap cmap, Bool inwindow) +{ + XSetWindowColormap(display, window, cmap); + /* Now, here we have a problem. When we are running full-screen, the + window's override_redirect attribute is on. So, the window manager + never gets the ColormapNotify event that gets generated on the + above XSetWindowColormap() call, and does not So, a quick solution + is to install it ourselves. The problem with this is that it + violates the ICCCM convention that only window managers should + install colormaps. Indeed, Fvwm _enforces_ this by immediately + un-doing any XInstallColormap() performed by a client (which is why + this does not work right under Fvwm). */ + + if (!inwindow) + XInstallColormap(display, cmap); +} + +/*- + * useableColors + */ +int +preserveColors(unsigned long black, unsigned long white, + unsigned long bg, unsigned long fg) +{ + /* how many colours should we preserve (out of white, black, fg, bg)? */ + if (((bg == black) || (bg == white)) && ((fg == black) || (fg == white))) + return 2; + else if ((bg == black) || (fg == black) || + (bg == white) || (fg == white) || (bg == fg)) + return 3; + else + return 4; +} + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +void +reserveColors(ModeInfo * mi, Colormap cmap, unsigned long *black) +{ + Display *display = MI_DISPLAY(mi); + XColor blackcolor, whitecolor; + + blackcolor.flags = DoRed | DoGreen | DoBlue; + blackcolor.pixel = MI_BLACK_PIXEL(mi); + blackcolor.red = 0; + blackcolor.green = 0; + blackcolor.blue = 0; + whitecolor.flags = DoRed | DoGreen | DoBlue; + whitecolor.pixel = MI_WHITE_PIXEL(mi); + whitecolor.red = 0xFFFF; + whitecolor.green = 0xFFFF; + whitecolor.blue = 0xFFFF; + + /* If they fail what should I do? */ + (void) XAllocColor(display, cmap, &blackcolor); + (void) XAllocColor(display, cmap, &whitecolor); + *black = blackcolor.pixel; + +#if 0 + { + XColor bgcolor, fgcolor; + + bgcolor.pixel = MI_BG_PIXEL(mi); + fgcolor.pixel = MI_FG_PIXEL(mi); + XQueryColor(display, cmap, &bgcolor); + XQueryColor(display, cmap, &fgcolor); + (void) XAllocColor(display, cmap, &bgcolor); + (void) XAllocColor(display, cmap, &fgcolor); + } +#endif +} + +#endif + +/* the remaining of this file was hacked from colors.c and hsv.c from + * xscreensaver + * + * 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. + * + * Modified for the use with xlockmore by Jouk Jansen + * 12 June 1998 + */ + +/* This file contains some utility routines for randomly picking the colors + to hack the screen with. + */ + +void +free_colors(Display * dpy, Colormap cmap, XColor * colors, int ncolors) +{ + int i; + + if (ncolors > 0) { + unsigned long *pixels = (unsigned long *) + malloc(sizeof (unsigned long) * ncolors); + + for (i = 0; i < ncolors; i++) + pixels[i] = colors[i].pixel; + XFreeColors(dpy, cmap, pixels, ncolors, 0L); + (void) free((void *) 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: + + (void) 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 (unsigned long) * ((*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)) { + (void) free((void *) pixels); + goto FAIL; + } + for (i = 0; i < *ncolorsP; i++) + colors[i].pixel = pixels[i]; + (void) free((void *) 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, 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 + (void) fprintf(stderr, "\ncolors:"); + for (i = 0; i < npoints; i++) + (void) fprintf(stderr, " (%d, %.3f, %.3f)", h[i], s[i], v[i]); + (void) fprintf(stderr, "\nlengths:"); + for (i = 0; i < npoints; i++) + (void) 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 + (void) fprintf(stderr, "\nratios:"); + for (i = 0; i < npoints; i++) + (void) 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] = (int) (total_ncolors * ratio[i]); + + +#ifdef DEBUG + (void) fprintf(stderr, "\npixels:"); + for (i = 0; i < npoints; i++) + (void) fprintf(stderr, " %d", ncolors[i]); + (void) 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]; + } + } + } + + (void) memset(colors, 0, (*ncolorsP) * sizeof (*colors)); + + k = 0; + for (i = 0; i < npoints; i++) { + int distance, direction, j; + + 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 + (void) fprintf(stderr, "point %d: %3d %.2f %.2f\n", + i, h[i], s[i], v[i]); + (void) 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 + (void) 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 (unsigned long) * ((*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)) { + (void) free((void *) pixels); + goto FAIL; + } + for (i = 0; i < *ncolorsP; i++) + colors[i].pixel = pixels[i]; + (void) free((void *) 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) + (void) fprintf(stderr, + "%s: wanted %d writable colors; got %d read-only colors.\n", + ProgramName, wanted_colors, got_colors); + + else if (wanted_colors > (got_colors + 10)) + /* don't bother complaining if we're within ten pixels. */ + (void) fprintf(stderr, "%s: wanted %d%s colors; got %d.\n", + ProgramName, wanted_colors, (got_writable ? " writable" : ""), + got_colors); +} + + +void +make_smooth_colormap(ModeInfo * mi, Colormap cmap, + XColor * colors, int *ncolorsP, + Bool allocate_p, + Bool * writable_pP) +{ + 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; + + if (*ncolorsP <= 0) + return; + + { + int n = (int) (LRAND() % 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] = (int) (LRAND() % 360); + s[i] = LRAND() / MAXRAND; + v[i] = 0.8 * LRAND() / MAXRAND + 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] - s[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(mi)) + *writable_pP = False; + + RETRY_NON_WRITABLE: + make_color_path(MI_DISPLAY(mi), 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 (MI_IS_VERBOSE(mi) || MI_IS_DEBUG(mi)) + complain(*ncolorsP, ncolors, wanted_writable, + wanted_writable && *writable_pP); + + *ncolorsP = ncolors; +} + + +void +make_uniform_colormap(ModeInfo * mi, Colormap cmap, + XColor * colors, int *ncolorsP, + Bool allocate_p, + Bool * writable_pP) +{ + int ncolors = *ncolorsP; + Bool wanted_writable = (allocate_p && writable_pP && *writable_pP); + + double S = ((double) (LRAND() % 34) + 66) / 100.0; /* range 66%-100% */ + double V = ((double) (LRAND() % 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(mi)) + *writable_pP = False; + + RETRY_NON_WRITABLE: + make_color_ramp(MI_DISPLAY(mi), 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 (MI_IS_VERBOSE(mi) || MI_IS_DEBUG(mi)) + complain(*ncolorsP, ncolors, wanted_writable, + wanted_writable && *writable_pP); + + *ncolorsP = ncolors; +} + + +void +make_random_colormap(ModeInfo * mi, Colormap cmap, + XColor * colors, int *ncolorsP, + Bool bright_p, + Bool allocate_p, + Bool * writable_pP) +{ + Bool wanted_writable = (allocate_p && writable_pP && *writable_pP); + int ncolors = *ncolorsP; + int i; + + if (*ncolorsP <= 0) + return; + + /* If this visual doesn't support writable cells, don't bother trying. */ + if (wanted_writable && !has_writable_cells(mi)) + *writable_pP = False; + + for (i = 0; i < ncolors; i++) { + colors[i].flags = DoRed | DoGreen | DoBlue; + if (bright_p) { + int H = (int) LRAND() % 360; /* range 0-360 */ + double S = ((double) (LRAND() % 70) + 30) / 100.0; /* range 30%-100% */ + double V = ((double) (LRAND() % 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 = (unsigned short) (LRAND() % 0xFFFF); + colors[i].green = (unsigned short) (LRAND() % 0xFFFF); + colors[i].blue = (unsigned short) (LRAND() % 0xFFFF); + } + } + + if (!allocate_p) + return; + + RETRY_NON_WRITABLE: + if (writable_pP && *writable_pP) { + unsigned long *pixels = (unsigned long *) + malloc(sizeof (unsigned long) * (ncolors + 1)); + + allocate_writable_colors(MI_DISPLAY(mi), cmap, pixels, &ncolors); + if (ncolors > 0) + for (i = 0; i < ncolors; i++) + colors[i].pixel = pixels[i]; + (void) free((void *) pixels); + if (ncolors > 0) + XStoreColors(MI_DISPLAY(mi), cmap, colors, ncolors); + } else { + for (i = 0; i < ncolors; i++) { + XColor color; + + color = colors[i]; + if (!XAllocColor(MI_DISPLAY(mi), 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 (MI_IS_VERBOSE(mi) || MI_IS_DEBUG(mi)) + 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 (XColor) * 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); + (void) memcpy((char *) colors, colors2, sizeof (*colors) * ncolors); + (void) free((void *) colors2); +} + +/* 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. + */ + +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 = (int) 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 = (short unsigned int) (R * 65535); + *g = (short unsigned int) (G * 65535); + *b = (short unsigned int) (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 = (int) (H * 60.0); + *s = S; + *v = V; +} diff --git a/xlock/color.h b/xlock/color.h new file mode 100644 index 00000000..c1fc5fa8 --- /dev/null +++ b/xlock/color.h @@ -0,0 +1,212 @@ +extern unsigned long allocPixel(Display * display, Colormap cmap, + const char *name, const char *def); + +extern void setColormap(Display * display, Window window, Colormap map, + Bool inwindow); +extern void fixColormap(Display * display, Window window, + int screen, int ncolors, float saturation, + Bool mono, Bool install, Bool inroot, Bool inwindow, Bool verbose); +extern int preserveColors(unsigned long black, unsigned long white, + unsigned long bg, unsigned long fg); + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +extern void reserveColors(ModeInfo * mi, Colormap cmap, + unsigned long *black); + +#endif + +/* the rest of this file is a modified version of colors.h, hsv.h and + * visual.h from xscreensaver + * + * 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 depending on verbose and debug. + + 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. + */ +extern void make_smooth_colormap(ModeInfo * mi, + Colormap cmap, + XColor * colors, int *ncolorsP, + Bool allocate_p, + Bool * writable_pP); + +/* 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 depending on verbose and debug. + + 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. + */ +extern void make_uniform_colormap(ModeInfo * mi, + Colormap cmap, + XColor * colors, int *ncolorsP, + Bool allocate_p, + Bool * writable_pP); + +/* 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 depending on verbose and debug. + + 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. + */ +extern void make_random_colormap(ModeInfo * mi, + Colormap cmap, + XColor * colors, int *ncolorsP, + Bool bright_p, + Bool allocate_p, + Bool * writable_pP); + + +/* 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__ */ +/* 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__ */ +/* xscreensaver, Copyright (c) 1993-1998 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_pixmap_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(ModeInfo * mi); + +#endif /* __VISUAL_H__ */ diff --git a/xlock/erase.c b/xlock/erase.c new file mode 100644 index 00000000..c3d77cee --- /dev/null +++ b/xlock/erase.c @@ -0,0 +1,604 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)erase.c 4.12 98/08/13 xlockmore"; + +#endif + +/*- + * erase.c: Erase the screen in various more or less interesting ways. + * + * (c) 1997 by Johannes Keukelaar + * + * Revision History: + * 1997 : original version by Johannes Keukelaar + * 13-8-1998 : changed to be used with xlockmore by Jouk Jansen + * + * + * Permission to use in any way granted. Provided "as is" without expressed + * or implied warranty. NO WARRANTY, NO EXPRESSION OF SUITABILITY FOR ANY + * PURPOSE. (I.e.: Use in any way, but at your own risk!) + */ + +#include "xlock.h" + +#undef countof +#define countof(x) (sizeof(x)/sizeof(*(x))) + +extern int erasedelay, erasemode; +extern int erasemodefromname(char *name); + +typedef void (*Eraser) (Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity); + +static void +no_fade(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ +} + +static void +random_lines(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + Bool horiz_p = LRAND() & 1; + int max = (horiz_p ? height : width); + int *lines = (int *) calloc(max, sizeof (*lines)); + int i; + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + for (i = 0; i < max; i++) + lines[i] = i; + + for (i = 0; i < max; i++) { + int t, r; + + t = lines[i]; + r = NRAND(max); + lines[i] = lines[r]; + lines[r] = t; + } + + for (i = 0; i < max; i++) { + if (horiz_p) + XDrawLine(dpy, window, gc, 0, lines[i], width, lines[i]); + else + XDrawLine(dpy, window, gc, lines[i], 0, lines[i], height); + + XSync(dpy, False); + if (delay > 0 && ((i % granularity) == 0)) +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } + (void) free((void *) lines); +} + +static void +random_squares(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + int randsize = MAX(1, MIN(width, height) / (16 + NRAND(32))); + int max = (height / randsize + 1) * (width / randsize + 1); + int *squares = (int *) calloc(max, sizeof (*squares)); + int i; + int columns = width / randsize + 1; /* Add an extra for roundoff */ + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + for (i = 0; i < max; i++) + squares[i] = i; + + for (i = 0; i < max; i++) { + int t, r; + + t = squares[i]; + r = NRAND(max); + squares[i] = squares[r]; + squares[r] = t; + } + + for (i = 0; i < max; i++) { + XFillRectangle(dpy, window, gc, + (squares[i] % columns) * randsize, + (squares[i] / columns) * randsize, + randsize, randsize); + + XSync(dpy, False); + if (delay > 0 && ((i % granularity) == 0)) +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } + (void) free((void *) squares); +} + +static void +venetian(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + Bool horiz_p = LRAND() & 1; + Bool flip_p = LRAND() & 1; + int max = (horiz_p ? height : width); + int *lines = (int *) calloc(max, sizeof (*lines)); + int i, j; + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + + granularity /= 6; + + j = 0; + for (i = 0; i < max * 2; i++) { + int line = ((i / 16) * 16) - ((i % 16) * 15); + + if (line >= 0 && line < max) + lines[j++] = (flip_p ? max - line : line); + } + + for (i = 0; i < max; i++) { + if (horiz_p) + XDrawLine(dpy, window, gc, 0, lines[i], width, lines[i]); + else + XDrawLine(dpy, window, gc, lines[i], 0, lines[i], height); + + XSync(dpy, False); + if (delay > 0 && ((i % granularity) == 0)) +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } + (void) free((void *) lines); +} + + +static void +triple_wipe(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + Bool flip_x = LRAND() & 1; + Bool flip_y = LRAND() & 1; + int max = width + (height / 2); + int *lines = (int *) calloc(max, sizeof (int)); + int i; + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + + for (i = 0; i < width / 2; i++) + lines[i] = i * 2 + height; + for (i = 0; i < height / 2; i++) + lines[i + width / 2] = i * 2; + for (i = 0; i < width / 2; i++) + lines[i + width / 2 + height / 2] = width - i * 2 - (width % 2 ? 0 : 1) + height; + + granularity /= 6; + + for (i = 0; i < max; i++) { + int x, y, x2, y2; + + if (lines[i] < height) + x = 0, y = lines[i], x2 = width, y2 = y; + else + x = lines[i] - height, y = 0, x2 = x, y2 = height; + + if (flip_x) + x = width - x - 1, x2 = width - x2 - 1; + if (flip_y) + y = height - y - 1, y2 = height - y2 - 1; + + XDrawLine(dpy, window, gc, x, y, x2, y2); + XSync(dpy, False); + if (delay > 0 && ((i % granularity) == 0)) +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } + (void) free((void *) lines); +} + + +static void +quad_wipe(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + Bool flip_x = LRAND() & 1; + Bool flip_y = LRAND() & 1; + int max = width + height; + int *lines = (int *) calloc(max, sizeof (int)); + int i; + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + + granularity /= 3; + + for (i = 0; i < max / 4; i++) { + lines[i * 4] = i * 2; + lines[i * 4 + 1] = height - i * 2 - (height % 2 ? 0 : 1); + lines[i * 4 + 2] = height + i * 2; + lines[i * 4 + 3] = height + width - i * 2 - (width % 2 ? 0 : 1); + } + + for (i = 0; i < max; i++) { + int x, y, x2, y2; + + if (lines[i] < height) + x = 0, y = lines[i], x2 = width, y2 = y; + else + x = lines[i] - height, y = 0, x2 = x, y2 = height; + + if (flip_x) + x = width - x, x2 = width - x2; + if (flip_y) + y = height - y, y2 = height - y2; + + XDrawLine(dpy, window, gc, x, y, x2, y2); + XSync(dpy, False); + if (delay > 0 && ((i % granularity) == 0)) +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } + (void) free((void *) lines); +} + + + +static void +circle_wipe(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + int full = 360 * 64; + int inc = full / 64; + int start = NRAND(full); + int rad = (width > height ? width : height); + int i; + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + + if (LRAND() & 1) + inc = -inc; + for (i = (inc > 0 ? 0 : full); + (inc > 0 ? i < full : i > 0); + i += inc) { + XFillArc(dpy, window, gc, + (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (i + start) % full, inc); + XFlush(dpy); +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } +} + + +static void +three_circle_wipe(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ + int i; + int full = 360 * 64; + int q = full / 6; + int q2 = q * 2; + int inc = full / 240; + int start = NRAND(q); + int rad = (width > height ? width : height); + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + + for (i = 0; i < q; i += inc) { + XFillArc(dpy, window, gc, (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (start + i) % full, inc); + XFillArc(dpy, window, gc, (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (start - i) % full, -inc); + + XFillArc(dpy, window, gc, (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (start + q2 + i) % full, inc); + XFillArc(dpy, window, gc, (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (start + q2 - i) % full, -inc); + + XFillArc(dpy, window, gc, (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (start + q2 + q2 + i) % full, inc); + XFillArc(dpy, window, gc, (width / 2) - rad, (height / 2) - rad, rad * 2, rad * 2, + (start + q2 + q2 - i) % full, -inc); + + XSync(dpy, False); +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } +} + + +static void +squaretate(Display * dpy, Window window, GC gc, + int width, int height, int delay, int granularity) +{ +#ifdef FAST_CPU + int steps = (((width > height ? width : width) * 2) / granularity); + +#else + int steps = (((width > height ? width : width)) / (4 * granularity)); + +#endif + int i; + Bool flip = LRAND() & 1; + +#if HAVE_GETTIMEOFDAY + struct timeval tp; + int interval, t_prev; + + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; +#endif + +#define DRAW() \ + if (flip) { \ + points[0].x = width-points[0].x; \ + points[1].x = width-points[1].x; \ + points[2].x = width-points[2].x; } \ + XFillPolygon (dpy, window, gc, points, 3, Convex, CoordModeOrigin) + + for (i = 0; i < steps; i++) { + XPoint points[3]; + + points[0].x = 0; + points[0].y = 0; + points[1].x = width; + points[1].y = 0; + points[2].x = 0; + points[2].y = points[0].y + ((i * height) / steps); + DRAW(); + + points[0].x = 0; + points[0].y = 0; + points[1].x = 0; + points[1].y = height; + points[2].x = ((i * width) / steps); + points[2].y = height; + DRAW(); + + points[0].x = width; + points[0].y = height; + points[1].x = 0; + points[1].y = height; + points[2].x = width; + points[2].y = height - ((i * height) / steps); + DRAW(); + + points[0].x = width; + points[0].y = height; + points[1].x = width; + points[1].y = 0; + points[2].x = width - ((i * width) / steps); + points[2].y = 0; + DRAW(); + + XSync(dpy, True); + if (delay > 0) +#if HAVE_GETTIMEOFDAY + { + GETTIMEOFDAY(&tp); + interval = tp.tv_usec - t_prev; + if (interval <= 0) + interval = interval + 1000000; + interval = delay * granularity - interval; + if (interval > 0) + usleep(interval); + GETTIMEOFDAY(&tp); + t_prev = tp.tv_usec; + } +#else + usleep(delay * granularity); +#endif + } +#undef DRAW +} + +static struct eraser_names { + Eraser mode; + char *name; +} erasers[] = { + + { + random_lines, "random_lines" + }, + { + random_squares, "random_squares" + }, + { + venetian, "venetian" + }, + { + triple_wipe, "triple_wipe" + }, + { + quad_wipe, "quad_wipe" + }, + { + circle_wipe, "circle_wipe" + }, + { + three_circle_wipe, "three_circle_wipe" + }, + { + squaretate, "squaretate" + }, + { + no_fade, "no_fade" + } +}; + + +static void +erase_window(ModeInfo * mi, GC erase_gc, unsigned long pixel, int mode, + int delay) +{ + int granularity = 25; + + XSetForeground(MI_DISPLAY(mi), erase_gc, pixel); + if (MI_IS_DRAWN(mi) && delay > 0) { + if (mode < 0 || mode >= (int) countof(erasers)) + mode = NRAND(countof(erasers)); + (*(erasers[mode].mode)) (MI_DISPLAY(mi), MI_WINDOW(mi), + erase_gc, MI_WIDTH(mi), MI_HEIGHT(mi), + delay, granularity); + MI_IS_DRAWN(mi) = False; + } + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), erase_gc, 0, 0, + (unsigned int) MI_WIDTH(mi), (unsigned int) MI_HEIGHT(mi)); +} + +void +erase_full_window(ModeInfo * mi, GC erase_gc, unsigned long pixel) +{ + erase_window(mi, erase_gc, pixel, erasemode, erasedelay); +} + +int +erasemodefromname(char *name) +{ + int a; + char *s1, *s2; + int eraseMode = -1; + + for (a = 0; a < (int) countof(erasers); a++) { + for (s1 = erasers[a].name, s2 = name; *s1 && *s2; s1++, s2++) + if ((isupper((int) *s1) ? tolower((int) *s1) : *s1) != + (isupper((int) *s2) ? tolower((int) *s2) : *s2)) + break; + + if ((*s1 == '\0') || (*s2 == '\0')) { + + if (eraseMode != -1) { + (void) fprintf(stderr, + "%s does not uniquely describe an erase mode (set to random)\n" + ,name); + return (-1); + } + eraseMode = a; + } + } + return (eraseMode); +} diff --git a/xlock/iostuff.c b/xlock/iostuff.c new file mode 100644 index 00000000..dec3b5a3 --- /dev/null +++ b/xlock/iostuff.c @@ -0,0 +1,827 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)iostuff.c 4.10 98/10/23 xlockmore"; + +#endif + +/*- + * iostuff.c - various file utilities for images, text, fonts + * + * Copyright (c) 1998 by David Bagley + * + * Revision History: + * + * Changes maintained by David Bagley + * 23-Apr-98: Separated out of util.c + * + */ + +#ifdef STANDALONE +#include "utils.h" +extern char *message, *messagefile, *messagesfile, *program; +extern char *messagefontname; + +#else +#include "xlock.h" +#include "vis.h" +#include "color.h" +char *message, *messagefile, *messagesfile, *program; +char *messagefontname; + +#endif +#include "mode.h" +#include "iostuff.h" +#include "random.h" + +#include +#include +#include + +static int +readable(char *filename) +{ + FILE *fp; + + if ((fp = my_fopen(filename, "r")) == NULL) + return False; + (void) fclose(fp); + return True; +} + +FILE * +my_fopen(char *filename, const char *type) +{ + FILE *fp = NULL; + int s; + struct stat fileStat; + + s = stat(filename, &fileStat); + if ((s >= 0 && S_ISREG(fileStat.st_mode)) || (s < 0 && type[0] == 'w')) { + if ((fp = fopen(filename, type)) == NULL) + return NULL; + } else { + return NULL; + } + + return fp; +} + +#if HAVE_DIRENT_H +static void +randomFileFromList(char *directory, + struct dirent **filelist, int numfiles, char *file_local) +{ + int num; + + num = NRAND(numfiles); + if (strlen(directory) + strlen(filelist[num]->d_name) + 1 < 256) { + (void) sprintf(file_local, "%s%s", + directory, filelist[num]->d_name); + } +} + +#endif + +#if HAVE_DIRENT_H + +extern Bool debug; + +/* index_dir emulation of FORTRAN's index in C. Author: J. Jansen */ +static int +index_dir(char *str1, char *substr) +{ + int i, num, l1 = strlen(str1), ls = strlen(substr), found; + char *str1_tmp, *substr_tmp, *substr_last; + + num = l1 - ls + 1; + substr_last = substr + ls; + for (i = 0; i < num; ++i) { + str1_tmp = str1 + i; + substr_tmp = substr; + found = 1; + while (substr_tmp < substr_last) + if (*str1_tmp++ != *substr_tmp++) { + found = 0; + break; + } + if (found) + return (i + 1); + } + return (0); +} + +#ifdef VMS +/* Upcase string Author: J. Jansen */ +static void +upcase(char *s) +{ + int i; + + for (i = 0; s[i] != '\0'; i++) { + if (s[i] >= 'a' && s[i] <= 'z') { + s[i] = (char) (s[i] - 32); + } + } +} + +#endif + +/* Split full path into directory and filename parts Author: J. Jansen */ +void +get_dir(char *fullpath, char *dir, char *filename) +{ + char *ln; + int ip_temp = 0, ip; + +#ifdef VMS + ip = index_dir(fullpath, "]"); +#else + ln = fullpath; + ip = 0; + while ((ip_temp = index_dir(ln, "/"))) { + ip = ip + ip_temp; + ln = fullpath + ip; + } +#endif + if (ip == 0) { +#ifdef VMS + (void) strcpy(dir, "[]"); +#else + (void) strcpy(dir, "./"); +#endif + } else { + if (ip > DIRBUF - 1) + ip_temp = DIRBUF - 1; + else + ip_temp = ip; + (void) strncpy(dir, fullpath, ip_temp); + dir[ip_temp] = '\0'; + } + ln = fullpath + ip; + (void) strncpy(filename, ln, MAXNAMLEN - 1); + filename[MAXNAMLEN - 1] = '\0'; +#ifdef VMS + upcase(filename); /* VMS knows uppercase filenames only */ +#else + { + DIR *dirp; + + /* This finds a directory if there is no final slash */ + if (filename[0] && (dirp = opendir(fullpath)) != NULL) { + (void) closedir(dirp); + (void) strncpy(dir, fullpath, DIRBUF - 1); + ip = strlen(fullpath); + if (ip < DIRBUF - 2) { + dir[ip] = '/'; + dir[ip + 1] = '\0'; + } + dir[DIRBUF - 1] = '\0'; + filename[0] = '\0'; + } + } +#endif + if (debug) + (void) printf("get_dir %s %s %s\n", fullpath, dir, filename); +} + +/* Procedure to select the matching filenames Author: J. Jansen */ +int +sel_image(struct dirent *name) +{ + extern char filename_r[MAXNAMLEN]; + char *name_tmp = name->d_name; + char *filename_tmp = filename_r; + int numfrag = -1; + static char *frags[64]; + int ip, i; + + if (numfrag == -1) { + ++numfrag; + while ((ip = index_dir(filename_tmp, "*"))) { + if (numfrag >= 64) + return 0; + frags[numfrag] = (char *) malloc(ip); + (void) strcpy(frags[numfrag], "\0"); + (void) strncat(frags[numfrag], filename_tmp, ip - 1); + ++numfrag; + filename_tmp = filename_tmp + ip; + } +/* PURIFY says this leaks */ + frags[numfrag] = (char *) malloc(strlen(filename_tmp) + 1); + (void) strcpy(frags[numfrag], filename_tmp); + } + for (i = 0; i <= numfrag; ++i) { + ip = index_dir(name_tmp, frags[i]); + (void) free((void *) frags[i]); + if (ip == 0) { + int j; + + for (j = i + 1; j <= numfrag; ++j) + (void) free((void *) frags[j]); + return (0); + } + name_tmp = name_tmp + ip; + } + + return (1); +} + +/* scandir implementiation for VMS Author: J. Jansen */ +/* name changed to scan_dir to solve portablity problems */ +#define _MEMBL_ 64 +int +scan_dir(const char *directoryname, struct dirent ***namelist, + int (*specify) (struct dirent *), + int (*compare) (const void *, const void *)) +{ + DIR *dirp; + struct dirent *new_entry, **namelist_tmp; + int size_tmp, num_list_tmp; + + if (debug) + (void) printf("scan_dir directoryname %s\n", directoryname); + if ((dirp = opendir(directoryname)) == NULL) { + if (debug) + (void) printf("scan_dir can not open directoryname %s\n", directoryname); + return (-1); + } + size_tmp = _MEMBL_; +/*- + * PURIFY on SunOS4 and on Solaris 2 reports a cumulative memory leak on + * the next line when used with the modes/glx/text3d.cc file. It only + * leaks like this for the C++ modes, and is OK in the C modes. */ + namelist_tmp = (struct dirent **) malloc(size_tmp * sizeof (struct dirent *)); + + if (namelist_tmp == NULL) { + if (debug) + (void) printf("scan_dir no memory\n"); + return (-1); + } + num_list_tmp = 0; + while ((new_entry = readdir(dirp)) != NULL) { +#ifndef VMS + if (!strcmp(new_entry->d_name, ".") || !strcmp(new_entry->d_name, "..")) + continue; +#endif + if (specify != NULL && !(*specify) (new_entry)) + continue; + if (++num_list_tmp >= size_tmp) { + size_tmp = size_tmp + _MEMBL_; + namelist_tmp = (struct dirent **) realloc( + (void *) namelist_tmp, size_tmp * sizeof (struct dirent *)); + + if (namelist_tmp == NULL) { + if (debug) + (void) printf("scan_dir no memory\n"); + return (-1); + } + } + namelist_tmp[num_list_tmp - 1] = + (struct dirent *) malloc(sizeof (struct dirent) +#ifdef SVR4 + + strlen (new_entry->d_name) +#endif + ); + + (void) strcpy(namelist_tmp[num_list_tmp - 1]->d_name, new_entry->d_name); + + *namelist = namelist_tmp; + } + + (void) closedir(dirp); + if (num_list_tmp && compare != NULL) + (void) qsort((void *) namelist_tmp, num_list_tmp, + sizeof (struct dirent *), compare); + + if (debug) + (void) printf("scan_dir number %d\n", num_list_tmp); + *namelist = namelist_tmp; + return (num_list_tmp); +} + +#endif + +#if HAVE_DIRENT_H +static void +getRandomImageFile(char *randomfile, char *randomfile_local) +{ + extern char directory_r[DIRBUF]; + struct dirent ***images_list = NULL; + extern struct dirent **image_list; + extern int num_list; + extern char filename_r[MAXNAMLEN]; + + get_dir(randomfile, directory_r, filename_r); + if (image_list != NULL) { + int i; + + for (i = 0; i < num_list; i++) { + if (image_list[i] != NULL) + (void) free((void *) image_list[i]); + } + (void) free((void *) image_list); + image_list = NULL; + } + images_list = (struct dirent ***) malloc(sizeof (struct dirent **)); + + num_list = scan_dir(directory_r, images_list, sel_image, NULL); + image_list = *images_list; + if (images_list) { + (void) free((void *) images_list); + images_list = NULL; + } + if (num_list > 0) { + randomFileFromList(directory_r, image_list, num_list, randomfile_local); + } else if (num_list < 0) { + image_list = NULL; + num_list = 0; + } +} + +#endif + +extern int XbmReadFileToImage(char *filename, + int *width, int *height, unsigned char **bits); + +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#if USE_XPMINC +#include +#else +#include /* Normal spot */ +#endif +#endif +#include "ras.h" + +static XImage blogo = +{ + 0, 0, /* width, height */ + 0, XYBitmap, 0, /* xoffset, format, data */ + LSBFirst, 8, /* byte-order, bitmap-unit */ + LSBFirst, 8, 1 /* bitmap-bit-order, bitmap-pad, depth */ +}; + +void +getImage(ModeInfo * mi, XImage ** logo, + int default_width, int default_height, unsigned char *default_bits, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + int default_xpm, char **name, +#endif + int *graphics_format, Colormap * ncm, + unsigned long *black) +{ + Display *display = MI_DISPLAY(mi); + static char *bitmap_local = NULL; + +#ifndef STANDALONE +#if defined( USE_XPM ) || defined( USE_XPMINC ) + XpmAttributes attrib; + +#endif + *ncm = None; +#if 0 + /* This probably works best in most cases but for random mode used + with random selection of a file it will fail often. */ + *ncm = None; +#else + if (!fixedColors(mi)) + *ncm = XCreateColormap(display, MI_WINDOW(mi), MI_VISUAL(mi), AllocNone); + else + *ncm = None; +#endif +#if defined( USE_XPM ) || defined( USE_XPMINC ) + attrib.visual = MI_VISUAL(mi); + if (*ncm == None) { + attrib.colormap = MI_COLORMAP(mi); + } else { + attrib.colormap = *ncm; + } + attrib.depth = MI_DEPTH(mi); + attrib.valuemask = XpmVisual | XpmColormap | XpmDepth; +#endif +#endif /* !STANDALONE */ + *graphics_format = 0; + + if (bitmap_local) { + (void) free((void *) bitmap_local); + bitmap_local = NULL; + } + if (MI_BITMAP(mi) && strlen(MI_BITMAP(mi))) { +#ifdef STANDALONE + bitmap_local = MI_BITMAP(mi); +#else + bitmap_local = (char *) malloc(256); + (void) strncpy(bitmap_local, MI_BITMAP(mi), 256); +#if HAVE_DIRENT_H + getRandomImageFile(MI_BITMAP(mi), bitmap_local); +#endif +#endif /* STANDALONE */ + } + if (bitmap_local && strlen(bitmap_local)) { +#ifndef STANDALONE + if (readable(bitmap_local)) { + if (MI_NPIXELS(mi) > 2) { + if (RasterSuccess == RasterFileToImage(mi, bitmap_local, logo)) { + *graphics_format = IS_RASTERFILE; + if (!fixedColors(mi)) + SetImageColors(display, *ncm); + *black = GetColor(mi, MI_BLACK_PIXEL(mi)); + (void) GetColor(mi, MI_WHITE_PIXEL(mi)); + (void) GetColor(mi, MI_BG_PIXEL(mi)); + (void) GetColor(mi, MI_FG_PIXEL(mi)); + } + } + } else { + (void) fprintf(stderr, + "could not read file \"%s\"\n", bitmap_local); + } +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#ifndef USE_MONOXPM + if (MI_NPIXELS(mi) > 2) +#endif + { + if (*graphics_format <= 0) { + if (*ncm != None) + reserveColors(mi, *ncm, black); + if (XpmSuccess == XpmReadFileToImage(display, bitmap_local, logo, + (XImage **) NULL, &attrib)) + *graphics_format = IS_XPMFILE; + } + } +#endif +#endif /* !STANDALONE */ + if (*graphics_format <= 0) { + if (!blogo.data) { + if (BitmapSuccess == XbmReadFileToImage(bitmap_local, + &blogo.width, &blogo.height, + (unsigned char **) &blogo.data)) { + blogo.bytes_per_line = (blogo.width + 7) / 8; + *graphics_format = IS_XBMFILE; + *logo = &blogo; + } + } else { + *graphics_format = IS_XBMDONE; + *logo = &blogo; + } + } + if (*graphics_format <= 0 && MI_IS_VERBOSE(mi)) + (void) fprintf(stderr, + "\"%s\" is in an unrecognized format or not compatible with screen\n", + bitmap_local); + } +#ifndef STANDALONE +#if defined( USE_XPM ) || defined( USE_XPMINC ) + if (*graphics_format <= 0 && default_xpm) +#ifndef USE_MONOXPM + if (MI_NPIXELS(mi) > 2) +#endif + if (XpmSuccess == XpmCreateImageFromData(display, name, + logo, (XImage **) NULL, &attrib)) + *graphics_format = IS_XPM; +#endif +#endif /* STANDALONE */ + if (*graphics_format <= 0) { + if (!blogo.data) { + blogo.data = (char *) default_bits; + blogo.width = default_width; + blogo.height = default_height; + blogo.bytes_per_line = (blogo.width + 7) / 8; + *graphics_format = IS_XBM; + } else + *graphics_format = IS_XBMDONE; + *logo = &blogo; + } +#ifndef STANDALONE /* Come back later */ + if (*ncm != None && *graphics_format != IS_RASTERFILE && + *graphics_format != IS_XPMFILE && *graphics_format != IS_XPM) { + XFreeColormap(display, *ncm); + *ncm = None; + } +#endif /* STANDALONE */ /* Come back later */ +} + +void +destroyImage(XImage ** logo, int *graphics_format) +{ + switch (*graphics_format) { + case IS_XBM: + blogo.data = NULL; + break; + case IS_XBMFILE: + if (blogo.data) { + (void) free((void *) blogo.data); + blogo.data = NULL; + } + break; + case IS_XPM: + case IS_XPMFILE: + case IS_RASTERFILE: + if (logo && *logo) + (void) XDestroyImage(*logo); + break; + } + *graphics_format = -1; + *logo = NULL; +} + +void +pickPixmap(Display * display, Drawable drawable, char *name, + int default_width, int default_height, unsigned char *default_bits, + int *width, int *height, Pixmap * pixmap, + int *graphics_format) +{ + int x_hot, y_hot; /* dummy */ + + if (name && *name) { + if (readable(name)) { + if (BitmapSuccess == XReadBitmapFile(display, drawable, name, + (unsigned int *) width, (unsigned int *) height, + pixmap, &x_hot, &y_hot)) { + *graphics_format = IS_XBMFILE; + } + if (*graphics_format <= 0) + (void) fprintf(stderr, + "\"%s\" not xbm format\n", name); + } else { + (void) fprintf(stderr, + "could not read file \"%s\"\n", name); + } + } + if (*graphics_format <= 0) { + *width = default_width; + *height = default_height; + *graphics_format = IS_XBM; + *pixmap = XCreateBitmapFromData(display, drawable, + (char *) default_bits, *width, *height); + + } +} + +void +getPixmap(ModeInfo * mi, Drawable drawable, + int default_width, int default_height, unsigned char *default_bits, + int *width, int *height, Pixmap * pixmap, + int *graphics_format) +{ + Display *display = MI_DISPLAY(mi); + static char *bitmap_local = NULL; + + if (bitmap_local) { + (void) free((void *) bitmap_local); + bitmap_local = NULL; + } + if (MI_BITMAP(mi) && strlen(MI_BITMAP(mi))) { +#ifdef STANDALONE + bitmap_local = MI_BITMAP(mi); +#else + bitmap_local = (char *) malloc(256); + (void) strncpy(bitmap_local, MI_BITMAP(mi), 256); +#if HAVE_DIRENT_H + getRandomImageFile(MI_BITMAP(mi), bitmap_local); +#endif +#endif /* STANDALONE */ + } + pickPixmap(display, drawable, bitmap_local, + default_width, default_height, default_bits, + width, height, pixmap, graphics_format); +} + + +#define FROM_PROGRAM 1 +#define FROM_FORMATTEDFILE 2 +#define FROM_FILE 3 +#define FROM_RESRC 4 + +static char *def_words = "I'm out running around."; +static int getwordsfrom; + +static void +strcat_firstword(char *fword, char *words) +{ + while (*fword) + fword++; + while (*words && !(isspace((int) *words))) + *fword++ = *words++; + *fword = '\0'; +} + +int +isRibbon(void) +{ + return (getwordsfrom == FROM_RESRC); +} + +char * +getWords(int screen, int screens) +{ + FILE *pp; + static char *buf = NULL, progerr[BUFSIZ], progrun[BUFSIZ]; + register char *p; + int i; + +#if !defined(__cplusplus) && !defined(c_plusplus) + extern int pclose(FILE *); + +#endif + + if (!buf) { + buf = (char *) calloc(screens * BUFSIZ, sizeof (char)); + + if (!buf) + return NULL; + } + p = &buf[screen * BUFSIZ]; + *p = '\0'; + if (message && *message) + getwordsfrom = FROM_RESRC; + else if (messagefile && *messagefile) { + getwordsfrom = FROM_FILE; + } else if (messagesfile && *messagesfile) { + getwordsfrom = FROM_FORMATTEDFILE; + } else { + getwordsfrom = FROM_PROGRAM; + + (void) sprintf(progrun, "( %s ) 2>&1", + (!program || !*program) ? DEF_PROGRAM : program); + } + + switch (getwordsfrom) { +#ifndef VMS + case FROM_PROGRAM: +/*- + * PURIFY 4.0.1 on SunOS4 and on Solaris2 reports a duplication of file + * descriptor on the next line. Do not know if this is a problem or not. */ + if ((pp = (FILE *) popen(progrun, "r")) != NULL) { + while (fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp)) { + if (strlen(&buf[screen * BUFSIZ]) + 1 < BUFSIZ) + p = &buf[screen * BUFSIZ] + strlen(&buf[screen * BUFSIZ]); + else + break; + } + (void) pclose(pp); + p = &buf[screen * BUFSIZ]; + if (!buf[screen * BUFSIZ]) + (void) sprintf(&buf[screen * BUFSIZ], "\"%s\" produced no output!", + (!program) ? DEF_PROGRAM : program); + else { + (void) memset((char *) progerr, 0, sizeof (progerr)); + (void) strcpy(progerr, "sh: "); + strcat_firstword(progerr, (!program || !*program) ? + DEF_PROGRAM : program); + (void) strcat(progerr, ": not found\n"); + if (!strcmp(&buf[screen * BUFSIZ], progerr)) + switch (NRAND(12)) { + case 0: + (void) strcat(&buf[screen * BUFSIZ], + "( Get with the program, bub. )\n"); + break; + case 1: + (void) strcat(&buf[screen * BUFSIZ], + "( I blow my nose at you, you silly person! )\n"); + break; + case 2: + (void) strcat(&buf[screen * BUFSIZ], + "\nThe resource you want to\nset is `program'.\n"); + break; + case 3: + (void) strcat(&buf[screen * BUFSIZ], + "\nHelp!! Help!!\nAAAAAAGGGGHHH!! \n\n"); + break; + case 4: + (void) strcat(&buf[screen * BUFSIZ], + "( Hey, who called me `Big Nose'? )\n"); + break; + case 5: + (void) strcat(&buf[screen * BUFSIZ], + "( Hello? Are you paying attention? )\n"); + break; + case 6: + (void) strcat(&buf[screen * BUFSIZ], + "sh: what kind of fool do you take me for? \n"); + break; + case 7: + (void) strcat(&buf[screen * BUFSIZ], + "\nRun me with -program \"fortune -o\".\n"); + break; + case 8: + (void) strcat(&buf[screen * BUFSIZ], + "( Where is your fortune? )\n"); + break; + case 9: + (void) strcat(&buf[screen * BUFSIZ], + "( Your fortune has not been written yet!! )"); + break; + } + } + p = &buf[screen * BUFSIZ]; + } else { + perror(progrun); + p = def_words; + } + break; +#endif + case FROM_FORMATTEDFILE: + if ((pp = my_fopen(messagesfile, "r")) != NULL) { + int len_mess_file; + + if (fscanf(pp, "%d", &len_mess_file)) { + int no_quote; + + if (len_mess_file <= 0) + buf[screen * BUFSIZ] = '\0'; + else { + (void) fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp); + /* get first '%%' (the one after the number of quotes) */ + (void) fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp); + no_quote = NRAND(len_mess_file); + for (i = 0; i <= no_quote; ++i) { + unsigned int len_cur = 0; + + buf[screen * BUFSIZ] = '\0'; + p = &buf[screen * BUFSIZ] + strlen(&buf[screen * BUFSIZ]); + while (fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp)) { + if (strlen(&buf[screen * BUFSIZ]) + 1 < BUFSIZ) { + /* a line with '%%' contains 3 characters */ + if ((strlen(&buf[screen * BUFSIZ]) == len_cur + 3) && + (p[0] == '%') && (p[1] == '%')) { + p[0] = '\0'; /* get rid of "%%" in &buf[screen * BUFSIZ] */ + break; + } else { + p = &buf[screen * BUFSIZ] + strlen(&buf[screen * BUFSIZ]); + len_cur = strlen(&buf[screen * BUFSIZ]); + } + } else + break; + } + } + } + (void) fclose(pp); + if (!buf[screen * BUFSIZ]) + (void) sprintf(&buf[screen * BUFSIZ], + "file \"%s\" is empty!", messagesfile); + p = &buf[screen * BUFSIZ]; + } else { + (void) sprintf(&buf[screen * BUFSIZ], + "file \"%s\" not in correct format!", messagesfile); + p = &buf[screen * BUFSIZ]; + } + } else { + (void) sprintf(&buf[screen * BUFSIZ], + "could not read file \"%s\"!", messagesfile); + p = &buf[screen * BUFSIZ]; + } + break; + case FROM_FILE: + if ((pp = my_fopen(messagefile, "r")) != NULL) { + while (fgets(p, BUFSIZ - strlen(&buf[screen * BUFSIZ]), pp)) { + if (strlen(&buf[screen * BUFSIZ]) + 1 < BUFSIZ) + p = &buf[screen * BUFSIZ] + strlen(&buf[screen * BUFSIZ]); + else + break; + } + (void) fclose(pp); + if (!buf[screen * BUFSIZ]) + (void) sprintf(&buf[screen * BUFSIZ], + "file \"%s\" is empty!", messagefile); + p = &buf[screen * BUFSIZ]; + } else { + (void) sprintf(&buf[screen * BUFSIZ], + "could not read file \"%s\"!", messagefile); + p = &buf[screen * BUFSIZ]; + } + break; + case FROM_RESRC: + p = message; + break; + default: + p = def_words; + break; + } + + if (!p || *p == '\0') + p = def_words; + return p; +} + +XFontStruct * +getFont(Display * display) +{ + XFontStruct *messagefont; + + if (!(messagefont = XLoadQueryFont(display, + (messagefontname) ? messagefontname : DEF_MESSAGEFONT))) { + if (messagefontname) { + (void) fprintf(stderr, "can not find font: %s, using %s...\n", + messagefontname, DEF_MESSAGEFONT); + messagefont = XLoadQueryFont(display, DEF_MESSAGEFONT); + } + if (!(messagefont)) { + (void) fprintf(stderr, "can not find font: %s, using %s...\n", + DEF_MESSAGEFONT, FALLBACK_FONTNAME); + messagefont = XLoadQueryFont(display, FALLBACK_FONTNAME); + if (!messagefont) { + (void) fprintf(stderr, "can not even find %s!!!\n", FALLBACK_FONTNAME); + return (None); /* Do not want to exit when in a mode */ + } + } + } + return messagefont; +} diff --git a/xlock/iostuff.h b/xlock/iostuff.h new file mode 100644 index 00000000..0e90b73e --- /dev/null +++ b/xlock/iostuff.h @@ -0,0 +1,58 @@ +#ifndef _FILE_H_ +#define _FILE_H_ + +#ifdef STANDALONE +#ifdef HAVE_XPM +#define USE_XPM +#endif +#endif /* STANDALONE */ + +#define FALLBACK_FONTNAME "fixed" +#ifndef DEF_MESSAGEFONT +#define DEF_MESSAGEFONT "-*-times-*-*-*-*-18-*-*-*-*-*-*-*" +#endif +#ifndef DEF_PROGRAM /* Try the -o option ;) */ +#define DEF_PROGRAM "fortune -s" +#endif + +#define IS_NONE 0 +#define IS_XBMDONE 1 /* Only need one mono image */ +#define IS_XBM 2 +#define IS_XBMFILE 3 +#define IS_XPM 4 +#define IS_XPMFILE 5 +#define IS_RASTERFILE 6 + +extern FILE *my_fopen(char *, const char *); + +extern void get_dir(char *fullpath, char *dir, char *filename); +#if HAVE_DIRENT_H +extern int sel_image(struct dirent *name); +extern int scan_dir(const char *directoryname, struct dirent ***namelist, + int (*specify) (struct dirent *), + int (*compare) (const void *, const void *)); +#endif + +extern int isRibbon(void); +extern char * getWords(int screen, int screens); +extern XFontStruct * getFont(Display * display); + +extern void pickPixmap(Display * display, Drawable drawable, char *name, + int default_width, int default_height, + unsigned char *default_bits, + int *width, int *height, Pixmap * pixmap, + int *graphics_format); +extern void getImage(ModeInfo * mi, XImage ** logo, + int default_width, int default_height, unsigned char *default_bits, +#if defined( USE_XPM ) || defined( USE_XPMINC ) + int default_xpm, char **name, +#endif + int *graphics_format, Colormap * newcolormap, + unsigned long *black); +extern void destroyImage(XImage ** logo, int *graphics_format); +extern void getPixmap(ModeInfo * mi, Drawable drawable, + int default_width, int default_height, unsigned char *default_bits, + int *width, int *height, Pixmap * pixmap, + int *graphics_format); + +#endif /* _FILE_H_ */ diff --git a/xlock/logout.c b/xlock/logout.c new file mode 100644 index 00000000..33005747 --- /dev/null +++ b/xlock/logout.c @@ -0,0 +1,524 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)logout.c 4.02 97/04/01 xlockmore"; + +#endif + +/*- + * logout.c: handle compile-time optional logout + * + * See xlock.c for copying information. + * + * xclosedown code + * Copyright 1990 by Janet Carson + * Permission to use, copy, modify, and distribute 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. The author makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * Revision History: + * 27-Jul-95: put back in logout.c (oops). + * Window shutdown program by Janet L. Carson, + * Baylor College of Medicine. + * Main procedure modified for use w/ xlock by + * Anthony Thyssen . + * 24-Feb-95: fullLock rewritten to handle non-default group names from + * Dale A. Harris + * 13-Feb-95: Heath A. Kehoe . + * Mostly taken from bomb.c + * 1994: bomb.c written. Copyright (c) 1994 Dave Shield + * Liverpool Computer Science + */ + +#include "xlock.h" +#include "iostuff.h" + +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) || defined( USE_BOMB ) + +extern void logoutUser(Display * display); + +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) +#include +#endif +#include + +extern Bool inroot, inwindow, nolock, debug; +extern char *logoutCmd; + +/*- + * This file contains a function called logoutUser() that, when called, + * will (try) to log out the user. + * + * A portable way to do this is to simply kill all of the user's processes, + * but this is a really ugly way to do it (it kills background jobs that + * users may want to remain running after they log out). + * + * If your system provides for a cleaner/easier way to log out a user, + * you may implement it here. + * + * For example, on some systems, one may define for the users an environment + * variable named XSESSION that contains the pid of the X session leader + * process. So, to log the user out, we just need to kill that process, + * and the X session will end. Of course, a user can defeat that by + * changing the value of XSESSION; so we can fall back on the ugly_logout() + * method. + * + * If you can't log the user out (and you don't want to use the brute + * force method) simply return from logoutUser(), and xlock will continue + * on it's merry way (only applies if USE_AUTO_LOGOUT or USE_BUTTON_LOGOUT + * is defined.) + */ + +#define NAP_TIME 5 /* Sleep between shutdown attempts */ + + +#ifdef CLOSEDOWN_LOGOUT + +/* Logout the user by contacting the display and closeing all windows */ + + +/*- + * Window shutdown program by Janet L. Carson, Baylor College of Medicine. + * Version 1.0, placed in /contrib on 2/12/90. + * + * Please send comments or fixes to jcarson@bcm.tmc.edu + */ + +/*- + * I'm probably going to get some BadWindow errors as I kill clients + * which have multiple windows open and then try to kill them again + * on another of their windows. I'm just going to plow right through! + * The flag is set back to false in recurse_tree and kill_tree... + */ + +static int err_occurred = False; + +static int +err_handler(Display * display, XErrorEvent * err) +{ + err_occurred = True; + return 0; +} + +/*- + * Looking for properties... + */ + +static int +has_property(Display * display, Window window, Atom prop) +{ + int nprops, j, retval = 0; + Atom *list = XListProperties(display, window, &nprops); + + if (err_occurred) + return 0; + + for (j = 0; j < nprops; j++) { + if (list[j] == prop) { + retval = 1; + break; + } + } + + if (nprops) + XFree((caddr_t) list); + + return retval; +} + +/*- + * Send a WM_PROTOCOLS WM_DELETE_WINDOW message to a window + */ + +static void +send_delete_message(Display * display, Window window, + Atom protocols_atom, Atom delete_window_atom) +{ + XClientMessageEvent xclient; + + xclient.type = ClientMessage; + xclient.send_event = True; + xclient.display = display; + xclient.window = window; + xclient.message_type = protocols_atom; + xclient.format = 32; + xclient.data.l[0] = delete_window_atom; + + XSendEvent(display, window, False, 0, (XEvent *) & xclient); +} + +/*- + * To shutdown a top level window: if the window participates + * in WM_DELETE_WINDOW, let the client shut itself off. Otherwise, + * do an XKillClient on it. + */ + +static void +handle_top_level(Display * display, Window window, + Atom protocols_atom, Atom delete_window_atom) +{ + Atom *prots; + int nprots, j; + + if (has_property(display, window, protocols_atom)) { + XGetWMProtocols(display, window, &prots, &nprots); + + if (err_occurred) + return; + + for (j = 0; j < nprots; j++) + if (prots[j] == delete_window_atom) { + send_delete_message(display, window, + protocols_atom, delete_window_atom); + break; + } + if (j == nprots) /* delete window not found */ + XKillClient(display, window); + + XFree((caddr_t) prots); + } else + XKillClient(display, window); +} + +/*- + * recurse_tree: look for top level windows to kill all the way down + * the window tree. This pass is "nice"--I'll use delete_window protocol + * if the window supports it. If I get an error in the middle, I'll start + * over again at the same level, because reparenting window managers throw + * windows back up to the root... + */ + +static void +recurse_tree(Display * display, Window window, + Atom state_atom, Atom protocols_atom, Atom delete_window_atom) +{ + Window root, parent, *kids; + unsigned int nkids; + int j; + int swm_state; + + for (;;) { + XQueryTree(display, window, &root, &parent, &kids, &nkids); + if (err_occurred) { + err_occurred = False; + return; + } + for (j = 0; j < nkids; j++) { + swm_state = has_property(display, kids[j], state_atom); + + if (err_occurred) + break; + + if (swm_state) { + handle_top_level(display, kids[j], protocols_atom, delete_window_atom); + if (err_occurred) + break; + } else + recurse_tree(display, kids[j], + state_atom, protocols_atom, delete_window_atom); + } + + XFree((caddr_t) kids); + + /* when I get all the way through a level without an error, I'm done */ + + if (err_occurred) + err_occurred = False; + else + return; + + } +} + +/*- + * This is the second pass--anything left gets an XKillClient! + */ + +static void +kill_tree(Display * display, Window window) +{ + Window root, parent, *kids; + unsigned int nkids; + int j; + + for (;;) { + XQueryTree(display, window, &root, &parent, &kids, &nkids); + if (err_occurred) { + err_occurred = False; + return; + } + for (j = 0; j < nkids; j++) { + XKillClient(display, kids[j]); + if (err_occurred) + break; + } + + XFree((caddr_t) kids); + + /* when I get all the way through a level without an error, I'm done */ + + if (err_occurred) + err_occurred = False; + else + return; + } +} + +/*- + * Main program + */ + +static void +closedownLogout(Display * display) +{ + Atom __SWM_DELETE_WINDOW = None; + Atom __SWM_PROTOCOLS = None; + Atom __SWM_STATE = None; + int j; + +#if 0 + /* synchronize -- so I'm aware of errors immediately */ + XSynchronize(display, True); + + /* use my error handler from here on out */ + (void) XSetErrorHandler(err_handler); +#endif + + /* init atoms */ + __SWM_STATE = XInternAtom(display, "__SWM_STATE", False); + __SWM_PROTOCOLS = XInternAtom(display, "__SWM_PROTOCOLS", False); + __SWM_DELETE_WINDOW = XInternAtom(display, "__SWM_DELETE_WINDOW", False); + + /* start looking for windows to kill -- be nice on pass 1 */ + for (j = 0; j < ScreenCount(display); j++) + recurse_tree(display, RootWindow(display, j), + __SWM_STATE, __SWM_PROTOCOLS, __SWM_DELETE_WINDOW); + + /* wait for things to clean themselves up */ + (void) sleep(NAP_TIME); + + /* this will forcibly kill anything that's still around -- + this second pass may or may not be needed... */ + for (j = 0; j < ScreenCount(display); j++) + kill_tree(display, RootWindow(display, j)); + (void) sleep(NAP_TIME); +} + +#endif /* CLOSEDOWN_LOGOUT */ + +#ifdef SESSION_LOGOUT +static void +sessionLogout(void) +{ + char *pidstr; + + pidstr = getenv("XSESSION"); + if (pidstr) { + kill(atoi(pidstr), SIGTERM); + (void) sleep(NAP_TIME); + } +} + +#endif /* SESSION_LOGOUT */ + +static void +uglyLogout(void) +{ +#ifdef SunCplusplus +/* #include */ + extern void (*signal(int, void (*)(int))) (int); + extern int kill(pid_t, int); + +#else +#if 0 + extern int signal(int, void *); + extern int kill(int, int); + +#endif +#endif + +#ifndef VMS +#ifndef KILL_ALL_OTHERS +#define KILL_ALL_OTHERS -1 + (void) signal(SIGHUP, SIG_IGN); + (void) signal(SIGTERM, SIG_IGN); +#endif + + (void) kill(KILL_ALL_OTHERS, SIGHUP); + (void) sleep(NAP_TIME); + (void) kill(KILL_ALL_OTHERS, SIGTERM); + (void) sleep(NAP_TIME); + +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) + syslog(SYSLOG_NOTICE, "%s: failed to exit - sending kill (uid %d)\n", + ProgramName, getuid()); +#endif + + (void) kill(KILL_ALL_OTHERS, SIGKILL); + (void) sleep(NAP_TIME); + +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) + syslog(SYSLOG_WARNING, "%s: still won't exit - suicide (uid %d)\n", + ProgramName, getuid()); +#endif + + (void) kill((int) getpid(), SIGKILL); +#endif /* !VMS */ + exit(-1); +} + +void +logoutUser(Display * display) +{ + +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) + extern syslogStop(char *); + + syslog(SYSLOG_INFO, "%s: expired. closing down (uid %d) on %s\n", + ProgramName, getuid(), getenv("DISPLAY")); + syslogStop(XDisplayString(display)); +#endif + if (logoutCmd && *logoutCmd) { + int cmd_pid; + + if ((cmd_pid = (int) FORK()) == -1) { + (void) fprintf(stderr, "Failed to launch \"%s\"\n", logoutCmd); + perror(ProgramName); + cmd_pid = 0; + } else if (!cmd_pid) { + (void) system(logoutCmd); + exit(0); + } + } +#ifdef CLOSEDOWN_LOGOUT + (void) finish(display, False); +#else + (void) finish(display, True); +#endif +#ifdef VMS + (void) system("mcr decw$endsession -noprompt"); +#else +#ifdef __sgi + (void) system("/usr/bin/X11/tellwm end_session >/dev/null 2>&1"); + (void) sleep(10); /* Give the above a chance to run */ +#endif +#endif + +#ifdef CLOSEDOWN_LOGOUT + /* Do not want to kill other user's processes like if telnetted in */ + closedownLogout(display); + return; +#endif +#ifdef SESSION_LOGOUT + sessionLogout(); +#endif + uglyLogout(); + exit(-1); +} + + +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) + /* + * Determine whether to "fully" lock the terminal, or + * whether the time-limited version should be imposed. + * + * Policy: + * Members of staff can fully lock + * (hard-wired user/group names + file read at run time) + * Students (i.e. everyone else) + * are forced to use the time-limit version. + * + * An alternative policy could be based on display location + */ +#define FULL_LOCK 1 +#define TEMP_LOCK 0 + +/* assuming only staff file is needed */ +#ifndef STAFF_FILE +#define STAFF_FILE "/usr/remote/etc/xlock.staff" +#endif + +#undef passwd +#undef pw_name +#undef getpwnam +#undef getpwuid +#include +#include +#include +#include +#ifndef NGROUPS +#if HAVE_LIMITS_H +#include +#endif +#ifdef NGROUPS_MAX +#define NGROUPS NGROUPS_MAX +#else +#define NGROUPS NGROUPS_MAX_DEFAULT +#endif +#endif + +int +fullLock(void) +{ + uid_t uid; + int ngroups = NGROUPS; + +#ifdef SUNOS4 + gid_t mygidset[NGROUPS * sizeof (gid_t)]; + +#else + gid_t mygidset[NGROUPS]; + +#endif + int ngrps, i; + struct passwd *pwp; + struct group *gp; + FILE *fp; + char buf[BUFSIZ]; + + uid = getuid(); + /* Do not try to logout root! */ + if (!uid) + return (FULL_LOCK); /* root */ + if (inwindow || inroot || nolock /*|| debug */ ) + return (FULL_LOCK); /* (mostly) harmless user */ + + pwp = getpwuid(uid); + if ((ngrps = getgroups(ngroups, mygidset)) == -1) + perror(ProgramName); + +#ifdef STAFF_NETGROUP + if (innetgr(STAFF_NETGROUP, NULL, pwp->pw_name, NULL)) + return (FULL_LOCK); +#endif + + if ((fp = my_fopen(STAFF_FILE, "r")) == NULL) + return (TEMP_LOCK); + + while ((fgets(buf, BUFSIZ, fp)) != NULL) { + char *cp; + + if ((cp = (char *) strchr(buf, '\n')) != NULL) + *cp = '\0'; + if (!strcmp(buf, pwp->pw_name)) + return (FULL_LOCK); + if ((gp = getgrnam(buf)) != NULL) { + /* check all of user's groups */ +#ifdef SUNOS4 + for (i = 1; i < ngrps * sizeof (gid_t); i += 2) +#else + for (i = 0; i < ngrps; ++i) +#endif + if (gp->gr_gid == mygidset[i]) + return (FULL_LOCK); + } + } + (void) fclose(fp); + + return (TEMP_LOCK); +} +#endif /* USE_AUTO_LOGOUT || USE_BUTTON_LOGOUT */ + +#endif /* USE_AUTO_LOGOUT || USE_BUTTON_LOGOUT || USE_BOMB */ diff --git a/xlock/memcheck.c b/xlock/memcheck.c new file mode 100644 index 00000000..03fd8eb3 --- /dev/null +++ b/xlock/memcheck.c @@ -0,0 +1,487 @@ +/***************************************************************************** +* (c) Copyright 1996,1997 Metapath Software Corporation +* +* 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. +* +* Author: David A. Hansen +* Created: 28-MAR-1996 +* +* Change History: +* 22-JUL-96 D.Hansen Fixed some bugs and added length check. +* 01-AUG-96 D.Hansen Added Usage dump on SIGHUP +* 17-JUL-97 D.Hansen Removed dependencies for use with xlock +* +* Description: +* This module replaces the standard malloc/free routines with more +* enhanced/robust version to aid in catching memory bugs. +* +*****************************************************************************/ + +/*- + It's still a little crude, but it works. So the next thing I need to do is + add some more refinement. First on my list is to figure out a way to + translate the caller's address into something useful, like a symbol. + Currently you have to be in gdb and use something like: + + gdb> x + + Oh, and don't forget to link with debugging, LDFLAGS=-g + + To build, I just put memcheck.c in the xlock subdirectory and hand edited + + the Makefile and ../mode/Makefile to include it. You'll probably want to + create a debug subdirectory and figure out a way to eloquently get + configure to build with it. + + Also, there is no comparison/growth detection utility. Maybe that's + something you can add. Basically, you send HUP signals to the process + every so often and it will dump the memory users and amount they have + allocated. After running and HUPing for a while, a script could analyze + the output and determine which caller addresses are continuing to consume + memory. + + Also, the method for determining the caller's address is probably specific + to Intel machines since I use a trick that is based on the way the frame is + stacked. It may work on Sun with a little playing around with the + reference variable, like the last variable in the parameter list instead of + the first, or maybe by changing the reference to add 1 long word instead of + subtract 1 long word. If you look at the variable caller_addr, you'll see + what I'm talking about. It all depends on things like whether the stack + grows up or down, etc. I would try it first without changing anything and + use gdb or dbx or whatever to see if the addresses translate into + appropriate symbols. In any case, it will always be very machine + dependent. Not much one can do about that. + + Finally, what we probably want to do in the long run is create a script + that runs xlock randomly through all the modes on a given interval and at + the same interval issues SIGHUPs to the process to take a snapshot of the + used memory. Then after letting it iterate through all the modes several + times, another script can post-process the output looking for memory growth + and bad memory users. (gdb> handle SIGHUP print pass nostop) (ifndebug + around the SIGHUP handler in xlock.c). + + I've also thought about adding another signal catcher to snapshot a stable + allocation. In other words, once xlock is started, issue a SIGUSR1 or + something, and then all subsequent SIGHUPs would print deviations from the + initial SIGUSR1. Of course, that would produce a different list for every + mode, but it would delete the common mallocs done at process + initialization. Sometimes it's also hard to tell if a library is doing a + one time permanent malloc and just reusing it later. I think MesaGL does + this. */ + +#include +#include +#include +#include +#include + +#ifdef ULONG +#undef ULONG +#endif +#if LINT /* Lint complains so give it what it expects */ +#define ULONG unsigned int +#else +#define ULONG unsigned long +#endif + +extern char *ProgramName; +extern pid_t ProgramPID; +extern void *sbrk(int incr); + +typedef struct mem_struct { + struct mem_hdr { + ULONG check_mark; + ULONG chunk_size; + ULONG used_length; + struct mem_struct *next; + void *caller; + } hdr; + + /* allocate space for the marker at the end of the data */ + /* but return the address of data */ + unsigned char data[2]; + +} mem_type; + + +#define USED_MARKER ((ULONG) 0xBABECAFE) +#define FREE_MARKER ((ULONG) 0xDEADBEEF) +#define HEAD_MARKER ((ULONG) 0xFACEF00D) +#define EOD_MARKER ((ULONG) 0xEC) + +#define SBRK_MIN 4096 +#define SPLIT_MIN 32 + +static mem_type *free_head = NULL; +static mem_type *malloc_head = NULL; +static int reentrancy_check = 0; +static int first_time = 1; +static FILE *dump_file; +static char dump_fname[256]; + +static struct sigaction hup_action; +static struct sigaction old_action; + +static ULONG total_count; +static ULONG total_size; +static ULONG total_chunk; +static ULONG caller_count; +static ULONG caller_size; +static ULONG caller_chunk; +static time_t hup_time; +static char time_str[256]; + +/*-------------------------------------------------------------------------*/ +static void +message(char *msgstr) +{ + if (dump_file == NULL) + return; + (void) time(&hup_time); + (void) strftime(time_str, sizeof (time_str), "%d-%b-%y %H:%M:%S", + localtime(&hup_time)); + (void) fprintf(dump_file, "%s - %s (%d): %s\n", + time_str, ProgramName, (int) ProgramPID, msgstr); + (void) fflush(dump_file); +} /* message */ + + +/*-------------------------------------------------------------------------*/ +static void +hup_handler(int interrupt) +{ + mem_type *t1; + mem_type *t2; + + if (dump_file == NULL) + return; + if (reentrancy_check > 1) { + message("Memory allocation list is currently unaccessible"); + return; + } + message("malloc/free usage dump:"); + + (void) fprintf(dump_file, + "=================================================\n"); + (void) fprintf(dump_file, + "Caller | Number | Size | Heap |\n"); + (void) fprintf(dump_file, + "------------|-----------|-----------|-----------|\n"); + total_count = 0; + total_size = 0; + total_chunk = 0; + for (t1 = malloc_head; t1; t1 = t1->hdr.next) { + total_count++; + total_size += t1->hdr.used_length; + total_chunk += t1->hdr.chunk_size; + if (t1->hdr.check_mark == HEAD_MARKER) { + t1->hdr.check_mark = USED_MARKER; + continue; + } + caller_count = 1; + caller_size = t1->hdr.used_length; + caller_chunk = t1->hdr.chunk_size; + for (t2 = t1->hdr.next; t2; t2 = t2->hdr.next) { + if (t2->hdr.caller == t1->hdr.caller) { + t2->hdr.check_mark = HEAD_MARKER; + caller_count++; + caller_size += t2->hdr.used_length; + caller_chunk += t2->hdr.chunk_size; + } + } +#ifdef LINT + (void) fprintf(dump_file, "0x%08X: |%10u |%10u |%10u |\n", +#else + (void) fprintf(dump_file, "0x%08lX: |%10lu |%10lu |%10lu |\n", +#endif + (ULONG) t1->hdr.caller, + caller_count, caller_size, caller_chunk); + } + (void) fprintf(dump_file, + "------------|-----------|-----------|-----------|\n"); +#ifdef LINT + (void) fprintf(dump_file, "totals: |%10u |%10u |%10u |\n\n", +#else + (void) fprintf(dump_file, "totals: |%10lu |%10lu |%10lu |\n\n", +#endif + total_count, total_size, total_chunk); + (void) fflush(dump_file); +} /* hup_handler */ + + + +/*-------------------------------------------------------------------------*/ +static void * +allocate_memory(ULONG length, void *caller_addr) +{ + mem_type *temp; + mem_type *new; + mem_type *last; + ULONG req_size; + ULONG incr; + + if (first_time) { + /* install SIGHUP handler to dump usage info */ + first_time = 0; + (void) sprintf(dump_fname, + "memdiag.%s-%d", ProgramName, (int) ProgramPID); + dump_file = fopen(dump_fname, "a"); + + message("malloc/free diagnostics started"); + + (void) sigaction(SIGHUP, NULL, &old_action); + if (old_action.sa_handler == SIG_DFL) { + hup_action.sa_handler = hup_handler; +#ifdef _INCLUDE_HPUX_SOURCE + hup_action.sa_flags = SA_RESETHAND; /* Just gettting it to compile */ +#else + hup_action.sa_flags = SA_RESTART; +#endif + (void) sigaction(SIGHUP, &hup_action, NULL); + message("Installed SIGHUP handler for usage dump"); + } else { + message("Another SIGHUP handler already installed"); + } + } + if (++reentrancy_check > 1) { + message("MALLOC - reentrancy detected"); + *(ULONG *) 1 = 1L; + } + /* round length up to next long word boundary */ + req_size = (length + 3) & ~3; + + /* add in the mem_type overhead */ + req_size += sizeof (mem_type); + + /* check the current list of free space */ + last = NULL; + for (temp = free_head; temp != NULL; temp = temp->hdr.next) { + if (temp->hdr.check_mark != FREE_MARKER) { + message("MALLOC - corrupt free list"); + *(ULONG *) 1 = 1L; + } + if (temp->hdr.chunk_size >= req_size) + break; + last = temp; + } + + /* no free space large enough, lets sbrk some more */ + if (temp == NULL) { + /* round up to the next page boundary */ + incr = (req_size + SBRK_MIN) & ~SBRK_MIN; + temp = (mem_type *) sbrk(incr); + if (temp == NULL) { + message("MALLOC - no memory available"); + *(ULONG *) 1 = 1L; + } + temp->hdr.check_mark = FREE_MARKER; + temp->hdr.chunk_size = incr; + temp->hdr.caller = NULL; + temp->hdr.next = NULL; + } + /* if space is large enough to split */ + if ((temp->hdr.chunk_size - req_size) > SPLIT_MIN) { + new = (mem_type *) ((char *) temp + req_size); + new->hdr.check_mark = FREE_MARKER; + new->hdr.chunk_size = temp->hdr.chunk_size - req_size; + new->hdr.caller = NULL; + new->hdr.next = temp->hdr.next; + temp->hdr.next = new; + temp->hdr.chunk_size = req_size; + } + /* remove block from the free list */ + if (last == NULL) + free_head = temp->hdr.next; + else + last->hdr.next = temp->hdr.next; + + /* add block to the malloc list */ + temp->hdr.next = malloc_head; + malloc_head = temp; + + temp->hdr.caller = caller_addr; + temp->hdr.check_mark = USED_MARKER; + temp->hdr.used_length = length; + temp->data[length] = EOD_MARKER; + + reentrancy_check--; + + return ((void *) temp->data); + +} /* allocate_memory */ + + + +/*-------------------------------------------------------------------------*/ +void * +malloc(ULONG length) +{ + void *caller_addr = (void *) *((ULONG *) & length - 1); + + return (allocate_memory(length, caller_addr)); + +} /* malloc */ + + + +/*-------------------------------------------------------------------------*/ +void +free(void *ptr) +{ + mem_type *cur; + mem_type *temp; + mem_type *last; + + /* Don't try to free null */ + if (ptr == NULL) { + message("FREE - NULL pointer"); + *(ULONG *) 1 = 1L; + } + if (++reentrancy_check > 1) { + message("FREE - reentrancy detected"); + *(ULONG *) 1 = 1L; + } + /* subtract off mem_type header */ + cur = (mem_type *) ((char *) ptr - sizeof (struct mem_hdr)); + + /* check data length integrity */ + if (cur->data[cur->hdr.used_length] != EOD_MARKER) { + message("FREE - end of data corrupted"); + *(ULONG *) 1 = 1L; + } + /* find the current memory in the malloc list */ + last = NULL; + for (temp = malloc_head; temp != NULL; temp = temp->hdr.next) { + if (temp->hdr.check_mark != USED_MARKER) { + message("FREE - corrupt malloc list"); + *(ULONG *) 1 = 1L; + } + if (temp == cur) + break; + last = temp; + } + + if (temp == NULL) { + message("FREE - pointer not found"); + *(ULONG *) 1 = 1L; + } + /* remove block from the malloc list */ + if (last == NULL) + malloc_head = temp->hdr.next; + else + last->hdr.next = temp->hdr.next; + + cur->hdr.check_mark = FREE_MARKER; + + /* add block by insertion sort to the free list */ + last = NULL; + for (temp = free_head; temp != NULL; temp = temp->hdr.next) { + if (temp > cur) + break; + last = temp; + } + cur->hdr.next = temp; + if (last == NULL) + free_head = cur; + else + last->hdr.next = cur; + + /* do garbage collection */ + + /* forward chunk reconciliation */ + if (cur->hdr.next != NULL) { + temp = (mem_type *) ((char *) cur + cur->hdr.chunk_size); + if (temp == cur->hdr.next) { + cur->hdr.next = temp->hdr.next; + cur->hdr.chunk_size += temp->hdr.chunk_size; + temp->hdr.check_mark = 0L; + temp->hdr.next = NULL; + } + } + /* reverse chunk reconciliation */ + if (last != NULL) { + temp = (mem_type *) ((char *) last + last->hdr.chunk_size); + if (temp == cur) { + last->hdr.next = temp->hdr.next; + last->hdr.chunk_size += temp->hdr.chunk_size; + temp->hdr.check_mark = 0L; + temp->hdr.next = NULL; + } + } + reentrancy_check--; + +} /* free */ + + + +/*-------------------------------------------------------------------------*/ +void * +calloc(ULONG nelem, ULONG length) +{ + void *caller_addr = (void *) *((ULONG *) & nelem - 1); + register void *temp; + + length *= nelem; + temp = allocate_memory(length, caller_addr); + (void) memset(temp, 0, length); + return (temp); + +} /* calloc */ + + + +/*-------------------------------------------------------------------------*/ +void * +realloc(void *ptr, ULONG new_length) +{ + void *caller_addr = (void *) *((ULONG *) & ptr - 1); + mem_type *temp; + ULONG alloc_length; + void *new; + + if (new_length == 0) { + if (ptr) + (void) free(ptr); + return (NULL); + } + if (ptr == NULL) + return (allocate_memory(new_length, caller_addr)); + + temp = (mem_type *) ((char *) ptr - sizeof (struct mem_hdr)); + + if (temp->hdr.check_mark != USED_MARKER) { + message("REALLOC - corrupt malloc list"); + *(ULONG *) 1 = 1L; + } + alloc_length = temp->hdr.chunk_size - sizeof (mem_type); + + if (new_length <= alloc_length) { + /* check data length integrity */ + if (temp->data[temp->hdr.used_length] != EOD_MARKER) { + message("FREE - end of data corrupted"); + *(ULONG *) 1 = 1L; + } + /* update the info */ + temp->hdr.used_length = new_length; + temp->data[new_length] = EOD_MARKER; + } else { + /* we need a new chunk */ + new = allocate_memory(new_length, caller_addr); + (void) memcpy(new, ptr, temp->hdr.used_length); + (void) free(ptr); + ptr = new; + } + + return (ptr); + +} /* realloc */ diff --git a/xlock/mode.c b/xlock/mode.c new file mode 100644 index 00000000..64ad9302 --- /dev/null +++ b/xlock/mode.c @@ -0,0 +1,1154 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)mode.c 4.07 97/11/24 xlockmore"; + +#endif +/*- + * mode.c - Modes for xlock. + * + * See xlock.c for copying information. + * + * Revision History: + * 01-Apr-97: Fixed memory leak in XStringListToTextProperty. + * 23-Feb-96: Extensive revision to implement new mode hooks and stuff + * Ron Hitchens + * 04-Sep-95: Moved over from mode.h (previously resource.h) with new + * "&*_opts" by Heath A. Kehoe . + * + */ + +#ifdef USE_MODULES +#include +#include +#include +#include +#endif + +#include "xlock.h" + +/* -------------------------------------------------------------------- */ + +/*- + * Mode options: If count, cycles, or size options are set to 1 ... + * they are probably not used by the mode. + * To remove unwanted modes put a line of "#if 0" and "#endif" + * around the mode and remove mode from the generated "modes/Makefile" + * and/or "modes/glx/Makefile". + */ + +#ifndef USE_MODULES + +LockStruct LockProcs[] = +{ +#ifdef MODE_ant + {"ant", init_ant, draw_ant, release_ant, + refresh_ant, init_ant, NULL, &ant_opts, + 1000, -3, 40000, -12, 64, 1.0, "", + "Shows Langton's and Turk's generalized ants", 0, NULL}, +#endif +#ifdef MODE_atlantis + {"atlantis", init_atlantis, draw_atlantis, release_atlantis, + refresh_atlantis, change_atlantis, NULL, &atlantis_opts, + 1000, 4, 100, 6000, 64, 1.0, "", + "Shows moving sharks/whales/dolphin", 0, NULL}, +#endif +#ifdef MODE_ball + {"ball", init_ball, draw_ball, release_ball, + refresh_ball, init_ball, NULL, &ball_opts, + 10000, 10, 20, -100, 64, 1.0, "", + "Shows bouncing balls", 0, NULL}, +#endif +#ifdef MODE_bat + {"bat", init_bat, draw_bat, release_bat, + refresh_bat, init_bat, NULL, &bat_opts, + 100000, -8, 1, 0, 64, 1.0, "", + "Shows bouncing flying bats", 0, NULL}, +#endif +#ifdef MODE_blot + {"blot", init_blot, draw_blot, release_blot, + refresh_blot, init_blot, NULL, &blot_opts, + 200000, 6, 30, 1, 64, 0.3, "", + "Shows Rorschach's ink blot test", 0, NULL}, +#endif +#ifdef MODE_bouboule + {"bouboule", init_bouboule, draw_bouboule, release_bouboule, + refresh_bouboule, init_bouboule, NULL, &bouboule_opts, + 10000, 100, 1, 15, 64, 1.0, "", + "Shows Mimi's bouboule of moving stars", 0, NULL}, +#endif +#ifdef MODE_bounce + {"bounce", init_bounce, draw_bounce, release_bounce, + refresh_bounce, init_bounce, NULL, &bounce_opts, + 5000, -10, 1, 0, 64, 1.0, "", + "Shows bouncing footballs", 0, NULL}, +#endif +#ifdef MODE_braid + {"braid", init_braid, draw_braid, release_braid, + refresh_braid, init_braid, NULL, &braid_opts, + 1000, 15, 100, -7, 64, 1.0, "", + "Shows random braids and knots", 0, NULL}, +#endif +#ifdef MODE_bubble + {"bubble", init_bubble, draw_bubble, release_bubble, + refresh_bubble, init_bubble, NULL, &bubble_opts, + 100000, 25, 1, 100, 64, 0.6, "", + "Shows popping bubbles", 0, NULL}, +#endif +#ifdef MODE_bubble3d + {"bubble3d", init_bubble3d, draw_bubble3d, release_bubble3d, + draw_bubble3d, change_bubble3d, NULL, &bubble3d_opts, + 1000, 1, 2, 1, 64, 1.0, "", + "Richard Jones's GL bubbles", 0, NULL}, +#endif +#ifdef MODE_bug + {"bug", init_bug, draw_bug, release_bug, + refresh_bug, init_bug, NULL, &bug_opts, + 75000, 10, 32767, -4, 64, 1.0, "", + "Shows Palmiter's bug evolution and garden of Eden", 0, NULL}, +#endif +#ifdef MODE_cage + {"cage", init_cage, draw_cage, release_cage, + draw_cage, change_cage, NULL, &cage_opts, + 1000, 1, 1, 1, 64, 1.0, "", + "Shows the Impossible Cage, an Escher-like GL scene", 0, NULL}, +#endif +#ifdef MODE_cartoon + {"cartoon", init_cartoon, draw_cartoon, release_cartoon, + NULL, init_cartoon, NULL, &cartoon_opts, + 10000, 1, 1, 1, 64, 1.0, "", + "Shows bouncing cartoons", 0, NULL}, +#endif +#ifdef MODE_clock + {"clock", init_clock, draw_clock, release_clock, + refresh_clock, init_clock, NULL, &clock_opts, + 100000, -16, 200, -200, 64, 1.0, "", + "Shows Packard's clock", 0, NULL}, +#endif +#ifdef MODE_coral + {"coral", init_coral, draw_coral, release_coral, + init_coral, init_coral, NULL, &coral_opts, + 60000, -3, 1, 35, 64, 0.6, "", + "Shows a coral reef", 0, NULL}, +#endif +#ifdef MODE_crystal + {"crystal", init_crystal, draw_crystal, release_crystal, + refresh_crystal, init_crystal, NULL, &crystal_opts, + 60000, -500, 200, -15, 64, 1.0, "", + "Shows polygons in 2D plane groups", 0, NULL}, +#endif +#ifdef MODE_daisy + {"daisy", init_daisy, draw_daisy, release_daisy, + refresh_daisy, init_daisy, NULL, &daisy_opts, + 100000, 300, 350, 1, 64, 1.0, "", + "Shows a meadow of daisies", 0, NULL}, +#endif +#ifdef MODE_dclock + {"dclock", init_dclock, draw_dclock, release_dclock, + refresh_dclock, init_dclock, NULL, &dclock_opts, + 10000, 1, 10000, 1, 64, 0.3, "", + "Shows a floating digital clock", 0, NULL}, +#endif +#ifdef MODE_decay + {"decay", init_decay, draw_decay, release_decay, + refresh_decay, init_decay, NULL, &decay_opts, + 200000, 6, 30, 1, 64, 0.3, "", + "Shows a decaying screen", 0, NULL}, +#endif +#ifdef MODE_deco + {"deco", init_deco, draw_deco, release_deco, + init_deco, init_deco, NULL, &deco_opts, + 1000000, -30, 2, -10, 64, 0.6, "", + "Shows art as ugly as sin", 0, NULL}, +#endif +#ifdef MODE_demon + {"demon", init_demon, draw_demon, release_demon, + refresh_demon, init_demon, NULL, &demon_opts, + 50000, 0, 1000, -7, 64, 1.0, "", + "Shows Griffeath's cellular automata", 0, NULL}, +#endif +#ifdef MODE_dilemma + {"dilemma", init_dilemma, draw_dilemma, release_dilemma, + refresh_dilemma, init_dilemma, NULL, &dilemma_opts, + 200000, -2, 1000, 0, 64, 1.0, "", + "Shows Lloyd's Prisoner's Dilemma simulation", 0, NULL}, +#endif +#ifdef MODE_discrete + {"discrete", init_discrete, draw_discrete, release_discrete, + refresh_discrete, init_discrete, NULL, &discrete_opts, + 1000, 4096, 2500, 1, 64, 1.0, "", + "Shows various discrete maps", 0, NULL}, +#endif +#ifdef MODE_drift + {"drift", init_drift, draw_drift, release_drift, + refresh_drift, init_drift, NULL, &drift_opts, + 10000, 30, 1, 1, 64, 1.0, "", + "Shows cosmic drifting flame fractals", 0, NULL}, +#endif +#ifdef MODE_eyes + {"eyes", init_eyes, draw_eyes, release_eyes, + refresh_eyes, init_eyes, NULL, &eyes_opts, + 20000, -8, 5, 1, 64, 1.0, "", + "Shows eyes following a bouncing grelb", 0, NULL}, +#endif +#ifdef MODE_fadeplot + {"fadeplot", init_fadeplot, draw_fadeplot, release_fadeplot, + refresh_fadeplot, init_fadeplot, NULL, &fadeplot_opts, + 30000, 10, 1500, 1, 64, 0.6, "", + "Shows a fading plot of sine squared", 0, NULL}, +#endif +#ifdef MODE_flag + {"flag", init_flag, draw_flag, release_flag, + refresh_flag, init_flag, NULL, &flag_opts, + 50000, 1, 1000, -7, 64, 1.0, "", + "Shows a waving flag of your operating system", 0, NULL}, +#endif +#ifdef MODE_flame + {"flame", init_flame, draw_flame, release_flame, + refresh_flame, init_flame, NULL, &flame_opts, + 750000, 20, 10000, 1, 64, 1.0, "", + "Shows cosmic flame fractals", 0, NULL}, +#endif +#ifdef MODE_flow + {"flow", init_flow, draw_flow, release_flow, + refresh_flow, init_flow, NULL, &flow_opts, + 1000, 1024, 3000, 1, 64, 1.0, "", + "Shows dynamic strange attractors", 0, NULL}, +#endif +#ifdef MODE_forest + {"forest", init_forest, draw_forest, release_forest, + refresh_forest, init_forest, NULL, &forest_opts, + 400000, 100, 200, 1, 64, 1.0, "", + "Shows binary trees of a fractal forest", 0, NULL}, +#endif +#ifdef MODE_galaxy + {"galaxy", init_galaxy, draw_galaxy, release_galaxy, + refresh_galaxy, init_galaxy, NULL, &galaxy_opts, + 100, -5, 250, -3, 64, 1.0, "", + "Shows crashing spiral galaxies", 0, NULL}, +#endif +#ifdef MODE_gears + {"gears", init_gears, draw_gears, release_gears, + draw_gears, init_gears, NULL, &gears_opts, + 1000, 1, 2, 1, 64, 1.0, "", + "Shows GL's gears", 0, NULL}, +#endif +#ifdef MODE_goop + {"goop", init_goop, draw_goop, release_goop, + init_goop, init_goop, NULL, &goop_opts, + 10000, -12, 1, 1, 64, 1.0, "", + "Shows goop from a lava lamp", 0, NULL}, +#endif +#ifdef MODE_grav + {"grav", init_grav, draw_grav, release_grav, + refresh_grav, init_grav, NULL, &grav_opts, + 10000, -12, 1, 1, 64, 1.0, "", + "Shows orbiting planets", 0, NULL}, +#endif +#ifdef MODE_helix + {"helix", init_helix, draw_helix, release_helix, + refresh_helix, init_helix, NULL, &helix_opts, + 25000, 1, 100, 1, 64, 1.0, "", + "Shows string art", 0, NULL}, +#endif +#ifdef MODE_hop + {"hop", init_hop, draw_hop, release_hop, + refresh_hop, init_hop, NULL, &hop_opts, + 10000, 1000, 2500, 1, 64, 1.0, "", + "Shows real plane iterated fractals", 0, NULL}, +#endif +#ifdef MODE_hyper + {"hyper", init_hyper, draw_hyper, release_hyper, + refresh_hyper, change_hyper, NULL, &hyper_opts, + 100000, -6, 300, 1, 64, 1.0, "", + "Shows spinning n-dimensional hypercubes", 0, NULL}, +#endif +#ifdef MODE_ico + {"ico", init_ico, draw_ico, release_ico, + refresh_ico, change_ico, NULL, &ico_opts, + 100000, 0, 400, 0, 64, 1.0, "", + "Shows a bouncing polyhedron", 0, NULL}, +#endif +#ifdef MODE_ifs + {"ifs", init_ifs, draw_ifs, release_ifs, + init_ifs, init_ifs, NULL, &ifs_opts, + 1000, 1, 1, 1, 64, 1.0, "", + "Shows a modified iterated function system", 0, NULL}, +#endif +#ifdef MODE_image + {"image", init_image, draw_image, release_image, + refresh_image, init_image, NULL, &image_opts, + 2000000, -10, 1, 1, 64, 1.0, "", + "Shows randomly appearing logos", 0, NULL}, +#endif +#ifdef MODE_invert + {"invert", init_invert, draw_invert, release_invert, + draw_invert, init_invert, NULL, &invert_opts, + 100, 1, 1, 1, 64, 1.0, "", + "Shows a sphere inverted without wrinkles", 0, NULL}, +#endif +#ifdef MODE_julia + {"julia", init_julia, draw_julia, release_julia, + refresh_julia, init_julia, NULL, &julia_opts, + 10000, 1000, 20, 1, 64, 1.0, "", + "Shows the Julia set", 0, NULL}, +#endif +#ifdef MODE_kaleid + {"kaleid", init_kaleid, draw_kaleid, release_kaleid, + refresh_kaleid, init_kaleid, NULL, &kaleid_opts, + 80000, 4, 40, -9, 64, 0.6, "", + "Shows a kaleidoscope", 0, NULL}, +#endif +#ifdef MODE_kumppa + {"kumppa", init_kumppa, draw_kumppa, release_kumppa, + refresh_kumppa, init_kumppa, NULL, &kumppa_opts, + 10000, 1, 1000, 1, 64, 1.0, "", + "Shows kumppa", 0, NULL}, +#endif +#ifdef MODE_lament + {"lament", init_lament, draw_lament, release_lament, + draw_lament, change_lament, NULL, &lament_opts, + 10000, 1, 1, 1, 64, 1.0, "", + "Shows Lemarchand's Box", 0, NULL}, +#endif +#ifdef MODE_laser + {"laser", init_laser, draw_laser, release_laser, + refresh_laser, init_laser, NULL, &laser_opts, + 20000, -10, 200, 1, 64, 1.0, "", + "Shows spinning lasers", 0, NULL}, +#endif +#ifdef MODE_life + {"life", init_life, draw_life, release_life, + refresh_life, change_life, NULL, &life_opts, + 750000, 40, 140, 0, 64, 1.0, "", + "Shows Conway's game of Life", 0, NULL}, +#endif +#ifdef MODE_life1d + {"life1d", init_life1d, draw_life1d, release_life1d, + refresh_life1d, init_life1d, NULL, &life1d_opts, + 10000, 1, 10, 0, 64, 1.0, "", + "Shows Wolfram's game of 1D Life", 0, NULL}, +#endif +#ifdef MODE_life3d + {"life3d", init_life3d, draw_life3d, release_life3d, + refresh_life3d, change_life3d, NULL, &life3d_opts, + 1000000, 35, 85, 1, 64, 1.0, "", + "Shows Bays' game of 3D Life", 0, NULL}, +#endif +#ifdef MODE_lightning + {"lightning", init_lightning, draw_lightning, release_lightning, + refresh_lightning, init_lightning, NULL, &lightning_opts, + 10000, 1, 1, 1, 64, 0.6, "", + "Shows Keith's fractal lightning bolts", 0, NULL}, +#endif +#ifdef MODE_lisa + {"lisa", init_lisa, draw_lisa, release_lisa, + refresh_lisa, change_lisa, NULL, &lisa_opts, + 25000, 1, 256, -1, 64, 1.0, "", + "Shows animated lisajous loops", 0, NULL}, +#endif +#ifdef MODE_lissie + {"lissie", init_lissie, draw_lissie, release_lissie, + refresh_lissie, init_lissie, NULL, &lissie_opts, + 10000, 1, 2000, -200, 64, 0.6, "", + "Shows lissajous worms", 0, NULL}, +#endif +#ifdef MODE_loop + {"loop", init_loop, draw_loop, release_loop, + refresh_loop, init_loop, NULL, &loop_opts, + 100000, 1, 1600, -12, 64, 1.0, "", + "Shows Langton's self-producing loops", 0, NULL}, +#endif +#ifdef MODE_lyapunov + {"lyapunov", init_lyapunov, draw_lyapunov, release_lyapunov, + NULL, init_lyapunov, NULL, &lyapunov_opts, + 25000, 600, 1, 1, 64, 1.0, "", + "Shows lyapunov space", 0, NULL}, +#endif +#ifdef MODE_mandelbrot + {"mandelbrot", init_mandelbrot, draw_mandelbrot, release_mandelbrot, + NULL, init_mandelbrot, NULL, &mandelbrot_opts, + 25000, -8, 20000, 1, 64, 1.0, "", + "Shows mandelbrot sets", 0, NULL}, +#endif +#ifdef MODE_marquee + {"marquee", init_marquee, draw_marquee, release_marquee, + init_marquee, init_marquee, NULL, &marquee_opts, + 100000, 1, 1, 1, 64, 1.0, "", + "Shows messages", 0, NULL}, +#endif +#ifdef MODE_maze + {"maze", init_maze, draw_maze, release_maze, + refresh_maze, init_maze, NULL, &maze_opts, + 1000, 1, 3000, -40, 64, 1.0, "", + "Shows a random maze and a depth first search solution", 0, NULL}, +#endif +#ifdef MODE_moebius + {"moebius", init_moebius, draw_moebius, release_moebius, + draw_moebius, change_moebius, NULL, &moebius_opts, + 1000, 1, 1, 1, 64, 1.0, "", + "Shows Moebius Strip II, an Escher-like GL scene with ants", 0, NULL}, +#endif +#ifdef MODE_morph3d + {"morph3d", init_morph3d, draw_morph3d, release_morph3d, + draw_morph3d, change_morph3d, NULL, &morph3d_opts, + 1000, 0, 1, 1, 64, 1.0, "", + "Shows GL morphing polyhedra", 0, NULL}, +#endif +#ifdef MODE_mountain + {"mountain", init_mountain, draw_mountain, release_mountain, + refresh_mountain, init_mountain, NULL, &mountain_opts, + 1000, 30, 4000, 1, 64, 1.0, "", + "Shows Papo's mountain range", 0, NULL}, +#endif +#ifdef MODE_munch + {"munch", init_munch, draw_munch, release_munch, + init_munch, init_munch, NULL, &munch_opts, + 5000, 1, 7, 1, 64, 1.0, "", + "Shows munching squares", 0, NULL}, +#endif +#ifdef MODE_nose + {"nose", init_nose, draw_nose, release_nose, + refresh_nose, init_nose, NULL, &nose_opts, + 100000, 1, 1, 1, 64, 1.0, "", + "Shows a man with a big nose runs around spewing out messages", 0, NULL}, +#endif +#ifdef MODE_pacman + {"pacman", init_pacman, draw_pacman, release_pacman, + refresh_pacman, init_pacman, NULL, &pacman_opts, + 100000, 10, 1, 0, 64, 1.0, "", + "Shows Pacman(tm)", 0, NULL}, +#endif +#ifdef MODE_penrose + {"penrose", init_penrose, draw_penrose, release_penrose, + init_penrose, init_penrose, NULL, &penrose_opts, + 10000, 1, 1, -40, 64, 1.0, "", + "Shows Penrose's quasiperiodic tilings", 0, NULL}, +#endif +#ifdef MODE_petal + {"petal", init_petal, draw_petal, release_petal, + refresh_petal, init_petal, NULL, &petal_opts, + 10000, -500, 400, 1, 64, 1.0, "", + "Shows various GCD Flowers", 0, NULL}, +#endif +#ifdef MODE_pipes + {"pipes", init_pipes, draw_pipes, release_pipes, +#if defined( MESA ) && defined( SLOW ) + draw_pipes, +#else + change_pipes, +#endif + change_pipes, NULL, &pipes_opts, + 1000, 2, 5, 500, 64, 1.0, "", + "Shows a selfbuilding pipe system", 0, NULL}, +#endif +#ifdef MODE_puzzle + {"puzzle", init_puzzle, draw_puzzle, release_puzzle, + init_puzzle, init_puzzle, NULL, &puzzle_opts, + 10000, 250, 1, 1, 64, 1.0, "", + "Shows a puzzle being scrambled and then solved", 0, NULL}, +#endif +#ifdef MODE_pyro + {"pyro", init_pyro, draw_pyro, release_pyro, + refresh_pyro, init_pyro, NULL, &pyro_opts, + 15000, 100, 1, -3, 64, 1.0, "", + "Shows fireworks", 0, NULL}, +#endif +#ifdef MODE_qix + {"qix", init_qix, draw_qix, release_qix, + refresh_qix, init_qix, NULL, &qix_opts, + 30000, -5, 32, 1, 64, 1.0, "", + "Shows spinning lines a la Qix(tm)", 0, NULL}, +#endif +#ifdef MODE_roll + {"roll", init_roll, draw_roll, release_roll, + refresh_roll, init_roll, NULL, &roll_opts, + 100000, 25, 1, -64, 64, 0.6, "", + "Shows a rolling ball", 0, NULL}, +#endif +#ifdef MODE_rotor + {"rotor", init_rotor, draw_rotor, release_rotor, + refresh_rotor, init_rotor, NULL, &rotor_opts, + 10000, 4, 20, -6, 64, 0.3, "", + "Shows Tom's Roto-Rooter", 0, NULL}, +#endif +#ifdef MODE_rubik + {"rubik", init_rubik, draw_rubik, release_rubik, + draw_rubik, change_rubik, NULL, &rubik_opts, + 10000, -30, 5, -6, 64, 1.0, "", + "Shows an auto-solving Rubik's Cube", 0, NULL}, +#endif +#ifdef MODE_shape + {"shape", init_shape, draw_shape, release_shape, + refresh_shape, init_shape, NULL, &shape_opts, + 10000, 100, 256, 1, 64, 1.0, "", + "Shows stippled rectangles, ellipses, and triangles", 0, NULL}, +#endif +#ifdef MODE_sierpinski + {"sierpinski", init_sierpinski, draw_sierpinski, release_sierpinski, + refresh_sierpinski, init_sierpinski, NULL, &sierpinski_opts, + 400000, 2000, 100, 1, 64, 1.0, "", + "Shows Sierpinski's triangle", 0, NULL}, +#endif +#ifdef MODE_slip + {"slip", init_slip, draw_slip, release_slip, + init_slip, init_slip, NULL, &slip_opts, + 50000, 35, 50, 1, 64, 1.0, "", + "Shows slipping blits", 0, NULL}, +#endif +#ifdef MODE_sphere + {"sphere", init_sphere, draw_sphere, release_sphere, + refresh_sphere, init_sphere, NULL, &sphere_opts, + 5000, 1, 20, 0, 64, 1.0, "", + "Shows a bunch of shaded spheres", 0, NULL}, +#endif +#ifdef MODE_spiral + {"spiral", init_spiral, draw_spiral, release_spiral, + refresh_spiral, init_spiral, NULL, &spiral_opts, + 5000, -40, 350, 1, 64, 1.0, "", + "Shows a helical locus of points", 0, NULL}, +#endif +#ifdef MODE_spline + {"spline", init_spline, draw_spline, release_spline, + refresh_spline, init_spline, NULL, &spline_opts, + 30000, -6, 2048, 1, 64, 0.3, "", + "Shows colorful moving splines", 0, NULL}, +#endif +#ifdef MODE_sproingies + {"sproingies", init_sproingies, draw_sproingies, release_sproingies, + refresh_sproingies, init_sproingies, NULL, &sproingies_opts, + 1000, 5, 0, 400, 64, 1.0, "", + "Shows Sproingies! Nontoxic. Safe for pets and small children", 0, NULL}, + {"stairs", init_stairs, draw_stairs, release_stairs, + draw_stairs, change_stairs, NULL, &stairs_opts, + 200000, 0, 1, 1, 64, 1.0, "", + "Shows some Infinite Stairs, an Escher-like scene", 0, NULL}, +#endif +#ifdef MODE_star + {"star", init_star, draw_star, release_star, + refresh_star, init_star, NULL, &star_opts, + 75000, 100, 1, 100, 64, 0.3, "", + "Shows a star field with a twist", 0, NULL}, +#endif +#ifdef MODE_starfish + {"starfish", init_starfish, draw_starfish, release_starfish, + refresh_starfish, init_starfish, NULL, &starfish_opts, + 2000, 1, 1000, 1, 64, 1.0, "", + "Shows starfish", 0, NULL}, +#endif +#ifdef MODE_strange + {"strange", init_strange, draw_strange, release_strange, + init_strange, init_strange, NULL, &strange_opts, + 1000, 1, 1, 1, 64, 1.0, "", + "Shows strange attractors", 0, NULL}, +#endif +#ifdef MODE_superquadrics + {"superquadrics", init_superquadrics, draw_superquadrics, release_superquadrics, + refresh_superquadrics, init_superquadrics, NULL, &superquadrics_opts, + 1000, 25, 40, 1, 64, 1.0, "", + "Shows 3D mathematical shapes", 0, NULL}, +#endif +#ifdef MODE_swarm + {"swarm", init_swarm, draw_swarm, release_swarm, + refresh_swarm, init_swarm, NULL, &swarm_opts, + 15000, 100, 1, 1, 64, 1.0, "", + "Shows a swarm of bees following a wasp", 0, NULL}, +#endif +#ifdef MODE_swirl + {"swirl", init_swirl, draw_swirl, release_swirl, + refresh_swirl, init_swirl, NULL, &swirl_opts, + 5000, 5, 1, 1, 64, 1.0, "", + "Shows animated swirling patterns", 0, NULL}, +#endif +#ifdef MODE_tetris + {"tetris", init_tetris, draw_tetris, release_tetris, + init_tetris, init_tetris, NULL, &tetris_opts, + 50000, 1, 1, 0, 64, 1.0, "", + "Shows tetris", 0, NULL}, +#endif +#ifdef MODE_text3d + {"text3d", init_text3d, draw_text3d, release_text3d, + refresh_text3d, change_text3d, NULL, &text3d_opts, + 100000, 1, 1, 1, 64, 1.0, "", + "Shows 3D texts", 0, NULL}, +#endif +#ifdef MODE_thornbird + {"thornbird", init_thornbird, draw_thornbird, release_thornbird, + refresh_thornbird, NULL, NULL, þbird_opts, + 1000, 800, 16, 1, 64, 1.0, "", + "Shows an animated bird in a thorn bush fractal map", 0, NULL}, +#endif +#ifdef MODE_triangle + {"triangle", init_triangle, draw_triangle, release_triangle, + refresh_triangle, init_triangle, NULL, &triangle_opts, + 10000, 1, 1, 1, 64, 1.0, "", + "Shows a triangle mountain range", 0, NULL}, +#endif +#ifdef MODE_tube + {"tube", init_tube, draw_tube, release_tube, + NULL, init_tube, NULL, &tube_opts, + 25000, -9, 20000, -200, 64, 1.0, "", + "Shows an animated tube", 0, NULL}, +#endif +#ifdef MODE_turtle + {"turtle", init_turtle, draw_turtle, release_turtle, + init_turtle, init_turtle, NULL, &turtle_opts, + 1000000, 1, 20, 1, 64, 1.0, "", + "Shows turtle fractals", 0, NULL}, +#endif +#ifdef MODE_vines + {"vines", init_vines, draw_vines, release_vines, + refresh_vines, init_vines, NULL, &vines_opts, + 200000, 0, 1, 1, 64, 1.0, "", + "Shows fractals", 0, NULL}, +#endif +#ifdef MODE_voters + {"voters", init_voters, draw_voters, release_voters, + refresh_voters, init_voters, NULL, &voters_opts, + 1000, 0, 327670, 0, 64, 1.0, "", + "Shows Dewdney's Voters", 0, NULL}, +#endif +#ifdef MODE_wator + {"wator", init_wator, draw_wator, release_wator, + refresh_wator, init_wator, NULL, &wator_opts, + 750000, 1, 32767, 0, 64, 1.0, "", + "Shows Dewdney's Water-Torus planet of fish and sharks", 0, NULL}, +#endif +#ifdef MODE_wire + {"wire", init_wire, draw_wire, release_wire, + refresh_wire, init_wire, NULL, &wire_opts, + 500000, 1000, 150, -8, 64, 1.0, "", + "Shows a random circuit with 2 electrons", 0, NULL}, +#endif +#ifdef MODE_world + {"world", init_world, draw_world, release_world, + refresh_world, init_world, NULL, &world_opts, + 100000, -16, 1, 1, 64, 0.3, "", + "Shows spinning Earths", 0, NULL}, +#endif +#ifdef MODE_worm + {"worm", init_worm, draw_worm, release_worm, + refresh_worm, init_worm, NULL, &worm_opts, + 17000, -20, 10, -3, 64, 1.0, "", + "Shows wiggly worms", 0, NULL}, +#endif +#ifdef MODE_xjack + {"xjack", init_xjack, draw_xjack, release_xjack, + init_xjack, init_xjack, NULL, &xjack_opts, + 50000, 1, 1, 1, 64, 1.0, "", + "Shows Jack having one of those days", 0, NULL}, +#endif + +/* SPECIAL MODES */ + {"blank", init_blank, draw_blank, release_blank, + refresh_blank, init_blank, NULL, &blank_opts, + 3000000, 1, 1, 1, 64, 1.0, "", + "Shows nothing but a black screen", 0, NULL}, +#ifdef MODE_bomb + {"bomb", init_bomb, draw_bomb, release_bomb, + refresh_bomb, change_bomb, NULL, &bomb_opts, + 100000, 10, 20, 1, 64, 1.0, "", + "Shows a bomb and will autologout after a time", 0, NULL}, + {"random", init_random, draw_random, release_random, + refresh_random, change_random, NULL, &random_opts, + 1, 1, 1, 1, 64, 1.0, "", + "Shows a random mode (except blank and bomb)", 0, NULL}, +#else + {"random", init_random, draw_random, release_random, + refresh_random, change_random, NULL, &random_opts, + 1, 1, 1, 1, 64, 1.0, "", + "Shows a random mode (except blank)", 0, NULL}, +#endif +}; + +int numprocs = sizeof (LockProcs) / sizeof (LockProcs[0]); + +#else /* #ifndef USE_MODULES */ + +LockStruct *LockProcs = NULL; +void **LoadedModules = NULL; /* save module handles to unload them later */ +int numprocs = 0; + +/*- + * I use a stack to save information about each module until they're + * all loaded because I can not allocate LockProcs until I know how many + * modules there are. + */ +typedef struct stack { + struct stack *next; + LockStruct *lock; + void *mod; /* pointer to module */ +} stack; + +/*- + * compare function to use with qsort, to sort the list of modules + * after loading them. + */ +static int +lock_compare(const void *a, const void *b) +{ + const LockStruct *A = *((LockStruct **) a), *B = *((LockStruct **) b); + + return strcmp(A->cmdline_arg, B->cmdline_arg); +} + +/*- + * Does tilde expansion on path, and expands any occurrence of %S to + * the default modulepath. Returns a pointer to a static string + * containing the expanded path. This will be overwritten by + * subsequent calls to ExpandPath. + */ +static char * +ExpandPath(char *path) +{ + static char expandedpath[1024]; + char *ep = expandedpath; + + if (path[0] == '~') { /* find homedir */ + int i = 0; + char user[128], *homedir; + struct passwd *pw = NULL; + + path++; + while (*path && *path != '/') + user[i++] = *path++; + user[i] = '\0'; + + if (user[0] == '\0') { /* get this user's homedir */ + homedir = getenv("HOME"); + if (!homedir) { /* try password entry */ + pw = getpwuid(getuid()); + if (!pw) { + char *login = getlogin(); + + if (login) + pw = getpwnam(login); + } + if (pw) + homedir = pw->pw_dir; + else + return NULL; /* can't expand name */ + } + } else { /* refers to another user's home dir */ + pw = getpwnam(user); + if (pw) + homedir = pw->pw_dir; + else + return NULL; + } + (void) strcpy(ep, homedir); + ep += strlen(homedir); + } /* if (path[0] .. */ + while (*path) { + switch (*path) { + case '%': + path++; + switch (*path) { + case 'S': + *ep = '\0'; + (void) strcat(ep, DEF_MODULEPATH); + ep += strlen(DEF_MODULEPATH); + break; + case '%': + *ep++ = *path++; + break; + default: + path++; + break; + } + + default: + *ep++ = *path++; + break; + } + } + + *ep = '\0'; + return expandedpath; +} + +/*- + * Loads screensaver modules in the directories in path. path is a + * colon separated list of direcories to search in. LoadModules + * searches for files ending in .xlk to load as modules. + */ + +#define nextone (void) fprintf(stderr, "LoadModule: %s: %s\n", cpath, dlerror()); \ +(void) dlclose(mp); \ +(void) free((void *) new->lock); \ +(void) free((void *) new); \ +continue + +void +LoadModules(char *path) +{ + DIR *dp; + struct stat st; + struct dirent *ent; + char cpath[128], *p, *thisp; + stack *new, *head = NULL; + int count = 0; + + p = (char *) malloc(strlen(path) + 1); + (void) strcpy(p, path); + for (thisp = strtok(p, ": \t"); thisp != NULL; thisp = strtok(NULL, ": \t")) { + char *ep; + + ep = ExpandPath(thisp); + if (ep == NULL) { + (void) fprintf(stderr, "%s: LoadModules: Can't expand path - '%s'\n", + ProgramName, thisp); + continue; + } else + thisp = ep; + + dp = opendir(thisp); + if (dp == NULL) { + (void) fprintf(stderr, "%s: LoadModules: %s: %s\n", ProgramName, + thisp, strerror(errno)); + continue; + } + while ((ent = readdir(dp)) != NULL) { + int len; + void *mp; + + if ((len = strlen(ent->d_name)) > 4) { + char *suf = &ent->d_name[len - 4]; /* check suffix */ + + if (strcmp(suf, ".xlk") != 0) + continue; + } else + continue; + + (void) sprintf(cpath, "%s%s%s", thisp, + (thisp[strlen(thisp) - 1] == '/') ? "" : "/", + ent->d_name); + if (stat(cpath, &st) != 0) { + (void) fprintf(stderr, "%s: LoadModules: %s: %s\n", ProgramName, + cpath, strerror(errno)); + continue; + } + if (!S_ISREG(st.st_mode)) /* make sure it's not a directory */ + continue; + + mp = dlopen(cpath, RTLD_NOW); /* load module */ + if (mp == NULL) { + (void) fprintf(stderr, "%s: LoadModule: %s: %s\n", ProgramName, + cpath, dlerror()); + continue; + } else { + char descsym[32]; + ModStruct *desc; + + /* + * The name of the description structure is formed by concatenating + * the name of the module minus the .xlt suffix, and the string + * "_description". + */ + (void) sprintf(descsym, "%.*s_description", len - 4, ent->d_name); + desc = dlsym(mp, descsym); + if (desc == NULL) { + (void) fprintf(stderr, "LoadModule: %s: %s\n", descsym, dlerror()); + (void) dlclose(mp); + continue; + } + /* save information about module on stack. */ + new = (stack *) malloc(sizeof (stack)); + new->mod = mp; + new->lock = (LockStruct *) malloc(sizeof (LockStruct)); + new->lock->cmdline_arg = desc->cmdline_arg; + + new->lock->init_hook = (ModeHook *) dlsym(mp, (char *) desc->init_name); + if (new->lock->init_hook == NULL) { + nextone; + } + new->lock->callback_hook = (ModeHook *) dlsym(mp, desc->callback_name); + if (new->lock->callback_hook == NULL) { + nextone; + } + new->lock->release_hook = (ModeHook *) dlsym(mp, desc->release_name); + if (new->lock->release_hook == NULL) { + nextone; + } + new->lock->refresh_hook = (ModeHook *) dlsym(mp, desc->refresh_name); + if (new->lock->refresh_hook == NULL) { + nextone; + } + new->lock->change_hook = (ModeHook *) dlsym(mp, desc->change_name); + if (new->lock->change_hook == NULL) { + nextone; + } + new->lock->unused_hook = (ModeHook *) dlsym(mp, desc->unused_name); + if (new->lock->unused_hook == NULL) { + nextone; + } + new->lock->msopt = desc->msopt; + new->lock->def_delay = desc->def_delay; + new->lock->def_count = desc->def_count; + new->lock->def_cycles = desc->def_cycles; + new->lock->def_size = desc->def_size; + new->lock->def_ncolors = desc->def_ncolors; + new->lock->def_saturation = desc->def_saturation; + new->lock->def_bitmap = desc->def_bitmap; + new->lock->desc = desc->desc; + new->lock->flags = desc->flags; + new->lock->userdata = desc->userdata; + + new->next = head; + head = new; + count++; + } /* if (mp == NULL) .. else */ + } /* while ((ent = ...) */ + + (void) closedir(dp); + } /* for (thisp = ... */ + (void) free((void *) p); + + if (count > 0) { + int i; + stack *discard; + LockStruct **locks; + + LoadedModules = malloc(count * sizeof (void *)); + + LockProcs = (LockStruct *) malloc(count * sizeof (LockStruct)); + locks = (LockStruct **) malloc(count * sizeof (LockStruct *)); + + /* Copy module info from stack to locks array temporarily to + * sort them. Then copy them to LockProcs. Also save module + * handles in LoadedModules, to be used by UnloadModules() + * later. + */ + for (i = 0; i < count; i++) { + LoadedModules[i] = head->mod; + locks[i] = head->lock; + discard = head; + head = head->next; + (void) free((void *) discard); + } + (void) qsort((void *) locks, count, sizeof (LockStruct *), lock_compare); + for (i = 0; i < count; i++) { + (void) memcpy(&LockProcs[i], locks[i], sizeof (LockStruct)); + (void) free((void *) locks[i]); + } + (void) free((void *) locks); + } + numprocs = count; +} + +void +UnloadModules() +{ + int i; + + if (LoadedModules != NULL) { + for (i = 0; i < numprocs; i++) + (void) dlclose(LoadedModules[i]); + + (void) free((void *) LoadedModules); + } + if (LockProcs != NULL) + (void) free((void *) LockProcs); +} + +#endif /* #ifndef USE_MODULES ... #else */ + +/* -------------------------------------------------------------------- */ + +static LockStruct *last_initted_mode = NULL; +static LockStruct *default_mode = NULL; + +/* -------------------------------------------------------------------- */ + +void +set_default_mode(LockStruct * ls) +{ + default_mode = ls; +} + +/* -------------------------------------------------------------------- */ + +static void +set_window_title(ModeInfo * mi) +{ + XTextProperty prop; + char buf[512]; + char *ptr = buf; + unsigned int status; + extern Bool description; + + (void) sprintf(buf, "%s: %s", MI_NAME(mi), MI_DESC(mi)); + status = XStringListToTextProperty(&ptr, 1, &prop); + if (status != 0) { + XSetWMName(MI_DISPLAY(mi), MI_WINDOW(mi), &prop); + XFree((caddr_t) prop.value); + } + if (MI_IS_ICONIC(mi) && description) { + modeDescription(mi); + } +} + +/* -------------------------------------------------------------------- */ + +/*- + * This hook is called prior to calling the init hook of a + * different mode. It is to inform the mode that it is losing + * control, and should therefore release any dynamically created + * resources. + */ + +void +call_release_hook(LockStruct * ls, ModeInfo * mi) +{ + if (ls == NULL) { + return; + } + MI_LOCKSTRUCT(mi) = ls; + if (ls->release_hook != NULL) { + ls->release_hook(mi); + } + ls->flags &= ~(LS_FLAG_INITED); + + last_initted_mode = NULL; +} + +void +release_last_mode(ModeInfo * mi) +{ + if (last_initted_mode == NULL) { + return; + } + call_release_hook(last_initted_mode, mi); + + last_initted_mode = NULL; +} + +/* -------------------------------------------------------------------- */ + +/*- + * Call the init hook for a mode. If this mode is not the same + * as the last one, call the release proc for the previous mode + * so that it will surrender its dynamic resources. + * A mode's init hook may be called multiple times, without + * intervening release calls. + */ + +void +call_init_hook(LockStruct * ls, ModeInfo * mi) +{ + if (ls == NULL) { + if (default_mode == NULL) { + return; + } else { + ls = default_mode; + } + } + if (ls != last_initted_mode) { + call_release_hook(last_initted_mode, mi); + } + MI_LOCKSTRUCT(mi) = ls; + set_window_title(mi); + + ls->init_hook(mi); + + ls->flags |= LS_FLAG_INITED; + MI_SET_FLAG_STATE(mi, WI_FLAG_JUST_INITTED, True); + + last_initted_mode = ls; +} + +/* -------------------------------------------------------------------- */ + +/*- + * Call the callback hook for a mode. This hook is called repeatedly, + * at (approximately) constant time intervals. The time between calls + * is controlled by the -delay command line option, which is mapped + * to the variable named delay. + */ + +void +call_callback_hook(LockStruct * ls, ModeInfo * mi) +{ + if (ls == NULL) { + if (default_mode == NULL) { + return; + } else { + ls = default_mode; + } + } + MI_LOCKSTRUCT(mi) = ls; + + ls->callback_hook(mi); + + MI_SET_FLAG_STATE(mi, WI_FLAG_JUST_INITTED, False); +} + +/* -------------------------------------------------------------------- */ + +/*- + * Window damage has occurred. If the mode has been initted and + * supplied a refresh proc, call that. Otherwise call its init + * hook again. + */ + +#define JUST_INITTED(mi) (MI_FLAG_IS_SET(mi, WI_FLAG_JUST_INITTED)) + +void +call_refresh_hook(LockStruct * ls, ModeInfo * mi) +{ + if (ls == NULL) { + if (default_mode == NULL) { + return; + } else { + ls = default_mode; + } + } + MI_LOCKSTRUCT(mi) = ls; + + if (ls->refresh_hook == NULL) { + /* + * No refresh hook supplied. If the mode has been + * initialized, and the callback has been called at least + * once, then call the init hook to do the refresh. + * Note that two flags are examined here. The first + * indicates if the mode has ever had its init hook called, + * the second is a per-screen flag which indicates + * if the draw (callback) hook has been called since the + * init hook was called for that screen. + * This second test is a hack. A mode should gracefully + * deal with its init hook being called twice in a row. + * Once all the modes have been updated, this hack should + * be removed. + */ + if (MODE_NOT_INITED(ls) || JUST_INITTED(mi)) { + return; + } + call_init_hook(ls, mi); + } else { + ls->refresh_hook(mi); + } +} + +/* -------------------------------------------------------------------- */ + +/*- + * The user has requested a change, by pressing the middle mouse + * button. Let the mode know about it. + */ + +void +call_change_hook(LockStruct * ls, ModeInfo * mi) +{ + if (ls == NULL) { + if (default_mode == NULL) { + return; + } else { + ls = default_mode; + } + } + MI_LOCKSTRUCT(mi) = ls; + + if (ls->change_hook != NULL) { + ls->change_hook(mi); + } +} + +/* -------------------------------------------------------------------- */ diff --git a/xlock/mode.h b/xlock/mode.h new file mode 100644 index 00000000..08b043ad --- /dev/null +++ b/xlock/mode.h @@ -0,0 +1,1453 @@ +#ifndef __XLOCK_MODE_H__ +#define __XLOCK_MODE_H__ + +/*- + * @(#)mode.h 4.13 99/02/14 xlockmore + * + * mode.h - mode management for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * xscreensaver code, Copyright (c) 1997 Jamie Zawinski + * + * 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 maintained by David Bagley + * 18-Mar-96: Ron Hitchens + * Extensive revision to define new data types for + * the new mode calling scheme. + * 02-Jun-95: Extracted out of resource.c. + * + */ + +/*- + * Declare external interface routines for supported screen savers. + */ + +/* -------------------------------------------------------------------- */ + +#ifdef STANDALONE + +/* xscreensaver compatibility layer for xlockmore modules. */ + +/*- + * xscreensaver, Copyright (c) 1997, 1998 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...) + */ + +/*- + * 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_NPIXELS(MI) ((MI)->npixels) +#define MI_PIXEL(MI,N) ((MI)->pixels[(N)]) +#define MI_VISUAL(MI) ((MI)->xgwa.visual) +#define MI_GC(MI) ((MI)->gc) +#define MI_PAUSE(MI) ((MI)->pause) +#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)->count) +#define MI_SIZE(MI) ((MI)->size) +#define MI_BITMAP(MI) ((MI)->bitmap) +#define MI_WHITE_PIXEL(MI) ((MI)->white) +#define MI_BLACK_PIXEL(MI) ((MI)->black) +#define MI_WIDTH(MI) ((MI)->xgwa.width) +#define MI_HEIGHT(MI) ((MI)->xgwa.height) +#define MI_DEPTH(MI) ((MI)->xgwa.depth) +#define MI_COLORMAP(MI) ((MI)->xgwa.colormap) +#define MI_IS_FULLRANDOM(MI)((MI)->fullrandom) +#define MI_IS_DEBUG(MI) ((MI)->verbose) +#define MI_IS_VERBOSE(MI) ((MI)->verbose) +#define MI_IS_INSTALL(MI) (True) +#define MI_IS_MONO(MI) (mono_p) +#define MI_IS_INROOT(MI) ((MI)->root_p) +#define MI_IS_INWINDOW(MI) (!(MI)->root_p) +#define MI_IS_ICONIC(MI) (False) +#define MI_IS_WIREFRAME(MI) ((MI)->wireframe_p) +#define MI_IS_MOUSE(MI) ((MI)->mouse) +#define MI_IS_USE3D(MI) ((MI)->threed) +#define MI_COUNT(MI) ((MI)->count) +#define MI_NCOLORS(MI) ((MI)->ncolors) +#define MI_IS_DRAWN(MI)((MI)->is_drawn) + + +#define MI_CLEARWINDOWCOLORMAP(mi, gc, pixel) \ +{ \ + XSetForeground(MI_DISPLAY(mi), gc, pixel); \ + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, \ + 0, 0, (unsigned int) MI_WIDTH(mi), (unsigned int) MI_HEIGHT(mi)); \ +} +#define MI_CLEARWINDOWCOLOR(mi, pixel) \ + MI_CLEARWINDOWCOLORMAP(mi, MI_GC(mi), pixel) + +/* #define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)) */ +#define MI_CLEARWINDOW(mi) MI_CLEARWINDOWCOLOR(mi, MI_BLACK_PIXEL(mi)) + +#include "screenhack.h" + +#ifdef __cplusplus + extern "C" { +#endif +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; + Bool verbose; + int count; + int cycles; + int size; + int ncolors; + Bool threed; + long threed_left_color; + long threed_right_color; + long threed_both_color; + long threed_none_color; + long threed_delta; + Bool wireframe_p; + Bool mouse; + char *bitmap; + Bool is_drawn; +} 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 +#ifdef __cplusplus + } +#endif + +#else /* STANDALONE */ +#ifdef __cplusplus + extern "C" { +#endif +struct LockStruct_s; +struct ModeInfo_s; + +typedef void (ModeHook) (struct ModeInfo_s *); +typedef void (HookProc) (struct LockStruct_s *, struct ModeInfo_s *); + +typedef struct LockStruct_s { + char *cmdline_arg; /* mode name */ + ModeHook *init_hook; /* func to init a mode */ + ModeHook *callback_hook; /* func to run (tick) a mode */ + ModeHook *release_hook; /* func to shutdown a mode */ + ModeHook *refresh_hook; /* tells mode to repaint */ + ModeHook *change_hook; /* user wants mode to change */ + ModeHook *unused_hook; /* for future expansion */ + ModeSpecOpt *msopt; /* this mode's def resources */ + int def_delay; /* default delay for mode */ + int def_count; + int def_cycles; + int def_size; + int def_ncolors; + float def_saturation; + char *def_bitmap; + char *desc; /* text description of mode */ + unsigned int flags; /* state flags for this mode */ + void *userdata; /* for use by the mode */ +} LockStruct; + +#define LS_FLAG_INITED 1 + +typedef struct { + Pixmap pixmap; +#ifdef ORIGINAL_XPM_PATCH + /* Not recommended */ + Pixmap bitmap; +#else + int width, height, graphics_format; +#endif +} mailboxInfo; + +typedef struct { + mailboxInfo mail; + mailboxInfo nomail; + GC mbgc; +} mboxInfo; + +typedef struct { + Visual *visual; + int visualclass; /* visual class name of current window */ + unsigned int depth; + unsigned long red_mask, green_mask, blue_mask; /* masks of current window */ + int colormap_size; /* colormap of current window */ + Colormap colormap; /* current colormap */ + Window window; /* window used to cover screen */ + Window icon; /* window used during password typein */ + Window root; /* convenience pointer to the root window */ +#ifdef USE_BUTTON_LOGOUT + Window button; +#endif + GC gc; /* graphics context for animation */ + GC textgc; /* graphics context used for text rendering */ + GC plantextgc; /* graphics context for plan message rendering */ + XPoint iconpos; /* location of top left edge of icon */ + XPoint planpos; /* location of top left edge of message */ + int npixels; /* number of valid entries in pixels */ + unsigned long *pixels; /* pixel values in the colormap */ + unsigned long black_pixel, white_pixel; /* black and white pixel values */ + unsigned long bg_pixel, fg_pixel; /* background and foreground pixel values */ + unsigned long right_pixel, left_pixel; /* 3D color pixel values */ + unsigned long none_pixel, both_pixel; + XWindowChanges fullsizeconfigure; + mboxInfo mb; +#ifdef USE_UNSTABLE + Pixmap root_pixmap; +#endif +} ScreenInfo; + +typedef struct { + Display *display; /* handle to X display */ + Screen *screenptr; /* ptr to screen info */ + int screen; /* number of current screen */ + int real_screen; /* for debugging */ + int num_screens; /* number screens locked */ + int max_screens; /* max # active screens */ + Window window; /* handle to current window */ + int width; /* width of current window */ + int height; /* height of current window */ + unsigned int flags; /* xlock window flags */ + float delta3d; + Bool is_drawn; /*Indicates that enough is drawn for special * + * erase */ +} WindowInfo; +#ifdef __cplusplus + } +#endif + +#define WI_FLAG_INFO_INITTED 0x001 /* private state flag */ +#define WI_FLAG_ICONIC 0x002 +#define WI_FLAG_MONO 0x004 +#define WI_FLAG_INWINDOW 0x008 +#define WI_FLAG_INROOT 0x010 +#define WI_FLAG_NOLOCK 0x020 +#define WI_FLAG_INSTALL 0x040 +#define WI_FLAG_DEBUG 0x080 +#define WI_FLAG_USE3D 0x100 +#define WI_FLAG_VERBOSE 0x200 +#define WI_FLAG_FULLRANDOM 0x400 +#define WI_FLAG_WIREFRAME 0x800 +#define WI_FLAG_MOUSE 0x1000 +#define WI_FLAG_JUST_INITTED 0x2000 /* private state flag */ + +#ifdef __cplusplus + extern "C" { +#endif +typedef struct { + long pause; /* output, set by mode */ + long delay; /* inputs, current settings */ + int count; + int cycles; + int size; + int ncolors; + float saturation; + char *bitmap; +} RunInfo; + +typedef struct ModeInfo_s { + WindowInfo windowinfo; + ScreenInfo *screeninfo; + RunInfo runinfo; + struct LockStruct_s *lockstruct; +} ModeInfo; +#ifdef __cplusplus + } +#endif + +/* -------------------------------------------------------------------- */ + +/*- + * These are the public interfaces that a mode should use to obtain + * information about the display and other environmental parameters. + * Everything hangs off a ModeInfo pointer. A mode should NOT cache + * a ModeInfo pointer, the struct it points to is volatile. The mode + * can safely make a copy of the data it points to, however. But it + * is recommended the mode make use of the passed-in pointer and pass + * it along to functions it calls. + * Use these macros, don't look at the fields directly. The insides + * of the ModeInfo struct are certain to change in the future. + */ + +#define MODE_IS_INITED(ls) ((ls)->flags & LS_FLAG_INITED) +#define MODE_NOT_INITED(ls) ( ! MODE_IS_INITED(ls)) + +#define MI_DISPLAY(mi) ((mi)->windowinfo.display) +#define MI_SCREEN(mi) ((mi)->windowinfo.screen) +#define MI_SCREENPTR(mi) ((mi)->windowinfo.screenptr) +#define MI_REAL_SCREEN(mi) ((mi)->windowinfo.real_screen) +#define MI_NUM_SCREENS(mi) ((mi)->windowinfo.num_screens) +#define MI_MAX_SCREENS(mi) ((mi)->windowinfo.max_screens) +#define MI_WINDOW(mi) ((mi)->windowinfo.window) +#define MI_WIDTH(mi) ((mi)->windowinfo.width) +#define MI_HEIGHT(mi) ((mi)->windowinfo.height) +#define MI_DELTA3D(mi) ((mi)->windowinfo.delta3d) +#define MI_FLAGS(mi) ((mi)->windowinfo.flags) +#define MI_IS_DRAWN(mi) ((mi)->windowinfo.is_drawn) +#define MI_SET_FLAG_STATE(mi,f,bool) ((mi)->windowinfo.flags = \ + (bool) ? (mi)->windowinfo.flags | f \ + : (mi)->windowinfo.flags & ~(f)) +#define MI_FLAG_IS_SET(mi,f) ((mi)->windowinfo.flags & f) +#define MI_FLAG_NOT_SET(mi,f) ( ! MI_FLAG_IS_SET(mi,f)) +#define MI_IS_ICONIC(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_ICONIC)) +#define MI_IS_MONO(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_MONO)) +#define MI_IS_INWINDOW(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_INWINDOW)) +#define MI_IS_INROOT(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_INROOT)) +#define MI_IS_NOLOCK(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_NOLOCK)) +#define MI_IS_INSTALL(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_INSTALL)) +#define MI_IS_DEBUG(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_DEBUG)) +#define MI_IS_USE3D(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_USE3D)) +#define MI_IS_VERBOSE(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_VERBOSE)) +#define MI_IS_FULLRANDOM(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_FULLRANDOM)) +#define MI_IS_WIREFRAME(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_WIREFRAME)) +#define MI_IS_MOUSE(mi) (MI_FLAG_IS_SET (mi, WI_FLAG_MOUSE)) + +#define MI_SCREENINFO(mi) ((mi)->screeninfo) +#define MI_DEPTH(mi) ((mi)->screeninfo->depth) +#define MI_VISUAL(mi) ((mi)->screeninfo->visual) +#define MI_VISUALCLASS(mi) ((mi)->screeninfo->visualclass) +#define MI_COLORMAP_SIZE(mi) ((mi)->screeninfo->colormap_size) +#define MI_RED_MASK(mi) ((mi)->screeninfo->red_mask) +#define MI_GREEN_MASK(mi) ((mi)->screeninfo->green_mask) +#define MI_BLUE_MASK(mi) ((mi)->screeninfo->blue_mask) +#define MI_COLORMAP(mi) ((mi)->screeninfo->colormap) +#define MI_GC(mi) ((mi)->screeninfo->gc) +#define MI_NPIXELS(mi) ((mi)->screeninfo->npixels) +#define MI_PIXELS(mi) ((mi)->screeninfo->pixels) +#define MI_PIXEL(mi,n) ((mi)->screeninfo->pixels[n]) +#define MI_BLACK_PIXEL(mi) ((mi)->screeninfo->black_pixel) +#define MI_WHITE_PIXEL(mi) ((mi)->screeninfo->white_pixel) +#define MI_BG_PIXEL(mi) ((mi)->screeninfo->bg_pixel) +#define MI_FG_PIXEL(mi) ((mi)->screeninfo->fg_pixel) +#define MI_NONE_COLOR(mi) ((mi)->screeninfo->none_pixel) /* -install */ +#define MI_RIGHT_COLOR(mi) ((mi)->screeninfo->right_pixel) +#define MI_LEFT_COLOR(mi) ((mi)->screeninfo->left_pixel) +#ifdef USE_UNSTABLE +#define MI_ROOT_PIXMAP(mi) ((mi)->screeninfo->root_pixmap) +#endif + +#define MI_DELAY(mi) ((mi)->runinfo.delay) +#define MI_COUNT(mi) ((mi)->runinfo.count) +#define MI_CYCLES(mi) ((mi)->runinfo.cycles) +#define MI_SIZE(mi) ((mi)->runinfo.size) +#define MI_NCOLORS(mi) ((mi)->runinfo.ncolors) +#define MI_SATURATION(mi) ((mi)->runinfo.saturation) +#define MI_BITMAP(mi) ((mi)->runinfo.bitmap) + +#define MI_LOCKSTRUCT(mi) ((mi)->lockstruct) +#define MI_DEFDELAY(mi) ((mi)->lockstruct->def_delay) +#define MI_DEFCOUNT(mi) ((mi)->lockstruct->def_count) +#define MI_DEFCYCLES(mi) ((mi)->lockstruct->def_cycles) +#define MI_DEFSIZE(mi) ((mi)->lockstruct->def_size) +#define MI_DEFNCOLORS(mi) ((mi)->lockstruct->def_ncolors) +#define MI_DEFSATURATION(mi) ((mi)->lockstruct->def_saturation) +#define MI_DEFBITMAP(mi) ((mi)->lockstruct->def_bitmap) + +#define MI_NAME(mi) ((mi)->lockstruct->cmdline_arg) +#define MI_DESC(mi) ((mi)->lockstruct->desc) +#define MI_USERDATA(mi) ((mi)->lockstruct->userdata) + +#ifdef SOLARIS2 +/*- + * It was acting weird with the first rectangle drawn + * on a Ultra2 with TrueColor Solaris2.x in deco mode. + * Not sure if other modes are affected... now handled in deco mode. + * If it does happen it is probably not as noticable to worry about. + */ +#endif + +#ifdef __cplusplus + extern "C" { +#endif +extern void modeDescription(ModeInfo * mi); +extern void erase_full_window(ModeInfo * mi, GC erase_gc, unsigned long pixel); +#ifdef __cplusplus + } +#endif + +#if 0 +#define MI_CLEARWINDOWCOLORMAP(mi, gc, pixel) \ +{ \ + XSetForeground(MI_DISPLAY(mi), gc, pixel); \ + if ((MI_WIDTH(mi) >= 2) || (MI_HEIGHT(mi) >= 2)) { \ + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, 1, 1, \ + (unsigned int) MI_WIDTH(mi) - 2, (unsigned int) MI_HEIGHT(mi) - 2); \ + XDrawRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, 0, 0, \ + (unsigned int) MI_WIDTH(mi) - 1, (unsigned int) MI_HEIGHT(mi) - 1); \ + } else \ + XFillRectangle(MI_DISPLAY(mi), MI_WINDOW(mi), gc, 0, 0, \ + (unsigned int) MI_WIDTH(mi), (unsigned int) MI_HEIGHT(mi)); \ +} +#else +#define MI_CLEARWINDOWCOLORMAP(mi, gc, pixel) \ +{ \ + erase_full_window( mi , gc , pixel ); \ +} +#endif +#define MI_CLEARWINDOWCOLOR(mi, pixel) \ + MI_CLEARWINDOWCOLORMAP(mi, MI_GC(mi), pixel) +#if 1 +/*- + * XClearWindow with GL or MONO does not always work. + */ +#define MI_CLEARWINDOW(mi) MI_CLEARWINDOWCOLOR(mi, MI_BLACK_PIXEL(mi)) +#else +#define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)) +#endif + +/* -------------------------------------------------------------------- */ + +#ifdef __cplusplus + extern "C" { +#endif +extern HookProc call_init_hook; +extern HookProc call_callback_hook; +extern HookProc call_release_hook; +extern HookProc call_refresh_hook; +extern HookProc call_change_hook; + +extern void set_default_mode(LockStruct *); +extern void release_last_mode(ModeInfo *); + +/* -------------------------------------------------------------------- */ + +/* comment out following defines to remove modes */ +#ifdef USE_GL +#define MODE_atlantis +#define MODE_cage +#define MODE_gears +#define MODE_moebius +#define MODE_morph3d +#define MODE_pipes +#define MODE_rubik +#define MODE_sproingies +#define MODE_stairs +#define MODE_superquadrics +#ifdef HAVE_CXX +#define MODE_bubble3d +#define MODE_invert +#if defined( HAVE_TTF ) && defined( HAVE_GLTT ) && defined( USE_UNSTABLE ) +#define MODE_text3d +#endif +#endif +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#define MODE_lament +#endif +#endif +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#define MODE_cartoon +#endif +#ifdef USE_UNSTABLE +#define MODE_decay +#define MODE_lyapunov +#endif +#define MODE_ant +#define MODE_ball +#define MODE_bat +#define MODE_blot +#define MODE_bouboule +#define MODE_bounce +#define MODE_braid +#define MODE_bubble +#define MODE_bug +#define MODE_clock +#define MODE_coral +#define MODE_crystal +#define MODE_daisy +#define MODE_dclock +#define MODE_deco +#define MODE_demon +#define MODE_dilemma +#define MODE_discrete +#define MODE_drift +#define MODE_eyes +#define MODE_fadeplot +#define MODE_flag +#define MODE_flame +#define MODE_flow +#define MODE_forest +#define MODE_galaxy +#define MODE_goop +#define MODE_grav +#define MODE_helix +#define MODE_hop +#define MODE_hyper +#define MODE_ico +#define MODE_ifs +#define MODE_image +#define MODE_julia +#define MODE_kaleid +#define MODE_kumppa +#define MODE_laser +#define MODE_life +#define MODE_life1d +#define MODE_life3d +#define MODE_lightning +#define MODE_lisa +#define MODE_lissie +#define MODE_loop +#define MODE_mandelbrot +#define MODE_marquee +#define MODE_maze +#define MODE_mountain +#define MODE_munch +#define MODE_nose +#define MODE_pacman +#define MODE_penrose +#define MODE_petal +#define MODE_puzzle +#define MODE_pyro +#define MODE_qix +#define MODE_roll +#define MODE_rotor +#define MODE_shape +#define MODE_sierpinski +#define MODE_slip +#define MODE_sphere +#define MODE_spiral +#define MODE_spline +#define MODE_star +#define MODE_starfish +#define MODE_strange +#define MODE_swarm +#define MODE_swirl +#define MODE_tetris +#define MODE_thornbird +#define MODE_triangle +#define MODE_tube +#define MODE_turtle +#define MODE_vines +#define MODE_voters +#define MODE_wator +#define MODE_wire +#define MODE_world +#define MODE_worm +#define MODE_xjack + +#if USE_BOMB +#define MODE_bomb +#endif + +#ifndef USE_MODULES + +#ifdef MODE_ant +extern ModeHook init_ant; +extern ModeHook draw_ant; +extern ModeHook release_ant; +extern ModeHook refresh_ant; +extern ModeSpecOpt ant_opts; +#endif + +#ifdef MODE_atlantis +extern ModeHook init_atlantis; +extern ModeHook draw_atlantis; +extern ModeHook release_atlantis; +extern ModeHook refresh_atlantis; +extern ModeHook change_atlantis; +extern ModeSpecOpt atlantis_opts; +#endif + +#ifdef MODE_ball +extern ModeHook init_ball; +extern ModeHook draw_ball; +extern ModeHook release_ball; +extern ModeHook refresh_ball; +extern ModeSpecOpt ball_opts; +#endif + +#ifdef MODE_bat +extern ModeHook init_bat; +extern ModeHook draw_bat; +extern ModeHook release_bat; +extern ModeHook refresh_bat; +extern ModeSpecOpt bat_opts; +#endif + +#ifdef MODE_blot +extern ModeHook init_blot; +extern ModeHook draw_blot; +extern ModeHook release_blot; +extern ModeHook refresh_blot; +extern ModeSpecOpt blot_opts; +#endif + +#ifdef MODE_bouboule +extern ModeHook init_bouboule; +extern ModeHook draw_bouboule; +extern ModeHook release_bouboule; +extern ModeHook refresh_bouboule; +extern ModeSpecOpt bouboule_opts; +#endif + +#ifdef MODE_bounce +extern ModeHook init_bounce; +extern ModeHook draw_bounce; +extern ModeHook release_bounce; +extern ModeHook refresh_bounce; +extern ModeSpecOpt bounce_opts; +#endif + +#ifdef MODE_braid +extern ModeHook init_braid; +extern ModeHook draw_braid; +extern ModeHook release_braid; +extern ModeHook refresh_braid; +extern ModeSpecOpt braid_opts; +#endif + +#ifdef MODE_bubble +extern ModeHook init_bubble; +extern ModeHook draw_bubble; +extern ModeHook release_bubble; +extern ModeHook refresh_bubble; +extern ModeSpecOpt bubble_opts; +#endif + +#ifdef MODE_bubble3d +extern ModeHook init_bubble3d; +extern ModeHook draw_bubble3d; +extern ModeHook release_bubble3d; +extern ModeHook change_bubble3d; +extern ModeSpecOpt bubble3d_opts; +#endif + +#ifdef MODE_bug +extern ModeHook init_bug; +extern ModeHook draw_bug; +extern ModeHook release_bug; +extern ModeHook refresh_bug; +extern ModeSpecOpt bug_opts; +#endif + +#ifdef MODE_cage +extern ModeHook init_cage; +extern ModeHook draw_cage; +extern ModeHook release_cage; +extern ModeHook change_cage; +extern ModeSpecOpt cage_opts; +#endif + +#ifdef MODE_cartoon +extern ModeHook init_cartoon; +extern ModeHook draw_cartoon; +extern ModeHook release_cartoon; +extern ModeSpecOpt cartoon_opts; +#endif + +#ifdef MODE_clock +extern ModeHook init_clock; +extern ModeHook draw_clock; +extern ModeHook release_clock; +extern ModeHook refresh_clock; +extern ModeSpecOpt clock_opts; +#endif + +#ifdef MODE_coral +extern ModeHook init_coral; +extern ModeHook draw_coral; +extern ModeHook release_coral; +extern ModeHook refresh_coral; +extern ModeSpecOpt coral_opts; +#endif + +#ifdef MODE_crystal +extern ModeHook init_crystal; +extern ModeHook draw_crystal; +extern ModeHook release_crystal; +extern ModeHook refresh_crystal; +extern ModeSpecOpt crystal_opts; +#endif + +#ifdef MODE_daisy +extern ModeHook init_daisy; +extern ModeHook draw_daisy; +extern ModeHook release_daisy; +extern ModeHook refresh_daisy; +extern ModeSpecOpt daisy_opts; +#endif + +#ifdef MODE_dclock +extern ModeHook init_dclock; +extern ModeHook draw_dclock; +extern ModeHook release_dclock; +extern ModeHook refresh_dclock; +extern ModeSpecOpt dclock_opts; +#endif + +#ifdef MODE_decay +extern ModeHook init_decay; +extern ModeHook draw_decay; +extern ModeHook release_decay; +extern ModeHook refresh_decay; +extern ModeSpecOpt decay_opts; +#endif + +#ifdef MODE_deco +extern ModeHook init_deco; +extern ModeHook draw_deco; +extern ModeHook release_deco; +extern ModeHook refresh_deco; +extern ModeSpecOpt deco_opts; +#endif + +#ifdef MODE_demon +extern ModeHook init_demon; +extern ModeHook draw_demon; +extern ModeHook release_demon; +extern ModeHook refresh_demon; +extern ModeSpecOpt demon_opts; +#endif + +#ifdef MODE_dilemma +extern ModeHook init_dilemma; +extern ModeHook draw_dilemma; +extern ModeHook release_dilemma; +extern ModeHook refresh_dilemma; +extern ModeSpecOpt dilemma_opts; +#endif + +#ifdef MODE_discrete +extern ModeHook init_discrete; +extern ModeHook draw_discrete; +extern ModeHook release_discrete; +extern ModeHook refresh_discrete; +extern ModeHook change_discrete; +extern ModeSpecOpt discrete_opts; +#endif + +#ifdef MODE_drift +extern ModeHook init_drift; +extern ModeHook draw_drift; +extern ModeHook release_drift; +extern ModeHook refresh_drift; +extern ModeSpecOpt drift_opts; +#endif + +#ifdef MODE_eyes +extern ModeHook init_eyes; +extern ModeHook draw_eyes; +extern ModeHook release_eyes; +extern ModeHook refresh_eyes; +extern ModeSpecOpt eyes_opts; +#endif + +#ifdef MODE_fadeplot +extern ModeHook init_fadeplot; +extern ModeHook draw_fadeplot; +extern ModeHook release_fadeplot; +extern ModeHook refresh_fadeplot; +extern ModeSpecOpt fadeplot_opts; +#endif + +#ifdef MODE_flag +extern ModeHook init_flag; +extern ModeHook draw_flag; +extern ModeHook release_flag; +extern ModeHook refresh_flag; +extern ModeSpecOpt flag_opts; +#endif + +#ifdef MODE_flame +extern ModeHook init_flame; +extern ModeHook draw_flame; +extern ModeHook release_flame; +extern ModeHook refresh_flame; +extern ModeSpecOpt flame_opts; +#endif + +#ifdef MODE_flow +extern ModeHook init_flow; +extern ModeHook draw_flow; +extern ModeHook release_flow; +extern ModeHook refresh_flow; +extern ModeHook change_flow; +extern ModeSpecOpt flow_opts; +#endif + +#ifdef MODE_forest +extern ModeHook init_forest; +extern ModeHook draw_forest; +extern ModeHook release_forest; +extern ModeHook refresh_forest; +extern ModeSpecOpt forest_opts; +#endif + +#ifdef MODE_galaxy +extern ModeHook init_galaxy; +extern ModeHook draw_galaxy; +extern ModeHook release_galaxy; +extern ModeHook refresh_galaxy; +extern ModeSpecOpt galaxy_opts; +#endif + +#ifdef MODE_gears +extern ModeHook init_gears; +extern ModeHook draw_gears; +extern ModeHook release_gears; +extern ModeSpecOpt gears_opts; +#endif + +#ifdef MODE_goop +extern ModeHook init_goop; +extern ModeHook draw_goop; +extern ModeHook release_goop; +extern ModeSpecOpt goop_opts; +#endif + +#ifdef MODE_grav +extern ModeHook init_grav; +extern ModeHook draw_grav; +extern ModeHook release_grav; +extern ModeHook refresh_grav; +extern ModeSpecOpt grav_opts; +#endif + +#ifdef MODE_helix +extern ModeHook init_helix; +extern ModeHook draw_helix; +extern ModeHook release_helix; +extern ModeHook refresh_helix; +extern ModeSpecOpt helix_opts; +#endif + +#ifdef MODE_hop +extern ModeHook init_hop; +extern ModeHook draw_hop; +extern ModeHook release_hop; +extern ModeHook refresh_hop; +extern ModeSpecOpt hop_opts; +#endif + +#ifdef MODE_hyper +extern ModeHook init_hyper; +extern ModeHook draw_hyper; +extern ModeHook release_hyper; +extern ModeHook refresh_hyper; +extern ModeHook change_hyper; +extern ModeSpecOpt hyper_opts; +#endif + +#ifdef MODE_ico +extern ModeHook init_ico; +extern ModeHook draw_ico; +extern ModeHook release_ico; +extern ModeHook refresh_ico; +extern ModeHook change_ico; +extern ModeSpecOpt ico_opts; +#endif + +#ifdef MODE_ifs +extern ModeHook init_ifs; +extern ModeHook draw_ifs; +extern ModeHook release_ifs; +extern ModeSpecOpt ifs_opts; +#endif + +#ifdef MODE_image +extern ModeHook init_image; +extern ModeHook draw_image; +extern ModeHook release_image; +extern ModeHook refresh_image; +extern ModeSpecOpt image_opts; +#endif + +#ifdef MODE_invert +extern ModeHook init_invert; +extern ModeHook draw_invert; +extern ModeHook release_invert; +extern ModeSpecOpt invert_opts; +#endif + +#ifdef MODE_julia +extern ModeHook init_julia; +extern ModeHook draw_julia; +extern ModeHook release_julia; +extern ModeHook refresh_julia; +extern ModeSpecOpt julia_opts; +#endif + +#ifdef MODE_kaleid +extern ModeHook init_kaleid; +extern ModeHook draw_kaleid; +extern ModeHook release_kaleid; +extern ModeHook refresh_kaleid; +extern ModeSpecOpt kaleid_opts; +#endif + +#ifdef MODE_kumppa +extern ModeHook init_kumppa; +extern ModeHook draw_kumppa; +extern ModeHook release_kumppa; +extern ModeHook refresh_kumppa; +extern ModeSpecOpt kumppa_opts; +#endif + +#ifdef MODE_lament +extern ModeHook init_lament; +extern ModeHook draw_lament; +extern ModeHook release_lament; +extern ModeHook change_lament; +extern ModeSpecOpt lament_opts; +#endif + +#ifdef MODE_laser +extern ModeHook init_laser; +extern ModeHook draw_laser; +extern ModeHook release_laser; +extern ModeHook refresh_laser; +extern ModeSpecOpt laser_opts; +#endif + +#ifdef MODE_life +extern ModeHook init_life; +extern ModeHook draw_life; +extern ModeHook release_life; +extern ModeHook refresh_life; +extern ModeHook change_life; +extern ModeSpecOpt life_opts; +#endif + +#ifdef MODE_life1d +extern ModeHook init_life1d; +extern ModeHook draw_life1d; +extern ModeHook release_life1d; +extern ModeHook refresh_life1d; +extern ModeSpecOpt life1d_opts; +#endif + +#ifdef MODE_life3d +extern ModeHook init_life3d; +extern ModeHook draw_life3d; +extern ModeHook release_life3d; +extern ModeHook refresh_life3d; +extern ModeHook change_life3d; +extern ModeSpecOpt life3d_opts; +#endif + +#ifdef MODE_lightning +extern ModeHook init_lightning; +extern ModeHook draw_lightning; +extern ModeHook release_lightning; +extern ModeHook refresh_lightning; +extern ModeSpecOpt lightning_opts; +#endif + +#ifdef MODE_lisa +extern ModeHook init_lisa; +extern ModeHook draw_lisa; +extern ModeHook release_lisa; +extern ModeHook refresh_lisa; +extern ModeHook change_lisa; +extern ModeSpecOpt lisa_opts; +#endif + +#ifdef MODE_lissie +extern ModeHook init_lissie; +extern ModeHook draw_lissie; +extern ModeHook release_lissie; +extern ModeHook refresh_lissie; +extern ModeSpecOpt lissie_opts; +#endif + +#ifdef MODE_loop +extern ModeHook init_loop; +extern ModeHook draw_loop; +extern ModeHook release_loop; +extern ModeHook refresh_loop; +extern ModeSpecOpt loop_opts; +#endif + +#ifdef MODE_lyapunov +extern ModeHook init_lyapunov; +extern ModeHook draw_lyapunov; +extern ModeHook release_lyapunov; +extern ModeHook refresh_lyapunov; +extern ModeSpecOpt lyapunov_opts; +#endif + +#ifdef MODE_mandelbrot +extern ModeHook init_mandelbrot; +extern ModeHook draw_mandelbrot; +extern ModeHook release_mandelbrot; +extern ModeHook refresh_mandelbrot; +extern ModeSpecOpt mandelbrot_opts; +#endif + +#ifdef MODE_marquee +extern ModeHook init_marquee; +extern ModeHook draw_marquee; +extern ModeHook release_marquee; +extern ModeSpecOpt marquee_opts; +#endif + +#ifdef MODE_maze +extern ModeHook init_maze; +extern ModeHook draw_maze; +extern ModeHook release_maze; +extern ModeHook refresh_maze; +extern ModeSpecOpt maze_opts; +#endif + +#ifdef MODE_moebius +extern ModeHook init_moebius; +extern ModeHook draw_moebius; +extern ModeHook release_moebius; +extern ModeHook change_moebius; +extern ModeSpecOpt moebius_opts; +#endif + +#ifdef MODE_morph3d +extern ModeHook init_morph3d; +extern ModeHook draw_morph3d; +extern ModeHook release_morph3d; +extern ModeHook change_morph3d; +extern ModeSpecOpt morph3d_opts; +#endif + +#ifdef MODE_mountain +extern ModeHook init_mountain; +extern ModeHook draw_mountain; +extern ModeHook release_mountain; +extern ModeHook refresh_mountain; +extern ModeSpecOpt mountain_opts; +#endif + +#ifdef MODE_munch +extern ModeHook init_munch; +extern ModeHook draw_munch; +extern ModeHook release_munch; +extern ModeSpecOpt munch_opts; +#endif + +#ifdef MODE_nose +extern ModeHook init_nose; +extern ModeHook draw_nose; +extern ModeHook release_nose; +extern ModeHook refresh_nose; +extern ModeSpecOpt nose_opts; +#endif + +#ifdef MODE_pacman +extern ModeHook init_pacman; +extern ModeHook draw_pacman; +extern ModeHook release_pacman; +extern ModeHook refresh_pacman; +extern ModeSpecOpt pacman_opts; +#endif + +#ifdef MODE_penrose +extern ModeHook init_penrose; +extern ModeHook draw_penrose; +extern ModeHook release_penrose; + +#if 0 +extern ModeHook refresh_penrose; /* Needed */ +#endif +extern ModeSpecOpt penrose_opts; +#endif + +#ifdef MODE_petal +extern ModeHook init_petal; +extern ModeHook draw_petal; +extern ModeHook release_petal; +extern ModeHook refresh_petal; +extern ModeSpecOpt petal_opts; +#endif + +#ifdef MODE_pipes +extern ModeHook init_pipes; +extern ModeHook draw_pipes; +extern ModeHook release_pipes; +extern ModeHook refresh_pipes; +extern ModeHook change_pipes; +extern ModeSpecOpt pipes_opts; +#endif + +#ifdef MODE_puzzle +extern ModeHook init_puzzle; +extern ModeHook draw_puzzle; +extern ModeHook release_puzzle; + +#if 0 +extern ModeHook refresh_puzzle; /* Needed */ +#endif +extern ModeSpecOpt puzzle_opts; +#endif + +#ifdef MODE_pyro +extern ModeHook init_pyro; +extern ModeHook draw_pyro; +extern ModeHook release_pyro; +extern ModeHook refresh_pyro; +extern ModeSpecOpt pyro_opts; +#endif + +#ifdef MODE_qix +extern ModeHook init_qix; +extern ModeHook draw_qix; +extern ModeHook release_qix; +extern ModeHook refresh_qix; +extern ModeSpecOpt qix_opts; +#endif + +#ifdef MODE_roll +extern ModeHook init_roll; +extern ModeHook draw_roll; +extern ModeHook release_roll; +extern ModeHook refresh_roll; +extern ModeSpecOpt roll_opts; +#endif + +#ifdef MODE_rotor +extern ModeHook init_rotor; +extern ModeHook draw_rotor; +extern ModeHook release_rotor; +extern ModeHook refresh_rotor; +extern ModeSpecOpt rotor_opts; +#endif + +#ifdef MODE_rubik +extern ModeHook init_rubik; +extern ModeHook draw_rubik; +extern ModeHook release_rubik; +extern ModeHook change_rubik; +extern ModeSpecOpt rubik_opts; +#endif + +#ifdef MODE_shape +extern ModeHook init_shape; +extern ModeHook draw_shape; +extern ModeHook release_shape; +extern ModeHook refresh_shape; +extern ModeSpecOpt shape_opts; +#endif + +#ifdef MODE_sierpinski +extern ModeHook init_sierpinski; +extern ModeHook draw_sierpinski; +extern ModeHook release_sierpinski; +extern ModeHook refresh_sierpinski; +extern ModeSpecOpt sierpinski_opts; +#endif + +#ifdef MODE_slip +extern ModeHook init_slip; +extern ModeHook draw_slip; +extern ModeHook release_slip; + +#if 0 +extern ModeHook refresh_slip; /* Probably not practical */ +#endif +extern ModeSpecOpt slip_opts; +#endif + +#ifdef MODE_sphere +extern ModeHook init_sphere; +extern ModeHook draw_sphere; +extern ModeHook release_sphere; +extern ModeHook refresh_sphere; +extern ModeSpecOpt sphere_opts; +#endif + +#ifdef MODE_spiral +extern ModeHook init_spiral; +extern ModeHook draw_spiral; +extern ModeHook release_spiral; +extern ModeHook refresh_spiral; +extern ModeSpecOpt spiral_opts; +#endif + +#ifdef MODE_spline +extern ModeHook init_spline; +extern ModeHook draw_spline; +extern ModeHook release_spline; +extern ModeHook refresh_spline; +extern ModeSpecOpt spline_opts; +#endif + +#ifdef MODE_sproingies +extern ModeHook init_sproingies; +extern ModeHook draw_sproingies; +extern ModeHook release_sproingies; +extern ModeHook refresh_sproingies; +extern ModeSpecOpt sproingies_opts; +#endif + +#ifdef MODE_stairs +extern ModeHook init_stairs; +extern ModeHook draw_stairs; +extern ModeHook release_stairs; +extern ModeHook refresh_stairs; +extern ModeHook change_stairs; +extern ModeSpecOpt stairs_opts; +#endif + +#ifdef MODE_star +extern ModeHook init_star; +extern ModeHook draw_star; +extern ModeHook release_star; +extern ModeHook refresh_star; +extern ModeSpecOpt star_opts; +#endif + +#ifdef MODE_starfish +extern ModeHook init_starfish; +extern ModeHook draw_starfish; +extern ModeHook release_starfish; +extern ModeHook refresh_starfish; +extern ModeSpecOpt starfish_opts; +#endif + +#ifdef MODE_strange +extern ModeHook init_strange; +extern ModeHook draw_strange; +extern ModeHook release_strange; +extern ModeSpecOpt strange_opts; +#endif + +#ifdef MODE_superquadrics +extern ModeHook init_superquadrics; +extern ModeHook draw_superquadrics; +extern ModeHook release_superquadrics; +extern ModeHook refresh_superquadrics; +extern ModeSpecOpt superquadrics_opts; +#endif + +#ifdef MODE_swarm +extern ModeHook init_swarm; +extern ModeHook draw_swarm; +extern ModeHook release_swarm; +extern ModeHook refresh_swarm; +extern ModeSpecOpt swarm_opts; +#endif + +#ifdef MODE_swirl +extern ModeHook init_swirl; +extern ModeHook draw_swirl; +extern ModeHook release_swirl; +extern ModeHook refresh_swirl; +extern ModeSpecOpt swirl_opts; +#endif + +#ifdef MODE_tetris +extern ModeHook init_tetris; +extern ModeHook draw_tetris; +extern ModeHook release_tetris; +extern ModeHook refresh_tetris; +extern ModeSpecOpt tetris_opts; +#endif + +#ifdef MODE_text3d +extern ModeHook init_text3d; +extern ModeHook draw_text3d; +extern ModeHook release_text3d; +extern ModeHook refresh_text3d; +extern ModeHook change_text3d; +extern ModeSpecOpt text3d_opts; +#endif + +#ifdef MODE_thornbird +extern ModeHook init_thornbird; +extern ModeHook draw_thornbird; +extern ModeHook release_thornbird; +extern ModeHook refresh_thornbird; +extern ModeHook change_thornbird; +extern ModeSpecOpt thornbird_opts; +#endif + +#ifdef MODE_triangle +extern ModeHook init_triangle; +extern ModeHook draw_triangle; +extern ModeHook release_triangle; +extern ModeHook refresh_triangle; +extern ModeSpecOpt triangle_opts; +#endif + +#ifdef MODE_tube +extern ModeHook init_tube; +extern ModeHook draw_tube; +extern ModeHook release_tube; +extern ModeHook refresh_tube; +extern ModeSpecOpt tube_opts; +#endif + +#ifdef MODE_turtle +extern ModeHook init_turtle; +extern ModeHook draw_turtle; +extern ModeHook release_turtle; +extern ModeHook refresh_turtle; +extern ModeSpecOpt turtle_opts; +#endif + +#ifdef MODE_vines +extern ModeHook init_vines; +extern ModeHook draw_vines; +extern ModeHook release_vines; +extern ModeHook refresh_vines; +extern ModeSpecOpt vines_opts; +#endif + +#ifdef MODE_voters +extern ModeHook init_voters; +extern ModeHook draw_voters; +extern ModeHook release_voters; +extern ModeHook refresh_voters; +extern ModeSpecOpt voters_opts; +#endif + +#ifdef MODE_wator +extern ModeHook init_wator; +extern ModeHook draw_wator; +extern ModeHook release_wator; +extern ModeHook refresh_wator; +extern ModeSpecOpt wator_opts; +#endif + +#ifdef MODE_wire +extern ModeHook init_wire; +extern ModeHook draw_wire; +extern ModeHook release_wire; +extern ModeHook refresh_wire; +extern ModeSpecOpt wire_opts; +#endif + +#ifdef MODE_world +extern ModeHook init_world; +extern ModeHook draw_world; +extern ModeHook release_world; +extern ModeHook refresh_world; +extern ModeSpecOpt world_opts; +#endif + +#ifdef MODE_worm +extern ModeHook init_worm; +extern ModeHook draw_worm; +extern ModeHook release_worm; +extern ModeHook refresh_worm; +extern ModeSpecOpt worm_opts; +#endif + +#ifdef MODE_xjack +extern ModeHook init_xjack; +extern ModeHook draw_xjack; +extern ModeHook release_xjack; +extern ModeSpecOpt xjack_opts; +#endif + +extern ModeHook init_blank; +extern ModeHook draw_blank; +extern ModeHook release_blank; +extern ModeHook refresh_blank; +extern ModeSpecOpt blank_opts; + +#ifdef MODE_bomb +extern ModeHook init_bomb; +extern ModeHook draw_bomb; +extern ModeHook release_bomb; +extern ModeHook refresh_bomb; +extern ModeHook change_bomb; +extern ModeSpecOpt bomb_opts; +#endif + +extern ModeHook init_random; +extern ModeHook draw_random; +extern ModeHook release_random; +extern ModeHook refresh_random; +extern ModeHook change_random; +extern ModeSpecOpt random_opts; + +extern LockStruct LockProcs[]; + +#else /* #ifndef USE_MODULES */ + +extern void LoadModules(char *); +extern void UnloadModules(); + +extern LockStruct *LockProcs; +extern void **LoadedModules; /* save handles on loaded modules for closing */ + +#endif + +extern int numprocs; + +#ifdef __cplusplus + } +#endif + +#endif /* STANDALONE */ +/* -------------------------------------------------------------------- */ +#endif /* __XLOCK_MODE_H__ */ diff --git a/xlock/passwd.c b/xlock/passwd.c new file mode 100644 index 00000000..b119eab8 --- /dev/null +++ b/xlock/passwd.c @@ -0,0 +1,1881 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)passwd.c 4.02 97/04/01 xlockmore"; + +#endif + +/*- + * passwd.c - passwd stuff. + * + * Copyright (c) 1988-91 by Patrick J. Naughton. + * + * Revision History: + * + * Changes maintained by David Bagley + * 18-Feb-99: allowroot option no longer ignored for PAM authentication. + * Sven Paas + * 24-Jan-98: Updated PAM support and made it configure-able. + * Marc Ewing Original PAM support from + * 25-Jul-96 Michael K. Johnson + * 18-Jan-98: Kerberos corrections by RLS + * 25-May-96: When xlock is compiled with shadow passwords it will still + * work on non shadowed systems. Marek Michalkiewicz + * + * 25-Feb-96: Lewis Muhlenkamp + * Added in ability for any of the root accounts to unlock + * screen. Message now gets sent to syslog if root does the + * unlocking. + * 23-Dec-95: Ron Hitchens reorganized. + * 10-Dec-95: More context handling stuff for DCE thanks to + * Terje Marthinussen . + * 01-Sep-95: DCE code added thanks to Heath A. Kehoe + * . + * 24-Jun-95: Extracted from xlock.c, encrypted passwords are now fetched + * on start-up to ensure correct operation (except Ultrix). + */ + +#include "xlock.h" +#include "iostuff.h" +#include "passwd.h" + +#ifdef VMS +#include +#include +#define ROOT "SYSTEM" +#else +#define ROOT "root" +#endif + +extern Bool allowroot; +extern Bool inroot; +extern Bool inwindow; +extern Bool grabmouse; +extern Bool nolock; + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC ) +#include /* order of includes matters */ +#endif + +#if !defined( VMS ) && !defined( SUNOS_ADJUNCT_PASSWD ) +#include +#endif + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC ) || defined( __bsdi__ ) || defined( HAVE_KRB4 ) || defined( HAVE_KRB5 ) +#include +#endif + + +#if defined( __bsdi__ ) && _BSDI_VERSION >= 199608 +#define BSD_AUTH +#endif + +#ifdef BSD_AUTH +#include +static login_cap_t *lc = NULL; +static login_cap_t *rlc = NULL; + +#endif + +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) +#include +#endif + +#if ( HAVE_FCNTL_H && (defined( USE_MULTIPLE_ROOT ) || defined( USE_MULTIPLE_USER ))) +#include +#include +extern int errno; + +void get_multiple(struct passwd *); +void set_multiple(int uid); + +#define BUFMAX 1024 /* Maximum size of pipe buffer */ + + +/* Linked list to keep track of everyone that's authorized * to unlock the + screen. */ +struct pwln { + char *pw_name; +#ifdef BSD_AUTH + login_cap_t *pw_lc; +#else + char *pw_passwd; +#endif + struct pwln *next; +}; +typedef struct pwln pwlnode; +typedef struct pwln *pwlptr; + +pwlptr pwll, pwllh = (pwlptr) NULL; +extern pwlptr pwllh; + +/* Function that creates and initializes a new node that * will be added to + the linked list. */ +pwlptr +new_pwlnode(void) +{ + pwlptr pwl; + + if ((pwl = (pwlptr) malloc(sizeof (pwlnode))) == 0) + return ((pwlptr) ENOMEM); + + pwl->pw_name = (char *) NULL; +#ifdef BSD_AUTH + pwl->pw_lc = NULL; +#else + pwl->pw_passwd = (char *) NULL; +#endif + pwl->next = (pwlptr) NULL; + + return (pwl); +} +#endif + +#ifdef ultrix +#include + +#if defined( HAVE_SETEUID ) || defined(HAVE_SETREUID ) +gid_t rgid, egid; + +#endif +#endif + +#ifdef OSF1_ENH_SEC +#include +#include +#endif + +#if defined( __linux__ ) && defined( __ELF__ ) && !defined( HAVE_SHADOW ) +/*- + * Linux may or may not have shadow passwords, so it is best to make the same + * binary work with both shadow and non-shadow passwords. It's easy with the + * ELF libc since it has getspnam() and there is no need for any additional + * libraries like libshadow.a. + */ +#define HAVE_SHADOW +#endif + +#if defined( __linux__ ) && defined( HAVE_SHADOW ) && defined( HAVE_PW_ENCRYPT ) +/*- + * Deprecated - long passwords have known weaknesses. Also, pw_encrypt is + * non-standard (requires libshadow.a) while everything else you need to + * support shadow passwords is in the standard (ELF) libc. + */ +#define crypt pw_encrypt +#endif + +#ifdef HAVE_SHADOW +#ifndef __hpux +#include +#endif +#endif + +#ifdef SUNOS_ADJUNCT_PASSWD +#include +#include +#include +#define passwd passwd_adjunct +#define pw_passwd pwa_passwd +#define getpwnam(_s) getpwanam(_s) +#define pw_name pwa_name +#define getpwuid(_s) (((_s)==0)?getpwanam(ROOT):getpwanam(cuserid(NULL))) +#endif /* SUNOS_ADJUNCT_PASSWD */ + +/* System V Release 4 redefinitions of BSD functions and structures */ +#if !defined( SHADOW ) && (defined( SYSV ) || defined( SVR4 )) + +#ifdef LESS_THAN_AIX3_2 +struct passwd { + char *pw_name; + char *pw_passwd; + uid_t pw_uid; + gid_t pw_gid; + char *pw_gecos; + char *pw_dir; + char *pw_shell; +}; + +#endif /* LESS_THAN_AIX3_2 */ + +#ifdef HPUX_SECURE_PASSWD +#include +#include +#define crypt bigcrypt + +/* #define seteuid(_eu) setresuid(-1, _eu, -1) */ +#define passwd s_passwd +#define getpwnam(_s) getspwnam(_s) +#define getpwuid(_u) getspwuid(_u) +#endif /* HPUX_SECURE_PASSWD */ + +#endif /* defined( SYSV ) || defined( SVR4 ) */ + +#ifdef VMS +#include +#define VMS_PASSLENGTH 9 +static short uai_salt, root_salt; +static char hash_password[VMS_PASSLENGTH], hash_system[VMS_PASSLENGTH]; +static char root_password[VMS_PASSLENGTH], root_system[VMS_PASSLENGTH]; +static char uai_encrypt, root_encrypt; + +struct ascid { + short len; + char dtype; + char c_class; + char *addr; +}; + +static struct ascid username, rootuser; + +struct itmlst { + short buflen; + short code; + long addr; + long retadr; +}; + +#endif /* VMS */ + +#ifdef HP_PASSWDETC /* HAVE_SYS_WAIT_H */ +#include +#endif /* HP_PASSWDETC */ + +#ifdef AFS +#include +#include +#endif /* AFS */ + +char user[PASSLENGTH]; + +#ifdef PAM +#include +/* used to pass the password to the conversation function */ +static char *PAM_password; + +/*- + * PAM conversation function + * Here we assume (for now, at least) that echo on means login name, and + * echo off means password. + */ +static int +PAM_conv(int num_msg, + /* const */ struct pam_message **msg, + struct pam_response **resp, + void *appdata_ptr) +{ + int replies = 0; + struct pam_response *reply = NULL; + + +#define COPY_STRING(s) (s) ? strdup(s) : NULL + + + reply = (struct pam_response *) malloc(sizeof (struct pam_response) * + num_msg); + + if (!reply) + return PAM_CONV_ERR; + + + for (replies = 0; replies < num_msg; replies++) { + switch (msg[replies]->msg_style) { + case PAM_PROMPT_ECHO_ON: + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = COPY_STRING(user); + /* PAM frees resp */ + break; + case PAM_PROMPT_ECHO_OFF: + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = COPY_STRING(PAM_password); + /* PAM frees resp */ + break; + case PAM_TEXT_INFO: + /* ignore it... */ + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = NULL; + break; + case PAM_ERROR_MSG: + /* ignore it... */ + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = NULL; + break; + default: + /* Must be an error of some sort... */ + (void) free((void *) reply); + return PAM_CONV_ERR; + } + } + *resp = reply; + return PAM_SUCCESS; +} +static struct pam_conv PAM_conversation = +{ + &PAM_conv, + NULL +}; + +#endif /* PAM */ + +#if !defined( ultrix ) && !defined( PAM ) +static char userpass[PASSLENGTH]; +static char rootpass[PASSLENGTH]; + +#ifdef VMS +static char root[] = ROOT; + +#endif +#endif /* !ultrix */ + +#ifdef DCE_PASSWD +static int usernet, rootnet; +static int check_dce_net_passwd(char *, char *); + +#endif + +#if defined( HAVE_KRB4 ) || defined( HAVE_KRB5 ) +#ifdef HAVE_KRB4 +#include +#else /* HAVE_KRB5 */ +#include +#endif +static int krb_check_password(struct passwd *, char *); + +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +#ifdef SunCplusplus +#include +#else +#if 0 +#if 1 +extern char *crypt(char *, char *); + +#else +extern char *crypt(const char *, const char *); + +#endif +#endif +#endif +#endif + +#if (defined( USE_XLOCKRC ) || (!defined( OSF1_ENH_SEC ) && !defined( HP_PASSWDETC ) && !defined( VMS ))) +static struct passwd * +my_passwd_entry(void) +{ + int uid; + struct passwd *pw; + +#ifdef HAVE_SHADOW + struct spwd *spw; + +#endif + + uid = (int) getuid(); +#ifndef SUNOS_ADJUNCT_PASSWD + { + char *logname = NULL; + + pw = 0; + logname = getenv("LOGNAME"); + if (!logname) + logname = getenv("USER"); + if (logname) { + pw = getpwnam(logname); + if (pw && (pw->pw_uid != uid)) + pw = 0; + } + } + if (!pw) +#endif + pw = getpwuid(uid); + if (!pw) + return (pw); +#ifdef HAVE_SHADOW + if ((spw = getspnam(pw->pw_name)) != NULL) { + char *tmp; /* swap */ + + tmp = pw->pw_passwd; + pw->pw_passwd = spw->sp_pwdp; + spw->sp_pwdp = tmp; + } + endspent(); +#endif + return (pw); +} +#endif + +#ifdef SAFEWORD +int +checkDynamic() +{ + struct passwd *pw; + char *buf; + +#ifndef SAFELOG_SWCHECK +#define SAFELOG_SWCHECK "/progs/safelog/swcheck" +#endif +#ifndef SAFELOG_IDENT +#define SAFELOG_IDENT "/progs/safelog/ident" +#endif + + + if (!(pw = my_passwd_entry())) { + /*if ((pw = (struct passwd *) getpwuid(getuid())) == NULL) */ + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user shell.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + return (!(strcmp(pw->pw_shell, SAFELOG_SWCHECK) && + strcmp(pw->pw_shell, SAFELOG_IDENT))); +} +#endif + +static void +getUserName(void) +{ + +#ifdef VMS + (void) strcpy(user, cuserid(NULL)); +#else /* !VMS */ +#ifdef HP_PASSWDETC + +/*- + * The PasswdEtc libraries have replacement passwd functions that make + * queries to DomainOS registries. Unfortunately, these functions do + * wierd things to the process (at minimum, signal handlers get changed, + * there are probably other things as well) that cause xlock to become + * unstable. + * + * As a (really, really sick) workaround, we'll fork() and do the getpw*() + * calls in the child, and pass the information back through a pipe. + */ + struct passwd *pw; + int pipefd[2], n, total = 0, stat_loc; + pid_t pid; + char *buf; + + pipe(pipefd); + + if ((pid = fork()) == 0) { + (void) close(pipefd[0]); + pw = getpwuid(getuid()); + write(pipefd[1], pw->pw_name, strlen(pw->pw_name)); + (void) close(pipefd[1]); + _exit(0); + } + if (pid < 0) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user password (fork failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) close(pipefd[1]); + + while ((n = read(pipefd[0], &(user[total]), 50)) > 0) + total += n; + + wait(&stat_loc); + + if (n < 0) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user name (read failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + user[total] = 0; + + if (total < 1) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user name (lookups failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } +#else /* !HP_PASSWDETC */ +#ifdef OSF1_ENH_SEC + struct pr_passwd *pw; + char *buf; + + /*if ((pw = getprpwuid(getuid())) == NULL) */ + if ((pw = getprpwuid(starting_ruid())) == NULL) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user name.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) strcpy(user, pw->ufld.fd_name); + +#else /* !OSF1_ENH_SEC */ + + struct passwd *pw; + char *buf; + + if (!(pw = my_passwd_entry())) { + /*if ((pw = (struct passwd *) getpwuid(getuid())) == NULL) */ + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user name.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) strcpy(user, pw->pw_name); + +#if ( HAVE_FCNTL_H && (defined( USE_MULTIPLE_ROOT ) || defined( USE_MULTIPLE_USER ))) + get_multiple(pw); +#endif + +#endif /* !OSF1_ENH_SEC */ +#endif /* !HP_PASSWDETC */ +#endif /* !VMS */ +} + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC ) + +#define CPASSLENGTH 14 +#define CPASSCHARS 64 +static void +gpasskey(char *pass) +{ + static char saltchars[CPASSCHARS + 1] = + "abcdefghijklmnopwrstuvwxyzABCDEFGHIJKLMNOPWRSTUVWXYZ1234567890./"; + char pw[9], salt[3], *pw2; + +#if 0 + char *getpass(const char *); + +#endif + + (void) strncpy(pw, (char *) getpass("Key: "), sizeof (pw)); + pw2 = (char *) getpass("Again:"); + if (strcmp(pw, pw2) != 0) { + (void) fprintf(stderr, "%s: Mismatch, try again\n", ProgramName); + exit(1); + } + /* grab a random printable character that is not a colon */ + salt[0] = saltchars[LRAND() & (CPASSCHARS - 1)]; + salt[1] = saltchars[LRAND() & (CPASSCHARS - 1)]; + salt[2] = '\0'; + (void) strncpy(pass, (char *) crypt(pw, salt), CPASSLENGTH); +} + +static void +gpass(void) +{ + FILE *fp; + extern char *cpasswd; + char xlockrc[MAXPATHLEN], *home; + + if (!cpasswd || !*cpasswd) { + /* + * No password given on command line or from database, get from + * $HOME/.xlockrc instead. + */ + if ((home = getenv("HOME")) == 0) { + /* struct passwd *p = getpwuid(getuid()); */ + struct passwd *p = my_passwd_entry(); + + if (p == 0) { + char *buf = (char *) malloc(strlen(ProgramName) + 80); + + (void) sprintf(buf, + "%s: Who are you?\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + home = p->pw_dir; + } + (void) strncpy(xlockrc, home, MAXPATHLEN); + (void) strncat(xlockrc, "/.xlockrc", MAXPATHLEN); + if ((fp = my_fopen(xlockrc, "r")) == NULL) { + if ((fp = my_fopen(xlockrc, "w")) != NULL) + (void) fchmod(fileno(fp), 0600); +#if defined(HAVE_KRB4) || defined(HAVE_KRB5) + (void) strcpy(userpass, "*"); +#else + gpasskey(userpass); +#endif /* KRB4 || KRB5 */ + if (fp) + (void) fprintf(fp, "%s\n", userpass); + } else { + char buf[BUFSIZ]; + + (void) fchmod(fileno(fp), 0600); + buf[0] = '\0'; + if ((fgets(buf, sizeof buf, fp) == NULL) || + (!(strlen(buf) == CPASSLENGTH - 1 || +#if defined(HAVE_KRB4) || defined(HAVE_KRB5) + (((strlen(buf) == 1) || strlen(buf) == 2) + && buf[0] == '*') || +#endif + (strlen(buf) == CPASSLENGTH && buf[CPASSLENGTH - 1] == '\n')))) { + (void) fprintf(stderr, "%s: %s crypted password %s\n", xlockrc, + buf[0] == '\0' ? "null" : "bad", buf); +#if defined(HAVE_KRB4) || defined(HAVE_KRB5) + gpasskey(buf); +#else + exit(1); +#endif + } + buf[CPASSLENGTH - 1] = '\0'; + (void) strncpy(userpass, buf, CPASSLENGTH); + } + if (fp) + (void) fclose(fp); + } else { + + if (strlen(cpasswd) != CPASSLENGTH - 1) { + (void) fprintf(stderr, "%s: bad crypted password %s\n", + ProgramName, cpasswd); + exit(1); + } else + (void) strncpy(userpass, cpasswd, CPASSLENGTH); + } +} + +#endif /* USE_XLOCKRC || FALLBACK_XLOCKRC */ + +#if !defined( ultrix ) && !defined( DCE_PASSWD ) && !defined( BSD_AUTH ) && !defined ( PAM ) +#ifndef USE_XLOCKRC + +#if defined( HAVE_SHADOW ) && !defined( AFS ) +static int +passwd_invalid(char *passwd) +{ + int i = strlen(passwd); + + return (i == 1 || i == 2); +} +#endif + +static void +getCryptedUserPasswd(void) +{ + +#ifdef VMS + struct itmlst il[4]; + + il[0].buflen = 2; + il[0].code = UAI$_SALT; + il[0].addr = (long) &uai_salt; + il[0].retadr = 0; + il[1].buflen = 8; + il[1].code = UAI$_PWD; + il[1].addr = (long) &hash_password; + il[1].retadr = 0; + il[2].buflen = 1; + il[2].code = UAI$_ENCRYPT; + il[2].addr = (long) &uai_encrypt; + il[2].retadr = 0; + il[3].buflen = 0; + il[3].code = 0; + il[3].addr = 0; + il[3].retadr = 0; + + username.len = strlen(user); + username.dtype = 0; + username.c_class = 0; + username.addr = user; + + sys$getuai(0, 0, &username, &il, 0, 0, 0); +#else /* !VMS */ +#ifdef HP_PASSWDETC + +/*- + * still very sick, see above + */ + struct passwd *pw; + int pipefd[2], n, total = 0, stat_loc; + pid_t pid; + char *buf; + + pipe(pipefd); + + if ((pid = fork()) == 0) { + (void) close(pipefd[0]); + pw = getpwuid(getuid()); + write(pipefd[1], pw->pw_passwd, strlen(pw->pw_passwd)); + (void) close(pipefd[1]); + _exit(0); + } + if (pid < 0) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user password (fork failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) close(pipefd[1]); + + while ((n = read(pipefd[0], &(userpass[total]), 50)) > 0) + total += n; + + wait(&stat_loc); + + if (n < 0) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user password (read failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + user[total] = 0; + + if (total < 1) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user password (lookups failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } +#else /* !HP_PASSWDETC */ +#ifdef OSF1_ENH_SEC + struct pr_passwd *pw; + char *buf; + + /*if ((pw = getprpwuid(getuid())) == NULL) */ + if ((pw = getprpwuid(starting_ruid())) == NULL) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get encrypted user password.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) strcpy(userpass, pw->ufld.fd_encrypt); + +#else /* !OSF1_ENH_SEC */ + + struct passwd *pw; + char *buf; + + if (!(pw = my_passwd_entry())) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get encrypted user password.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + /*if ((pw = (struct passwd *) getpwuid(getuid())) == NULL) */ + /* Check if there is any chance of unlocking the display later... */ + /* Program probably needs to be setuid to root. */ + (void) strcpy(userpass, pw->pw_passwd); +#ifdef HAVE_SHADOW +#ifndef AFS + if (passwd_invalid(pw->pw_passwd)) { + extern Bool verbose, debug; + + buf = (char *) malloc(strlen(ProgramName) + 80); + if (verbose || debug) { + (void) fprintf(stderr, + "%s: it looks like you have shadow passwording.\n", + ProgramName); + (void) fprintf(stderr, "Contact your administrator to setgid or\n"); + (void) fprintf(stderr, "setuid %s for /etc/shadow read access.\n", + ProgramName); + (void) fprintf(stderr, "Falling back on $HOME/.xlockrc password.\n"); + } + gpass(); + } +#endif /* !AFS */ +#endif /* HAVE_SHADOW */ +#if ( HAVE_FCNTL_H && defined( USE_MULTIPLE_USER )) + set_multiple(getuid()); +#endif /* HAVE_FCNTL_H && MULTIPLE_USER */ +#endif /* !OSF1_ENH_SEC */ +#endif /* !HP_PASSWDETC */ +#endif /* !VMS */ +} + +#endif /* !USE_XLOCKRC */ + +static void +getCryptedRootPasswd(void) +{ + +#ifdef VMS + struct itmlst il[4]; + + il[0].buflen = 2; + il[0].code = UAI$_SALT; + il[0].addr = (long) &root_salt; + il[0].retadr = 0; + il[1].buflen = 8; + il[1].code = UAI$_PWD; + il[1].addr = (long) &root_password; + il[1].retadr = 0; + il[2].buflen = 1; + il[2].code = UAI$_ENCRYPT; + il[2].addr = (long) &root_encrypt; + il[2].retadr = 0; + il[3].buflen = 0; + il[3].code = 0; + il[3].addr = 0; + il[3].retadr = 0; + + rootuser.len = strlen(root); + rootuser.dtype = 0; + rootuser.c_class = 0; + rootuser.addr = root; + + sys$getuai(0, 0, &rootuser, &il, 0, 0, 0); +#else /* !VMS */ +#ifdef HP_PASSWDETC + +/*- + * Still really, really sick. See above. + */ + struct passwd *pw; + int pipefd[2], n, total = 0, stat_loc; + pid_t pid; + char *buf; + + pipe(pipefd); + + if ((pid = fork()) == 0) { + (void) close(pipefd[0]); + pw = getpwnam(ROOT); + write(pipefd[1], pw->pw_passwd, strlen(pw->pw_passwd)); + (void) close(pipefd[1]); + _exit(0); + } + if (pid < 0) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get root password (fork failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) close(pipefd[1]); + + while ((n = read(pipefd[0], &(rootpass[total]), 50)) > 0) + total += n; + + wait(&stat_loc); + + if (n < 0) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get root password (read failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + rootpass[total] = 0; + + if (total < 1) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get root password (lookups failed)\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } +#else /* !HP_PASSWDETC */ +#ifdef OSF1_ENH_SEC + struct pr_passwd *pw; + char *buf; + + if ((pw = getprpwnam(ROOT)) == NULL) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get encrypted root password.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) strcpy(rootpass, pw->ufld.fd_encrypt); + +#else /* !OSF1_ENH_SEC */ + struct passwd *pw; + char *buf; + +#ifdef HAVE_SHADOW + struct spwd *spw; + +#endif + + if (!(pw = getpwnam(ROOT))) + if (!(pw = getpwuid(0))) { + /*if ((pw = (struct passwd *) getpwuid(0)) == NULL) */ + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get encrypted root password.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } +#ifdef HAVE_SHADOW + if ((spw = getspnam(pw->pw_name)) != NULL) { + char *tmp; /* swap */ + + tmp = pw->pw_passwd; + pw->pw_passwd = spw->sp_pwdp; + spw->sp_pwdp = tmp; + } + endspent(); +#endif + (void) strcpy(rootpass, pw->pw_passwd); + +#if ( HAVE_FCNTL_H && defined( USE_MULTIPLE_ROOT )) + set_multiple(0); +#endif /* HAVE_FCNTL_H && MULTIPLE_ROOT */ + +#endif /* !OSF1_ENH_SEC */ +#endif /* !HP_PASSWDETC */ +#endif /* !VMS */ +} + +#endif /* !ultrix && !DCE_PASSWD && !BSD_AUTH && !PAM */ + + +/*- + * We do not allow for root to have no password, but we handle the case + * where the user has no password correctly; they have to hit return + * only. + */ +int +checkPasswd(char *buffer) +{ + int done = False; + +#ifdef VMS + struct ascid password; + + password.len = strlen(buffer); + password.dtype = 0; + password.c_class = 0; + password.addr = buffer; + + str$upcase(&password, &password); + + sys$hash_password(&password, uai_encrypt, uai_salt, + &username, &hash_system); + + hash_password[VMS_PASSLENGTH - 1] = 0; + hash_system[VMS_PASSLENGTH - 1] = 0; + + done = !strcmp(hash_password, hash_system); + if (!done && allowroot) { + sys$hash_password(&password, root_encrypt, root_salt, + &rootuser, &root_system); + root_password[VMS_PASSLENGTH - 1] = 0; + root_system[VMS_PASSLENGTH - 1] = 0; + done = !strcmp(root_password, root_system); + } +#else /* !VMS */ + +#ifdef DCE_PASSWD + if (usernet) + done = check_dce_net_passwd(user, buffer); + else + done = !strcmp(userpass, crypt(buffer, userpass)); + + if (done) + return True; + if (!allowroot) + return False; + + if (rootnet) + done = check_dce_net_passwd(ROOT, buffer); + else + done = !strcmp(rootpass, crypt(buffer, rootpass)); +#else /* !DCE_PASSWD */ + +#ifdef PAM +/*- + * Use PAM to do authentication. No session logging, only authentication. + * Bail out if there are any errors. + * For now, don't try to display strings explaining errors. + * Later, we could integrate PAM more by posting errors to the + * user. + * Query: should we be using PAM_SILENT to shut PAM up? + */ + pam_handle_t *pamh; + int pam_error; + +#define PAM_BAIL if (pam_error != PAM_SUCCESS) { \ + pam_end(pamh, 0); return 0; \ +} + PAM_password = buffer; + pam_error = pam_start("xlock", user, &PAM_conversation, &pamh); + PAM_BAIL; + pam_error = pam_authenticate(pamh, 0); + if (pam_error != PAM_SUCCESS) { + if (!allowroot) { + pam_end(pamh, 0); + return 0; + } + + /* Try as root; bail if no success there either */ + pam_error = pam_set_item(pamh, PAM_USER, ROOT); + PAM_BAIL; + pam_error = pam_authenticate(pamh, 0); + PAM_BAIL; + } + /* Don't do account management or credentials; credentials + * aren't needed and account management would just lock up + * a computer and require root to come and unlock it. Blech. + */ + pam_end(pamh, PAM_SUCCESS); + /* If this point is reached, the user has been authenticated. */ + done = True; + +#else /* !PAM */ + +#ifdef ultrix + +#ifdef HAVE_SETEUID + (void) setegid(egid); +#else +#ifdef HAVE_SETREUID + (void) setregid(rgid, egid); +#endif +#endif + done = ((authenticate_user((struct passwd *) getpwnam(user), + buffer, NULL) >= 0) || (allowroot && + (authenticate_user((struct passwd *) getpwnam(ROOT), + buffer, NULL) >= 0))); +#ifdef HAVE_SETEUID + (void) setegid(rgid); +#else +#ifdef HAVE_SETREUID + (void) setregid(egid, rgid); +#endif +#endif + +#else /* !ultrix */ + +#ifdef BSD_AUTH + char *pass; + char *style; + char *name; + +#if ( HAVE_FCNTL_H && (defined( USE_MULTIPLE_ROOT ) || defined( USE_MULTIPLE_USER ))) + /* Scan through the linked list until you match a password. Print + * message to log if password match doesn't equal the user. + * + * This should be changed to allow the user name to be typed in also + * to make this more secure. + */ + for (pwll = pwllh; done == 0 && pwll->next; pwll = pwll->next) { + name = pwll->pw_name; + lc = pwll->pw_lc; +#else + name = user; +#endif + if ((pass = strchr(buffer, ':')) != NULL) { + *pass++ = '\0'; + style = login_getstyle(lc, buffer, "auth-xlock"); + if (auth_response(name, lc->lc_class, style, + "response", NULL, "", pass) > 0) + done = True; + else if (rlc != NULL) { + style = login_getstyle(rlc, buffer, "auth-xlock"); + if (auth_response(ROOT, rlc->lc_class, style, + "response", NULL, "", pass) > 0) + done = True; + } + pass[-1] = ':'; + } + if (!done) { + style = login_getstyle(lc, NULL, "auth-xlock"); + if (auth_response(name, lc->lc_class, style, + "response", NULL, "", buffer) > 0) + done = True; + else if (rlc != NULL) { + style = login_getstyle(rlc, NULL, "auth-xlock"); + if (auth_response(ROOT, rlc->lc_class, style, + "response", NULL, "", buffer) > 0) + done = True; + } + } +#if ( HAVE_FCNTL_H && (defined( USE_MULTIPLE_ROOT ) || defined( USE_MULTIPLE_USER ))) +} +#endif + +#else /* !BSD_AUTH */ + +#ifdef AFS + { + char *reason; + + /* check afs passwd first, then local, then root */ + if (!ka_UserAuthenticate(user, "", 0, buffer, 0, &reason)) + return True; + + } +#endif /* !AFS */ +#if defined(HAVE_KRB4) || defined(HAVE_KRB5) + { + /* Somehow, buffer gets 'erased' after either doing a krb pw check + or a reg pw check */ + char buffer2[1024]; + + (void) strncpy(buffer2, buffer, sizeof (buffer2)); +#if 0 + if (!strcmp(userpass, "*")) +#endif + if (krb_check_password((struct passwd *) getpwuid(getuid()), buffer2)) + return True; + } +#endif /* !HAVE_KRB4 && !HAVE_KRB5 */ +#if ( HAVE_FCNTL_H && (defined( USE_MULTIPLE_ROOT ) || defined( USE_MULTIPLE_USER ))) + if (!done) { + /* Scan through the linked list until you match a password. Print + * message to log if password match does not equal the user. + * + * This should be changed to allow the user name to be typed in also + * to make this more secure. + */ + for (pwll = pwllh; pwll->next; pwll = pwll->next) + if (!strcmp((char *) crypt(buffer, pwll->pw_passwd), pwll->pw_passwd)) { +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) + if (strcmp(user, pwll->pw_name) != 0) + syslog(SYSLOG_NOTICE, "%s: %s unlocked screen", + ProgramName, pwll->pw_name); +#endif + return True; + } + } +#endif + if (!done) { + done = (!strcmp((char *) crypt(buffer, userpass), userpass)); + /* userpass is used */ + if (!*userpass && *buffer) + /* + * the user has no password, but something was typed anyway. + * sounds fishy: don't let him in... + */ + done = False; + } +#if 0 + (void) printf("buffer=%s, encrypt=%s, userpass=%s\n", buffer, + (char *) crypt(buffer, userpass), userpass); +#endif + if (!done) { + done = (allowroot && + !strcmp((char *) crypt(buffer, rootpass), rootpass)); + if (allowroot && !*rootpass && !*buffer) + /* + * root has no password, don't let him in... + */ + done = False; +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) + if (done) + syslog(SYSLOG_NOTICE, "%s: %s unlocked screen", ProgramName, ROOT); +#endif + } +#endif /* !BSD_AUTH */ +#endif /* !ultrix */ +#endif /* !PAM */ +#endif /* !DCE_PASSWD */ +#endif /* !VMS */ + + return done; +} + +/*- + * Functions for DCE authentication + * + * Revision History: + * 21-Aug-95: Added fallback to static password file [HAK] + * 06-Jul-95: Mods by Heath A. Kehoe for + * inclusion into xlockmore + * May-95: Created by Phil O'Connell + */ + +#ifdef DCE_PASSWD +#include +#include +#ifdef AIXV3 +#include +#endif + +static void +initDCE(void) +{ + sec_login_handle_t login_context; + error_status_t error_status; + boolean32 valid; + struct passwd *pwd; + +#ifdef AIXV3 + struct userpw *userpwd; + +#endif + char *buf; + + /* test to see if this user exists on the network registry */ + valid = sec_login_setup_identity((unsigned_char_p_t) user, + sec_login_no_flags, &login_context, &error_status); + if (!valid) { + switch (error_status) { + case sec_rgy_object_not_found: + break; + case sec_rgy_server_unavailable: + (void) fprintf(stderr, "%s: the network registry is not available.\n", + ProgramName); + break; + case sec_login_s_no_memory: + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: out of memory\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + default: + (void) fprintf(stderr, + "%s: sec_login_setup_identity() returned status %d\n", + ProgramName, (int) error_status); + break; + } + + pwd = getpwnam(user); + if (!pwd || strlen(pwd->pw_passwd) < 10) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: could not get user password\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + usernet = 0; + (void) strcpy(userpass, pwd->pw_passwd); + } else + usernet = 1; + + if (allowroot) { +#ifdef AIXV3 + userpwd = getuserpw("root"); + (void) strcpy(rootpass, userpwd->upw_passwd); + if (!(strcmp(rootpass, ""))) { + (void) fprintf(stderr, "%s: could not get root password\n", ProgramName); + allowroot = 0; + } else { + rootnet = 0; + } +#else + valid = sec_login_setup_identity((unsigned_char_p_t) ROOT, + sec_login_no_flags, &login_context, &error_status); + if (!valid) { + switch (error_status) { + case sec_rgy_object_not_found: + break; + case sec_rgy_server_unavailable: + (void) fprintf(stderr, "%s: the network registry is not available.\n", + ProgramName); + break; + case sec_login_s_no_memory: + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: out of memory\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + default: + (void) fprintf(stderr, + "%s: sec_login_setup_identity() returned status %d\n", + ProgramName, (int) error_status); + break; + } + + pwd = getpwuid(0); + if (!pwd || strlen(pwd->pw_passwd) < 10) { + (void) fprintf(stderr, + "%s: could not get root password\n", ProgramName); + allowroot = 0; + } + rootnet = 0; + (void) strcpy(rootpass, pwd->pw_passwd); + } else + rootnet = 1; +#endif + } + pthread_lock_global_np(); +} + +static char * +error_string(error_status_t error_status) +{ + static char buf[60]; + + switch (error_status) { + case error_status_ok: + return "no error"; + case sec_rgy_object_not_found: + return "The principal does not exist"; + case sec_rgy_server_unavailable: + return "The network registry is not available"; + case sec_login_s_no_memory: + return "Not enough memory is available to complete the operation"; + case sec_login_s_already_valid: + return "The login context has already been validated"; + case sec_login_s_default_use: + return "Can't validate the default context"; + case sec_login_s_acct_invalid: + return "The account is invalid or has expired"; + case sec_login_s_unsupp_passwd_type: + return "The password type is not supported"; + case sec_login_s_context_invalid: + return "The login context itself is not valid"; + default: + (void) sprintf(buf, "error status #%d", (int) error_status); + return buf; + } +} + + +/*- + *---------------------------------------------------------------------- + * Function Created 5/95 to be used with xlock to validate DCE + * passwords. Routine simply returns a (1) if the the variable + * PASS is the USER's PASSWORD, else it returns a (0). + * Functions used: + * + * sec_login_setup_identity + * sec_login_validate_identity + * sec_login_certify_identity + * + * where setup_identity obtains the login context for the USER. + * This identity is then validated with validate_identity. Finally, + * cerfify_identity is called to make sure that the Security + * Server used to set up and validate a login context is legitimate. + * + * Created by Phil O'Connell + * philo@icaen.uiowa.edu + * Student Programmer + * + *----------------------------------------------------------------------- + */ + +static int +check_dce_net_passwd(char *usr, char *pass) +{ + sec_login_handle_t login_context; + error_status_t error_status; + sec_passwd_rec_t password; + boolean32 reset_password; + sec_login_auth_src_t auth_src; + unsigned_char_p_t principal_name; + boolean32 valid = 0; + char *passcpy; + boolean32 current_context; + + + pthread_unlock_global_np(); + /* -------------------- SETUP IDENTITY--------------------------------- */ + + principal_name = (unsigned_char_p_t) usr; + + /* + * We would rather like to refresh and existing login context instead of + * making a new one. + */ + + sec_login_get_current_context(&login_context, &error_status); + if (error_status != error_status_ok) { + current_context = 0; + (void) fprintf(stderr, + "get_current_context failed! Setting up a new one\n"); + + valid = sec_login_setup_identity(principal_name, sec_login_no_flags, + &login_context, &error_status); + + if (!valid) { + (void) fprintf(stderr, "sec_login_setup_identity() failed: %s\n", + error_string(error_status)); + pthread_lock_global_np(); + return False; + } + } else + current_context = 1; + +/*--------------- VALIDATE IDENTITY ---------------------------------*/ + + /* make a copy of pass, because sec_login_validate_identity() will + clobber the plaintext password passed to it */ + passcpy = (char *) strdup(pass); + + password.key.key_type = sec_passwd_plain; + password.key.tagged_union.plain = (unsigned char *) passcpy; + password.pepper = NULL; + password.version_number = sec_passwd_c_version_none; + + valid = sec_login_validate_identity(login_context, &password, &reset_password, &auth_src, &error_status); + + /* report unusual error conditions */ + if (error_status != error_status_ok && + error_status != sec_rgy_passwd_invalid && + error_status != sec_login_s_already_valid && + error_status != sec_login_s_null_password) { + (void) fprintf(stderr, "sec_login_validate_identity failed: %s\n", + error_string(error_status)); + } + /* done with the copy of the password */ + (void) free((void *) passcpy); + + /* Refresh the context if we already have one */ + if (current_context) { + if (!sec_login_refresh_identity(login_context, &error_status)) { + (void) fprintf(stderr, "sec_login_refresh_identity failed: %s\n", + error_string(error_status)); + } else { + passcpy = (char *) strdup(pass); + + password.key.key_type = sec_passwd_plain; + password.key.tagged_union.plain = (unsigned char *) passcpy; + password.pepper = NULL; + password.version_number = sec_passwd_c_version_none; + + /* Have to validate the refreshed context */ + valid = sec_login_validate_identity(login_context, + &password, &reset_password, &auth_src, &error_status); + + /* report unusual error conditions */ + if (error_status != error_status_ok && + error_status != sec_rgy_passwd_invalid && + error_status != sec_login_s_null_password) { + (void) fprintf(stderr, "sec_login_validate_identity failed: %s\n", + error_string(error_status)); + } + } + /* done with the copy of the password */ + (void) free((void *) passcpy); + } + /* make sure that the authentication service is not an imposter */ + if (valid) { + if (!sec_login_certify_identity(login_context, &error_status)) { + (void) fprintf(stderr, "Authentication service is an imposter!\n"); + /* logoutUser(); */ + valid = 0; + } + } + pthread_lock_global_np(); + return valid; +} + +#endif /* DCE_PASSWD */ + +#ifdef HAVE_KRB4 +int +krb_check_password(struct passwd *pwd, char *pass) +{ + char realm[REALM_SZ]; + char tkfile[MAXPATHLEN]; + + /* find local realm */ + if (krb_get_lrealm(realm, 1) != KSUCCESS) +#ifdef KRB_REALM + /* krb_get_default_realm() may not work well on Solaris */ + (void) strncpy(realm, KRB_REALM, sizeof (realm)); +#else + (void) strncpy(realm, krb_get_default_realm(), sizeof (realm)); +#endif + /* Construct a ticket file */ + (void) sprintf(tkfile, "/tmp/xlock_tkt_%d", getpid()); + + /* Now, let's make the ticket file named above the _active_ tkt file */ + krb_set_tkt_string(tkfile); + + /* ask the kerberos server for a ticket! */ + if (krb_get_pw_in_tkt(pwd->pw_name, "", realm, + "krbtgt", realm, + DEFAULT_TKT_LIFE, + pass) == INTK_OK) { + (void) unlink(tkfile); + return True; + } + return False; +} +#endif /* HAVE_KERB4 */ + +#ifdef HAVE_KRB5 +/*- + * Pretty much all of this was snatched out of the kinit from the Kerberos5b6 + * distribution. The reason why I felt it was necessary to use kinit was + * that if someone is locked for a long time, their credentials could expire, + * so xlock must be able to get a new ticket. -- dah + */ +#define KRB5_DEFAULT_OPTIONS 0 +#define KRB5_DEFAULT_LIFE 60*60*10 /* 10 hours */ +static int +krb_check_password(struct passwd *pwd, char *pass) +{ + krb5_context kcontext; + krb5_timestamp now; + krb5_ccache ccache = NULL; + krb5_principal me; + krb5_principal server; + int options = KRB5_DEFAULT_OPTIONS; + krb5_deltat lifetime = KRB5_DEFAULT_LIFE; + krb5_error_code code; + krb5_creds my_creds; + char *client_name; + krb5_address **addrs = (krb5_address **) 0; + krb5_preauthtype *preauth = NULL; + + krb5_data tgtname = + { + 0, + KRB5_TGS_NAME_SIZE, + KRB5_TGS_NAME + }; + + krb5_init_context(&kcontext); + krb5_init_ets(kcontext); + + if ((code = krb5_timeofday(kcontext, &now))) { + com_err(ProgramName, code, "while getting time of day"); + return False; /* seems better to deny access, than just exit, which + was what happened in kinit */ + } + if ((code = krb5_cc_default(kcontext, &ccache))) { + com_err(ProgramName, code, "while getting default ccache"); + return False; + } + code = krb5_cc_get_principal(kcontext, ccache, &me); + if (code) { + if ((code = krb5_parse_name(kcontext, pwd->pw_name, &me))) { + com_err(ProgramName, code, "when parsing name %s", pwd->pw_name); + return False; + } + } + if ((code = krb5_unparse_name(kcontext, me, &client_name))) { + com_err(ProgramName, code, "when unparsing name"); + return False; + } + (void) memset((char *) &my_creds, 0, sizeof (my_creds)); + + my_creds.client = me; + + if ((code = krb5_build_principal_ext(kcontext, &server, + krb5_princ_realm(kcontext, me)->length, + krb5_princ_realm(kcontext, me)->data, + tgtname.length, tgtname.data, + krb5_princ_realm(kcontext, me)->length, + krb5_princ_realm(kcontext, me)->data, + 0))) { + com_err(ProgramName, code, "while building server name"); + return False; + } + my_creds.server = server; + + my_creds.times.starttime = 0; + my_creds.times.endtime = now + lifetime; + my_creds.times.renew_till = 0; + + if (strlen(pass) == 0) + (void) strcpy(pass, "*"); + /* if pass is NULL, krb5_get_in_tkt_with_password will prompt with + krb5_default_pwd_prompt1 for password, you don't want that in + this application, most likely the user won't have '*' for a + password -- dah */ + + code = krb5_get_in_tkt_with_password(kcontext, options, addrs, + NULL, preauth, pass, 0, + &my_creds, 0); + + (void) memset(pass, 0, sizeof (pass)); + + if (code) { + if (code == KRB5KRB_AP_ERR_BAD_INTEGRITY) + return False; /* bad password entered */ + else { + com_err(ProgramName, code, "while getting initial credentials"); + return False; + } + } + code = krb5_cc_initialize(kcontext, ccache, me); + if (code != 0) { + com_err(ProgramName, code, "when initializing cache"); + return False; + } + code = krb5_cc_store_cred(kcontext, ccache, &my_creds); + if (code) { + com_err(ProgramName, code, "while storing credentials"); + return False; + } + krb5_free_principal(kcontext, server); + + krb5_free_context(kcontext); + + return True; /* success */ +} +#endif /* HAVE_KRB5 */ + +#ifndef VMS +#undef passwd +#undef pw_name +#undef pw_passwd +#ifndef SUNOS_ADJUNCT_PASSWD +#include +#endif +#endif + +#if ( HAVE_FCNTL_H && (defined( USE_MULTIPLE_ROOT ) || defined( USE_MULTIPLE_USER ))) + +void +get_multiple(struct passwd *pw) +{ + /* This should be the first element on the linked list. + * If not, then there could be problems. + * Also all memory allocations tend to force an exit of + * the program. This should probably be changed somehow. + */ + if (pwllh == (pwlptr) NULL) { + if ((pwll = new_pwlnode()) == (pwlptr) ENOMEM) { + perror("new"); + exit(1); + } + pwllh = pwll; + } + if ((pwll->pw_name = (char *) strdup(pw->pw_name)) == NULL) { + perror("new"); + exit(1); + } +#ifdef BSD_AUTH + pwll->pw_lc = login_getclass(pw->pw_class); +#else + if ((pwll->pw_passwd = (char *) strdup(pw->pw_passwd)) == NULL) { + perror("new"); + exit(1); + } +#endif + if ((pwll->next = new_pwlnode()) == (pwlptr) ENOMEM) { + perror("new"); + exit(1); + } +} + +void +set_multiple(int uid) +{ +#ifdef BSD_AUTH + struct passwd *pw; + pwlptr pwll; + + if (pwllh == (pwlptr) NULL) { + if ((pwll = new_pwlnode()) == (pwlptr) ENOMEM) { + perror("new"); + exit(1); + } + pwllh = pwll; + } + for (pwll = pwllh; pwll->next; pwll = pwll->next); + + while ((pw = getpwent()) != (struct passwd *) NULL) { + if (pw->pw_uid != uid) + continue; + if ((pwll->pw_name = (char *) strdup(pw->pw_name)) == NULL) { + perror("new"); + exit(1); + } + pwll->pw_lc = login_getclass(pw->pw_class); + + if ((pwll->next = new_pwlnode()) == (pwlptr) ENOMEM) { + perror("new"); + exit(1); + } + } + + if (pwll->next = new_pwlnode()) + pwll = pwll->next; +#else /* !BSD_AUTH */ + /* If you thought the above was sick, then you will think this is + * downright horrific. This is set up so that a child process + * is created to read in the password entries using getpwent(3C). + * In the man pages on the HPs, getpwent(3C) has in it the fact + * that once getpwent(3C) has opened the password file, it keeps + * it open until the process is finished. Thus, the child + * process exits immediately after reading the entire password + * file. Otherwise, the password file remains open the entire + * time this program is running. + * + * I went with getpwent(3C) because it will actually read in + * the password entries from the NIS maps as well. + */ + struct passwd *pw; + int pipefd[2]; + char buf[BUFMAX], xlen; + pid_t cid; + +#ifdef HAVE_SHADOW + struct spwd *spw; + +#endif + + if (pipe(pipefd) < 0) { + perror("Pipe Generation"); + exit(1); + } + if ((cid = fork()) < 0) { + perror("fork"); + exit(1); + } else if (cid == 0) { + /* child process. Used to read in password file. Also checks to + * see if the uid is one we want. If so, then writes that to the pipe. + */ + register int sbuf = 0; + char *cbuf, *pbuf; + + (void) close(pipefd[0]); + while ((pw = getpwent()) != (struct passwd *) NULL) { + if (pw->pw_uid != uid) + continue; +#ifdef HAVE_SHADOW + if ((spw = getspnam(pw->pw_name)) != NULL) { + char *tmp; /* swap */ + + tmp = pw->pw_passwd; + pw->pw_passwd = spw->sp_pwdp; + spw->sp_pwdp = tmp; + } +#endif + if (pw->pw_passwd[0] != '*') { + xlen = strlen(pw->pw_name); + if ((sbuf + xlen) >= BUFMAX) { + if (write(pipefd[1], buf, sbuf) != sbuf) + perror("write"); + sbuf = 0; + } + cbuf = &buf[sbuf]; + *cbuf++ = xlen; + for (pbuf = pw->pw_name; *pbuf;) + *cbuf++ = *pbuf++; + sbuf += xlen + 1; + + xlen = strlen(pw->pw_passwd); + if ((sbuf + xlen) >= BUFMAX) { + if (write(pipefd[1], buf, sbuf) != sbuf) + perror("write"); + sbuf = 0; + } + cbuf = &buf[sbuf]; + *cbuf++ = xlen; + for (pbuf = pw->pw_passwd; *pbuf;) + *cbuf++ = *pbuf++; + sbuf += xlen + 1; + } + } +#ifdef HAVE_SHADOW + endspent(); +#endif + cbuf = &buf[sbuf]; + *cbuf = -1; + sbuf++; + if (write(pipefd[1], buf, sbuf) != sbuf) + perror("write"); + + (void) close(pipefd[1]); + exit(0); + } else { + /* parent process. Does the actual creation of the linked list. + * It assumes that everything coming through the pipe are password + * entries that are authorized to unlock the screen. + */ + register int bufsize = BUFMAX, done = 0, sbuf = BUFMAX, + i; + char *cbuf, *pbuf; + pwlptr pwll; + + (void) close(pipefd[1]); + + if (pwllh == (pwlptr) NULL) { + if ((pwll = new_pwlnode()) == (pwlptr) ENOMEM) { + perror("new"); + exit(1); + } + pwllh = pwll; + } + for (pwll = pwllh; pwll->next; pwll = pwll->next); + while (!done) { + if (sbuf >= bufsize) { + if ((bufsize = read(pipefd[0], buf, BUFMAX)) <= 0) + perror("read"); + sbuf = 0; + } + cbuf = &buf[sbuf]; + xlen = *cbuf++; + if (xlen < 0) { + done = 1; + break; + } + sbuf++; + if (sbuf >= bufsize) { + if ((bufsize = read(pipefd[0], buf, BUFMAX)) <= 0) + perror("read"); + sbuf = 0; + } + if ((pwll->pw_name = (char *) malloc(xlen + 1)) == NULL) + break; + pbuf = pwll->pw_name; + cbuf = &buf[sbuf]; + for (i = 0; i < xlen; i++) { + *pbuf++ = *cbuf++; + sbuf++; + if (sbuf >= bufsize) { + if ((bufsize = read(pipefd[0], buf, BUFMAX)) <= 0) + perror("read"); + sbuf = 0; + cbuf = buf; + } + } + *pbuf = (char) NULL; + + cbuf = &buf[sbuf]; + xlen = *cbuf++; + sbuf++; + if (sbuf >= bufsize) { + if ((bufsize = read(pipefd[0], buf, BUFMAX)) <= 0) + perror("read"); + sbuf = 0; + } + if ((pwll->pw_passwd = (char *) malloc(xlen + 1)) == NULL) + break; + pbuf = pwll->pw_passwd; + cbuf = &buf[sbuf]; + for (i = 0; i < xlen; i++) { + *pbuf++ = *cbuf++; + sbuf++; + if (sbuf >= bufsize) { + if ((bufsize = read(pipefd[0], buf, BUFMAX)) <= 0) + perror("read"); + sbuf = 0; + cbuf = buf; + } + } + *pbuf = (char) NULL; + + if ((pwll->next = new_pwlnode()) == (pwlptr) ENOMEM) + break; + pwll = pwll->next; + } + (void) close(pipefd[0]); + } +#endif /* !BSD_AUTH */ +} + +#endif + +void +initPasswd(void) +{ + getUserName(); +#if !defined( ultrix ) && !defined( DCE_PASSWD ) && !defined( PAM ) + if (!nolock && !inroot && !inwindow && grabmouse) { +#ifdef BSD_AUTH + struct passwd *pwd = getpwnam(user); + + lc = login_getclass(pwd->pw_class); + if (allowroot && (pwd = getpwnam(ROOT)) != NULL) + rlc = login_getclass(pwd->pw_class); +#else /* !BSD_AUTH */ +#ifdef USE_XLOCKRC + gpass(); +#else + getCryptedUserPasswd(); +#endif + if (allowroot) + getCryptedRootPasswd(); +#endif /* !BSD_AUTH */ + } +#endif /* !ultrix && !DCE_PASSWD && !PAM */ +#ifdef DCE_PASSWD + initDCE(); +#endif +} diff --git a/xlock/passwd.h b/xlock/passwd.h new file mode 100644 index 00000000..73618da7 --- /dev/null +++ b/xlock/passwd.h @@ -0,0 +1,2 @@ +extern void initPasswd(void); +extern int checkPasswd(char *buffer); diff --git a/xlock/random.c b/xlock/random.c new file mode 100644 index 00000000..3461c784 --- /dev/null +++ b/xlock/random.c @@ -0,0 +1,45 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)random.c 4.10 98/04/23 xlockmore"; + +#endif + +/*- + * random.c - various utilities for random numbers + * + * Copyright (c) 1998 by David Bagley + * + * Revision History: + * + * Changes maintained by David Bagley + * 23-Apr-96: Separated out of util.c + * + */ + + +/*- + * 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. + */ + +static int Seed = 1; /* This is required to be 32 bits long */ + +/*- + * Given an integer, this routine initializes the RNG seed. + */ +void +SetRNG(long int s) +{ + Seed = (int) s; +} + +/*- + * Returns an integer between 0 and 2147483647, inclusive. + */ +long +LongRNG(void) +{ + if ((Seed = Seed % 44488 * 48271 - Seed / 44488 * 3399) < 0) + Seed += 2147483647; + return (long) (Seed - 1); +} diff --git a/xlock/random.h b/xlock/random.h new file mode 100644 index 00000000..39761f7d --- /dev/null +++ b/xlock/random.h @@ -0,0 +1,59 @@ +#ifndef _RANDOM_H_ +#define _RANDOM_H_ +/*** random number generator ***/ +/* defaults */ +#ifdef STANDALONE +/*- + * 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 */ +#else /* STANDALONE */ +#if HAVE_RAND48 +#define SRAND srand48 +#define LRAND lrand48 +#define MAXRAND (2147483648.0) +#else /* HAVE_RAND48 */ +#if HAVE_RANDOM +#define SRAND srand48 +#define LRAND lrand48 +#define MAXRAND (2147483648.0) +#else /* HAVE_RANDOM */ +#if HAVE_RAND +#define SRAND srand48 +#define LRAND lrand48 +#ifdef AIXV3 +#define MAXRAND (2147483648.0) +#else +#define MAXRAND (32768.0) +#endif +#endif /* HAVE_RAND */ +#endif /* HAVE_RANDOM */ +#endif /* HAVE_RAND48 */ + +#ifndef SRAND +#ifdef __cplusplus + extern "C" { +#endif +extern void SetRNG(long int s); +#ifdef __cplusplus + } +#endif + +#define SRAND(X) SetRNG((long) X) +#endif +#ifndef LRAND +extern long LongRNG(void); + +#define LRAND() LongRNG() +#endif +#ifndef MAXRAND +#define MAXRAND (2147483648.0) +#endif + +#define NRAND(X) ((int)(LRAND()%(X))) +#endif /* STANDALONE */ +#endif /* _RANDOM_H_ */ diff --git a/xlock/ras.c b/xlock/ras.c new file mode 100644 index 00000000..37d1a8e7 --- /dev/null +++ b/xlock/ras.c @@ -0,0 +1,221 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)ras.c 4.00 97/01/01 xlockmore"; + +#endif + +/*- + * Utilities for Sun rasterfile processing + * + * Copyright (c) 1995 by Tobias Gloth + * + * See xlock.c for copying information. + * + * Revision History: + * 3-Mar-96: Added random image selection. + * 12-Dec-95: Modified to be a used in more than one mode + * + * 22-May-95: Written. + */ + +#include "xlock.h" +#include "iostuff.h" +#include "ras.h" +#include + +#define COLORMAP_SIZE 0x100 +#define RGBCOLORMAP_SIZE 0x300 +typedef struct { + int entry[COLORMAP_SIZE]; + unsigned char header[32]; + unsigned char color[RGBCOLORMAP_SIZE]; + unsigned char red[COLORMAP_SIZE], green[COLORMAP_SIZE], blue[COLORMAP_SIZE]; + unsigned char *data; + unsigned long sign; + unsigned long width, height; + unsigned long depth; + unsigned long colors; +} raster; + +static raster ras; + +static unsigned long find_nearest(int r, int g, int b); +static unsigned long get_long(int n); + +static void +analyze_header(void) +{ + ras.sign = get_long(0); + ras.width = get_long(1); + ras.height = get_long(2); + ras.depth = get_long(3); + ras.colors = get_long(7) / 3; +} + +static void +convert_colors(ModeInfo * mi) +{ + int i; + unsigned long black, white, fgpix, bgpix; + XColor fgcol, bgcol; + + black = MI_BLACK_PIXEL(mi); + white = MI_WHITE_PIXEL(mi); + fgpix = MI_FG_PIXEL(mi); + bgpix = MI_BG_PIXEL(mi); + fgcol.pixel = fgpix; + bgcol.pixel = bgpix; + XQueryColor(MI_DISPLAY(mi), MI_COLORMAP(mi), &fgcol); + XQueryColor(MI_DISPLAY(mi), MI_COLORMAP(mi), &bgcol); + + /* Set these, if raster does not overwrite some, so much the better. */ + if (fgpix < COLORMAP_SIZE) { + ras.red[fgpix] = fgcol.red >> 8; + ras.green[fgpix] = fgcol.green >> 8; + ras.blue[fgpix] = fgcol.blue >> 8; + } + if (bgpix < COLORMAP_SIZE) { + ras.red[bgpix] = bgcol.red >> 8; + ras.green[bgpix] = bgcol.green >> 8; + ras.blue[bgpix] = bgcol.blue >> 8; + } + if (white < COLORMAP_SIZE) { + ras.red[white] = 0xFF; + ras.green[white] = 0xFF; + ras.blue[white] = 0xFF; + } + if (black < COLORMAP_SIZE) { + ras.red[black] = 0; + ras.green[black] = 0; + ras.blue[black] = 0; + } + /* Set up raster colors */ + /* Could try juggling this stuff around so it does not conflict + with fg,bg,white,black */ + for (i = 0; i < (int) ras.colors; i++) { + ras.red[i] = ras.color[i + 0 * ras.colors]; + ras.green[i] = ras.color[i + 1 * ras.colors]; + ras.blue[i] = ras.color[i + 2 * ras.colors]; + } + + /* Make sure there is a black ... */ + if (ras.colors <= 0xff) + ras.red[0xff] = ras.green[0xff] = ras.blue[0xff] = 0; +} + +static unsigned long +find_nearest(int r, int g, int b) +{ + unsigned long i, minimum = RGBCOLORMAP_SIZE, imin = 0, t; + + for (i = 0; i < COLORMAP_SIZE; i++) { + t = abs(r - (int) ras.red[i]) + abs(g - (int) ras.green[i]) + + abs(b - (int) ras.blue[i]); + if (t < minimum) { + minimum = t; + imin = i; + } + } +#ifdef DEBUG + (void) fprintf(stderr, "giving (%d/%d/%d)[%ld] for (%d/%d/%d) diff %ld\n", + ras.red[imin], ras.green[imin], ras.blue[imin], imin, r, g, b, minimum); +#endif + return imin; +} + +unsigned long +GetBlack(void) +{ + return ras.entry[find_nearest(0, 0, 0)]; +} + +unsigned long +GetWhite(void) +{ + return ras.entry[find_nearest(0xff, 0xff, 0xff)]; +} + +unsigned long +GetColor(ModeInfo * mi, unsigned long pixel) +{ + XColor col; + + col.pixel = pixel; + XQueryColor(MI_DISPLAY(mi), MI_COLORMAP(mi), &col); + return ras.entry[find_nearest(col.red >> 8, col.green >> 8, col.blue >> 8)]; +} + +static unsigned long +get_long(int n) +{ + return + (((unsigned long) ras.header[4 * n + 0]) << 24) + + (((unsigned long) ras.header[4 * n + 1]) << 16) + + (((unsigned long) ras.header[4 * n + 2]) << 8) + + (((unsigned long) ras.header[4 * n + 3]) << 0); +} + +int +RasterFileToImage(ModeInfo * mi, char *filename, XImage ** image) +{ + int read_width; + FILE *file; + + if ((file = my_fopen(filename, "r")) == NULL) { + /*(void) fprintf(stderr, "could not read file \"%s\"\n", filename); */ + return RasterOpenFailed; + } + (void) fread((void *) ras.header, 8, 4, file); + analyze_header(); + if (ras.sign != 0x59a66a95) { + /* not a raster file */ + (void) fclose(file); + return RasterFileInvalid; + } + if (ras.depth != 8) { + (void) fclose(file); + (void) fprintf(stderr, "only 8-bit Raster files are supported\n"); + return RasterColorFailed; + } + read_width = (int) ras.width; + if ((ras.width & 1) != 0) + read_width++; + ras.data = (unsigned char *) malloc((int) (read_width * ras.height)); + if (!ras.data) { + (void) fclose(file); + (void) fprintf(stderr, "out of memory for Raster file\n"); + return RasterNoMemory; + } + *image = XCreateImage(MI_DISPLAY(mi), MI_VISUAL(mi), + 8, ZPixmap, 0, + (char *) ras.data, (int) ras.width, (int) ras.height, + 16, (int) read_width); + if (!*image) { + (void) fclose(file); + (void) fprintf(stderr, "could not create image from Raster file\n"); + return RasterColorError; + } + (void) fread((void *) ras.color, (int) ras.colors, 3, file); + (void) fread((void *) ras.data, read_width, (int) ras.height, file); + (void) fclose(file); + convert_colors(mi); + return RasterSuccess; +} + +void +SetImageColors(Display * display, Colormap cmap) +{ + XColor xcolor[COLORMAP_SIZE]; + int i; + + for (i = 0; i < COLORMAP_SIZE; i++) { + xcolor[i].flags = DoRed | DoGreen | DoBlue; + xcolor[i].red = ras.red[i] << 8; + xcolor[i].green = ras.green[i] << 8; + xcolor[i].blue = ras.blue[i] << 8; + if (!XAllocColor(display, cmap, xcolor + i)) + error("not enough colors.\n"); + ras.entry[i] = (int) xcolor[i].pixel; + } +/* for (i = 0; i < ras.width * ras.height; i++) ras.data[i] = + ras.entry[ras.data[i]]; */ +} diff --git a/xlock/ras.h b/xlock/ras.h new file mode 100644 index 00000000..10d4cc65 --- /dev/null +++ b/xlock/ras.h @@ -0,0 +1,27 @@ +/*- + * @(#)ras.h 3.9 96/05/25 xlockmore + * + * Utilities for Sun rasterfile processing + * + * Copyright (c) 1995 by Tobias Gloth + * + * See xlock.c for copying information. + * + * Revision History: + * 12-Dec-95: Modified to be a used in more than one mode + * + * 22-May-95: Written. + */ + +#define RasterColorError 1 +#define RasterSuccess 0 +#define RasterOpenFailed -1 +#define RasterFileInvalid -2 +#define RasterNoMemory -3 +#define RasterColorFailed -4 + +extern int RasterFileToImage(ModeInfo * mi, char *filename, XImage ** image); +extern void SetImageColors(Display * display, Colormap cmap); +extern unsigned long GetBlack(void); +extern unsigned long GetWhite(void); +extern unsigned long GetColor(ModeInfo * mi, unsigned long pixel); diff --git a/xlock/resource.c b/xlock/resource.c new file mode 100644 index 00000000..e96da2dd --- /dev/null +++ b/xlock/resource.c @@ -0,0 +1,2049 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)resource.c 4.08 98/08/04 xlockmore"; + +#endif + +/*- + * resource.c - resource management for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * + * Changes maintained by David Bagley + * 19-Jun-98: batchcount depreciated. Use count instead. batchcount still + * works for commandline. + * 01-May-97: Matthew Rench + * Added DPMS options. + * 01-Apr-97: Tom Schmidt + * Fixed memory leak. Made -visual option a hacker mode for now. + * 20-Mar-97: Tom Schmidt + * Added -visual option. + * 3-Apr-96: Jouk Jansen + * Supply for wildcards for filenames for random selection + * 18-Mar-96: Ron Hitchens + * Setup chosen mode with set_default_mode() for new hook scheme. + * 6-Mar-96: Jouk Jansen + * Remote node checking for VMS fixed + * 20-Dec-95: Ron Hitchens + * Resource parsing fixed for "nolock". + * 02-Aug-95: Patch to use default delay, etc., from mode.h thanks to + * Roland Bock + * 17-Jun-95: Split out mode.h from resource.c . + * 29-Mar-95: Added -cycles for more control over a lockscreen similar to + * -delay, -batchcount, and -saturation. + * 21-Feb-95: MANY patches from Heath A. Kehoe . + * 21-Dec-94: patch for -delay, -batchcount and -saturation for X11R5+ + * from Patrick D Sullivan . + * 18-Dec-94: -inroot option added from Bill Woodward . + * 20-Sep-94: added bat mode from Lorenzo Patocchi . + * 11-Jul-94: added grav mode, and inwindow option from Greg Bowering + * + * 22-Jun-94: Modified for VMS + * + * 17-Jun-94: default changed from life to blank + * 21-Mar-94: patch fix for AIXV3 from + * 01-Dec-93: added patch for AIXV3 from Tom McConnell + * + * 29-Jun-93: added spline, maze, sphere, hyper, helix, rock, and blot mode. + * + * Changes of Patrick J. Naughton + * 25-Sep-91: added worm mode. + * 24-Jun-91: changed name to username. + * 06-Jun-91: Added flame mode. + * 24-May-91: Added -name and -usefirst and -resources. + * 16-May-91: Added random mode and pyro mode. + * 26-Mar-91: checkResources: delay must be >= 0. + * 29-Oct-90: Added #include for missing isupper() on some OS revs. + * moved -mode option, reordered Xrm database evaluation. + * 28-Oct-90: Added text strings. + * 26-Oct-90: Fix bug in mode specific options. + * 31-Jul-90: Fix ':' handling in parsefilepath + * 07-Jul-90: Created from resource work in xlock.c + * + */ + +#include "xlock.h" +#include "vis.h" +#include "iostuff.h" +#include "version.h" +#if VMS +#if ( __VMS_VER < 70000000 ) +#ifdef __DECC +#define gethostname decc$gethostname +#define gethostbyname decc$gethostbyname +#endif +#else +#include +#endif +#endif + +#ifndef offsetof +#define offsetof(s,m) ((char*)(&((s *)0)->m)-(char*)0) +#endif + +#ifdef USE_MODULES +#ifndef DEF_MODULEPATH +#define DEF_MODULEPATH "/usr/lib/X11/xlock_modules" +#endif +#endif + +#ifndef DEF_FILESEARCHPATH +#ifdef VMS +#include +#include +#include +#include +#include +#include + +#define DEF_FILESEARCHPATH "DECW$SYSTEM_DEFAULTS:DECW$%N.DAT%S" +#define BUFSIZE 132 +#define DECW$C_WS_DSP_TRANSPORT 2 /* taken from wsdriver.lis */ +#define IO$M_WS_DISPLAY 0x00000040 /* taken from wsdriver */ + +extern void checkResources(void); + +struct descriptor_t { /* descriptor structure */ + unsigned short len; + unsigned char type; + unsigned char c_class; + char *ptr; +}; +typedef struct descriptor_t dsc; + +/* $dsc creates a descriptor for a predefined string */ + +#define $dsc(name,string) dsc name = { sizeof(string)-1,14,1,string} + +/* $dscp creates a descriptor pointing to a buffer allocated elsewhere */ + +#define $dscp(name,size,addr) dsc name = { size,14,1,addr } + +static int descr(); + +#else +#define DEF_FILESEARCHPATH "/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%T/%N%S" +#endif +#endif +#ifndef DEF_MODE +#if 0 +#define DEF_MODE "blank" /* May be safer */ +#else +#define DEF_MODE "random" /* May be more interesting */ +#endif +#endif +#define DEF_DELAY "200000" /* microseconds between batches */ +#define DEF_COUNT "100" /* vectors (or whatever) per batch */ +#define DEF_CYCLES "1000" /* timeout in cycles for a batch */ +#define DEF_SIZE "0" /* size, default if 0 */ +#define DEF_NCOLORS "64" /* maximum number of colors */ +#define DEF_SATURATION "1.0" /* color ramp saturation 0->1 */ +#define DEF_NICE "10" /* xlock process nicelevel */ +#define DEF_ERASEDELAY "400" /* Speed for screen erase modes */ +#define DEF_LOCKDELAY "0" /* secs until lock */ +#define DEF_TIMEOUT "30" /* secs until password entry times out */ +#ifndef DEF_FONT +#ifdef AIXV3 +#define DEF_FONT "fixed" +#else /* !AIXV3 */ +#define DEF_FONT "-b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*-iso8859-1" +#endif /* !AIXV3 */ +#endif +#define DEF_PLANFONT "-adobe-courier-medium-r-*-*-14-*-*-*-m-*-iso8859-1" +#ifdef USE_MB +#define DEF_FONTSET DEF_FONT ## ",-*-24-*" +#endif +#define DEF_BG "White" +#define DEF_FG "Black" +#ifdef FR +#define DEF_NAME "Nom: " +#define DEF_PASS "Mot de passe: " +#define DEF_VALID "Validation ..." +#define DEF_INVALID "Mot de passe Invalide." +#define DEF_INFO "Entrez le mot de passe ou choisissez l'icone pour verrouiller." +#else +#ifdef NL +#define DEF_NAME "Naam: " +#define DEF_PASS "Wachtwoord: " +#define DEF_VALID "Aan het checken ..." +#define DEF_INVALID "Ongeldig wachtwoord." +#define DEF_INFO "Geef wachtwoord om te ontgrendelen ; selecteer het icoon om te vergendelen." +#else +#define DEF_NAME "Name: " +#define DEF_PASS "Password: " +#define DEF_VALID "Validating login..." +#define DEF_INVALID "Invalid login." +#define DEF_INFO "Enter password to unlock; select icon to lock." +#endif +#endif +#ifdef SAFEWORD +#define DEF_DPASS "Dynamic password: " +#define DEF_FPASS "Fixed Password: " +#define DEF_CHALL "Challenge: " +#endif +#define DEF_GEOMETRY "" +#define DEF_ICONGEOMETRY "" +#ifdef FX +#define DEF_GLGEOMETRY "" +#endif +#define DEF_DELTA3D "1.5" /* space between things in 3d mode relative to their size */ +#ifndef DEF_MESSAGESFILE +#define DEF_MESSAGESFILE "" +#endif +#ifndef DEF_MESSAGEFILE +#define DEF_MESSAGEFILE "" +#endif +#ifndef DEF_MESSAGE +/* #define DEF_MESSAGE "I am out running around." */ +#define DEF_MESSAGE "" +#endif +#ifndef DEF_BITMAP +#define DEF_BITMAP "" +#endif +#ifndef DEF_MAILAPP +#define DEF_MAILAPP "" +#endif +#ifdef USE_VTLOCK +#define VTLOCKMODE_OFF "off" +#define VTLOCKMODE_NOSWITCH "noswitch" +#define VTLOCKMODE_SWITCH "switch" +#define VTLOCKMODE_RESTORE "restore" +#define DEF_VTLOCK VTLOCKMODE_OFF +#endif +#define DEF_CLASSNAME "XLock" +/*- + Grid Number of Neigbors + ---- ------------------ + Square 4 or 8 + Hexagon 6 + Triangle 3, 9 or 12 <- 9 is not too mathematically sound... +*/ +#define DEF_NEIGHBORS "0" /* automata mode will choose best or random value */ +#define DEF_MOUSE "False" + +#ifdef USE_RPLAY +#define DEF_LOCKSOUND "thank-you" +#define DEF_INFOSOUND "identify-please" +#define DEF_VALIDSOUND "complete" +#define DEF_INVALIDSOUND "not-programmed" +#else /* !USE_RPLAY */ +#if defined ( DEF_PLAY ) || defined ( USE_NAS ) +#define DEF_LOCKSOUND "thank-you.au" +#define DEF_INFOSOUND "identify-please.au" +#define DEF_VALIDSOUND "complete.au" +#define DEF_INVALIDSOUND "not-programmed.au" +#else /* !DEF_PLAY && !USE_NAS */ +#ifdef USE_VMSPLAY +#define DEF_LOCKSOUND "[]thank-you.au" +#define DEF_INFOSOUND "[]identify-please.au" +#define DEF_VALIDSOUND "[]complete.au" +#define DEF_INVALIDSOUND "[]not-programmed.au" +#endif /* !USE_VMSPLAY */ +#endif /* !DEF_PLAY && !USE_NAS */ +#endif /* !USE_RPLAY */ + +#if defined( USE_AUTO_LOGOUT ) && !defined( DEF_AUTO_LOGOUT ) +#if ( USE_AUTO_LOGOUT <= 0 ) +#define DEF_AUTO_LOGOUT "120" /* User Default, can be overridden */ +#else +#define DEF_AUTO_LOGOUT "0" /* User Default, can be overridden */ +#endif +#endif + +#ifdef USE_DPMS +#define DEF_DPMSSTANDBY "-1" +#define DEF_DPMSSUSPEND "-1" +#define DEF_DPMSOFF "-1" +#endif + +#if defined( USE_BUTTON_LOGOUT ) +#if !defined( DEF_BUTTON_LOGOUT ) +#if ( USE_BUTTON_LOGOUT <= 0 ) +#define DEF_BUTTON_LOGOUT "5" /* User Default, can be overridden */ +#else +#define DEF_BUTTON_LOGOUT "0" /* User Default, can be overridden */ +#endif +#endif + +#ifdef FR +#define DEF_BTN_LABEL "Logout" +#define DEF_BTN_HELP "Cliquer ici pour etre deloger" +#define DEF_FAIL "Auto-logout a echoue" +#else +#ifdef NL +#define DEF_BTN_LABEL "Loguit" +#define DEF_BTN_HELP "klik hier om uit te loggen" +#define DEF_FAIL "Auto-loguit mislukt" +#else +#define DEF_BTN_LABEL "Logout" /* string that appears in logout button */ + +/* this string appears immediately below logout button */ +#define DEF_BTN_HELP "Click here to logout" + +/* this string appears in place of the logout button if user could not be + logged out */ +#define DEF_FAIL "Auto-logout failed" + +#endif +#endif +#endif + +/* For modes with text, marquee & nose */ +extern char *program; +extern char *messagesfile; +extern char *messagefile; +extern char *message; /* flag as well here */ +extern char *messagefontname; + +/* For automata modes */ +extern int neighbors; + +/* For eyes, julia, & swarm modes */ +Bool mouse; + +char hostname[MAXHOSTNAMELEN]; +static char *mode; +char *displayname = NULL; +static char *classname; +static char *modename; +static char *modeclassname; +extern Window parent; +static char *parentname; +extern Bool parentSet; + +#if HAVE_DIRENT_H +static struct dirent ***images_list = NULL; +int num_list = 0; +struct dirent **image_list = NULL; +char filename_r[MAXNAMLEN]; +char directory_r[DIRBUF]; + +#endif + +static XrmOptionDescRec genTable[] = +{ + {"-mode", ".mode", XrmoptionSepArg, (caddr_t) NULL}, + {"-erasemode", ".erasemode", XrmoptionSepArg, (caddr_t) NULL}, + {"-erasedelay", ".erasedelay", XrmoptionSepArg, (caddr_t) NULL}, + {"-nolock", ".nolock", XrmoptionNoArg, (caddr_t) "on"}, + {"+nolock", ".nolock", XrmoptionNoArg, (caddr_t) "off"}, +#ifdef USE_VTLOCK + {"-vtlock", ".vtlock", XrmoptionSepArg, (caddr_t) NULL}, +#endif + {"-inwindow", ".inwindow", XrmoptionNoArg, (caddr_t) "on"}, + {"+inwindow", ".inwindow", XrmoptionNoArg, (caddr_t) "off"}, + {"-inroot", ".inroot", XrmoptionNoArg, (caddr_t) "on"}, + {"+inroot", ".inroot", XrmoptionNoArg, (caddr_t) "off"}, + {"-remote", ".remote", XrmoptionNoArg, (caddr_t) "on"}, + {"+remote", ".remote", XrmoptionNoArg, (caddr_t) "off"}, + {"-mono", ".mono", XrmoptionNoArg, (caddr_t) "on"}, + {"+mono", ".mono", XrmoptionNoArg, (caddr_t) "off"}, + {"-allowaccess", ".allowaccess", XrmoptionNoArg, (caddr_t) "on"}, + {"+allowaccess", ".allowaccess", XrmoptionNoArg, (caddr_t) "off"}, + {"-allowroot", ".allowroot", XrmoptionNoArg, (caddr_t) "on"}, + {"+allowroot", ".allowroot", XrmoptionNoArg, (caddr_t) "off"}, + {"-debug", ".debug", XrmoptionNoArg, (caddr_t) "on"}, + {"+debug", ".debug", XrmoptionNoArg, (caddr_t) "off"}, + {"-description", ".description", XrmoptionNoArg, (caddr_t) "on"}, + {"+description", ".description", XrmoptionNoArg, (caddr_t) "off"}, + {"-echokeys", ".echokeys", XrmoptionNoArg, (caddr_t) "on"}, + {"+echokeys", ".echokeys", XrmoptionNoArg, (caddr_t) "off"}, + {"-enablesaver", ".enablesaver", XrmoptionNoArg, (caddr_t) "on"}, + {"+enablesaver", ".enablesaver", XrmoptionNoArg, (caddr_t) "off"}, + {"-resetsaver", ".resetsaver", XrmoptionNoArg, (caddr_t) "on"}, + {"+resetsaver", ".resetsaver", XrmoptionNoArg, (caddr_t) "off"}, + {"-grabmouse", ".grabmouse", XrmoptionNoArg, (caddr_t) "on"}, + {"+grabmouse", ".grabmouse", XrmoptionNoArg, (caddr_t) "off"}, + {"-grabserver", ".grabserver", XrmoptionNoArg, (caddr_t) "on"}, + {"+grabserver", ".grabserver", XrmoptionNoArg, (caddr_t) "off"}, + {"-install", ".install", XrmoptionNoArg, (caddr_t) "on"}, + {"+install", ".install", XrmoptionNoArg, (caddr_t) "off"}, + {"-mousemotion", ".mousemotion", XrmoptionNoArg, (caddr_t) "on"}, + {"+mousemotion", ".mousemotion", XrmoptionNoArg, (caddr_t) "off"}, + {"-sound", ".sound", XrmoptionNoArg, (caddr_t) "on"}, + {"+sound", ".sound", XrmoptionNoArg, (caddr_t) "off"}, + {"-timeelapsed", ".timeelapsed", XrmoptionNoArg, (caddr_t) "on"}, + {"+timeelapsed", ".timeelapsed", XrmoptionNoArg, (caddr_t) "off"}, + {"-usefirst", ".usefirst", XrmoptionNoArg, (caddr_t) "on"}, + {"+usefirst", ".usefirst", XrmoptionNoArg, (caddr_t) "off"}, + {"-verbose", ".verbose", XrmoptionNoArg, (caddr_t) "on"}, + {"+verbose", ".verbose", XrmoptionNoArg, (caddr_t) "off"}, + {"-nice", ".nice", XrmoptionSepArg, (caddr_t) NULL}, + {"-lockdelay", ".lockdelay", XrmoptionSepArg, (caddr_t) NULL}, + {"-timeout", ".timeout", XrmoptionSepArg, (caddr_t) NULL}, + {"-font", ".font", XrmoptionSepArg, (caddr_t) NULL}, + {"-planfont", ".planfont", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef USE_MB + {"-fontset", ".fontset", XrmoptionSepArg, (caddr_t) NULL}, +#endif + {"-bg", ".background", XrmoptionSepArg, (caddr_t) NULL}, + {"-fg", ".foreground", XrmoptionSepArg, (caddr_t) NULL}, + {"-background", ".background", XrmoptionSepArg, (caddr_t) NULL}, + {"-foreground", ".foreground", XrmoptionSepArg, (caddr_t) NULL}, + {"-username", ".username", XrmoptionSepArg, (caddr_t) NULL}, + {"-password", ".password", XrmoptionSepArg, (caddr_t) NULL}, + {"-info", ".info", XrmoptionSepArg, (caddr_t) NULL}, + {"-validate", ".validate", XrmoptionSepArg, (caddr_t) NULL}, + {"-invalid", ".invalid", XrmoptionSepArg, (caddr_t) NULL}, + {"-geometry", ".geometry", XrmoptionSepArg, (caddr_t) NULL}, + {"-icongeometry", ".icongeometry", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef FX + {"-glgeometry", ".glgeometry", XrmoptionSepArg, (caddr_t) NULL}, +#endif + + {"-wireframe", ".wireframe", XrmoptionNoArg, (caddr_t) "on"}, + {"+wireframe", ".wireframe", XrmoptionNoArg, (caddr_t) "off"}, + + {"-use3d", ".use3d", XrmoptionNoArg, (caddr_t) "on"}, + {"+use3d", ".use3d", XrmoptionNoArg, (caddr_t) "off"}, + {"-delta3d", ".delta3d", XrmoptionSepArg, (caddr_t) NULL}, + {"-none3d", ".none3d", XrmoptionSepArg, (caddr_t) NULL}, + {"-right3d", ".right3d", XrmoptionSepArg, (caddr_t) NULL}, + {"-left3d", ".left3d", XrmoptionSepArg, (caddr_t) NULL}, + {"-both3d", ".both3d", XrmoptionSepArg, (caddr_t) NULL}, + + /* For modes with text, marquee & nose */ + {"-program", ".program", XrmoptionSepArg, (caddr_t) NULL}, + {"-messagesfile", ".messagesfile", XrmoptionSepArg, (caddr_t) NULL}, + {"-messagefile", ".messagefile", XrmoptionSepArg, (caddr_t) NULL}, + {"-message", ".message", XrmoptionSepArg, (caddr_t) NULL}, + {"-messagefont", ".messagefont", XrmoptionSepArg, (caddr_t) NULL}, + /* For automata modes */ + {"-neighbors", ".neighbors", XrmoptionSepArg, (caddr_t) NULL}, + /* For eyes and julia modes */ + {"-mouse", ".mouse", XrmoptionNoArg, (caddr_t) "on"}, + {"+mouse", ".mouse", XrmoptionNoArg, (caddr_t) "off"}, + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC ) + {"-cpasswd", ".cpasswd", XrmoptionSepArg, (caddr_t) NULL}, +#endif +#ifdef USE_AUTO_LOGOUT + {"-logoutAuto", ".logoutAuto", XrmoptionSepArg, (caddr_t) NULL}, +#endif +#ifdef USE_BUTTON_LOGOUT + {"-logoutButton", ".logoutButton", XrmoptionSepArg, (caddr_t) NULL}, +{"-logoutButtonLabel", ".logoutButtonLabel", XrmoptionSepArg, (caddr_t) NULL}, + {"-logoutButtonHelp", ".logoutButtonHelp", XrmoptionSepArg, (caddr_t) NULL}, + {"-logoutFailedString", ".logoutFailedString", XrmoptionSepArg, (caddr_t) NULL}, +#endif +#ifdef USE_DTSAVER + {"-dtsaver", ".dtsaver", XrmoptionNoArg, (caddr_t) "on"}, + {"+dtsaver", ".dtsaver", XrmoptionNoArg, (caddr_t) "off"}, +#endif +#ifdef USE_SOUND + {"-locksound", ".locksound", XrmoptionSepArg, (caddr_t) NULL}, + {"-infosound", ".infosound", XrmoptionSepArg, (caddr_t) NULL}, + {"-validsound", ".validsound", XrmoptionSepArg, (caddr_t) NULL}, + {"-invalidsound", ".invalidsound", XrmoptionSepArg, (caddr_t) NULL}, +#endif + {"-startCmd", ".startCmd", XrmoptionSepArg, (caddr_t) NULL}, + {"-endCmd", ".endCmd", XrmoptionSepArg, (caddr_t) NULL}, + {"-logoutCmd", ".logoutCmd", XrmoptionSepArg, (caddr_t) NULL}, + + {"-mailCmd", ".mailCmd", XrmoptionSepArg, (caddr_t) ""}, + {"-mailIcon", ".mailIcon", XrmoptionSepArg, (caddr_t) ""}, + {"-nomailIcon", ".nomailIcon", XrmoptionSepArg, (caddr_t) ""}, +#ifdef USE_DPMS + {"-dpmsstandby", ".dpmsstandby", XrmoptionSepArg, (caddr_t) NULL}, + {"-dpmssuspend", ".dpmssuspend", XrmoptionSepArg, (caddr_t) NULL}, + {"-dpmsoff", ".dpmsoff", XrmoptionSepArg, (caddr_t) NULL}, +#endif +}; + +#define genEntries (sizeof genTable / sizeof genTable[0]) + +static XrmOptionDescRec modeTable[] = +{ + {"-delay", "*delay", XrmoptionSepArg, (caddr_t) NULL}, + {"-batchcount", "*count", XrmoptionSepArg, (caddr_t) NULL}, + {"-count", "*count", XrmoptionSepArg, (caddr_t) NULL}, + {"-cycles", "*cycles", XrmoptionSepArg, (caddr_t) NULL}, + {"-size", "*size", XrmoptionSepArg, (caddr_t) NULL}, + {"-ncolors", "*ncolors", XrmoptionSepArg, (caddr_t) NULL}, + {"-saturation", "*saturation", XrmoptionSepArg, (caddr_t) NULL}, + /* For modes with images, xbm, xpm, & ras */ + {"-bitmap", "*bitmap", XrmoptionSepArg, (caddr_t) NULL}, +}; + +#define modeEntries (sizeof modeTable / sizeof modeTable[0]) + +/*- + Chicken/egg problem here. + Customization strings will only work with +#define CUSTOMIZATION + I prefer not to use it because "xlock -display whatever:0" does not work. + If I get any complaints about this I will change it the default. + */ + +static XrmOptionDescRec cmdlineTable[] = +{ +#ifndef CUSTOMIZATION + {"-display", ".display", XrmoptionSepArg, (caddr_t) NULL}, +#endif + {"-visual", ".visual", XrmoptionSepArg, (caddr_t) NULL}, + {"-parent", ".parent", XrmoptionSepArg, (caddr_t) NULL}, + {"-nolock", ".nolock", XrmoptionNoArg, (caddr_t) "on"}, + {"+nolock", ".nolock", XrmoptionNoArg, (caddr_t) "off"}, + {"-remote", ".remote", XrmoptionNoArg, (caddr_t) "on"}, + {"+remote", ".remote", XrmoptionNoArg, (caddr_t) "off"}, + {"-inwindow", ".inwindow", XrmoptionNoArg, (caddr_t) "on"}, + {"+inwindow", ".inwindow", XrmoptionNoArg, (caddr_t) "off"}, + {"-inroot", ".inroot", XrmoptionNoArg, (caddr_t) "on"}, + {"+inroot", ".inroot", XrmoptionNoArg, (caddr_t) "off"}, +#ifdef USE_DTSAVER + {"-dtsaver", ".dtsaver", XrmoptionNoArg, (caddr_t) "on"}, + {"+dtsaver", ".dtsaver", XrmoptionNoArg, (caddr_t) "off"}, +#endif + {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL} +}; + +#define cmdlineEntries (sizeof cmdlineTable / sizeof cmdlineTable[0]) + +static XrmOptionDescRec earlyCmdlineTable[] = +{ + {"-name", ".name", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef CUSTOMIZATION + {"-display", ".display", XrmoptionSepArg, (caddr_t) NULL}, +#endif +}; + +#define earlyCmdlineEntries (sizeof earlyCmdlineTable / sizeof earlyCmdlineTable[0]) + +#ifdef USE_MODULES +static XrmOptionDescRec modulepathTable[] = +{ + {"-modulepath", ".modulepath", XrmoptionSepArg, (caddr_t) NULL}, +}; + +#endif + +static OptionStruct opDesc[] = +{ + {"-help", "print out this message to standard output"}, + {"-version", "print version number (if >= 4.00) to standard output"}, + {"-resources", "print default resource file to standard output"}, + {"-display displayname", "X server to contact"}, +#ifdef USE_MODULES + {"-modulepath", "directory where screensaver modules are stored"}, +#endif + {"-visual visualname", "X visual to use"}, + {"-parent", "parent window id (for inwindow)"}, +{"-name resourcename", "class name to use for resources (default is XLock)"}, + {"-delay usecs", "microsecond delay between screen updates"}, + {"-batchcount num", "number of things per batch (depreciated)"}, + {"-count num", "number of things per batch"}, + {"-cycles num", "number of cycles per batch"}, + {"-size num", "size of a unit in a mode, default is 0"}, + {"-ncolors num", "maximum number of colors, default is 64"}, + {"-saturation value", "saturation of color ramp"}, + /* For modes with images, xbm, xpm, & ras */ +#if defined( USE_XPM ) || defined( USE_XPMINC ) + {"-bitmap filename", "bitmap file (sometimes xpm and ras too)"}, +#else + {"-bitmap filename", "bitmap file (sometimes ras too)"}, +#endif + {"-erasemode erase-modename", "Erase mode to use"}, + {"-erasedelay num", "Erase delay for clear screen modes"}, + {"-/+nolock", "turn on/off no password required"}, + {"-/+inwindow", "turn on/off making xlock run in a window"}, + {"-/+inroot", "turn on/off making xlock run in the root window"}, + {"-/+remote", "turn on/off remote host access"}, + {"-/+mono", "turn on/off monochrome override"}, + {"-/+allowaccess", "turn on/off allow new clients to connect"}, +#ifdef USE_VTLOCK + {"-vtlock lock-modename", "turn on vt switching in [" VTLOCKMODE_SWITCH "|" VTLOCKMODE_NOSWITCH "|" VTLOCKMODE_RESTORE "] lock-mode"}, + +#endif +#ifndef ALWAYS_ALLOW_ROOT + {"-/+allowroot", "turn on/off allow root password to unlock"}, +#else + {"-/+allowroot", "turn on/off allow root password to unlock (off ignored)"}, +#endif + {"-/+debug", "whether to use debug xlock (yes/no)"}, + {"-/+description", "whether to show mode description (yes/no)"}, + {"-/+echokeys", "turn on/off echo '?' for each password key"}, + {"-/+enablesaver", "turn on/off enable X server screen saver"}, + {"-/+resetsaver", "turn on/off enable X server screen saver"}, + {"-/+grabmouse", "turn on/off grabbing of mouse and keyboard"}, + {"-/+grabserver", "turn on/off grabbing of server"}, + {"-/+install", "whether to use private colormap if needed (yes/no)"}, + {"-/+mousemotion", "turn on/off sensitivity to mouse"}, + {"-/+sound", "whether to use sound if configured for it (yes/no)"}, + {"-/+timeelapsed", "turn on/off clock"}, + {"-/+usefirst", "turn on/off using the first char typed in password"}, + {"-/+verbose", "turn on/off verbosity"}, + {"-nice level", "nice level for xlock process"}, + {"-lockdelay seconds", "number of seconds until lock"}, + {"-timeout seconds", "number of seconds before password times out"}, + {"-font fontname", "font to use for password prompt"}, + {"-planfont fontname", "font to use for plan message"}, +#ifdef USE_MB + {"-fontset fontsetname", "fontset to use for Xmb..."}, +#endif + {"-bg color", "background color to use for password prompt"}, + {"-fg color", "foreground color to use for password prompt"}, + {"-background color", "background color to use for password prompt"}, + {"-foreground color", "foreground color to use for password prompt"}, + {"-username string", "text string to use for Name prompt"}, + {"-password string", "text string to use for Password prompt"}, + {"-info string", "text string to use for instructions"}, + {"-validate string", "text string to use for validating password message"}, + {"-invalid string", "text string to use for invalid password message"}, + {"-geometry geom", "geometry for non-full screen lock"}, + {"-icongeometry geom", "geometry for password window (location ignored)"}, +#ifdef FX + {"-glgeometry geom", "geometry for gl modes (location ignored)"}, +#endif + {"-/+wireframe", "turn on/off wireframe"}, + + {"-/+use3d", "turn on/off 3d view"}, + {"-delta3d value", "space between the center of your 2 eyes for 3d mode"}, + {"-none3d color", "color to be used for null in 3d mode"}, + {"-right3d color", "color to be used for the right eye in 3d mode"}, + {"-left3d color", "color to be used for the left eye in 3d mode"}, + {"-both3d color", "color to be used overlap in 3d mode"}, + + /* For modes with text, marquee & nose */ + {"-program programname", "program to get messages from, usually fortune"}, + {"-messagesfile formatted-filename", "formatted file of fortunes"}, + {"-messagefile filename", "text file for mode"}, + {"-message string", "text for mode"}, + {"-messagefont fontname", "font for a specific mode"}, + /* For automata modes */ + {"-neighbors num", "squares 4 or 8, hexagons 6, triangles 3, 9 or 12"}, + /* For eyes and julia modes */ + {"-/+mouse", "turn on/off the grabbing the mouse"}, + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC ) + {"-cpasswd crypted-password", "text string of encrypted password"}, +#endif +#ifdef USE_AUTO_LOGOUT + {"-logoutAuto minutes", "number of minutes until auto logout (not more than forced auto logout time)"}, +#endif +#ifdef USE_BUTTON_LOGOUT + {"-logoutButton minutes", "number of minutes until logout button appears (not more than forced button time)"}, + {"-logoutButtonLabel string", "text string to use inside logout button"}, + {"-logoutButtonHelp string", "text string to use for logout button help"}, + {"-logoutFailedString string", "text string to use for failed logout attempts"}, +#endif +#ifdef USE_DTSAVER + {"-/+dtsaver", "turn on/off CDE Saver Mode"}, +#endif +#ifdef USE_SOUND + {"-locksound string", "sound to use at locktime"}, + {"-infosound string", "sound to use for information"}, + {"-validsound string", "sound to use when password is valid"}, + {"-invalidsound string", "sound to use when password is invalid"}, +#endif + {"-startCmd string", "command to run at locktime"}, + {"-endCmd string", "command to run when unlocking"}, + {"-logoutCmd string", "command to run when automatically logging out"}, + {"-mailCmd string", "command to run to check for mail"}, + {"-mailIcon string", "Icon to display when there is mail"}, + {"-nomailIcon string", "Icon to display when there is no mail"}, +#ifdef USE_DPMS + {"-dpmsstandby seconds", "seconds to wait before engaging DPMS standby"}, + {"-dpmssuspend seconds", "seconds to wait before engaging DPMS suspend"}, + {"-dpmsoff seconds", "seconds to wait before engaging DPMS off"}, +#endif +}; + +#define opDescEntries (sizeof opDesc / sizeof opDesc[0]) + +int delay; +int count; +int cycles; +int size; +int ncolors; +float saturation; + +/* For modes with images, xbm, xpm, & ras */ +char *bitmap; + +#ifdef USE_MODULES +char *modulepath; + +#endif + +static char *erasemodename; +int erasemode; +int erasedelay; +Bool nolock; +Bool inwindow; +Bool inroot; +Bool mono; + +Bool allowaccess; + +#ifdef ALWAYS_ALLOW_ROOT +Bool allowroot = 1; + +#else +Bool allowroot; + +#endif +Bool debug; +Bool description; +Bool echokeys; +Bool enablesaver; +Bool resetsaver; +Bool fullrandom = False; +Bool grabmouse; +Bool grabserver; +Bool install; +Bool mousemotion; +Bool sound; +Bool timeelapsed; +Bool usefirst; +Bool verbose; +Bool remote; + +static char *visualname; +int VisualClassWanted; + +int nicelevel; +int lockdelay; +int timeout; + +char *fontname; +char *planfontname; + +#ifdef USE_DPMS +int dpmsstandby; +int dpmssuspend; +int dpmsoff; + +#endif + +#ifdef USE_MB +char *fontsetname; + +#endif +char *background; +char *foreground; +char *text_user; +char *text_pass; + +#ifdef SAFEWORD +char *text_dpass; +char *text_fpass; +char *text_chall; + +#endif +char *text_info; +char *text_valid; +char *text_invalid; +char *geometry; +char *icongeometry; + +#ifdef FX +char *glgeometry; + +#endif + +Bool wireframe; + +Bool use3d; +float delta3d; +char *none3d; +char *right3d; +char *left3d; +char *both3d; + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC) +char *cpasswd; + +#endif +#ifdef USE_AUTO_LOGOUT +int logoutAuto; + +#endif +#ifdef USE_BUTTON_LOGOUT +int enable_button = 1; + +int logoutButton; +char *logoutButtonLabel; +char *logoutButtonHelp; +char *logoutFailedString; + +#endif +#ifdef USE_DTSAVER +Bool dtsaver; + +#endif +#ifdef USE_SOUND +char *locksound; +char *infosound; +char *validsound; +char *invalidsound; + +#endif + +char *startCmd; +char *endCmd; +char *logoutCmd; + +char *mailCmd; +char *mailIcon; +char *nomailIcon; + +#ifdef USE_VTLOCK +char *vtlockres; +Bool vtlock; +Bool vtlock_set_active; +Bool vtlock_restore; + +#endif + +static argtype genvars[] = +{ + {(caddr_t *) & erasemodename, "erasemode", "EraseMode", "", t_String}, + {(caddr_t *) & erasedelay, "erasedelay", "EraseDelay", DEF_ERASEDELAY, t_Int}, + {(caddr_t *) & allowaccess, "allowaccess", "AllowAccess", "off", t_Bool}, +#ifndef ALWAYS_ALLOW_ROOT + {(caddr_t *) & allowroot, "allowroot", "AllowRoot", "off", t_Bool}, +#endif + {(caddr_t *) & debug, "debug", "Debug", "off", t_Bool}, + {(caddr_t *) & description, "description", "Description", "on", t_Bool}, + {(caddr_t *) & echokeys, "echokeys", "EchoKeys", "off", t_Bool}, + {(caddr_t *) & enablesaver, "enablesaver", "EnableSaver", "off", t_Bool}, + {(caddr_t *) & resetsaver, "resetsaver", "ResetSaver", "on", t_Bool}, + {(caddr_t *) & grabmouse, "grabmouse", "GrabMouse", "on", t_Bool}, + {(caddr_t *) & grabserver, "grabserver", "GrabServer", "off", t_Bool}, + {(caddr_t *) & install, "install", "Install", "on", t_Bool}, + {(caddr_t *) & mousemotion, "mousemotion", "MouseMotion", "off", t_Bool}, + {(caddr_t *) & mono, "mono", "Mono", "off", t_Bool}, + {(caddr_t *) & sound, "sound", "Sound", "off", t_Bool}, + {(caddr_t *) & timeelapsed, "timeelapsed", "TimeElapsed", "off", t_Bool}, + {(caddr_t *) & usefirst, "usefirst", "UseFirst", "on", t_Bool}, + {(caddr_t *) & verbose, "verbose", "Verbose", "off", t_Bool}, + {(caddr_t *) & visualname, "visual", "Visual", "", t_String}, + {(caddr_t *) & nicelevel, "nice", "Nice", DEF_NICE, t_Int}, + {(caddr_t *) & lockdelay, "lockdelay", "LockDelay", DEF_LOCKDELAY, t_Int}, + {(caddr_t *) & timeout, "timeout", "Timeout", DEF_TIMEOUT, t_Int}, + {(caddr_t *) & fontname, "font", "Font", DEF_FONT, t_String}, +{(caddr_t *) & planfontname, "planfont", "PlanFont", DEF_PLANFONT, t_String}, +#ifdef USE_MB + {(caddr_t *) & fontsetname, "fontset", "FontSet", DEF_FONTSET, t_String}, +#endif + {(caddr_t *) & background, "background", "Background", DEF_BG, t_String}, + {(caddr_t *) & foreground, "foreground", "Foreground", DEF_FG, t_String}, + {(caddr_t *) & text_user, "username", "Username", DEF_NAME, t_String}, + {(caddr_t *) & text_pass, "password", "Password", DEF_PASS, t_String}, +#ifdef SAFEWORD + {(caddr_t *) & text_dpass, "dynpass", "Dynpass", DEF_DPASS, t_String}, + {(caddr_t *) & text_fpass, "fixpass", "Fixpass", DEF_FPASS, t_String}, + {(caddr_t *) & text_chall, "challenge", "Challenge", DEF_CHALL, t_String}, +#endif + {(caddr_t *) & text_info, "info", "Info", DEF_INFO, t_String}, + {(caddr_t *) & text_valid, "validate", "Validate", DEF_VALID, t_String}, + {(caddr_t *) & text_invalid, "invalid", "Invalid", DEF_INVALID, t_String}, + {(caddr_t *) & geometry, "geometry", "Geometry", DEF_GEOMETRY, t_String}, + {(caddr_t *) & icongeometry, "icongeometry", "IconGeometry", DEF_ICONGEOMETRY, t_String}, +#ifdef FX + {(caddr_t *) & glgeometry, "glgeometry", "GLGeometry", DEF_GLGEOMETRY, t_String}, +#endif + {(caddr_t *) & wireframe, "wireframe", "WireFrame", "off", t_Bool}, + + {(caddr_t *) & use3d, "use3d", "Use3D", "off", t_Bool}, + {(caddr_t *) & delta3d, "delta3d", "Delta3D", DEF_DELTA3D, t_Float}, + {(caddr_t *) & none3d, "none3d", "None3D", DEF_NONE3D, t_String}, + {(caddr_t *) & right3d, "right3d", "Right3D", DEF_RIGHT3D, t_String}, + {(caddr_t *) & left3d, "left3d", "Left3D", DEF_LEFT3D, t_String}, + {(caddr_t *) & both3d, "both3d", "Both3D", DEF_BOTH3D, t_String}, + + {(caddr_t *) & program, "program", "Program", DEF_PROGRAM, t_String}, + {(caddr_t *) & messagesfile, "messagesfile", "Messagesfile", DEF_MESSAGESFILE, t_String}, + {(caddr_t *) & messagefile, "messagefile", "Messagefile", DEF_MESSAGEFILE, t_String}, + {(caddr_t *) & message, "message", "Message", DEF_MESSAGE, t_String}, + {(caddr_t *) & messagefontname, "messagefont", "MessageFont", DEF_MESSAGEFONT, t_String}, + {(caddr_t *) & neighbors, "neighbors", "Neighbors", DEF_NEIGHBORS, t_Int}, + {(caddr_t *) & mouse, "mouse", "Mouse", DEF_MOUSE, t_Bool}, + +#if defined( USE_XLOCKRC ) || defined( FALLBACK_XLOCKRC ) + {(caddr_t *) & cpasswd, "cpasswd", "cpasswd", "", t_String}, +#endif +#ifdef USE_AUTO_LOGOUT + {(caddr_t *) & logoutAuto, "logoutAuto", "logoutAuto", DEF_AUTO_LOGOUT, t_Int}, +#endif +#ifdef USE_BUTTON_LOGOUT + {(caddr_t *) & logoutButton, "logoutButton", "LogoutButton", DEF_BUTTON_LOGOUT, t_Int}, + {(caddr_t *) & logoutButtonLabel, "logoutButtonLabel", + "LogoutButtonLabel", DEF_BTN_LABEL, t_String}, + {(caddr_t *) & logoutButtonHelp, "logoutButtonHelp", + "LogoutButtonHelp", DEF_BTN_HELP, t_String}, + {(caddr_t *) & logoutFailedString, "logoutFailedString", + "LogoutFailedString", DEF_FAIL, t_String}, +#endif +#ifdef USE_SOUND + {(caddr_t *) & locksound, "locksound", "LockSound", DEF_LOCKSOUND, t_String}, + {(caddr_t *) & infosound, "infosound", "InfoSound", DEF_INFOSOUND, t_String}, + {(caddr_t *) & validsound, "validsound", "ValidSound", DEF_VALIDSOUND, t_String}, + {(caddr_t *) & invalidsound, "invalidsound", "InvalidSound", DEF_INVALIDSOUND, t_String}, +#endif + {(caddr_t *) & startCmd, "startCmd", "StartCmd", "", t_String}, + {(caddr_t *) & endCmd, "endCmd", "EndCmd", "", t_String}, + {(caddr_t *) & logoutCmd, "logoutCmd", "LogoutCmd", "", t_String}, +#ifdef USE_DPMS + {(caddr_t *) & dpmsstandby, "dpmsstandby", "DPMSStandby", DEF_DPMSSTANDBY, t_Int}, + {(caddr_t *) & dpmssuspend, "dpmssuspend", "DPMSSuspend", DEF_DPMSSUSPEND, t_Int}, + {(caddr_t *) & dpmsoff, "dpmsoff", "DPMSOff", DEF_DPMSOFF, t_Int}, +#endif + + {(caddr_t *) & mailCmd, "mailCmd", "MailCmd", DEF_MAILAPP, t_String}, + {(caddr_t *) & mailIcon, "mailIcon", "MailIcon", DEF_MAILAPP, t_String}, + {(caddr_t *) & nomailIcon, "nomailIcon", "NomailIcon", DEF_MAILAPP, t_String}, +#ifdef USE_VTLOCK + {(caddr_t *) & vtlockres, "vtlock", "VtLock", DEF_VTLOCK, t_String}, +#endif +#if 0 + /* These resources require special handling. They must be examined + * before the display is opened. They are evaluated by individual + * calls to GetResource(), so they should not be evaluated again here. + * For example, X-terminals need this special treatment. + */ + {(caddr_t *) & nolock, "nolock", "NoLock", "off", t_Bool}, + {(caddr_t *) & inwindow, "inwindow", "InWindow", "off", t_Bool}, + {(caddr_t *) & inroot, "inroot", "InRoot", "off", t_Bool}, + {(caddr_t *) & remote, "remote", "Remote", "off", t_Bool}, +#endif +}; + +#define NGENARGS (sizeof genvars / sizeof genvars[0]) + +static argtype modevars[] = +{ + {(caddr_t *) & delay, "delay", "Delay", DEF_DELAY, t_Int}, + {(caddr_t *) & count, "count", "Count", DEF_COUNT, t_Int}, + {(caddr_t *) & cycles, "cycles", "Cycles", DEF_CYCLES, t_Int}, + {(caddr_t *) & size, "size", "Size", DEF_SIZE, t_Int}, + {(caddr_t *) & ncolors, "ncolors", "NColors", DEF_NCOLORS, t_Int}, + {(caddr_t *) & saturation, "saturation", "Saturation", DEF_SATURATION, t_Float}, + {(caddr_t *) & bitmap, "bitmap", "Bitmap", DEF_BITMAP, t_String} +}; + +#define NMODEARGS (sizeof modevars / sizeof modevars[0]) + +static int modevaroffs[NMODEARGS] = +{ + offsetof(LockStruct, def_delay), + offsetof(LockStruct, def_count), + offsetof(LockStruct, def_cycles), + offsetof(LockStruct, def_size), + offsetof(LockStruct, def_ncolors), + offsetof(LockStruct, def_saturation), + offsetof(LockStruct, def_bitmap) +}; + +#ifdef VMS +static char * +stripname(char *string) +{ + char *characters; + + while (string && *string++ != ']'); + characters = string; + while (characters) + if (*characters == '.') { + *characters = '\0'; + return string; + } else + characters++; + return string; +} +#endif + +static void +Syntax(const char *badOption) +{ + int col, len, i; + + (void) fprintf(stderr, "%s: bad command line option \"%s\"\n\n", + ProgramName, badOption); + + (void) fprintf(stderr, "usage: %s", ProgramName); + col = 8 + strlen(ProgramName); + for (i = 0; i < (int) opDescEntries; i++) { + len = 3 + strlen(opDesc[i].opt); /* space [ string ] */ + if (col + len > 79) { + (void) fprintf(stderr, "\n "); /* 3 spaces */ + col = 3; + } + (void) fprintf(stderr, " [%s]", opDesc[i].opt); + col += len; + } + + len = 8 + strlen(LockProcs[0].cmdline_arg); + if (col + len > 79) { + (void) fprintf(stderr, "\n "); /* 3 spaces */ + col = 3; + } + (void) fprintf(stderr, " [-mode %s", LockProcs[0].cmdline_arg); + col += len; + for (i = 1; i < numprocs; i++) { + len = 3 + strlen(LockProcs[i].cmdline_arg); + if (col + len > 79) { + (void) fprintf(stderr, "\n "); /* 3 spaces */ + col = 3; + } + (void) fprintf(stderr, " | %s", LockProcs[i].cmdline_arg); + col += len; + } + (void) fprintf(stderr, "]\n"); + + (void) fprintf(stderr, "\nType %s -help for a full description.\n\n", + ProgramName); + exit(1); +} + +static void +Help(void) +{ + int i; + + (void) printf("usage:\n %s [-options ...]\n\n", ProgramName); + (void) printf("where options include:\n"); + for (i = 0; i < (int) opDescEntries; i++) { + (void) printf(" %-28s %s\n", opDesc[i].opt, opDesc[i].desc); + } + + (void) printf(" %-28s %s\n", "-mode mode", "animation mode"); + (void) printf(" where mode is one of:\n"); + for (i = 0; i < numprocs; i++) { + int j; + + (void) printf(" %-23s %s\n", + LockProcs[i].cmdline_arg, LockProcs[i].desc); + for (j = 0; j < LockProcs[i].msopt->numvarsdesc; j++) + (void) printf(" %-23s %s\n", + LockProcs[i].msopt->desc[j].opt, LockProcs[i].msopt->desc[j].desc); + } + (void) printf("\n"); + + exit(0); +} + +static void +Version(void) +{ + (void) printf("XLock version %s\n", VERSION); + exit(0); +} + +static void +checkSpecialArgs(int argc, char **argv) +{ + int i; + + for (i = 0; i < argc; i++) { + if (!strncmp(argv[i], "-help", strlen(argv[i]))) + Help(); + if (!strncmp(argv[i], "-version", strlen(argv[i]))) + Version(); +#ifdef CHECK_OLD_ARGS + { + static char *depreciated_args[] = + {"-v", "-imagefile", "-mfont"}; + static char *current_args[] = + {"-verbose", "-bitmap", "-messagefont"}; + int j; + + for (j = 0; j < (int) ((sizeof current_args) / sizeof (*current_args)); j++) + if (!strncmp(argv[i], depreciated_args[j], strlen(argv[i]))) { + (void) printf("%s depreciated, use %s\n", + depreciated_args[j], current_args[j]); + exit(0); + } + } +#endif + } +} + +static void +DumpResources(void) +{ + int i, j; + + (void) printf("%s.mode: %s\n", classname, DEF_MODE); + + for (i = 0; i < (int) NGENARGS; i++) + (void) printf("%s.%s: %s\n", + classname, genvars[i].name, genvars[i].def); + + for (i = 0; i < numprocs; i++) { + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "delay", LockProcs[i].def_delay); + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "count", LockProcs[i].def_count); + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "cycles", LockProcs[i].def_cycles); + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "size", LockProcs[i].def_size); + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "ncolors", LockProcs[i].def_ncolors); + (void) printf("%s.%s.%s: %g\n", classname, LockProcs[i].cmdline_arg, + "saturation", LockProcs[i].def_saturation); + (void) printf("%s.%s.%s: %s\n", classname, LockProcs[i].cmdline_arg, + "bitmap", + (LockProcs[i].def_bitmap) ? LockProcs[i].def_bitmap : ""); + for (j = 0; j < LockProcs[i].msopt->numvarsdesc; j++) + (void) printf("%s.%s.%s: %s\n", classname, LockProcs[i].cmdline_arg, + LockProcs[i].msopt->vars[j].name, + LockProcs[i].msopt->vars[j].def); + } + exit(0); +} + +static void +LowerString(char *s) +{ + + while (*s) { + if (isupper((int) *s)) + *s += ('a' - 'A'); + s++; + } +} + +static void +GetResource(XrmDatabase database, + const char *parentName, const char *parentClassName, + const char *name, const char *className, int valueType, char *def, + caddr_t * valuep) +{ + char *type; + XrmValue value; + char *string; + char buffer[1024]; + char *fullName; + char *fullClassName; + int len, temp; + + fullName = (char *) malloc(strlen(parentName) + strlen(name) + 2); + fullClassName = (char *) malloc(strlen(parentClassName) + + strlen(className) + 2); + + (void) sprintf(fullName, "%s.%s", parentName, name); + (void) sprintf(fullClassName, "%s.%s", parentClassName, className); + temp = XrmGetResource(database, fullName, fullClassName, &type, &value); + (void) free((void *) fullName); + (void) free((void *) fullClassName); + + if (temp) { + string = value.addr; + len = value.size - 1; + } else { + string = def; + if (!string || !*string) { + *valuep = NULL; + return; + } + len = strlen(string); + } + + (void) strncpy(buffer, string, sizeof (buffer)); + buffer[sizeof (buffer) - 1] = '\0'; + + switch (valueType) { + case t_String: + { +/*- + * PURIFY 4.2 on Solaris 2 and on SunOS4 reports a memory leak on the following + * line. It leaks as many bytes as there are characters in the string + 1. */ + char *s = (char *) malloc(len + 1); + + if (s == (char *) NULL) { + char *buf = (char *) malloc(strlen(ProgramName) + 80); + + (void) sprintf(buf, + "%s: GetResource - could not allocate memory", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + (void) strncpy(s, string, len); + s[len] = '\0'; + *((char **) valuep) = s; + } + break; + case t_Float: + *((float *) valuep) = (float) atof(buffer); + break; + case t_Int: + *((int *) valuep) = atoi(buffer); + break; + case t_Bool: + LowerString(buffer); + *((int *) valuep) = (!strcmp(buffer, "true") || + !strcmp(buffer, "on") || + !strcmp(buffer, "enabled") || + !strcmp(buffer, "yes")) ? True : False; + break; + } +} + +static XrmDatabase +parsefilepath(char *xfilesearchpath, const char *typeName, + char *className, char *customName) +{ + XrmDatabase database = NULL; + char *appdefaults; + char *src; + char *dst; + int i, maxlen; + + i = maxlen = 0; + for (src = xfilesearchpath; *src != '\0'; src++) { + if (*src == '%') { + src++; + switch (*src) { + case '%': + case ':': + i++; + break; + case 'T': + i += strlen(typeName); + break; + case 'N': + i += strlen(className); + break; + case 'C': + i += strlen(customName); + break; + default: + break; + } +#ifdef VMS + } else if (*src == '#') { /* Colons required in VMS use # */ +#else + } else if (*src == ':') { +#endif + if (i > maxlen) + maxlen = i; + i = 0; + } else + i++; + } + if (i > maxlen) + maxlen = i; + + /* appdefaults will be at most this long */ + appdefaults = (char *) malloc(maxlen + 1); + + src = xfilesearchpath; + dst = appdefaults; + *dst = '\0'; + for (;;) { + if (*src == '%') { + src++; + switch (*src) { + case '%': + case ':': + *dst++ = *src++; + *dst = '\0'; + break; + case 'T': + (void) strcat(dst, typeName); + src++; + dst += strlen(typeName); + break; + case 'N': + (void) strcat(dst, className); + src++; + dst += strlen(className); + break; + case 'C': + (void) strcat(dst, customName); + src++; + dst += strlen(customName); + break; + case 'S': + src++; + break; + default: + src++; + break; + } +#ifdef VMS + } else if (*src == '#') { /* Colons required in VMS use # */ +#else + } else if (*src == ':') { +#endif + database = XrmGetFileDatabase(appdefaults); + if (database == NULL) { + dst = appdefaults; + src++; + } else + break; + } else if (*src == '\0') { +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 reports this also when using X11R5, but not + * with OpenWindow 3.0 (X11R4 based). */ + database = XrmGetFileDatabase(appdefaults); + break; + } else { + *dst++ = *src++; + *dst = '\0'; + } + } + (void) free((void *) appdefaults); + return database; +} + +#ifdef VMS +/*- + * FUNCTIONAL DESCRIPTION: + * int get_info (chan, item, ret_str, ret_len) + * Fetch a single characteristics from the pseudo-workstation + * device and return the information. + * (Taken and modified from the v5.4 fiche. PPL/SG 2/10/91 + * FORMAL PARAMETERS: + * chan: the device channel + * item: the characteristic to show + * ret_str: str pointer to information + * ret_len: length of above string + * IMPLICIT INPUTS: + * none + * IMPLICIT OUTPUTS: + * none + * COMPLETION CODES: + * errors returned by SYS$QIO + * SIDE EFFECTS: + * none + * Hacked from Steve Garrett's xservername (as posted to INFO-VAX) + */ + +int +get_info(unsigned long chan, unsigned long item, + char *ret_str, unsigned long *ret_len) +{ + unsigned long iosb[2]; + int status; + char itembuf[BUFSIZE]; + struct dsc$descriptor itemval; + + itemval.dsc$w_length = BUFSIZE; + itemval.dsc$b_dtype = 0; + itemval.dsc$b_class = 0; + itemval.dsc$a_pointer = &itembuf[0]; + + status = sys$qiow(0, chan, IO$_SENSEMODE | IO$M_WS_DISPLAY, &iosb, 0, 0, + itemval.dsc$a_pointer, + itemval.dsc$w_length, + item, 0, 0, 0); + if (status != SS$_NORMAL) + return (status); + if (iosb[0] != SS$_NORMAL) + return (iosb[0]); + + itemval.dsc$w_length = iosb[1]; + *ret_len = iosb[1]; + itembuf[*ret_len] = 0; + (void) strcpy(ret_str, &itembuf[0]); + + return (status); +} + + +/* routine that will return descripter of asciz string */ + +static int +descr(char *name) +{ + static $dscp(d1, 0, 0); + static $dscp(d2, 0, 0); + static $dscp(d3, 0, 0); + static $dscp(d4, 0, 0); + static $dscp(d5, 0, 0); + static $dscp(d6, 0, 0); + static dsc *tbl[] = + {&d1, &d2, &d3, &d4, &d5, &d6}; + static int didx = 0; + + if (didx == 6) + didx = 0; + + tbl[didx]->len = strlen(name); + tbl[didx]->ptr = name; + + return (int) tbl[didx++]; +} + +#endif + +static void +openDisplay(Display ** displayp) +{ + char *buf; + +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * the following line. */ + if (!(*displayp = XOpenDisplay((displayname) ? displayname : ""))) { + buf = (char *) malloc(strlen(ProgramName) + + ((displayname) ? strlen(displayname) : 0) + 80); + (void) sprintf(buf, + "%s: unable to open display %s.\n", ProgramName, + ((displayname) ? displayname : "")); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + displayname = DisplayString(*displayp); +} + +static void +checkDisplay(void) +{ + char *buf; + struct hostent *host; + +#if defined(__cplusplus) || defined(c_plusplus) /* !__bsdi__ */ +/* #include */ +#if HAVE_GETHOSTNAME +#ifdef SunCplusplus + extern struct hostent *gethostbyname(const char *); + +#else +#if 0 + extern int gethostname(char *, size_t); + extern struct hostent *gethostbyname(const char *); + +#endif +#endif +#else +#define gethostname(name,namelen) sysinfo(SI_HOSTNAME,name,namelen) +#endif +#endif + + /* + * only restrict access to other displays if we are locking and if the + * Remote resource is not set. + */ + if (nolock || inwindow || inroot) + remote = True; + + if (gethostname(hostname, MAXHOSTNAMELEN)) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: Can not get local hostname.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } +#ifdef VMS + if (!remote && ((displayname[0] == '_') | + ((displayname[0] == 'W') & + (displayname[1] == 'S') & + (displayname[2] == 'A')))) { /* this implies a v5.4 system. The return + value is a device name, which must be + interrogated to find the real information */ + unsigned long chan; + unsigned int status; + unsigned long len; + char server_transport[100]; + + status = sys$assign(descr(displayname), &chan, 0, 0); + if (!(status & 1)) + displayname = " "; + else { + status = get_info(chan, DECW$C_WS_DSP_TRANSPORT, + server_transport, &len); + if (!(status & 1)) + exit(status); + + if (strcmp(server_transport, "LOCAL")) { + (void) strcat(displayname, "'s display via "); + (void) strncat(displayname, server_transport, len); + buf = (char *) malloc(strlen(ProgramName) + strlen(displayname) + 80); + (void) sprintf(buf, + "%s: can not lock %s\n", ProgramName, displayname); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + } + } else { +#endif /* VMS */ + + if (displayname != NULL) { + char *colon = (char *) strchr(displayname, ':'); + int n = colon - displayname; + + if (colon == NULL) { + buf = (char *) malloc(strlen(ProgramName) + + strlen(displayname) + 80); + (void) sprintf(buf, + "%s: Malformed -display argument, \"%s\"\n", + ProgramName, displayname); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + if (!remote && n + && strncmp(displayname, "unix", n) + && strncmp(displayname, "localhost", n)) { + int badhost = 1; + char **hp; + + if (!(host = (struct hostent *) gethostbyname(hostname))) { + if (debug || verbose) { + (void) fprintf(stderr, "%s: Can not get hostbyname.\n", + ProgramName); + (void) fprintf(stderr, + "Contact your administrator to fix /etc/hosts.\n"); + } + } else if (strncmp(displayname, host->h_name, n)) { + for (hp = host->h_aliases; *hp; hp++) { + if (!strncmp(displayname, *hp, n)) { + badhost = 0; + break; + } + } + if (badhost) { + *colon = (char) 0; + buf = (char *) malloc(strlen(ProgramName) + + strlen(displayname) + 80); + (void) sprintf(buf, + "%s: can not lock %s's display\n", + ProgramName, displayname); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + } + } + } +#ifdef VMS + } +#endif +} + +static void +printvar(char *className, argtype var) +{ + switch (var.type) { + case t_String: + (void) fprintf(stderr, "%s.%s: %s\n", + className, var.name, + (*((char **) var.var)) ? *((char **) var.var) : ""); + break; + case t_Float: + (void) fprintf(stderr, "%s.%s: %g\n", + className, var.name, *((float *) var.var)); + break; + case t_Int: + (void) fprintf(stderr, "%s.%s: %d\n", + className, var.name, *((int *) var.var)); + break; + case t_Bool: + (void) fprintf(stderr, "%s.%s: %s\n", + className, var.name, *((int *) var.var) ? "True" : "False"); + break; + } +} + +static void +getServerResources(Display * display, char *homeenv, char **custom, + XrmDatabase * RDB, XrmDatabase * serverDB) +{ + char *serverString; + + serverString = XResourceManagerString(display); + if (serverString) { +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 reports this also when using X11R5, but not + * with OpenWindow 3.0 (X11R4 based). */ + *serverDB = XrmGetStringDatabase(serverString); +#ifndef CUSTOMIZATION +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 does not report this error. */ + (void) XrmMergeDatabases(*serverDB, RDB); +#endif + } else { + char *buf = (char *) malloc(strlen(homeenv) + 12); + + (void) sprintf(buf, "%s/.Xdefaults", homeenv); +#ifdef CUSTOMIZATION + *serverDB = XrmGetFileDatabase(buf); +#else + (void) XrmMergeDatabases(XrmGetFileDatabase(buf), RDB); +#endif + (void) free((void *) buf); + } +#ifdef CUSTOMIZATION + if (*serverDB) + GetResource(*serverDB, ProgramName, classname, "customization", + "Customization", t_String, "", custom); + else + *custom = ""; +#endif +} + +static void +getAppResources(char *homeenv, char **custom, + XrmDatabase * RDB, XrmDatabase * serverDB, int *argc, char **argv) +{ + char *env; + char *userpath; + char *userfile = NULL; + XrmDatabase cmdlineDB = NULL; + XrmDatabase userDB = NULL; + XrmDatabase applicationDB = NULL; + extern char *getenv(const char *); + + env = getenv("XFILESEARCHPATH"); + applicationDB = parsefilepath(env ? env : DEF_FILESEARCHPATH, + "app-defaults", classname, *custom); + + XrmParseCommand(&cmdlineDB, cmdlineTable, cmdlineEntries, ProgramName, + argc, argv); + + userpath = getenv("XUSERFILESEARCHPATH"); + if (!userpath) { + env = getenv("XAPPLRESDIR"); + if (env) { + userfile = (char *) malloc(strlen(env) + strlen(homeenv) + 8); + (void) strcpy(userfile, env); + (void) strcat(userfile, "/%N:"); + (void) strcat(userfile, homeenv); + (void) strcat(userfile, "/%N"); + } else { +#ifdef VMS + userfile = (char *) malloc(2 * strlen(homeenv) + 31); + (void) strcpy(userfile, homeenv); + (void) strcat(userfile, "DECW$%N.DAT#"); + (void) strcat(userfile, homeenv); + (void) strcat(userfile, "DECW$XDEFAULTS.DAT"); +#else + userfile = (char *) malloc(strlen(homeenv) + 4); + (void) strcpy(userfile, homeenv); + (void) strcat(userfile, "/%N"); +#endif + } + userpath = userfile; + } + userDB = parsefilepath(userpath, "app-defaults", classname, *custom); + + if (userfile) + (void) free((void *) userfile); + + (void) XrmMergeDatabases(applicationDB, RDB); + (void) XrmMergeDatabases(userDB, RDB); +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 does not report this error. */ + (void) XrmMergeDatabases(cmdlineDB, RDB); +#ifdef CUSTOMIZATION + if (*serverDB) +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 does not report this error. */ + (void) XrmMergeDatabases(*serverDB, RDB); +#else + GetResource(*RDB, ProgramName, classname, "display", "Display", t_String, + "", &displayname); +#endif + GetResource(*RDB, ProgramName, classname, "parent", "Parent", t_String, + "", &parentname); + if (parentname && *parentname) { + if (sscanf(parentname, "%ld", &parent)) + parentSet = True; + } + GetResource(*RDB, ProgramName, classname, "nolock", "NoLock", t_Bool, + "off", (caddr_t *) & nolock); + GetResource(*RDB, ProgramName, classname, "inwindow", "InWindow", t_Bool, + "off", (caddr_t *) & inwindow); + GetResource(*RDB, ProgramName, classname, "inroot", "InRoot", t_Bool, + "off", (caddr_t *) & inroot); + GetResource(*RDB, ProgramName, classname, "remote", "Remote", t_Bool, + "off", (caddr_t *) & remote); +#ifdef USE_DTSAVER + GetResource(*RDB, ProgramName, classname, "dtsaver", "DtSaver", t_Bool, + "off", (caddr_t *) & dtsaver); + if (dtsaver) { + inroot = False; + inwindow = True; + nolock = True; + } +#endif +} + +void +getResources(Display ** displayp, int argc, char **argv) +{ + XrmDatabase RDB = NULL; + +#ifdef USE_MODULES + XrmDatabase modulepathDB = NULL; + +#endif + XrmDatabase serverDB = NULL; + XrmDatabase earlyCmdlineDB = NULL; + XrmDatabase modeDB = NULL; + XrmDatabase generalDB = NULL; + char *custom = NULL; + char *homeenv = NULL; + int i, j; + int max_length; + extern char *getenv(const char *); + +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) + extern int fullLock(); + +#endif + + XrmInitialize(); + +#ifndef USE_MODULES + /* + * Moved back because its annoying if you need -remote and + * you do not know it. + */ + checkSpecialArgs(argc, argv); +#endif + + /* Application Class is fixed */ + classname = DEF_CLASSNAME; + /* + * Application Name may be modified by -name arg from command + * line so you can have different resource files for different + * configurations/machines etc... + */ +#ifdef VMS + /*Strip off directory and .exe; parts */ + ProgramName = stripname(ProgramName); +#endif + XrmParseCommand(&earlyCmdlineDB, earlyCmdlineTable, + earlyCmdlineEntries, "xlock", &argc, argv); + GetResource(earlyCmdlineDB, "xlock", classname, "name", "Name", + t_String, ProgramName, &ProgramName); +#ifdef CUSTOMIZATION + GetResource(earlyCmdlineDB, ProgramName, classname, "display", + "Display", t_String, "", &displayname); +#endif + homeenv = getenv("HOME"); + if (!homeenv) + homeenv = ""; + +#ifdef CUSTOMIZATION + openDisplay(displayp); + getServerResources(*displayp, homeenv, &custom, &RDB, &serverDB); + getAppResources(homeenv, &custom, &RDB, &serverDB, &argc, argv); + checkDisplay(); +#else + custom = ""; + getAppResources(homeenv, &custom, &RDB, &serverDB, &argc, argv); + openDisplay(displayp); + checkDisplay(); + getServerResources(*displayp, homeenv, &custom, &RDB, &serverDB); +#endif + +#ifdef USE_MODULES + /* + * Now that all the resource files have been loaded, check for the + * modules directory, so we'll know what modes are available. + */ + XrmParseCommand(&modulepathDB, modulepathTable, 1, ProgramName, + &argc, argv); + (void) XrmMergeDatabases(modulepathDB, &RDB); + GetResource(RDB, ProgramName, classname, "modulepath", "Modulepath", + t_String, DEF_MODULEPATH, &modulepath); + + /* read modules from modules directory */ + atexit(UnloadModules); /* make sure modules get unloaded */ + LoadModules(modulepath); + + /* + * Moved the search for help to here because now the modules + * have been loaded so they can be listed by help. + */ + checkSpecialArgs(argc, argv); +#endif + XrmParseCommand(&generalDB, genTable, genEntries, ProgramName, &argc, argv); +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 does not report this error. */ + (void) XrmMergeDatabases(generalDB, &RDB); + + GetResource(RDB, ProgramName, classname, "mode", "Mode", t_String, + DEF_MODE, (caddr_t *) & mode); + + XrmParseCommand(&modeDB, modeTable, modeEntries, ProgramName, &argc, argv); + (void) XrmMergeDatabases(modeDB, &RDB); + + for (i = 0; i < numprocs; i++) { + XrmDatabase optDB = NULL; + ModeSpecOpt *ms = LockProcs[i].msopt; + + if (!ms->numopts) + continue; + XrmParseCommand(&optDB, ms->opts, ms->numopts, + ProgramName, &argc, argv); +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 does not report this error. */ + (void) XrmMergeDatabases(optDB, &RDB); + } + + /* the RDB is set, now query load the variables from the database */ + + for (i = 0; i < (int) NGENARGS; i++) + GetResource(RDB, ProgramName, classname, + genvars[i].name, genvars[i].classname, + genvars[i].type, genvars[i].def, genvars[i].var); + +#ifdef USE_VTLOCK + /* Process the vtlock resource */ + if ( !vtlockres || !*vtlockres ) + vtlock = False; + else { + if (debug) + (void) fprintf(stderr,"vtlock: %s\n",vtlockres); + if ( !strcmp( VTLOCKMODE_SWITCH, vtlockres ) ) + { + vtlock = True; + vtlock_set_active = True; + vtlock_restore = False; + } + else if ( !strcmp( VTLOCKMODE_RESTORE, vtlockres ) ) + { + vtlock = True; + vtlock_set_active = True; + vtlock_restore = True; + } + else if ( !strcmp( VTLOCKMODE_OFF, vtlockres ) ) + { + vtlock = False; + } + else + { + vtlock = True; + vtlock_set_active = False; + vtlock_restore = False; + } + } +#endif + + max_length = 0; + for (i = 0; i < numprocs; i++) { + j = strlen(LockProcs[i].cmdline_arg); + if (j > max_length) + max_length = j; + } + + modename = (char *) malloc(strlen(ProgramName) + max_length + 2); + modeclassname = (char *) malloc(strlen(classname) + max_length + 2); + + for (i = 0; i < numprocs; i++) { + argtype *v; + ModeSpecOpt *ms = LockProcs[i].msopt; + + (void) sprintf(modename, "%s.%s", ProgramName, LockProcs[i].cmdline_arg); + (void) sprintf(modeclassname, "%s.%s", classname, LockProcs[i].cmdline_arg); + for (j = 0; j < (int) NMODEARGS; j++) { + char *buf = NULL; + void *p = (void *) ((char *) (&LockProcs[i]) + modevaroffs[j]); + + switch (modevars[j].type) { + case t_String: + buf = (char *) malloc(strlen(*((char **) p)) + 1); + (void) sprintf(buf, "%s", *((char **) p)); + break; + case t_Float: + buf = (char *) malloc(16); + (void) sprintf(buf, "%g", *((float *) p)); + break; + case t_Int: + buf = (char *) malloc(16); + (void) sprintf(buf, "%d", *((int *) p)); + break; + case t_Bool: + buf = (char *) malloc(6); + (void) sprintf(buf, "%s", *((int *) p) ? "True" : "False"); + break; + } + GetResource(RDB, modename, modeclassname, + modevars[j].name, modevars[j].classname, + modevars[j].type, buf, (caddr_t *) p); + if (!strcmp(mode, LockProcs[i].cmdline_arg)) { + GetResource(RDB, modename, modeclassname, + modevars[j].name, modevars[j].classname, + modevars[j].type, buf, modevars[j].var); + } + if (buf) { + (void) free((void *) buf); + buf = NULL; + } + } + if (!ms->numvarsdesc) + continue; + v = ms->vars; + for (j = 0; j < ms->numvarsdesc; j++) + GetResource(RDB, modename, modeclassname, v[j].name, v[j].classname, + v[j].type, v[j].def, v[j].var); + } + + /*XrmPutFileDatabase(RDB, "/tmp/xlock.rsrc.out"); */ +/* PURIFY 4.0.1 on Solaris 2 reports an uninitialized memory read on the next + * line. PURIFY 4.0.1 on SunOS4 reports this also when using X11R5, but not + * with OpenWindow 3.0 (X11R4 based). */ + (void) XrmDestroyDatabase(RDB); + + /* Parse the rest of the command line */ + for (argc--, argv++; argc > 0; argc--, argv++) { + if (**argv != '-') + Syntax(*argv); + switch (argv[0][1]) { + case 'r': + DumpResources(); + /* NOTREACHED */ + default: + Syntax(*argv); + /* NOTREACHED */ + } + } + +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) + if (fullLock()) { +#ifdef USE_AUTO_LOGOUT + logoutAuto = 0; +#endif +#ifdef USE_BUTTON_LOGOUT + enable_button = 0; +#endif + } else { +#ifdef USE_AUTO_LOGOUT +#if ( USE_AUTO_LOGOUT > 0 ) /* Could be USER defined if 0 */ + if (logoutAuto > USE_AUTO_LOGOUT) + logoutAuto = USE_AUTO_LOGOUT; + else if (logoutAuto <= 0) /* Handle 0 as a special case */ + logoutAuto = USE_AUTO_LOGOUT; +#else + if (logoutAuto <= 0) /* Handle 0 as a special case */ + (void) sscanf(DEF_AUTO_LOGOUT, "%d", &logoutAuto); +#endif +#endif +#ifdef USE_BUTTON_LOGOUT +#if ( USE_BUTTON_LOGOUT > 0 ) /* Could be USER defined if 0 */ + if (logoutButton > USE_BUTTON_LOGOUT) + logoutButton = USE_BUTTON_LOGOUT; + else if (logoutButton <= 0) /* Handle 0 as a special case */ + logoutButton = USE_BUTTON_LOGOUT; +#else + if (logoutButton <= 0) /* Handle 0 as a special case */ + (void) sscanf(DEF_BUTTON_LOGOUT, "%d", &logoutButton); +#endif +#endif + } +#endif +#ifdef USE_DTSAVER + if (dtsaver) { + inroot = False; + inwindow = True; + nolock = True; + enablesaver = True; + grabmouse = False; + grabserver = False; + install = False; + lockdelay = 0; + geometry = DEF_GEOMETRY; + } +#endif + + if (verbose) { + for (i = 0; i < (int) NGENARGS; i++) + printvar(classname, genvars[i]); + for (i = 0; i < (int) NMODEARGS; i++) + printvar(modename, modevars[i]); + } + if (!visualname || !*visualname || !strcmp(visualname, "default")) { + VisualClassWanted = -1; + if (verbose) + (void) fprintf(stderr, "Using default visual class\n"); + } else { + VisualClassWanted = visualClassFromName(visualname); + if (verbose) + (void) fprintf(stderr, "Using visual class %s\n", + nameOfVisualClass(VisualClassWanted)); + } + if (!erasemodename || !*erasemodename || !strcmp(erasemodename, + "default")) { + erasemode = -1; + if (verbose) + (void) fprintf(stderr, "Using random erase mode\n"); + } else { + extern int erasemodefromname(char *name); + + erasemode = erasemodefromname(erasemodename); + if (verbose) + (void) fprintf(stderr, "Using erase mode %s\n", + erasemodename); + } +#if HAVE_DIRENT_H + /* Evaluate bitmap */ + if (bitmap && strcmp(bitmap, DEF_BITMAP)) { + get_dir(bitmap, directory_r, filename_r); + if (image_list != NULL) { + int num; + + for (num = 0; num < num_list; num++) { + if (image_list[num]) + (void) free((void *) image_list[num]); + } + (void) free((void *) image_list); + image_list = NULL; + } + images_list = (struct dirent ***) malloc(sizeof (struct dirent **)); + + num_list = scan_dir(directory_r, images_list, sel_image, NULL); + image_list = *images_list; + if (images_list) { + (void) free((void *) images_list); + images_list = NULL; + } + if (debug) + for (i = 0; i < num_list; i++) + (void) printf("File number %d: %s\n", i, image_list[i]->d_name); + if (num_list < 0) { + image_list = NULL; + num_list = 0; + } + } else { + num_list = 0; + } +#endif + (void) free((void *) modename); + (void) free((void *) modeclassname); +} + + +void +checkResources(void) +{ + extern char old_default_mode[]; + int i; + + /* in case they have a 'xlock*mode: ' empty resource */ + if (!mode || *mode == '\0') + mode = DEF_MODE; + + if (!strcmp(old_default_mode, "")) { + (void) strcpy(old_default_mode, mode); + } + for (i = 0; i < numprocs; i++) { + if (!strcmp(LockProcs[i].cmdline_arg, mode)) { + set_default_mode(&LockProcs[i]); + break; + } + } + if (i == numprocs) { + (void) fprintf(stderr, "Unknown mode: "); + Syntax(mode); + } else { + + /* count and size we allow negative to mean randomize up to that number */ + if (delay < 0) + Syntax("-delay argument must not be negative."); + if (cycles < 0) + Syntax("-cycles argument must not be negative."); + if (ncolors < 2 || ncolors > 200) + Syntax("-ncolors argument must be between 2 and 200."); + if (saturation < 0.0 || saturation > 1.0) + Syntax("-saturation argument must be between 0.0 and 1.0."); + if (delta3d < 0.0 || delta3d > 20.0) + Syntax("-delta3d argument must be between 0.0 and 20.0."); + } +} diff --git a/xlock/sound.c b/xlock/sound.c new file mode 100644 index 00000000..25fb3b18 --- /dev/null +++ b/xlock/sound.c @@ -0,0 +1,125 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)sound.c 4.00 97/01/01 xlockmore"; + +#endif + +/*- + * sound.c - xlock.c and vms_play.c + * + * See xlock.c for copying information. + * + */ + +#include "xlock.h" + +#ifdef USE_RPLAY +/*- + * The stuff below does not appear to _compile_ on Solaris>=2.6 with gcc + * -- xlock maintainer + */ +#include + +void +play_sound(char *string) +{ + int rplay_fd = rplay_open_default(); + + if (rplay_fd >= 0) { + rplay_sound(rplay_fd, string); + rplay_close(rplay_fd); + } +} +#endif + +#ifdef USE_NAS +/* Gives me lots of errors when I compile nas-1.2p5 -- xlock maintainer */ + +/*- + * Connect each time, because it might be that the server was not running + * when xlock first started, but is when next nas_play is called + */ + +#include

+#endif +#if defined( __hpux ) || defined( __apollo ) +#include +extern int XHPEnableReset(Display * dsp); + +#endif +#ifdef USE_DPMS +#define MIN_DPMS 30 /* 30 second minimum */ +#include +extern unsigned char DPMSQueryExtension(Display *, int *, int *); +extern int DPMSGetTimeouts(Display *, unsigned short *, unsigned short *, unsigned short *); +extern int DPMSSetTimeouts(Display *, unsigned short, unsigned short, unsigned short); +extern int dpmsstandby; +extern int dpmssuspend; +extern int dpmsoff; + +#endif + +#if ( HAVE_SYSLOG_H && defined( USE_SYSLOG )) +#include +#include +#include +#endif + +#if ( __VMS_VER >= 70000000 ) +#include +#include +#include +struct itmlst_3 { + unsigned short int buflen; + unsigned short int itmcode; + void *bufadr; + unsigned short int *retlen; +}; + +#endif + +extern char *getenv(const char *); +extern void checkResources(void); + +extern void defaultVisualInfo(Display * display, int screen); + +#ifdef USE_OLD_EVENT_LOOP +extern int usleep(unsigned int); + +#endif + +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) +extern void logoutUser(Display * display); + +#endif + +#if 0 + /* #if !defined( AIXV3 ) && !defined( __hpux ) && !defined( __bsdi__ ) */ +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + +#if !defined( __hpux ) && !defined( apollo ) +extern int select(size_t, int *, int *, int *, const struct timeval *); + +#endif + +#endif +extern int nice(int); + +char *ProgramName; /* argv[0] */ + +#ifdef DEBUG +pid_t ProgramPID; /* for memcheck.c */ + +#endif +ScreenInfo *Scr = NULL; + +/* This is a private data structure, don't touch */ +static ModeInfo *modeinfo = NULL; + +Window parent; +Bool parentSet = False; +Display *dsp = NULL; /* server display connection */ + +extern char user[PASSLENGTH]; +extern char hostname[MAXHOSTNAMELEN]; +extern char *displayname; +extern char *bitmap; +extern int delay; +extern int count; +extern int cycles; +extern int size; +extern int ncolors; +extern float saturation; +extern float delta3d; +extern Bool nolock; +extern Bool resetsaver; +extern Bool inwindow; +extern Bool inroot; +extern Bool mono; +extern Bool allowaccess; +extern Bool allowroot; +extern Bool debug; +extern Bool description; +extern Bool echokeys; +extern Bool enablesaver; +extern Bool fullrandom; +extern Bool grabmouse; +extern Bool grabserver; +extern Bool install; +extern Bool mousemotion; +extern Bool timeelapsed; +extern Bool usefirst; +extern Bool verbose; +extern Bool remote; +extern int nicelevel; +extern int lockdelay; +extern int timeout; +extern Bool wireframe; +extern Bool use3d; +extern Bool mouse; + +extern char *fontname; +extern char *planfontname; + +#ifdef USE_MB +XFontSet fontset; +extern char *fontsetname; +XRectangle mbRect; + +#endif +extern char *background; +extern char *foreground; +extern char *text_user; +extern char *text_pass; +extern char *text_info; +extern char *text_valid; +extern char *text_invalid; +extern char *geometry; +extern char *icongeometry; + +#ifdef FX +extern char *glgeometry; + +#endif +extern char *none3d; +extern char *right3d; +extern char *left3d; +extern char *both3d; + +#ifdef USE_SOUND +extern char *locksound; +extern char *infosound; +extern char *validsound; +extern char *invalidsound; +extern void play_sound(char *string); +extern Bool sound; + +#endif + +extern char *startCmd; +extern char *endCmd; +extern char *logoutCmd; + +extern char *mailCmd; +extern char *mailIcon; +extern char *nomailIcon; + +#ifdef USE_AUTO_LOGOUT +extern int logoutAuto; + +#endif + +#ifdef USE_BUTTON_LOGOUT +extern int logoutButton; +extern int enable_button; +extern char *logoutButtonLabel; +extern char *logoutButtonHelp; +extern char *logoutFailedString; + +#endif + +#ifdef USE_DTSAVER +extern Bool dtsaver; + +#endif + +static int screen = 0; /* current screen */ +int startscreen = 0; +static int screens; /* number of screens */ + +static Cursor mycursor; /* blank cursor */ +static Pixmap lockc; +static Pixmap lockm; /* pixmaps for cursor and mask */ +static char no_bits[] = +{0}; /* dummy array for the blank cursor */ +static int passx, passy; /* position of the ?'s */ +static int iconwidth, iconheight; +static int lock_delay; + +#ifdef FX +static int glwidth, glheight; + +#endif +static int timex, timey; /* position for the times */ +static XFontStruct *font; +static XFontStruct *planfont; +static int sstimeout; /* screen saver parameters */ +static int ssinterval; +static int ssblanking; +static int ssexposures; +static unsigned long start_time; +static char *plantext[TEXTLINES + 1]; /* Message is stored here */ + +/* GEOMETRY STUFF */ +static int sizeconfiguremask; +static XWindowChanges minisizeconfigure; +static int fullscreen = False; + +#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT ) +static int tried_logout = 0; + +#endif + +#ifdef USE_SOUND +static int got_invalid = 0; + +#endif + +#if (defined( SYSV ) || defined( SVR4 )) && defined( SOLARIS2 ) && !defined( HAVE_STRUCT_SIGSET_T ) +#if !defined( __cplusplus ) && !defined( c_plusplus ) && !defined ( _SIGSET_T ) +#define _SIGSET_T +typedef struct { /* signal set type */ + unsigned long __sigbits[4]; +} sigset_t; + + /* This is good for gcc compiled on Solaris-2.5 but used on Solaris-2.6 */ + +#endif +#endif + +#ifdef ORIGINAL_XPM_PATCH +#if defined( USE_XPM ) || defined( USE_XPMINC ) +#if USE_XPMINC +#include +#else +#include /* Normal spot */ +#endif +#endif + +static XpmImage *mail_xpmimg = NULL; +static XpmImage *nomail_xpmimg = NULL; + +#else +#include +#include + +#define NOMAIL_WIDTH mailempty_width +#define NOMAIL_HEIGHT mailempty_height +#define NOMAIL_BITS mailempty_bits +#define MAIL_WIDTH mailfull_width +#define MAIL_HEIGHT mailfull_height +#define MAIL_BITS mailfull_bits +#endif + +#ifdef USE_VTLOCK + /* EL - RCS : for VT switching locking */ +extern int vtlock; /* Have to lock VT switching */ +extern int vtlocked; /* VT switching is locked */ + +extern void dovtlock(void); /* Actual do it */ +extern void dovtunlock(void); /* & undo it functions */ + +#endif + +static int signalUSR1 = 0; +static int signalUSR2 = 0; +char old_default_mode[20] = ""; + +#define AllPointerEventMask \ + (ButtonPressMask | ButtonReleaseMask | \ + EnterWindowMask | LeaveWindowMask | \ + PointerMotionMask | PointerMotionHintMask | \ + Button1MotionMask | Button2MotionMask | \ + Button3MotionMask | Button4MotionMask | \ + Button5MotionMask | ButtonMotionMask | \ + KeymapStateMask) + +#ifdef USE_VROOT +#include "vroot.h" +#endif +#ifdef SAFEWORD +#include "custpb.h" +#include "custf.h" + +extern char *text_dpass; +extern char *text_fpass; +extern char *text_chall; +static int challx, chally; + +extern pbmain(); + +struct pblk pblock; /* our instance of the pblk */ +struct pblk *pb; /* global pointer to the pblk */ + +extern int checkDynamic(); + +#endif + +#if defined( HAVE_SYSLOG_H ) && defined( USE_SYSLOG ) +#ifndef SYSLOG_FACILITY +#define SYSLOG_FACILITY LOG_AUTH +#endif + +static void +syslogStart(void) +{ + struct passwd *pw; + struct group *gr; + + pw = getpwuid(getuid()); + gr = getgrgid(getgid()); + + (void) openlog(ProgramName, LOG_PID, SYSLOG_FACILITY); + syslog(SYSLOG_INFO, "Start: %s, %s, %s", + pw->pw_name, gr->gr_name, XDisplayString(dsp)); +} + +void +syslogStop(char *displayName) +{ + struct passwd *pw; + struct group *gr; + int secs, mins; + + secs = (int) (seconds() - start_time); + mins = secs / 60; + secs %= 60; + + pw = getpwuid(getuid()); + gr = getgrgid(getgid()); + + syslog(SYSLOG_INFO, "Stop: %s, %s, %s, %dm %ds", + pw->pw_name, gr->gr_name, displayName, mins, secs); +} + +#endif + +void +error(const char *buf) +{ +#if defined( HAVE_SYSLOG_H ) && defined( USE_SYSLOG ) + extern Display *dsp; + + syslog(SYSLOG_WARNING, buf); + if (!nolock) { + if (strstr(buf, "unable to open display") == NULL) + syslogStop(XDisplayString(dsp)); + else + syslogStop("unknown display"); + closelog(); + } +#else + (void) fprintf(stderr, buf); +#endif + exit(1); +} + +/* Server access control support. */ + +static XHostAddress *XHosts; /* the list of "friendly" client machines */ +static int HostAccessCount; /* the number of machines in XHosts */ +static Bool HostAccessState; /* whether or not we even look at the list */ + +static void +XGrabHosts(Display * display) +{ + XHosts = XListHosts(display, &HostAccessCount, &HostAccessState); + if (XHosts) + XRemoveHosts(display, XHosts, HostAccessCount); + XEnableAccessControl(display); +} + +static void +XUngrabHosts(Display * display) +{ + if (XHosts) { + XAddHosts(display, XHosts, HostAccessCount); + XFree((caddr_t) XHosts); + } + if (HostAccessState == False) + XDisableAccessControl(display); +} + +/* Provides support for the DPMS options. */ +#ifdef USE_DPMS +static void +SetDPMS(Display * display, int nstandby, int nsuspend, int noff) +{ + static unsigned short standby = 0, suspend = 0, off = 0, flag = 0; + int dummy; + + if (DPMSQueryExtension(display, &dummy, &dummy)) { + if (!flag) { + DPMSGetTimeouts(display, &standby, &suspend, &off); + flag++; + } + if ((nstandby < 0) && (nsuspend < 0) && (noff < 0)) + DPMSSetTimeouts(display, standby, suspend, off); + else + DPMSSetTimeouts(display, + (nstandby <= 0 ? 0 : (nstandby > MIN_DPMS ? nstandby : MIN_DPMS)), + (nsuspend <= 0 ? 0 : (nsuspend > MIN_DPMS ? nsuspend : MIN_DPMS)), + (noff <= 0 ? 0 : (noff > MIN_DPMS ? noff : MIN_DPMS))); + } +} +#endif + +/*- + * Simple wrapper to get an asynchronous grab on the keyboard and mouse. If + * either grab fails, we sleep for one second and try again since some window + * manager might have had the mouse grabbed to drive the menu choice that + * picked "Lock Screen..". If either one fails the second time we print an + * error message and exit. + */ +static void +GrabKeyboardAndMouse(Display * display, Window window) +{ + Status status; + char *buf = NULL; + + status = XGrabKeyboard(display, window, True, + GrabModeAsync, GrabModeAsync, CurrentTime); + if (status != GrabSuccess) { + (void) sleep(1); + status = XGrabKeyboard(display, window, True, + GrabModeAsync, GrabModeAsync, CurrentTime); + + if (status != GrabSuccess) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, "%s, could not grab keyboard! (%d)\n", + ProgramName, status); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + } + status = XGrabPointer(display, window, True, (unsigned int) AllPointerEventMask, + GrabModeAsync, GrabModeAsync, None, mycursor, + CurrentTime); + if (status != GrabSuccess) { + (void) sleep(1); + status = XGrabPointer(display, window, True, (unsigned int) AllPointerEventMask, + GrabModeAsync, GrabModeAsync, None, mycursor, + CurrentTime); + + if (status != GrabSuccess) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, "%s, could not grab pointer! (%d)\n", + ProgramName, status); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + } +} + +/* Assuming that we already have an asynch grab on the pointer, just grab it + again with a new cursor shape and ignore the return code. */ +static void +ChangeGrabbedCursor(Display * display, Window window, Cursor cursor) +{ + if (!debug && grabmouse && !inwindow && !inroot) + (void) XGrabPointer(display, window, True, (unsigned int) AllPointerEventMask, + GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime); +} + +/*- + * Return True of False indicating if the given window has changed + * size relative to the window geometry cached in the mode_info + * struct. If the window handle given does not match the one in + * the cache, or if the width/height are not the same, then True + * is returned and the window handle in the cache is cleared. + * This causes mode_info() to reload the window info next time + * it is called. + * This function has non-obvious side-effects. I feel so dirty. Rh + */ + +static int +window_size_changed(int scrn, Window window) +{ + XWindowAttributes xgwa; + ModeInfo *mi = &modeinfo[scrn]; + + if (MI_WINDOW(mi) != window) { + MI_WINDOW(mi) = None; /* forces reload on next mode_info() */ + return (True); + } else { + (void) XGetWindowAttributes(dsp, window, &xgwa); + if ((MI_WIDTH(mi) != xgwa.width) || + (MI_HEIGHT(mi) != xgwa.height)) { + MI_WINDOW(mi) = None; + return (True); + } + } + + return (False); +} + +#ifdef FX +void +resetSize(ModeInfo * mi, Bool setGL) +{ + char *mesa_3Dfx_env; + static int width = 0, height = 0; + + mesa_3Dfx_env = getenv("MESA_GLX_FX"); + if (!mesa_3Dfx_env) + return; + if (tolower(mesa_3Dfx_env[0]) != 'f') + return; + + /* + * This is not correct for multiscreens, but there are other problems + * here for multiscreens as well so I am not going bother + */ + if (!width) + width = MI_WIDTH(mi); + if (!height) + height = MI_HEIGHT(mi); + + if (setGL) { + MI_WIDTH(mi) = glwidth; + MI_HEIGHT(mi) = glheight; + } else { + MI_WIDTH(mi) = width; + MI_HEIGHT(mi) = height; + } + XResizeWindow(MI_DISPLAY(mi), MI_WINDOW(mi), + MI_WIDTH(mi), MI_HEIGHT(mi)); +} +#endif + +/*- + * Return a pointer to an up-to-date ModeInfo struct for the given + * screen, window and iconic mode. Because the number of screens + * is limited, and much of the information is screen-specific, this + * function keeps static copies of ModeInfo structs are kept for + * each screen. This also eliminates redundant calls to the X server + * to acquire info that does change. + */ + +static ModeInfo * +mode_info(Display * display, int scrn, Window window, int iconic) +{ + XWindowAttributes xgwa; + ModeInfo *mi; + + mi = &modeinfo[scrn]; + + if (MI_FLAG_NOT_SET(mi, WI_FLAG_INFO_INITTED)) { + /* This stuff only needs to be set once per screen */ + + (void) memset((char *) mi, 0, sizeof (ModeInfo)); + + MI_DISPLAY(mi) = display; + MI_SCREEN(mi) = scrn; + MI_REAL_SCREEN(mi) = scrn; /* TODO, for multiscreen debugging */ + MI_SCREENPTR(mi) = ScreenOfDisplay(display, scrn); + MI_NUM_SCREENS(mi) = screens; + MI_MAX_SCREENS(mi) = screens; /* TODO, for multiscreen debugging */ + + MI_SCREENINFO(mi) = &Scr[scrn]; + + /* accessing globals here */ + MI_SET_FLAG_STATE(mi, WI_FLAG_MONO, + (mono || CellsOfScreen(MI_SCREENPTR(mi)) <= 2)); + MI_SET_FLAG_STATE(mi, WI_FLAG_INWINDOW, inwindow); + MI_SET_FLAG_STATE(mi, WI_FLAG_INROOT, inroot); + MI_SET_FLAG_STATE(mi, WI_FLAG_NOLOCK, nolock); +#ifdef USE_DTSAVER + MI_SET_FLAG_STATE(mi, WI_FLAG_INSTALL, install && !inroot && !dtsaver); +#else + MI_SET_FLAG_STATE(mi, WI_FLAG_INSTALL, install && !inroot); +#endif + MI_SET_FLAG_STATE(mi, WI_FLAG_DEBUG, debug); + MI_SET_FLAG_STATE(mi, WI_FLAG_USE3D, use3d && + !(mono || CellsOfScreen(MI_SCREENPTR(mi)) <= 2)); + MI_SET_FLAG_STATE(mi, WI_FLAG_VERBOSE, verbose); + MI_SET_FLAG_STATE(mi, WI_FLAG_FULLRANDOM, False); + MI_SET_FLAG_STATE(mi, WI_FLAG_WIREFRAME, wireframe); + MI_SET_FLAG_STATE(mi, WI_FLAG_MOUSE, mouse); + MI_SET_FLAG_STATE(mi, WI_FLAG_INFO_INITTED, True); + MI_IS_DRAWN(mi) = False; + } + if (MI_WINDOW(mi) != window) { + MI_WINDOW(mi) = window; + + (void) XGetWindowAttributes(display, window, &xgwa); + + MI_WIDTH(mi) = xgwa.width; + MI_HEIGHT(mi) = xgwa.height; + } + MI_SET_FLAG_STATE(mi, WI_FLAG_ICONIC, iconic); + + MI_DELTA3D(mi) = delta3d; + + MI_DELAY(mi) = delay; /* globals */ + MI_COUNT(mi) = count; + MI_CYCLES(mi) = cycles; + MI_SIZE(mi) = size; + MI_NCOLORS(mi) = ncolors; + MI_SATURATION(mi) = saturation; + MI_BITMAP(mi) = bitmap; + return (mi); +} + + +/* Restore all grabs, reset screensaver, restore colormap, close connection. */ +void +finish(Display * display, Bool closeDisplay) +{ + int scrn; + + for (scrn = startscreen; scrn < screens; scrn++) { + if (Scr[scrn].window != None) { + release_last_mode(mode_info(display, scrn, Scr[scrn].window, False)); + } + if (Scr[scrn].icon != None) { + release_last_mode(mode_info(display, scrn, Scr[scrn].icon, True)); + } + } +#ifdef ORIGINAL_XPM_PATCH + if (mail_xpmimg) + (void) free((void *) mail_xpmimg); + if (nomail_xpmimg) + (void) free((void *) nomail_xpmimg); +#endif + + XSync(display, False); +#ifdef USE_VROOT + if (inroot) + XClearWindow(display, Scr[startscreen].window); +#endif + if (!nolock && !allowaccess) { + if (grabserver) + XUngrabServer(display); + XUngrabHosts(display); + } + XUngrabPointer(display, CurrentTime); + XUngrabKeyboard(display, CurrentTime); + if (!enablesaver && !nolock) { + XSetScreenSaver(display, sstimeout, ssinterval, ssblanking, ssexposures); + } + XFlush(display); +#ifndef __sgi + /*- + * The following line seems to cause a core dump on the SGI. + * More work is needed on the cleanup code. + */ + if (closeDisplay) + (void) XCloseDisplay(display); +#endif + (void) nice(0); +#ifdef USE_VTLOCK + /* EL - RCS : Unlock VT switching */ + if (vtlock && vtlocked) + dovtunlock(); +#endif +} + +static int +xio_error(Display * d) +{ +#ifdef USE_DTSAVER + if (dtsaver) { /* this is normal when run as -dtsaver */ + /* X connection to :0.0 broken (explicit kill or server shutdown). */ + exit(0); + } +#endif + error("xio_error\n"); + return ((debug) ? 0 : 1); /* suppress message unless debugging */ +} + +/* Convenience function for drawing text */ +static void +putText(Display * display, Window window, GC gc, + const char *string, int bold, int left, int *px, int *py) + /* which window */ + /* gc */ + /* text to write */ + /* 1 = make it bold */ + /* left edge of text */ + /* current x and y, input & return */ +{ +#define PT_BUFSZ 2048 + char buf[PT_BUFSZ], *p, *s; + int x = *px, y = *py, last, len; + + (void) strncpy(buf, string, PT_BUFSZ); + buf[PT_BUFSZ - 1] = 0; + + p = buf; + last = 0; + for (;;) { + s = p; + for (; *p; ++p) + if (*p == '\n') + break; + if (!*p) + last = 1; + *p = 0; + + if ((len = strlen(s))) { /* yes, "=", not "==" */ + (void) XDrawImageString(display, window, gc, x, y, s, len); + if (bold) + (void) XDrawString(display, window, gc, x + 1, y, s, len); + } + if (!last) { + y += font->ascent + font->descent + 2; + x = left; + } else { + if (len) + x += XTextWidth(font, s, len); + break; + } + p++; + } + *px = x; + *py = y; +} + +static void +statusUpdate(int isnew, int scr) +{ + int left, x, y, len; + char buf[1024]; + XWindowAttributes xgwa; + static int last_time; + +#ifdef USE_BUTTON_LOGOUT + int ysave; + static int made_button, last_tried_lo = 0; + +#endif /* USE_BUTTON_LOGOUT */ + + len = (int) (seconds() - start_time) / 60; + +#ifdef USE_BUTTON_LOGOUT + if (tried_logout && !last_tried_lo) { + last_tried_lo = 1; + isnew = 1; +#ifdef USE_AUTO_LOGOUT + logoutAuto = 0; +#endif + } + if (isnew) + made_button = 0; +#endif /* USE_BUTTON_LOGOUT */ + + if (isnew || last_time != len) + last_time = len; + else + return; + + (void) XGetWindowAttributes(dsp, Scr[scr].window, &xgwa); + x = left = timex; + y = timey; + + if (timeelapsed) { + if (len < 60) + (void) sprintf(buf, +#ifdef DE + "Seit %d Minute%s gesperrt. \n", + len, len <= 1 ? "" : "n" +#else +#ifdef FR + "%d minute%s écoulée%s depuis verrouillage. \n", + len, len <= 1 ? "" : "s", len <= 1 ? "" : "s" +#else +#ifdef NL + "%d minute%s op slot. \n", + len, len <= 1 ? "" : "n" +#else + "%d minute%s elapsed since locked. \n", + len, len <= 1 ? "" : "s" +#endif +#endif +#endif + ); + else + (void) sprintf(buf, +#ifdef DE + "Seit %d:%02d Stunden gesperrt. \n", + len / 60, len % 60 +#else +#ifdef FR + "%d:%02d heures écoulée%s depuis verouillage. \n", + len / 60, len % 60, (len / 60) <= 1 ? "" : "s" +#else +#ifdef NL + "%d:%02d uur op slot. \n", + len / 60, len % 60 +#else + "%d:%02d hours elapsed since locked. \n", + len / 60, len % 60 +#endif +#endif +#endif + ); + putText(dsp, Scr[scr].window, Scr[scr].textgc, buf, False, left, &x, &y); + } +#ifdef USE_BUTTON_LOGOUT + if (enable_button) { + if (logoutButton > len) { + int tmp = logoutButton - len; + + if (tmp < 60) + (void) sprintf(buf, +#ifdef DE + "In %d Minute%s erscheint der Auslogger. \n", + tmp, (tmp <= 1) ? "" : "n" +#else +#ifdef FR + "%d minute%s jusqu'à apparition du bouton lougout. \n", + tmp, (tmp <= 1) ? "" : "s" +#else +#ifdef NL + "Over %d minute%s verschijnt de logout knop. \n", + tmp, (tmp <= 1) ? "" : "n" +#else + "%d minute%s until the public logout button appears. \n", + tmp, (tmp <= 1) ? "" : "s" +#endif +#endif +#endif + ); + else + (void) sprintf(buf, +#ifdef DE + "In %d:%02d Stunden erscheint der Auslogger. \n", +#else +#ifdef FR + "%d:%02d heures jusqu'à apparition du bouton lougout \n", +#else +#ifdef NL + "Over %d:%02d uur verschijnt de logout knop. \n", +#else + "%d:%02d hours until the public logout button appears. \n", +#endif +#endif +#endif + tmp / 60, tmp % 60); + putText(dsp, Scr[scr].window, Scr[scr].textgc, buf, False, left, &x, &y); + } else { + putText(dsp, Scr[scr].window, Scr[scr].textgc, +#ifdef DE + "Werft mich raus \n", +#else +#ifdef FR + "Jettes moi \n", +#else +#ifdef NL + "Schop me eruit \n", +#else + "Kick me out \n", +#endif +#endif +#endif + False, left, &x, &y); + if (!made_button || (isnew && tried_logout)) { + made_button = 1; + ysave = y; + + y += font->ascent + font->descent + 8; /* Leave a gap for validating */ + XUnmapWindow(dsp, Scr[scr].button); + XSetForeground(dsp, Scr[scr].gc, Scr[scr].bg_pixel); + XFillRectangle(dsp, Scr[scr].window, Scr[scr].gc, left, y, + xgwa.width - left, + 5 + 2 * (font->ascent + font->descent)); + XSetForeground(dsp, Scr[scr].gc, Scr[scr].fg_pixel); + + if (tried_logout) { + putText(dsp, Scr[scr].window, Scr[scr].textgc, logoutFailedString, + True, left, &x, &y); + } else { + XMoveWindow(dsp, Scr[scr].button, left, y); + XMapWindow(dsp, Scr[scr].button); + XRaiseWindow(dsp, Scr[scr].button); + (void) sprintf(buf, " %s ", logoutButtonLabel); + XSetForeground(dsp, Scr[scr].gc, Scr[screen].white_pixel); + (void) XDrawString(dsp, Scr[scr].button, Scr[scr].gc, + 0, font->ascent + 1, buf, strlen(buf)); + XSetForeground(dsp, Scr[scr].gc, Scr[scr].fg_pixel); + y += 5 + 2 * font->ascent + font->descent; + putText(dsp, Scr[scr].window, Scr[scr].textgc, logoutButtonHelp, + False, left, &x, &y); + } + y = ysave; + x = left; + } + } + } +#endif /* USE_BUTTON_LOGOUT */ +#ifdef USE_AUTO_LOGOUT + if (logoutAuto) { + int tmp = logoutAuto - len; + + if (tmp < 60) + (void) sprintf(buf, +#ifdef FR + "%d minute%s jusqu'à l'auto-logout. \n", +#else + "%d minute%s until auto-logout. \n", +#endif + tmp, (tmp <= 1) ? "" : "s"); + else + (void) sprintf(buf, +#ifdef FR + "%d:%02d heure%s jusqu'à auto-logout. \n", + tmp / 60, tmp % 60, (tmp / 60) <= 1 ? "" : "s" +#else + "%d:%02d hours until auto-logout. \n", + tmp / 60, tmp % 60 +#endif + ); + putText(dsp, Scr[scr].window, Scr[scr].textgc, buf, False, left, &x, &y); + } +#endif /* USE_AUTO_LOGOUT */ +} + +#ifdef USE_AUTO_LOGOUT +static void +checkLogout(Display * display) +{ + if (nolock || tried_logout || !logoutAuto) + return; + if (logoutAuto * 60 < (int) (seconds() - start_time)) { + tried_logout = 1; + logoutAuto = 0; + logoutUser(display); + } +} + +#endif /* USE_AUTO_LOGOUT */ + +#ifndef USE_OLD_EVENT_LOOP + +/* subtract timer t2 from t1, return result in t3. Result is not allowed to + go negative, set to zero if result underflows */ + +static +void +sub_timers(struct timeval *t1, struct timeval *t2, struct timeval *t3) +{ + struct timeval tmp; + int borrow = 0; + + if (t1->tv_usec < t2->tv_usec) { + borrow++; + tmp.tv_usec = (1000000 + t1->tv_usec) - t2->tv_usec; + } else { + tmp.tv_usec = t1->tv_usec - t2->tv_usec; + } + + /* Be careful here, timeval fields may be unsigned. To avoid + underflow in an unsigned int, add the borrow value to the + subtrahend for the relational test. Same effect, but avoids the + possibility of a negative intermediate value. */ + if (t1->tv_sec < (t2->tv_sec + borrow)) { + tmp.tv_usec = tmp.tv_sec = 0; + } else { + tmp.tv_sec = t1->tv_sec - t2->tv_sec - borrow; + } + + *t3 = tmp; +} + +/* return 0 on event recieved, -1 on timeout */ +static int +runMainLoop(int maxtime, int iconscreen) +{ + static int lastdelay = -1, lastmaxtime = -1; + int fd = ConnectionNumber(dsp), r; + struct timeval sleep_time, first, repeat, elapsed, tmp; + fd_set reads; + unsigned long started; + +#ifdef USE_NEW_EVENT_LOOP + struct timeval loopStart, timeSinceLoop; + unsigned long lastIter = 0, desiredIter = 0; + + GETTIMEOFDAY(&loopStart); +#endif + + first.tv_sec = 0; + first.tv_usec = 0; + elapsed.tv_sec = 0; + elapsed.tv_usec = 0; + repeat.tv_sec = delay / 1000000; + repeat.tv_usec = delay % 1000000; + + started = seconds(); + + for (;;) { + if (signalUSR1 || signalUSR2) { + int i; + + if (signalUSR1) { +#ifdef DEBUG + (void) printf("switch to mode %s\n", "blank"); +#endif + for (i = 0; i < numprocs; i++) { + if (!strcmp(LockProcs[i].cmdline_arg, "blank")) { + set_default_mode(&LockProcs[i]); + break; + } + } + } else { +#ifdef DEBUG + (void) printf("switch to mode %s\n", old_default_mode); +#endif + for (i = 0; i < numprocs; i++) { + if (!strcmp(LockProcs[i].cmdline_arg, old_default_mode)) { + set_default_mode(&LockProcs[i]); + break; + } + } + } + + for (screen = startscreen; screen < screens; screen++) { + call_change_hook((LockStruct *) NULL, + mode_info(dsp, screen, Scr[screen].window, False)); + } + + signalUSR1 = signalUSR2 = 0; + } + if (delay != lastdelay || maxtime != lastmaxtime) { + if (!delay || (maxtime && delay / 1000000 > maxtime)) { + repeat.tv_sec = maxtime; + repeat.tv_usec = 0; + } else { + repeat.tv_sec = delay / 1000000; + repeat.tv_usec = delay % 1000000; + } + first = repeat; + lastdelay = delay; + lastmaxtime = maxtime; + sleep_time = first; + } else { + sleep_time = repeat; + } + + /* subtract time spent doing last loop iteration */ + sub_timers(&sleep_time, &elapsed, &sleep_time); + + FD_ZERO(&reads); + FD_SET(fd, &reads); + +#if DCE_PASSWD + r = _select_sys(fd + 1, + (fd_set *) & reads, (fd_set *) NULL, (fd_set *) NULL, + (struct timeval *) &sleep_time); +#else +#if defined( __cplusplus ) || defined( c_plusplus ) + r = select(fd + 1, + (fd_set *) & reads, (fd_set *) NULL, (fd_set *) NULL, + (struct timeval *) &sleep_time); +#else + r = select(fd + 1, + (void *) &reads, (void *) NULL, (void *) NULL, + (struct timeval *) &sleep_time); +#endif +#endif + + if (r == 1) + return 0; + if (r > 0 || (r == -1 && errno != EINTR)) + (void) fprintf(stderr, + "Unexpected select() return value: %d (errno=%d)\n", r, errno); + + GETTIMEOFDAY(&tmp); /* get time before calling mode proc */ + +#ifdef USE_NEW_EVENT_LOOP + if (delay == 0) { + desiredIter = lastIter + 1; + } else { + sub_timers(&tmp, &loopStart, &timeSinceLoop); + desiredIter = + (timeSinceLoop.tv_usec / delay) + + (((timeSinceLoop.tv_sec % delay) * 1000000) / delay) + + (timeSinceLoop.tv_sec / delay) * 1000000; + } + while (lastIter != desiredIter) { + ++lastIter; +#endif + + for (screen = startscreen; screen < screens; screen++) { + Window cbwin; + Bool iconic; + ModeInfo *mi; + + if (screen == iconscreen) { + cbwin = Scr[screen].icon; + iconic = True; + } else { + cbwin = Scr[screen].window; + iconic = False; + } + if (cbwin != None) { + mi = mode_info(dsp, screen, cbwin, iconic); + call_callback_hook((LockStruct *) NULL, mi); + } + } + + XSync(dsp, False); + + /* check for events received during the XSync() */ + if (QLength(dsp)) { + return 0; + } + if (maxtime && ((int) (seconds() - started) > maxtime)) { + return -1; + } +#ifdef USE_NEW_EVENT_LOOP + } +#endif + /* if (mindelay) usleep(mindelay); */ + + /* get the time now, figure how long it took */ + GETTIMEOFDAY(&elapsed); + sub_timers(&elapsed, &tmp, &elapsed); + } +} + +#endif /* !USE_OLD_EVENT_LOOP */ + +static int +ReadXString(char *s, int slen) +{ + XEvent event; + char keystr[20]; + char c; + int i; + int bp; + int len; + int thisscreen = screen; + char pwbuf[PASSLENGTH]; + int first_key = 1; + + for (screen = startscreen; screen < screens; screen++) + if (thisscreen == screen) { + call_init_hook((LockStruct *) NULL, + mode_info(dsp, screen, Scr[screen].icon, True)); + } else { + call_init_hook((LockStruct *) NULL, + mode_info(dsp, screen, Scr[screen].window, False)); + } + statusUpdate(True, thisscreen); + bp = 0; + *s = 0; + + for (;;) { + unsigned long lasteventtime = seconds(); + + while (!XPending(dsp)) { +#ifdef USE_OLD_EVENT_LOOP + for (screen = startscreen; screen < screens; screen++) + if (thisscreen == screen) + call_callback_hook(NULL, mode_info(dsp, screen, + Scr[screen].icon, True)); + else + call_callback_hook(NULL, mode_info(dsp, screen, + Scr[screen].window, False)); + statusUpdate(False, thisscreen); + XSync(dsp, False); + (void) usleep(delay); +#else + statusUpdate(False, thisscreen); + if (runMainLoop(MIN(timeout, 5), thisscreen) == 0) + break; +#endif + + if (timeout < (int) (seconds() - lasteventtime)) { + screen = thisscreen; + return 1; + } + } + + screen = thisscreen; + (void) XNextEvent(dsp, &event); + + /* + * This event handling code should be unified with the + * similar code in justDisplay(). + */ + switch (event.type) { + case KeyPress: + len = XLookupString((XKeyEvent *) & event, keystr, 20, NULL, NULL); + for (i = 0; i < len; i++) { + c = keystr[i]; + switch (c) { + case 8: /* ^H */ + case 127: /* DEL */ + if (bp > 0) + bp--; + break; + case 10: /* ^J */ + case 13: /* ^M */ + if (first_key && usefirst) + break; + s[bp] = '\0'; + return 0; + case 21: /* ^U */ + bp = 0; + break; + default: + s[bp] = c; + if (bp < slen - 1) + bp++; + else + XSync(dsp, True); /* flush input buffer */ + } + } + XSetForeground(dsp, Scr[screen].gc, Scr[screen].bg_pixel); + if (echokeys) { + (void) memset((char *) pwbuf, '?', slen); + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + passx, passy - font->ascent, + XTextWidth(font, pwbuf, slen), + font->ascent + font->descent); + (void) XDrawString(dsp, Scr[screen].window, Scr[screen].textgc, + passx, passy, pwbuf, bp); + } + /* eat all events if there are more than + enough pending... this keeps the Xlib event + buffer from growing larger than all + available memory and crashing xlock. */ + if (XPending(dsp) > 100) { /* 100 is arbitrarily + big enough */ + register Status status; + + do { + status = XCheckMaskEvent(dsp, + KeyPressMask | KeyReleaseMask, &event); + } while (status); + XBell(dsp, 100); + } + break; + + case MotionNotify: + if (!mousemotion) + break; + /* fall through on last mouse event */ + case ButtonPress: + if (((XButtonEvent *) & event)->window == Scr[screen].icon) { + return 1; + } +#ifdef USE_BUTTON_LOGOUT + if (((XButtonEvent *) & event)->window == Scr[screen].button) { + XSetFunction(dsp, Scr[screen].gc, GXxor); + XSetForeground(dsp, Scr[screen].gc, Scr[screen].fg_pixel); + XFillRectangle(dsp, Scr[screen].button, Scr[screen].gc, + 0, 0, 500, 100); + XSync(dsp, False); + tried_logout = 1; + logoutUser(dsp); + XSetFunction(dsp, Scr[screen].gc, GXcopy); + } +#endif + break; + + case Expose: + if (event.xexpose.count != 0) + break; + /* fall through on last expose event */ + case VisibilityNotify: + /* next line for -geometry */ + if (event.xvisibility.state != VisibilityUnobscured) { + /* window was restacked or exposed */ + if (!debug && !inwindow) + XRaiseWindow(dsp, event.xvisibility.window); + call_refresh_hook((LockStruct *) NULL, + mode_info(dsp, screen, Scr[screen].window, False)); +#ifndef USE_WINDOW_VISIBILITY + s[0] = '\0'; + return 1; +#endif + } + break; + case ConfigureNotify: + /* next line for -geometry */ + if (!fullscreen) + break; + /* window config changed */ + if (!debug && !inwindow) + XRaiseWindow(dsp, event.xconfigure.window); + if (window_size_changed(screen, Scr[screen].window)) { + call_init_hook((LockStruct *) NULL, + mode_info(dsp, screen, Scr[screen].window, False)); + } + s[0] = '\0'; + return 1; + case KeymapNotify: + case KeyRelease: + case ButtonRelease: + case LeaveNotify: + case EnterNotify: + case NoExpose: + case CirculateNotify: + case DestroyNotify: + case GravityNotify: + case MapNotify: + case ReparentNotify: + case UnmapNotify: + break; + + default: + (void) fprintf(stderr, "%s: unexpected event: %d\n", + ProgramName, event.type); + break; + } + first_key = 0; + } +} + +void +modeDescription(ModeInfo * mi) +{ + int left, x, y; + int scrn = MI_SCREEN(mi); + XWindowAttributes xgwa; + + (void) XGetWindowAttributes(dsp, Scr[scrn].window, &xgwa); + + x = left = Scr[scrn].iconpos.x; + y = Scr[scrn].iconpos.y - font->ascent + font->descent + 2; + + XSetForeground(dsp, Scr[scrn].gc, Scr[scrn].bg_pixel); + XFillRectangle(dsp, Scr[scrn].window, Scr[scrn].gc, + x, y - font->ascent, + xgwa.width - x, font->ascent + font->descent + 2); + + putText(dsp, Scr[scrn].window, Scr[scrn].textgc, MI_NAME(mi), + True, left, &x, &y); + putText(dsp, Scr[scrn].window, Scr[scrn].textgc, ": ", True, left, &x, &y); + putText(dsp, Scr[scrn].window, Scr[scrn].textgc, MI_DESC(mi), + False, left, &x, &y); + putText(dsp, Scr[scrn].window, Scr[scrn].textgc, "\n", False, left, &x, &y); +} + +static int +getPassword(void) +{ + XWindowAttributes xgwa; + int x, y, left, done, remy; + char buffer[PASSLENGTH]; + char **planp; + char *hostbuf = NULL; + ModeInfo *mi = &modeinfo[screen]; + +#ifdef SAFEWORD + char chall[PASSLENGTH]; + +#endif +#ifdef FX + Bool mesa_3Dfx_fullscreen; + char *mesa_3Dfx_env; + + mesa_3Dfx_env = getenv("MESA_GLX_FX"); + if (mesa_3Dfx_env) + if (tolower(mesa_3Dfx_env[0] == 'f')) { + /* disabling fullscreen HW 3dfx rendering to + allow iconic mode window. */ + mesa_3Dfx_fullscreen = True; + unsetenv("MESA_GLX_FX"); + } +#endif + (void) nice(0); + if (!fullscreen) + XConfigureWindow(dsp, Scr[screen].window, sizeconfiguremask, + &(Scr[screen].fullsizeconfigure)); + + + (void) XGetWindowAttributes(dsp, Scr[screen].window, &xgwa); + + ChangeGrabbedCursor(dsp, Scr[screen].window, + XCreateFontCursor(dsp, XC_left_ptr)); + + MI_CLEARWINDOWCOLOR(mi, Scr[screen].bg_pixel); + XMapWindow(dsp, Scr[screen].icon); + XRaiseWindow(dsp, Scr[screen].icon); + + if (description) + modeDescription(mi); + + x = left = Scr[screen].iconpos.x + iconwidth + font->max_bounds.width; + y = Scr[screen].iconpos.y + font->ascent; + + if ((hostbuf = (char *) malloc(strlen(user) + strlen(hostname) + 2)) != NULL) { + (void) sprintf(hostbuf, "%s@%s", user, hostname); + + putText(dsp, Scr[screen].window, Scr[screen].textgc, text_user, True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, hostbuf, False, left, &x, &y); + (void) free((void *) hostbuf); + } + if (displayname && displayname[0] != ':') { + char *displaybuf = NULL; + char *colon = (char *) strchr(displayname, ':'); + int n = colon - displayname; + + if ((displaybuf = (char *) malloc(n + 1)) != NULL) { + (void) strncpy(displaybuf, displayname, n); + displaybuf[n] = '\0'; + if (remote && n + && strcmp(displaybuf, "unix") != 0 + && strcmp(displaybuf, "localhost") != 0 + && strcmp(displaybuf, hostname) != 0) { + putText(dsp, Scr[screen].window, Scr[screen].textgc, " Display: ", True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, displaybuf, False, left, &x, &y); + } + (void) free((void *) displaybuf); + } + } + putText(dsp, Scr[screen].window, Scr[screen].textgc, "\n", False, left, &x, &y); + +#ifdef SAFEWORD + if (checkDynamic()) { + pb = &pblock; + (void) memset((char *) &pblock, 0, sizeof (pblock)); +#if 0 + (void) strcpy(pblock.uport, "custpb"); + pblock.status = NO_STATUS; +#endif + challx = x; + chally = y; + putText(dsp, Scr[screen].window, Scr[screen].textgc, "\n\n", + False, left, &x, &y); + pb->mode = CHALLENGE; + (void) strcpy(pb->id, user); + pbmain(pb); + if (pb->status != GOOD_USER) { + chall[0] = 0; + return 1; + } + if (pb->dynpwdf) { + /* We do not really care if they also got a fixed password... */ + putText(dsp, Scr[screen].window, Scr[screen].textgc, text_dpass, + True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, " ", + False, left, &x, &y); + passx = x; + passy = y; + } else if (pb->fixpwdf) { + /* In the unlikely event they only got a fixed password... */ + putText(dsp, Scr[screen].window, Scr[screen].textgc, text_fpass, + True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, " ", + False, left, &x, &y); + passx = x; + passy = y; + } + } else +#endif + { + putText(dsp, Scr[screen].window, Scr[screen].textgc, text_pass, True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, " ", False, left, &x, &y); + + passx = x; + passy = y; + } + y += font->ascent + font->descent + 6; + if (y < Scr[screen].iconpos.y + iconheight + font->ascent + 12) + y = Scr[screen].iconpos.y + iconheight + font->ascent + 12; + x = left = Scr[screen].iconpos.x; + putText(dsp, Scr[screen].window, Scr[screen].textgc, text_info, False, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, "\n", False, left, &x, &y); + + timex = x; + timey = y; + +#ifdef USE_AUTO_LOGOUT + if (logoutAuto) { + y += font->ascent + font->descent + 2; + } +#endif +#ifdef USE_BUTTON_LOGOUT + if (enable_button) { + y += font->ascent + font->descent + 2; + } +#endif + if (timeelapsed) { + y += font->ascent + font->descent + 2; + } + remy = y; + + putText(dsp, Scr[screen].window, Scr[screen].textgc, "\n", False, left, &x, &y); + + y = Scr[screen].planpos.y; + if (*plantext) { + for (planp = plantext; *planp; ++planp) { +#ifdef USE_MB + y += mbRect.height + 2; +#else + y += planfont->ascent + planfont->descent + 2; +#endif + (void) XDrawString(dsp, Scr[screen].window, Scr[screen].plantextgc, + Scr[screen].planpos.x, y, *planp, strlen(*planp)); + } + } + XFlush(dsp); + + if (mailCmd && mailCmd[0]) { +#ifdef ORIGINAL_XPM_PATCH + XpmImage *mbxpm; + mailboxInfo *mbi; + int x, y; + + if (system(mailCmd)) { + mbxpm = nomail_xpmimg; + mbi = &Scr[screen].mb.nomail; + } else { + mbxpm = mail_xpmimg; + mbi = &Scr[screen].mb.mail; + } + + if (mbxpm) { + x = (DisplayWidth(dsp, screen) - mbxpm->width) / 2; + y = (Scr[screen].planpos.y - 5) - mbxpm->height; + XCopyArea(dsp, mbi->pixmap, + Scr[screen].window, Scr[screen].mb.mbgc, + 0, 0, + mbxpm->width, mbxpm->height, x, y); + } +#else + mailboxInfo *mbi; + int mbx, mby; + + if (system(mailCmd)) { + mbi = &Scr[screen].mb.nomail; + } else { + mbi = &Scr[screen].mb.mail; + } + if (mbi) { + mbx = (DisplayWidth(dsp, screen) - mbi->width) / 2; + mby = (Scr[screen].planpos.y - 5) - mbi->height; + XSetTSOrigin(dsp, Scr[screen].mb.mbgc, mbx, mby); + XSetStipple(dsp, Scr[screen].mb.mbgc, mbi->pixmap); + XSetFillStyle(dsp, Scr[screen].mb.mbgc, FillOpaqueStippled); + XFillRectangle(dsp, Scr[screen].window, Scr[screen].mb.mbgc, + mbx, mby, mbi->width, mbi->height); + } +#endif + } + done = False; + while (!done) { +#ifdef USE_SOUND + if (sound && !got_invalid) { + play_sound(infosound); + } + got_invalid = 0; +#endif + +#ifdef SAFEWORD + pb->mode = CHALLENGE; + (void) strcpy(pb->id, user); + pbmain(pb); + if (pb->status != GOOD_USER) { + chall[0] = 0; + return 1; + } + left = x = challx; + y = chally; + if (strlen(pb->chal) > 0) { + (void) strcpy(chall, pb->chal); + putText(dsp, Scr[screen].window, Scr[screen].textgc, text_chall, + True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, " ", + False, left, &x, &y); + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + left + XTextWidth(font, text_chall, strlen(text_chall)), + y - font->ascent, XTextWidth(font, chall, strlen(chall)), + font->ascent + font->descent + 2); + + putText(dsp, Scr[screen].window, Scr[screen].textgc, chall, + False, left, &x, &y); + } + putText(dsp, Scr[screen].window, Scr[screen].textgc, "\n", + False, left, &x, &y); + if (pb->dynpwdf || pb->fixpwdf) { + /* If they have a dynamic passwd we do not really care about + the fixed password... */ + putText(dsp, Scr[screen].window, Scr[screen].textgc, + (pb->dynpwdf) ? text_dpass : text_fpass, + True, left, &x, &y); + putText(dsp, Scr[screen].window, Scr[screen].textgc, " ", + False, left, &x, &y); + passx = x; + passy = y; + } +#endif + if (ReadXString(buffer, PASSLENGTH)) + break; + y = remy; + + XSetForeground(dsp, Scr[screen].gc, Scr[screen].bg_pixel); +#ifdef SAFEWORD + (void) strcpy(pb->dynpwd, buffer); + pb->mode = EVALUATE_ALL; + pbmain(pb); + + done = (pb->status == PASS || pb->status == PASS_MASTER); + pb->mode = UPDATE_LOGS; + pbmain(pb); +#else + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + Scr[screen].iconpos.x, y - font->ascent, + XTextWidth(font, text_invalid, strlen(text_invalid)), + font->ascent + font->descent + 2); + + (void) XDrawString(dsp, Scr[screen].window, Scr[screen].textgc, + Scr[screen].iconpos.x, y, text_valid, strlen(text_valid)); + XFlush(dsp); + + done = checkPasswd(buffer); + + + if (!done && !*buffer) { + /* just hit return, and it was not his password */ + break; +#if defined( HAVE_SYSLOG_H ) && defined( USE_SYSLOG ) + } else if (!done) { + /* bad password... log it... */ + (void) printf("failed unlock attempt on user %s\n", user); + syslog(SYSLOG_NOTICE, "%s: failed unlock attempt on user %s\n", + ProgramName, user); +#endif + } +#endif + /* clear plaintext password so you can not grunge around + /dev/kmem */ + (void) memset((char *) buffer, 0, sizeof (buffer)); + + if (done) { +#ifdef USE_SOUND + if (sound) + play_sound(validsound); +#endif + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + Scr[screen].iconpos.x, y - font->ascent, + XTextWidth(font, text_invalid, strlen(text_invalid)), + font->ascent + font->descent + 2); + + (void) XDrawString(dsp, Scr[screen].window, Scr[screen].textgc, + Scr[screen].iconpos.x, y, text_valid, strlen(text_valid)); + XFlush(dsp); + + if (!fullscreen) + XConfigureWindow(dsp, Scr[screen].window, sizeconfiguremask, + &minisizeconfigure); + return 0; + } else { + XSync(dsp, True); /* flush input buffer */ + (void) sleep(1); + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + Scr[screen].iconpos.x, y - font->ascent, + XTextWidth(font, text_valid, strlen(text_valid)), + font->ascent + font->descent + 2); + (void) XDrawString(dsp, Scr[screen].window, Scr[screen].textgc, + Scr[screen].iconpos.x, y, text_invalid, strlen(text_invalid)); + if (echokeys) /* erase old echo */ + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + passx, passy - font->ascent, + xgwa.width - passx, + font->ascent + font->descent); + XSync(dsp, True); /* flush input buffer */ + (void) sleep(1); + XFillRectangle(dsp, Scr[screen].window, Scr[screen].gc, + Scr[screen].iconpos.x, y - font->ascent, + XTextWidth(font, text_invalid, strlen(text_invalid)), + font->ascent + font->descent + 2); +#ifdef USE_SOUND + if (sound) + play_sound(invalidsound); + got_invalid = 1; +#endif + } + } + ChangeGrabbedCursor(dsp, Scr[screen].window, mycursor); + XUnmapWindow(dsp, Scr[screen].icon); +#ifdef USE_BUTTON_LOGOUT + XUnmapWindow(dsp, Scr[screen].button); +#endif + if (!fullscreen) + XConfigureWindow(dsp, Scr[screen].window, sizeconfiguremask, + &minisizeconfigure); + (void) nice(nicelevel); +#ifdef FX + if (mesa_3Dfx_fullscreen) + setenv("MESA_GLX_FX", "fullscreen", 0); +#endif + return 1; +} + +static int +event_screen(Display * display, Window event_win) +{ + int i; + + for (i = startscreen; i < screens; i++) { + if (event_win == RootWindow(display, i)) { + return (i); + } + } + return (0); +} + +static int +justDisplay(Display * display) +{ + int timetodie = False; + int not_done = True; + XEvent event; + +#ifdef USE_VTLOCK + /* EL - RCS : lock VT switching */ + /* + * I think it has to be done here or 'switch/restore' modes won't + * ever be usefull ! + */ + if (!nolock && vtlock && !vtlocked) + dovtlock(); +#endif + + for (screen = startscreen; screen < screens; screen++) { + call_init_hook((LockStruct *) NULL, + mode_info(display, screen, Scr[screen].window, False)); + } + + while (not_done) { + while (!XPending(display)) { +#ifdef USE_OLD_EVENT_LOOP + (void) usleep(delay); + for (screen = startscreen; screen < screens; screen++) + call_callback_hook((LockStruct *) NULL, + mode_info(display, screen, Scr[screen].window, False)); +#ifdef USE_AUTO_LOGOUT + checkLogout(display); +#endif + XSync(display, False); +#else /* !USE_OLD_EVENT_LOOP */ +#ifdef USE_AUTO_LOGOUT + if (runMainLoop(30, -1) == 0) + break; + checkLogout(display); +#else + (void) runMainLoop(0, -1); +#endif +#endif /* !USE_OLD_EVENT_LOOP */ + } + (void) XNextEvent(display, &event); + + /* + * This event handling code should be unified with the + * similar code in ReadXString(). + */ + switch (event.type) { + case Expose: + if (event.xexpose.count != 0) { + break; + } + /* fall through on last expose event of the series */ + + case VisibilityNotify: + if (!debug && !inwindow) { + XRaiseWindow(display, event.xany.window); + } + for (screen = startscreen; screen < screens; screen++) { + call_refresh_hook((LockStruct *) NULL, + mode_info(display, screen, Scr[screen].window, False)); + } + break; + + case ConfigureNotify: + if (!debug && !inwindow) + XRaiseWindow(display, event.xconfigure.window); + for (screen = startscreen; screen < screens; screen++) { + if (window_size_changed(screen, Scr[screen].window)) { + call_init_hook((LockStruct *) NULL, + mode_info(display, screen, Scr[screen].window, False)); + } + } + break; + + case ButtonPress: + if (event.xbutton.button == Button2) { + /* call change hook only for clicked window? */ + for (screen = startscreen; screen < screens; screen++) { + call_change_hook((LockStruct *) NULL, + mode_info(display, screen, Scr[screen].window, + False)); + } + } else { + screen = event_screen(display, event.xbutton.root); + not_done = False; + } + break; + + case MotionNotify: + if (mousemotion) { + screen = event_screen(display, event.xmotion.root); + not_done = False; + } + break; + + case KeyPress: + screen = event_screen(display, event.xkey.root); + not_done = False; + break; + } + + if (!nolock && lock_delay && + (lock_delay <= (int) (seconds() - start_time))) { + timetodie = True; + not_done = False; + } + } + + /* KLUDGE SO TVTWM AND VROOT WILL NOT MAKE XLOCK DIE */ + if (screen >= screens) + screen = startscreen; + + lock_delay = False; + if (usefirst) + (void) XPutBackEvent(display, &event); + return timetodie; +} + + +static void +sigcatch(int signum) +{ + ModeInfo *mi = mode_info(dsp, startscreen, Scr[startscreen].window, False); + const char *name = (mi == NULL) ? "unknown" : MI_NAME(mi); + char *buf; + + + finish(dsp, True); + buf = (char *) malloc(strlen(ProgramName) + strlen(name) + 160); + (void) sprintf(buf, + "Access control list restored.\n%s: caught signal %d while running %s mode (uid %ld).\n", + ProgramName, signum, name, (long) getuid()); + error(buf); + (void) free((void *) buf); /* Should never get here */ +} + +static void +lockDisplay(Display * display, Bool do_display) +{ +#ifdef USE_VTLOCK + /* EL - RCS : lock VT switching */ + if (!nolock && vtlock && !vtlocked) + dovtlock(); +#endif +#if defined( HAVE_SYSLOG_H ) && defined( USE_SYSLOG ) + syslogStart(); +#endif +#ifdef USE_SOUND + if (sound && !inwindow && !inroot && !lockdelay) + play_sound(locksound); +#endif + if (!allowaccess) { +#if defined( SYSV ) || defined( SVR4 ) || ( __VMS_VER >= 70000000 ) + sigset_t oldsigmask; + sigset_t newsigmask; + + (void) sigemptyset(&newsigmask); +#ifndef DEBUG + (void) sigaddset(&newsigmask, SIGHUP); +#endif + (void) sigaddset(&newsigmask, SIGINT); + (void) sigaddset(&newsigmask, SIGQUIT); + (void) sigaddset(&newsigmask, SIGTERM); + (void) sigprocmask(SIG_BLOCK, &newsigmask, &oldsigmask); +#else + int oldsigmask; + +#ifndef VMS +#if !defined(__cplusplus) && !defined(c_plusplus) + extern int sigblock(int); + extern int sigsetmask(int); + +#endif + oldsigmask = sigblock( +#ifndef DEBUG + sigmask(SIGHUP) | +#endif + sigmask(SIGINT) | + sigmask(SIGQUIT) | + sigmask(SIGTERM)); +#endif +#endif + +#ifndef DEBUG + (void) signal(SIGHUP, (void (*)(int)) sigcatch); +#endif + (void) signal(SIGINT, (void (*)(int)) sigcatch); + (void) signal(SIGQUIT, (void (*)(int)) sigcatch); + (void) signal(SIGTERM, (void (*)(int)) sigcatch); + /* we should trap ALL signals, especially the deadly ones */ + (void) signal(SIGSEGV, (void (*)(int)) sigcatch); + (void) signal(SIGBUS, (void (*)(int)) sigcatch); + (void) signal(SIGFPE, (void (*)(int)) sigcatch); + + if (grabserver) + XGrabServer(display); + XGrabHosts(display); + +#if defined( SYSV ) || defined( SVR4 ) || ( __VMS_VER >= 70000000 ) + (void) sigprocmask(SIG_SETMASK, &oldsigmask, &oldsigmask); +#else + (void) sigsetmask(oldsigmask); +#endif + } +#if defined( __hpux ) || defined( __apollo ) + XHPDisableReset(display); +#endif + do { + if (do_display) + (void) justDisplay(display); + else + do_display = True; + } while (getPassword()); +#if defined( __hpux ) || defined( __apollo ) + XHPEnableReset(display); +#endif +} + +static void +read_plan(void) +{ + FILE *planf = NULL; + char buf[121]; + const char *home = getenv("HOME"); + char *buffer; + int i, j, len; + + if (!home) + home = ""; + +#if ( __VMS_VER >= 70000000 ) + buffer = (char *) malloc(255); + +#else + buffer = (char *) malloc(strlen(home) + 32); + +#endif + +#ifdef VMS + (void) sprintf(buffer, "%s%s", home, ".xlocktext"); +#else + (void) sprintf(buffer, "%s/%s", home, ".xlocktext"); +#endif + planf = my_fopen(buffer, "r"); + if (planf == NULL) { +#ifdef VMS + (void) sprintf(buffer, "%s%s", home, ".plan"); +#else + (void) sprintf(buffer, "%s/%s", home, ".plan"); +#endif + planf = my_fopen(buffer, "r"); + } + if (planf == NULL) { +#ifndef VMS + (void) sprintf(buffer, "%s/%s", home, ".signature"); +#else +#if ( __VMS_VER >= 70000000 ) +/* Get signature file for VMS 7.0 and higher */ + char *buffer1 = (char *) malloc(256); + unsigned int ival; + unsigned long int mail_context = 0; + unsigned short int buflen, buflen1; + struct itmlst_3 item[2], itm_d[1]; + + itm_d[0].buflen = 0; + itm_d[0].itmcode = 0; + item[0].buflen = 255; + item[0].itmcode = MAIL$_USER_SIGFILE; + item[0].bufadr = buffer1; + item[0].retlen = &buflen1; + item[1].buflen = 255; + item[1].itmcode = MAIL$_USER_FULL_DIRECTORY; + item[1].bufadr = buffer; + item[1].retlen = &buflen; + item[2].buflen = 0; + item[2].itmcode = 0; + ival = mail$user_begin(&mail_context, itm_d, item); + (void) mail$user_end(&mail_context, itm_d, itm_d); + (void) strncat(buffer, buffer1, buflen1); + (void) free((void *) buffer1); +#else + (void) sprintf(buffer, "%s%s", home, ".signature"); +#endif +#endif + planf = my_fopen(buffer, "r"); + } + if (planf != NULL) { + for (i = 0; i < TEXTLINES; i++) { + if (fgets(buf, 120, planf) && (len = strlen(buf)) > 0) { + if (buf[len - 1] == '\n') { + buf[--len] = '\0'; + } + /* this expands tabs to 8 spaces */ + for (j = 0; j < len; j++) { + if (buf[j] == '\t') { + int k, tab = 8 - (j % 8); + + for (k = 120 - tab; k > j; k--) { + buf[k + tab - 1] = buf[k]; + } + for (k = j; k < j + tab; k++) { + buf[k] = ' '; + } + len += tab; + if (len > 120) + len = 120; + } + } + + plantext[i] = (char *) malloc(strlen(buf) + 1); + (void) strcpy(plantext[i], buf); + } + } + plantext[i] = NULL; + (void) fclose(planf); + } else { + plantext[0] = NULL; + } + (void) free((void *) buffer); + buffer = NULL; +} + +#ifdef USE_MB +static XFontSet +createFontSet(Display * display, char *name) +{ + XFontSet xfs; + char *def, **miss; + int miss_count; + +#define DEF_FONTSET2 "fixed,-*-14-*" + + if ((xfs = XCreateFontSet(display, name, &miss, &miss_count, &def)) == NULL) { + (void) fprintf(stderr, "Could not create FontSet %s\n", name); + if ((xfs = XCreateFontSet(display, DEF_FONTSET2, &miss, &miss_count, &def)) == NULL) + (void) fprintf(stderr, "Could not create FontSet %s\n", DEF_FONTSET2); + } + return xfs; +} +#endif + +static void SigUsr2(int sig); + +static void +SigUsr1(int sig) +{ +#ifdef DEBUG + (void) printf("Signal %d received\n", sig); +#endif + signalUSR1 = 1; + signalUSR2 = 0; + + (void) signal(SIGUSR1, SigUsr1); + (void) signal(SIGUSR2, SigUsr2); +} + +static void +SigUsr2(int sig) +{ +#ifdef DEBUG + (void) printf("Signal %d received\n", sig); +#endif + signalUSR1 = 0; + signalUSR2 = 1; + + (void) signal(SIGUSR1, SigUsr1); + (void) signal(SIGUSR2, SigUsr2); +} + +int +main(int argc, char **argv) +{ + XSetWindowAttributes xswa; + XGCValues xgcv; + XColor nullcolor; + char **planp; + char *buf; + int tmp; + uid_t ruid; + pid_t cmd_pid = 0; + +#if defined( SYSV ) || defined( SVR4 ) || ( __VMS_VER >= 70000000 ) + static sigset_t old_sigmask; + +#else + static int old_sigmask; + +#endif + +#if ultrix + extern gid_t rgid; + +#else + gid_t rgid; + +#endif +#if defined( HAVE_SETEUID ) || defined( HAVE_SETREUID ) + uid_t euid; + +#if ultrix + extern gid_t egid; + +#else + gid_t egid; + +#endif +#endif + +#ifdef USE_MB + setlocale(LC_ALL, ""); +#endif + + (void) signal(SIGUSR1, SigUsr1); + (void) signal(SIGUSR2, SigUsr2); + +#ifdef OSF1_ENH_SEC + set_auth_parameters(argc, argv); +#endif + + ruid = getuid(); + rgid = getgid(); +#ifdef HAVE_SETEUID + /* save effective uid and gid for later */ + euid = geteuid(); + egid = getegid(); + + /* revoke root privs temporarily, to get the correct .Xauthority */ + (void) setegid(rgid); + (void) seteuid(ruid); +#else +#ifdef HAVE_SETREUID + /* save effective uid and gid for later */ + euid = geteuid(); + egid = getegid(); + + /* revoke root privs temporarily, to get the correct .Xauthority */ + (void) setregid(egid, rgid); + (void) setreuid(euid, ruid); + +#endif +#endif + + ProgramName = strrchr(argv[0], '/'); + if (ProgramName) + ProgramName++; + else + ProgramName = argv[0]; + + start_time = seconds(); +#ifdef DEBUG + ProgramPID = getpid(); /* for memcheck.c */ +#endif +#if 1 + SRAND((long) start_time); /* random mode needs the seed set. */ +#else + SRAND((long) ProgramPID); +#endif + + getResources(&dsp, argc, argv); + +#ifdef HAVE_SETEUID + /* become root to get the password */ + (void) setegid(egid); + (void) seteuid(euid); +#else +#ifdef HAVE_SETREUID + /* become root to get the password */ + (void) setregid(rgid, egid); + (void) setreuid(ruid, euid); + +#endif +#endif + + initPasswd(); + +/* revoke root privs, if there were any */ +#ifdef ultrix +/*- + * Potential security problem on ultrix + * Here's the problem. Later on you need setgid to a root group to + * use the crypt program. I do not want to keep the password in memory. + * That means other parts will be running setgid as well. + */ + +#if 1 /* Change 1 to 0 */ + UNTESTED CODE, COMMENT OUT AND SEE IF IT WORKS, PLEASE GET BACK TO ME +#endif + +#ifdef HAVE_SETEUID + /* Lets try to dampen it a bit */ + (void) setegid(rgid); + +#else +#ifdef HAVE_SETREUID + (void) setregid(egid, rgid); + +#else + (void) setgid(rgid); /* Forget it */ + +#endif +#endif +#else + /* In order to lock VT switch we must issue an ioctl on console */ + /* (VT_LOCKSWITCH). This ioctl MUST be issued by root. */ + /* We need later to be able to do another seteuid(0), so let's */ + /* disable the overwrite of saved uid/gid */ + +#ifdef USE_VTLOCK + if (!vtlock) +#endif + (void) setgid(rgid); +#endif +#ifdef USE_VTLOCK + if (!vtlock) +#endif + (void) setuid(ruid); + +#if 0 + /* synchronize -- so I'm aware of errors immediately */ + /* Too slow only for debugging */ + XSynchronize(dsp, True); +#endif + +#ifdef USE_MB + fontset = createFontSet(dsp, fontsetname); + XmbTextExtents(fontset, "A", 1, NULL, &mbRect); +#endif + checkResources(); + + font = XLoadQueryFont(dsp, fontname); + if (font == NULL) { + (void) fprintf(stderr, "%s: can not find font: %s, using %s...\n", + ProgramName, fontname, FALLBACK_FONTNAME); + font = XLoadQueryFont(dsp, FALLBACK_FONTNAME); + if (font == NULL) { + buf = (char *) malloc(strlen(ProgramName) + + strlen(FALLBACK_FONTNAME) + 80); + (void) sprintf(buf, + "%s: can not even find %s!!!\n", ProgramName, FALLBACK_FONTNAME); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + } { + int flags, x, y; + unsigned int w, h; + +#ifdef FX + if (!glgeometry || !*glgeometry) { + glwidth = DEF_GLW; + glheight = DEF_GLH; + } else { + flags = XParseGeometry(glgeometry, &x, &y, &w, &h); + glwidth = flags & WidthValue ? w : DEF_GLW; + glheight = flags & HeightValue ? h : DEF_GLH; + if (glwidth < MINICONW) + glwidth = MINICONW; + if (glheight < MINICONH) + glheight = MINICONH; + } +#endif + if (!icongeometry || !*icongeometry) { + iconwidth = DEF_ICONW; + iconheight = DEF_ICONH; + } else { + flags = XParseGeometry(icongeometry, &x, &y, &w, &h); + iconwidth = flags & WidthValue ? w : DEF_ICONW; + iconheight = flags & HeightValue ? h : DEF_ICONH; + if (iconwidth < MINICONW) + iconwidth = MINICONW; + else if (iconwidth > MAXICONW) + iconwidth = MAXICONW; + if (iconheight < MINICONH) + iconheight = MINICONH; + else if (iconheight > MAXICONH) + iconheight = MAXICONH; + } + if (!geometry || !*geometry) { + fullscreen = True; + } else { + flags = XParseGeometry(geometry, &x, &y, &w, &h); + if (w < MINICONW) + w = MINICONW; + if (h < MINICONH) + h = MINICONH; + minisizeconfigure.x = flags & XValue ? x : 0; + minisizeconfigure.y = flags & YValue ? y : 0; + minisizeconfigure.width = flags & WidthValue ? w : iconwidth; + minisizeconfigure.height = flags & HeightValue ? h : iconheight; + } + } + + planfont = XLoadQueryFont(dsp, planfontname); + if (planfont == NULL) { + (void) fprintf(stderr, "%s: can't find font: %s, using %s...\n", + ProgramName, planfontname, FALLBACK_FONTNAME); + planfont = XLoadQueryFont(dsp, FALLBACK_FONTNAME); + if (planfont == NULL) { + buf = (char *) malloc(strlen(ProgramName) + + strlen(FALLBACK_FONTNAME) + 80); + (void) sprintf(buf, + "%s: can not even find %s!!!\n", ProgramName, FALLBACK_FONTNAME); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + } + read_plan(); + + screens = ScreenCount(dsp); + modeinfo = (ModeInfo *) calloc(screens, sizeof (ModeInfo)); + Scr = (ScreenInfo *) calloc(screens, sizeof (ScreenInfo)); + +#ifdef FORCESINGLE + /* Safer to keep this after the calloc in case ScreenCount is used */ + startscreen = DefaultScreen(dsp); + screens = startscreen + 1; +#endif + +#ifdef USE_DTSAVER + /* The CDE Session Manager provides the windows for the screen saver + to draw into. */ + if (dtsaver) { + Window *saver_wins; + int num_wins; + int this_win; + int this_screen; + XWindowAttributes xgwa; + + + /* Get the list of requested windows */ + if (!DtSaverGetWindows(dsp, &saver_wins, &num_wins)) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: Unable to get screen saver info.\n", ProgramName); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + for (this_win = 0; this_win < num_wins; this_win++) { + (void) XGetWindowAttributes(dsp, saver_wins[this_win], &xgwa); + this_screen = XScreenNumberOfScreen(xgwa.screen); + if (Scr[this_screen].window != None) { + buf = (char *) malloc(strlen(ProgramName) + 80); + (void) sprintf(buf, + "%s: Two windows on screen %d\n", ProgramName, this_screen); + error(buf); + (void) free((void *) buf); /* Should never get here */ + } + Scr[this_screen].window = saver_wins[this_win]; + } + /* Reduce to the screens that have windows. Avoid problems and */ + /* assume that if one fails there is only one good window. */ + for (this_screen = startscreen; this_screen < screens; this_screen++) { + if (Scr[this_screen].window == None) { + startscreen = DefaultScreen(dsp); + screens = startscreen + 1; + break; + } + } + } else +#endif + + if (inwindow) { + /* Reduce to the last screen requested */ + startscreen = DefaultScreen(dsp); + screens = startscreen + 1; + } + for (screen = startscreen; screen < screens; screen++) { + Screen *scr = ScreenOfDisplay(dsp, screen); + Colormap cmap = (Colormap) NULL; + +#ifdef USE_UNSTABLE +/* Start of MI_ROOT_PIXMAP hack */ + Window temp_rw; + XGCValues temp_gcv; + GC temp_gc; + XWindowAttributes temp_xgwa; + + temp_rw = (parentSet) ? parent : RootWindowOfScreen(scr); + XGetWindowAttributes(dsp, temp_rw, &temp_xgwa); + temp_gcv.function = GXcopy; + temp_gcv.subwindow_mode = IncludeInferiors; + temp_gc = XCreateGC(dsp, temp_rw, GCFunction|GCSubwindowMode, + &temp_gcv); + Scr[screen].root_pixmap = XCreatePixmap(dsp, temp_rw, + temp_xgwa.width, + temp_xgwa.height, + temp_xgwa.depth); + XCopyArea(dsp, temp_rw, Scr[screen].root_pixmap, + temp_gc, 0, 0, temp_xgwa.width, temp_xgwa.height, + 0, 0); + XFreeGC(dsp, temp_gc); + +/* End of MI_ROOT_PIXMAP hack */ +#endif + +#ifdef ORIGINAL_XPM_PATCH + if (mailIcon && mailIcon[0]) { + if ((mail_xpmimg = (XpmImage *) malloc(sizeof (XpmImage)))) + if (XpmReadFileToXpmImage(mailIcon, mail_xpmimg, + (XpmInfo *) NULL) != XpmSuccess) { + (void) free((void *) mail_xpmimg); + mail_xpmimg = NULL; + } + } + if (nomailIcon && nomailIcon[0]) { + if ((nomail_xpmimg = (XpmImage *) malloc(sizeof (XpmImage)))) + if (XpmReadFileToXpmImage(nomailIcon, nomail_xpmimg, + (XpmInfo *) NULL) != XpmSuccess) { + free(nomail_xpmimg); + nomail_xpmimg = NULL; + } + } +#endif + + Scr[screen].root = (parentSet) ? parent : RootWindowOfScreen(scr); + defaultVisualInfo(dsp, screen); + +/*- + * Some window managers like fvwm and tvtwm do not like it when an application + * thinks it can install a full screen colormap (i.e xlock). It promptly + * deinstalls the colormap and this might lead to white backgrounds if + * CopyFromParent is not used. + * But if CopyFromParent is used one can not change the visual + * and one may get White = Black on PseudoColor (see bug mode). + * There is another spot in xlock.c like this one... + * As far as I can tell, this problem exists only if your using MesaGL. + */ +#if (defined( USE_GL ) && (!defined( MESA ) || defined( REALGLX ))) || !defined( COMPLIANT_COLORMAP ) + Scr[screen].colormap = cmap = xswa.colormap = + XCreateColormap(dsp, Scr[screen].root, Scr[screen].visual, AllocNone); +#else + cmap = DefaultColormapOfScreen(scr); + Scr[screen].colormap = None; +#endif + + xswa.override_redirect = True; + xswa.background_pixel = Scr[screen].black_pixel; + xswa.border_pixel = Scr[screen].white_pixel; + xswa.event_mask = KeyPressMask | ButtonPressMask | + VisibilityChangeMask | ExposureMask | StructureNotifyMask; + if (mousemotion) + xswa.event_mask |= MotionNotify; + +#ifdef USE_VROOT + if (inroot) { + Scr[screen].window = Scr[screen].root; + XChangeWindowAttributes(dsp, Scr[screen].window, CWBackPixel, &xswa); + /* this gives us these events from the root window */ + XSelectInput(dsp, Scr[screen].window, + VisibilityChangeMask | ExposureMask); + } else +#endif +#ifdef USE_DTSAVER + if (!dtsaver) +#endif + { +#define WIDTH (inwindow? WidthOfScreen(scr)/2 : (debug? WidthOfScreen(scr) - 100 : WidthOfScreen(scr))) +#define HEIGHT (inwindow? HeightOfScreen(scr)/2 : (debug? HeightOfScreen(scr) - 100 : HeightOfScreen(scr))) +#if (defined( USE_GL ) && (!defined( MESA ) || defined( REALGLX ))) || !defined( COMPLIANT_COLORMAP ) +#define CWMASK (((debug||inwindow||inroot)? 0 : CWOverrideRedirect) | CWBackPixel | CWBorderPixel | CWEventMask | CWColormap) +#else +#define CWMASK (((debug||inwindow||inroot)? 0 : CWOverrideRedirect) | CWBackPixel | CWBorderPixel | CWEventMask) +#endif + +#if (defined( USE_GL ) && (!defined( MESA ) || defined( REALGLX ))) || !defined( COMPLIANT_COLORMAP ) +#define XLOCKWIN_DEPTH (Scr[screen].depth) +#define XLOCKWIN_VISUAL (Scr[screen].visual) +#else +#define XLOCKWIN_DEPTH CopyFromParent +#define XLOCKWIN_VISUAL CopyFromParent +#endif + + if (fullscreen) { + Scr[screen].window = XCreateWindow(dsp, Scr[screen].root, 0, 0, + (unsigned int) WIDTH, (unsigned int) HEIGHT, 0, + XLOCKWIN_DEPTH, InputOutput, XLOCKWIN_VISUAL, + CWMASK, &xswa); + } else { + sizeconfiguremask = CWX | CWY | CWWidth | CWHeight; + Scr[screen].fullsizeconfigure.x = 0; + Scr[screen].fullsizeconfigure.y = 0; + Scr[screen].fullsizeconfigure.width = WIDTH; + Scr[screen].fullsizeconfigure.height = HEIGHT; + Scr[screen].window = XCreateWindow(dsp, Scr[screen].root, + (int) minisizeconfigure.x, + (int) minisizeconfigure.y, + (unsigned int) minisizeconfigure.width, + (unsigned int) minisizeconfigure.height, + 0, XLOCKWIN_DEPTH, InputOutput, XLOCKWIN_VISUAL, + CWMASK, &xswa); + } + } + if (use3d) { + XColor C; + +#ifdef CALCULATE_BOTH + XColor C2; + +#endif + unsigned long planemasks[10]; + unsigned long pixels[10]; + + if (!install || !XAllocColorCells(dsp, cmap, False, planemasks, 2, pixels, + 1)) { + /* did not get the needed colours. Use normal 3d view without */ + /* color overlapping */ + Scr[screen].none_pixel = allocPixel(dsp, cmap, none3d, DEF_NONE3D); + Scr[screen].right_pixel = allocPixel(dsp, cmap, right3d, DEF_RIGHT3D); + Scr[screen].left_pixel = allocPixel(dsp, cmap, left3d, DEF_LEFT3D); + Scr[screen].both_pixel = allocPixel(dsp, cmap, both3d, DEF_BOTH3D); + + } else { + /* + * attention: the mixture of colours will only be guaranteed, if + * the right black is used. The problems with BlackPixel would + * be that BlackPixel | left_pixel need not be equal to left_pixel. + * The same holds for rightcol (of course). That is why the right + * black (black3dcol) must be used when GXor is used as put + * function. I have allocated four colors above: + * pixels[0], - 3d black + * pixels[0] | planemasks[0], - 3d right eye color + * pixels[0] | planemasks[1], - 3d left eye color + * pixels[0] | planemasks[0] | planemasks[1] - 3d white + */ + + if (!XParseColor(dsp, cmap, none3d, &C)) + (void) XParseColor(dsp, cmap, DEF_NONE3D, &C); + Scr[screen].none_pixel = C.pixel = pixels[0]; + XStoreColor(dsp, cmap, &C); + + if (!XParseColor(dsp, cmap, right3d, &C)) + (void) XParseColor(dsp, cmap, DEF_RIGHT3D, &C); + Scr[screen].right_pixel = C.pixel = pixels[0] | planemasks[0]; + XStoreColor(dsp, cmap, &C); + +#ifdef CALCULATE_BOTH + C2.red = C.red; + C2.green = C.green; + C2.blue = C.blue; +#else + if (!XParseColor(dsp, cmap, left3d, &C)) + (void) XParseColor(dsp, cmap, DEF_LEFT3D, &C); +#endif + Scr[screen].left_pixel = C.pixel = pixels[0] | planemasks[1]; + XStoreColor(dsp, cmap, &C); + +#ifdef CALCULATE_BOTH + C.red |= C2.red; /* or them together... */ + C.green |= C2.green; + C.blue |= C2.blue; +#else + if (!XParseColor(dsp, cmap, both3d, &C)) + (void) XParseColor(dsp, cmap, DEF_BOTH3D, &C); +#endif + Scr[screen].both_pixel = C.pixel = + pixels[0] | planemasks[0] | planemasks[1]; + XStoreColor(dsp, cmap, &C); + } + + } + fixColormap(dsp, Scr[screen].window, screen, ncolors, saturation, + mono, install, inroot, inwindow, verbose); + if (debug || inwindow) { + XWMHints xwmh; + + xwmh.flags = InputHint; + xwmh.input = True; + XChangeProperty(dsp, Scr[screen].window, + XA_WM_HINTS, XA_WM_HINTS, 32, PropModeReplace, + (unsigned char *) &xwmh, sizeof (xwmh) / sizeof (int)); + } + if (debug) { + Scr[screen].iconpos.x = (DisplayWidth(dsp, screen) - 100 - + MAX(512, XTextWidth(font, text_info, strlen(text_info)))) / 2; + Scr[screen].iconpos.y = (DisplayHeight(dsp, screen) - 100) / 6; + } else { + Scr[screen].iconpos.x = (DisplayWidth(dsp, screen) - + MAX(512, XTextWidth(font, text_info, strlen(text_info)))) / 2; + Scr[screen].iconpos.y = DisplayHeight(dsp, screen) / 6; + } + + Scr[screen].planpos.x = Scr[screen].planpos.y = 0; + for (planp = plantext; *planp; ++planp) { + tmp = XTextWidth(planfont, *planp, strlen(*planp)); + if (tmp > Scr[screen].planpos.x) + Scr[screen].planpos.x = tmp; + ++Scr[screen].planpos.y; + } + if (debug) { + Scr[screen].planpos.x = (DisplayWidth(dsp, screen) - 100 - + Scr[screen].planpos.x) / 2; + Scr[screen].planpos.y = DisplayHeight(dsp, screen) - 100 - +#ifdef USE_MB + (Scr[screen].planpos.y + 4) * (mbRect.height + 2); +#else + (Scr[screen].planpos.y + 4) * (planfont->ascent + planfont->descent + 2); +#endif + } else { + Scr[screen].planpos.x = (DisplayWidth(dsp, screen) - + Scr[screen].planpos.x) / 2; + Scr[screen].planpos.y = DisplayHeight(dsp, screen) - +#ifdef USE_MB + (Scr[screen].planpos.y + 4) * (mbRect.height + 2); +#else + (Scr[screen].planpos.y + 4) * (planfont->ascent + planfont->descent + 2); +#endif + } + + xswa.border_pixel = Scr[screen].white_pixel; + xswa.background_pixel = Scr[screen].black_pixel; + xswa.event_mask = ButtonPressMask; +#if (defined( USE_GL ) && (!defined( MESA ) || defined( REALGLX ))) || !defined( COMPLIANT_COLORMAP ) +#define CIMASK CWBorderPixel | CWBackPixel | CWEventMask | CWColormap +#else +#define CIMASK CWBorderPixel | CWBackPixel | CWEventMask +#endif + if (nolock) + Scr[screen].icon = None; + else { + Scr[screen].icon = XCreateWindow(dsp, Scr[screen].window, + Scr[screen].iconpos.x, Scr[screen].iconpos.y, + iconwidth, iconheight, 1, (int) CopyFromParent, + InputOutput, CopyFromParent, + CIMASK, &xswa); +#ifdef USE_BUTTON_LOGOUT + { + char buf[1024]; + int w, h; + + (void) sprintf(buf, " %s ", logoutButtonLabel); + w = XTextWidth(font, buf, strlen(buf)); + h = font->ascent + font->descent + 2; + Scr[screen].button = XCreateWindow(dsp, Scr[screen].window, + 0, 0, w, h, 1, (int) CopyFromParent, + InputOutput, CopyFromParent, + CIMASK, &xswa); + } +#endif + } + XMapWindow(dsp, Scr[screen].window); + XRaiseWindow(dsp, Scr[screen].window); + +#if 0 + if (install && cmap != DefaultColormapOfScreen(scr)) + setColormap(dsp, Scr[screen].window, cmap, inwindow); +#endif + + xgcv.font = font->fid; + xgcv.foreground = Scr[screen].white_pixel; + xgcv.background = Scr[screen].black_pixel; + Scr[screen].gc = XCreateGC(dsp, Scr[screen].window, + GCFont | GCForeground | GCBackground, &xgcv); + + xgcv.foreground = Scr[screen].fg_pixel; + xgcv.background = Scr[screen].bg_pixel; + Scr[screen].textgc = XCreateGC(dsp, Scr[screen].window, + GCFont | GCForeground | GCBackground, &xgcv); + xgcv.font = planfont->fid; + Scr[screen].plantextgc = XCreateGC(dsp, Scr[screen].window, + GCFont | GCForeground | GCBackground, &xgcv); + +#ifdef ORIGINAL_XPM_PATCH + if (mail_xpmimg) { + XpmAttributes xpm_attr; + + xpm_attr.valuemask = 0; + XpmCreatePixmapFromXpmImage(dsp, Scr[screen].window, mail_xpmimg, + &Scr[screen].mb.mail.pixmap, + &Scr[screen].mb.mail.bitmap, &xpm_attr); + } + if (nomail_xpmimg) { + XpmAttributes xpm_attr; + + xpm_attr.valuemask = 0; + XpmCreatePixmapFromXpmImage(dsp, Scr[screen].window, nomail_xpmimg, + &Scr[screen].mb.nomail.pixmap, + &Scr[screen].mb.nomail.bitmap, &xpm_attr); + } + if (mail_xpmimg || nomail_xpmimg) { + Scr[screen].mb.mbgc = XCreateGC(dsp, Scr[screen].window, + GCFont | GCForeground | GCBackground, + &xgcv); + } +#else + if (mailCmd && mailCmd[0]) { + pickPixmap(dsp, Scr[screen].window, nomailIcon, + NOMAIL_WIDTH, NOMAIL_HEIGHT, NOMAIL_BITS, + &(Scr[screen].mb.nomail.width), + &(Scr[screen].mb.nomail.height), + &(Scr[screen].mb.nomail.pixmap), + &(Scr[screen].mb.nomail.graphics_format)); + pickPixmap(dsp, Scr[screen].window, mailIcon, + MAIL_WIDTH, MAIL_HEIGHT, MAIL_BITS, + &(Scr[screen].mb.mail.width), + &(Scr[screen].mb.mail.height), + &(Scr[screen].mb.mail.pixmap), + &(Scr[screen].mb.mail.graphics_format)); + Scr[screen].mb.mbgc = XCreateGC(dsp, Scr[screen].window, + GCFont | GCForeground | GCBackground, + &xgcv); + } +#endif + } + lockc = XCreateBitmapFromData(dsp, Scr[startscreen].root, no_bits, 1, 1); + lockm = XCreateBitmapFromData(dsp, Scr[startscreen].root, no_bits, 1, 1); + mycursor = XCreatePixmapCursor(dsp, lockc, lockm, + &nullcolor, &nullcolor, 0, 0); + XFreePixmap(dsp, lockc); + XFreePixmap(dsp, lockm); + + if (!grabmouse || inwindow || inroot) { + nolock = 1; + enablesaver = 1; + } else if (!debug) { + GrabKeyboardAndMouse(dsp, Scr[startscreen].window); + } + if (!nolock) { + XGetScreenSaver(dsp, &sstimeout, &ssinterval, + &ssblanking, &ssexposures); + if (resetsaver) + XResetScreenSaver(dsp); /* make sure not blank now */ + if (!enablesaver) + XSetScreenSaver(dsp, 0, 0, 0, 0); /* disable screen saver */ + } +#ifdef USE_DPMS + if ((dpmsstandby >= 0) || (dpmssuspend >= 0) || (dpmsoff >= 0)) + SetDPMS(dsp, dpmsstandby, dpmssuspend, dpmsoff); +#endif + (void) nice(nicelevel); + + (void) XSetIOErrorHandler(xio_error); + + /* start the command startcmd */ + if (startCmd && *startCmd) { + + if ((cmd_pid = FORK()) == -1) { + (void) fprintf(stderr, "Failed to launch \"%s\"\n", startCmd); + perror(ProgramName); + cmd_pid = 0; + } else if (!cmd_pid) { +#ifndef VMS + setpgid(0, 0); +#endif +#if 0 +#if (defined(sun) && defined(__svr4__)) || defined(sgi) || defined(__hpux) || defined(linux) + setsid(); +#else + setpgrp(getpid(), getpid()); +#endif +#endif +#if defined( SYSV ) || defined( SVR4 ) || ( __VMS_VER >= 70000000 ) + (void) sigprocmask(SIG_SETMASK, &old_sigmask, &old_sigmask); +#else + (void) sigsetmask(old_sigmask); +#endif + (void) system(startCmd); + exit(0); + } + } + lock_delay = lockdelay; + if (nolock) { + (void) justDisplay(dsp); + } else if (lock_delay) { + if (justDisplay(dsp)) { + lockDisplay(dsp, False); + } else + nolock = 1; + } else { + lockDisplay(dsp, True); + } +#if defined( HAVE_SYSLOG_H ) && defined( USE_SYSLOG ) + if (!nolock) { + syslogStop(XDisplayString(dsp)); + closelog(); + } +#endif +#ifdef USE_DPMS + SetDPMS(dsp, -1, -1, -1); +#endif + finish(dsp, True); + + if (cmd_pid) +#if defined(NO_KILLPG) || defined(__svr4__) || defined(sgi) || defined(__hpux) || defined(VMS) + kill(-cmd_pid, SIGTERM); +#else + (void) killpg(cmd_pid, SIGTERM); +#endif + if (endCmd && *endCmd) { + if ((cmd_pid = FORK()) == -1) { + (void) fprintf(stderr, "Failed to launch \"%s\"\n", endCmd); + perror(ProgramName); + cmd_pid = 0; + } else if (!cmd_pid) { + (void) system(endCmd); + exit(0); + } + } +#ifdef VMS + return 1; +#else + return 0; +#endif +} + +#endif /* STANDALONE */ diff --git a/xlock/xlock.h b/xlock/xlock.h new file mode 100644 index 00000000..5a178da1 --- /dev/null +++ b/xlock/xlock.h @@ -0,0 +1,530 @@ +#ifndef __XLOCK_XLOCK_H__ +#define __XLOCK_XLOCK_H__ + +/*- + * @(#)xlock.h 4.00 97/01/01 xlockmore + * + * xlock.h - external interfaces for new modes and SYSV OS defines. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * xscreensaver code, Copyright (c) 1997 Jamie Zawinski + * + * 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 maintained by David Bagley + * 23-Apr-98: Merged in xlockmore.h from xscreensaver, not much in common yet. + * 12-May-95: Added defines for SunOS's Adjunct password file + * Dale A. Harris + * 18-Nov-94: Modified for QNX 4.2 w/ Metrolink X server from Brian Campbell + * . + * 11-Jul-94: added Bool flag: inwindow, which tells xlock to run in a + * window from Greg Bowering + * 11-Jul-94: patch for Solaris SYR4 from Chris P. Ross + * 28-Jun-94: Reorganized shadow stuff + * 24-Jun-94: Reorganized + * 22-Jun-94: Modified for VMS + * + * 17-Jun-94: patched shadow passwords and bcopy and bzero for SYSV from + * + * 21-Mar-94: patched the patch for AIXV3 and HP from + * . + * 01-Dec-93: added patch for AIXV3 from Tom McConnell + * also added a patch for HP-UX 8.0. + * + */ + +#ifdef STANDALONE +/* xscreensaver compatibility layer for xlockmore modules. */ + +/*- + * xscreensaver, Copyright (c) 1997, 1998 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" + +#include +#include +#include "mode.h" + +#ifdef USE_GL +#include +#ifdef __cplusplus + extern "C" { +#endif +extern GLXContext *init_GL(ModeInfo *); +#ifdef __cplusplus + } +#endif + +#define FreeAllGL(dpy) /* */ +#endif + +/*- + * Sun version of OpenGL needs to have the constant + * SUN_OGL_NO_VERTEX_MACROS defined in order to compile modes that + * use glNormal3f (the number of arguments to the macro changes...) + */ +#ifndef HAVE_MESA_GL +#if defined(__sun) && defined(__SVR4) /* Solaris */ +#define SUN_OGL_NO_VERTEX_MACROS 1 +#endif /* Solaris */ +#endif /* !HAVE_MESA_GL */ + + +/* 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). + */ +#ifdef __cplusplus + extern "C" { +#endif +char *defaults[100]; +XrmOptionDescRec options[100]; +#ifdef __cplusplus + } +#endif + +#define XSCREENSAVER_PREF 1 /* Disagreements handled with this :) */ + +#else /* STANDALONE */ +#include +# include +#include +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#ifdef USE_MB +#ifdef __linux__ +#define X_LOCALE +#endif +#include +#endif +#else /* HAVE_CONFIG_H */ + +/* I use this for testing SunCplusplus + I still get this in the link: + Undefined first referenced + symbol in file + gethostbyname(const char*) ../xlock/resource.o + kill(long, int) ../xlock/logout.o + signal(int, void (*)(int)) ../xlock/logout.o + + #define SUN_OGL_NO_VERTEX_MACROS 1 + #define SunCplusplus + */ + +/* THIS MAY SOON BE DEFUNCT, SHOULD WORK NOW THOUGH FOR IMAKE */ +#define HAVE_GLBINDTEXTURE 1 +#define inline +#ifdef AIXV3 +#define HAVE_SYS_SELECT_H 1 +#else +#define HAVE_SYS_TIME_H 1 +#endif +#if !defined( __hpux ) && !defined( apollo ) && !defined( VMS ) +#define HAVE_SETEUID +#endif +#define HAVE_FCNTL_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_SYSLOG_H 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_UNISTD_H 1 +#ifdef VMS +#if ( __VMS_VER < 70000000 ) +#ifdef USE_XVMSUTILS +#define HAVE_DIRENT_H 1 +#define HAVE_GETTIMEOFDAY 1 +#define GETTIMEOFDAY_TWO_ARGS 1 +#else /* !USE_XVMSUTILS */ +#ifndef USE_OLD_EVENT_LOOP +#define USE_OLD_EVENT_LOOP +#endif /* USE_OLD_EVENT_LOOP */ +#define HAVE_DIRENT_H 0 +#define HAVE_GETTIMEOFDAY 0 +#endif /* !USE_XVMSUTILS */ +#define HAVE_STRDUP 0 +#else /* __VMS_VER >= 70000000 */ +#define HAVE_DIRENT_H 1 +#define HAVE_GETTIMEOFDAY 1 +#define GETTIMEOFDAY_TWO_ARGS 1 +#define HAVE_STRDUP 1 +#endif /* __VMS_VER >= 70000000 */ +#else /* !VMS */ +#define HAVE_DIRENT_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_GETTIMEOFDAY 1 +#define GETTIMEOFDAY_TWO_ARGS 1 +#ifdef ultrix +#define HAVE_STRDUP 0 +#else /* !ultrix */ +#define HAVE_STRDUP 1 +#endif /* !ultrix */ +#endif /* !VMS */ +#endif /* !HAVE_CONF_H */ + +#ifndef TEXTLINES +#define TEXTLINES 40 +#endif +#define PASSLENGTH 120 + +#ifndef DEF_NONE3D +#define DEF_NONE3D "Black" +#endif +#ifndef DEF_RIGHT3D +#define DEF_RIGHT3D "Red" +#endif +#ifndef DEF_LEFT3D +#define DEF_LEFT3D "Blue" +#endif +#ifndef DEF_BOTH3D +#define DEF_BOTH3D "Magenta" +#endif + +#ifndef DEF_ICONW +#define DEF_ICONW 64 /* Age old default */ +#endif +#ifndef DEF_ICONH +#define DEF_ICONH 64 +#endif + +#ifndef DEF_GLW +#define DEF_GLW 640 +#endif +#ifndef DEF_GLH +#define DEF_GLH 480 +#endif + +#define MINICONW 1 /* Will not see much */ +#define MINICONH 1 + +#ifndef MAXICONW +#define MAXICONW 256 /* Want users to know the screen is locked */ +#endif +#ifndef MAXICONH +#define MAXICONH 256 /* by a particular user */ +#endif + +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + +#ifndef ABS +#define ABS(a) ((a<0)?(-(a)):(a)) +#endif + +#ifndef M_E +#define M_E 2.7182818284590452354 /* e */ +#endif +#ifndef M_LN2 +#define M_LN2 0.69314718055994530942 /* log e2 */ +#endif +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#endif +#ifdef MATHF +#define SINF(n) sinf(n) +#define COSF(n) cosf(n) +#define FABSF(n) fabsf(n) +#else +#define SINF(n) ((float)sin((double)(n))) +#define COSF(n) ((float)cos((double)(n))) +#define FABSF(n) ((float)fabs((double)(n))) +#endif + +#if VMS +#include +#endif +#include +#if 0 +#ifndef uid_t +#define uid_t int +#endif +#ifndef gid_t +#define gid_t int +#endif +#ifndef pid_t +#define pid_t int +#endif +#ifndef size_t +#define size_t unsigned +#endif +#endif +#if HAVE_UNISTD_H +#include +#endif +#if HAVE_MEMORY_H +#include +#endif +#include +#include +#include +#if (defined( SYSV ) || defined( SVR4 )) && defined( SOLARIS2 ) && !defined( LESS_THAN_SOLARIS2_5 ) +#ifdef __cplusplus + extern "C" { +#endif +struct hostent { + char *h_name; /* official name of host */ + char **h_aliases; /* alias list */ + int h_addrtype; /* host address type */ + int h_length; /* length of address */ + char **h_addr_list; /* list of addresses from name server */ +}; +#ifdef __cplusplus + } +#endif + +#else +#include /* Gives problems on Solaris 2.6 with gcc */ +#endif +#include +#if HAVE_DIRENT_H +#ifdef USE_XVMSUTILS +#if 0 +#include "../xvmsutils/unix_types.h" +#include "../xvmsutils/dirent.h" +#else +#include +#include +#endif +#else /* !USE_XVMSUTILS */ +#include +#endif /* !USE_XVMSUTILS */ +#else +#define dirent direct +#define NAMELEN(dirent) (dirent)->d_namelen +#if HAVE_SYS_NDIR_H +#include +#endif +#if HAVE_SYS_DIR_H +#include +#endif +#if HAVE_NDIR_H +#include +#endif +#endif +#if defined(_SYSTYPE_SVR4) && !defined(SVR4) /* For SGI */ +#define SVR4 +#endif + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 /* SunOS 3.5 does not define this */ +#endif + +#ifndef MAXNAMLEN +#define MAXNAMLEN 256 /* maximum filename length */ +#endif +#ifndef DIRBUF +#define DIRBUF 512 /* buffer size for fs-indep. dirs */ +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +#define CLASS c_class +#else +#define CLASS class +#endif + +#if (!defined( AFS ) && defined( HAVE_SHADOW ) && !defined( OSF1_ENH_SEC ) && !defined( HP_PASSWDETC ) && !defined( VMS ) && !defined( PAM )) +#define FALLBACK_XLOCKRC +#endif + +#define t_String 0 +#define t_Float 1 +#define t_Int 2 +#define t_Bool 3 + +#ifdef __cplusplus + extern "C" { +#endif +typedef struct { + caddr_t *var; + char *name; + char *classname; + char *def; + int type; +} argtype; + +typedef struct { + char *opt; + char *desc; +} OptionStruct; + +typedef struct { + int numopts; + XrmOptionDescRec *opts; + int numvarsdesc; + argtype *vars; + OptionStruct *desc; +} ModeSpecOpt; + +#ifdef USE_MODULES +typedef struct { + char *cmdline_arg; /* mode name */ + char *init_name; /* name of init a mode */ + char *callback_name; /* name of run (tick) a mode */ + char *release_name; /* name of shutdown of a mode */ + char *refresh_name; /* name of mode to repaint */ + char *change_name; /* name of mode to change */ + char *unused_name; /* name for future expansion */ + ModeSpecOpt *msopt; /* this mode's def resources */ + int def_delay; /* default delay for mode */ + int def_count; + int def_cycles; + int def_size; + int def_ncolors; + float def_saturation; + char *def_bitmap; + char *desc; /* text description of mode */ + unsigned int flags; /* state flags for this mode */ + void *userdata; /* for use by the mode */ +} ModStruct; + +#endif +#ifdef __cplusplus + } +#endif + +/* this must follow definition of ModeSpecOpt */ +#include "mode.h" + +#define CHECK_OLD_ARGS /* check depreciated args */ + +#ifdef OPENGL_MESA_INCLUDES +/* Allow OPEN GL using MESA includes */ +#undef MESA +#endif + +#ifdef __cplusplus + extern "C" { +#endif +extern char * ProgramName; +extern void getResources(Display ** displayp, int argc, char **argv); +extern void finish(Display * display, Bool closeDisplay); +extern void error(const char *buf); +#ifdef __cplusplus + } +#endif + +#ifdef VMS +#define FORK vfork +#else +#define FORK fork +#endif + +#ifdef LESS_THAN_AIX3_2 +#undef NULL +#define NULL 0 +#endif /* LESS_THAN_AIX3_2 */ + +#ifndef SYSLOG_WARNING +#define SYSLOG_WARNING LOG_WARNING +#endif +#ifndef SYSLOG_NOTICE +#define SYSLOG_NOTICE LOG_NOTICE +#endif +#ifndef SYSLOG_INFO +#define SYSLOG_INFO LOG_INFO +#endif + +#if (defined( USE_RPLAY ) || defined( USE_NAS ) || defined( USE_VMSPLAY ) || defined( DEF_PLAY )) +#define USE_SOUND +#endif + +#ifdef USE_MB +#ifdef __cplusplus + extern "C" { +#endif +extern XFontSet fontset; +#ifdef __cplusplus + } +#endif + +#define XTextWidth(font,string,length) \ + XmbTextEscapement(fontset,string,length) +#define XDrawString(display,window,gc,x,y,string,length) \ + XmbDrawString(display,window,fontset,gc,x,y,string,length) +#define XDrawImageString(display,window,gc,x,y,string,length) \ + XmbDrawImageString(display,window,fontset,gc,x,y,string,length) +#endif + +#endif /* STANDALONE */ + +/* COMMON STUFF */ +#if HAVE_GETTIMEOFDAY +#ifdef GETTIMEOFDAY_TWO_ARGS +#define GETTIMEOFDAY(t) (void)gettimeofday(t,NULL); +#else +#define GETTIMEOFDAY(t) (void)gettimeofday(t); +#endif +#endif + +/* There is some overlap so it can be made more efficient */ +#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) + +#include "random.h" +#endif /* __XLOCK_XLOCK_H__ */ diff --git a/xlock/xlock.man b/xlock/xlock.man new file mode 100644 index 00000000..3ac82cb1 --- /dev/null +++ b/xlock/xlock.man @@ -0,0 +1,1849 @@ +.\" @(#)xlock.man 4.13 99/03/08 +.\" Copyright (c) 1991 - Patrick J. Naughton +.\" xlockmore updates from David A. Bagley +.TH XLOCK 1 "8 Mar 1999" "X11R6 Contrib" +.SH NAME +xlock \- Locks the local X display until a password is entered. +.sp +.IX xlock#(1) "" "\fLxlock\fP(1)" +.SH SYNOPSIS +.B xlock +[ +.BI \-help +] +[ +.BI \-version +] +[ +.BI \-resources +] +[ +.BI \-display " displayname" +] +[ +.BI \-visual " visualname" +] +[ +.BI \-name " resourcename" +] +[ +.BI \-mode " modename" +] +[ +.BI \-delay " usecs" +] +[ +.BI \-batchcount " num" +] +[ +.BI \-count " num" +] +[ +.BI \-cycles " num" +] +[ +.BI \-ncolors " num" +] +[ +.BI \-size " num" +] +[ +.BI \-saturation " value" +] +[ +.BI \-erasemode " modename" +] +[ +.BI \-erasedelay " usecs" +] +[ +.BI -/+allowaccess +] +[ +.BI \-vtlock " modename" +] +[ +.BI -/+nolock +] +[ +.BI -/+inwindow +] +[ +.BI -/+inroot +] +[ +.BI -/+remote +] +[ +.BI -/+mono +] +[ +.BI -/+allowroot +] +[ +.BI -/+debug +] +[ +.BI -/+description +] +[ +.BI -/+echokeys +] +[ +.BI -/+enablesaver +] +[ +.BI -/+resetsaver +] +[ +.BI -/+grabmouse +] +[ +.BI -/+grabserver +] +[ +.BI -/+install +] +[ +.BI -/+mousemotion +] +[ +.BI -/+sound +] +[ +.BI -/+timeelapsed +] +[ +.BI -/+usefirst +] +[ +.BI -/+verbose +] +[ +.BI \-nice " level" +] +[ +.BI \-lockdelay " seconds" +] +[ +.BI \-timeout " seconds" +] +[ +.BI \-font " fontname" +] +[ +.BI \-planfont " fontname" +] +[ +.BI \-bg " color" +] +[ +.BI \-fg " color" +] +[ +.BI \-background " color" +] +[ +.BI \-foreground " color" +] +[ +.BI \-username " string" +] +[ +.BI \-password " string" +] +[ +.BI \-info " string" +] +[ +.BI \-validate " string" +] +[ +.BI \-invalid " string" +] +[ +.BI \-geometry " geom" +] +[ +.BI \-icongeometry " geom" +] +[ +.BI \-glgeometry " geom" +] +[ +.BI -/+fullrandom +] +[ +.BI -/+wireframe +] +[ +.BI -/+use3d +] +[ +.BI \-delta3d " value" +] +[ +.BI \-none3d " color" +] +[ +.BI \-right3d " color" +] +[ +.BI \-left3d " color" +] +[ +.BI \-both3d " color" +] +[ +.BI \-program " programname" +] +[ +.BI \-messagesfile " formatted-filename" +] +[ +.BI \-messagefile " filename" +] +[ +.BI \-message " string" +] +[ +.BI \-messagefont " fontname" +] +[ +.BI \-bitmap " filename" +] +[ +.BI \-neighbors " num" +] +[ +.BI -/+mouse +] +[ +.BI \-cpasswd " crypted-password" +] +[ +.BI \-forceLogout " minutes" +] +[ +.BI \-logoutButtonLabel " textstring" +] +[ +.BI \-logoutButtonHelp " textstring" +] +[ +.BI \-logoutFailedString " textstring" +] +[ +.BI -/+dtsaver +] +[ +.BI \-modulepath " path" +] +[ +.BI \-locksound " string" +] +[ +.BI \-infosound " string" +] +[ +.BI \-validsound " string" +] +[ +.BI \-invalidsound " string" +] +[ +.BI \-startCmd " string" +] +[ +.BI \-endCmd " string" +] +[ +.BI \-logoutCmd " string" +] + +.SH DESCRIPTION +.B xlock +locks the X server till the user enters their password at the keyboard. +While +.B xlock +is running, +all new server connections are refused. +The screen saver is disabled. +The mouse cursor is turned off. +The screen is blanked and a changing pattern is put on the screen. +If a key or a mouse button is pressed then the user is prompted for the +password of the user who started +.BR xlock . + +If the correct password is typed, then the screen is unlocked and the X +server is restored. When typing the password Control-U and Control-H are +active as kill and erase respectively. To return to the locked screen, +click in the small icon version of the changing pattern. + +In the lower part of the password screen a text is displayed. This +message is taken from the first file of the following that exists: +$HOME/.xlocktext, $HOME/.plan, or $HOME/.signature. + +On systems which support new BSD style authentication, the password +may be prefixed by an authentication style followed by a colon +(i.e. "style:password"). See the login.conf(5) for more information +on authentication styles. + +.SH "NOTE ON ETIQUETTE" +.I Xlock +should not be used on public terminals when there is a high demand for them. + +If you find a public terminal that has been locked by another user and +there are no other terminals available, and the terminal appears to have +been left idle for a while (normally more than 15 minutes), it is fair to +try to reset the session in some manner. + +.SH OPTIONS +.TP 5 +.BI \-help +Print options and a brief description to standard output. +.TP 5 +.BI \-version +Print version number (if >= 4.00) to standard output. +.TP 5 +.BI \-resources +Print default resource file to standard output. +.TP 5 +.BI \-display \ displayname +The +.I display +option sets the X11 display to lock. +.B xlock +locks all available screens on a given server, +and restricts you to locking only a local server such as +.BI unix:0, +.BI localhost:0, +or +.BI :0 +unless you set the +.B \-remote +option. +.TP 5 +.BI \-visual \ visualname +.I visualname +which is one of "StaticGray", "GrayScale", "StaticColor", "PseudoColor", +"TrueColor", "DirectColor", or "default". default used to set the screen's +default visual (the visual of the root window). +.TP 5 +.BI \-name \ resourcename +.I resourcename +is used instead of +.B XLock +when looking for resources to configure +.BR xlock . +.TP 5 +.BI \-mode \ modename +As of this writing there are over 90 display modes supported +(plus one more for random selection of one of these). +.TP 8 +.B ant +Shows Langton's and Turk's generalized ants. +.TP 8 +.B atlantis +Shows moving sharks/whales/dolphin. May not be available depending on how +it was configured. +.TP 8 +.B ball +Shows bouncing balls. +.TP 8 +.B bat +Shows bouncing flying bats. +.TP 8 +.B blot +Shows Rorschach's ink blot test. +.TP 8 +.B bouboule +Shows Mimi's bouboule of moving stars. +.TP 8 +.B bounce +Shows bouncing footballs. +.TP 8 +.B braid +Shows random braids and knots. +.TP 8 +.B bubble +Shows popping bubbles. +.TP 8 +.B bubble3d +Shows Richard Jones's GL bubbles. May not be available depending on how +it was configured. +.TP 8 +.B bug +Shows Palmiter's bug evolution and a garden of Eden. +.TP 8 +.B cartoon +Shows bouncing cartoons. May not be available depending on how it was +configured. +.TP 8 +.B clock +Shows Packard's oclock. +.TP 8 +.B coral +Shows a coral reef. +.TP 8 +.B crystal +Shows polygons in 2D plane groups. +.TP 8 +.B daisy +Shows a meadow of daisies. +.TP 8 +.B dclock +Shows a floating digital clock. +.TP 8 +.B deco +Shows art as ugly as sin. +.TP 8 +.B demon +Shows Griffeath's cellular automata. +.TP 8 +.B dilemma +Shows Lloyd's Prisoner's Dilemma simulation. +.TP 8 +.B discrete +Shows various discrete maps. +.TP 8 +.B drift +Shows cosmic drifting flame fractals. +.TP 8 +.B cage +Shows the Impossible Cage, an Escher-like GL scene. May not be available +depending on how it was configured. +.TP 8 +.B eyes +Shows eyes following a bouncing grelb. +.TP 8 +.B fadeplot +Shows a fading plot of sine squared. +.TP 8 +.B flag +Shows a waving flag of your operating system. +.TP 8 +.B flame +Shows cosmic flame fractals. +.TP 8 +.B flow +Shows dynamic strange attractors. +.TP 8 +.B forest +Shows binary trees of a fractal forest. +.TP 8 +.B galaxy +Shows crashing spiral galaxies. +.TP 8 +.B gears +Shows GL's gears. May not be available depending on how it was configured. +.TP 8 +.B goop +Shows goop from a lava lamp. +.TP 8 +.B grav +Shows orbiting planets. +.TP 8 +.B helix +Shows string art. +.TP 8 +.B hop +Shows real plane iterated fractals. +.TP 8 +.B hyper +Shows spinning n-dimensional hypercubes. +.TP 8 +.B ico +Shows a bouncing polyhedron. +.TP 8 +.B ifs +Shows a modified iterated function system. +.TP 8 +.B image +Shows randomly appearing logos. +.TP 8 +.B julia +Shows the Julia set. +.TP 8 +.B kaleid +Shows Brewster's Kaleidoscope. +.TP 8 +.B kummpa +Shows kumppa. +.TP 8 +.B laser +Shows spinning lasers. +.TP 8 +.B life +Shows Conway's game of life. +.TP 8 +.B life1d +Shows Wolfram's game of 1D life. +.TP 8 +.B life3d +Shows Bays' game of 3D life. +.TP 8 +.B lightning +Shows Keith's fractal lightning bolts. +.TP 8 +.B lisa +Shows animated lissajous loops. +.TP 8 +.B lissie +Shows lissajous worms. +.TP 8 +.B loop +Shows Langton's self-producing loops. +.TP 8 +.B mandelbrot +Shows mandelbrot sets. +.TP 8 +.B marquee +Shows text. +.TP 8 +.B maze +Shows a random maze and a depth first search solution. +.TP 8 +.B moebius +Shows the Moebius Strip II, an Escher-like GL scene with ants. May not be +available depending on how it was configured. +.TP 8 +.B morph3d +Shows GL morphing polyhedra. May not be available depending on how it +was configured. +.TP 8 +.B mountain +Shows Papo's mountain range. +.TP 8 +.B munch +Shows munching squares. +.TP 8 +.B nose +Shows a man with a big nose runs around spewing out text. +.TP 8 +.B pacman +Shows Pacman(tm). +.TP 8 +.B pipes +Shows a self-building pipe system. May not be available depending on how it +was configured. +.TP 8 +.B penrose +Shows Penrose's quasiperiodic tilings. +.TP 8 +.B petal +Shows various GCD Flowers. +.TP 8 +.B puzzle +Shows a puzzle being scrambled and then solved. +.TP 8 +.B pyro +Shows fireworks. +.TP 8 +.B qix +Shows spinning lines a la Qix(tm). +.TP 8 +.B roll +Shows a rolling ball. +.TP 8 +.B rotor +Shows Tom's Roto-Rooter. +.TP 8 +.B rubik +Shows an auto-solving Rubik's Cube. May not be available depending on how it +was configured. +.TP 8 +.B shape +Shows stippled rectangles, ellipses, and triangles. +.TP 8 +.B sierpinski +Shows a Sierpinski's triangle. +.TP 8 +.B slip +Shows slipping blits. +.TP 8 +.B sphere +Shows a bunch of shaded spheres. +.TP 8 +.B spiral +Shows a helical locus of points. +.TP 8 +.B spline +Shows colorful moving splines. +.TP 8 +.B sproingies +Shows Sproingies! Nontoxic. Safe for pets and small children. +May not be available depending on how it was configured. +.TP 8 +.B stairs +Shows Infinite Stairs, an Escher-like GL scene. +May not be available depending on how it was configured. +.TP 8 +.B star +Shows a star field with a twist. +.TP 8 +.B starfish +Shows starfish. +.TP 8 +.B strange +Shows strange attractors. +.TP 8 +.B superquadrics +Shows 3D mathematical shapes. May not be available depending on how it +was configured. +.TP 8 +.B swarm +Shows a swarm of bees following a wasp. +.TP 8 +.B swirl +Shows animated swirling patterns. +.TP 8 +.B tetris +Shows tetris. +.TP 8 +.B thornbird +Shows an animated Bird in a Thorn Bush fractal map. +.TP 8 +.B triangle +Shows a triangular mountain range. +.TP 8 +.B tube +Shows an animated tube. +.TP 8 +.B turtle +Shows turtle fractals. +.TP 8 +.B vines +Shows fractal-like vines. +.TP 8 +.B voters +Shows Dewdney's Voters. +.TP 8 +.B wator +Shows Dewdney's Water-Torus planet of fish and sharks. +.TP 8 +.B wire +Shows a random circuit with 2 electrons. +.TP 8 +.B world +Shows spinning Earths. +.TP 8 +.B worm +Shows wiggly worms. +.TP 8 +.B xjack +Shows Jack having one of those days. +.TP 8 +.B blank +Shows nothing but a black screen. Does not show up in random mode. +.TP 8 +.B bomb +Shows a bomb and will autologout after a time. Does not show up in random +mode and may be available depending on how it was configured. +.TP 8 +.B random +Shows a random mode from above except blank (and bomb). + +.TP 5 +.BI \-delay \ usecs +The +.I delay +option sets the speed at which a mode will operate. It simply sets the +number of microseconds to delay between batches of animations. In +blank mode, it is important to set this to some small number of seconds, +because the keyboard and mouse are only checked after each delay, so you +cannot set the delay too high, but a delay of zero would needlessly +consume cpu checking for mouse and keyboard input in a tight loop, since +blank mode has no work to do. +.TP 5 +.BI \-count \ num +The +.I batchcount +option sets number of +.I things +to do per batch to +.I num . + +In ant mode this refers the number of ants. + +In atlantis mode it is the number of sharks. + +In ball mode it is the number of balls. + +In bat mode it is the number of bats, could be less because of conflicts. + +In blot mode this refers to the number of pixels rendered in the same color. + +In bouboule mode it is the number of stars. + +In bounce mode it is the number of balls, could be less because of conflicts. + +In braid mode it is the upper bound number of strands. + +In bubble mode it is the number of bubbles. + +In bubble3d mode it is the number of bubbles. + +In bug mode it is the number of bugs, could be less because of conflicts. + +In cage mode it is means nothing. + +In cartoon mode it means nothing. + +In clock mode it is the percentage of the screen, but less than 100%. + +In coral mode it is the number of seeds. + +In crystal mode it is the number of polygons. + +In daisy mode it is the number flowers that make a meadow. + +In dclock mode it means nothing. + +In deco mode it is the depth. + +In demon mode this refers the number of colors. + +In dilemma mode this refers the number of initial defectors. + +In discrete mode it is the number of points. + +In drift mode it is the number of levels to recurse (larger = more complex). + +In eyes mode it is the number of eyes. + +In fadeplot mode it is the number of steps. + +In flag mode it means nothing. + +In flame mode it is the number of levels to recurse (larger = more complex). + +In flow mode it is the number of bees. + +In forest mode it is the number trees that make a forest. + +In galaxy mode it means the number of galaxies. + +In gears mode it is the number of degrees to rotate the set of gears by. + +In goop mode it is the number of blobs per plane. + +In grav mode it is the number of planets. + +In helix mode it means nothing. + +In hop mode this refers to the number of pixels rendered in the same color. + +In hyper mode it the number of dimensions. + +In ico mode it is the ith platonic solid. + +In ifs mode it means nothing. + +In image mode it means it is the number of logos on screen at once. + +In julia mode it is the depth of recursion. + +In kaleid mode it is the number of pens. + +In kumppa mode it means nothing. + +In laser mode it is the number lasers. + +In life mode it is the number of generations before a glider is introduced. + +In life1d mode it means nothing. + +In life3d mode it is the number of generations before a glider is introduced. + +In lisa mode it is the number of loops. + +In lissie mode it is the number of worms. + +In loop mode it means nothing. + +In mandelbrot mode it is the order. + +In marquee mode it means nothing. + +In maze mode it means nothing. + +In moebius mode it is means nothing. + +In morph3d mode it is the ith platonic solid. + +In mountain mode it is the number of mountains. + +In munch mode it means nothing. + +In nose mode it means nothing. + +In qix mode it is the number of points. + +In pacman mode it means the number of ghosts. + +In penrose mode it means nothing. + +In petal mode it the greatest random number of petals. + +In pipes mode it shows different joints, 0 random, 1 spherical, 2 bolted +elbow, 3 elbow, and 4 alternating. + +In puzzle mode it the number of moves. + +In pyro mode it is the maximum number flying rockets at one time. + +In roll mode it is the number of points. + +In rotor mode it is the number of rotor thingys which whirr... + +In rubik mode it is the number of moves. + +In shape mode it means nothing. + +In sierpinski mode it is the number of points. + +In slip mode it means nothing. + +In sphere mode it means nothing. + +In spiral mode it is the number of spirals. + +In spline mode it is the number of points "splined". + +In sproingies mode it is the number of sproingies. + +In stairs mode it is means nothing. + +In star mode it is the number of stars on the screen at once. + +In starfish mode it means nothing. + +In strange mode it means nothing. + +In superquadrics mode its the number of horizontal and vertical lines in +the superquadric. + +In swirl mode it means the number of "knots". + +In swarm mode it is the number of bees. + +In thornbird mode it is the number of points. + +In triangular mode it is the number of mountains. + +In tube mode it is a rectangle (= 1), an ellipse (= 2), or a polygon if +greater. + +In turtle mode it means nothing. + +In vines mode it is draw a complete vine (= 0) or a portion (= 1). + +In voters mode it means the number of parties, 2 or 3. + +In wator mode it means the breed time for the fish. + +In wire mode it means the length of the circuit. + +In world mode it is the number of worlds. + +In worm mode it is the number of worms. + +In blank mode it means nothing. + +In bomb mode it means the number of minutes to autologout. + +A negative +.I count +allows for randomness. The range from the minimum allowed nonnegative +.I count +for a particular mode to the +ABS( +.I count +) (or maximum allowed +.I count +, whichever is less). +.TP 5 +.BI \-batchcount \ num +The +.I batchcount +option is depreciated but should still work as +.I count. +.TP 5 +.BI \-cycles \ num +The +.I cycles +option sets the number of cycles until time out for ant, blot, braid, +bug, clock, crystal, daisy, deco, demon, dilemma, discrete, eyes, +flag, flow, forest, galaxy, helix, hop, hyper, ico, +laser, life, life1d, life3d, lisa, lissie, loop, mandelbrot, mountain, +petal, sierpinski, shape, spline +erase, thornbird, triangle, tube, +voters, wator, and wire. For worm it is the length of the lines, +for atlantis it is the shark speed, +for fadeplot, julia and spiral it is the length of the trail of dots, +munch it is the minimum size of the squares, +for kaleid it is the % of black, +for qix it is the number of lines, +for spline -erase it means the number of +splines * 64 (for compatibility with +erase), +for gears it is the number of degrees to increment the spin of each gear by, +for pipes it is the number of systems to draw before clearing the screen, +for rubik it is the number of steps to complete a 90 move, +for superquadrics it is the number of frames it takes to morph from one +shape to another. For others it means nothing. +.TP 5 +.BI \-size \ num +The +.I size +option sets the size maximum size of a star in bouboule, pyro and star, +size of ball in ball and bounce, size of bat in bat, +maximum size of bubble in bubble, size of clock in clock, +minimum size of rectangles in deco, size of the polygon in crystal, +size of polyhedron in ico, size of lissie in lissie, size of dots of flag, +for kaleid it is the symmetry, +width of maze hallway, size of side of penrose tile, radius of loop in lisa, +radius of ball in roll, number of corners in sierpinski, +size of tube in tube, width of worm in worm, line width in rotor, +size of cells in ant, bug, dilemma, life, life1d, pacman, tetris, voters, +wator, and wire. In pipes it is the maximum length of a system. +In atlantis it is the shark size. +In sproingies it is the size of the screen. A negative number +allows for randomness, similar to +.I count. +.TP 5 +.BI \-ncolors \ num +The +.I ncolors +option sets the maximum number of colors to be used. +.TP 5 +.BI \-saturation \ value +The +.I saturation +option sets saturation of the color ramp used to +.I value . +0 is grayscale and 1 is very rich color. 0.4 is a nice pastel. +.TP 5 +.BI \-erasemode \ modename +As of this writing there are over 9 erase modes supported +(if its not chosen its assumed random). +The erase modes are random_lines, random_squares, venetian, triple_wipe, +quad_wipe, circle_wipe, three_circle_wipe, squaretate, no_fade. +.TP 5 +.BI \-erasedelay \ usecs +The +.I erasedelay +option sets the number of microseconds for steps of the +.B erasemode +(a setting of 0 and the +.B erasemode +is bypassed). +.TP 5 +.B +/-nolock +The +.I nolock +option causes +.B xlock +to only draw the patterns and not lock the display. +A key press or a mouse click will terminate the screen saver. +.TP 5 +.B -/+inwindow +Runs +.B xlock +in a window, so that you can iconify, move, or resize it and +still use your screen for other stuff. When running in a window, +.B xlock +no longer locks your screen, it just looks good. +.TP 5 +.B -/+inroot +Runs +.B xlock +in your root window. Like the +.I inwindow +option it no longer locks the screen, it just looks good. +.TP 5 +.B -/+remote +The +.I remote +option tells +.B xlock +to not stop you from locking remote X11 servers. This option should be +used with care and is intended mainly to lock X11 terminals which cannot +run +.B xlock +locally. If you lock someone else's workstation, they will have to know +.B your +password to unlock it. Using +.I +remote +overrides any resource derived values for +.I remote +and prevents +.B xlock +from being used to lock other X11 servers. (Use `+' instead of `-' to +override resources for other options that can take the `+' modifier +similarly.) +.TP 5 +.B -/+mono +The +.I mono +option causes +.B xlock +to display monochrome, (black and white) pixels rather than the default +colored ones on color displays. +.TP 5 +.B -/+allowaccess +This option is required for servers which do not allow clients to modify +the host access control list. It is also useful if you need to run x +clients on a server which is locked for some reason... When +.I allowaccess +is true, the X11 server is left open for clients to attach and thus +lowers the inherent security of this lock screen. A side effect of using +this option is that if +.B xlock +is killed -KILL, the access control list is not lost. +.TP 5 +.BI \-vtlock \ modename +This option is used on a XFree86 system to manage VT switching in +[off|noswitch|switch|restore] mode. +.TP 10 +.I off +means no VT switch locking. +.TP 10 +.I switch +means VT switch locking + switching to xlock VT when activated. +.TP 10 +.I restore +means VT switch locking + switching to xlock VT when activated + +switching back to previous VT when desactivated. +.TP 10 +.I noswitch +means VT switch locking only when xlock VT is active. +.TP 5 +.B -/+allowroot +The +.I allowroot +option allows the root password to unlock the server as well as the user +who started +.BR xlock . +May not be able to turn this on and off depending on your system and how +.B xlock +was configured. +.TP 5 +.B -/+debug +Allows +.B xlock +to be debugged by doing all but locking the screen. +.TP 5 +.B -/+description +The +.I description +option causes +.B xlock +shows a mode description above password window. The default is to +show this description. +.TP 5 +.B -/+echokeys +The +.I echokeys +option causes +.B xlock +to echo '?' characters for each key typed into the password prompt. +Some consider this a security risk, so the default is to not echo +anything. +.TP 5 +.B -/+enablesaver +By default +.B xlock +will disable the normal X server's screen saver since +it is in effect a replacement for it. Since it is possible to set delay +parameters long enough to cause phosphor burn on some displays, this +option will turn back on the default screen saver which is very careful +to keep most of the screen black. +.TP 5 +.B -/+resetsaver +By default +.B xlock +will call XResetScreenSaver. This may be undesirable with DPMS monitors. +.TP 5 +.B -/+grabmouse +The +.I grabmouse +option causes +.B xlock +to grab the mouse and keyboard, this is the default. +.B xlock +can not lock the screen without this. +.TP 5 +.B -/+grabserver +The +.I grabserver +option causes +.B xlock +to grab the server. This is not usually needed but some unsecure X servers +can be defeated without this. +.TP 5 +.B -/+install +Allows +.B xlock +to install its own colormap if +.B xlock +runs out of colors. +May not work on with some window managers (fvwm) and does not work with +the -inroot option. +.TP 5 +.B -/+mousemotion +Allows you to turn on and off the sensitivity to the mouse to bring up +the password window. +.TP 5 +.B -/+sound +Allows you to turn on and off sound if installed with the capability. +.TP 5 +.B -/+timeelapsed +Allows you to find out how long a machine is locked so you can complain +to an administrator that someone is hogging a machine. +.TP 5 +.B -/+usefirst +The +.I usefirst +option causes +.B xlock +to use the keystroke which got you to the password screen as the first +character in the password. The default is to ignore the first key +pressed. +.TP 5 +.B -/+verbose +Verbose mode, tells what options it is going to use. +.TP 5 +.BI \-nice \ nicelevel +The +.I nice +option sets system nicelevel of the +.B xlock +process to +.I nicelevel . +.TP 5 +.BI \-lockdelay \ seconds +The +.I lockdelay +option sets the number of +.I seconds +before the screen needs a password to be unlocked. Good for use with +an autolocking mechanism like xautolock(1). +.TP 5 +.BI \-timeout \ seconds +The +.I timeout +option sets the number of +.I seconds +before the password screen will time out. +.TP 5 +.BI \-font \ fontname +The +.I font +option sets the font to be used on the prompt screen. +.TP 5 +.BI \-planfont \ fontname +option sets the font to be used for the text that is displayed in +the lower part of the password screen. +.TP 5 +.BI \-fg \ color +The +.I fg +option sets the color of the text on the password screen to +.I color . +.TP 5 +.BI \-bg \ color +The +.I bg +option sets the color of the background on the password screen to +.I color . +.TP 5 +.BI \-foreground \ color +The +.I foreground +option sets the color of the text on the password screen to +.I color . +.TP 5 +.BI \-background \ color +The +.I background +option sets the color of the background on the password screen to +.I color . +.TP 5 +.BI \-username \ string +Text +.I string +is shown in front of user name, defaults to "Name: ". +.TP 5 +.BI \-password \ string +Text +.I string +is the password prompt string, defaults to "Password: ". +.TP 5 +.BI \-info \ string +Text +.I string +is an informational message to tell the user what to do, defaults to +"Enter password to unlock; select icon to lock.". +.TP 5 +.BI \-validate \ string +Text +.I string +is a message shown while validating the password, defaults to +"Validating login..." +.TP 5 +.BI \-invalid \ string +Text +.I string +is a message shown when password is invalid, defaults to +"Invalid login." +.TP 5 +.BI \-geometry \ geom +The +.I geometry +option sets +.I geom +the size and offset of the lock window (normally the entire screen). +The entire screen format is still used for entering the password. The +purpose is to see the screen even though it is locked. This should be +used with caution since many of the modes will fail if the windows +are far from square or are too small (size must be greater than 0x0). +This should also be used with -enablesaver to protect screen from +phosphor burn. +.TP 5 +.BI \-icongeometry \ geom +The +.I icongeometry +option sets +.I geom +the size of the iconic screen (normally 64x64) seen when entering the +password. This should be used with caution since many of the modes will +fail if the windows are far from square or are too small (size must be +greater than 0x0). The greatest size is 256x256. There should be some +limit so users could see who has locked the screen. Position +information of icon is ignored. +.TP 5 +.BI \-glgeometry \ geom +The +.I glgeometry +option sets +.I geom +the size of the screen for gl modes. Not normally available or needed. +.TP 5 +.B -/+fullrandom +Turn on/off randomness options within modes. Not implemented on all +mode options. +.TP 5 +.B -/+wireframe +Turn on/off wireframe, available on atlantis, daisy, gears, life3d, mountain, +sproingies, superquadrics, and triangle. +.TP 5 +.B -/+use3d +Turn on/off 3d view, available on bouboule, pyro, star, and worm. +.TP 5 +.BI \-delta3d \ value +Space between the center of your 2 eyes for 3d mode. +.TP 5 +.BI \-none3d \ color +Color used for empty size in 3d mode. +.TP 5 +.BI \-right3d \ color +Color used for right eye in 3d mode. +.TP 5 +.BI \-left3d \ color +Color used for left eye in 3d mode. +.TP 5 +.BI \-both3d \ color +Color used for overlapping images for left and right eye in 3d mode. +.TP 5 +.BI \-program \ programname +The +.I program +option sets the program to be used as the fortune generator. Currently +used only for marquee and nose modes. +.TP 5 +.BI \-messagesfile \ formatted-filename +The +.I messagesfile +option sets the file to be used as the fortune generator. The first +entry is the number of fortunes, the next line contains the first fortune. +Fortunes begin with a "%%" on a line by itself. Currently used only for +marquee and nose modes. If one exists, it takes precedence over the +fortune program. +.TP 5 +.BI \-messagefile \ filename +The +.I messagefile +option sets the file whose contents are displayed. Currently +used only for marquee and nose modes. If one exists, it takes +precedence over the fortune program and messagesfile. +.TP 5 +.BI \-message \ textstring +The +.I message +option sets the text to be displayed in a mode. Currently used only for +flag, marquee and nose modes. If one exists, it takes precedence over the +fortune program, messagesfile and message. +.TP 5 +.BI \-messagefont \ fontname +The +.I messagefont +option sets the font to be used in the mode. Currently used only for +flag, marquee, and nose modes. +.TP 5 +.BI \-bitmap \ filename +The +.I bitmap +option sets the xbm, xpm, or ras file to be displayed with flag, image, life, +life1d, maze, or puzzle mode. For eyes and pacman only a xbm file is +accepted. Certain modes reject the bitmap if too big. +.TP 5 +.BI \-neighbors \ num +The +.I neighbors +option sets the number of neighbors of a cell to 3, 4, 6, 9 (may not have +real mathematical meaning), or 12 for several automata modes. Setting it to +0 typically randomizes this, except in life where it is set to 8. +.TP 5 +.BI -/+mouse +Turn on and off mouse interaction in +.I eyes, julia, and swarm. +.sp +.SH "MORE OPTIONS (these may not be available)" +.TP 5 +.BI \-cpasswd \ crypted-password +The +.I cpasswd +option sets the key to be this text string to unlock +.B xlock +instead of password file. +.TP 5 +.BI \-forceLogout \ minutes +The +.I forceLogout +option sets +.I minutes +to auto-logout. +.TP 5 +.BI \-logoutButtonLabel \ string +Text +.I string +is a message shown inside logout button when logout button is displayed. +Defaults to +"Logout". +.TP 5 +.BI \-logoutButtonHelp \ string +Text +.I string +is a message shown outside logout button when logout button is +displayed. Defaults to +"Click the \\"Logout\\" button to log out current\\n +user and make workstation available." +.TP 5 +.BI \-logoutFailedString \ string +Text +.I string +is a message shown when a logout is attempted and fails. +Defaults to +"Logout attempt FAILED.\\n +Current user could not be automatically logged out." +.TP 5 +.B -/+dtsaver +Turn on/off CDE Saver Mode. This option is only available if CDE +support was compiled in. +.TP 5 +.BI \-modulepath \ path +The +.I modulepath +option sets the +.I directories +that +.B xlock +searches for mode modules to load. It is a colon separated list of +directories to search. If "%S" is included in the path, it is replaced +by the default modulepath. To add a private module directory to the +default path, use something like '%S:~/mymoduledir' as the path. This +option is only available if module support was compiled in. +.TP 5 +.BI \-locksound \ string +Text +.I string +references sound to use at lock time. Default sound, male voice: +"Thank you, for your cooperation." +.TP 5 +.BI \-infosound \ string +Text +.I string +references sound to use for information. Default sound, male voice: +"Identify please." +.TP 5 +.BI \-validsound \ string +Text +.I string +references sound to when a password is valid. Default sound, female voice: +"Complete." +.TP 5 +.BI \-invalidsound \ string +Text +.I string +references sound to when a password is invalid. Default sound, female +voice: "I am not programmed to give you that information." +.TP 5 +.BI \-startCmd \ string +Text +.I string +command to execute when the screen is locked. Commonly used instructions include: +"zaway". This command, if still running when the screensaver exist, will be killed. +.TP 5 +.BI \-endCmd \ string +Text +.I string +command to execute when the screen is unlocked. +.TP 5 +.BI \-logoutCmd \ string +Text +.I string +command to execute when the program logs the user out (either via the autologout +or by pressing the logout button). +.TP 5 +.BI \-mailCmd \ string +Text +.I string +command to execute when the program to check mail. +.TP 5 +.BI \-mailIcon \ string +Text +.I string +of file for the "mail arrived" bitmap. +.TP 5 +.BI \-nomailIcon \ string +Text +.I string +of file for the "no mail" bitmap. +.TP 5 +.B -dpmsstandby \ seconds +Allows one to set DPMS Standby for monitor (0 is defined as infinite). +(Horizontal sync on, Vertical sync off, RGB guns off, power supply on, +tube filaments energized, (screen saver mode). Typical 17 inch screen... +110 out of 120 watts with a 3 sec recovery time.) This option is only +available if DPMS support was compiled in. +.TP 5 +.B -dpmssuspend \ seconds +Allows one to set DPMS Suspend for monitor (0 is defined as infinite). +(Horizontal sync off, Vertical sync on, RGB guns off, power supply off, +tube filaments energized. Typical 17 inch screen ... 15 out of 120 watts +with a 3 sec recovery time.) This option is only available if DPMS support +was compiled in. +.TP 5 +.B -dpmsoff \ seconds +Allows one to set DPMS Power Off for monitor (0 is defined as infinite). +(Horizontal sync off, Vertical sync off, Small auxiliary circuit stays on +to monitor the HS/VS signals to enable power on when data needs to be +displayed on the screen. Typical 17 inch screen ... 5 out of 120 watts with +a 10 sec recovery time.) This option is only available if DPMS support was +compiled in. +.sp +.SH "SPECIAL MODE DEPENDENT OPTIONS" +.TP 5 +.BI \-whalespeed \ num +Allows one to set the speed of the whales and dolphin in +.I atlantis. +.TP 5 +.BI -/+truchet +Turn on and off Truchet lines (trail) in +.I ant. +.TP 5 +.BI -/+boil +Turn on and off having the bubbles bubble up in +.I bubble. +.TP 5 +.BI \-nx \ num +Allows one to set the number of unit cells in x-direction in +.I crystal. +.TP 5 +.BI \-ny \ num +Allows one to set the number of unit cells in y-direction in +.I crystal. +.TP 5 +.BI -/+centre +Turn on and off the centering on screen in +.I crystal. +.TP 5 +.BI -/+maxsize +Turn on and off the centering on screen in +.I crystal. +.TP 5 +.BI -/+cell +Turn on and off the drawing of unit cell in +.I crystal. +.TP 5 +.BI -/+grid +Turn on and off the drwing of grid of unit cells (if -cell is on) in +.I crystal. +.TP 5 +.BI -/+shift +Turn on and off colour cycling in +.I crystal. +.TP 5 +.BI -/+forest +Turn on and off the tropical deforest (hectares/acres) counter in +.I dclock. +.TP 5 +.BI -/+popex +Turn on and off the population explosion counter in +.I dclock. +.TP 5 +.BI \-bonus \ value +Allows one to set the bonus for cheating... between 1.0 and 4.0 in +.I dilemma. +.TP 5 +.BI -/+garden +Turn off and on garden look in +.I daisy. +.TP 5 +.BI -/+conscious +Turn off and on self-awareness in +.I dilemma. +.TP 5 +.BI -/+grow +Turn on and off growing fractals (else they are animated) for +.I drift. +.TP 5 +.BI -/+liss +Turn on and off using lissajous figures to get points for +.I drift. +.TP 5 +.BI -/+noants +Turn off and on ants in +.I moebius. +.TP 5 +.BI -/+solidmoebius +Turn on and off solid Mobius strip in +.I moebius. +.TP 5 +.BI -/+invert +Turn on and off inverting of the +.I flag. +.TP 5 +.BI -/+tracks +Turn on and off star tracks in +.I galaxy. +.TP 5 +.BI -/+decay +Turn on and off decaying orbits for +.I grav. +.TP 5 +.BI -/+trail +Turn on and off decaying trail of dots for +.I grav. +.TP 5 +.BI -/+ellipse +Turn on and off ellipse format in +.I helix. +.TP 5 +.BI -/+martin +Turn on and off Barry Martin's square root +.I hop. +.BI -/+popcorn +Turn on and off Clifford A. Pickover's popcorn +.I hop. +.TP 5 +.BI -/+ejk1...ejk6 +Turn on and off Ed J. Kubaitis' +.I hops. +.TP 5 +.BI -/+rr +Turn on and off Renaldo Recuerdo's +.I hop. +.TP 5 +.BI -/+jong +Turn on and off Jong's +.I hop. +.TP 5 +.BI -/+sine +Turn on and off Barry Martin's sine +.I hop. +.TP 5 +.BI -/+disconnected +Turn on and off disconnected pen movement in +.I kaleid. +.TP 5 +.BI -/+serial +Turn on and off sequential allocation of colors in +.I kaleid. +.TP 5 +.BI -/+alternate +Turn on and off alternate rotated display mode +.I kaleid. +.TP 5 +.BI -/+quad +Turn on and off quad mirrored/rotated mode similar to size 4 in +.I kaleid. +.TP 5 +.BI -/+oct +Turn on and off oct mirrored/rotated mode similar to size 8 in +.I kaleid. +.TP 5 +.BI -/+linear +Turn on and off Cartesian/Polar coordinate mode in +.I kaleid. +.TP 5 +.BI \-rule \ S/B +Allows one to set +.I life +survival and birth parameters. For example, Conway's rule is S23/B3. +Special parameters: P, picks a random rule from all rules that have known +patterns; G, picks a random rule from all rules that have known gliders. +.TP 5 +.BI \-lifefile \ filename +The +.I lifefile +option sets the lifeform. Only one format is currently supported, the +#P xlife format. +.TP 5 +.BI -/+callahan +Turn on and off Paul Callahan's S2b34/B2a hexagonal +.I life. +.TP 5 +.BI -/+andreen +Turn on and off Bob Andreen's S2a2b4a/B2a3a4b hexagonal +.I life. +.TP 5 +.BI -/+totalistic +Turn on and off totalistic rules for +.I life1d. +If this is off then it follows rules of the LCAU collection. These +rules may not be symmetric and are more general. +.TP 5 +.BI \-rule3d \ S/B +Allows one to set +.I life3d +survival and birth parameters. For example, Bay's rules are S45/B5, S567/B6 +S56/B5, and S67/B67. There is currently no way of accessing neighborhoods +beyond 9. Special parameters: P, picks a random rule from all rules that +have known patterns; G, picks a random rule from all rules that have known +gliders. +.TP 5 +.BI \-life3dfile \ filename +The +.I life3dfile +option sets the lifeform. Only one format is currently supported, similar +to the #P xlife format. 2 linefeeds in a row are assumed to advance the +depth. +.TP 5 +.BI -/+additive +Turn on and off additive functions mode in +.I lisa. +.TP 5 +.BI -/+ammann +Turn on and off lines for +.I penrose. +.TP 5 +.BI \-increment \ value +Allows fine adjustments to order in +.I mandelbrot. +.TP 5 +.BI -/+erase +Turn on and off erasing for +.I spline. +If this option is on, +.I cycles +is divided by 64 to compute the number of lines, so as to be compatible +when using -fullrandom. +.TP 5 +.BI \-factory \ num +Number of extra factory parts in +.I pipes. +.TP 5 +.BI -/+fisheye +Turn on if you want a zoomed-in view of +.I pipes. +.TP 5 +.BI -/+tightturns +Turn on if you want the +.I pipes +to bend more often. +.TP 5 +.BI -/+rotatepipes +Turn on if you want the pipe system rotated in +.I pipes. +.TP 5 +.BI -/+complete +Turn on or off complete graph morphing in +.I qix. +.TP 5 +.BI -/+hideshuffling +Turn on or off hidden shuffle phase for +.I rubik. +.TP 5 +.BI -/+border +Turn on or off borders in +.I shape. +.TP 5 +.BI -/+ shape +Turn on or off shadowing in +.I shape. +.TP 5 +.BI -/+ shape +Turn on or off stippling in +.I shape. +.TP 5 +.BI \-trek \ num +If its a high number you will see the space ship all the time in +.I star. +.TP 5 +.BI -/+rock +Turn on and off rocks for +.I star. +If this is off, stars will be seen instead. +.TP 5 +.BI -/+straight +Turn on if +.I star +gets you motion sick. +.TP 5 +.BI \-cyclepeed \ num +Set speed of cycling in +.I starfish. +.TP 5 +.BI \-rotation \ num +Set rotation velocity in +.I starfish. +.TP 5 +.BI \-thickness \ num +Set thickness in +.I starfish. +.TP 5 +.BI -/+cycle +Turn on and off cycle for +.I starfish. +.TP 5 +.BI -/+rock +Turn on and off blob for +.I starfish. +.TP 5 +.BI \-spinspeed \ num +Set speed of rotation, in degrees per frame for +.I superquadrics. +.TP 5 +.BI \-duration \ seconds +Allows one to set a duration for a mode in +.I random. +Duration of 0 is defined as infinite. +.TP 5 +.BI \-modelist \ textstring +Allows one to pass a list of files to randomly display to +.I random. +"all" will get all files but blank (and bomb if compiled in). "all,blank" +will get all modes. "all,-image bounce,+blank" will get all modes but +image and bounce. "bug wator" will get only bug and wator. "allgl" will +get only the GL modes if compiled in, all-allgl will get all but the GL +modes, "allnice" will weed out high cpu usage modes (as well as hackers and +gl modes). "allxpm" will get all modes that use xpm. "allwrite" will get +all modes that take advantage of writable colormaps (not including xpm). +"all3d" will get all the modes that support this option. "allmouse" +will get all the modes that support mouse interaction. Similarly, +"allautomata" for automata modes, "allfractal" for fractal modes, +"allgeometry" for geometry modes, "allspace" for space modes. The random +mode itself can not be referenced. +.TP 5 +.BI -/+sequential +Turn on non-random +.I random +option. +.sp +.SH **WARNING** +.B xlock +can appear to hang if it is competing with a high-priority process for +the CPU. For example, if +.B xlock +is started after a process with 'nice -20' +(high priority), +.B xlock +will take considerable amount of time to respond. +.sp +.SH "SHADOW PASSWORDS" +If the machine is using a shadow password system, then +.B xlock +may not be set up to get the real password and so must be given one +of its own. This can be either on the command line, via the +.B -cpasswd +option, +or in the file +.BR $HOME/.xlockrc , +with the first taking precedence. In both cases an encrypted password +is expected (see makekey(8)). If neither is given, then +.B xlock +will prompt for a password and will use that, also storing an +encrypted version of it in +.B $HOME/.xlockrc +for future use. +.sp +.SH BUGS +"kill -KILL +.B xlock +" causes the server that was locked to be unusable, since all hosts +(including localhost) were removed from the access control list +to lock out new X clients, and since +.B xlock +could not catch SIGKILL, it terminated before restoring the access +control list. This will leave the X server in a state where +\fI"you can no longer connect to that server, +and this operation cannot be reversed unless you reset the server."\fP + -From the X11R4 Xlib Documentation, Chapter 7. +.br +NCD terminals do not allow xlock to remove all the hosts from the access +control list. Therefore you will need to use the "-remote" and +"-allowaccess" switches. If you happen to run without "-allowaccess" on an +NCD terminal, +.B xlock +will not work and you will need to reboot the terminal, or simply go into +the SETUP menus, under 'Network Parameters', and turn off TCP/IP access +control. +.br +.SH "SEE ALSO" +X(1), Xlib Documentation. +.sp +.SH AUTHOR +Maintained by: +.RS +David Albert Bagley, <\fIbagleyd@bigfoot.com\fP> +.RE +.sp +The latest version is currently at: +.RS +\fIftp://ftp.tux.org/pub/tux/bagleyd/xlockmore\fP +.br +\fIftp://ftp.x.org/contrib/applications\fP +.RE +.sp +Original Author: +.RS +Patrick J. Naughton, <\fInaughton@eng.sun.com\fP> +.br +Mailstop 21-14 +.br +Sun Microsystems Laboratories, Inc. +.br +Mountain View, CA 94043 +.br +415/336-1080 +.RE +.sp +with many additional contributors. +.sp +.SH COPYRIGHT +Copyright (c) 1988-91 by Patrick J. Naughton +.br +Copyright (c) 1993-98 by David A. Bagley +.sp +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. +.br +The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. +All Rights Reserved. +.br +DEC, HP, IBM, Linux, SCO, SGI, and Sun icons have their respective +copyrights. diff --git a/xmlock/Imakefile b/xmlock/Imakefile new file mode 100644 index 00000000..ed2472ab --- /dev/null +++ b/xmlock/Imakefile @@ -0,0 +1,38 @@ +#ifndef XCOMM +#define XCOMM /**/# +#endif +XCOMM @(#)Sub Imakefile xlockmore +XCOMM + +#include "../iconfig.h" + +top_srcdir = .. +UTILSDIR = . + +XCOMM List of object files +XMLOCKOBJS = option$(O)$(S)xmlock$(O) + +XCOMM List of source files +XMLOCKSRCS = option$(C) xmlock$(C) + + +#ifdef XmLibrary +AllTarget(xmlock) +NormalProgramTarget(xmlock, $(XMLOCKOBJS), $(DEPXLIB), $(MLIBS), NullParameter) +#else +clean:: + $(RM) xmlock +#endif + +DependTarget() +LintTarget() + +#ifdef XmLibrary +InstallProgram(xmlock$(E),$(BINDIR)) +InstallAppDefaults(XmLock) +#endif + +distclean:: clean + $(RM) Makefile config.status config.cache config.log config.h + +clean.all:: distclean diff --git a/xmlock/Makefile.in b/xmlock/Makefile.in new file mode 100644 index 00000000..01288535 --- /dev/null +++ b/xmlock/Makefile.in @@ -0,0 +1,191 @@ +# $Id : Makefile.in 4.04 1997/07/10 $ +# +# xlockmore Makefile.in for autoconf (UNIX/VMS X11 support) +############################################################ + +# @SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@/ +BITMAPDIR = @BITMAPDIR@/ + +N= +O = .o +#O = .obj +C = .c +# C = .cc +S = $(N) $(N) +#S = , + + +# please define +# C as the C source code extension +# O as the object extension +# S as the separator for object code + +#################################################################### +# List of object files +XMLOCKOBJS = option$(O)$(S)xmlock$(O) + +# List of source files +XMLOCKSRCS = $(VPATH)option$(C) $(VPATH)xmlock$(C) + +# default target +all : @XMLOCK@ + +# this tells GNU make not to export variables into the environment +# But other makes do not understand its significance, so it must +# not be the first target in the file. So it is here, before +# any variables are created, but after the default target +.NOEXPORT : + +SHELL = /bin/sh + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@/man1 +xapploaddir = @APPDEFAULTS@ + +CONFIGDIR = $(srcdir)/config/ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTPGMFLAGS = @INSTPGMFLAGS@ + +#CC = cc -g +#CC = cc -Ac -g +#CC = cc -Xc -g +#CC = acc -g +#CC = CC -g +#CC = gcc -g -Wall -ansi -pedantic +#CC = gcc -g -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes +#CC = g++ -g -Wall +CC = @CC@ + +LINT = lint +#LINT = alint + +#DEPEND = makedepend +DEPEND = @DEPEND@ +DEPEND_FLAGS = @DEPEND_FLAGS@ +DEPEND_DEFINES = @DEPEND_DEFINES@ + +LN_S = @LN_S@ +RM = rm -f +RM_S = $(RM) +ECHO = echo + +#BLN_S = set file/enter=[] +#RM = delete/noconfirm/nolog +#RM_S = set file/remove/nolog +#ECHO = write sys$output + +DEFS = @DEFS@ $(DEFINES) +XMLOCKINC = @XMLOCKINC@ -I.. -I$(top_srcdir) +CFLAGS = @CFLAGS@ +#CFLAGS = -O +#CFLAGS = -g +XMLOCKLDFLAGS = @XMLOCKLDFLAGS@ +XLIBS = @XLIBS@ +XMLOCKLIBS = @XMLOCKLIBS@ +#If you have purify, and want to use it, uncomment this definition or +# run the make as `make PURIFY=purify' +# or run configure with the --with-purify argument. +PURIFY = @PURIFY@ + +xmlock : $(XMLOCKOBJS) + $(PURIFY) $(CC) -o $@ $(XMLOCKOBJS) $(XMLOCKLDFLAGS) $(XMLOCKLIBS) + @ $(ECHO) "$@ BUILD COMPLETE" + @ $(ECHO) "" + +.SUFFIXES : $(C) $(O) + +$(C)$(O) : + $(CC) -c $(CPPFLAGS) $(DEFS) $(XMLOCKINC) $(CFLAGS) $< + +install : @INSTALL_XMLOCK@ + +install_xmlock : install-program install-man install-ad + @ $(ECHO) "$@ COMPLETE" + @ $(ECHO) "" + +install-program : xmlock + $(top_srcdir)/mkinstalldirs $(bindir) + $(INSTALL_PROGRAM) xmlock $(bindir) + +install-man : + +install-ad : + $(top_srcdir)/mkinstalldirs $(xapploaddir) + $(INSTALL_DATA) $(top_srcdir)/xmlock/XmLock.ad $(xapploaddir)/XmLock + +uninstall : @UNINSTALL_XMLOCK@ + +uninstall_xmlock : uninstall-program uninstall-man uninstall-ad + +uninstall-program : + $(RM) $(bindir)/xmlock + +uninstall-man : + +uninstall-ad : + $(RM) $(xapploaddir)/XmLock + +lint : + $(LINT) -ax -DLINT $(DEFS) $(XMLOCKINC) $(XMLOCKSRCS) + +xrdb : + xrdb $(top_srcdir)/xmlock/XmLock.ad + +man : + +html : + +hlp : + +clean : + $(RM) *.o core *~ *% *.bak *.orig *.rej make.log MakeOut xmlock + +distclean : clean + $(RM) Makefile + +clean.all : distclean + +# Adds all current dependencies to Makefile +depend : + $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \ + $(DEPEND_FLAGS) -- \ + $(XMLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XMLOCKSRCS) + +# 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. -w 0 +distdepend : + @echo updating dependencies in `pwd`/Makefile.in... ; \ + $(DEPEND) -w 0 -f - \ + -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ + $(XMLOCKINC) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) -- \ + $(XMLOCKSRCS) | \ + ( \ + awk '/^#.*Id : Makefile.in/,/^# DO .*distdepend/' < Makefile.in ; \ + sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \ + -e 's@\.\./bitmaps@$$(BITMAPDIR)@g' ; \ + echo '' \ + ) > /tmp/distdepend.$$$$ && \ + mv Makefile.in Makefile.in.bak && \ + mv /tmp/distdepend.$$$$ Makefile.in + +############################################################################## +# +# DO NOT DELETE: updated by make distdepend + +xmlock.o: ../config.h +xmlock.o: $(BITMAPDIR)/m-xlock.xbm +xmlock.o: modes.h + diff --git a/xmlock/XmLock.ad b/xmlock/XmLock.ad new file mode 100644 index 00000000..bdbe1ac5 --- /dev/null +++ b/xmlock/XmLock.ad @@ -0,0 +1,16 @@ +!!!! +! XmLock: Class resource for xmlock +!!!! +!XmLock.Form.Boolean.Fontlist: -*-*-bold-i-*-*-16-*-*-*-*-*-*-* +!XmLock.Form.Switches.Fontlist: -*-*-bold-i-*-*-16-*-*-*-*-*-*-* +!XmLock.Form.PushButtonRow.Menubar.PopupOptions.Options.Font.Fontlist: -*-*-bold-i-*-*-*-*-*-*-*-*-*-* +XmLock.Form.PushButtonRow.Exit.Background: red +XmLock.Form.PushButtonRow.Exit.Armcolor: pink +!XmLock.Form.PushButtonRow.Exit.Fontlist: -*-*-bold-i-*-*-*-*-*-*-*-*-*-* +!XmLock.Form.Modes.Labelstring: Modes +!XmLock.Form.Switches.Labelstring: Turn On/Off +!XmLock.Form.Row*ScrolledListModes.BorderColor: black +!XmLock.Form.Row*ScrolledListModes.Fontlist: -*-*-bold-*-*-*-16-*-*-*-*-*-*-* +XmLock.Form.Row*ScrolledListModes.Background: light blue +XmLock.Form.Row.TogglesRow.Background: white +!XmLock.Form.Row.Xmrowcolumn*Fontlist: -*-*-*-*-*-*-14-*-*-*-*-*-*-* diff --git a/xmlock/modes.h b/xmlock/modes.h new file mode 100644 index 00000000..64b6f134 --- /dev/null +++ b/xmlock/modes.h @@ -0,0 +1,138 @@ +typedef struct LockStruct_s +{ + char *cmdline_arg; /* mode name */ + /* Maybe other things should be added here from xlock? */ + /* Should read in XLock as well to set defaults */ + char *desc; /* text description of mode */ +} LockStruct; + +static LockStruct LockProcs[] = +{ +{"ant","Shows Langton's and Turk's generalized ants"}, +#ifdef USE_GL +{"atlantis","Shows moving sharks/whales/dolphin"}, +#endif +{"ball","Shows bouncing balls"}, +{"bat","Shows bouncing flying bats"}, +{"blot","Shows Rorschach's ink blot test"}, +{"bouboule","Shows Mimi's bouboule of moving stars"}, +{"bounce","Shows bouncing footballs"}, +{"braid","Shows random braids and knots"}, +{"bubble","Shows popping bubbles"}, +{"bubble3d","Richard Jones's GL bubbles"}, +{"bug","Shows Palmiter's bug evolution and garden of Eden"}, +#ifdef USE_GL +{"cage","Shows the Impossible Cage, an Escher-like GL scene"}, +#endif +#if defined( USE_XPM ) || defined( USE_XPMINC ) +{"cartoon","Shows bouncing cartoons"}, +#endif +{"clock","Shows Packard's clock"}, +{"coral","Shows a coral reef"}, +{"crystal","Shows polygons in 2D plane groups"}, +{"daisy","Shows a meadow of daisies"}, +{"dclock","Shows a floating digital clock"}, +{"deco","Shows art as ugly as sin"}, +{"demon","Shows Griffeath's cellular automata"}, +{"dilemma","Shows Lloyd's Prisoner's Dilemma simulation"}, +{"discrete","Shows various discrete maps"}, +{"drift","Shows cosmic drifting flame fractals"}, +{"eyes","Shows eyes following a bouncing grelb"}, +{"fadeplot","Shows a fading plot of sine squared"}, +{"flag","Shows a waving flag of your operating system"}, +{"flame","Shows cosmic flame fractals"}, +{"flow","Shows dynamic strange attractors"}, +{"forest","Shows binary trees of a fractal forest"}, +{"galaxy","Shows crashing spiral galaxies"}, +#ifdef USE_GL +{"gears","Shows GL's gears"}, +#endif +{"goop","Shows goop from a lava lamp"}, +{"grav","Shows orbiting planets"}, +{"helix","Shows string art"}, +{"hop","Shows real plane iterated fractals"}, +{"hyper","Shows spinning n-dimensional hypercubes"}, +{"ico","Shows a bouncing polyhedron"}, +{"ifs","Shows a modified iterated function system"}, +{"image","Shows randomly appearing logos"}, +{"julia","Shows the Julia set"}, +{"kaleid","Shows a kaleidoscope"}, +{"kumppa","Shows kumppa"}, +{"laser","Shows spinning lasers"}, +{"life","Shows Conway's game of Life"}, +{"life1d","Shows Wolfram's game of 1D Life"}, +{"life3d","Shows Bays' game of 3D Life"}, +{"lightning","Shows Keith's fractal lightning bolts"}, +{"lisa","Shows animated lisajous loops"}, +{"lissie","Shows lissajous worms"}, +{"loop","Shows Langton's self-producing loops"}, +{"mandelbrot","Shows mandelbrot sets"}, +{"marquee","Shows messages"}, +{"maze","Shows a random maze and a depth first search solution"}, +#ifdef USE_GL +{"moebius","Shows Moebius Strip II, an Escher-like GL scene with ants"}, +#endif +#ifdef USE_GL +{"morph3d","Shows GL morphing polyhedra"}, +#endif +{"mountain","Shows Papo's mountain range"}, +{"munch","Shows munching squares"}, +{"nose","Shows a man with a big nose runs around spewing out messages"}, +{"pacman","Shows Pacman(tm)"}, +{"penrose","Shows Penrose's quasiperiodic tilings"}, +{"petal","Shows various GCD Flowers"}, +#ifdef USE_GL +{"pipes","Shows a selfbuilding pipe system"}, +#endif +{"puzzle","Shows a puzzle being scrambled and then solved"}, +{"pyro","Shows fireworks"}, +{"qix","Shows spinning lines a la Qix(tm)"}, +{"roll","Shows a rolling ball"}, +{"rotor","Shows Tom's Roto-Rooter"}, +#ifdef USE_GL +{"rubik","Shows an auto-solving Rubik's Cube"}, +#endif +{"shape","Shows stippled rectangles, ellipses, and triangles"}, +{"sierpinski","Shows Sierpinski's triangle"}, +{"slip","Shows slipping blits"}, +{"sphere","Shows a bunch of shaded spheres"}, +{"spiral","Shows a helical locus of points"}, +{"spline","Shows colorful moving splines"}, +#ifdef USE_GL +{"sproingies","Shows Sproingies! Nontoxic. Safe for pets and small children"}, +#endif +#ifdef USE_GL +{"stairs","Shows some Infinite Stairs, an Escher-like scene"}, +#endif +{"star","Shows a star field with a twist"}, +{"starfish","Shows starfish"}, +{"strange","Shows strange attractors"}, +#ifdef USE_GL +{"superquadrics","Shows 3D mathematical shapes"}, +#endif +{"swarm","Shows a swarm of bees following a wasp"}, +{"swirl","Shows animated swirling patterns"}, +{"tetris","Shows tetris"}, +{"thornbird","Shows an animated bird in a thorn bush fractal map"}, +{"triangle","Shows a triangle mountain range"}, +{"tube","Shows an animated tube"}, +{"turtle","Shows turtle fractals"}, +{"vines","Shows fractals"}, +{"voters","Shows Dewdney's Voters"}, +{"wator","Shows Dewdney's Water-Torus planet of fish and sharks"}, +{"wire","Shows a random circuit with 2 electrons"}, +{"world","Shows spinning Earths"}, +{"worm","Shows wiggly worms"}, +{"xjack","Shows Jack having one of those days"}, +{"blank","Shows nothing but a black screen"}, + +#ifdef USE_BOMB + {"bomb", "Shows a bomb and will autologout after a time"}, + {"random", "Shows a random mode (except blank and bomb)"} + #else + {"random", "Shows a random mode (except blank)"} +#endif +}; + + +static int numprocs = sizeof (LockProcs) / sizeof (LockProcs[0]); diff --git a/xmlock/option.c b/xmlock/option.c new file mode 100644 index 00000000..90d113fc --- /dev/null +++ b/xmlock/option.c @@ -0,0 +1,218 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)option.c 4.00 97/01/01 xlockmore"; + +#endif + +/*- + * option.c - option stuff for xmlock, the gui interface to xlock. + * + * Copyright (c) 1996 by Charles Vidal + * + * See xlock.c for copying information. + * + * Revision History: + * Nov-96: written. + * + */ + +/*- + * if you want add some options ,so it's not really difficult + * 1: Learn Motif ... but only if you want to :) + * 2: add a name of widget after geometry,font,program + * 3: add a string ( char * ) after *inval=NULL,*geo=NULL + * 4: add a callback like f_username with your new string + * 5: copy and paste after + geometry=XtVaCreateManagedWidget("geometry",xmPushButtonGadgetClass,options,NULL); + XtAddCallback(geometry,XmNactivateCallback,f_geometry,NULL); + * change geometry by your name of widget, and f_geometry by the name + * of your new callback + * 6: go to the church , call god for a miracle :) + * GOOD LUCK + */ + +#include +#include +#ifdef VMS +#include +#include +#endif + +#include +/* #include Does not work on my version of Lesstif */ +#include +#include +#include +#include +#include +#include + +#define OPTIONS 8 +#define REGULAR_OPTIONS (OPTIONS-2) +#define NBPROGNAME 3 +#define MAXNAMES 10000 +Widget Menuoption; +static Widget Options[OPTIONS]; + +/* extern variables */ +extern Widget toplevel; + +/* Widget */ +static Widget PromptDialog, FontSelectionDialog, ProgramSelectionDialog; + +/* strings */ +char *c_Options[OPTIONS]; +extern char *r_Options[OPTIONS]; + +static char *prompts[REGULAR_OPTIONS] = +{ + "Enter the user name.", + "Enter the password message.", + "Enter the info message.", + "Enter the valid message.", + "Enter the invalid message.", + "Enter the geometry mxn." +}; + +static char *prognames[NBPROGNAME] = +{ + "fortune", + "finger", + "echo hello world" +}; +static int loadfont = 0; + +/* string temp */ +static char **whichone; + + +static void +managePrompt(char *s) +{ + int ac; + Arg args[3]; + XmString label_str1, label_str2; + + ac = 0; + label_str1 = XmStringCreateSimple(s); + XtSetArg(args[ac], XmNselectionLabelString, label_str1); + ac++; + if (*whichone != NULL) { + label_str2 = XmStringCreateSimple(*whichone); + XtSetArg(args[ac], XmNtextString, label_str2); + ac++; + } else { + label_str2 = XmStringCreateSimple(""); + XtSetArg(args[ac], XmNtextString, label_str2); + ac++; + } + + XtSetValues(PromptDialog, args, ac); +/* PURIFY 4.0.1 on Solaris 2 reports a 71 byte memory leak on the next line. */ + XtManageChild(PromptDialog); + XmStringFree(label_str1); + XmStringFree(label_str2); +} + +/* CallBack */ +static void +f_option(Widget w, XtPointer client_data, XtPointer call_data) +{ + switch ((int) client_data) { + case REGULAR_OPTIONS: /* font */ + { + int numdirnames, i; + char **dirnames; + XmString label_str; + Widget listtmp; + Cursor tmp; + + whichone = &c_Options[REGULAR_OPTIONS]; + if (!loadfont) { + tmp = XCreateFontCursor(XtDisplay(toplevel), XC_watch); + XDefineCursor(XtDisplay(toplevel), XtWindow(toplevel), tmp); + dirnames = XListFonts(XtDisplay(toplevel), "*", MAXNAMES, &numdirnames); + listtmp = XmSelectionBoxGetChild(FontSelectionDialog, XmDIALOG_LIST); + for (i = 0; i < numdirnames; i++) { + label_str = XmStringCreateSimple(dirnames[i]); + XmListAddItemUnselected(listtmp, label_str, 0); + XmStringFree(label_str); + } + tmp = XCreateFontCursor(XtDisplay(toplevel), XC_left_ptr); + XDefineCursor(XtDisplay(toplevel), XtWindow(toplevel), tmp); + loadfont = 1; + XFreeFontNames(dirnames); + } + XtManageChild(FontSelectionDialog); + } + break; + + case (REGULAR_OPTIONS + 1): /* program */ + whichone = &c_Options[REGULAR_OPTIONS + 1]; +/* PURIFY 4.0.1 on Solaris 2 reports a 71 byte memory leak on the next line. */ + XtManageChild(ProgramSelectionDialog); + break; + + default: + whichone = &c_Options[(int) client_data]; + managePrompt(prompts[(int) client_data]); + } +} + +static void +f_Dialog(Widget w, XtPointer client_data, XtPointer call_data) +{ + static char *quoted_text = NULL; + char *nonquoted_text = NULL; + XmSelectionBoxCallbackStruct *scb = + (XmSelectionBoxCallbackStruct *) call_data; + + if (whichone != NULL) + XtFree(*whichone); + XmStringGetLtoR(scb->value, XmSTRING_DEFAULT_CHARSET, &nonquoted_text); + quoted_text = (char *) malloc(strlen(nonquoted_text) + 3); + (void) sprintf(quoted_text, "\"%s\"", nonquoted_text); + (void) free((void *) nonquoted_text); + *whichone = quoted_text; +} + +/* Setup Widget */ +void +Setup_Option(Widget MenuBar) +{ + Arg args[15]; + int i, ac = 0; + XmString label_str; + Widget listtmp, pulldownmenu; + + pulldownmenu = XmCreatePulldownMenu(MenuBar, "PopupOptions", NULL, 0); + label_str = XmStringCreateSimple("Options"); + XtVaCreateManagedWidget("Options", xmCascadeButtonWidgetClass, MenuBar, + XmNlabelString, label_str, XmNsubMenuId, pulldownmenu, NULL); + XmStringFree(label_str); + + for (i = 0; i < OPTIONS; i++) { + Options[i] = XtVaCreateManagedWidget(r_Options[i], + xmPushButtonGadgetClass, pulldownmenu, NULL); + XtAddCallback(Options[i], XmNactivateCallback, f_option, (XtPointer) i); + } +/* PURIFY 4.0.1 on Solaris 2 reports a 12 byte memory leak on the next line. */ + PromptDialog = XmCreatePromptDialog(toplevel, "PromptDialog", args, ac); + XtAddCallback(PromptDialog, XmNokCallback, f_Dialog, NULL); + +/* PURIFY 4.0.1 on Solaris 2 reports a 28 byte and a 12 byte memory leak on + the next line. */ + FontSelectionDialog = XmCreateSelectionDialog(toplevel, + "FontSelectionDialog", NULL, 0); + XtAddCallback(FontSelectionDialog, XmNokCallback, f_Dialog, NULL); + +/* PURIFY 4.0.1 on Solaris 2 reports a 38 byte memory leak on the next line. */ + ProgramSelectionDialog = XmCreateSelectionDialog(toplevel, + "ProgramSelectionDialog", NULL, 0); + XtAddCallback(ProgramSelectionDialog, XmNokCallback, f_Dialog, NULL); + listtmp = XmSelectionBoxGetChild(ProgramSelectionDialog, XmDIALOG_LIST); + for (i = 0; i < NBPROGNAME; i++) { + label_str = XmStringCreateSimple(prognames[i]); + XmListAddItemUnselected(listtmp, label_str, 0); + XmStringFree(label_str); + } +} diff --git a/xmlock/xmlock.c b/xmlock/xmlock.c new file mode 100644 index 00000000..58cd48f4 --- /dev/null +++ b/xmlock/xmlock.c @@ -0,0 +1,388 @@ +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)xmlock.c 4.08 98/02/18 xlockmore"; + +#endif + +/*- + * xmlock.c - main file for xmlock, the gui interface to xlock. + * + * Copyright (c) 1996 by Charles Vidal + * + * See xlock.c for copying information. + * + * Revision History: + * Nov-96: Continual minor improvements by Charles Vidal and David Bagley. + * Oct-96: written. + */ + +/*- + XmLock Problems + 1. Allowing only one in -inroot. Need a way to kill it. + 2. XLock resources need to be read and used to set initial values. + 3. Integer and floating point and string input. + */ + +#include +#include +#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#else +#define HAVE_UNISTD_H 1 +#endif /* HAVE_CONFIG_H */ +#if HAVE_UNISTD_H +#include +#endif + +#include +#include + +#ifdef VMS +#include +#include +#endif + +/* #include Does not work on my version of Lesstif */ +#include +#include +#include +#include +#include +#include +#include + +#if USE_XMU +#include +#endif + +#include "bitmaps/m-xlock.xbm" /* icon bitmap */ + +/* like an enum */ +#define LAUNCH 0 +#define ROOT 1 +#define WINDOW 2 +#define EXIT 3 + +/* number of buttons, toggles, and string options */ +#define PUSHBUTTONS 4 +#define TOGGLES 9 +#define OPTIONS 8 + +#define XLOCK "xlock" +#define WINDOW_WIDTH 160 +#define WINDOW_HEIGHT 100 +#define WINDOW_GEOMETRY "160x100" + +/* extern variable */ +extern char *c_Options[OPTIONS]; +extern Widget Menuoption; + +static pid_t numberprocess = -1; /* PID of xlock */ + +extern void Setup_Option(Widget MenuBar); + +/* Widget */ +Widget toplevel; +static Widget Labelxlock; + +static Widget ScrolledListModes, PushButtons[PUSHBUTTONS], Toggles[TOGGLES]; + + /*Resource string */ +#include "modes.h" + +/* some resources of buttons and toggles not really good programming :( */ + +static char *r_PushButtons[PUSHBUTTONS] = +{ + "Launch", + "In Root", + "In Window", + "Exit" +}; + +static char *r_Toggles[TOGGLES] = +{ + "mono", + "nolock", + "remote", + "allowroot", + "enablesaver", + "allowaccess", + "grabmouse", + "echokeys", + "usefirst" +}; + +char *r_Options[OPTIONS] = +{ + "username", + "password", + "info", + "validate", + "invalid", + "geometry", + "font", + "program" +}; + +static int numberinlist = 0; + +/* CallBack */ +static void +f_PushButtons(Widget w, XtPointer client_data, XtPointer call_data) +{ + int i, n; + char command[500]; + +#ifdef VMS + int mask = 17; + struct dsc$descriptor_d vms_image; + +#endif + + (void) sprintf(command, "%s ", XLOCK); + +/* booleans (+/-) options */ + + for (i = 0; i < TOGGLES; i++) { + if (XmToggleButtonGetState(Toggles[i])) { + (void) strcat(command, "-"); + (void) strcat(command, r_Toggles[i]); + (void) strcat(command, " "); + } + } + for (i = 0; i < OPTIONS; i++) + if (c_Options[i] != NULL) { + (void) strcat(command, "-"); + (void) strcat(command, r_Options[i]); + (void) strcat(command, " "); + (void) strcat(command, c_Options[i]); + (void) strcat(command, " "); + } + switch ((int) client_data) { + case LAUNCH: + /* the default value then nothing to do */ + break; + case WINDOW: + (void) strcat(command, "-inwindow "); + break; + case ROOT: + (void) strcat(command, "-inroot "); + break; + case EXIT: + if (numberprocess != -1) { + (void) kill(numberprocess, SIGKILL); + (void) wait(&n); + } + exit(0); + break; + } + (void) strcat(command, "-mode "); + (void) strcat(command, LockProcs[numberinlist].cmdline_arg); +#ifdef VMS + vms_image.dsc$w_length = strlen(command); + vms_image.dsc$a_pointer = command; + vms_image.dsc$b_class = DSC$K_CLASS_S; + vms_image.dsc$b_dtype = DSC$K_DTYPE_T; + (void) printf("%s\n", command); + (void) lib$spawn(&vms_image, 0, 0, &mask); +#else + (void) strcat(command, " & "); + (void) printf("%s\n", command); + (void) system(command); +#endif +} + +static void +f_ScrolledListModes(Widget w, XtPointer client_data, XtPointer call_data) +{ + char numberwidget[50]; + char str[50]; + int n; + + numberinlist = ((XmListCallbackStruct *) call_data)->item_position - 1; + (void) sprintf(numberwidget, "%ld", XtWindow(Labelxlock)); + (void) sprintf(str, "%s", LockProcs[numberinlist].cmdline_arg); + if (numberprocess != -1) { + (void) kill(numberprocess, SIGKILL); + (void) wait(&n); + } +#ifdef VMS +#define FORK vfork +#else +#define FORK fork +#endif + if ((numberprocess = FORK()) == -1) + (void) fprintf(stderr, "Fork error\n"); + else if (numberprocess == 0) { + (void) execlp(XLOCK, XLOCK, "-parent", numberwidget, + "-mode", str, "-geometry", WINDOW_GEOMETRY, "-delay", "100000", + "-nolock", "-inwindow", "+install", 0); + } +} + +/* Setup Widget */ +static void +Setup_Widget(Widget father) +{ + Arg args[15]; + int i, ac = 0; + Widget Row, PushButtonRow, TogglesRow, ModeLabel, SwitchLabel; + char string[160]; + XmString label_str; + +#define NUMPROCS 100 /* Greater than or equal to numprocs */ + XmString TabXmStr[NUMPROCS]; + + ac = 0; + XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNheight, WINDOW_HEIGHT); + ac++; + SwitchLabel = XmCreateLabel(father, "Switches", args, ac); + XtManageChild(SwitchLabel); + ac = 0; + XtSetArg(args[ac], XmNheight, WINDOW_HEIGHT); + ac++; + XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM); + ac++; + ModeLabel = XmCreateLabel(father, "Modes", args, ac); + XtManageChild(ModeLabel); + ac = 0; + XtSetArg(args[ac], XmNwidth, WINDOW_WIDTH); + ac++; + XtSetArg(args[ac], XmNheight, WINDOW_HEIGHT); + ac++; + XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNleftAttachment, XmATTACH_WIDGET); + ac++; + XtSetArg(args[ac], XmNleftWidget, ModeLabel); + ac++; + Labelxlock = XmCreateLabel(father, "Window", args, ac); + XtManageChild(Labelxlock); + +/* buttons in the bottom */ + ac = 0; + XtSetArg(args[ac], XmNorientation, XmHORIZONTAL); + ac++; + XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM); + ac++; + PushButtonRow = XmCreateRowColumn(father, "PushButtonRow", args, ac); + + Menuoption = XmCreateMenuBar(PushButtonRow, "MenuBar", NULL, 0); + XtManageChild(Menuoption); + + for (i = 0; i < PUSHBUTTONS; i++) { + ac = 0; + label_str = XmStringCreate(r_PushButtons[i], XmSTRING_DEFAULT_CHARSET); + XtSetArg(args[ac], XmNlabelString, label_str); + ac++; + PushButtons[i] = XmCreatePushButton(PushButtonRow, r_PushButtons[i], + args, ac); + XmStringFree(label_str); + XtAddCallback(PushButtons[i], XmNactivateCallback, f_PushButtons, + (XtPointer) i); + XtManageChild(PushButtons[i]); + } + XtManageChild(PushButtonRow); + +/* list and toggles in row like that (row(list)(TogglesRow(toggles...))) */ + ac = 0; + XtSetArg(args[ac], XmNtopAttachment, XmATTACH_WIDGET); + ac++; + XtSetArg(args[ac], XmNtopWidget, Labelxlock); + ac++; + XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM); + ac++; + XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_WIDGET); + ac++; + XtSetArg(args[ac], XmNbottomWidget, PushButtonRow); + ac++; + XtSetArg(args[ac], XmNorientation, XmHORIZONTAL); + ac++; + Row = XmCreateRowColumn(father, "Row", args, ac); + + if (numprocs > NUMPROCS) { + (void) printf("NUMPROCS too small should be at least %d\n", numprocs); + } + for (i = 0; i < numprocs; i++) { + (void) sprintf(string, "%-14s%s", LockProcs[i].cmdline_arg, + LockProcs[i].desc); + TabXmStr[i] = XmStringCreate(string, XmSTRING_DEFAULT_CHARSET); + } + ac = 0; + XtSetArg(args[ac], XmNitems, TabXmStr); + ac++; + XtSetArg(args[ac], XmNitemCount, numprocs); + ac++; + XtSetArg(args[ac], XmNvisibleItemCount, 10); + ac++; + ScrolledListModes = XmCreateScrolledList(Row, "ScrolledListModes", + args, ac); + XtAddCallback(ScrolledListModes, XmNbrowseSelectionCallback, + f_ScrolledListModes, NULL); + XtManageChild(ScrolledListModes); + + TogglesRow = XmCreateRowColumn(Row, "TogglesRow", NULL, 0); + for (i = 0; i < TOGGLES; i++) { + ac = 0; + label_str = XmStringCreate(r_Toggles[i], XmSTRING_DEFAULT_CHARSET); + XtSetArg(args[ac], XmNlabelString, label_str); + ac++; + Toggles[i] = XmCreateToggleButton(TogglesRow, r_Toggles[i], args, ac); + XmStringFree(label_str); + XtManageChild(Toggles[i]); + } + XtManageChild(TogglesRow); + + XtManageChild(Row); + for (i = 0; i < numprocs; i++) { + XmStringFree(TabXmStr[i]); + } +} + +int +main(int argc, char **argv) +{ + Widget form; + Arg args[15]; + +/* PURIFY 4.0.1 on Solaris 2 reports an unitialized memory read on the next + line. */ + toplevel = XtInitialize(argv[0], "XmLock", NULL, 0, &argc, argv); + XtSetArg(args[0], XtNiconPixmap, + XCreateBitmapFromData(XtDisplay(toplevel), + RootWindowOfScreen(XtScreen(toplevel)), + (char *) image_bits, image_width, image_height)); + XtSetValues(toplevel, args, 1); + /* creation Widget */ +/* PURIFY 4.0.1 on Solaris 2 reports an unitialized memory read on the next + line. */ + form = XmCreateForm(toplevel, "Form", NULL, 0); + Setup_Widget(form); + Setup_Option(Menuoption); + XtManageChild(form); + XtRealizeWidget(toplevel); +#if USE_XMU + XtAddEventHandler(toplevel, (EventMask) 0, TRUE, + (XtEventHandler) _XEditResCheckMessages, NULL); +/* With this handler you can use editres */ +#endif + XtMainLoop(); +#ifdef VMS + return 1; +#else + return 0; +#endif +} diff --git a/xscreensaver/Makefile.in b/xscreensaver/Makefile.in new file mode 100644 index 00000000..e8d1edb5 --- /dev/null +++ b/xscreensaver/Makefile.in @@ -0,0 +1,76 @@ +# 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 xlockmore/xlock xlockmore/modes hacks hacks/glx +TARFILES = README README.VMS README.debugging INSTALL xscreensaver.lsm \ + configure configure.in Makefile.in config.h.in \ + config.h-vms install-sh setup.com config.guess \ + config.sub makevms.com screenblank.txt \ + xscreensaver.lsm.sh +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 config.h Makefile config.status config.cache config.log *~ "#"* + @$(MAKE_SUBDIR) + +dist: tar + +# This really makes me sick... +tar: + @$(MAKE) distdepend ; \ + sh config.status ; \ + sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \ + mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \ + 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/xscreensaver/README b/xscreensaver/README new file mode 100644 index 00000000..973d202a --- /dev/null +++ b/xscreensaver/README @@ -0,0 +1,47 @@ +This is for getting xlockmore modes running in xscreensaver-2.17. +xlockmore-modes will install first ... +So during an installation these executables will be overwritten +if there is a conflict with the xscreensavers modes. + +See docs/TODO for current problems. + +0. OK say you have xscreensaver-2.17/ . Drop xlockmore in that directory + change the name of xlockmore to "xlockmore". + (This is not 100% tested so it would be wise to read it first!) + + cd xscreensaver-2.17/xlockmore/xscreensaver + +1. Makefile.in replaces ../../Makefile.in + configure.in replaces ../../configure.in + need autoconf to replace configure... (pick it from your favorite gnu site) + + mv ../../configure.in ../../configure.in.orig + mv ../../Makefile.in ../../Makefile.in.orig + cp ./configure.in ../../configure.in + cp ./Makefile.in ../../Makefile.in + cd ../.. + autoconf + cd xlockmore/xscreensaver + +2. modes/glx directory goes in xscreensaver/hacks/glx with the old + Makefile.in (do not write over this file!) and xlock-gl.c + + mv ../../hacks/glx ../../hacks/glx.orig + cp -R ../modes/glx ../../hacks/glx + cp ../../hacks/glx.orig/Makefile.in ../../hacks/glx/ + cp ../../hacks/glx.orig/xlock-gl.c ../../hacks/glx/ + + +3. change Makefiles... make backups + + cp ../xlock/Makefile.in ../xlock/Makefile.inxl + cp ../modes/Makefile.in ../modes/Makefile.inxl + cp ../xlock/Makefile.inxs ../xlock/Makefile.in + cp ../modes/Makefile.inxs ../modes/Makefile.in + + +4. Then its all ready... + + cd ../.. + configure + make diff --git a/xscreensaver/configure.in b/xscreensaver/configure.in new file mode 100644 index 00000000..94363604 --- /dev/null +++ b/xscreensaver/configure.in @@ -0,0 +1,1403 @@ +# 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_SIZE_T +AC_TYPE_SIGNAL + +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_FUNCS(sigaction) + +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" + if test \! -z "$x_libraries" ; then + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + AC_CHECK_LIB([$1], [$2], [$3], [$4], [$5]) + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS"]) + +# Like AC_TRY_RUN, but it uses the already-computed -I directories. +# (But not the -L directories!) +# +AC_DEFUN(AC_TRY_X_RUN, [ + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + AC_TRY_RUN([$1], [$2], [$3], [$4]) + CPPFLAGS="$ac_save_CPPFLAGS"]) + + + + + +# 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/X11R6/include ; then + X_CFLAGS="-I/usr/X11R6/include $X_CFLAGS" + X_LIBS="-L/usr/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" + elif test -d /usr/X11R5/include ; then + X_CFLAGS="-I/usr/X11R5/include $X_CFLAGS" + X_LIBS="-L/usr/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?) + # cthomp says "answer: CDE (Common Disorganized Environment)" + 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 the XSHM server extension header. +# +have_xshm=no +with_xshm_req=unspecified +AC_ARG_WITH(xshm-ext, +[ --with-xshm-ext Include support for the XSHM (Shared Memory) server + extension, if possible (this is the default). + --without-xshm-ext Do not compile in support for this extension.], + [with_xshm="$withval"; with_xshm_req="$withval"],[with_xshm=yes]) +if test $with_xshm = yes; then + + # first check for Xshm.h. + AC_CHECK_X_HEADER(X11/extensions/XShm.h, [have_xshm=yes]) + + # if that succeeded, then check for sys/ipc.h. + if test $have_xshm = yes; then + have_xshm=no + AC_CHECK_X_HEADER(sys/ipc.h, [have_xshm=yes]) + fi + + # if that succeeded, then check for sys/shm.h. + if test $have_xshm = yes; then + have_xshm=no + AC_CHECK_X_HEADER(sys/shm.h, [have_xshm=yes]) + fi + + # if that succeeded, then we've really got it. + if test $have_xshm = yes; then + AC_DEFINE(HAVE_XSHM_EXTENSION) + fi + +elif test $with_xshm != no; then + echo "error: must be yes or no: --with-xshm-ext=$with_xshm" + exit 1 +fi + + +# Check for the SGI-VIDEO-CONTROL server extension header. +# +have_sgivc=no +with_sgivc_req=unspecified +AC_ARG_WITH(sgivc-ext, +[ --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL server + extension, if possible (this is the default). + --without-sgivc-ext Do not compile in support for this extension.], + [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes]) +if test $with_sgivc = yes; then + + # first check for XSGIvc.h + AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes]) + + # if that succeeded, then check for the -lXsgivc + if test $have_sgivc = yes; then + have_sgivc=no + AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap, + [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [], + -lXext -lX11) + fi + + # if that succeeded, then we've really got it. + if test $have_sgivc = yes; then + AC_DEFINE(HAVE_SGI_VC_EXTENSION) + fi + +elif test $with_sgivc != no; then + echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc" + exit 1 +fi + + + + + + + + +# Check for Motif and Athena --with and --without arguments. +# +have_motif=no +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. + +proselytize_motif=yes +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 + proselytize_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 test $have_motif = yes; then + proselytize_motif=no +fi + +# If we have Athena, check whether it's a version that includes +# XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.) +if test $have_athena = yes ; then + 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. +# +have_lesstif=no +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 + +# don't cache this +unset ac_cv_good_lesstif + +good_lesstif=no +if test $have_lesstif = yes ; then + # It must be at least "GNU Lesstif 0.82". + # #### If you change this, also sync the warning message lower down. + AC_CACHE_CHECK([whether LessTif is of a recent enough vintage], + ac_cv_good_lesstif, + [AC_TRY_X_RUN([#include + int main() { exit(LesstifVersion < 82); }], + [ac_cv_good_lesstif=yes], + [ac_cv_good_lesstif=no], + # cross compiling? Make an ass out of umption. + [ac_cv_good_lesstif=yes])]) + good_lesstif=$ac_cv_good_lesstif +fi + + +# check for XPM header. +# +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 + + +# check for SGI's Iris Video Library header. +# +have_sgivideo=no +with_sgivideo_req=unspecified +AC_ARG_WITH(sgivideo, +[ --with-sgivideo Include support for SGI's Iris Video Library + if possible (this is the default). + --without-sgivideo Do not compile in support for this library.], + [with_sgivideo="$withval"; with_sgivideo_req="$withval"], + [with_sgivideo=yes]) +if test $with_sgivideo = yes; then + AC_CHECK_X_HEADER(dmedia/vl.h, have_sgivideo=yes) + if test $have_sgivideo = yes; then + have_sgivideo=no + AC_CHECK_LIB(vl, vlOpenVideo, have_sgivideo=yes) + if test $have_sgivideo = yes; then + SGI_VIDEO_OBJS="$(UTILS_BIN)/sgivideo.o" + SGI_VIDEO_LIBS="-lvl" + AC_DEFINE(HAVE_SGI_VIDEO) + fi + fi +elif test $with_sgivideo != no; then + echo "error: must be yes or no: --with-sgivideo=$with_sgivideo" + exit 1 +fi + + + +# Try to find a program to generate random text. +# +# 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_req="" +AC_ARG_WITH(zippy, +[ --with-zippy=PROGRAM Some demos are able to run an external program and + display its text; this names the program to use by + 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_req="$withval"; with_zippy="$withval" ], + [ with_zippy_req="$withval"; with_zippy="$withval" ]) + +if test "$with_zippy" = no || test "$with_zippy" = yes ; then + with_zippy="" + with_zippy_req="" +fi + +if test -n "$with_zippy_req" ; then + ac_cv_zippy_program="" + case "$with_zippy_req" in + /*) + AC_MSG_CHECKING([for $with_zippy_req]) + if test -x "$with_zippy_req" ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + with_zippy="" + fi + ;; + *) + # don't cache + unset ac_cv_path_zip2 + AC_PATH_PROG(zip2, $with_zippy_req, []) + if test "$zip2" = ""; then + with_zippy="" + fi + ;; + esac + ac_cv_zippy_program="$with_zippy" + +elif test -n "$ac_cv_zippy_program"; then + AC_MSG_RESULT([checking for zippy... (cached) $ac_cv_zippy_program]) +fi + +if test ! -n "$ac_cv_zippy_program"; then + + 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* | *-freebsd* | *-openbsd* ) + 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(SGI_VIDEO_OBJS) +AC_SUBST(SGI_VIDEO_LIBS) + +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=' #################################################################' +warnpre() { + if test $warning = no ; then + echo '' ; echo "$warnsep" ; echo '' + warning=yes + fi +} + +warn() { + warnpre + if test $warning = long ; then echo '' ; fi + warning=yes + echo " Warning: $@" +} + +warnL() { + was=$warning + warnpre + warning=yes + if test $was != no ; then echo '' ; fi + echo " Warning: $@" +} + +warn2() { + echo " $@" + warning=long +} + +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 $with_xshm_req = yes -a $have_xshm = no ; then + warn 'The XSHM extension was requested, but was not found.' +fi + +if test $with_sgivc_req = yes -a $have_sgivc = no ; then + warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.' +fi + +if test $have_motif = no -a $have_athena = no ; then + warnL "Neither Motif nor Athena widgets seem to be available;" + warn2 "one or the other is required." + proselytize_motif=no + +elif test $with_motif_req = yes -a $have_motif = no ; then + warnL "Use of Motif was requested, but it wasn't found;" + warn2 "Athena will be used instead." + +elif test $with_athena_req = yes -a $have_athena = no ; then + warnL "Use of Athena was requested, but it wasn't found;" + warn2 "Motif will be used instead." +fi + +if test $have_motif = yes -a $have_lesstif = yes ; then + if test $good_lesstif != yes ; then + warnL "Motif is being used, but it appears to actually be" + warn2 "LessTif, and the version number is less than 0.82!" + warn2 "Such old versions of LessTif are too buggy to use" + warn2 "with XScreenSaver; it is strongly recommended that" + warn2 "you upgrade! See ." + fi +fi + +if test $proselytize_motif = yes ; then + warnL "Athena widgets are being used instead of Motif." + warn2 "XScreenSaver looks much better with Motif, and has" + warn2 "a few extra features as well. Wouldn't you rather" + warn2 "be using Motif? It is shipped by every commercial" + warn2 "Unix vendor; and there is a free implementation" + warn2 "available as well: see ." +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_sgivideo_req = yes -a $have_sgivideo = no ; then + warn 'Use of the Iris Video Library was requested, but it was not found.' +fi + +if test $with_kerberos_req = yes -a $have_kerberos = no ; then + warn 'Use of Kerberos was requested, but it was not found.' +fi + +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 -n "$with_zippy_req"; then + if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then + warnL "$with_zippy_req was requested as the Zippy program," + warn2 "but was not found. The default will be used instead." + fi +fi + +if test $warning != no; then + echo '' ; echo "$warnsep" ; echo '' +fi + + +AC_OUTPUT(Makefile + utils/Makefile + driver/Makefile + xlockmore/xlock/Makefile + xlockmore/modes/Makefile + hacks/Makefile + hacks/glx/Makefile + driver/XScreenSaver.ad) -- 2.39.5