From df053bcb240bd8d82e3bebf48a9766a8728bca4b Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 2 Mar 2009 00:42:25 -0500 Subject: [PATCH 1/1] http://ftp.x.org/contrib/applications/xscreensaver-2.17.tar.gz -rw-r--r-- 1 zblaxell zblaxell 776081 Jun 1 1998 xscreensaver-2.17.tar.gz 4dbce419cb5bb0b8cde3b9471602295150604542 xscreensaver-2.17.tar.gz --- README | 15 +- configure | 541 +++-- configure.in | 17 + driver/XScreenSaver.ad.in | 14 +- driver/XScreenSaver_ad.h | 6 +- driver/demo.c | 26 +- driver/lock.c | 9 +- driver/stderr.c | 4 - driver/subprocs.c | 23 +- driver/timers.c | 24 +- driver/vms-getpwnam.c | 3 - driver/windows.c | 98 +- driver/xscreensaver.c | 12 +- driver/xscreensaver.h | 6 +- driver/xscreensaver.man | 216 +- hacks/Makefile.in | 125 +- hacks/compile_axp.com | 3 +- hacks/compile_decc.com | 3 +- hacks/flow.c | 431 ++++ hacks/glx/Makefile.in | 52 +- hacks/glx/atlantis.c | 383 +++ hacks/glx/atlantis.h | 105 + hacks/glx/buildlwo.c | 2 +- hacks/glx/cage.c | 14 +- hacks/glx/dolphin.c | 2065 +++++++++++++++++ hacks/glx/gears.c | 20 +- hacks/glx/moebius.c | 20 +- hacks/glx/morph3d.c | 16 +- hacks/glx/pipes.c | 34 +- hacks/glx/rubik.c | 12 +- hacks/glx/shark.c | 1399 +++++++++++ hacks/glx/sproingiewrap.c | 24 +- hacks/glx/stairs.c | 314 ++- hacks/glx/superquadrics.c | 12 +- hacks/glx/swim.c | 236 ++ hacks/glx/whale.c | 1892 +++++++++++++++ .../{puzzle/puzzle.xbm => jigsaw/jigsaw.xbm} | 6 +- .../jigsaw_a_e_f.xbm} | 10 +- .../jigsaw_a_e_h.xbm} | 10 +- .../puzzle_a_f.xbm => jigsaw/jigsaw_a_f.xbm} | 10 +- .../puzzle_a_h.xbm => jigsaw/jigsaw_a_h.xbm} | 10 +- .../jigsaw_a_n_f.xbm} | 10 +- .../jigsaw_a_n_h.xbm} | 10 +- .../jigsaw_a_ne_f.xbm} | 10 +- .../jigsaw_a_ne_h.xbm} | 10 +- .../jigsaw_a_nw_f.xbm} | 10 +- .../jigsaw_a_nw_h.xbm} | 10 +- .../jigsaw_a_s_f.xbm} | 10 +- .../jigsaw_a_s_h.xbm} | 10 +- .../jigsaw_a_se_f.xbm} | 10 +- .../jigsaw_a_se_h.xbm} | 10 +- .../jigsaw_a_sw_f.xbm} | 10 +- .../jigsaw_a_sw_h.xbm} | 10 +- .../jigsaw_a_w_f.xbm} | 10 +- .../jigsaw_a_w_h.xbm} | 10 +- .../jigsaw_b_e_f.xbm} | 10 +- .../jigsaw_b_e_h.xbm} | 10 +- .../puzzle_b_f.xbm => jigsaw/jigsaw_b_f.xbm} | 10 +- .../puzzle_b_h.xbm => jigsaw/jigsaw_b_h.xbm} | 10 +- .../jigsaw_b_n_f.xbm} | 10 +- .../jigsaw_b_n_h.xbm} | 10 +- .../jigsaw_b_ne_f.xbm} | 10 +- .../jigsaw_b_ne_h.xbm} | 10 +- .../jigsaw_b_nw_f.xbm} | 10 +- .../jigsaw_b_nw_h.xbm} | 10 +- .../jigsaw_b_s_f.xbm} | 10 +- .../jigsaw_b_s_h.xbm} | 10 +- .../jigsaw_b_se_f.xbm} | 10 +- .../jigsaw_b_se_h.xbm} | 10 +- .../jigsaw_b_sw_f.xbm} | 10 +- .../jigsaw_b_sw_h.xbm} | 10 +- .../jigsaw_b_w_f.xbm} | 10 +- .../jigsaw_b_w_h.xbm} | 10 +- hacks/{puzzle.c => jigsaw.c} | 98 +- hacks/{puzzle.man => jigsaw.man} | 10 +- hacks/rd-bomb.c | 1 - hacks/screenhack.c | 26 +- hacks/{xlock.h => xlock_23.h} | 0 hacks/xlockmore.h | 9 + hacks/xlyap.c | 8 + setup.com | 3 +- utils/resources.c | 22 +- utils/version.h | 2 +- xscreensaver.lsm | 8 +- 84 files changed, 7765 insertions(+), 964 deletions(-) create mode 100644 hacks/flow.c create mode 100644 hacks/glx/atlantis.c create mode 100644 hacks/glx/atlantis.h create mode 100644 hacks/glx/dolphin.c create mode 100644 hacks/glx/shark.c create mode 100644 hacks/glx/swim.c create mode 100644 hacks/glx/whale.c rename hacks/images/{puzzle/puzzle.xbm => jigsaw/jigsaw.xbm} (99%) rename hacks/images/{puzzle/puzzle_a_e_f.xbm => jigsaw/jigsaw_a_e_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_e_h.xbm => jigsaw/jigsaw_a_e_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_f.xbm => jigsaw/jigsaw_a_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_h.xbm => jigsaw/jigsaw_a_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_n_f.xbm => jigsaw/jigsaw_a_n_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_n_h.xbm => jigsaw/jigsaw_a_n_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_ne_f.xbm => jigsaw/jigsaw_a_ne_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_ne_h.xbm => jigsaw/jigsaw_a_ne_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_nw_f.xbm => jigsaw/jigsaw_a_nw_f.xbm} (96%) rename hacks/images/{puzzle/puzzle_a_nw_h.xbm => jigsaw/jigsaw_a_nw_h.xbm} (96%) rename hacks/images/{puzzle/puzzle_a_s_f.xbm => jigsaw/jigsaw_a_s_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_s_h.xbm => jigsaw/jigsaw_a_s_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_se_f.xbm => jigsaw/jigsaw_a_se_f.xbm} (96%) rename hacks/images/{puzzle/puzzle_a_se_h.xbm => jigsaw/jigsaw_a_se_h.xbm} (96%) rename hacks/images/{puzzle/puzzle_a_sw_f.xbm => jigsaw/jigsaw_a_sw_f.xbm} (96%) rename hacks/images/{puzzle/puzzle_a_sw_h.xbm => jigsaw/jigsaw_a_sw_h.xbm} (96%) rename hacks/images/{puzzle/puzzle_a_w_f.xbm => jigsaw/jigsaw_a_w_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_a_w_h.xbm => jigsaw/jigsaw_a_w_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_e_f.xbm => jigsaw/jigsaw_b_e_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_e_h.xbm => jigsaw/jigsaw_b_e_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_f.xbm => jigsaw/jigsaw_b_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_h.xbm => jigsaw/jigsaw_b_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_n_f.xbm => jigsaw/jigsaw_b_n_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_n_h.xbm => jigsaw/jigsaw_b_n_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_ne_f.xbm => jigsaw/jigsaw_b_ne_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_ne_h.xbm => jigsaw/jigsaw_b_ne_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_nw_f.xbm => jigsaw/jigsaw_b_nw_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_nw_h.xbm => jigsaw/jigsaw_b_nw_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_s_f.xbm => jigsaw/jigsaw_b_s_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_s_h.xbm => jigsaw/jigsaw_b_s_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_se_f.xbm => jigsaw/jigsaw_b_se_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_se_h.xbm => jigsaw/jigsaw_b_se_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_sw_f.xbm => jigsaw/jigsaw_b_sw_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_sw_h.xbm => jigsaw/jigsaw_b_sw_h.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_w_f.xbm => jigsaw/jigsaw_b_w_f.xbm} (97%) rename hacks/images/{puzzle/puzzle_b_w_h.xbm => jigsaw/jigsaw_b_w_h.xbm} (97%) rename hacks/{puzzle.c => jigsaw.c} (87%) rename hacks/{puzzle.man => jigsaw.man} (93%) rename hacks/{xlock.h => xlock_23.h} (100%) diff --git a/README b/README index 021b9f11..bc680976 100644 --- a/README +++ b/README @@ -73,7 +73,7 @@ window, which are pointed at by the screensaver's default resource settings. hypercube - 2d projection of a hypercube rotating on all four axes. slidescreen - Divides the screen into a grid and plays a 16-puzzle on it. decayscreen - A melting effect. - puzzle - Turns the screen into a jigsaw puzzle and shuffles it. + jigsaw - Turns the screen into a jigsaw puzzle and shuffles it. halo - Random circular patterns. pyro - Fireworks. Looks a lot like the version in xlock. hopalong - Fractals. I snarfed this code from xlock. @@ -122,6 +122,7 @@ window, which are pointed at by the screensaver's default resource settings. ant - A cellular automaton. xjack - Simulates a schizophrenic typist. xlyap - Calculates and displays Lyapunov exponents. + flow - More strange attractors. gears - Draws interlocking rotating gears (GLX only.) morph3d - Draws shiny shape-changing 3d forms (GLX only.) superquadrics - More shiny shape-changing 3d forms (GLX only.) @@ -131,6 +132,7 @@ window, which are pointed at by the screensaver's default resource settings. stairs - Draws Escher's infinite staircase (GLX only.) cage - Draws Escher's impossible cage (GLX only.) moebius - Draws Escher's Moebius Strip II (GLX only.) + atlantis - Draws swimming mammals (GLX only.) All of these will pop up their own window unless given that -root option. See their man pages for more details. @@ -163,13 +165,22 @@ http://people.netscape.com/jwz/xscreensaver/. -- Jamie Zawinski +Changes since 2.16: Added a -window-id argument to most hacks, so that they + can draw on arbitrary externally-provided windows. + Synched with xlockmore 4.11a01. + Added `flow' hack. + Added `atlantis' GL hack. + Renamed `puzzle' hack to `jigsaw', since xlock already + had a different mode called `puzzle'. + Made it self-configure properly when Motif 2.1.0 is + being used (requires -lXp now, sigh...) Changes since 2.15: Made `flag' able to do XPM images. New look for the xscreensaver logo (`xroger'). Fixed compilation error on Suns with adjunct passwords. Got multi-architecture builds working again. Some configure tweaks for building on HPUX and Solaris. Fixed bug in decayscreen. - Fixed typo i passwd.c. + Fixed typo in passwd.c. Made `cynosure' not die when colormap is full. Changes since 2.14: Added `cynosure' hack. Added `moire2' hack. diff --git a/configure b/configure index d5831435..a651f307 100755 --- a/configure +++ b/configure @@ -845,6 +845,10 @@ echo "configure:839: checking how to request ANSI compilation" >&5 echo "$ac_t""AIX: adding -qlanglvl=ansi -qhalt=e" 1>&6 CC="$CC -qlanglvl=ansi -qhalt=e" ;; + +# NOTE: for Digital, need to add -std1 to get ANSI, but I'm not sure +# yet what $host pattern we should be testing for... + *) echo "$ac_t""no idea" 1>&6 ;; @@ -853,16 +857,16 @@ fi echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6 -echo "configure:857: checking whether the compiler works on ANSI C" >&5 +echo "configure:861: checking whether the compiler works on ANSI C" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -891,7 +895,7 @@ esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:895: checking how to run the C preprocessor" >&5 +echo "configure:899: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -906,13 +910,13 @@ else # 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:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -923,13 +927,13 @@ else 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:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -962,7 +966,7 @@ echo "$ac_t""$CPP" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:966: checking for a BSD compatible install" >&5 +echo "configure:970: 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 @@ -1012,7 +1016,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1016: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1020: 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 @@ -1040,12 +1044,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1044: checking for working const" >&5 +echo "configure:1048: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1115,21 +1119,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1119: checking for inline" >&5 +echo "configure:1123: 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 +if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1156,12 +1160,12 @@ esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1160: checking for ANSI C header files" >&5 +echo "configure:1164: 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 @@ -1169,7 +1173,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1186,7 +1190,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1204,7 +1208,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1225,7 +1229,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1236,7 +1240,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1260,12 +1264,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1264: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1268: 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 @@ -1274,7 +1278,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1295,12 +1299,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1299: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1303: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1316,7 +1320,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1341,12 +1345,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1345: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1349: 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> @@ -1354,7 +1358,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1379,7 +1383,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1383: checking for opendir in -ldir" >&5 +echo "configure:1387: 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 @@ -1387,7 +1391,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1420,7 +1424,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1424: checking for opendir in -lx" >&5 +echo "configure:1428: 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 @@ -1428,7 +1432,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1463,12 +1467,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:1467: checking for mode_t" >&5 +echo "configure:1471: 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 @@ -1496,12 +1500,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1500: checking for pid_t" >&5 +echo "configure:1504: 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 @@ -1529,12 +1533,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1533: checking for size_t" >&5 +echo "configure:1537: 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 @@ -1562,12 +1566,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1566: checking return type of signal handlers" >&5 +echo "configure:1570: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1584,7 +1588,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1604,12 +1608,12 @@ EOF echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6 -echo "configure:1608: checking how to call gettimeofday" >&5 +echo "configure:1612: 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 @@ -1617,7 +1621,7 @@ int main() { struct timeval tv; gettimeofday(&tv); ; return 0; } EOF -if { (eval echo configure:1621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_gettimeofday_args=1 else @@ -1625,7 +1629,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < #include @@ -1634,7 +1638,7 @@ struct timeval tv; struct timezone tzp; gettimeofday(&tv, &tzp); ; return 0; } EOF -if { (eval echo configure:1638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_gettimeofday_args=2 else @@ -1674,12 +1678,12 @@ fi for ac_func in select fcntl uname nice setpriority getcwd getwd putenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1678: checking for $ac_func" >&5 +echo "configure:1682: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1729,12 +1733,12 @@ done for ac_func in sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1733: checking for $ac_func" >&5 +echo "configure:1737: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1786,17 +1790,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1790: checking for $ac_hdr" >&5 +echo "configure:1794: 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:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1848,7 +1852,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1852: checking for X" >&5 +echo "configure:1856: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1910,12 +1914,12 @@ if test "$ac_x_includes" = NO; then # 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:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1984,14 +1988,14 @@ if test "$ac_x_libraries" = NO; then 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 +if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2097,17 +2101,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2101: checking whether -R must be followed by a space" >&5 +echo "configure:2105: 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 +if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -2123,14 +2127,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -2162,7 +2166,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2166: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2170: 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 @@ -2170,7 +2174,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2203,7 +2207,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2207: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2211: 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 @@ -2211,7 +2215,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2251,12 +2255,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2255: checking for gethostbyname" >&5 +echo "configure:2259: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2300,7 +2304,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2304: checking for gethostbyname in -lnsl" >&5 +echo "configure:2308: 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 @@ -2308,7 +2312,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2349,12 +2353,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2353: checking for connect" >&5 +echo "configure:2357: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2398,7 +2402,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2402: checking for connect in -lsocket" >&5 +echo "configure:2406: 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 @@ -2406,7 +2410,7 @@ 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 +if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2441,12 +2445,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2445: checking for remove" >&5 +echo "configure:2449: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2490,7 +2494,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2494: checking for remove in -lposix" >&5 +echo "configure:2498: 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 @@ -2498,7 +2502,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2533,12 +2537,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2537: checking for shmat" >&5 +echo "configure:2541: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2582,7 +2586,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2586: checking for shmat in -lipc" >&5 +echo "configure:2590: 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 @@ -2590,7 +2594,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2634,7 +2638,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2638: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2642: 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 @@ -2642,7 +2646,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2690,7 +2694,7 @@ fi echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6 -echo "configure:2694: checking for X app-defaults directory" >&5 +echo "configure:2698: 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 @@ -2817,7 +2821,7 @@ APPDEFAULTS=$ac_x_app_defaults fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < EOF @@ -2838,7 +2842,7 @@ rm -f conftest* # Check for the availability of the XPointer typedef, and define it otherwise. # echo $ac_n "checking for XPointer""... $ac_c" 1>&6 -echo "configure:2842: checking for XPointer" >&5 +echo "configure:2846: checking for XPointer" >&5 if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2849,14 +2853,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { XPointer foo = (XPointer) 0; ; return 0; } EOF -if { (eval echo configure:2860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_xpointer=yes else @@ -2893,22 +2897,29 @@ case "$host" in 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? echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6 -echo "configure:2912: checking for regcmp in -lgen" >&5 +echo "configure:2923: checking for regcmp in -lgen" >&5 ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2916,7 +2927,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2964,17 +2975,17 @@ have_xmu=no CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6 -echo "configure:2968: checking for X11/Xmu/Error.h" >&5 +echo "configure:2979: checking for X11/Xmu/Error.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3018,7 +3029,7 @@ if test $have_xmu = yes ; then case "$host" in *-sunos4*) echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6 -echo "configure:3022: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5 +echo "configure:3033: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5 if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3031,14 +3042,14 @@ else # with X libraries because we know it's SunOS. LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_sunos_xmu_bug=no else @@ -3054,21 +3065,21 @@ fi echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6 if test $ac_cv_sunos_xmu_bug = yes ; then echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6 -echo "configure:3058: checking whether the compiler understands -static" >&5 +echo "configure:3069: checking whether the compiler understands -static" >&5 if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -static" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_ld_static=yes else @@ -3114,17 +3125,17 @@ if test $with_sgi = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6 -echo "configure:3118: checking for X11/extensions/XScreenSaver.h" >&5 +echo "configure:3129: checking for X11/extensions/XScreenSaver.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3179,17 +3190,17 @@ if test $have_sgi != yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6 -echo "configure:3183: checking for X11/extensions/scrnsaver.h" >&5 +echo "configure:3194: checking for X11/extensions/scrnsaver.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3233,7 +3244,7 @@ fi LDFLAGS="$LDFLAGS -L$x_libraries" fi echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6 -echo "configure:3237: checking for XScreenSaverRegister in -lXext" >&5 +echo "configure:3248: checking for XScreenSaverRegister in -lXext" >&5 ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3241,7 +3252,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3303,7 +3314,7 @@ fi LDFLAGS="$LDFLAGS -L$x_libraries" fi echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6 -echo "configure:3307: checking for XScreenSaverRegister in -lXExExt" >&5 +echo "configure:3318: checking for XScreenSaverRegister in -lXExExt" >&5 ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3311,7 +3322,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXExExt -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3368,7 +3379,7 @@ fi LDFLAGS="$LDFLAGS -L$x_libraries" fi echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6 -echo "configure:3372: checking for XScreenSaverRegister in -lXss" >&5 +echo "configure:3383: checking for XScreenSaverRegister in -lXss" >&5 ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3376,7 +3387,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXss -lX11 -lXext -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3448,17 +3459,17 @@ if test $with_xidle = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6 -echo "configure:3452: checking for X11/extensions/xidle.h" >&5 +echo "configure:3463: checking for X11/extensions/xidle.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3513,17 +3524,17 @@ if test $with_xshm = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6 -echo "configure:3517: checking for X11/extensions/XShm.h" >&5 +echo "configure:3528: checking for X11/extensions/XShm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3557,17 +3568,17 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:3561: checking for sys/ipc.h" >&5 +echo "configure:3572: checking for sys/ipc.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3602,17 +3613,17 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6 -echo "configure:3606: checking for sys/shm.h" >&5 +echo "configure:3617: checking for sys/shm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3673,17 +3684,17 @@ if test $with_sgivc = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6 -echo "configure:3677: checking for X11/extensions/XSGIvc.h" >&5 +echo "configure:3688: checking for X11/extensions/XSGIvc.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3726,7 +3737,7 @@ fi LDFLAGS="$LDFLAGS -L$x_libraries" fi echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6 -echo "configure:3730: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5 +echo "configure:3741: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5 ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3734,7 +3745,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXsgivc -lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3848,17 +3859,17 @@ check_motif() { CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:3852: checking for Xm/Xm.h" >&5 +echo "configure:3863: checking for Xm/Xm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3896,17 +3907,17 @@ check_athena() { CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6 -echo "configure:3900: checking for X11/Xaw/Dialog.h" >&5 +echo "configure:3911: checking for X11/Xaw/Dialog.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3981,7 +3992,7 @@ fi # XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.) if test $have_athena = yes ; then echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6 -echo "configure:3985: checking for XawViewportSetCoordinates in Viewport.h" >&5 +echo "configure:3996: checking for XawViewportSetCoordinates in Viewport.h" >&5 if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3993,7 +4004,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < EOF @@ -4022,7 +4033,7 @@ fi have_lesstif=no if test $have_motif = yes ; then echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6 -echo "configure:4026: checking whether Motif is really LessTif" >&5 +echo "configure:4037: checking whether Motif is really LessTif" >&5 if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4033,14 +4044,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { long vers = LesstifVersion; ; return 0; } EOF -if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_lesstif=yes else @@ -4065,7 +4076,7 @@ if test $have_lesstif = yes ; then # It must be at least "GNU Lesstif 0.82". # #### If you change this, also sync the warning message lower down. echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6 -echo "configure:4069: checking whether LessTif is of a recent enough vintage" >&5 +echo "configure:4080: checking whether LessTif is of a recent enough vintage" >&5 if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4080,12 +4091,12 @@ else ac_cv_good_lesstif=yes else cat > conftest.$ac_ext < int main() { exit(LesstifVersion < 82); } EOF -if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_good_lesstif=yes else @@ -4105,6 +4116,74 @@ echo "$ac_t""$ac_cv_good_lesstif" 1>&6 fi +# Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing +# Extension". Why this extension isn't in -lXext with all the others, +# I have no idea. +# +have_xp_ext=no +if test $have_motif = yes ; then + have_xp_ext=no + + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + if test \! -z "$x_libraries" ; then + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6 +echo "configure:4144: checking for XpQueryExtension in -lXp" >&5 +ac_lib_var=`echo Xp'_'XpQueryExtension | 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="-lXp -lX11 -lXext -lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_xp_ext=yes; SAVER_LIBS="$SAVER_LIBS -lXp" +else + echo "$ac_t""no" 1>&6 +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" +fi + + # check for XPM header. # have_xpm=no @@ -4126,17 +4205,17 @@ if test $with_xpm = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6 -echo "configure:4130: checking for X11/xpm.h" >&5 +echo "configure:4209: checking for X11/xpm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4191,17 +4270,17 @@ if test $with_gl = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 -echo "configure:4195: checking for GL/gl.h" >&5 +echo "configure:4274: checking for GL/gl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4232,17 +4311,17 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6 -echo "configure:4236: checking for GL/glx.h" >&5 +echo "configure:4315: checking for GL/glx.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4282,7 +4361,7 @@ EOF fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < EOF @@ -4332,17 +4411,17 @@ if test $with_readdisplay = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6 -echo "configure:4336: checking for X11/extensions/readdisplay.h" >&5 +echo "configure:4415: checking for X11/extensions/readdisplay.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4394,17 +4473,17 @@ if test $with_sgivideo = yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6 -echo "configure:4398: checking for dmedia/vl.h" >&5 +echo "configure:4477: checking for dmedia/vl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4429,7 +4508,7 @@ fi if test $have_sgivideo = yes; then have_sgivideo=no echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6 -echo "configure:4433: checking for vlOpenVideo in -lvl" >&5 +echo "configure:4512: checking for vlOpenVideo in -lvl" >&5 ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4437,7 +4516,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lvl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4516,7 +4595,7 @@ if test -n "$with_zippy_req" ; then case "$with_zippy_req" in /*) echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6 -echo "configure:4520: checking for $with_zippy_req" >&5 +echo "configure:4599: checking for $with_zippy_req" >&5 if test -x "$with_zippy_req" ; then echo "$ac_t""yes" 1>&6 else @@ -4530,7 +4609,7 @@ echo "configure:4520: checking for $with_zippy_req" >&5 # Extract the first word of "$with_zippy_req", so it can be a program name with args. set dummy $with_zippy_req; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4534: checking for $ac_word" >&5 +echo "configure:4613: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4576,7 +4655,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4580: checking for $ac_word" >&5 +echo "configure:4659: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4609,7 +4688,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4613: checking for $ac_word" >&5 +echo "configure:4692: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4643,7 +4722,7 @@ done if test -n "$emacs_exe" ; then echo $ac_n "checking for emacs yow""... $ac_c" 1>&6 -echo "configure:4647: checking for emacs yow" >&5 +echo "configure:4726: checking for emacs yow" >&5 # # get emacs to tell us where the libexec directory is. # @@ -4665,7 +4744,7 @@ echo "configure:4647: checking for emacs yow" >&5 if test -z "$ac_cv_zippy_program" ; then echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6 -echo "configure:4669: checking for xemacs yow" >&5 +echo "configure:4748: checking for xemacs yow" >&5 if test -n "$xemacs_exe" ; then # # get xemacs to tell us where the libexec directory is. @@ -4711,7 +4790,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4715: checking for $ac_word" >&5 +echo "configure:4794: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4746,7 +4825,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4750: checking for $ac_word" >&5 +echo "configure:4829: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4825,7 +4904,7 @@ fi if test $with_kerberos = yes; then echo $ac_n "checking for Kerberos""... $ac_c" 1>&6 -echo "configure:4829: checking for Kerberos" >&5 +echo "configure:4908: checking for Kerberos" >&5 if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4836,14 +4915,14 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < int main() { ; return 0; } EOF -if { (eval echo configure:4847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_kerberos=yes else @@ -4893,7 +4972,7 @@ fi # if test $passwd_cruft_done = no ; then echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6 -echo "configure:4897: checking for Sun-style shadow passwords" >&5 +echo "configure:4976: checking for Sun-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4904,7 +4983,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -4917,7 +4996,7 @@ struct passwd_adjunct *p = getpwanam("nobody"); const char *pw = p->pwa_passwd; ; return 0; } EOF -if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sun_adjunct=yes else @@ -4946,7 +5025,7 @@ EOF # if test $passwd_cruft_done = no ; then echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6 -echo "configure:4950: checking for DEC-style shadow passwords" >&5 +echo "configure:5029: checking for DEC-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4957,7 +5036,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -4974,7 +5053,7 @@ struct pr_passwd *p; pw = p->ufld.fd_encrypt; ; return 0; } EOF -if { (eval echo configure:4978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_enhanced_passwd=yes else @@ -5000,7 +5079,7 @@ EOF # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx) # (I'm told it needs -lcurses too, but I don't understand why.) echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6 -echo "configure:5004: checking for getprpwnam in -lprot" >&5 +echo "configure:5083: checking for getprpwnam in -lprot" >&5 ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5008,7 +5087,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lprot -lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5039,7 +5118,7 @@ else echo "$ac_t""no" 1>&6 # On DEC, getprpwnam() is in -lsecurity echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:5043: checking for getprpwnam in -lsecurity" >&5 +echo "configure:5122: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5047,7 +5126,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5087,7 +5166,7 @@ fi # if test $passwd_cruft_done = no ; then echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6 -echo "configure:5091: checking for HP-style shadow passwords" >&5 +echo "configure:5170: checking for HP-style shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5098,7 +5177,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -5111,7 +5190,7 @@ struct s_passwd *p = getspwnam("nobody"); const char *pw = p->pw_passwd; ; return 0; } EOF -if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_hpux_passwd=yes else @@ -5136,7 +5215,7 @@ EOF # on HPUX, bigcrypt is in -lsec echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:5140: checking for bigcrypt in -lsec" >&5 +echo "configure:5219: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5144,7 +5223,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5182,7 +5261,7 @@ fi # if test $passwd_cruft_done = no ; then echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6 -echo "configure:5186: checking for generic shadow passwords" >&5 +echo "configure:5265: checking for generic shadow passwords" >&5 if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5193,7 +5272,7 @@ else fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" cat > conftest.$ac_ext < #include @@ -5205,7 +5284,7 @@ struct spwd *p = getspnam("nobody"); const char *pw = p->sp_pwdp; ; return 0; } EOF -if { (eval echo configure:5209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_shadow=yes else @@ -5231,7 +5310,7 @@ EOF # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc. have_getspnam=no echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6 -echo "configure:5235: checking for getspnam in -lc" >&5 +echo "configure:5314: checking for getspnam in -lc" >&5 ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5239,7 +5318,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5272,7 +5351,7 @@ fi if test $have_getspnam = no ; then echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:5276: checking for getspnam in -lgen" >&5 +echo "configure:5355: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5280,7 +5359,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5318,7 +5397,7 @@ fi # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc. have_crypt=no echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6 -echo "configure:5322: checking for crypt in -lc" >&5 +echo "configure:5401: checking for crypt in -lc" >&5 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5326,7 +5405,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5359,7 +5438,7 @@ fi if test $have_crypt = no ; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:5363: checking for crypt in -lcrypt" >&5 +echo "configure:5442: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5367,7 +5446,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index e614456e..7071caca 100644 --- a/configure.in +++ b/configure.in @@ -18,6 +18,10 @@ if test -z "$GCC"; then AC_MSG_RESULT(AIX: adding -qlanglvl=ansi -qhalt=e) CC="$CC -qlanglvl=ansi -qhalt=e" ;; + +# NOTE: for Digital, need to add -std1 to get ANSI, but I'm not sure +# yet what $host pattern we should be testing for... + *) AC_MSG_RESULT(no idea) ;; @@ -730,6 +734,19 @@ if test $have_lesstif = yes ; then fi +# Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing +# Extension". Why this extension isn't in -lXext with all the others, +# I have no idea. +# +have_xp_ext=no +if test $have_motif = yes ; then + have_xp_ext=no + AC_CHECK_X_LIB(Xp, XpQueryExtension, + [have_xp_ext=yes; SAVER_LIBS="$SAVER_LIBS -lXp"], + [], -lX11 -lXext -lm) +fi + + # check for XPM header. # have_xpm=no diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 72f79d4b..98d2e5d0 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,7 +4,7 @@ ! a screen saver and locker for the X window system ! by Jamie Zawinski ! -! version 2.16 +! version 2.17 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://people.netscape.com/jwz/xscreensaver/ @@ -79,7 +79,7 @@ imsmap -root \n\ slidescreen -root \n\ decayscreen -root \n\ - puzzle -root \n\ + jigsaw -root \n\ blitspin -root -grab \n\ slip -root \n\ hypercube -root \n\ @@ -127,6 +127,7 @@ xjack -root \n\ xlyap -root -random \n\ cynosure -root \n\ + flow -root \n\ \ mono: rocks -root \n\ color: rocks -root -fg darksalmon \n\ @@ -154,7 +155,8 @@ @GL_KLUDGE_2@ stairs -root \n\ @GL_KLUDGE_2@ pipes -root \n\ @GL_KLUDGE_2@ sproingies -root \n\ -@GL_KLUDGE_2@ rubik -root \n +@GL_KLUDGE_2@ rubik -root \n\ +@GL_KLUDGE_2@ atlantis -root \n ! A few of the hacks require OpenGL, and will only be built if you have it. @@ -232,7 +234,6 @@ ! ! xscreensaver-sgigl /usr/demos/bin/ep -S ! xscreensaver-sgigl /usr/demos/bin/bongo -! xscreensaver-sgigl /usr/demos/bin/atlantis ! ! On Irix 6.3, things have moved, so you need to do it like this: ! @@ -240,10 +241,7 @@ ! ! You can also use the "ant" demo, but first you need to wrap a shell script ! around it that cds to its home directory, so that it can find its files; -! and also pass it the -S argument, to prevent it from forking. The "atlantis" -! hack *almost* works; but since it doesn't have an option to prevent it from -! forking, xscreensaver is unable to kill it, so when you come in the next -! morning, you'll find dozens of "atlantis" processes still running. +! and also pass it the -S argument, to prevent it from forking. ! ! ! Also, since these actually end up mapping their own windows instead of diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index 41251ece..73028d5f 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -32,7 +32,7 @@ imsmap -root \\n\ slidescreen -root \\n\ decayscreen -root \\n\ - puzzle -root \\n\ + jigsaw -root \\n\ blitspin -root -grab \\n\ slip -root \\n\ hypercube -root \\n\ @@ -80,6 +80,7 @@ xjack -root \\n\ xlyap -root -random \\n\ cynosure -root \\n\ + flow -root \\n\ \ mono: rocks -root \\n\ color: rocks -root -fg darksalmon \\n\ @@ -107,7 +108,8 @@ stairs -root \\n\ pipes -root \\n\ sproingies -root \\n\ - rubik -root \\n", + rubik -root \\n\ + atlantis -root \\n", " ", "*fontList: *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1", "*demoDialog*label1.fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1", diff --git a/driver/demo.c b/driver/demo.c index b13622e1..0877ad4e 100644 --- a/driver/demo.c +++ b/driver/demo.c @@ -16,10 +16,10 @@ #include -#ifdef DEBUG -# include /* just to get debug info for gdb... */ -# include -#endif +/* We don't actually use any widget internals, but these are included + so that gdb will have debug info for the widgets... */ +#include +#include #ifdef HAVE_MOTIF # include @@ -492,13 +492,12 @@ pop_up_dialog_box (Widget dialog, Widget form, int where) XtSetArg (av [ac], XtNheight, &h); ac++; XtGetValues (form, av, ac); -#ifdef DEBUG + /* for debugging -- don't ask */ if (where >= 69) { where -= 69; sw = (sw * 7) / 12; } -#endif switch (where) { @@ -627,9 +626,8 @@ make_screenhack_dialog (saver_info *si) #endif /* HAVE_ATHENA */ pop_up_dialog_box(demo_dialog, demo_form, -#ifdef DEBUG + /* for debugging -- don't ask */ (si->prefs.debug_p ? 69 : 0) + -#endif 0); } @@ -744,21 +742,20 @@ res_done_cb (Widget button, XtPointer client_data, XtPointer call_data) p->unfade_p = res.unfade; p->lock_p = res.lock_p; -#ifdef DEBUG if (p->debug_p && p->verbose_p) fprintf (stderr, "%s: parameters changed:\n\ timeout: %d\n\tcycle: %d\n\tlock: %d\n\tpasswd: %d\n\ fade: %d\n\tfade: %d\n\tverbose: %d\n\tinstall: %d\n\ fade: %d\n\tunfade: %d\n\tlock: %d\n", progname, p->timeout, p->cycle, p->lock_timeout, -# ifdef NO_LOCKING +#ifdef NO_LOCKING 0, -# else +#else p->passwd_timeout, -# endif +#endif p->fade_seconds, p->fade_ticks, p->verbose_p, p->install_cmap_p, p->fade_p, p->unfade_p, p->lock_p); -#endif /* DEBUG */ + #if defined(HAVE_MIT_SAVER_EXTENSION) || defined(HAVE_SGI_SAVER_EXTENSION) if (p->use_mit_saver_extension || p->use_sgi_saver_extension) @@ -912,9 +909,8 @@ pop_resources_dialog (saver_info *si) set_toggle_button_state (lock_toggle, res.lock_p); pop_up_dialog_box (resources_dialog, resources_form, -#ifdef DEBUG + /* for debugging -- don't ask */ (si->prefs.debug_p ? 69 : 0) + -#endif 1); } diff --git a/driver/lock.c b/driver/lock.c index a79d2135..0d4c43e3 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -597,9 +597,8 @@ pop_passwd_dialog (saver_info *si) passwd_form, 2); #else pop_up_dialog_box (passwd_dialog, passwd_form, -#ifdef DEBUG + /* for debugging -- don't ask */ (si->prefs.debug_p ? 69 : 0) + -#endif 2); XtManageChild (passwd_form); #endif @@ -619,14 +618,12 @@ pop_passwd_dialog (saver_info *si) roger(roger_label, 0, 0); #endif /* HAVE_ATHENA */ -#ifdef DEBUG if (!si->prefs.debug_p) -#endif - XGrabServer (dpy); /* ############ DANGER! */ + XGrabServer (dpy); /* ############ DANGER! */ /* this call to ungrab used to be in main_loop() - see comment in xscreensaver.c around line 857. */ - ungrab_keyboard_and_mouse (si->dpy); + ungrab_keyboard_and_mouse (si); while (passwd_state == pw_read) { diff --git a/driver/stderr.c b/driver/stderr.c index d2d4cc7b..9e536585 100644 --- a/driver/stderr.c +++ b/driver/stderr.c @@ -55,11 +55,9 @@ reset_stderr (saver_screen_info *ssi) { saver_info *si = ssi->global; -#ifdef DEBUG if (si->prefs.debug_p) fprintf ((real_stderr ? real_stderr : stderr), "%s: resetting stderr\n", progname); -#endif ssi->stderr_text_x = 0; ssi->stderr_text_y = 0; @@ -211,12 +209,10 @@ make_stderr_overlay_window (saver_screen_info *ssi) XSetWindowAttributes attrs; unsigned long attrmask; -#ifdef DEBUG if (si->prefs.debug_p) fprintf(real_stderr, "%s: using overlay visual 0x%0x for stderr text layer.\n", progname, (int) XVisualIDFromVisual (visual)); -#endif /* DEBUG */ ssi->stderr_cmap = XCreateColormap(si->dpy, RootWindowOfScreen(ssi->screen), diff --git a/driver/subprocs.c b/driver/subprocs.c index 9070b81b..4126960b 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -301,8 +301,8 @@ struct screenhack_job { static struct screenhack_job *jobs = 0; -#ifdef DEBUG -static void +/* for debugging -- nothing calls this, but it's useful to invoke from gdb. */ +void show_job_list (void) { struct screenhack_job *job; @@ -317,7 +317,6 @@ show_job_list (void) job->name); fprintf (stderr, "\n"); } -#endif static void clean_job_list (void); @@ -533,11 +532,9 @@ sigchld_handler (int sig) { saver_info *si = global_si_kludge; /* I hate C so much... */ -#ifdef DEBUG if (si->prefs.debug_p) fprintf(stderr, "%s: got SIGCHLD%s\n", progname, (block_sigchld_handler ? " (blocked)" : "")); -#endif /* DEBUG */ if (block_sigchld_handler < 0) abort(); @@ -564,14 +561,16 @@ await_dying_children (saver_info *si) errno = 0; kid = waitpid (-1, &wait_status, WNOHANG|WUNTRACED); -#ifdef DEBUG + if (si->prefs.debug_p) - if (kid < 0 && errno) - fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname, - (long) kid, errno); - else - fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname, (long) kid); -#endif /* DEBUG */ + { + if (kid < 0 && errno) + fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname, + (long) kid, errno); + else + fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname, + (long) kid); + } /* 0 means no more children to reap. -1 means error -- except "interrupted system call" isn't a "real" diff --git a/driver/timers.c b/driver/timers.c index 92aa4b93..dcff2e4e 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -1,5 +1,6 @@ /* timers.c --- detecting when the user is idle, and other timer-related tasks. - * xscreensaver, Copyright (c) 1991-1997 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-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 @@ -200,7 +201,7 @@ cycle_timer (XtPointer closure, XtIntervalId *id) if (p->verbose_p) printf ("%s: starting cycle_timer (%ld, %ld)\n", progname, how_long, si->cycle_id); -#endif +#endif /* DEBUG_TIMERS */ } @@ -237,7 +238,8 @@ reset_timers (saver_info *si) if (p->verbose_p) printf ("%s: killing idle_timer (%ld, %ld)\n", progname, p->timeout, si->timer_id); -#endif +#endif /* DEBUG_TIMERS */ + XtRemoveTimeOut (si->timer_id); si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer, (XtPointer) si); @@ -247,7 +249,7 @@ reset_timers (saver_info *si) if (p->verbose_p) printf ("%s: restarting idle_timer (%ld, %ld)\n", progname, p->timeout, si->timer_id); -#endif +#endif /* DEBUG_TIMERS */ si->last_activity_time = time ((time_t *) 0); } @@ -301,7 +303,7 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id) else printf ("%s: pointer moved at %s on screen %d.\n", progname, timestring(), i); -#endif +#endif /* DEBUG_TIMERS */ si->last_activity_screen = ssi; ssi->poll_mouse_last_root_x = root_x; @@ -328,11 +330,12 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) /* Wake up periodically to ask the server if we are idle. */ si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer, (XtPointer) si); + #ifdef DEBUG_TIMERS if (p->verbose_p) printf ("%s: starting idle_timer (%ld, %ld)\n", progname, p->timeout, si->timer_id); -#endif +#endif /* DEBUG_TIMERS */ } if (!p->use_xidle_extension && @@ -438,7 +441,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) printf ("%s: KeyPress seen on 0x%X at %s\n", progname, (unsigned int) event.xkey.window, timestring ()); } -#endif +#endif /* DEBUG_TIMERS */ /* We got a user event */ if (!until_idle_p) @@ -597,11 +600,13 @@ watchdog_timer (XtPointer closure, XtIntervalId *id) if (si->screen_blanked_p) { Bool running_p = screenhack_running_p(si); + #ifdef DEBUG_TIMERS if (si->prefs.verbose_p) printf ("%s: watchdog timer raising %sscreen.\n", progname, (running_p ? "" : "and clearing ")); -#endif +#endif /* DEBUG_TIMERS */ + raise_window (si, True, True, running_p); } } @@ -628,6 +633,7 @@ reset_watchdog_timer (saver_info *si, Bool on_p) if (p->verbose_p) printf ("%s: restarting watchdog_timer (%ld, %ld)\n", progname, p->watchdog_timeout, si->watchdog_id); -#endif +#endif /* DEBUG_TIMERS */ + } } diff --git a/driver/vms-getpwnam.c b/driver/vms-getpwnam.c index 9408bb54..ec0650c9 100644 --- a/driver/vms-getpwnam.c +++ b/driver/vms-getpwnam.c @@ -78,9 +78,6 @@ char *name; istatus = sys$getuai (0, 0, &VMSNAME, &ItemList, 0, 0, 0); if (!(istatus & 1)) { -#ifdef DEBUG - lib$signal(istatus); -#endif /* DEBUG */ fprintf (stderr, "getpwnam: unable to retrieve passwd entry for %s\n", name); fprintf (stderr, "getpwnam: vms error number is 0x%x\n", istatus); diff --git a/driver/windows.c b/driver/windows.c index 7a938c5a..37702a10 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -80,33 +80,69 @@ static void store_activate_time (saver_info *si, Bool use_last_p); Button1MotionMask | Button2MotionMask | Button3MotionMask | \ Button4MotionMask | Button5MotionMask | ButtonMotionMask) -/* I don't really understand Sync vs Async, but these seem to work... */ -#define grab_kbd(dpy,win) \ - XGrabKeyboard ((dpy), (win), True, GrabModeSync, GrabModeAsync, CurrentTime) -#define grab_mouse(dpy,win,cursor) \ - XGrabPointer ((dpy), (win), True, ALL_POINTER_EVENTS, \ - GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime) + +static int +grab_kbd(saver_info *si, Window w) +{ + saver_preferences *p = &si->prefs; + int status = XGrabKeyboard (si->dpy, w, True, + /* I don't really understand Sync vs Async, + but these seem to work... */ + GrabModeSync, GrabModeAsync, + CurrentTime); + if (p->debug_p) + fprintf(real_stderr, "%s: XGrabKeyboard(... 0x%x ...) ==> %s\n", + progname, (unsigned long) w, + (status == GrabSuccess ? "GrabSuccess" : + status == AlreadyGrabbed ? "AlreadyGrabbed" : + status == GrabInvalidTime ? "GrabInvalidTime" : + status == GrabNotViewable ? "GrabNotViewable" : + status == GrabFrozen ? "GrabFrozen" : + "???")); + + return status; +} + +static int +grab_mouse (saver_info *si, Window w, Cursor cursor) +{ + saver_preferences *p = &si->prefs; + int status = XGrabPointer (si->dpy, w, True, ALL_POINTER_EVENTS, + GrabModeAsync, GrabModeAsync, None, + cursor, CurrentTime); + if (p->debug_p) + fprintf(real_stderr, "%s: XGrabPointer(... 0x%x, 0x%x ...) ==> %s\n", + progname, (unsigned long) w, (unsigned long) cursor, + (status == GrabSuccess ? "GrabSuccess" : + status == AlreadyGrabbed ? "AlreadyGrabbed" : + status == GrabInvalidTime ? "GrabInvalidTime" : + status == GrabNotViewable ? "GrabNotViewable" : + status == GrabFrozen ? "GrabFrozen" : + "???")); + return status; +} + void -grab_keyboard_and_mouse (Display *dpy, Window window, Cursor cursor) +grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor) { Status status; - XSync (dpy, False); + XSync (si->dpy, False); - status = grab_kbd (dpy, window); + status = grab_kbd (si, window); if (status != GrabSuccess) { /* try again in a second */ sleep (1); - status = grab_kbd (dpy, window); + status = grab_kbd (si, window); if (status != GrabSuccess) fprintf (stderr, "%s: couldn't grab keyboard! (%d)\n", progname, status); } - status = grab_mouse (dpy, window, cursor); + status = grab_mouse (si, window, cursor); if (status != GrabSuccess) { /* try again in a second */ sleep (1); - status = grab_mouse (dpy, window, cursor); + status = grab_mouse (si, window, cursor); if (status != GrabSuccess) fprintf (stderr, "%s: couldn't grab pointer! (%d)\n", progname, status); @@ -114,10 +150,15 @@ grab_keyboard_and_mouse (Display *dpy, Window window, Cursor cursor) } void -ungrab_keyboard_and_mouse (Display *dpy) +ungrab_keyboard_and_mouse (saver_info *si) { - XUngrabPointer (dpy, CurrentTime); - XUngrabKeyboard (dpy, CurrentTime); + saver_preferences *p = &si->prefs; + + XUngrabPointer (si->dpy, CurrentTime); + XUngrabKeyboard (si->dpy, CurrentTime); + + if (p->debug_p) + fprintf(real_stderr, "%s: XungrabPointer / XUngrabKeyboard\n", progname); } @@ -528,11 +569,12 @@ saver_exit (saver_info *si, int status) else if (status == 1) status = -1; #endif -#ifdef DEBUG if (si->prefs.debug_p) - /* Do this to drop a core file, so that we can get a stack trace. */ - abort(); -#endif + { + fprintf(real_stderr, "%s: dumping core (because of -debug)\n", progname); + /* Do this to drop a core file, so that we can get a stack trace. */ + abort(); + } exit (status); } @@ -624,9 +666,7 @@ initialize_screensaver_window_1 (saver_screen_info *ssi) attrs.backing_pixel = ssi->black_pixel; attrs.border_pixel = ssi->black_pixel; -#ifdef DEBUG if (p->debug_p) width = width / 2; -#endif /* DEBUG */ if (!p->verbose_p || printed_visual_info) ; @@ -839,7 +879,7 @@ raise_window (saver_info *si, /* grab and blacken mouse on the root window (saver not mapped yet) */ if (grabbed != GrabSuccess) - grabbed = grab_mouse (si->dpy, ssi->screensaver_window, + grabbed = grab_mouse (si, ssi->screensaver_window, (si->demo_mode_p ? 0 : ssi->cursor)); if (!dont_clear || ssi->stderr_overlay_window) @@ -913,7 +953,7 @@ blank_screen (saver_info *si) store_activate_time (si, si->screen_blanked_p); raise_window (si, False, False, False); /* #### */ - grab_keyboard_and_mouse (si->dpy, si->screens[0].screensaver_window, + grab_keyboard_and_mouse (si, si->screens[0].screensaver_window, (si->demo_mode_p ? 0 : si->screens[0].cursor)); #ifdef HAVE_XHPDISABLERESET if (si->locked_p && !hp_locked_p) @@ -953,19 +993,23 @@ unblank_screen (saver_info *si) if (p->verbose_p) fprintf (stderr, "%s: unfading... ", progname); + XSync (si->dpy, False); - XGrabServer (si->dpy); + XGrabServer (si->dpy); /* ############ DANGER! */ XSync (si->dpy, False); + for (i = 0; i < si->nscreens; i++) { saver_screen_info *ssi = &si->screens[i]; if (grabbed != GrabSuccess) - grabbed = grab_mouse (si->dpy, RootWindowOfScreen (ssi->screen), + grabbed = grab_mouse (si, RootWindowOfScreen (ssi->screen), 0); clear_stderr (ssi); } + XUngrabServer (si->dpy); - XSync (si->dpy, False); + XSync (si->dpy, False); /* ###### (danger over) */ + fade_screens (si->dpy, 0, current_windows, p->fade_seconds, p->fade_ticks, @@ -1025,7 +1069,7 @@ unblank_screen (saver_info *si) store_activate_time(si, False); /* store unblank time */ - ungrab_keyboard_and_mouse (si->dpy); + ungrab_keyboard_and_mouse (si); restore_real_vroot (si); #ifdef HAVE_XHPDISABLERESET diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c index d820d0ab..07633112 100644 --- a/driver/xscreensaver.c +++ b/driver/xscreensaver.c @@ -108,7 +108,7 @@ * window exposed. * - If you run your debugger under XEmacs, try M-ESC (x-grab-keyboard) * to keep your emacs window alive even when xscreensaver has grabbed. - * - Go read the code related to -DDEBUG. + * - Go read the code related to `debug_p'. * - You probably can't set breakpoints in functions that are called on * the other side of a call to fork() -- if your clients are dying * with signal 5, Trace/BPT Trap, you're losing in this way. @@ -482,14 +482,12 @@ get_resources (saver_info *si) get_screenhacks (si); -#ifdef DEBUG if (p->debug_p) { XSynchronize(si->dpy, True); p->verbose_p = True; p->initial_delay = 0; } -#endif /* DEBUG */ } @@ -547,10 +545,10 @@ initialize_connection (saver_info *si, int argc, char **argv) if (argc == 2 && !strcmp (argv[1], "-help")) do_help (si); -#ifdef DEBUG + else if (argc == 2 && !strcmp (argv[1], "-debug")) si->prefs.debug_p = True; /* no resource for this one, out of paranoia. */ -#endif /* DEBUG */ + else if (argc > 1) { fprintf (stderr, "%s: unknown option %s\n", progname, argv [1]); @@ -863,7 +861,7 @@ main_loop (saver_info *si) just after the server is grabbed, closing this window entirely. */ - /* ungrab_keyboard_and_mouse (); */ + /* ungrab_keyboard_and_mouse (si); */ { saver_screen_info *ssi = si->default_screen; @@ -881,7 +879,7 @@ main_loop (saver_info *si) /* I think this grab is now redundant, but it shouldn't hurt. */ if (!si->demo_mode_p) - grab_keyboard_and_mouse (si->dpy, ssi->screensaver_window, + grab_keyboard_and_mouse (si, ssi->screensaver_window, ssi->cursor); } diff --git a/driver/xscreensaver.h b/driver/xscreensaver.h index 2650215c..1082c460 100644 --- a/driver/xscreensaver.h +++ b/driver/xscreensaver.h @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1993-1997 Jamie Zawinski +/* xscreensaver, Copyright (c) 1993-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 @@ -268,8 +268,8 @@ extern void raise_window (saver_info *si, Bool dont_clear); extern void blank_screen (saver_info *si); extern void unblank_screen (saver_info *si); -extern void grab_keyboard_and_mouse (Display *, Window, Cursor); -extern void ungrab_keyboard_and_mouse (Display *dpy); +extern void grab_keyboard_and_mouse (saver_info *si, Window, Cursor); +extern void ungrab_keyboard_and_mouse (saver_info *si); /* ======================================================================= locking diff --git a/driver/xscreensaver.man b/driver/xscreensaver.man index bff441a5..54cc9ee4 100644 --- a/driver/xscreensaver.man +++ b/driver/xscreensaver.man @@ -1,4 +1,4 @@ -..de EX \"Begin example +.de EX \"Begin example .ne 5 .if n .sp 1 .if t .sp .5 @@ -35,12 +35,10 @@ don't need to recompile (or even re-run) this program to add a new display mode. .SH GETTING STARTED For the impatient, try this: - .EX xscreensaver & xscreensaver-command -demo .EE -.RS 0 After a few seconds, the screen should go black, and a dialog box should appear in the upper right corner. This is \fIDemo Mode\fP. .SH DEMO MODE @@ -180,9 +178,9 @@ as reported by the program; in this way you can have finer control over exactly which visual gets used, for example, to select a shallower one than would otherwise have been chosen. + .RE .RS 8 -.PP Note that this option specifies only the \fIdefault\fP visual that will be used: the visual used may be overridden on a program-by-program basis. See the description of the \fBprograms\fP resource, below. @@ -237,64 +235,64 @@ Don't use the \fBMIT\-SCREEN\-SAVER\fP server extension. \fIxscreensaver\fP understands the following resources: .PP .TP 8 -.B timeout \fR(class \fBTime\fP) +.B timeout\fP (class \fBTime\fP) Same as the \fI\-timeout\fP command-line option. Default 10 minutes. .TP 8 -.B cycle \fR(class \fBTime\fP) +.B cycle\fP (class \fBTime\fP) Same as the \fI\-cycle\fP command-line option. Default 10 minutes. .TP 8 -.B nice \fR(class \fBNice\fP) +.B nice\fP (class \fBNice\fP) Same as the \fI\-nice\fP command-line option. Default 10. .TP 8 -.B lock \fR(class \fBBoolean\fP) +.B lock\fP (class \fBBoolean\fP) Same as the \fI\-lock\fP command-line option. .TP 8 -.B lockTimeout \fR(class \fBTime\fP) +.B lockTimeout\fP (class \fBTime\fP) Same as the \fI\-lock\-timeout\fP command-line option. .TP 8 -.B passwdTimeout \fR(class \fBTime\fP) +.B passwdTimeout\fP (class \fBTime\fP) If the screen is locked, then this is how many seconds the password dialog box should be left on the screen before giving up (default 30.) This should not be too large: the X server is grabbed for the duration that the password dialog box is up (for security purposes) and leaving the server grabbed for too long can cause problems. .TP 8 -.B verbose \fR(class \fBBoolean\fP) +.B verbose\fP (class \fBBoolean\fP) Same as the \fI\-verbose\fP command-line option. .TP 8 -.B xidle \fR(class \fBBoolean\fP) +.B xidle\fP (class \fBBoolean\fP) Same as the \fI\-xidle\fP command-line option. .TP 8 -.B fade \fR(class \fBBoolean\fP) +.B fade\fP (class \fBBoolean\fP) If this is true, then when the screensaver activates, the current contents of the screen will fade to black instead of simply winking out. This only works on displays with writable colormaps, that is, if the screen's default visual is a PseudoColor visual. Default true. A fade will also be done when switching graphics hacks (when the \fIcycle\fP timer expires.) .TP 8 -.B unfade \fR(class \fBBoolean\fP) +.B unfade\fP (class \fBBoolean\fP) If this is true, then when the screensaver deactivates, the original contents of the screen will fade in from black instead of appearing immediately. This only works on displays with writable colormaps, and if \fIfade\fP is true as well. Default false. .TP 8 -.B fadeSeconds \fR(class \fBTime\fP) +.B fadeSeconds\fP (class \fBTime\fP) If \fIfade\fP is true, this is how long the fade will be in seconds (default 3.) .TP 8 -.B fadeTicks \fR(class \fBInteger\fP) +.B fadeTicks\fP (class \fBInteger\fP) If \fIfade\fP is true, this is how many times a second the colormap will be changed to effect a fade. Higher numbers yield smoother fades, but may make the fades take longer than the specified \fIfadeSeconds\fP if your server isn't fast enough to keep up. Default 20. .TP 8 -.B visualID \fR(class \fBVisualID\fP) +.B visualID\fP (class \fBVisualID\fP) Same as the \fI\-visual\fP command-line option. Default \fBdefault\fP. .TP 8 -.B installColormap \fR(class \fBBoolean\fP) +.B installColormap\fP (class \fBBoolean\fP) Same as the \fI\-install\fP command-line option. Default true. .TP 8 -.B captureStderr \fR(class \fBBoolean\fP) +.B captureStderr\fP (class \fBBoolean\fP) Whether \fIxscreensaver\fP should redirect its standard-error stream to the window itself. Since its nature is to take over the screen, you would not normally see error messages generated by the screensaver or the programs it @@ -302,23 +300,23 @@ runs; this resource will cause the output of all relevant programs to be drawn on the screensaver window itself instead of written to the controlling terminal of the screensaver driver process. Default true. .TP 8 -.B captureStdout \fR(class \fBBoolean\fP) +.B captureStdout\fP (class \fBBoolean\fP) Like \fBcaptureStderr\fP but for the standard-output stream. Default true. .TP 8 -.B font \fR(class \fBFont\fP) +.B font\fP (class \fBFont\fP) The font used for the stdout/stderr text, if \fBcaptureStdout\fP or \fBcaptureStderr\fP are true. Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP (a 14 point fixed-width font.) .TP 8 -.B textForeground \fR(class \fBForeground\fP) +.B textForeground\fP (class \fBForeground\fP) The foreground color used for the stdout/stderr text, if \fBcaptureStdout\fP or \fBcaptureStderr\fP are true. Default: Yellow. .TP 8 -.B textBackground \fR(class \fBBackground\fP) +.B textBackground\fP (class \fBBackground\fP) The background color used for the stdout/stderr text, if \fBcaptureStdout\fP or \fBcaptureStderr\fP are true. Default: Black. .TP 8 -.B programs \fR(class \fBPrograms\fP) +.B programs\fP (class \fBPrograms\fP) The graphics hacks which \fIxscreensaver\fP runs when the user is idle. The value of this resource is a string, one \fIsh\fP-syntax command per line. Each line must contain exactly one command -- no semicolons, no ampersands. @@ -336,6 +334,7 @@ for each screen. Note that you must escape the newlines; here is an example of how you might set this in your \fI.Xdefaults\fP file: +.RS 8 .EX xscreensaver.programs: \\ qix -root \\n\\ @@ -343,6 +342,7 @@ xscreensaver.programs: \\ xdaliclock -builtin2 -root \\n\\ xv -root -rmode 5 image.gif -quit \\n .EE +.RE .RS 8 Make sure your \fB$PATH\fP environment variable is set up correctly \fIbefore\fP xscreensaver is launched, or it won't be able to find the @@ -368,7 +368,7 @@ display, you can specify that like this: More generally, you can specify the kind of visual that should be used for the window on which the program will be drawing. For example, if one program works best if it has a colormap, but another works best if it has -a 24-bit visual, both can be accomidated: +a 24-bit visual, both can be accommodated: .EX PseudoColor: cmap-program -root \\n\\ @@ -383,7 +383,8 @@ a warning will be issued if they are used.) In addition to the symbolic visual names described above (in the section about the \fI\-visual\fP command-line option) one other visual name is supported in the \fIprograms\fP list: -.TP 8 +.RS 1 +.TP 4 .B default-n This is like \fBdefault\fP, but also requests the use of the default colormap, instead of a private colormap. (That is, it behaves as if @@ -391,7 +392,8 @@ the \fI\-no\-install\fP command-line option was specified, but only for this particular hack.) This is provided because some third-party programs that draw on the root window make assumptions about the visual and colormap of that window: assumptions which xscreensaver can violate. -.PP + +.RE If you specify a particular visual for a program, and that visual does not exist on the screen, then that program will not be chosen to run. This means that on displays with multiple screens of different depths, you can @@ -402,34 +404,35 @@ run on one, and hacks that only look good in color will show up on the other. .PP .PP Normally you won't need to change the following resources: +.PP .TP 8 -.B bourneShell \fR(class \fBBourneShell\fP) +.B bourneShell\fP (class \fBBourneShell\fP) The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses. This must be whatever your local variant of \fB/bin/sh\fP is -- in particular, it must not be \fBcsh\fP. .TP 8 -.B windowCreationTimeout \fR(class \fBTime\fP) +.B windowCreationTimeout\fP (class \fBTime\fP) When server extensions are not in use, this controls the delay between when windows are created and when \fIxscreensaver\fP selects events on them. Default 30 seconds. .TP 8 -.B pointerPollTime \fR(class \fBTime\fP) +.B pointerPollTime\fP (class \fBTime\fP) When server extensions are not in use, this controls how frequently \fIxscreensaver\fP checks to see if the mouse position or buttons have changed. Default 5 seconds. .TP 8 -.B initialDelay \fR(class \fBTime\fP) +.B initialDelay\fP (class \fBTime\fP) When server extensions are not in use, \fIxscreensaver\fP will wait this many seconds before selecting events on existing windows, under the assumption that \fIxscreensaver\fP is started during your login procedure, and the window state may be in flux. Default 30 seconds. .TP 8 -.B overlayStderr \fR(class \fBBoolean\fP) +.B overlayStderr\fP (class \fBBoolean\fP) If \fBcaptureStderr\fP or \fBcaptureStdout\fP are True, and your server supports ``overlay'' visuals, then the text will be written into one of the higher layers instead of into the same layer as the running screenhack. Set this to False to disable that (though you shouldn't need to.) -.SH "HOW IT WORKS" +.SH HOW IT WORKS When it is time to activate the screensaver, a full-screen black window is created on each screen of the display. The window or windows is given the appropriate properties so that, to any subsequently-created programs, it @@ -513,8 +516,9 @@ Screen section of the Style Manager. \fB2: Edit sessionetc\fP Edit the file \fI~/.dt/sessions/sessionetc\fP and add to it the line +.EX xscreensaver & - +.EE This will cause \fIxscreensaver\fP to be launched when you log in. (As always, make sure that xscreensaver and the graphics demos are on your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP @@ -524,15 +528,16 @@ and/or \fI.dtprofile\fP, not \fI.login\fP.) Create a file called \fI~/.dt/types/XScreenSaver.dt\fP with the following contents: - ACTION XScreenSaver - { - LABEL XScreenSaver - TYPE COMMAND - EXEC_STRING xscreensaver-command -lock - ICON Dtkey - WINDOW_TYPE NO_STDIO - } - +.EX +ACTION XScreenSaver +{ + LABEL XScreenSaver + TYPE COMMAND + EXEC_STRING xscreensaver-command -lock + ICON Dtkey + WINDOW_TYPE NO_STDIO +} +.EE This defines a ``lock'' command for the CDE front panel, that knows how to talk to \fIxscreensaver\fP. .TP 3 @@ -540,19 +545,20 @@ to talk to \fIxscreensaver\fP. Create a file called \fI~/.dt/types/Lock.fp\fP with the following contents: - CONTROL Lock - { - TYPE icon - CONTAINER_NAME Switch - CONTAINER_TYPE SWITCH - POSITION_HINTS 1 - ICON Fplock - LABEL Lock - PUSH_ACTION XScreenSaver - HELP_TOPIC FPOnItemLock - HELP_VOLUME FPanel - } - +.EX +CONTROL Lock +{ + TYPE icon + CONTAINER_NAME Switch + CONTAINER_TYPE SWITCH + POSITION_HINTS 1 + ICON Fplock + LABEL Lock + PUSH_ACTION XScreenSaver + HELP_TOPIC FPOnItemLock + HELP_VOLUME FPanel +} +.EE This associates the CDE front panel ``Lock'' icon with the lock command we just defined in step 3. .TP 3 @@ -561,14 +567,49 @@ Select ``\fIRestart Workspace Manager\fP'' from the popup menu to make your changes take effect. If things seem not to be working, check the file \fI~/.dt/errorlog\fP for error messages. .RE +.SH USING HP VUE (VISUAL USER ENVIRONMENT) +Since CDE is a descendant of VUE, the instructions for using xscreensaver +under VUE are similar to the above: + +.RS 4 +.TP 3 +\fB1: Switch off VUE's locker\fP +Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the +Screen section of the Style Manager. +.TP 3 +\fB2: Edit vue.session\fP +Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it +the line +.EX + vuesmcmd -screen 0 -cmd "xscreensaver" +.EE +This will cause \fIxscreensaver\fP to be launched when you log in. +(As always, make sure that xscreensaver and the graphics demos are on +your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP +and/or \fI.profile\fP, not \fI.login\fP.) +.TP 3 +\fB3: Edit vuewmrc\fP +Edit the file \fI~/.vue/vuewmrc\fP and add (or change) the Lock control: +.EX +CONTROL Lock +{ + TYPE button + IMAGE lock + PUSH_ACTION f.exec "xscreensaver-command -lock" + HELP_TOPIC FPLock +} +.EE +This associates the VUE front panel ``Lock'' icon with the xscreensaver +lock command. +.RE .PP .SH BUGS (This is not a bug, but) note that as of release 1.32, the \fBcolorPrograms\fP and \fBmonoPrograms\fP resources are no longer used: they have been supplanted by the extended syntax of the \fBprograms\fP resource (which is -described above, in the \fIresources\fP section.) +described above, in the \fIX Resources\fP section.) .TP 8 -Extensions +.B Extensions If you are not making use of one of the server extensions (\fBXIDLE\fP, \fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in rare situations, for \fIxscreensaver\fP to interfere with event propagation @@ -582,7 +623,7 @@ don't change them, but this is the reason that it's a good idea to install and use one of the server extensions instead, to work around this shortcoming in the X protocol. .TP 8 -Machine Load +.B Machine Load Although this program ``nices'' the subprocesses that it starts, graphics-intensive subprograms can still overload the machine by causing the X server process itself (which is not ``niced'') to suck a lot of @@ -601,7 +642,7 @@ periodically, like or .BR xload (1). .TP 8 -Latency and Responsiveness +.B Latency and Responsiveness If the subprocess is drawing too quickly and the connection to the X server is a slow one (such as an X terminal running over a phone line) then the screensaver might not turn off right away when the user becomes active @@ -613,7 +654,7 @@ alleviated by inserting strategic calls to in code intended for use as a screensaver. This prevents too much graphics activity from being buffered up. .TP 8 -Locking and XDM +.B Locking and XDM Locking doesn't work if the screensaver is launched by \fIxdm\fP. The reason for this is that when it is launched by \fIxdm\fP, the screensaver process is owned by some standard user id (such as \fIroot\fP @@ -626,9 +667,23 @@ there was, there would be some other security issues here as well.) So if you want to use it as a locker, you must start it with your user id. If it has already been started by \fIxdm\fP, you can kill it with -\fBxscreensaver-command -exit\fP, and then start it again as you. -.TP 8 -Passwords +\fBxscreensaver\-command -exit\fP, and then start it again as you. +.TP 8 +.B Locking and root logins +An implication of the above is that if you log in as \fIroot\fP on the +console, xscreensaver will refuse to lock the screen (because it can't tell +the difference between \fIroot\fP being logged in on the console, and a +normal user being logged in on the console but xscreensaver having been run +by \fIxdm\fP.) + +The solution to this is simple: you shouldn't be logging in on the console +as \fIroot\fP in the first place (what, are you crazy or something?) You +should log in as you, and +.BR su (1) +to \fIroot\fP as necessary. People who spend their day logged in +as \fIroot\fP are just begging for disaster. +.TP 8 +.B Passwords If you get an error message like ``couldn't get password of \fIuser\fP'' then this probably means that you're on a system in which the .BR getpwent (3) @@ -645,7 +700,7 @@ continue using your old password to unlock the screen until xscreensaver is restarted. This turns out to be kind of hard to fix. (But remember, kids! Unix security doesn't do much more than keep honest people honest...) .TP 8 -Colormap lossage: TWM +.B Colormap lossage: TWM The \fBinstallColormap\fP option doesn't work very well with the .BR twm (1) window manager and its descendants. @@ -670,21 +725,21 @@ it regularly if the screensaver is activated from a menu item, but seems to not do it if the screensaver comes on of its own volition, or is activated from another console. Any thoughts on this problem are welcome... .TP 8 -Colormap lossage: XV, XAnim, XEarth +.B Colormap lossage: XV, XAnim, XEarth Some programs don't operate properly on visuals other than the default one, or with colormaps other than the default one. See the discussion of the magic "default-n" visual name in the section about the \fBprograms\fP resource. When programs only work with the default colormap, you need to use a syntax like this: - - default-n: xv -root image-1.gif -quit \\n\\ - default-n: xearth -nostars -wait 0 \\n\\ - +.EX + default-n: xv -root image-1.gif -quit \\n\\ + default-n: xearth -nostars -wait 0 \\n\\ +.EE It would also work to turn off the \fBinstallColormap\fP option altogether, but that would deny extra colors to those programs that \fIcan\fP take advantage of them. .TP 8 -XView Clients +.B XView Clients Apparently there are some problems with XView programs getting confused and thinking that the screensaver window is the real root window even when the screensaver is not active: ClientMessages intended for the window manager @@ -694,7 +749,7 @@ but there may be other problems as well. If anyone has any insight on the cause of this problem, please let me know. (XView is an X11 toolkit that implements the (quite abominable) Sun OpenLook look-and-feel.) .TP 8 -MIT Extension and Fading +.B MIT Extension and Fading When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with the \fBfade\fP option, you may notice an unattractive flicker just before the fade begins. This is because the server maps a black window just before @@ -703,21 +758,21 @@ process immediately unmaps that window, but this results in a flicker. I haven't figured a way to get around this; it seems to be a fundamental property of the (mis-) design of this server extension. .TP 8 -LessTif (Motif Clone) +.B Lesstif (Motif clone) Demo mode is buggy if XScreenSaver was compiled against really old versions -LessTif; if you use LessTif, use version 0.82 or newer. +Lesstif; if you use Lesstif, use version 0.82 or newer. .TP 8 -Athena Widgets +.B Athena Widgets If you compiled against the Athena widget toolkit, the dialog boxes are pretty ugly, especially the password dialog. Use Motif! If you don't -have OSF Motif, use GNU LessTif, it's free: http://www.lesstif.org/ +have OSF Motif, use GNU Lesstif, it's free: http://www.lesstif.org/ .TP 8 -SGI Power Saver +.B SGI Power Saver If you're running Irix 6.3, you might find that your monitor is powering down after an hour or two even if you've told it not to. This is fixed by SGI patches 2447 and 2537. .TP 8 -Red Hot Lava +.B Red Hot Lava There need to be a lot more graphics hacks. In particular, there should be a simulation of a Lavalite (tm). .SH ENVIRONMENT @@ -741,6 +796,7 @@ http://people.netscape.com/jwz/xscreensaver/ .BR xscreensaver\-command (1), .BR xdm (1), .BR ant (1), +.BR atlantis (1), .BR attraction (1), .BR blitspin (1), .BR bouboule (1), @@ -767,6 +823,7 @@ http://people.netscape.com/jwz/xscreensaver/ .BR hypercube (1), .BR ifs (1), .BR imsmap (1), +.BR jigsaw (1), .BR julia (1), .BR kaleidescope (1), .BR laser (1), @@ -785,7 +842,6 @@ http://people.netscape.com/jwz/xscreensaver/ .BR pedal (1), .BR penrose (1), .BR pipes (1), -.BR puzzle (1), .BR pyro (1), .BR qix (1), .BR rd-bomb (1), @@ -850,4 +906,4 @@ Thanks to Patrick Moreau for the VMS port. Thanks to Mark Bowyer for figuring out how to hook it up to CDE. And huge thanks to Jon A. Christopher for implementing the Athena dialog -support, so that locking and demo-mode work even if you don't have Motif. +support, back in the days before Lesstif was a viable alternative to Motif. diff --git a/hacks/Makefile.in b/hacks/Makefile.in index 68714534..198906dd 100644 --- a/hacks/Makefile.in +++ b/hacks/Makefile.in @@ -73,8 +73,8 @@ SRCS = attraction.c blitspin.c bouboule.c braid.c bubbles.c \ slip.c sphere.c spiral.c strange.c swirl.c xlockmore.c \ xroger-hack.c goop.c starfish.c munch.c fadeplot.c \ rd-bomb.c coral.c mountain.c triangle.c lissie.c worm.c \ - rotor.c ant.c xjack.c xlyap.c puzzle.c xscreensaver-sgigl.c \ - cynosure.c moire2.c + rotor.c ant.c xjack.c xlyap.c jigsaw.c xscreensaver-sgigl.c \ + cynosure.c moire2.c flow.c OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \ bubbles-default.o decayscreen.o deco.o drift.o flag.o \ @@ -86,8 +86,8 @@ OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \ slip.o sphere.o spiral.o strange.o swirl.o xlockmore.o \ xroger-hack.o goop.o starfish.o munch.o fadeplot.o \ rd-bomb.o coral.o mountain.o triangle.o lissie.o worm.o \ - rotor.o ant.o xjack.o xlyap.o puzzle.o xscreensaver-sgigl.o \ - cynosure.o moire2.o + rotor.o ant.o xjack.o xlyap.o jigsaw.o xscreensaver-sgigl.o \ + cynosure.o moire2.o flow.o EXES = attraction blitspin bouboule braid bubbles decayscreen deco \ drift flag flame forest vines galaxy grav greynetic halo \ @@ -96,7 +96,7 @@ EXES = attraction blitspin bouboule braid bubbles decayscreen deco \ penrose pyro qix rocks rorschach sierpinski slidescreen \ slip sphere spiral strange swirl xroger goop starfish munch \ fadeplot rd-bomb coral mountain triangle lissie worm rotor \ - ant xjack xlyap puzzle cynosure moire2 + ant xjack xlyap jigsaw cynosure moire2 flow HACK_OBJS_1 = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \ $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@ @@ -118,16 +118,16 @@ MEN = attraction.man blitspin.man bouboule.man braid.man \ rocks.man rorschach.man sierpinski.man slidescreen.man \ slip.man sphere.man spiral.man strange.man swirl.man \ xroger.man goop.man starfish.man munch.man rd-bomb.man \ - xjack.man xlyap.man puzzle.man + xjack.man xlyap.man jigsaw.man STAR = * -EXTRAS = README Makefile.in xlock.h .gdbinit \ +EXTRAS = README Makefile.in xlock_23.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 \ + images/jigsaw/$(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 @@ -416,8 +416,8 @@ xjack: $(HACK_OBJS) xjack.o xlyap: $(HACK_OBJS) xlyap.o $(COL) $(CC_HACK) -o $@ $(HACK_OBJS) xlyap.o $(COL) $(HACK_LIBS) -puzzle: $(HACK_OBJS) puzzle.o $(GRAB) - $(CC_HACK) -o $@ $(HACK_OBJS) puzzle.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS) +jigsaw: $(HACK_OBJS) jigsaw.o $(GRAB) + $(CC_HACK) -o $@ $(HACK_OBJS) jigsaw.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS) cynosure: $(HACK_OBJS) cynosure.o $(COL) $(CC_HACK) -o $@ $(HACK_OBJS) cynosure.o $(COL) $(HACK_LIBS) @@ -510,6 +510,9 @@ rotor: rotor.o $(XLOCK_OBJS) ant: ant.o $(XLOCK_OBJS) $(ERASE) $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) +flow: flow.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + ############################################################################## # @@ -1190,51 +1193,51 @@ xlyap.o: $(UTILS_SRC)/colors.h xlyap.o: $(UTILS_SRC)/grabscreen.h xlyap.o: $(UTILS_SRC)/visual.h xlyap.o: $(UTILS_SRC)/vroot.h -puzzle.o: $(srcdir)/screenhack.h -puzzle.o: ../config.h -puzzle.o: $(UTILS_SRC)/yarandom.h -puzzle.o: $(UTILS_SRC)/usleep.h -puzzle.o: $(UTILS_SRC)/resources.h -puzzle.o: $(UTILS_SRC)/hsv.h -puzzle.o: $(UTILS_SRC)/colors.h -puzzle.o: $(UTILS_SRC)/grabscreen.h -puzzle.o: $(UTILS_SRC)/visual.h -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_n_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_ne_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_e_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_se_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_s_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_sw_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_w_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_nw_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_n_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_ne_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_e_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_se_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_s_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_sw_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_w_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_nw_h.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_n_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_ne_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_e_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_se_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_s_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_sw_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_w_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_a_nw_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_n_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_ne_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_e_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_se_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_s_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_sw_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_w_f.xbm -puzzle.o: $(srcdir)/images/puzzle/puzzle_b_nw_f.xbm +jigsaw.o: $(srcdir)/screenhack.h +jigsaw.o: ../config.h +jigsaw.o: $(UTILS_SRC)/yarandom.h +jigsaw.o: $(UTILS_SRC)/usleep.h +jigsaw.o: $(UTILS_SRC)/resources.h +jigsaw.o: $(UTILS_SRC)/hsv.h +jigsaw.o: $(UTILS_SRC)/colors.h +jigsaw.o: $(UTILS_SRC)/grabscreen.h +jigsaw.o: $(UTILS_SRC)/visual.h +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_n_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_ne_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_e_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_se_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_s_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_sw_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_w_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_nw_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_n_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_ne_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_e_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_se_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_s_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_sw_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_w_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_nw_h.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_n_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_ne_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_e_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_se_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_s_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_sw_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_w_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_a_nw_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_n_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_ne_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_e_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_se_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_s_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_sw_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_w_f.xbm +jigsaw.o: $(srcdir)/images/jigsaw/jigsaw_b_nw_f.xbm xscreensaver-sgigl.o: $(UTILS_SRC)/vroot.h cynosure.o: $(srcdir)/screenhack.h cynosure.o: ../config.h @@ -1254,4 +1257,16 @@ moire2.o: $(UTILS_SRC)/hsv.h moire2.o: $(UTILS_SRC)/colors.h moire2.o: $(UTILS_SRC)/grabscreen.h moire2.o: $(UTILS_SRC)/visual.h +flow.o: $(srcdir)/xlockmore.h +flow.o: ../config.h +flow.o: $(srcdir)/xlockmoreI.h +flow.o: $(srcdir)/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 diff --git a/hacks/compile_axp.com b/hacks/compile_axp.com index 336175bd..daf56faf 100644 --- a/hacks/compile_axp.com +++ b/hacks/compile_axp.com @@ -13,6 +13,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAG.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAME.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLOW.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FOREST.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GALAXY.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GOOP.C @@ -24,6 +25,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HYPERCUBE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IFS.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IMSMAP.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JIGSAW.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C @@ -39,7 +41,6 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C -$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PUZZLE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PYRO.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) QIX.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RD-BOMB.C diff --git a/hacks/compile_decc.com b/hacks/compile_decc.com index 336175bd..daf56faf 100644 --- a/hacks/compile_decc.com +++ b/hacks/compile_decc.com @@ -13,6 +13,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAG.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLAME.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FLOW.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FOREST.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GALAXY.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) GOOP.C @@ -24,6 +25,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) HYPERCUBE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IFS.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) IMSMAP.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JIGSAW.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C @@ -39,7 +41,6 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C -$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PUZZLE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PYRO.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) QIX.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RD-BOMB.C diff --git a/hacks/flow.c b/hacks/flow.c new file mode 100644 index 00000000..20554824 --- /dev/null +++ b/hacks/flow.c @@ -0,0 +1,431 @@ +/* -*- Mode: C; tab-width: 4 -*- */ +/* flow --- flow of strange bees */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)flow.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. + * + * "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 a Poincare' + * section of the "Bagel". + * + * Revision History: + * 09-Apr-97: 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 */ +# include "erase.h" + +#else /* STANDALONE */ +# include "xlock.h" /* in xlockmore distribution */ +#endif /* STANDALONE */ + +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 + +#define TIMES 2 /* number of time positions recorded */ + +typedef struct { + double x; + double y; + double z; +} dvector; + +typedef struct { + double a, b, c; +} Par; + +/* Macros */ +#define X(t,b) (sp->p[(t)*sp->beecount+(b)].x) +#define Y(t,b) (sp->p[(t)*sp->beecount+(b)].y) +#define Z(t,b) (sp->p[(t)*sp->beecount+(b)].z) +#define balance_rand(v) ((LRAND()/MAXRAND*(v))-((v)/2)) /* random number around 0 */ + +typedef struct { + int pix; + 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 */ + double step; + dvector c; /* centre */ + dvector *p; /* bee positions x[time][bee#] */ + double *t; + double theta; + double dtheta; + double phi; + double dphi; + void (*ODE) (Par par, + double *dx, double *dy, double *dz, + double x, double y, double z, + double t); + Par par; +} flowstruct; + +static flowstruct *flows = NULL; + +static void +Lorentz(Par par, + double *dx, double *dy, double *dz, + double x, double y, double z, + double t) +{ + *dx = par.a * (y - x); + *dy = x * (par.b - z) - y; + *dz = x * y - par.c * z; +} + +static void +Rossler(Par par, + double *dx, double *dy, double *dz, + double x, double y, double z, + double t) +{ + *dx = -(y + par.a * z); + *dy = x + y * par.b; + *dz = par.c + z * (x - 5.7); +} + +static void +RosslerCone(Par par, + double *dx, double *dy, double *dz, + double x, double y, double z, + double t) +{ + *dx = -(y + par.a * z); + *dy = x + y * par.b - z * z * par.c; + *dz = 0.2 + z * (x - 5.7); +} + +static void +Bagel(Par par, + double *dx, double *dy, double *dz, + double x, double y, double z, + double t) +{ + *dx = -y + par.b * sin(par.c * t); + *dy = 0.7 * x + par.a * y * (0.1 - x * x); + *dz = 0; +} + +void +init_flow(ModeInfo * mi) +{ + flowstruct *sp; + int b; + dvector range; + + if (flows == NULL) { + if ((flows = (flowstruct *) calloc(MI_NUM_SCREENS(mi), + sizeof (flowstruct))) == NULL) + return; + } + sp = &flows[MI_SCREEN(mi)]; + + sp->beecount = MI_COUNT(mi); + if (sp->beecount < 0) { + /* if sp->beecount is random ... the size can change */ + 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 != NULL) { + (void) free((void *) sp->p); + sp->p = NULL; + } + if (sp->t != NULL) { + (void) free((void *) sp->t); + sp->t = NULL; + } + sp->beecount = NRAND(-sp->beecount) + 1; /* Add 1 so its not too boring */ + } + sp->count = 0; + + sp->width = MI_WIDTH(mi); + sp->height = MI_HEIGHT(mi); + + sp->theta = balance_rand(M_PI); + sp->phi = balance_rand(M_PI); + sp->dtheta = 0.002; + sp->dphi = 0.001; + switch (NRAND(4)) { + case 0: + sp->ODE = Lorentz; + sp->step = 0.02; + sp->size = 60; + sp->c.x = 0; + sp->c.y = 0; + sp->c.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 1: + sp->ODE = Rossler; + sp->step = 0.05; + sp->size = 24; + sp->c.x = 0; + sp->c.y = 0; + sp->c.z = 3; + range.x = 4; + range.y = 4; + range.z = 7; + 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 2: + sp->ODE = RosslerCone; + sp->step = 0.05; + sp->size = 24; + sp->c.x = 0; + sp->c.y = 0; + sp->c.z = 3; + range.x = 4; + range.y = 4; + range.z = 4; + sp->par.a = 2; + sp->par.b = 0.2; + sp->par.c = 0.25 + balance_rand(0.09); + break; + case 3: + default: + sp->ODE = Bagel; + sp->step = 0.04; + sp->size = 2.6; + sp->c.x = 0 /*-1.0*/ ; + sp->c.y = 0; + sp->c.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->theta = 0; + sp->phi = 0; + sp->dtheta = 0 /*sp->par.c*sp->step */ ; + sp->dphi = 0; + break; + } + + /* Clear the background. */ + MI_CLEARWINDOW(mi); + + /* 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 = (dvector *) malloc(sizeof (dvector) * sp->beecount * TIMES); + sp->t = (double *) malloc(sizeof (double) * sp->beecount); + } + /* Initialize point positions, velocities, etc. */ + + /* bees */ + for (b = 0; b < sp->beecount; b++) { + X(0, b) = balance_rand(range.x); + X(1, b) = X(0, b); + Y(0, b) = balance_rand(range.y); + Y(1, b) = Y(0, b); + Z(0, b) = balance_rand(range.z); + Z(1, b) = Z(0, b); + sp->t[b] = 0; + } +} + + +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; + int col, ix; + double sint, cost, sinp, cosp; + + sp->theta += sp->dtheta; + sp->phi += sp->dphi; + sint = sin(sp->theta); + cost = cos(sp->theta); + sinp = sin(sp->phi); + cosp = cos(sp->phi); + for (col = 0; col < MI_NPIXELS(mi); col++) + sp->cnsegs[col] = 0; + + /* <=- Bees -=> */ + for (b = 0; b < sp->beecount; b++) { + /* 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 */ + { + double k1x, k1y, k1z; + double k2x, k2y, k2z; + + sp->t[b] += sp->step; /* tick */ + sp->ODE(sp->par, &k1x, &k1y, &k1z, + X(1, b), Y(1, b), Z(1, b), sp->t[b]); + k1x *= sp->step; + k1y *= sp->step; + k1z *= sp->step; + sp->ODE(sp->par, &k2x, &k2y, &k2z, + X(1, b) + k1x, Y(1, b) + k1y, Z(1, b) + k1z, sp->t[b]); + k2x *= sp->step; + k2y *= sp->step; + k2z *= sp->step; + X(0, b) = X(1, b) + (k1x + k2x) / 2.0; + Y(0, b) = Y(1, b) + (k1y + k2y) / 2.0; + Z(0, b) = Z(1, b) + (k1z + k2z) / 2.0; + } + + /* Fill the segment lists. */ + + + /* Tumble */ +#define DISPLAYX(A) (sp->width/2+sp->width/sp->size* \ + ((X((A),b)-sp->c.x)*cost \ + -(Y((A),b)-sp->c.y)*sint*cosp \ + +(Z((A),b)-sp->c.z)*sint*sinp)) +#define DISPLAYY(A) (sp->height/2-sp->height/sp->size* \ + ((X((A),b)-sp->c.x)*sint \ + +(Y((A),b)-sp->c.y)*cost*cosp \ + -(Z((A),b)-sp->c.z)*cost*sinp)) + + /* Colour according to bee */ + col = b % (MI_NPIXELS(mi) - 1); + + ix = col * sp->beecount + sp->cnsegs[col]; + sp->csegs[ix].x1 = DISPLAYX(0); + sp->csegs[ix].y1 = DISPLAYY(0); + sp->csegs[ix].x2 = DISPLAYX(1); + sp->csegs[ix].y2 = DISPLAYY(1); + sp->cnsegs[col]++; + } + if (sp->count) { + XSetForeground(display, gc, MI_BLACK_PIXEL(mi)); + XDrawSegments(display, window, gc, sp->old_segs, sp->beecount); + } + XSetForeground(display, gc, MI_WHITE_PIXEL(mi)); + if (MI_NPIXELS(mi) > 2) { + 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 { + /* mono */ + XSetForeground(display, gc, MI_PIXEL(mi, 1)); + XDrawSegments(display, window, gc, + sp->csegs + col * sp->beecount, + sp->cnsegs[col]); + } + for (col = 0, c = 0; col < MI_NPIXELS(mi); col++) + for (b = 0; b < sp->cnsegs[col]; b++) { + XSegment s = (sp->csegs + col * sp->beecount)[b]; + + sp->old_segs[c].x1 = s.x1; + sp->old_segs[c].y1 = s.y1; + sp->old_segs[c].x2 = s.x2; + sp->old_segs[c].y2 = s.y2; + c++; + } + if (++sp->count > MI_CYCLES(mi)) { + 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 != NULL) + (void) free((void *) sp->p); + if (sp->t != NULL) + (void) free((void *) sp->t); + } + (void) free((void *) flows); + flows = NULL; + } +} + +void +refresh_flow(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); +} diff --git a/hacks/glx/Makefile.in b/hacks/glx/Makefile.in index 686223b0..21e6de83 100644 --- a/hacks/glx/Makefile.in +++ b/hacks/glx/Makefile.in @@ -55,15 +55,17 @@ UTIL_OBJS = $(UTILS_SRC)/colors.o $(UTILS_SRC)/hsv.o \ $(UTILS_SRC)/resources.o $(UTILS_SRC)/usleep.o \ $(UTILS_SRC)/visual.o $(UTILS_SRC)/yarandom.o -SRCS = buildlwo.c cage.c gears.c moebius.c morph3d.c \ - pipeobjs.c pipes.c rubik.c s1_1.c s1_2.c s1_3.c s1_4.c \ - s1_5.c s1_6.c s1_b.c sproingies.c sproingiewrap.c stairs.c \ - superquadrics.c xlock-gl.c - -OBJS = buildlwo.o cage.o gears.o moebius.o morph3d.o \ - pipeobjs.o pipes.o rubik.o s1_1.o s1_2.o s1_3.o s1_4.o \ - s1_5.o s1_6.o s1_b.o sproingies.o sproingiewrap.o stairs.o \ - superquadrics.o xlock-gl.o +SRCS = atlantis.c buildlwo.c cage.c dolphin.c gears.c moebius.c \ + morph3d.c pipeobjs.c pipes.c rubik.c s1_1.c s1_2.c s1_3.c \ + s1_4.c s1_5.c s1_6.c s1_b.c shark.c sproingies.c \ + sproingiewrap.c stairs.c superquadrics.c swim.c whale.c \ + xlock-gl.c + +OBJS = atlantis.o buildlwo.o cage.o dolphin.o gears.o moebius.o \ + morph3d.o pipeobjs.o pipes.o rubik.o s1_1.o s1_2.o s1_3.o \ + s1_4.o s1_5.o s1_6.o s1_b.o shark.o sproingies.o \ + sproingiewrap.o stairs.o superquadrics.o swim.o whale.o \ + xlock-gl.o GL_EXES = cage gears moebius pipes sproingies stairs superquadrics \ morph3d rubik @@ -74,7 +76,7 @@ HACK_OBJS = screenhack-gl.o xlock-gl.o $(HACK_BIN)/xlockmore.o \ $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o \ $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o -HDRS = buildlwo.h e_textures.h +HDRS = atlantis.h buildlwo.h e_textures.h MEN = EXTRAS = README Makefile.in @@ -194,6 +196,10 @@ screenhack-gl.o: $(HACK_SRC)/screenhack.c CC_HACK = $(CC) $(LDFLAGS) +atlantis: atlantis.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) dolphin.o shark.o swim.o whale.o \ + $(HACK_LIBS) + cage: cage.o $(HACK_OBJS) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) @@ -229,6 +235,18 @@ sproingies: sproingies.o $(HACK_OBJS) $(SPROINGIES) # # DO NOT DELETE: updated by make distdepend +atlantis.o: $(HACK_SRC)/xlockmore.h +atlantis.o: $(HACK_SRC)/../config.h +atlantis.o: $(HACK_SRC)/xlockmoreI.h +atlantis.o: $(HACK_SRC)/screenhack.h +atlantis.o: $(UTILS_SRC)/yarandom.h +atlantis.o: $(UTILS_SRC)/usleep.h +atlantis.o: $(UTILS_SRC)/resources.h +atlantis.o: $(UTILS_SRC)/hsv.h +atlantis.o: $(UTILS_SRC)/colors.h +atlantis.o: $(UTILS_SRC)/grabscreen.h +atlantis.o: $(UTILS_SRC)/visual.h +atlantis.o: $(srcdir)/atlantis.h buildlwo.o: $(srcdir)/buildlwo.h cage.o: $(HACK_SRC)/xlockmore.h cage.o: $(HACK_SRC)/../config.h @@ -242,6 +260,7 @@ cage.o: $(UTILS_SRC)/colors.h cage.o: $(UTILS_SRC)/grabscreen.h cage.o: $(UTILS_SRC)/visual.h cage.o: $(srcdir)/e_textures.h +dolphin.o: $(srcdir)/atlantis.h gears.o: $(HACK_SRC)/xlockmore.h gears.o: $(HACK_SRC)/../config.h gears.o: $(HACK_SRC)/xlockmoreI.h @@ -307,6 +326,7 @@ s1_4.o: $(srcdir)/buildlwo.h s1_5.o: $(srcdir)/buildlwo.h s1_6.o: $(srcdir)/buildlwo.h s1_b.o: $(srcdir)/buildlwo.h +shark.o: $(srcdir)/atlantis.h sproingies.o: $(HACK_SRC)/xlockmoreI.h sproingies.o: $(HACK_SRC)/screenhack.h sproingies.o: $(HACK_SRC)/../config.h @@ -352,6 +372,18 @@ superquadrics.o: $(UTILS_SRC)/hsv.h superquadrics.o: $(UTILS_SRC)/colors.h superquadrics.o: $(UTILS_SRC)/grabscreen.h superquadrics.o: $(UTILS_SRC)/visual.h +swim.o: $(HACK_SRC)/xlockmoreI.h +swim.o: $(HACK_SRC)/screenhack.h +swim.o: $(HACK_SRC)/../config.h +swim.o: $(UTILS_SRC)/yarandom.h +swim.o: $(UTILS_SRC)/usleep.h +swim.o: $(UTILS_SRC)/resources.h +swim.o: $(UTILS_SRC)/hsv.h +swim.o: $(UTILS_SRC)/colors.h +swim.o: $(UTILS_SRC)/grabscreen.h +swim.o: $(UTILS_SRC)/visual.h +swim.o: $(srcdir)/atlantis.h +whale.o: $(srcdir)/atlantis.h xlock-gl.o: $(HACK_SRC)/screenhack.h xlock-gl.o: $(HACK_SRC)/../config.h xlock-gl.o: $(UTILS_SRC)/yarandom.h diff --git a/hacks/glx/atlantis.c b/hacks/glx/atlantis.c new file mode 100644 index 00000000..36a58c54 --- /dev/null +++ b/hacks/glx/atlantis.c @@ -0,0 +1,383 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)atlantis.c 1.1 98/05/13 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) + * + * TODO : - use def_xxx options to initialize local variables (number of + * sharks, etc...) + * - test standalone mode + * - better colormap handling (problems somewhere ?) + * - 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" +# include "xlockmore.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ + +#endif /* !STANDALONE */ + +#ifdef USE_GL + +#include +#include +#include +#include +#include "atlantis.h" +#include + + +ModeSpecOpt atlantis_opts = +{0, NULL, 0, NULL, NULL}; + +#ifdef USE_MODULES +ModStruct atlantis_description = +{"atlantis", "init_atlantis", "draw_atlantis", "release_atlantis", + "refresh_atlantis", "change_atlantis", NULL, &atlantis_opts, + 1000, 2, 5, 500, 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 < NUM_SHARKS; i++) { + ap->sharks[i].x = 70000.0 + NRAND(6000); + ap->sharks[i].y = NRAND(6000); + ap->sharks[i].z = NRAND(6000); + ap->sharks[i].psi = NRAND(360) - 180.0; + ap->sharks[i].v = 1.0; + } + + /* i = LRAND() & 1; */ /* Works the first time but they do not return */ + ap->dolph.x = 30000.0; + ap->dolph.y = 0.0; + ap->dolph.z = 6000.0; + ap->dolph.psi = /* (i) ? 90.0 : - */ 90.0; + ap->dolph.theta = 0.0; + ap->dolph.v = 3.0; + + ap->momWhale.x = 70000.0; + ap->momWhale.y = 0.0; + ap->momWhale.z = 0.0; + ap->momWhale.psi = /* (i) ? 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 = /* (i) ? 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}; +#if 0 + GLfloat map1[4] = + {0.0, 0.0, 0.0, 0.0}; + GLfloat map2[4] = + {0.0, 0.0, 0.0, 0.0}; +#endif + + 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); + + glClearColor(0.0, 0.5, 0.9, 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 < NUM_SHARKS; i++) { + SharkPilot(&(ap->sharks[i])); + SharkMiss(ap,i); + } + WhalePilot(&(ap->dolph)); + ap->dolph.phi++; + WhalePilot(&(ap->momWhale)); + ap->momWhale.phi++; + WhalePilot(&(ap->babyWhale)); + ap->babyWhale.phi++; +} + +static void +AllDisplay(atlantisstruct *ap) +{ + int i; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + for (i = 0; i < NUM_SHARKS; i++) { + glPushMatrix(); + FishTransform(&(ap->sharks[i])); + DrawShark(&(ap->sharks[i])); + glPopMatrix(); + } + + glPushMatrix(); + FishTransform(&(ap->dolph)); + DrawDolphin(&(ap->dolph)); + glPopMatrix(); + + glPushMatrix(); + FishTransform(&(ap->momWhale)); + DrawWhale(&(ap->momWhale)); + glPopMatrix(); + + glPushMatrix(); + FishTransform(&(ap->babyWhale)); + glScalef(0.45, 0.45, 0.3); + DrawWhale(&(ap->babyWhale)); + 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]; + + 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); + + 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) +{ + if (atlantis != NULL) { + (void) free((void *) atlantis); + atlantis = NULL; + } + FreeAllGL(mi); +} + +/* + *----------------------------------------------------------------------------- + * 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_atlantis(ModeInfo * mi) +{ + MI_CLEARWINDOW(mi); + Reshape(mi, MI_WIDTH(mi), MI_HEIGHT(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 /* USE_GL */ diff --git a/hacks/glx/atlantis.h b/hacks/glx/atlantis.h new file mode 100644 index 00000000..914e5c10 --- /dev/null +++ b/hacks/glx/atlantis.h @@ -0,0 +1,105 @@ +/* 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 + +#define NUM_SHARKS 4 +#define SHARKSIZE 6000 +#define SHARKSPEED 100.0 + +#define WHALESPEED 250.0 + +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; + fishRec sharks[NUM_SHARKS]; + fishRec momWhale; + fishRec babyWhale; + fishRec dolph; +} atlantisstruct; + +extern void FishTransform(fishRec *); +extern void WhalePilot(fishRec *); +extern void SharkPilot(fishRec *); +extern void SharkMiss(atlantisstruct *,int); +extern void DrawWhale(fishRec *); +extern void DrawShark(fishRec *); +extern void DrawDolphin(fishRec *); diff --git a/hacks/glx/buildlwo.c b/hacks/glx/buildlwo.c index f405730d..1aa86eda 100644 --- a/hacks/glx/buildlwo.c +++ b/hacks/glx/buildlwo.c @@ -11,7 +11,7 @@ static const char sccsid[] = "@(#)buildlwo.c 4.02 97/04/20 xlockmore"; * objects created in NewTek's Lightwave 3D. The objects must * first be converted to C source with my converter "lw2ogl". * If other people are interested in this, I will put up a - * web page for it at http://www.early.com/~emackey/lw2ogl/ + * web page for it at http://www.netaxs.com/~emackey/lw2ogl/ * * by Ed Mackey, 4/19/97 * diff --git a/hacks/glx/cage.c b/hacks/glx/cage.c index 10edcbf7..2a831893 100644 --- a/hacks/glx/cage.c +++ b/hacks/glx/cage.c @@ -107,7 +107,7 @@ ModeSpecOpt cage_opts = ModStruct cage_description = {"cage", "init_cage", "draw_cage", "release_cage", "draw_cage", "change_cage", NULL, &cage_opts, - 1000, 1, 1, 1, 1.0, "", + 1000, 1, 1, 1, 1.0, 4, "", "Shows the Impossible Cage, an Escher-like GL scene", 0, NULL}; #endif @@ -338,7 +338,7 @@ pinit(void) glFrontFace(GL_CCW); glCullFace(GL_BACK); - /* cage */ + /* cage */ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); glShadeModel(GL_FLAT); glDisable(GL_DEPTH_TEST); @@ -366,7 +366,7 @@ init_cage(ModeInfo * mi) if (cage == NULL) { if ((cage = (cagestruct *) calloc(MI_NUM_SCREENS(mi), - sizeof (cagestruct))) == NULL) + sizeof (cagestruct))) == NULL) return; } cp = &cage[screen]; @@ -374,13 +374,13 @@ init_cage(ModeInfo * mi) if ((cp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); glDrawBuffer(GL_BACK); if (!glIsList(objects)) objects = glGenLists(1); pinit(); } else { - MI_CLEARWINDOW(mi); + MI_CLEARWINDOW(mi); } } @@ -403,13 +403,13 @@ draw_cage(ModeInfo * mi) glTranslatef(0.0, 0.0, -10.0); - if (!MI_WIN_IS_ICONIC(mi)) { + if (!MI_IS_ICONIC(mi)) { glScalef(Scale4Window * cp->WindH / cp->WindW, Scale4Window, Scale4Window); } else { glScalef(Scale4Iconic * cp->WindH / cp->WindW, Scale4Iconic, Scale4Iconic); } - /* cage */ + /* 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); diff --git a/hacks/glx/dolphin.c b/hacks/glx/dolphin.c new file mode 100644 index 00000000..130d932d --- /dev/null +++ b/hacks/glx/dolphin.c @@ -0,0 +1,2065 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)dolphin.c 1.1 98/05/13 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 USE_GL + +#ifdef STANDALONE +#include +#endif + +#include +#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(void) +{ + glNormal3fv(N071); + glBegin(GL_POLYGON); + glVertex3fv(P001); + glVertex3fv(P068); + glVertex3fv(P010); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P068); + glVertex3fv(P076); + glVertex3fv(P010); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P068); + glVertex3fv(P070); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P076); + glVertex3fv(P070); + glVertex3fv(P074); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P070); + glVertex3fv(P072); + glVertex3fv(P074); + glEnd(); + glNormal3fv(N119); + glBegin(GL_POLYGON); + glVertex3fv(P072); + glVertex3fv(P070); + glVertex3fv(P074); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P074); + glVertex3fv(P070); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P070); + glVertex3fv(P068); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P076); + glVertex3fv(P068); + glVertex3fv(P010); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P068); + glVertex3fv(P001); + glVertex3fv(P010); + glEnd(); +} + +static void +Dolphin002(void) +{ + glNormal3fv(N071); + glBegin(GL_POLYGON); + glVertex3fv(P011); + glVertex3fv(P001); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P075); + glVertex3fv(P011); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P069); + glVertex3fv(P011); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P069); + glVertex3fv(P075); + glVertex3fv(P073); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P071); + glVertex3fv(P069); + glVertex3fv(P073); + glEnd(); + glNormal3fv(N119); + glBegin(GL_POLYGON); + glVertex3fv(P001); + glVertex3fv(P011); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P009); + glVertex3fv(P011); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P011); + glVertex3fv(P069); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P069); + glVertex3fv(P073); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P069); + glVertex3fv(P071); + glVertex3fv(P073); + glEnd(); +} + +static void +Dolphin003(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N015); + glVertex3fv(P015); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N013); + glVertex3fv(P013); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N014); + glVertex3fv(P014); + glEnd(); +} + +static void +Dolphin004(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N022); + glVertex3fv(P022); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N023); + glVertex3fv(P023); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N024); + glVertex3fv(P024); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N025); + glVertex3fv(P025); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N020); + glVertex3fv(P020); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N027); + glVertex3fv(P027); + glEnd(); +} + +static void +Dolphin005(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N035); + glVertex3fv(P035); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N033); + glVertex3fv(P033); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); +} + +static void +Dolphin006(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N095); + glVertex3fv(P095); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glNormal3fv(N095); + glVertex3fv(P095); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N122); + glVertex3fv(P122); + glNormal3fv(N095); + glVertex3fv(P095); + glNormal3fv(N091); + glVertex3fv(P091); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N122); + glVertex3fv(P122); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N095); + glVertex3fv(P095); + glEnd(); +} + +static void +Dolphin007(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N039); + glVertex3fv(P039); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); +} + +static void +Dolphin008(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N051); + glVertex3fv(P051); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N046); + glVertex3fv(P046); + glEnd(); +} + +static void +Dolphin009(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); +} + +static void +Dolphin010(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); +} + +static void +Dolphin011(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N079); + glVertex3fv(P079); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N089); + glVertex3fv(P089); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); +} + +static void +Dolphin012(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N066); + glVertex3fv(P066); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N067); + glVertex3fv(P067); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N006); + glVertex3fv(P006); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N005); + glVertex3fv(P005); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); +} + +static void +Dolphin013(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N116); + glVertex3fv(P116); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N112); + glVertex3fv(P112); + glNormal3fv(N113); + glVertex3fv(P113); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N114); + glVertex3fv(P114); + glNormal3fv(N113); + glVertex3fv(P113); + glNormal3fv(N112); + glVertex3fv(P112); + glNormal3fv(N115); + glVertex3fv(P115); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N114); + glVertex3fv(P114); + glNormal3fv(N116); + glVertex3fv(P116); + glNormal3fv(N113); + glVertex3fv(P113); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N114); + glVertex3fv(P114); + glNormal3fv(N007); + glVertex3fv(P007); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N007); + glVertex3fv(P007); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P002); + glVertex3fv(P007); + glVertex3fv(P008); + glVertex3fv(P099); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P007); + glVertex3fv(P114); + glVertex3fv(P115); + glVertex3fv(P008); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N112); + glVertex3fv(P112); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N112); + glVertex3fv(P112); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N115); + glVertex3fv(P115); + glEnd(); +} + +static void +Dolphin014(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N111); + glVertex3fv(P111); + glNormal3fv(N110); + glVertex3fv(P110); + glNormal3fv(N102); + glVertex3fv(P102); + glNormal3fv(N121); + glVertex3fv(P121); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N111); + glVertex3fv(P111); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N110); + glVertex3fv(P110); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N119); + glVertex3fv(P119); + glNormal3fv(N110); + glVertex3fv(P110); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N119); + glVertex3fv(P119); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N119); + glVertex3fv(P119); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N119); + glVertex3fv(P119); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P098); + glVertex3fv(P097); + glVertex3fv(P111); + glVertex3fv(P121); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P002); + glVertex3fv(P099); + glVertex3fv(P097); + glVertex3fv(P098); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N110); + glVertex3fv(P110); + glNormal3fv(N119); + glVertex3fv(P119); + glNormal3fv(N118); + glVertex3fv(P118); + glNormal3fv(N102); + glVertex3fv(P102); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N119); + glVertex3fv(P119); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N118); + glVertex3fv(P118); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N118); + glVertex3fv(P118); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N118); + glVertex3fv(P118); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N098); + glVertex3fv(P098); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N118); + glVertex3fv(P118); + glNormal3fv(N098); + glVertex3fv(P098); + glNormal3fv(N102); + glVertex3fv(P102); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N102); + glVertex3fv(P102); + glNormal3fv(N098); + glVertex3fv(P098); + glNormal3fv(N121); + glVertex3fv(P121); + glEnd(); +} + +static void +Dolphin015(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N100); + glVertex3fv(P100); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N062); + glVertex3fv(P062); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N120); + glVertex3fv(P120); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N064); + glVertex3fv(P064); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N064); + glVertex3fv(P064); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N099); + glVertex3fv(P099); + glNormal3fv(N117); + glVertex3fv(P117); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N120); + glVertex3fv(P120); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N117); + glVertex3fv(P117); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N120); + glVertex3fv(P120); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N120); + glVertex3fv(P120); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N120); + glVertex3fv(P120); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N120); + glVertex3fv(P120); + glNormal3fv(N116); + glVertex3fv(P116); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); +} + +static void +Dolphin016(void) +{ + + glDisable(GL_DEPTH_TEST); + glBegin(GL_POLYGON); + glVertex3fv(P123); + glVertex3fv(P124); + glVertex3fv(P125); + glVertex3fv(P126); + glVertex3fv(P127); + glVertex3fv(P128); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P129); + glVertex3fv(P130); + glVertex3fv(P131); + glVertex3fv(P132); + glVertex3fv(P133); + glVertex3fv(P134); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P103); + glVertex3fv(P105); + glVertex3fv(P108); + glEnd(); + glEnable(GL_DEPTH_TEST); +} + +void +DrawDolphin(fishRec * fish) +{ + float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7; + float pitch, thrash, chomp; + + 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); + Dolphin014(); + Dolphin010(); + Dolphin009(); + Dolphin012(); + Dolphin013(); + Dolphin006(); + Dolphin002(); + Dolphin001(); + Dolphin003(); + Dolphin015(); + Dolphin004(); + Dolphin005(); + Dolphin007(); + Dolphin008(); + Dolphin011(); + Dolphin016(); + glDisable(GL_CULL_FACE); + + glPopMatrix(); +} +#endif diff --git a/hacks/glx/gears.c b/hacks/glx/gears.c index a0847ff1..1350f737 100644 --- a/hacks/glx/gears.c +++ b/hacks/glx/gears.c @@ -26,8 +26,6 @@ static const char sccsid[] = "@(#)gears.c 4.07 97/11/24 xlockmore"; * 13-Mar-97: Memory leak fix by Tom Schmidt * 1996: "written" by Danny Sung * Based on 3-D gear wheels by Brian Paul which is in the public domain. - * - * Brian Paul */ /*- @@ -59,14 +57,14 @@ static const char sccsid[] = "@(#)gears.c 4.07 97/11/24 xlockmore"; #ifdef USE_GL -ModeSpecOpt gears_opts = { - 0, NULL, 0, NULL, NULL }; +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, 1.0, "", + 1000, 1, 2, 1, 4, 1.0, "", "Shows GL's gears", 0, NULL}; #endif @@ -276,7 +274,7 @@ static void draw(ModeInfo * mi) { gearsstruct *gp = &gears[MI_SCREEN(mi)]; - int wire = MI_WIN_IS_WIREFRAME(mi); + int wire = MI_IS_WIREFRAME(mi); if (!wire) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -352,8 +350,8 @@ pinit(ModeInfo * mi) {0.5, 0.5, 0.5, 1.0}; static GLfloat white[4] = {1.0, 1.0, 1.0, 1.0}; - int wire = MI_WIN_IS_WIREFRAME(mi); - int mono = MI_WIN_IS_MONO(mi); + int wire = MI_IS_WIREFRAME(mi); + int mono = MI_IS_MONO(mi); if (!wire) { glLightfv(GL_LIGHT0, GL_POSITION, pos); @@ -368,7 +366,7 @@ pinit(ModeInfo * mi) * 2nd time mode is run it is Grayscale on PseudoColor. * The code below forces monochrome on TrueColor. */ - if (MI_WIN_IS_MONO(mi)) { + 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; @@ -450,7 +448,7 @@ init_gears(ModeInfo * mi) gp->angle = NRAND(360); if ((gp->glx_context = init_GL(mi)) != NULL) { - reshape(MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(MI_WIDTH(mi), MI_HEIGHT(mi)); pinit(mi); } else { MI_CLEARWINDOW(mi); @@ -464,7 +462,7 @@ draw_gears(ModeInfo * mi) Display *display = MI_DISPLAY(mi); Window window = MI_WINDOW(mi); int angle_incr = MI_CYCLES(mi) ? MI_CYCLES(mi) : 2; - int rot_incr = MI_BATCHCOUNT(mi) ? MI_BATCHCOUNT(mi) : 1; + int rot_incr = MI_COUNT(mi) ? MI_COUNT(mi) : 1; if (!gp->glx_context) return; diff --git a/hacks/glx/moebius.c b/hacks/glx/moebius.c index 3fd933c7..a265334d 100644 --- a/hacks/glx/moebius.c +++ b/hacks/glx/moebius.c @@ -108,8 +108,8 @@ static int noants; static XrmOptionDescRec opts[] = { - {"-solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "on"}, - {"+solidmoebius", ".moebius.solidmoebius", XrmoptionNoArg, (caddr_t) "off"}, + {"-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"} }; @@ -125,13 +125,13 @@ static OptionStruct desc[] = }; ModeSpecOpt moebius_opts = -{4, opts, 2, vars, desc}; +{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, 1.0, "", + 1000, 1, 1, 1, 4, 1.0, "", "Shows Moebius Strip II, an Escher-like GL scene with ants", 0, NULL}; #endif @@ -424,7 +424,7 @@ draw_moebius_strip(ModeInfo * mi) GLfloat cPhi, sPhi; moebiusstruct *mp = &moebius[MI_SCREEN(mi)]; int i, j; - int mono = MI_WIN_IS_MONO(mi); + int mono = MI_IS_MONO(mi); float Cx, Cy, Cz; @@ -624,7 +624,7 @@ init_moebius(ModeInfo * mi) if (moebius == NULL) { if ((moebius = (moebiusstruct *) calloc(MI_NUM_SCREENS(mi), - sizeof (moebiusstruct))) == NULL) + sizeof (moebiusstruct))) == NULL) return; } mp = &moebius[screen]; @@ -633,13 +633,13 @@ init_moebius(ModeInfo * mi) if ((mp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); glDrawBuffer(GL_BACK); if (!glIsList(objects)) objects = glGenLists(3); pinit(); } else { - MI_CLEARWINDOW(mi); + MI_CLEARWINDOW(mi); } } @@ -662,13 +662,13 @@ draw_moebius(ModeInfo * mi) glTranslatef(0.0, 0.0, -10.0); - if (!MI_WIN_IS_ICONIC(mi)) { + if (!MI_IS_ICONIC(mi)) { glScalef(Scale4Window * mp->WindH / mp->WindW, Scale4Window, Scale4Window); } else { glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic); } - /* moebius */ + /* moebius */ glRotatef(mp->step * 100, 1, 0, 0); glRotatef(mp->step * 95, 0, 1, 0); glRotatef(mp->step * 90, 0, 0, 1); diff --git a/hacks/glx/morph3d.c b/hacks/glx/morph3d.c index 41aa301d..1fc3e1b9 100644 --- a/hacks/glx/morph3d.c +++ b/hacks/glx/morph3d.c @@ -22,8 +22,8 @@ static const char sccsid[] = "@(#)morph3d.c 4.07 97/11/24 xlockmore"; * 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. It was written - * from scratch and it was not based on any other source code. + * (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 @@ -86,7 +86,7 @@ ModeSpecOpt morph3d_opts = ModStruct morph3d_description = {"morph3d", "init_morph3d", "draw_morph3d", "release_morph3d", "draw_morph3d", "change_morph3d", NULL, &morph3d_opts, - 1000, 0, 1, 1, 1.0, "", + 1000, 0, 1, 1, 4, 1.0, "", "Shows GL morphing polyhedra", 0, NULL}; #endif @@ -285,7 +285,7 @@ static morph3dstruct *morph3d = NULL; GLfloat AmpVr2=(Amp)/sqr((Edge)*cossec36_2); \ \ static GLfloat x[6],y[6]; \ - static arrayninit=1; \ + static int arrayninit=1; \ \ if (arrayninit) { \ for(Fi=0;Fi<6;Fi++) { \ @@ -768,7 +768,7 @@ pinit(ModeInfo * mi) mp->Magnitude = 2.5; break; } - if (MI_WIN_IS_MONO(mi)) { + if (MI_IS_MONO(mi)) { int loop; for (loop = 0; loop < 20; loop++) @@ -793,8 +793,8 @@ init_morph3d(ModeInfo * mi) if ((mp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); - mp->object = MI_BATCHCOUNT(mi); + 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); @@ -823,7 +823,7 @@ draw_morph3d(ModeInfo * mi) glTranslatef(0.0, 0.0, -10.0); - if (!MI_WIN_IS_ICONIC(mi)) { + 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 { diff --git a/hacks/glx/pipes.c b/hacks/glx/pipes.c index 8ee15389..be4ae600 100644 --- a/hacks/glx/pipes.c +++ b/hacks/glx/pipes.c @@ -111,7 +111,7 @@ static OptionStruct desc[] = }; ModeSpecOpt pipes_opts = -{7, opts, 4, vars, desc}; +{sizeof opts / sizeof opts[0], opts, sizeof vars / sizeof vars[0], vars, desc}; #ifdef USE_MODULES ModStruct pipes_description = @@ -122,7 +122,7 @@ ModStruct pipes_description = "change_pipes", #endif "change_pipes", NULL, &pipes_opts, - 1000, 2, 5, 500, 1.0, "", + 1000, 2, 5, 500, 4, 1.0, "", "Shows a selfbuilding pipe system", 0, NULL}; #endif @@ -406,7 +406,7 @@ MakeValve(ModeInfo * mi, int newdir) glCallList(pp->betweenbolts); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray); glCallList(pp->bolts); - if (!MI_WIN_IS_MONO(mi)) { + 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) { @@ -563,7 +563,7 @@ pinit(ModeInfo * mi, int zera) pp->counter = 0; pp->turncounter = 0; - if (!MI_WIN_IS_MONO(mi)) { + if (!MI_IS_MONO(mi)) { int collist[DEFINEDCOLORS]; int i, j, lower = 1000; @@ -639,29 +639,29 @@ init_pipes(ModeInfo * mi) pp->window = MI_WINDOW(mi); if ((pp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); pp->initial_rotation = -10.0; pinit(mi, 1); if (factory > 0) { - pp->valve = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_BigValve); - pp->bolts = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_Bolts3D); - pp->betweenbolts = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_PipeBetweenBolts); + pp->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_WIN_IS_WIREFRAME(mi), &LWO_ElbowBolts); - pp->elbowcoins = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_ElbowCoins); + pp->elbowbolts = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_ElbowBolts); + pp->elbowcoins = BuildLWO(MI_IS_WIREFRAME(mi), &LWO_ElbowCoins); - pp->guagehead = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageHead); - pp->guageface = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageFace); - pp->guagedial = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageDial); - pp->guageconnector = BuildLWO(MI_WIN_IS_WIREFRAME(mi), &LWO_GuageConnector); + 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_BATCHCOUNT(mi) < 1 || MI_BATCHCOUNT(mi) > NofSysTypes + 1) { + if (MI_COUNT(mi) < 1 || MI_COUNT(mi) > NofSysTypes + 1) { pp->system_type = NRAND(NofSysTypes) + 1; } else { - pp->system_type = MI_BATCHCOUNT(mi); + pp->system_type = MI_COUNT(mi); } if (MI_CYCLES(mi) > 0 && MI_CYCLES(mi) < 11) { @@ -709,7 +709,7 @@ draw_pipes(ModeInfo * mi) if (rotatepipes) glRotatef(pp->initial_rotation, 0.0, 1.0, 0.0); - if (!MI_WIN_IS_ICONIC(mi)) { + if (!MI_IS_ICONIC(mi)) { /* Width/height ratio handled by gluPerspective() now. */ glScalef(Scale4Window, Scale4Window, Scale4Window); } else { diff --git a/hacks/glx/rubik.c b/hacks/glx/rubik.c index d52dda15..104fbe00 100644 --- a/hacks/glx/rubik.c +++ b/hacks/glx/rubik.c @@ -158,13 +158,13 @@ static OptionStruct desc[] = }; ModeSpecOpt rubik_opts = -{2, opts, 1, vars, desc}; +{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, - 1000, -30, 5, -6, 1.0, "", + 1000, -30, 5, -6, 4, 1.0, "", "Shows an auto-solving Rubik's Cube", 0, NULL}; #endif @@ -490,7 +490,7 @@ draw_cubit(ModeInfo * mi, int back, int front, int left, int right, int bottom, int top) { rubikstruct *rp = &rubik[MI_SCREEN(mi)]; - int mono = MI_WIN_IS_MONO(mi); + int mono = MI_IS_MONO(mi); if (!rp->AreObjectsDefined[ObjCubit]) { glNewList(objects + ObjCubit, GL_COMPILE_AND_EXECUTE); @@ -1558,7 +1558,7 @@ shuffle(ModeInfo * mi) (void) fprintf(stderr, "Could not allocate memory for rubik row position info\n"); } - rp->storedmoves = MI_BATCHCOUNT(mi); + rp->storedmoves = MI_COUNT(mi); if (rp->storedmoves < 0) { if (rp->moves != NULL) (void) free((void *) rp->moves); @@ -1674,7 +1674,7 @@ init_rubik(ModeInfo * mi) if ((rp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); objects = glGenLists(1); pinit(mi); } else { @@ -1701,7 +1701,7 @@ draw_rubik(ModeInfo * mi) glTranslatef(0.0, 0.0, -10.0); - if (!MI_WIN_IS_ICONIC(mi)) { + if (!MI_IS_ICONIC(mi)) { glScalef(Scale4Window * rp->WindH / rp->WindW, Scale4Window, Scale4Window); } else { glScalef(Scale4Iconic * rp->WindH / rp->WindW, Scale4Iconic, Scale4Iconic); diff --git a/hacks/glx/shark.c b/hacks/glx/shark.c new file mode 100644 index 00000000..878e8edc --- /dev/null +++ b/hacks/glx/shark.c @@ -0,0 +1,1399 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)shark.c 1.1 98/05/13 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 USE_GL + +#ifdef STANDALONE +#include +#endif + +#include +#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(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N006); + glVertex3fv(P006); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N017); + glVertex3fv(P017); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N007); + glVertex3fv(P007); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N020); + glVertex3fv(P020); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N004); + glVertex3fv(P004); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N010); + glVertex3fv(P010); + glNormal3fv(N007); + glVertex3fv(P007); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N004); + glVertex3fv(P004); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N011); + glVertex3fv(P011); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N011); + glVertex3fv(P011); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N015); + glVertex3fv(P015); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N003); + glVertex3fv(P003); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N003); + glVertex3fv(P003); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N003); + glVertex3fv(P003); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P071); + glVertex3fv(P072); + glVertex3fv(P073); + glVertex3fv(P074); + glVertex3fv(P075); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P077); + glVertex3fv(P078); + glVertex3fv(P079); + glVertex3fv(P080); + glVertex3fv(P081); + glVertex3fv(P082); + glEnd(); +} + +static void +Fish002(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N023); + glVertex3fv(P023); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N024); + glVertex3fv(P024); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N027); + glVertex3fv(P027); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N022); + glVertex3fv(P022); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); +} + +static void +Fish003(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N033); + glVertex3fv(P033); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N035); + glVertex3fv(P035); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N039); + glVertex3fv(P039); + glEnd(); +} + +static void +Fish004(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N051); + glVertex3fv(P051); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N046); + glVertex3fv(P046); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N061); + glVertex3fv(P061); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N061); + glVertex3fv(P061); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N061); + glVertex3fv(P061); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N061); + glVertex3fv(P061); + glNormal3fv(N070); + glVertex3fv(P070); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N061); + glVertex3fv(P061); + glEnd(); +} + +static void +Fish005(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N069); + glVertex3fv(P069); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N069); + glVertex3fv(P069); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); +} + +static void +Fish006(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N025); + glVertex3fv(P025); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N066); + glVertex3fv(P066); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); +} + +static void +Fish007(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N064); + glVertex3fv(P064); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N064); + glVertex3fv(P064); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); +} + +static void +Fish008(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); +} + +static void +Fish009(void) +{ + glBegin(GL_POLYGON); + glVertex3fv(P059); + glVertex3fv(P012); + glVertex3fv(P009); + glVertex3fv(P060); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P012); + glVertex3fv(P004); + glVertex3fv(P007); + glVertex3fv(P009); + glEnd(); +} + +static void +Fish_1(void) +{ + Fish004(); + Fish005(); + Fish003(); + Fish007(); + Fish006(); + Fish002(); + Fish008(); + Fish009(); + Fish001(); +} + +static void +Fish_2(void) +{ + Fish005(); + Fish004(); + Fish003(); + Fish008(); + Fish006(); + Fish002(); + Fish007(); + Fish009(); + Fish001(); +} + +static void +Fish_3(void) +{ + Fish005(); + Fish004(); + Fish007(); + Fish003(); + Fish002(); + Fish008(); + Fish009(); + Fish001(); + Fish006(); +} + +static void +Fish_4(void) +{ + Fish005(); + Fish004(); + Fish008(); + Fish003(); + Fish002(); + Fish007(); + Fish009(); + Fish001(); + Fish006(); +} + +static void +Fish_5(void) +{ + Fish009(); + Fish006(); + Fish007(); + Fish001(); + Fish002(); + Fish003(); + Fish008(); + Fish004(); + Fish005(); +} + +static void +Fish_6(void) +{ + Fish009(); + Fish006(); + Fish008(); + Fish001(); + Fish002(); + Fish007(); + Fish003(); + Fish004(); + Fish005(); +} + +static void +Fish_7(void) +{ + Fish009(); + Fish001(); + Fish007(); + Fish005(); + Fish002(); + Fish008(); + Fish003(); + Fish004(); + Fish006(); +} + +static void +Fish_8(void) +{ + Fish009(); + Fish008(); + Fish001(); + Fish002(); + Fish007(); + Fish003(); + Fish005(); + Fish004(); + Fish006(); +} + +void +DrawShark(fishRec * fish) +{ + float mat[4][4]; + int n; + float seg1, seg2, seg3, seg4, segup; + float thrash, chomp; + + 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); + switch (n) { + case 0: + Fish_1(); + break; + case 1: + Fish_2(); + break; + case 2: + Fish_3(); + break; + case 3: + Fish_4(); + break; + case 4: + Fish_5(); + break; + case 5: + Fish_6(); + break; + case 6: + Fish_7(); + break; + case 7: + Fish_8(); + break; + } + glDisable(GL_CULL_FACE); + + glPopMatrix(); +} +#endif diff --git a/hacks/glx/sproingiewrap.c b/hacks/glx/sproingiewrap.c index ad11a1b7..dff236b0 100644 --- a/hacks/glx/sproingiewrap.c +++ b/hacks/glx/sproingiewrap.c @@ -70,14 +70,14 @@ static const char sccsid[] = "@(#)sproingiewrap.c 4.07 97/11/24 xlockmore"; #ifdef USE_GL -ModeSpecOpt sproingies_opts = { - 0, NULL, 0, NULL, NULL }; +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, 1.0, "", + 1000, 5, 0, 400, 4, 1.0, "", "Shows Sproingies! Nontoxic. Safe for pets and small children", 0, NULL}; #endif @@ -130,7 +130,7 @@ init_sproingies(ModeInfo * mi) int screen = MI_SCREEN(mi); int cycles = MI_CYCLES(mi); - int batchcount = MI_BATCHCOUNT(mi); + int count = MI_COUNT(mi); int size = MI_SIZE(mi); sproingiesstruct *sp; @@ -143,17 +143,17 @@ init_sproingies(ModeInfo * mi) } sp = &sproingies[screen]; - sp->mono = (MI_WIN_IS_MONO(mi) ? 1 : 0); + sp->mono = (MI_IS_MONO(mi) ? 1 : 0); sp->window = window; if ((sp->glx_context = init_GL(mi)) != NULL) { - if ((cycles & 1) || MI_WIN_IS_WIREFRAME(mi)) + if ((cycles & 1) || MI_IS_WIREFRAME(mi)) wfmode = 1; grnd = (cycles >> 1); if (grnd > 2) grnd = 2; - mspr = batchcount; + mspr = count; if (mspr > 100) mspr = 100; @@ -162,17 +162,17 @@ init_sproingies(ModeInfo * mi) /* Viewport is specified size if size >= MINSIZE && size < screensize */ if (size == 0) { - w = MI_WIN_WIDTH(mi); - h = MI_WIN_HEIGHT(mi); + w = MI_WIDTH(mi); + h = MI_HEIGHT(mi); } else if (size < MINSIZE) { w = MINSIZE; h = MINSIZE; } else { - w = (size > MI_WIN_WIDTH(mi)) ? MI_WIN_WIDTH(mi) : size; - h = (size > MI_WIN_HEIGHT(mi)) ? MI_WIN_HEIGHT(mi) : size; + w = (size > MI_WIDTH(mi)) ? MI_WIDTH(mi) : size; + h = (size > MI_HEIGHT(mi)) ? MI_HEIGHT(mi) : size; } - glViewport((MI_WIN_WIDTH(mi) - w) / 2, (MI_WIN_HEIGHT(mi) - h) / 2, w, h); + 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 */ diff --git a/hacks/glx/stairs.c b/hacks/glx/stairs.c index 5896e195..9c9bf0f7 100644 --- a/hacks/glx/stairs.c +++ b/hacks/glx/stairs.c @@ -56,7 +56,7 @@ static const char sccsid[] = "@(#)stairs.c 4.07 97/11/24 xlockmore"; * 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. -z * + * * In real OpenGL, PseudoColor DO NOT support texture map (as far as I know). */ @@ -88,7 +88,7 @@ ModeSpecOpt stairs_opts = ModStruct stairs_description = {"stairs", "init_stairs", "draw_stairs", "release_stairs", "draw_stairs", "change_stairs", NULL, &stairs_opts, - 1000, 1, 1, 1, 1.0, "", + 1000, 1, 1, 1, 4, 1.0, "", "Shows Infinite Stairs, an Escher-like scene", 0, NULL}; #endif @@ -108,8 +108,8 @@ typedef struct { GLint WindH, WindW; GLfloat step; Bool direction; - int AreObjectsDefined[1]; - int sphere_position; + int AreObjectsDefined[1]; + int sphere_position; GLXContext *glx_context; } stairsstruct; @@ -149,6 +149,7 @@ 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}; @@ -157,42 +158,43 @@ static float MaterialWhite[] = 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, + -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; @@ -216,120 +218,114 @@ mySphere(float radius) } static void -draw_block(stairsstruct * sp, 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_degree(stairsstruct * sp, GLfloat w, GLfloat h , GLfloat t) +draw_block(GLfloat width, GLfloat height, GLfloat thickness) { - draw_block(sp, w, h, t); + 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) +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_degree(sp, 0.5, 2.7+0.1*X, 0.5); - glTranslatef( 0.0, 0.1,-1.0); - } + 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_degree(sp, 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_degree(sp, 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_degree(sp, 0.5, 3.5-0.1*X, 0.5); - glTranslatef(-1.0,-0.1, 0.0); - } + 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 >= NPOSITIONS) - sp->sphere_position = 0; + 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 >= NPOSITIONS) + sp->sphere_position = 0; } static void @@ -355,10 +351,8 @@ reshape(ModeInfo * mi, int width, int height) } static void -pinit(ModeInfo * mi) +pinit(void) { -/* stairsstruct *sp = &stairs[MI_SCREEN(mi)];*/ - glClearDepth(1.0); glClearColor(0.0, 0.0, 0.0, 1.0); @@ -377,7 +371,7 @@ pinit(ModeInfo * mi) glFrontFace(GL_CCW); glCullFace(GL_BACK); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); + glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialWhite); glShadeModel(GL_FLAT); glEnable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); @@ -409,18 +403,18 @@ init_stairs(ModeInfo * mi) } sp = &stairs[screen]; sp->step = 0.0; - sp->direction = LRAND() & 1; + sp->direction = LRAND() & 1; sp->sphere_position = NRAND(NPOSITIONS / 3) * 3; if ((sp->glx_context = init_GL(mi)) != NULL) { - reshape(mi, MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + reshape(mi, MI_WIDTH(mi), MI_HEIGHT(mi)); glDrawBuffer(GL_BACK); if (!glIsList(objects)) objects = glGenLists(1); - pinit(mi); + pinit(); } else { - MI_CLEARWINDOW(mi); + MI_CLEARWINDOW(mi); } } @@ -443,20 +437,20 @@ draw_stairs(ModeInfo * mi) glTranslatef(0.0, 0.0, -10.0); - if (!MI_WIN_IS_ICONIC(mi)) { + 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); + 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(); @@ -476,7 +470,7 @@ change_stairs(ModeInfo * mi) return; glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sp->glx_context)); - pinit(mi); + pinit(); } void diff --git a/hacks/glx/superquadrics.c b/hacks/glx/superquadrics.c index 8e2a7636..cfc2999a 100644 --- a/hacks/glx/superquadrics.c +++ b/hacks/glx/superquadrics.c @@ -119,13 +119,13 @@ static OptionStruct desc[] = }; ModeSpecOpt superquadrics_opts = -{1, opts, 1, vars, desc}; +{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, 1.0, "", + 1000, 25, 40, 1, 4, 1.0, "", "Shows 3D mathematical shapes", 0, NULL}; #endif @@ -722,13 +722,13 @@ init_superquadrics(ModeInfo * mi) return; } sp = &superquadrics[screen]; - sp->mono = (MI_WIN_IS_MONO(mi) ? 1 : 0); + sp->mono = (MI_IS_MONO(mi) ? 1 : 0); if ((sp->glx_context = init_GL(mi)) != NULL) { - InitSuperquadrics(MI_WIN_IS_WIREFRAME(mi), 0, - MI_BATCHCOUNT(mi), MI_CYCLES(mi), spinspeed, sp); - ReshapeSuperquadrics(MI_WIN_WIDTH(mi), MI_WIN_HEIGHT(mi)); + InitSuperquadrics(MI_IS_WIREFRAME(mi), 0, + MI_COUNT(mi), MI_CYCLES(mi), spinspeed, sp); + ReshapeSuperquadrics(MI_WIDTH(mi), MI_HEIGHT(mi)); DisplaySuperquadrics(sp); glFinish(); diff --git a/hacks/glx/swim.c b/hacks/glx/swim.c new file mode 100644 index 00000000..518b43c9 --- /dev/null +++ b/hacks/glx/swim.c @@ -0,0 +1,236 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)whale.c 1.1 98/05/13 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. + */ + +#include + +#ifdef STANDALONE +# include "xlockmoreI.h" /* from the xscreensaver distribution */ +#else /* !STANDALONE */ +# include "xlock.h" /* from the xlockmore distribution */ +#endif /* !STANDALONE */ + +#ifdef USE_GL + +#include "atlantis.h" +#include + +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) +{ + + fish->phi = -20.0; + fish->theta = 0.0; + fish->psi -= 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) +{ + 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 < 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 < 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/hacks/glx/whale.c b/hacks/glx/whale.c new file mode 100644 index 00000000..4b1cba61 --- /dev/null +++ b/hacks/glx/whale.c @@ -0,0 +1,1892 @@ +/* atlantis --- Shows moving 3D sea animals */ + +#if !defined( lint ) && !defined( SABER ) +static const char sccsid[] = "@(#)whale.c 1.1 98/05/13 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 USE_GL + +#ifdef STANDALONE +#include +#endif + +#include +#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(void) +{ + + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N076); + glVertex3fv(P076); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N076); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N076); + glVertex3fv(P076); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N074); + glVertex3fv(P074); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N072); + glVertex3fv(P072); + glNormal3fv(N074); + glVertex3fv(P074); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N072); + glVertex3fv(P072); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N074); + glVertex3fv(P074); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N074); + glVertex3fv(P074); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N076); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N070); + glVertex3fv(P070); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N076); + glVertex3fv(P076); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N076); + glVertex3fv(P076); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N068); + glVertex3fv(P068); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N010); + glVertex3fv(P010); + glEnd(); +} + +static void +Whale002(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N075); + glVertex3fv(P075); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N075); + glVertex3fv(P075); + glNormal3fv(N073); + glVertex3fv(P073); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N071); + glVertex3fv(P071); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N073); + glVertex3fv(P073); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N009); + glVertex3fv(P009); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N009); + glVertex3fv(P009); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N011); + glVertex3fv(P011); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N073); + glVertex3fv(P073); + glNormal3fv(N075); + glVertex3fv(P075); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N069); + glVertex3fv(P069); + glNormal3fv(N071); + glVertex3fv(P071); + glNormal3fv(N073); + glVertex3fv(P073); + glEnd(); +} + +static void +Whale003(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N019); + glVertex3fv(P019); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N018); + glVertex3fv(P018); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N016); + glVertex3fv(P016); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N012); + glVertex3fv(P012); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N015); + glVertex3fv(P015); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N013); + glVertex3fv(P013); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N001); + glVertex3fv(P001); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N014); + glVertex3fv(P014); + glEnd(); +} + +static void +Whale004(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N022); + glVertex3fv(P022); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N015); + glVertex3fv(P015); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N023); + glVertex3fv(P023); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N016); + glVertex3fv(P016); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N024); + glVertex3fv(P024); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N017); + glVertex3fv(P017); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N025); + glVertex3fv(P025); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N014); + glVertex3fv(P014); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N021); + glVertex3fv(P021); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N013); + glVertex3fv(P013); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N020); + glVertex3fv(P020); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N018); + glVertex3fv(P018); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N026); + glVertex3fv(P026); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N019); + glVertex3fv(P019); + glNormal3fv(N012); + glVertex3fv(P012); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N027); + glVertex3fv(P027); + glEnd(); +} + +static void +Whale005(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N022); + glVertex3fv(P022); + glNormal3fv(N030); + glVertex3fv(P030); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N023); + glVertex3fv(P023); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N031); + glVertex3fv(P031); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N024); + glVertex3fv(P024); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N032); + glVertex3fv(P032); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N021); + glVertex3fv(P021); + glNormal3fv(N029); + glVertex3fv(P029); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N020); + glVertex3fv(P020); + glNormal3fv(N028); + glVertex3fv(P028); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N035); + glVertex3fv(P035); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N025); + glVertex3fv(P025); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N033); + glVertex3fv(P033); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N026); + glVertex3fv(P026); + glNormal3fv(N027); + glVertex3fv(P027); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N034); + glVertex3fv(P034); + glEnd(); +} + +static void +Whale006(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N093); + glVertex3fv(P093); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N095); + glVertex3fv(P095); + glNormal3fv(N094); + glVertex3fv(P094); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N091); + glVertex3fv(P091); + glNormal3fv(N092); + glVertex3fv(P092); + glNormal3fv(N094); + glVertex3fv(P094); + glNormal3fv(N095); + glVertex3fv(P095); + glEnd(); +} + +static void +Whale007(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N030); + glVertex3fv(P030); + glNormal3fv(N038); + glVertex3fv(P038); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N029); + glVertex3fv(P029); + glNormal3fv(N037); + glVertex3fv(P037); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N028); + glVertex3fv(P028); + glNormal3fv(N036); + glVertex3fv(P036); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N043); + glVertex3fv(P043); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N035); + glVertex3fv(P035); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N034); + glVertex3fv(P034); + glNormal3fv(N042); + glVertex3fv(P042); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N031); + glVertex3fv(P031); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N039); + glVertex3fv(P039); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N032); + glVertex3fv(P032); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N040); + glVertex3fv(P040); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N033); + glVertex3fv(P033); + glNormal3fv(N041); + glVertex3fv(P041); + glEnd(); +} + +static void +Whale008(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N043); + glVertex3fv(P043); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N051); + glVertex3fv(P051); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N042); + glVertex3fv(P042); + glNormal3fv(N050); + glVertex3fv(P050); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N036); + glVertex3fv(P036); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N044); + glVertex3fv(P044); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N041); + glVertex3fv(P041); + glNormal3fv(N049); + glVertex3fv(P049); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N040); + glVertex3fv(P040); + glNormal3fv(N048); + glVertex3fv(P048); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N047); + glVertex3fv(P047); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N037); + glVertex3fv(P037); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N045); + glVertex3fv(P045); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N038); + glVertex3fv(P038); + glNormal3fv(N039); + glVertex3fv(P039); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N046); + glVertex3fv(P046); + glEnd(); +} + +static void +Whale009(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N051); + glVertex3fv(P051); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N059); + glVertex3fv(P059); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N044); + glVertex3fv(P044); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N050); + glVertex3fv(P050); + glNormal3fv(N058); + glVertex3fv(P058); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N049); + glVertex3fv(P049); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N048); + glVertex3fv(P048); + glNormal3fv(N056); + glVertex3fv(P056); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N045); + glVertex3fv(P045); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N046); + glVertex3fv(P046); + glNormal3fv(N047); + glVertex3fv(P047); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); +} + +static void +Whale010(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N080); + glVertex3fv(P080); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N081); + glVertex3fv(P081); + glNormal3fv(N085); + glVertex3fv(P085); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N085); + glVertex3fv(P085); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N083); + glVertex3fv(P083); + glNormal3fv(N077); + glVertex3fv(P077); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N087); + glVertex3fv(P087); + glNormal3fv(N077); + glVertex3fv(P077); + glNormal3fv(N090); + glVertex3fv(P090); + glEnd(); +} + +static void +Whale011(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N079); + glVertex3fv(P079); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N088); + glVertex3fv(P088); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N089); + glVertex3fv(P089); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N089); + glVertex3fv(P089); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N086); + glVertex3fv(P086); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N078); + glVertex3fv(P078); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N078); + glVertex3fv(P078); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N084); + glVertex3fv(P084); + glNormal3fv(N082); + glVertex3fv(P082); + glNormal3fv(N079); + glVertex3fv(P079); + glEnd(); +} + +static void +Whale012(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N066); + glVertex3fv(P066); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N052); + glVertex3fv(P052); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N059); + glVertex3fv(P059); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N067); + glVertex3fv(P067); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N058); + glVertex3fv(P058); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N057); + glVertex3fv(P057); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N057); + glVertex3fv(P057); + glNormal3fv(N065); + glVertex3fv(P065); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N006); + glVertex3fv(P006); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N056); + glVertex3fv(P056); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N055); + glVertex3fv(P055); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N005); + glVertex3fv(P005); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N053); + glVertex3fv(P053); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N060); + glVertex3fv(P060); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N053); + glVertex3fv(P053); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N052); + glVertex3fv(P052); + glEnd(); +} + +static void +Whale013(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N096); + glVertex3fv(P096); + glNormal3fv(N097); + glVertex3fv(P097); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N096); + glVertex3fv(P096); + glNormal3fv(N098); + glVertex3fv(P098); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N066); + glVertex3fv(P066); + glNormal3fv(N097); + glVertex3fv(P097); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N067); + glVertex3fv(P067); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N096); + glVertex3fv(P096); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N060); + glVertex3fv(P060); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N096); + glVertex3fv(P096); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N096); + glVertex3fv(P096); + glNormal3fv(N005); + glVertex3fv(P005); + glNormal3fv(N098); + glVertex3fv(P098); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N065); + glVertex3fv(P065); + glNormal3fv(N097); + glVertex3fv(P097); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N097); + glVertex3fv(P097); + glNormal3fv(N099); + glVertex3fv(P099); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P005); + glVertex3fv(P006); + glVertex3fv(P099); + glVertex3fv(P098); + glEnd(); +} + +static void +Whale014(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N004); + glVertex3fv(P004); + glNormal3fv(N005); + glVertex3fv(P005); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P006); + glVertex3fv(P005); + glVertex3fv(P004); + glVertex3fv(P008); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N006); + glVertex3fv(P006); + glNormal3fv(N008); + glVertex3fv(P008); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N008); + glVertex3fv(P008); + glNormal3fv(N004); + glVertex3fv(P004); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N062); + glVertex3fv(P062); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N004); + glVertex3fv(P004); + glEnd(); +} + +static void +Whale015(void) +{ + glBegin(GL_POLYGON); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N055); + glVertex3fv(P055); + glNormal3fv(N063); + glVertex3fv(P063); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N100); + glVertex3fv(P100); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N003); + glVertex3fv(P003); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N054); + glVertex3fv(P054); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N054); + glVertex3fv(P054); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N062); + glVertex3fv(P062); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N063); + glVertex3fv(P063); + glNormal3fv(N002); + glVertex3fv(P002); + glEnd(); + glBegin(GL_POLYGON); + glNormal3fv(N100); + glVertex3fv(P100); + glNormal3fv(N002); + glVertex3fv(P002); + glNormal3fv(N062); + glVertex3fv(P062); + glEnd(); +} + +static void +Whale016(void) +{ + glBegin(GL_POLYGON); + glVertex3fv(P104); + glVertex3fv(P105); + glVertex3fv(P106); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P107); + glVertex3fv(P108); + glVertex3fv(P109); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P110); + glVertex3fv(P111); + glVertex3fv(P112); + glVertex3fv(P113); + glVertex3fv(P114); + glVertex3fv(P115); + glEnd(); + glBegin(GL_POLYGON); + glVertex3fv(P116); + glVertex3fv(P117); + glVertex3fv(P118); + glVertex3fv(P119); + glVertex3fv(P120); + glVertex3fv(P121); + glEnd(); +} + +void +DrawWhale(fishRec * fish) +{ + float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7; + float pitch, thrash, chomp; + + 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); + + Whale001(); + Whale002(); + Whale003(); + Whale004(); + Whale005(); + Whale006(); + Whale007(); + Whale008(); + Whale009(); + Whale010(); + Whale011(); + Whale012(); + Whale013(); + Whale014(); + Whale015(); + Whale016(); + + glDisable(GL_CULL_FACE); + + glPopMatrix(); +} +#endif diff --git a/hacks/images/puzzle/puzzle.xbm b/hacks/images/jigsaw/jigsaw.xbm similarity index 99% rename from hacks/images/puzzle/puzzle.xbm rename to hacks/images/jigsaw/jigsaw.xbm index b09d6688..90d0b1fd 100644 --- a/hacks/images/puzzle/puzzle.xbm +++ b/hacks/images/jigsaw/jigsaw.xbm @@ -1,6 +1,6 @@ -#define puzzle_width 523 -#define puzzle_height 366 -static char puzzle_bits[] = { +#define jigsaw_width 523 +#define jigsaw_height 366 +static char jigsaw_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x00,0x00, diff --git a/hacks/images/puzzle/puzzle_a_e_f.xbm b/hacks/images/jigsaw/jigsaw_a_e_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_e_f.xbm rename to hacks/images/jigsaw/jigsaw_a_e_f.xbm index 69601290..12cc9b13 100644 --- a/hacks/images/puzzle/puzzle_a_e_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_e_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_e_f_width 88 -#define puzzle_a_e_f_height 78 -#define puzzle_a_e_f_x_hot 20 -#define puzzle_a_e_f_y_hot 6 -static unsigned char puzzle_a_e_f_bits[] = { +#define jigsaw_a_e_f_width 88 +#define jigsaw_a_e_f_height 78 +#define jigsaw_a_e_f_x_hot 20 +#define jigsaw_a_e_f_y_hot 6 +static unsigned char jigsaw_a_e_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_e_h.xbm b/hacks/images/jigsaw/jigsaw_a_e_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_e_h.xbm rename to hacks/images/jigsaw/jigsaw_a_e_h.xbm index a0de0dd8..67bae2e5 100644 --- a/hacks/images/puzzle/puzzle_a_e_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_e_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_e_h_width 88 -#define puzzle_a_e_h_height 78 -#define puzzle_a_e_h_x_hot 20 -#define puzzle_a_e_h_y_hot 6 -static unsigned char puzzle_a_e_h_bits[] = { +#define jigsaw_a_e_h_width 88 +#define jigsaw_a_e_h_height 78 +#define jigsaw_a_e_h_x_hot 20 +#define jigsaw_a_e_h_y_hot 6 +static unsigned char jigsaw_a_e_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_f.xbm b/hacks/images/jigsaw/jigsaw_a_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_f.xbm rename to hacks/images/jigsaw/jigsaw_a_f.xbm index 10e92431..b7046910 100644 --- a/hacks/images/puzzle/puzzle_a_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_f_width 108 -#define puzzle_a_f_height 78 -#define puzzle_a_f_x_hot 20 -#define puzzle_a_f_y_hot 5 -static unsigned char puzzle_a_f_bits[] = { +#define jigsaw_a_f_width 108 +#define jigsaw_a_f_height 78 +#define jigsaw_a_f_x_hot 20 +#define jigsaw_a_f_y_hot 5 +static unsigned char jigsaw_a_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_h.xbm b/hacks/images/jigsaw/jigsaw_a_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_h.xbm rename to hacks/images/jigsaw/jigsaw_a_h.xbm index dc9cc6d1..108e1176 100644 --- a/hacks/images/puzzle/puzzle_a_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_h_width 108 -#define puzzle_a_h_height 78 -#define puzzle_a_h_x_hot 20 -#define puzzle_a_h_y_hot 5 -static unsigned char puzzle_a_h_bits[] = { +#define jigsaw_a_h_width 108 +#define jigsaw_a_h_height 78 +#define jigsaw_a_h_x_hot 20 +#define jigsaw_a_h_y_hot 5 +static unsigned char jigsaw_a_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_n_f.xbm b/hacks/images/jigsaw/jigsaw_a_n_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_n_f.xbm rename to hacks/images/jigsaw/jigsaw_a_n_f.xbm index 989fefb8..ca6d1cd8 100644 --- a/hacks/images/puzzle/puzzle_a_n_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_n_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_n_f_width 108 -#define puzzle_a_n_f_height 73 -#define puzzle_a_n_f_x_hot 21 -#define puzzle_a_n_f_y_hot 1 -static unsigned char puzzle_a_n_f_bits[] = { +#define jigsaw_a_n_f_width 108 +#define jigsaw_a_n_f_height 73 +#define jigsaw_a_n_f_x_hot 21 +#define jigsaw_a_n_f_y_hot 1 +static unsigned char jigsaw_a_n_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/hacks/images/puzzle/puzzle_a_n_h.xbm b/hacks/images/jigsaw/jigsaw_a_n_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_n_h.xbm rename to hacks/images/jigsaw/jigsaw_a_n_h.xbm index 3c6ef130..9e8dccfa 100644 --- a/hacks/images/puzzle/puzzle_a_n_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_n_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_n_h_width 108 -#define puzzle_a_n_h_height 73 -#define puzzle_a_n_h_x_hot 21 -#define puzzle_a_n_h_y_hot 1 -static unsigned char puzzle_a_n_h_bits[] = { +#define jigsaw_a_n_h_width 108 +#define jigsaw_a_n_h_height 73 +#define jigsaw_a_n_h_x_hot 21 +#define jigsaw_a_n_h_y_hot 1 +static unsigned char jigsaw_a_n_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/hacks/images/puzzle/puzzle_a_ne_f.xbm b/hacks/images/jigsaw/jigsaw_a_ne_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_ne_f.xbm rename to hacks/images/jigsaw/jigsaw_a_ne_f.xbm index 5ed25170..c6e36e88 100644 --- a/hacks/images/puzzle/puzzle_a_ne_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_ne_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_ne_f_width 89 -#define puzzle_a_ne_f_height 74 -#define puzzle_a_ne_f_x_hot 21 -#define puzzle_a_ne_f_y_hot 1 -static unsigned char puzzle_a_ne_f_bits[] = { +#define jigsaw_a_ne_f_width 89 +#define jigsaw_a_ne_f_height 74 +#define jigsaw_a_ne_f_x_hot 21 +#define jigsaw_a_ne_f_y_hot 1 +static unsigned char jigsaw_a_ne_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_ne_h.xbm b/hacks/images/jigsaw/jigsaw_a_ne_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_ne_h.xbm rename to hacks/images/jigsaw/jigsaw_a_ne_h.xbm index 6b0b3532..52ac3edb 100644 --- a/hacks/images/puzzle/puzzle_a_ne_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_ne_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_ne_h_width 89 -#define puzzle_a_ne_h_height 74 -#define puzzle_a_ne_h_x_hot 21 -#define puzzle_a_ne_h_y_hot 1 -static unsigned char puzzle_a_ne_h_bits[] = { +#define jigsaw_a_ne_h_width 89 +#define jigsaw_a_ne_h_height 74 +#define jigsaw_a_ne_h_x_hot 21 +#define jigsaw_a_ne_h_y_hot 1 +static unsigned char jigsaw_a_ne_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_nw_f.xbm b/hacks/images/jigsaw/jigsaw_a_nw_f.xbm similarity index 96% rename from hacks/images/puzzle/puzzle_a_nw_f.xbm rename to hacks/images/jigsaw/jigsaw_a_nw_f.xbm index 9af2ee06..ff4cafee 100644 --- a/hacks/images/puzzle/puzzle_a_nw_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_nw_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_nw_f_width 88 -#define puzzle_a_nw_f_height 74 -#define puzzle_a_nw_f_x_hot 1 -#define puzzle_a_nw_f_y_hot 1 -static unsigned char puzzle_a_nw_f_bits[] = { +#define jigsaw_a_nw_f_width 88 +#define jigsaw_a_nw_f_height 74 +#define jigsaw_a_nw_f_x_hot 1 +#define jigsaw_a_nw_f_y_hot 1 +static unsigned char jigsaw_a_nw_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff, diff --git a/hacks/images/puzzle/puzzle_a_nw_h.xbm b/hacks/images/jigsaw/jigsaw_a_nw_h.xbm similarity index 96% rename from hacks/images/puzzle/puzzle_a_nw_h.xbm rename to hacks/images/jigsaw/jigsaw_a_nw_h.xbm index 20cf8604..39b6df6d 100644 --- a/hacks/images/puzzle/puzzle_a_nw_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_nw_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_nw_h_width 88 -#define puzzle_a_nw_h_height 74 -#define puzzle_a_nw_h_x_hot 1 -#define puzzle_a_nw_h_y_hot 1 -static unsigned char puzzle_a_nw_h_bits[] = { +#define jigsaw_a_nw_h_width 88 +#define jigsaw_a_nw_h_height 74 +#define jigsaw_a_nw_h_x_hot 1 +#define jigsaw_a_nw_h_y_hot 1 +static unsigned char jigsaw_a_nw_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_s_f.xbm b/hacks/images/jigsaw/jigsaw_a_s_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_s_f.xbm rename to hacks/images/jigsaw/jigsaw_a_s_f.xbm index 687750f0..1ba034de 100644 --- a/hacks/images/puzzle/puzzle_a_s_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_s_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_s_f_width 108 -#define puzzle_a_s_f_height 73 -#define puzzle_a_s_f_x_hot 20 -#define puzzle_a_s_f_y_hot 5 -static unsigned char puzzle_a_s_f_bits[] = { +#define jigsaw_a_s_f_width 108 +#define jigsaw_a_s_f_height 73 +#define jigsaw_a_s_f_x_hot 20 +#define jigsaw_a_s_f_y_hot 5 +static unsigned char jigsaw_a_s_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_s_h.xbm b/hacks/images/jigsaw/jigsaw_a_s_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_s_h.xbm rename to hacks/images/jigsaw/jigsaw_a_s_h.xbm index 78c0d3ea..4012c2a5 100644 --- a/hacks/images/puzzle/puzzle_a_s_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_s_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_s_h_width 108 -#define puzzle_a_s_h_height 73 -#define puzzle_a_s_h_x_hot 20 -#define puzzle_a_s_h_y_hot 5 -static unsigned char puzzle_a_s_h_bits[] = { +#define jigsaw_a_s_h_width 108 +#define jigsaw_a_s_h_height 73 +#define jigsaw_a_s_h_x_hot 20 +#define jigsaw_a_s_h_y_hot 5 +static unsigned char jigsaw_a_s_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_se_f.xbm b/hacks/images/jigsaw/jigsaw_a_se_f.xbm similarity index 96% rename from hacks/images/puzzle/puzzle_a_se_f.xbm rename to hacks/images/jigsaw/jigsaw_a_se_f.xbm index dbc5d0f5..13f0554d 100644 --- a/hacks/images/puzzle/puzzle_a_se_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_se_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_se_f_width 88 -#define puzzle_a_se_f_height 74 -#define puzzle_a_se_f_x_hot 20 -#define puzzle_a_se_f_y_hot 6 -static unsigned char puzzle_a_se_f_bits[] = { +#define jigsaw_a_se_f_width 88 +#define jigsaw_a_se_f_height 74 +#define jigsaw_a_se_f_x_hot 20 +#define jigsaw_a_se_f_y_hot 6 +static unsigned char jigsaw_a_se_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_se_h.xbm b/hacks/images/jigsaw/jigsaw_a_se_h.xbm similarity index 96% rename from hacks/images/puzzle/puzzle_a_se_h.xbm rename to hacks/images/jigsaw/jigsaw_a_se_h.xbm index 3dbe22ac..a023af2d 100644 --- a/hacks/images/puzzle/puzzle_a_se_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_se_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_se_h_width 88 -#define puzzle_a_se_h_height 74 -#define puzzle_a_se_h_x_hot 20 -#define puzzle_a_se_h_y_hot 6 -static unsigned char puzzle_a_se_h_bits[] = { +#define jigsaw_a_se_h_width 88 +#define jigsaw_a_se_h_height 74 +#define jigsaw_a_se_h_x_hot 20 +#define jigsaw_a_se_h_y_hot 6 +static unsigned char jigsaw_a_se_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_a_sw_f.xbm b/hacks/images/jigsaw/jigsaw_a_sw_f.xbm similarity index 96% rename from hacks/images/puzzle/puzzle_a_sw_f.xbm rename to hacks/images/jigsaw/jigsaw_a_sw_f.xbm index 5a000bf1..1b113998 100644 --- a/hacks/images/puzzle/puzzle_a_sw_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_sw_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_sw_f_width 88 -#define puzzle_a_sw_f_height 74 -#define puzzle_a_sw_f_x_hot 1 -#define puzzle_a_sw_f_y_hot 6 -static unsigned char puzzle_a_sw_f_bits[] = { +#define jigsaw_a_sw_f_width 88 +#define jigsaw_a_sw_f_height 74 +#define jigsaw_a_sw_f_x_hot 1 +#define jigsaw_a_sw_f_y_hot 6 +static unsigned char jigsaw_a_sw_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, diff --git a/hacks/images/puzzle/puzzle_a_sw_h.xbm b/hacks/images/jigsaw/jigsaw_a_sw_h.xbm similarity index 96% rename from hacks/images/puzzle/puzzle_a_sw_h.xbm rename to hacks/images/jigsaw/jigsaw_a_sw_h.xbm index 9b34a486..4f4d5adb 100644 --- a/hacks/images/puzzle/puzzle_a_sw_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_sw_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_sw_h_width 88 -#define puzzle_a_sw_h_height 74 -#define puzzle_a_sw_h_x_hot 1 -#define puzzle_a_sw_h_y_hot 6 -static unsigned char puzzle_a_sw_h_bits[] = { +#define jigsaw_a_sw_h_width 88 +#define jigsaw_a_sw_h_height 74 +#define jigsaw_a_sw_h_x_hot 1 +#define jigsaw_a_sw_h_y_hot 6 +static unsigned char jigsaw_a_sw_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc3, diff --git a/hacks/images/puzzle/puzzle_a_w_f.xbm b/hacks/images/jigsaw/jigsaw_a_w_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_w_f.xbm rename to hacks/images/jigsaw/jigsaw_a_w_f.xbm index f85ef759..57004994 100644 --- a/hacks/images/puzzle/puzzle_a_w_f.xbm +++ b/hacks/images/jigsaw/jigsaw_a_w_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_w_f_width 88 -#define puzzle_a_w_f_height 78 -#define puzzle_a_w_f_x_hot 1 -#define puzzle_a_w_f_y_hot 6 -static unsigned char puzzle_a_w_f_bits[] = { +#define jigsaw_a_w_f_width 88 +#define jigsaw_a_w_f_height 78 +#define jigsaw_a_w_f_x_hot 1 +#define jigsaw_a_w_f_y_hot 6 +static unsigned char jigsaw_a_w_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, diff --git a/hacks/images/puzzle/puzzle_a_w_h.xbm b/hacks/images/jigsaw/jigsaw_a_w_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_a_w_h.xbm rename to hacks/images/jigsaw/jigsaw_a_w_h.xbm index a82478f5..3993528c 100644 --- a/hacks/images/puzzle/puzzle_a_w_h.xbm +++ b/hacks/images/jigsaw/jigsaw_a_w_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_a_w_h_width 88 -#define puzzle_a_w_h_height 78 -#define puzzle_a_w_h_x_hot 1 -#define puzzle_a_w_h_y_hot 6 -static unsigned char puzzle_a_w_h_bits[] = { +#define jigsaw_a_w_h_width 88 +#define jigsaw_a_w_h_height 78 +#define jigsaw_a_w_h_x_hot 1 +#define jigsaw_a_w_h_y_hot 6 +static unsigned char jigsaw_a_w_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc3, diff --git a/hacks/images/puzzle/puzzle_b_e_f.xbm b/hacks/images/jigsaw/jigsaw_b_e_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_e_f.xbm rename to hacks/images/jigsaw/jigsaw_b_e_f.xbm index a49e771b..d96d25aa 100644 --- a/hacks/images/puzzle/puzzle_b_e_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_e_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_e_f_width 74 -#define puzzle_b_e_f_height 108 -#define puzzle_b_e_f_x_hot 6 -#define puzzle_b_e_f_y_hot 21 -static unsigned char puzzle_b_e_f_bits[] = { +#define jigsaw_b_e_f_width 74 +#define jigsaw_b_e_f_height 108 +#define jigsaw_b_e_f_x_hot 6 +#define jigsaw_b_e_f_y_hot 21 +static unsigned char jigsaw_b_e_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, diff --git a/hacks/images/puzzle/puzzle_b_e_h.xbm b/hacks/images/jigsaw/jigsaw_b_e_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_e_h.xbm rename to hacks/images/jigsaw/jigsaw_b_e_h.xbm index daa13c16..d2e1db7f 100644 --- a/hacks/images/puzzle/puzzle_b_e_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_e_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_e_h_width 74 -#define puzzle_b_e_h_height 108 -#define puzzle_b_e_h_x_hot 6 -#define puzzle_b_e_h_y_hot 21 -static unsigned char puzzle_b_e_h_bits[] = { +#define jigsaw_b_e_h_width 74 +#define jigsaw_b_e_h_height 108 +#define jigsaw_b_e_h_x_hot 6 +#define jigsaw_b_e_h_y_hot 21 +static unsigned char jigsaw_b_e_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, diff --git a/hacks/images/puzzle/puzzle_b_f.xbm b/hacks/images/jigsaw/jigsaw_b_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_f.xbm rename to hacks/images/jigsaw/jigsaw_b_f.xbm index 895abf9c..4001dd33 100644 --- a/hacks/images/puzzle/puzzle_b_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_f_width 78 -#define puzzle_b_f_height 108 -#define puzzle_b_f_x_hot 5 -#define puzzle_b_f_y_hot 20 -static unsigned char puzzle_b_f_bits[] = { +#define jigsaw_b_f_width 78 +#define jigsaw_b_f_height 108 +#define jigsaw_b_f_x_hot 5 +#define jigsaw_b_f_y_hot 20 +static unsigned char jigsaw_b_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, diff --git a/hacks/images/puzzle/puzzle_b_h.xbm b/hacks/images/jigsaw/jigsaw_b_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_h.xbm rename to hacks/images/jigsaw/jigsaw_b_h.xbm index 0ecc2048..5fddc079 100644 --- a/hacks/images/puzzle/puzzle_b_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_h_width 78 -#define puzzle_b_h_height 108 -#define puzzle_b_h_x_hot 5 -#define puzzle_b_h_y_hot 20 -static unsigned char puzzle_b_h_bits[] = { +#define jigsaw_b_h_width 78 +#define jigsaw_b_h_height 108 +#define jigsaw_b_h_x_hot 5 +#define jigsaw_b_h_y_hot 20 +static unsigned char jigsaw_b_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, diff --git a/hacks/images/puzzle/puzzle_b_n_f.xbm b/hacks/images/jigsaw/jigsaw_b_n_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_n_f.xbm rename to hacks/images/jigsaw/jigsaw_b_n_f.xbm index e7a84b13..3a5f2419 100644 --- a/hacks/images/puzzle/puzzle_b_n_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_n_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_n_f_width 78 -#define puzzle_b_n_f_height 88 -#define puzzle_b_n_f_x_hot 6 -#define puzzle_b_n_f_y_hot 1 -static unsigned char puzzle_b_n_f_bits[] = { +#define jigsaw_b_n_f_width 78 +#define jigsaw_b_n_f_height 88 +#define jigsaw_b_n_f_x_hot 6 +#define jigsaw_b_n_f_y_hot 1 +static unsigned char jigsaw_b_n_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/hacks/images/puzzle/puzzle_b_n_h.xbm b/hacks/images/jigsaw/jigsaw_b_n_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_n_h.xbm rename to hacks/images/jigsaw/jigsaw_b_n_h.xbm index aae63330..70d1d5d1 100644 --- a/hacks/images/puzzle/puzzle_b_n_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_n_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_n_h_width 78 -#define puzzle_b_n_h_height 88 -#define puzzle_b_n_h_x_hot 6 -#define puzzle_b_n_h_y_hot 1 -static unsigned char puzzle_b_n_h_bits[] = { +#define jigsaw_b_n_h_width 78 +#define jigsaw_b_n_h_height 88 +#define jigsaw_b_n_h_x_hot 6 +#define jigsaw_b_n_h_y_hot 1 +static unsigned char jigsaw_b_n_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_b_ne_f.xbm b/hacks/images/jigsaw/jigsaw_b_ne_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_ne_f.xbm rename to hacks/images/jigsaw/jigsaw_b_ne_f.xbm index 1a56171c..20629f5b 100644 --- a/hacks/images/puzzle/puzzle_b_ne_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_ne_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_ne_f_width 74 -#define puzzle_b_ne_f_height 88 -#define puzzle_b_ne_f_x_hot 6 -#define puzzle_b_ne_f_y_hot 1 -static unsigned char puzzle_b_ne_f_bits[] = { +#define jigsaw_b_ne_f_width 74 +#define jigsaw_b_ne_f_height 88 +#define jigsaw_b_ne_f_x_hot 6 +#define jigsaw_b_ne_f_y_hot 1 +static unsigned char jigsaw_b_ne_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/hacks/images/puzzle/puzzle_b_ne_h.xbm b/hacks/images/jigsaw/jigsaw_b_ne_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_ne_h.xbm rename to hacks/images/jigsaw/jigsaw_b_ne_h.xbm index 72464994..2b5da106 100644 --- a/hacks/images/puzzle/puzzle_b_ne_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_ne_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_ne_h_width 74 -#define puzzle_b_ne_h_height 88 -#define puzzle_b_ne_h_x_hot 6 -#define puzzle_b_ne_h_y_hot 1 -static unsigned char puzzle_b_ne_h_bits[] = { +#define jigsaw_b_ne_h_width 74 +#define jigsaw_b_ne_h_height 88 +#define jigsaw_b_ne_h_x_hot 6 +#define jigsaw_b_ne_h_y_hot 1 +static unsigned char jigsaw_b_ne_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_b_nw_f.xbm b/hacks/images/jigsaw/jigsaw_b_nw_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_nw_f.xbm rename to hacks/images/jigsaw/jigsaw_b_nw_f.xbm index 393e0b6d..441fe2ff 100644 --- a/hacks/images/puzzle/puzzle_b_nw_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_nw_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_nw_f_width 74 -#define puzzle_b_nw_f_height 88 -#define puzzle_b_nw_f_x_hot 1 -#define puzzle_b_nw_f_y_hot 1 -static unsigned char puzzle_b_nw_f_bits[] = { +#define jigsaw_b_nw_f_width 74 +#define jigsaw_b_nw_f_height 88 +#define jigsaw_b_nw_f_x_hot 1 +#define jigsaw_b_nw_f_y_hot 1 +static unsigned char jigsaw_b_nw_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/hacks/images/puzzle/puzzle_b_nw_h.xbm b/hacks/images/jigsaw/jigsaw_b_nw_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_nw_h.xbm rename to hacks/images/jigsaw/jigsaw_b_nw_h.xbm index 7b330308..9f9bc0ff 100644 --- a/hacks/images/puzzle/puzzle_b_nw_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_nw_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_nw_h_width 74 -#define puzzle_b_nw_h_height 88 -#define puzzle_b_nw_h_x_hot 1 -#define puzzle_b_nw_h_y_hot 1 -static unsigned char puzzle_b_nw_h_bits[] = { +#define jigsaw_b_nw_h_width 74 +#define jigsaw_b_nw_h_height 88 +#define jigsaw_b_nw_h_x_hot 1 +#define jigsaw_b_nw_h_y_hot 1 +static unsigned char jigsaw_b_nw_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/hacks/images/puzzle/puzzle_b_s_f.xbm b/hacks/images/jigsaw/jigsaw_b_s_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_s_f.xbm rename to hacks/images/jigsaw/jigsaw_b_s_f.xbm index f72d7394..b1a59349 100644 --- a/hacks/images/puzzle/puzzle_b_s_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_s_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_s_f_width 78 -#define puzzle_b_s_f_height 88 -#define puzzle_b_s_f_x_hot 5 -#define puzzle_b_s_f_y_hot 20 -static unsigned char puzzle_b_s_f_bits[] = { +#define jigsaw_b_s_f_width 78 +#define jigsaw_b_s_f_height 88 +#define jigsaw_b_s_f_x_hot 5 +#define jigsaw_b_s_f_y_hot 20 +static unsigned char jigsaw_b_s_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, diff --git a/hacks/images/puzzle/puzzle_b_s_h.xbm b/hacks/images/jigsaw/jigsaw_b_s_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_s_h.xbm rename to hacks/images/jigsaw/jigsaw_b_s_h.xbm index 5f906707..d1e496be 100644 --- a/hacks/images/puzzle/puzzle_b_s_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_s_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_s_h_width 78 -#define puzzle_b_s_h_height 88 -#define puzzle_b_s_h_x_hot 5 -#define puzzle_b_s_h_y_hot 20 -static unsigned char puzzle_b_s_h_bits[] = { +#define jigsaw_b_s_h_width 78 +#define jigsaw_b_s_h_height 88 +#define jigsaw_b_s_h_x_hot 5 +#define jigsaw_b_s_h_y_hot 20 +static unsigned char jigsaw_b_s_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, diff --git a/hacks/images/puzzle/puzzle_b_se_f.xbm b/hacks/images/jigsaw/jigsaw_b_se_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_se_f.xbm rename to hacks/images/jigsaw/jigsaw_b_se_f.xbm index 537725ef..5564b8a6 100644 --- a/hacks/images/puzzle/puzzle_b_se_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_se_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_se_f_width 74 -#define puzzle_b_se_f_height 88 -#define puzzle_b_se_f_x_hot 6 -#define puzzle_b_se_f_y_hot 20 -static unsigned char puzzle_b_se_f_bits[] = { +#define jigsaw_b_se_f_width 74 +#define jigsaw_b_se_f_height 88 +#define jigsaw_b_se_f_x_hot 6 +#define jigsaw_b_se_f_y_hot 20 +static unsigned char jigsaw_b_se_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, diff --git a/hacks/images/puzzle/puzzle_b_se_h.xbm b/hacks/images/jigsaw/jigsaw_b_se_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_se_h.xbm rename to hacks/images/jigsaw/jigsaw_b_se_h.xbm index df99f701..2a11d938 100644 --- a/hacks/images/puzzle/puzzle_b_se_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_se_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_se_h_width 74 -#define puzzle_b_se_h_height 88 -#define puzzle_b_se_h_x_hot 6 -#define puzzle_b_se_h_y_hot 20 -static unsigned char puzzle_b_se_h_bits[] = { +#define jigsaw_b_se_h_width 74 +#define jigsaw_b_se_h_height 88 +#define jigsaw_b_se_h_x_hot 6 +#define jigsaw_b_se_h_y_hot 20 +static unsigned char jigsaw_b_se_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, diff --git a/hacks/images/puzzle/puzzle_b_sw_f.xbm b/hacks/images/jigsaw/jigsaw_b_sw_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_sw_f.xbm rename to hacks/images/jigsaw/jigsaw_b_sw_f.xbm index f183b52a..d9a77db9 100644 --- a/hacks/images/puzzle/puzzle_b_sw_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_sw_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_sw_f_width 74 -#define puzzle_b_sw_f_height 88 -#define puzzle_b_sw_f_x_hot 1 -#define puzzle_b_sw_f_y_hot 21 -static unsigned char puzzle_b_sw_f_bits[] = { +#define jigsaw_b_sw_f_width 74 +#define jigsaw_b_sw_f_height 88 +#define jigsaw_b_sw_f_x_hot 1 +#define jigsaw_b_sw_f_y_hot 21 +static unsigned char jigsaw_b_sw_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, diff --git a/hacks/images/puzzle/puzzle_b_sw_h.xbm b/hacks/images/jigsaw/jigsaw_b_sw_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_sw_h.xbm rename to hacks/images/jigsaw/jigsaw_b_sw_h.xbm index 917853bd..d96c8c1a 100644 --- a/hacks/images/puzzle/puzzle_b_sw_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_sw_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_sw_h_width 74 -#define puzzle_b_sw_h_height 88 -#define puzzle_b_sw_h_x_hot 1 -#define puzzle_b_sw_h_y_hot 21 -static unsigned char puzzle_b_sw_h_bits[] = { +#define jigsaw_b_sw_h_width 74 +#define jigsaw_b_sw_h_height 88 +#define jigsaw_b_sw_h_x_hot 1 +#define jigsaw_b_sw_h_y_hot 21 +static unsigned char jigsaw_b_sw_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x03, diff --git a/hacks/images/puzzle/puzzle_b_w_f.xbm b/hacks/images/jigsaw/jigsaw_b_w_f.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_w_f.xbm rename to hacks/images/jigsaw/jigsaw_b_w_f.xbm index 0b5b8d53..5d7ece98 100644 --- a/hacks/images/puzzle/puzzle_b_w_f.xbm +++ b/hacks/images/jigsaw/jigsaw_b_w_f.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_w_f_width 74 -#define puzzle_b_w_f_height 108 -#define puzzle_b_w_f_x_hot 1 -#define puzzle_b_w_f_y_hot 21 -static unsigned char puzzle_b_w_f_bits[] = { +#define jigsaw_b_w_f_width 74 +#define jigsaw_b_w_f_height 108 +#define jigsaw_b_w_f_x_hot 1 +#define jigsaw_b_w_f_y_hot 21 +static unsigned char jigsaw_b_w_f_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, diff --git a/hacks/images/puzzle/puzzle_b_w_h.xbm b/hacks/images/jigsaw/jigsaw_b_w_h.xbm similarity index 97% rename from hacks/images/puzzle/puzzle_b_w_h.xbm rename to hacks/images/jigsaw/jigsaw_b_w_h.xbm index 2c105c16..670ae118 100644 --- a/hacks/images/puzzle/puzzle_b_w_h.xbm +++ b/hacks/images/jigsaw/jigsaw_b_w_h.xbm @@ -1,8 +1,8 @@ -#define puzzle_b_w_h_width 74 -#define puzzle_b_w_h_height 108 -#define puzzle_b_w_h_x_hot 1 -#define puzzle_b_w_h_y_hot 21 -static unsigned char puzzle_b_w_h_bits[] = { +#define jigsaw_b_w_h_width 74 +#define jigsaw_b_w_h_height 108 +#define jigsaw_b_w_h_x_hot 1 +#define jigsaw_b_w_h_y_hot 21 +static unsigned char jigsaw_b_w_h_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x03, diff --git a/hacks/puzzle.c b/hacks/jigsaw.c similarity index 87% rename from hacks/puzzle.c rename to hacks/jigsaw.c index f3647c4b..07e9303d 100644 --- a/hacks/puzzle.c +++ b/hacks/jigsaw.c @@ -35,45 +35,45 @@ #define DEBUG -#include "images/puzzle/puzzle_a_h.xbm" -#include "images/puzzle/puzzle_a_n_h.xbm" -#include "images/puzzle/puzzle_a_ne_h.xbm" -#include "images/puzzle/puzzle_a_e_h.xbm" -#include "images/puzzle/puzzle_a_se_h.xbm" -#include "images/puzzle/puzzle_a_s_h.xbm" -#include "images/puzzle/puzzle_a_sw_h.xbm" -#include "images/puzzle/puzzle_a_w_h.xbm" -#include "images/puzzle/puzzle_a_nw_h.xbm" - -#include "images/puzzle/puzzle_b_h.xbm" -#include "images/puzzle/puzzle_b_n_h.xbm" -#include "images/puzzle/puzzle_b_ne_h.xbm" -#include "images/puzzle/puzzle_b_e_h.xbm" -#include "images/puzzle/puzzle_b_se_h.xbm" -#include "images/puzzle/puzzle_b_s_h.xbm" -#include "images/puzzle/puzzle_b_sw_h.xbm" -#include "images/puzzle/puzzle_b_w_h.xbm" -#include "images/puzzle/puzzle_b_nw_h.xbm" - -#include "images/puzzle/puzzle_a_f.xbm" -#include "images/puzzle/puzzle_a_n_f.xbm" -#include "images/puzzle/puzzle_a_ne_f.xbm" -#include "images/puzzle/puzzle_a_e_f.xbm" -#include "images/puzzle/puzzle_a_se_f.xbm" -#include "images/puzzle/puzzle_a_s_f.xbm" -#include "images/puzzle/puzzle_a_sw_f.xbm" -#include "images/puzzle/puzzle_a_w_f.xbm" -#include "images/puzzle/puzzle_a_nw_f.xbm" - -#include "images/puzzle/puzzle_b_f.xbm" -#include "images/puzzle/puzzle_b_n_f.xbm" -#include "images/puzzle/puzzle_b_ne_f.xbm" -#include "images/puzzle/puzzle_b_e_f.xbm" -#include "images/puzzle/puzzle_b_se_f.xbm" -#include "images/puzzle/puzzle_b_s_f.xbm" -#include "images/puzzle/puzzle_b_sw_f.xbm" -#include "images/puzzle/puzzle_b_w_f.xbm" -#include "images/puzzle/puzzle_b_nw_f.xbm" +#include "images/jigsaw/jigsaw_a_h.xbm" +#include "images/jigsaw/jigsaw_a_n_h.xbm" +#include "images/jigsaw/jigsaw_a_ne_h.xbm" +#include "images/jigsaw/jigsaw_a_e_h.xbm" +#include "images/jigsaw/jigsaw_a_se_h.xbm" +#include "images/jigsaw/jigsaw_a_s_h.xbm" +#include "images/jigsaw/jigsaw_a_sw_h.xbm" +#include "images/jigsaw/jigsaw_a_w_h.xbm" +#include "images/jigsaw/jigsaw_a_nw_h.xbm" + +#include "images/jigsaw/jigsaw_b_h.xbm" +#include "images/jigsaw/jigsaw_b_n_h.xbm" +#include "images/jigsaw/jigsaw_b_ne_h.xbm" +#include "images/jigsaw/jigsaw_b_e_h.xbm" +#include "images/jigsaw/jigsaw_b_se_h.xbm" +#include "images/jigsaw/jigsaw_b_s_h.xbm" +#include "images/jigsaw/jigsaw_b_sw_h.xbm" +#include "images/jigsaw/jigsaw_b_w_h.xbm" +#include "images/jigsaw/jigsaw_b_nw_h.xbm" + +#include "images/jigsaw/jigsaw_a_f.xbm" +#include "images/jigsaw/jigsaw_a_n_f.xbm" +#include "images/jigsaw/jigsaw_a_ne_f.xbm" +#include "images/jigsaw/jigsaw_a_e_f.xbm" +#include "images/jigsaw/jigsaw_a_se_f.xbm" +#include "images/jigsaw/jigsaw_a_s_f.xbm" +#include "images/jigsaw/jigsaw_a_sw_f.xbm" +#include "images/jigsaw/jigsaw_a_w_f.xbm" +#include "images/jigsaw/jigsaw_a_nw_f.xbm" + +#include "images/jigsaw/jigsaw_b_f.xbm" +#include "images/jigsaw/jigsaw_b_n_f.xbm" +#include "images/jigsaw/jigsaw_b_ne_f.xbm" +#include "images/jigsaw/jigsaw_b_e_f.xbm" +#include "images/jigsaw/jigsaw_b_se_f.xbm" +#include "images/jigsaw/jigsaw_b_s_f.xbm" +#include "images/jigsaw/jigsaw_b_sw_f.xbm" +#include "images/jigsaw/jigsaw_b_w_f.xbm" +#include "images/jigsaw/jigsaw_b_nw_f.xbm" #define GRID_WIDTH 66 #define GRID_HEIGHT 66 @@ -109,13 +109,13 @@ static void init_images(Display *dpy, Window window) { # define LOAD_PIECE(PIECE,NAME) \ - PIECE.x = puzzle_##NAME##_x_hot; \ - PIECE.y = puzzle_##NAME##_y_hot; \ + PIECE.x = jigsaw_##NAME##_x_hot; \ + PIECE.y = jigsaw_##NAME##_y_hot; \ PIECE.pixmap = \ XCreatePixmapFromBitmapData(dpy, window, \ - (char *) puzzle_##NAME##_bits, \ - puzzle_##NAME##_width, \ - puzzle_##NAME##_height, \ + (char *) jigsaw_##NAME##_bits, \ + jigsaw_##NAME##_width, \ + jigsaw_##NAME##_height, \ 1, 0, 1) # define LOAD_PIECES(SET,PREFIX,SUFFIX) \ @@ -171,7 +171,7 @@ static int fg, bg; static XPoint *state = 0; static void -puzzle_init(Display *dpy, Window window) +jigsaw_init(Display *dpy, Window window) { XWindowAttributes xgwa; int x, y; @@ -530,11 +530,11 @@ done(void) -char *progclass = "Puzzle"; +char *progclass = "Jigsaw"; char *defaults [] = { - "Puzzle.background: Black", /* to placate SGI */ - "Puzzle.foreground: Gray40", + "Jigsaw.background: Black", /* to placate SGI */ + "Jigsaw.foreground: Gray40", "*delay: 70000", "*delay2: 5", 0 @@ -557,7 +557,7 @@ screenhack (Display *dpy, Window window) while (1) { int x, y; - puzzle_init (dpy, window); + jigsaw_init (dpy, window); shuffle_all(dpy, window); for (y = 0; y < height; y++) diff --git a/hacks/puzzle.man b/hacks/jigsaw.man similarity index 93% rename from hacks/puzzle.man rename to hacks/jigsaw.man index 7e95a2df..b8a28206 100644 --- a/hacks/puzzle.man +++ b/hacks/jigsaw.man @@ -1,14 +1,14 @@ .TH XScreenSaver 1 "25-Nov-97" "X Version 11" .SH NAME -puzzle - permute the screen image like a jigsaw puzzle +jigsaw - permute the screen image like a jigsaw puzzle .SH SYNOPSIS -.B puzzle +.B jigsaw [\-display \fIhost:display.screen\fP] [\-background \fIcolor\fP] [\-delay \fIusecs\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] .SH DESCRIPTION -The \fIpuzzle\fP program takes an image of the screen, carves it up into -a crossword puzzle, shuffles it, and then solves it. +The \fIjigsaw\fP program takes an image of the screen, carves it up into +a jigsaw puzzle, shuffles it, and then solves it. .SH OPTIONS -.I puzzle +.I jigsaw accepts the following options: .TP 8 .B \-window diff --git a/hacks/rd-bomb.c b/hacks/rd-bomb.c index 0a7cee75..f3d04c21 100644 --- a/hacks/rd-bomb.c +++ b/hacks/rd-bomb.c @@ -371,7 +371,6 @@ screenhack (Display *dpy, Window win) char *p; int vdepth; int npix; - int *m = 0; #ifdef HAVE_XSHM_EXTENSION int use_shm = 0; XShmSegmentInfo shm_info; diff --git a/hacks/screenhack.c b/hacks/screenhack.c index 8462d4e7..ace18c57 100644 --- a/hacks/screenhack.c +++ b/hacks/screenhack.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1992, 1995, 1997 +/* xscreensaver, Copyright (c) 1992, 1995, 1997, 1998 * Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its @@ -61,6 +61,7 @@ static XrmOptionDescRec default_options [] = { { "-install", ".installColormap", XrmoptionNoArg, "True" }, { "-noinstall",".installColormap", XrmoptionNoArg, "False" }, { "-visual", ".visualID", XrmoptionSepArg, 0 }, + { "-window-id", ".windowID", XrmoptionSepArg, 0 }, { 0, 0, 0, 0 } }; @@ -70,6 +71,7 @@ static char *default_defaults[] = { "*mono: false", "*installColormap: false", "*visualID: default", + "*windowID: ", 0 }; @@ -154,6 +156,7 @@ main (int argc, char **argv) Visual *visual; Colormap cmap; Bool root_p; + Window on_window = 0; XEvent event; Boolean dont_clear /*, dont_map */; char version[255]; @@ -219,7 +222,24 @@ main (int argc, char **argv) mono_p = True; root_p = get_boolean_resource ("root", "Boolean"); - if (root_p) + + { + char *s = get_string_resource ("windowID", "WindowID"); + if (s && *s) + on_window = get_integer_resource ("windowID", "WindowID"); + if (s) free (s); + } + + if (on_window) + { + XWindowAttributes xgwa; + window = (Window) on_window; + XtDestroyWidget (toplevel); + XGetWindowAttributes (dpy, window, &xgwa); + cmap = xgwa.colormap; + visual = xgwa.visual; + } + else if (root_p) { XWindowAttributes xgwa; window = RootWindowOfScreen (XtScreen (toplevel)); @@ -314,7 +334,7 @@ main (int argc, char **argv) XClearWindow (dpy, window); } - if (!root_p) + if (!root_p && !on_window) /* wait for it to be mapped */ XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window); diff --git a/hacks/xlock.h b/hacks/xlock_23.h similarity index 100% rename from hacks/xlock.h rename to hacks/xlock_23.h diff --git a/hacks/xlockmore.h b/hacks/xlockmore.h index 91790554..9ad4e98e 100644 --- a/hacks/xlockmore.h +++ b/hacks/xlockmore.h @@ -74,6 +74,15 @@ ERROR! Sorry, xlockmore.h requires ANSI C (gcc, for example.) #define MI_BATCHCOUNT(MI) ((MI)->batchcount) #define MI_SIZE(MI) ((MI)->size) +#define MI_WIDTH(MI) (MI_WIN_WIDTH((MI))) +#define MI_HEIGHT(MI) (MI_WIN_HEIGHT((MI))) +#define MI_IS_ICONIC(MI) (MI_WIN_IS_ICONIC((MI))) +#define MI_IS_WIREFRAME(MI) (MI_WIN_IS_WIREFRAME((MI))) +#define MI_IS_MONO(MI) (MI_WIN_IS_MONO((MI))) +#define MI_COUNT(MI) (MI_BATCHCOUNT((MI))) +#define MI_BLACK_PIXEL(MI) (MI_WIN_BLACK_PIXEL(MI)) +#define MI_WHITE_PIXEL(MI) (MI_WIN_WHITE_PIXEL(MI)) + #define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)) /* Some other utility macros. diff --git a/hacks/xlyap.c b/hacks/xlyap.c index 350888d0..26dae592 100644 --- a/hacks/xlyap.c +++ b/hacks/xlyap.c @@ -109,14 +109,22 @@ XrmOptionDescRec options [] = { #ifdef SIXTEEN_COLORS #define MAXPOINTS 128 +#ifdef BIGMEM #define MAXFRAMES 4 +#else +#define MAXFRAMES 2 +#endif #define MAXCOLOR 16 static int maxcolor=16, startcolor=0, color_offset=0, mincolindex=1; static int dwell=50, settle=25; static int width=128, height=128, xposition=128, yposition=128; #else #define MAXPOINTS 256 +#ifdef BIGMEM #define MAXFRAMES 8 +#else +#define MAXFRAMES 2 +#endif #define MAXCOLOR 256 static int maxcolor=256, startcolor=17, color_offset=96, mincolindex=33; static int dwell=100, settle=50; diff --git a/setup.com b/setup.com index 2f4c977e..b76d47d1 100644 --- a/setup.com +++ b/setup.com @@ -17,6 +17,7 @@ $ drift :== $'mydir'drift $ fadeplot :== $'mydir'fadeplot $ flag :== $'mydir'flag $ flame :== $'mydir'flame +$ flow :== $'mydir'flow $ forest :== $'mydir'forest $ galaxy :== $'mydir'galaxy $ goop :== $'mydir'goop @@ -28,6 +29,7 @@ $ hopalong :== $'mydir'hopalong $ hypercube :== $'mydir'hypercube $ ifs :== $'mydir'ifs $ imsmap :== $'mydir'imsmap +$ jigsaw :== $'mydir'jigsaw $ julia :== $'mydir'julia $ kaleidescope :== $'mydir'kaleidescope $ laser :== $'mydir'laser @@ -43,7 +45,6 @@ $ munch :== $'mydir'munch $ noseguy :== $'mydir'noseguy $ pedal :== $'mydir'pedal $ penrose :== $'mydir'penrose -$ puzzle :== $'mydir'puzzle $ pyro :== $'mydir'pyro $ qix :== $'mydir'qix $ rd-bomb :== $'mydir'rd-bomb diff --git a/utils/resources.c b/utils/resources.c index d13fb820..11e326ea 100644 --- a/utils/resources.c +++ b/utils/resources.c @@ -84,12 +84,28 @@ get_integer_resource (char *res_name, char *res_class) { int val; char c, *s = get_string_resource (res_name, res_class); + char *ss = s; if (!s) return 0; - if (1 == sscanf (s, " %d %c", &val, &c)) + + while (*ss && *ss <= ' ') ss++; /* skip whitespace */ + + if (ss[0] == '0' && (ss[1] == 'x' || ss[1] == 'X')) /* 0x: parse as hex */ { - free (s); - return val; + if (1 == sscanf (ss+2, "%x %c", &val, &c)) + { + free (s); + return val; + } } + else /* else parse as dec */ + { + if (1 == sscanf (ss, "%d %c", &val, &c)) + { + free (s); + return val; + } + } + fprintf (stderr, "%s: %s must be an integer, not %s.\n", progname, res_name, s); free (s); diff --git a/utils/version.h b/utils/version.h index 5539daab..5a6b2f67 100644 --- a/utils/version.h +++ b/utils/version.h @@ -1,2 +1,2 @@ static const char screensaver_id[] = - "@(#)xscreensaver 2.16, by Jamie Zawinski (jwz@netscape.com)"; + "@(#)xscreensaver 2.17, by Jamie Zawinski (jwz@netscape.com)"; diff --git a/xscreensaver.lsm b/xscreensaver.lsm index 810e2311..7368528e 100644 --- a/xscreensaver.lsm +++ b/xscreensaver.lsm @@ -1,7 +1,7 @@ Begin3 Title: xscreensaver -Version: 2.16 -Entered-date: 21FEB98 +Version: 2.17 +Entered-date: 02JUN98 Description: A modular screen saver and locker for the X Window System. Highly customizable: allows the use of any program that can draw on the root window as a display mode. @@ -11,11 +11,11 @@ Keywords: screen saver, screen lock, lock, xlock, X11 Author: jwz@netscape.com (Jamie Zawinski) Maintained-by: jwz@netscape.com (Jamie Zawinski) Primary-site: ftp.x.org /contrib/applications/ - 742K xscreensaver-2.16.tar.gz + 776K xscreensaver-2.17.tar.gz 17K xscreensaver.README 1K xscreensaver.lsm Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/ - 742K xscreensaver-2.16.tar.gz + 776K xscreensaver-2.17.tar.gz 17K xscreensaver.README 1K xscreensaver.lsm Platforms: Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD, -- 2.30.2