From: Zygo Blaxell Date: Fri, 27 Feb 2009 19:22:44 +0000 (-0500) Subject: ftp://ftp.uniovi.es/pub/X11R6/graphics/misc/lock/xlockmore-2.7.tar.gz X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fxlockmore-2.7;p=xscreensaver ftp://ftp.uniovi.es/pub/X11R6/graphics/misc/lock/xlockmore-2.7.tar.gz -rw-r--r-- 1 zblaxell zblaxell 144294 Mar 1 1995 xlockmore-2.7.tar.gz 2f52eea94207f8daeb8d09ed1ddc4a46ad387324 xlockmore-2.7.tar.gz --- 504a93775752073009df5d87627471850a99c1b2 diff --git a/Imakefile b/Imakefile new file mode 100644 index 00000000..bd7d05a4 --- /dev/null +++ b/Imakefile @@ -0,0 +1,163 @@ +XCOMM @(#)Imakefile 23.9 91/09/27 +XCOMM Imakefile - xlock +XCOMM + + BITMAPDIR = ./bitmaps + +#ifndef __QNX__ +#ifndef MathLibrary +#define MathLibrary -lm +#endif +#else +#define MathLibrary + CCOPTIONS += -DHAS_SHADOW -Dlinux + SHADOWLIB = -l/src/util/Lib/util +#endif + +XCOMM Add your system to the list if you have lrand48 and srand48 +#if (defined SunArchitecture) || (defined LinuxArchitecture) || (defined HPArchitecture) + CCOPTIONS += -DHAS_RAND48 +#else +#if (!defined SGIArchitecture) && (SystemV || SystemV4) + CCOPTIONS += -DHAS_RAND +#else + CCOPTIONS += -DHAS_RANDOM +#endif +#endif + +#ifdef UltrixArchitecture +EXTRA_LIBRARIES = -lauth +#endif + +#ifdef SunArchitecture +#if SystemV4 + CCOPTIONS += -DSOLARIS_SHADOW +XCOMM If Solaris 2.3 or greater, use nanosleep, less cpu overhead +XCOMM CCOPTIONS += -DHAS_NANOSLEEP +XCOMM EXTRA_LIBRARIES = -lnsl -lposix4 +#else +#if HasShadowPasswd + CCOPTIONS += -DHAS_SHADOW +#endif +#endif + ICONTYPE = sun +#else + +#if HasShadowPasswd + CCOPTIONS += -DHAS_SHADOW + SHADOWLIB = -lshadow +#endif +#if defined(HPArchitecture) || defined(ApolloArchitecture) +#ifdef HPArchitecture +XCOMM If your site is using Secured Passwords, +XCOMM add -DHPUX_SECURE_PASSWD to CCOPTIONS +XCOMM If your site is using Passwd Etc, add -DHP_PASSWDETC to CCOPTIONS + CCOPTIONS += -Aa -D_HPUX_SOURCE -DSYSV +#else + CCOPTIONS += -DHAS_USLEEP +#endif +EXTRA_LIBRARIES = -lXhp11 +XCOMM Use this one instead if your site is using Passwd Etc: +XCOMM EXTRA_LIBRARIES = -lrgy -lnck -lndbm -lXhp11 + ICONTYPE = hp +#else +#ifdef SparcArchitecture + ICONTYPE = sun +#else +XCOMM CCOPTIONS += -DOFS1_ENH_SEC +#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(i386BsdArchitecture) + CCOPTIONS += -DHAS_USLEEP + ICONTYPE = bsd +#else +#ifdef LinuxArchitecture + CCOPTIONS += -DHAS_USLEEP + ICONTYPE = linux +#else +#ifdef SGIArchitecture + ICONTYPE = sgi +#else + ICONTYPE = x11 +#endif +#endif +#endif +#endif +#endif +#endif + +XCOMM For labs you may want to consider: +XCOMM -DFORCE_BOMB only allow bomb mode +XCOMM -DAUTO_LOGOUT enable auto-logout code +XCOMM -DLOGOUT_BUTTON enable logout button +XCOMM -DLO_BUTTON_TIME=5 minutes until logout button appears +XCOMM -DALWAYS_ALLOW_ROOT users can't turn off allowroot +XCOMM -DSTAFF_FILE=\"/etc/xlock.staff\" file of staff who are exempt + +XCOMM CCOPTIONS += -DAUTO_LOGOUT +XCOMM CCOPTIONS += -DLOGOUT_BUTTON -DLO_BUTTON_TIME=5 +XCOMM CCOPTIONS += -DSTAFF_FILE=\"/etc/xlock.staff\" + CCOPTIONS += -DALWAYS_ALLOW_ROOT + +XCOMM Here is your chance to override the default icon: + LIFEICON = $(ICONTYPE) + MAZEICON = $(ICONTYPE) + IMAGEICON = $(ICONTYPE) + +XCOMM You may want to concatenate this to the following the DEFINES statement +XCOMM -DFORCE_BOMB -DSTAFF_FILE=\"/etc/xlock.staff\" + DEFINES = -DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" -DUSE_VROOT + DEPLIBS = $(DEPXLIB) +LOCAL_LIBRARIES = $(XLIB) + LINTLIBS = $(LINTXLIB) +#if HasLibCrypt + CRYPTLIB = -lcrypt +#endif + SYS_LIBRARIES = MathLibrary $(CRYPTLIB) $(SHADOWLIB) +#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) + INSTPGMFLAGS = -s -m 4751 +#endif + HDRS = xlock.h + SRCS = xlock.c hsbramp.c resource.c usleep.c logout.c\ + hopalong.c qix.c life.c\ + swarm.c rotor.c pyro.c flame.c worm.c\ + spline.c maze.c sphere.c hyper.c\ + helix.c rock.c blot.c\ + grav.c bounce.c world.c rect.c bat.c\ + galaxy.c kaleid.c wator.c life3d.c swirl.c\ + image.c bomb.c blank.c + OBJS = xlock.o hsbramp.o resource.o usleep.o logout.o\ + hopalong.o qix.o life.o\ + swarm.o rotor.o pyro.o flame.o worm.o\ + spline.o maze.o sphere.o hyper.o\ + helix.o rock.o blot.o\ + grav.o bounce.o world.o rect.o bat.o\ + galaxy.o kaleid.o wator.o life3d.o swirl.o\ + image.o bomb.o blank.o + +AllTarget(xlock) +depend:: life.xbm maze.xbm image.xbm +ComplexProgramTarget(xlock) +InstallAppDefaults(XLock) + +clean:: + $(RM) life.xbm image.xbm maze.xbm + +clean.all:: clean + $(RM) Makefile + +#if ProjectX < 6 +life.c: life.xbm +maze.c: maze.xbm +image.c: image.xbm +#endif + +life.xbm: + $(RM) life.xbm + $(LN) ${BITMAPDIR}/life-$(LIFEICON).xbm life.xbm + +maze.xbm: + $(RM) maze.xbm + $(LN) ${BITMAPDIR}/maze-$(MAZEICON).xbm maze.xbm + +image.xbm: + $(RM) image.xbm + $(LN) ${BITMAPDIR}/image-$(IMAGEICON).xbm image.xbm diff --git a/Makefile.hp b/Makefile.hp new file mode 100644 index 00000000..ba674321 --- /dev/null +++ b/Makefile.hp @@ -0,0 +1,132 @@ +# @(#)Makefile 1.9 91/09/27 XLOCK + +ICONTYPE = hp +LIFEICON = ${ICONTYPE} +MAZEICON = ${ICONTYPE} +IMAGEICON = ${ICONTYPE} + +# Set your C compiler +#CC = gcc +CC = cc + +# X include files +#XINCLUDEPATH = /usr/local/include +#XINCLUDEPATH = /usr/include/X11R4 +XINCLUDEPATH = /usr/include/X11R5 +#XINCLUDEPATH = ${OPENWINHOME}/include +#XINCLUDEPATH = ${MOTIFHOME}/include + +# X libraries +#XLIBPATH = /usr/local/lib +#XLIBPATH = /usr/lib/X11R4 +XLIBPATH = /usr/lib/X11R5 +#XLIBPATH = ${OPENWINHOME}/lib +#XLIBPATH = ${MOTIFHOME}/lib + +BITMAPDIR = ./bitmaps +############################################################## + +# The directory where your app-defaults directory is: +LIBDIR = /usr/local/lib/X11 + +INCLUDES = -I${XINCLUDEPATH} -I. +LIBRARIES = -L${XLIBPATH} + +# Use -DHAS_SHADOW if you are using shadow passwords +# Use -DHPUX_SECURE_PASSWD if you are using HP-UX with Secured Passwords +# Use -DHP_PASSWDETC if you are using Passwd Etc +# +# For labs you may want to consider: +# -DFORCE_BOMB only allow bomb mode +# -DAUTO_LOGOUT enable auto-logout code +# -DLOGOUT_BUTTON enable logout button +# -DLO_BUTTON_TIME=5 minutes until logout button appears +# -DALWAYS_ALLOW_ROOT users can't turn off allowroot +# -DSTAFF_FILE=\"/etc/xlock.staff\" file of staff who are exempt + +DEFINES = -DUSE_VROOT -DALWAYS_ALLOW_ROOT -DHAS_RAND48\ + -DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" +# -DAUTO_LOGOUT -DLOGOUT_BUTTON -DLO_BUTTON_TIME=5\ +# -DSTAFF_FILE=\"/etc/xlock.staff\" +# -DHAS_RAND\ +# -DHAS_RANDOM\ +# -DHAS_SHADOW\ + +COPT = -O +CFLAGS = ${COPT} ${DEFINES} ${INCLUDES} -DSYSV -D__hpux + +# Use -lcrypt if using special encryption +# Use -lshadow if you are using shadow passwords +# Use -lrgy -lnck -lndbm if you're using PasswdEtc +LIBS = ${LIBRARIES} -lXhp11 -lX11 -lm +#LIBS = ${LIBRARIES} -lXhp11 -lX11 -lm -lcrypt -lshadow +#LIBS = ${LIBRARIES} -lrgy -lnck -lndbm -lXhp11 -lX11 -lm + +HDRS = xlock.h +SRCS = xlock.c hsbramp.c usleep.c resource.c logout.c\ + hopalong.c qix.c life.c\ + swarm.c rotor.c pyro.c flame.c worm.c\ + spline.c maze.c sphere.c hyper.c\ + helix.c rock.c blot.c\ + grav.c bounce.c world.c rect.c bat.c\ + galaxy.c kaleid.c wator.c life3d.c\ + swirl.c image.c bomb.c blank.c +OBJS =${SRCS:.c=.o} +PROGRAM = xlock +VER = ${PROGRAM}more + + +all: ${OBJS} + ${CC} ${COPT} -o ${PROGRAM} ${OBJS} ${LIBS} + +debug: xlock +#debug:=COPT=-g -DDEBUG + +#resource.o:=DEFINES=-DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" + +life.c: life.xbm +maze.c: maze.xbm +image.c: image.xbm + +life.xbm: + rm -f life.xbm + ln -s ${BITMAPDIR}/life-$(LIFEICON).xbm life.xbm + +maze.xbm: + rm -f maze.xbm + ln -s ${BITMAPDIR}/maze-$(MAZEICON).xbm maze.xbm + +image.xbm: + rm -f image.xbm + ln -s ${BITMAPDIR}/image-$(IMAGEICON).xbm image.xbm + +tar: clean.all + cd .. ; tar cvf ${VER}.tar ${VER}/* + +compress: tar + cd .. ; compress -f ${VER}.tar + +gzip: tar + cd .. ; gzip -f ${VER}.tar + +tgz: tar + cd .. ; gzip -c ${VER}.tar > `echo ${VER} | cut -c1-8`.tgz ;\ + rm -f ${VER}.tar + +man: + nroff -man ${PROGRAM}.man | more + +read: + more README + +lint: + lint -ax -DLINT ${DEFINES} ${INCLUDES} ${SRCS} + +clean: + rm -f *.o ${PROGRAM} core *~ *% *.bak life.xbm maze.xbm image.xbm + +clean.all: clean + rm -f Makefile + +install: ${PROGRAM} + install ${PROGRAM} /usr/local/bin diff --git a/Makefile.imake b/Makefile.imake new file mode 100644 index 00000000..fe1f617d --- /dev/null +++ b/Makefile.imake @@ -0,0 +1,14 @@ + TOP = ./../.. + MV = mv + RM = rm -f + UTILSRC = $(TOP)/util + IMAKESRC = $(UTILSRC)/imake + IRULESRC = $(UTILSRC)/imake.includes + IMAKE = $(IMAKESRC)/imake + IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl \ + -I$(NEWTOP)$(IRULESRC) \ + -s Makefile + +Makefile:: Imakefile + -$(RM) Makefile.bak; $(MV) Makefile Makefile.bak + $(IMAKE_CMD) -DTOPDIR=$(TOP) diff --git a/Makefile.std b/Makefile.std new file mode 100644 index 00000000..1dd83f2d --- /dev/null +++ b/Makefile.std @@ -0,0 +1,129 @@ +# @(#)Makefile 1.9 91/09/27 XLOCK + +ICONTYPE = x11 +LIFEICON = ${ICONTYPE} +MAZEICON = ${ICONTYPE} +IMAGEICON = ${ICONTYPE} + +# Set your C compiler +#CC = gcc +CC = cc + +# X include files +XINCLUDEPATH = /usr/local/include +#XINCLUDEPATH = /usr/include/X11R4 +#XINCLUDEPATH = /usr/include/X11R5 +#XINCLUDEPATH = ${OPENWINHOME}/include +#XINCLUDEPATH = ${MOTIFHOME}/include + +# X libraries +XLIBPATH = /usr/local/lib +#XLIBPATH = /usr/lib/X11R4 +#XLIBPATH = /usr/lib/X11R5 +#XLIBPATH = ${OPENWINHOME}/lib +#XLIBPATH = ${MOTIFHOME}/lib + +BITMAPDIR = ./bitmaps +############################################################## + +# The directory where your app-defaults directory is: +LIBDIR = /usr/local/lib/X11 + +INCLUDES = -I${XINCLUDEPATH} -I. +LIBRARIES = -L${XLIBPATH} + +# Use -DHAS_SHADOW if you are using shadow passwords +# +# For labs you may want to consider: +# -DFORCE_BOMB only allow bomb mode +# -DAUTO_LOGOUT enable auto-logout code +# -DLOGOUT_BUTTON enable logout button +# -DLO_BUTTON_TIME=5 minutes until logout button appears +# -DALWAYS_ALLOW_ROOT users can't turn off allowroot +# -DSTAFF_FILE=\"/etc/xlock.staff\" file of staff who are exempt + +DEFINES = -DUSE_VROOT -DALWAYS_ALLOW_ROOT\ + -DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" +# -DAUTO_LOGOUT -DLOGOUT_BUTTON -DLO_BUTTON_TIME=5\ +# -DSTAFF_FILE=\"/etc/xlock.staff\" +# -HAS_RAND\ +# -HAS_RANDOM\ +# -HAS_RAND48\ +# -DHAS_SHADOW\ + +COPT = -O +CFLAGS = ${COPT} ${DEFINES} ${INCLUDES} + +# Use -lcrypt if using special encryption +# Use -lshadow if you are using shadow passwords +LIBS = ${LIBRARIES} -lX11 -lm +#LIBS = ${LIBRARIES} -lX11 -lm -lcrypt -lshadow + +HDRS = xlock.h +SRCS = xlock.c hsbramp.c usleep.c resource.c logout.c\ + hopalong.c qix.c life.c\ + swarm.c rotor.c pyro.c flame.c worm.c\ + spline.c maze.c sphere.c hyper.c\ + helix.c rock.c blot.c\ + grav.c bounce.c world.c rect.c bat.c\ + galaxy.c kaleid.c wator.c life3d.c\ + swirl.c image.c bomb.c blank.c +OBJS =${SRCS:.c=.o} +PROGRAM = xlock +VER = ${PROGRAM}more + + +all: ${OBJS} + ${CC} ${COPT} -o ${PROGRAM} ${OBJS} ${LIBS} + +debug: xlock +#debug:=COPT=-g -DDEBUG + +#resource.o:=DEFINES=-DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" + +life.c: life.xbm +maze.c: maze.xbm +image.c: image.xbm + +life.xbm: + rm -f life.xbm + ln -s ${BITMAPDIR}/life-$(LIFEICON).xbm life.xbm + +maze.xbm: + rm -f maze.xbm + ln -s ${BITMAPDIR}/maze-$(MAZEICON).xbm maze.xbm + +image.xbm: + rm -f image.xbm + ln -s ${BITMAPDIR}/image-$(IMAGEICON).xbm image.xbm + +tar: clean.all + cd .. ; tar cvf ${VER}.tar ${VER}/* + +compress: tar + cd .. ; compress -f ${VER}.tar + +gzip: tar + cd .. ; gzip -f ${VER}.tar + +tgz: tar + cd .. ; gzip -c ${VER}.tar > `echo ${VER} | cut -c1-8`.tgz ;\ + rm -f ${VER}.tar + +man: + nroff -man ${PROGRAM}.man | more + +read: + more README + +lint: + lint -ax -DLINT ${DEFINES} ${INCLUDES} ${SRCS} + +clean: + rm -f *.o ${PROGRAM} core *~ *% *.bak life.xbm maze.xbm image.xbm + +clean.all: clean + rm -f Makefile + +install: ${PROGRAM} + install ${PROGRAM} /usr/local/bin diff --git a/Makefile.sun b/Makefile.sun new file mode 100644 index 00000000..a816f458 --- /dev/null +++ b/Makefile.sun @@ -0,0 +1,130 @@ +# @(#)Makefile 1.9 91/09/27 XLOCK + +ICONTYPE = sun +LIFEICON = ${ICONTYPE} +MAZEICON = ${ICONTYPE} +IMAGEICON = ${ICONTYPE} + +# Set your C compiler +#CC = gcc +CC = cc + +# X include files +#XINCLUDEPATH = /usr/local/include +#XINCLUDEPATH = /usr/include/X11R4 +#XINCLUDEPATH = /usr/include/X11R5 +XINCLUDEPATH = ${OPENWINHOME}/include +#XINCLUDEPATH = ${MOTIFHOME}/include + +# X libraries +#XLIBPATH = /usr/local/lib +#XLIBPATH = /usr/lib/X11R4 +#XLIBPATH = /usr/lib/X11R5 +XLIBPATH = ${OPENWINHOME}/lib +#XLIBPATH = ${MOTIFHOME}/lib + +BITMAPDIR = ./bitmaps +############################################################## + +# The directory where your app-defaults directory is: +LIBDIR = /usr/local/lib/X11 + +INCLUDES = -I${XINCLUDEPATH} -I. +LIBRARIES = -L${XLIBPATH} + +# Use -DHAS_SHADOW if your using shadow passwrds w/o Solaris 2.x +# Use -DSOLARIS_SHADOW if your using Solaris 2.x +# For labs you may want to consider: +# -DFORCE_BOMB only allow bomb mode +# -DAUTO_LOGOUT enable auto-logout code +# -DLOGOUT_BUTTON enable logout button +# -DLO_BUTTON_TIME=5 minutes until logout button appears +# -DALWAYS_ALLOW_ROOT users can't turn off allowroot +# -DSTAFF_FILE=\"/etc/xlock.staff\" file of staff who are exempt + +DEFINES = -DUSE_VROOT -DALWAYS_ALLOW_ROOT -DHAS_RAND48\ + -DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" +# -DAUTO_LOGOUT -DLOGOUT_BUTTON -DLO_BUTTON_TIME=5\ +# -DSTAFF_FILE=\"/etc/xlock.staff\" +# -DHAS_RAND\ +# -DHAS_RANDOM\ +# -DHAS_SHADOW\ +# -DSOLARIS_SHADOW\ + +COPT = -O +CFLAGS = ${COPT} ${DEFINES} ${INCLUDES} + +# Use -lcrypt if using special encryption +# Use -lshadow if your using shadow passwords (i.e. Solaris 2.x) +# Use -lnsl -lsocket if your using Solaris 2.x's cc +LIBS = ${LIBRARIES} -lX11 -lm +#LIBS = ${LIBRARIES} -lX11 -lm -lcrypt -lshadow -lnsl -lsocket + +HDRS = xlock.h +SRCS = xlock.c hsbramp.c usleep.c resource.c logout.c\ + hopalong.c qix.c life.c\ + swarm.c rotor.c pyro.c flame.c worm.c\ + spline.c maze.c sphere.c hyper.c\ + helix.c rock.c blot.c\ + grav.c bounce.c world.c rect.c bat.c\ + galaxy.c kaleid.c wator.c life3d.c\ + swirl.c image.c bomb.c blank.c +OBJS =${SRCS:.c=.o} +PROGRAM = xlock +VER = ${PROGRAM}more + + +all: ${OBJS} + ${CC} ${COPT} -o ${PROGRAM} ${OBJS} ${LIBS} + +debug: xlock +#debug:=COPT=-g -DDEBUG + +#resource.o:=DEFINES=-DDEF_FILESEARCHPATH=\"$(LIBDIR)/%T/%N%S\" + +life.c: life.xbm +maze.c: maze.xbm +image.c: image.xbm + +life.xbm: + rm -f life.xbm + ln -s ${BITMAPDIR}/life-$(LIFEICON).xbm life.xbm + +maze.xbm: + rm -f maze.xbm + ln -s ${BITMAPDIR}/maze-$(MAZEICON).xbm maze.xbm + +image.xbm: + rm -f image.xbm + ln -s ${BITMAPDIR}/image-$(IMAGEICON).xbm image.xbm + +tar: clean.all + cd .. ; tar cvf ${VER}.tar ${VER}/* + +compress: tar + cd .. ; compress -f ${VER}.tar + +gzip: tar + cd .. ; gzip -f ${VER}.tar + +tgz: tar + cd .. ; gzip -c ${VER}.tar > `echo ${VER} | cut -c1-8`.tgz ;\ + rm -f ${VER}.tar + +man: + nroff -man ${PROGRAM}.man | more + +read: + more README + +lint: + lint -ax -DLINT ${DEFINES} ${INCLUDES} ${SRCS} + +clean: + rm -f *.o ${PROGRAM} core *~ *% *.bak life.xbm maze.xbm image.xbm + +clean.all: clean + rm -f Makefile + +install: ${PROGRAM} + install ${PROGRAM} /usr/local/bin diff --git a/README b/README new file mode 100644 index 00000000..de3d9083 --- /dev/null +++ b/README @@ -0,0 +1,319 @@ +xlockmore: the UNofficial version of xlock, see Revisions for version # +Primary site: ftp.x.org in /contrib/applications +Maintainer: David A. Bagley +Adapted from Patrick J. Naughton's original (and official) xlock. + +How to build? + + Check below to see if your machine is one mentioned that causes + problems, otherwise it should be easy. + + Only if your using X11R6 then: + xmkmf + make depend + make + ./xlock -mode spline + + If your using X11R5 then: + xmkmf + make + ./xlock -mode spline + + If your using X11R4 then: + mv Imakefile Imakefile.r5 + sed 's/^XCOMM/\/\*\*\/#/' > Imakefile < Imakefile.r5 + xmkmf + make + ./xlock -mode spline + + Note: if you don't have 'xmkmf' or the "Makefile" it generates + doesn't work well, edit Makefile.std for appropriate settings for + XINCLUDEPATH and XLIBPATH, then try: + make -f Makefile.std + ./xlock -mode spline + +Likely problems: + + Solaris2.x users: + The logout features (see Public Lab Administrators) do not give + the login prompt back after a user is logged out. + Imake will compile with the -DSOLARIS_SHADOW switch. + -allowroot does not work, but otherwise xlock should work + for both local, NIS and NIS+ passwords. + Is it possible to handle the root case for all configurations? + With Gnu's gcc, get rid of the "-ansi" during compilation. + With Sun's unbundled cc, compile with a "-DSVR4" and link with + "-lnsl -lsocket". + + Solaris2.3 and greater users: + The logout features (see Public Lab Administrators) do not give + the prompt back. + Adjust the Imakefile to compile with HAS_NANOSLEEP. Also need to + link with -lnsl -lposix4. With this, less CPU cycles are + wasted and usleep is a lot more accurate (!). + Solaris2.4 users: + xlock will dump core if xlock is not setuid root. + + ESIX users: + Similar to Solaris2.x. You will need a -DSVR4 to compile. + chmod 440 /etc/shadow + if you get libX11.so.xxx not found + link with the static versions of the X libraries + random() may be buggy use the one from GNU. + chmod 2755 xlock + + XFree86 users: + Control-Alt-Backspace will defeat locking mechanism and return your + console back unless you put "DontZap" in your XF86Config file. + (In X11R5, that would be a "dontzap" in your Xconfig file). + Control-Alt-F1 (among others) will defeat locking mechanism with + virtual terminals. This is not too good, right? If your using + Linux, try vlock on tsx-11.mit.edu in /pub/linux/sources/usr.bin . + I hear that XFree86 3.2 when it comes out MAY have a server + extension for catching or disabling VT switching. Any ideas in the + meanwhile? + + Linux users: + If you are using shadow passwords make sure you: + chown root.shadow xlock + chmod 2755 xlock + Also check that the following was done: + chown root.shadow /etc/shadow + chmod 440 /etc/shadow + So far, Slackware (a major Linux distribution) does NOT come with shadow + passwords standard. If you want to install shadow passwords (be + careful, it can be tricky) it's on sunsite.unc.edu in + /pub/Linux/system/Admin . + + FreeBSD users: + One may have to make xlock setuid root (are there any objections?). + + Alpha-OSF/1 enhanced security users: + Compile with -DOFS1_ENH_SEC see Imakefile + chown auth.auth xlock + chmod 2755 xlock + + HP users: + Shift-Control-Break is caught. + + HP-UX with Secured Passwords: + Compile with -DHPUX_SECURE_PASSWD and have xlock setuid to root. + HP-UX with Passwd Etc: + Compile with -DHP_PASSWDETC . + Link with -lrgy -lnck -lndbm . + + X-Terminal users (my heart bleeds for you): + To get xlock to run, run with -remote option or set XLock.remote on + in XLock.ad. + + VAX/VMS users: + All you should need to do to build the executable is type @make + To run xlock a symbol needs to be defined, for example: + XLOCK:==$H268SYSEXE:XLOCK + where H268SYSEXE is a logical name pointing to the directory where + XLOCK.EXE resides. The '$' after == means this is a foreign command + and VMS makes the command line available to the program. + + worm may look a bit strange, since the scaling is wrong. + -allowroot only works if you have SYSPRV enabled which is a bit limiting. + + The XLock file normally in /usr/lib/X11/app-defaults needs to be in the + directory DECW$SYSTEM_DEFAULTS on VMS systems and be called + 'DECW$XLOCK.DAT'. + + tvtwm users: + One used to get following error when running xlock (+nolock) with + tvtwm. + + X Error of failed request: BadWindow (invalid Window parameter) + + What happens is that RootWindow(dsp, screen) fails when tvtwm is + running. There is a kludge fix, but multiscreens will not work + right with tvtwm and xlock. (grep on TVTWM in xlock.c). + Another option, don't compile with -DUSE_VROOT . If you debug it + mail ME -OR- both the author of tvtwm and ME the patch. + + StickyAbove problems: + Windows in a tvtwm that have "StickyAbove" set to true are still + visible when xlock (+inroot) is running. If this bothers you, + don't compile with -DUSE_VROOT . Is it possible to have + "StickyAbove" xlock set to true too? + + fvwm users: + -install does not work right. fvwm will not allow an application + to install its own colormap. + + swirl: + I hear it LOCKS UP on i386BsdArchitecture and tvtwm. + With twm (and possibly fvwm on machines with FreeBSD) the colormap + does change. + + Public Lab Administrators: + The auto logout feature, when enabled, will log out a user after + 30 minutes (by default). The timeout can be changed or disabled + with a command-line option (or x resource -- this is allowed because + the logout button can always be used; see below). The time + remaining before auto-logout is displayed on the password entry + screen. + + The logout button, when enabled, is a button that appears on the + password entry screen after 5 minutes (configurable at + compile-time) that, when clicked, logs out the user. The rationale + for this thing is that in a lab environment, we wanted a way for + users to be able to reliably lock their display for short periods + of time, but still be allowed to have the display locked for longer + than that if the lab isn't busy. If the lab IS busy, and there is + a need for workstations, the logout button can be used to logout + someone who's been gone for more than 5 minutes. + + "bomb.c" contains a simple hack to provide a time-limited lock mode, + at the end of which the user will be logged out. One can force the + use of this when the screen is locked. This is probably no longer + useful, since have the above method and will probably disappear in + the next release. + + Of course, the auto-logout, the logout button, and the forcing of + bomb are enabled/disabled by compile-time defines. All these are + OFF by default. One can also force use these features with a local + policy of exemptions (e.g. username or group). See the Imakefile or + a Makefile file for an example. Edit your /etc/xlock.staff file to + reflect your policy. + + Don't PANIC, random will not run bomb, image, or blank, unless forcing + is used, then of course, bomb will always run. The auto-logout, + the logout button, and bomb will not run if you are root. Otherwise, + it will kill all of root's processes, not a good idea. + + I noticed with Solaris2.3 when logged out through the use of a button, + auto-logout, or now bomb, one does not get a login prompt back. + Therefore, this is quite useless. (I get it back by remotely logging + in as root and running X and then killing it.) Any fixes or work + arounds for this would be great. + + If bomb is forced, you can still run the other locks in -inwindow or + -nolock. In bomb, you can not increase the delay for longer than + 1 second. + + xlock still does not work :-( : + If all that does not work you may need to adjust xlock.h, usleep.c, + xlock.c, and resource.c since these files are highly implementation + dependent. If you have to make this kind of change to get it working, + let me know. + +All done and xlock works :-) : + You may want to compile xlock.c using -DMOUSEMOTION, then xlock will + respond to (you guessed it) the motion of the mouse. This is not + recommended if your using a virtual desktop; a default root window that + may be larger than the physical displayed resolution on your screen. + You may want to change the 1st line of XLock.ad "blank" to "random", + "life", or whatever your favorite is and copy it to + /usr/lib/X11/app-defaults or $HOME (or wherever your application + defaults files are) and rename to XLock . + You may want to move xlock into /usr/bin/X11 (or wherever your X + binaries are). + You may also want to move xlock.man to /usr/man/mann/xlock.n . + You may want to try xautolock. It runs xlock after a user defined + idle time. Its at ftp.x.org in /R5contrib, but I do not maintain it. + +Operation: (Blurb taken from Darren Senn's xlock) + + Under X, run xlock. The screen will clear, and some pretty animated + picture (exactly which depends on which module is active) will appear + on the screen. If you hit a key, then the screen will clear, and + (unless you've changed the application defaults file that I packaged + with this) you'll get a white screen with some graphics in the top + center. These graphics consist of a reduced size image of the module + you were viewing, the name of the user who executed xlock, and + password prompt field, and some short instructions. + + At this point, you can either click on the graphic to return to xlock, + or you can type a password. If the password is verifiable as the + root password, or the password of the user listed above, then xlock + will terminate. THIS IS THE ONLY WAY TO STOP XLOCK WITHOUT SHUTTING + DOWN THE X SERVER. That's what makes it a lock. + +Resources: (Also taken from Darren Senn's xlock) + + There are two sets of resources for XLock. The first set are (what I + call) global XLock resources, while the second set consists of + module-specific resources. I'll get more into modules a little further + below. + + The global resources are: + XLock.mode: This sets the module. More about this later. + XLock.font: This is the font used on the password entry screen. + XLock.background: The background color for the password entry screen. + XLock.foreground: The foreground color for the password entry screen. + XLock.username: The label for the field indicating the user name. + XLock.password: The label for the password prompt. + XLock.info: The "short instructions" to print. + XLock.validate: A message to display while checking the password + XLock.invalid: A message to display if the password is incorrect + XLock.nice: How much XLock should nice itself. + XLock.timeout: How long to wait idle at the password prompt. + XLock.timeelapsed: Message to see how long lock running (yes or no) + XLock.mono: Monochrome mode (yes or no) + XLock.nolock: disable the lock mechanism (yes or no) + XLock.remote: allow remote locking (meaningless under linux) + XLock.allowroot: allow the root password to unlock (yes or no) + XLock.enablesaver: allow the system screensaver to work (yes or no) + XLock.allowaccess: allow other clients to connect while active + XLock.echokeys: Echo "?" for each password keypress (yes or no) + XLock.usefirst: Ignore the first character typed (yes or no) + XLock.verbose: Verbose mode. (yes or no) + XLock.inwindow: allow the xlock to run in a window (yes or no) + XLock.inroot: allow the xlock to run in the root window (yes or no) + XLock.grabmouse: Grab the keyboard and mouse (yes or no) + + Xlock has a number of modules which it can display. (See the man page + for a complete list). It turns out that each module is characterized + by a number of initializations, separated by a number of "draws". + Each module has the following resources defined: + + XLock..delay: How long to wait between draws (usec) + XLock..batchcount: May mean various things (see man page). + XLock..saturation: Saturation (as in HSV) of colors to use. + +Acknowledgments: + + I did not write the original algorithms in any of the lock screens + (except wator), although I did convert many of the new ones to run + with xlock. I tried to follow the original style of Patrick Naughton. + Updates are made at ftp.x.org in directory /contrib/applications. + Many of the additions were "borrowed" from xscreensaver (Jamie Zawinski + jwz@lucid.com). At the time, I had trouble with getting it to compile so + I moved the "interesting" algorithms to xlock. Many of the others were + "borrowed" from old demos from Sun. My favorite of this new bunch is + "spline", "borrowed" from Jef Poskanzer (jef@netcom.com || + jef@well.sf.ca.us). + + I will consider putting new ones in if (1) they are more or less public + domain, (2) they are neat (I am biased towards mathematically based + programs), and (3) I have the time. + +Some open problems: (Suggestions for this would be nice) + + Xlock should check first to make sure it can have access to the + password before locking the screen. If it does not have access + it should suggest something like ... + "Have your administrator setuid xlock to root". + + Some windows (like swirl) should be informed about window movement with + -inroot and -inwindow. + + It would be nice to have an option -idletime time. Where xlock would + run after a certain idle time. (Here xautolock may help you, see + above). + + Penrose tiling lockscreen needed. Anyone have an algorithm out there? + + "swirl" cycles its colors, except black and white. + This is easily seen when on a color monitor one enters: + ./xlock -mode swirl -inwindow + now move the mouse in the window. + If you find this annoying compile swirl.c with -DFORCEFIXEDCOLORS. + + In "bounce" sometimes a ball does not roll off another ball. + + "life3d" draws invisible cubes when it does not have to. The original + PC code weeded this out, but it did not port to X. diff --git a/Revisions b/Revisions new file mode 100644 index 00000000..4fb8c381 --- /dev/null +++ b/Revisions @@ -0,0 +1,276 @@ +xlockmore-2.7 as of 22 February 1995, the UNofficial version of xlock +Adapted from Patrick J. Naughton's original (and official) xlock +Primary site: ftp.x.org in /contrib/applications +Secondary site: sunsite.unc.edu in /pub/Linux/X11/xutils/screensavers +Maintainer: David A. Bagley + +Note: + Unless I hear an objection, bomb.c will vanish with 2.8. + +2.7 + sgi patches and logos from Dave Truesdell . + flame bug fixed thanks to and + . + MANY patches from Heath A. Kehoe include: + The long awaited HP patch. It appears there was a bug in HP's XFlush + function. So XSync was substituted. + maze, swarm, and worm -mono now look better. + Many changes to the Imakefile, new compile time features ... + including a logout button for labs (this appears to be better + implementation than the bomb mode (much of the bomb code has been + reused). Unfortunately, the logout no longer works on Solaris.) + -install option to allow xlock to install its own colormap if it + runs out of colors. + Thanks to for yet another option: + grabmouse for comatablilty with xscreensaver. So you would set + your apps-defaults file for xscreensaver like: + +*programs: xlock -nolock +grabmouse -mode random + + Updated life3d to include shooting gliders. + BSD and Linux icons slightly modified. Also new ships for life. + Compile time options HAS_RAND, HAS_RANDOM, and HAS_RAND48, and + updated the sccsid so `what` will give you something meaningful. + +2.6 + Created a HAS_USLEEP and a USE_VROOT switch. + There were numerous reports of the incompatibility with tvtwm, + (also problems with windows with StickyAbove set to true and + swirl), read the README section on that. + Thanks to Chris Ross , maintainer of tvtwm, for + fixing various bugs; make depend for R5 and less, life3d should not + have malloc.h, and a time-elapsed patch. + A few new life forms for life.c. Anyone know what SMILEY is really + supposed to look like? :) + Revised -inroot does not lock screen, as this is done better with the + following patch, and as someone pointed out, its not intuitive. + Thanks to Tim Medley for sending the -geometry patch of Mike Peercy + . Many of the modes will fail if the windows + are far from square or are too small. You can place Xlock off the + screen, for example, + xlock -enablesaver -mode blank -geometry +1152+0 + puts the window off the visible screen on a Sun. + A new version of flame.c from the original author Scott Graves + . + Something really devilish for BSD (new icons) thanks to J Wunsch + , but they have been modified. I also created a + Linux icon. + A patch for Ultrix systems (at least DECstations) running enhanced + security thanks to Chris Fuhrman and friend. + Multidisplay bug fix for life3d and wator, thanks to + . + Life3d on a monochrome monitor looks a little better. -mono was + working right. + +2.5 + A patch for swirl for fixed color maps (more colorful) and the + image now spirals outwards from the center with a fixed number of + points drawn every iteration, thanks to . + A patch for blot on dual-headed machines and nanosleep, thanks to + Greg Onufer . Use nanosleep on Solaris2.3 + and greater, examine the Imakefile and/or README for details. + A long needed patch for X11R5+ for -delay, -batchcount, and + -saturation to work thanks to Patrick D Sullivan . + bomb mode patch for more flexibility thanks to Dave Shield + . + bomb mode patch for Sun10 thanks to Nicolas Pioch . + modes wator and life3d added. + life now has a random soup pattern stolen from life3d. + -inroot option added, thanks to Bill Woodward . + Now more compatible with xscreensaver if run as + "xlock -mode kaleid -inroot -nolock". + +2.4 + hopalong now includes a sine hop (but less likely to come up). + life now has new organisms. They are now better centered. Some of + the nonperiodic forms were removed. + life's gliders now come from the edge of the screen, usually. + image now centers icons, for example, the hp icon is now centered. + blot now randomly has xsym, ysym, or both. + Solaris should now compile out of the box to handle shadow passwords. + Thanks to Alain Brossard . + rock, grav, rect, bat, world, bounce and swirl fix for 24 bit colors. + Patch for building under HP-UX with Secured Passwords, thanks to + Dale Harris . + +2.3 + Now the X Logo displays if not Sun or HP. + "bat" mode disastrous bug fixed. Thanks to R.K.Lloyd@csc.liv.ac.uk + for pointing it out. + -DMOUSEMOTION switch added for those who want the Password window to + come up if you just moved the mouse. (Not recommended). + "swirl" mode was modified to check background, foreground, and black + so as not to cycle these colors, special thanks to Mark Dobie + . + -DFORCEFIXEDCOLORS switch for those who are annoyed by swirl cycling + its colors. + +2.2 + Made more consistent with the slackware release. XLock.ad changes + to rock, rotor, and foreground and background colors. + Fixed bug in life.c, evident in the Slackware release. + Minor patch for swirl on HP's due to R.K.Lloyd@csc.liv.ac.uk. + "bat" put back with minor changes. + +2.1 + Large modifications to README. + Patch for building under QNX 4.2 w/ Metrolink X server, thanks to + Brian Campbell . + +2.0 + "swirl" mode was added, thanks to Mark Dobie . + WOW, but not-so-neat on monochrome monitors. + Patch for Solaris 2.3 for local, NIS, and NIS+ passwords, thanks to + . + "image" mode was put back but random will not run it, too boring. + "bomb" mode was added, thanks to . + In order to use extra-long passwords with the Linux, changed + PASSLENGTH from 20 to 64. Thanks to . + +1.14 + Multidisplay bug fix for rect, thanks to . + Now works on IRIX on the SGI. Thanks to . + Now works on NetBSD. Thanks to Greg Earle . + Now works on a Alpha 3000/400 OSF/1 V2.0. Thanks to Udo Linauer + . + "galaxy" mode was added, thanks to Hubert Feyrer + . + "kaleid" mode was added, taken from the Linux version of xkaleid. + +1.13 + "timeelapsed" option was added. Allows you to find out how long a + machine is locked so you can complain to an administrator. + Now may work on IRIX on the SGI. Thanks to Thomas Runge + + "bat" mode was added, thanks to Lorenzo Patocchi . + +1.12 + xlock now works on Linux with shadow passwords. Special thanks to + H. J. Dihu + +1.11 + Shadow passwords and DES encryption are now detected by the Imakefile. + Victor Langeveld reorganized the Imakefile for + shadow passwords and crypt. Now should compile "right out of the + box" (although there are still problems on Solaris 2.3). + Patch to fix sudden rotation changes in rock from Yoshiaki Kasahara + . + +1.10 + R.K.Lloyd@csc.liv.ac.uk reorganized the Imakefile yet again. + Fixed a bug in rect.c thanks to . + Ditched bzero and bcopy since both are more generally available as + memset and memcpy. Also removed some lint warnings. + +1.9 + "rect" mode was added from xscreensaver's greynetic. + "helix" bug fixed. It is now more interesting. + bounce.c divide by zero fixed and grav.c improvements. Thanks to Greg + Bowering . + grav.c, rock.c, world.c fixed so no black objects. + +1.8 + Imakefile did not work with R6. Also Solaris2.3 may use SVR4 + instead of SYSV. Thanks to Chris P. Ross + "grav" mode was added. Its a simplistic gravitational simulation, + with (currently a constant 16) solid spheres (non-renderd) of equal + size and mass orbiting a fixed central mass. The sphere's orbit in + 3 dimensions, their position and size being projected with simple + perspective. Thanks to Greg Bowering . + "inwindow" option was added. Allows you to do what xlock already + did when DEBUG was defined. It no longer locks your screen, but + allows you to run xlock as a (somewhat distracting) decoration. + Thanks to Greg Bowering . + "bounce" mode (football) is back. + "world" mode was added. Thanks to Matthew Moyle-Croft + + "image" mode was removed. It was very similar to world anyway. + +1.7 + cuserid() is needed by Solaris2.3 with shadow passwords in xlock.c. + Thanks to Bill . + +1.6 + R.K.Lloyd@csc.liv.ac.uk pointed out again that gray_bits in maze.c needs + a type cast. + xlock.c defaults to "blank" to minimize cpu usage on a network. + +1.5 + xlock works again on VMS (see README.VMS) thanks to Anthony Clarke + . + memcpy and memset definitions for SYSV. Also there now is a switch + for shadow passwords thanks to . + +1.4 + Now works on BSD. Thanks to Victor Langeveld + Both Victor and Alexandre Miguel + suggested taking out the cuserid() call in xlock.c. For FreeBSD its + a necessity and the old way is is a security hole in SunOS. + +1.3 + Linux port from Darren Senn's (sinster@scintilla.capitola.ca.us) xlock. + Fixed drand to random in helix.c + Fixed a memory leak in rock.c. + +1.2 + SHIFT - CONTROL - BREAK on the HP is trapped. Thanks to + R.K.Lloyd@csc.liv.ac.uk who pointed out that this was done in xscreensaver. + AIXV3 and HP bugs fixed, again due to R. K. Lloyd. + +1.1 & 1.0 + took out "rint" from "worm.c" since HP's have trouble with it + added spline, maze, sphere, hyper, helix, rock, & blot modes. + fixed "xlock.h" and "usleep" for the HP. + changed border so it varies with size of screen on "swarm" so the + wasp would not be stuck in a corner when the password is entered. + +------------------------------------------------------------------------------- + +Original author: Patrick J. Naughton +Site: ftp.x.org in /R5contrib +The changes in the original xlock + +This was the latest version of xlock (sccs version 23.21) patchlevel = 2.3 +CHANGES: + o added worm mode. + o old -name and .name changed to -username and .username. + o lint cast. + o change color allocation to allow "#ffaabb" style color names. + o portability bug in flame mode fixed plus some other nits. + o white on black on monochrome screens fixed. + o added -name to allow different resource files to be used. + o added -usefirst to allow first keystroke to be used in password. + o made changes to life mode to allow wrap around. + o made old life cells stay blue. + o added -resources to get default resource file. + o added random mode + o added pyro mode + o added flame mode. + o made passwords a little more secure. + o use effective uid to find current user. + o make main window managed by the wm in debug mode. + o some more SVR4 portability changes. + o resource code now looks at XUSERFILESEARCHPATH and XAPPLRESDIR. + o removed verbose copyright info from each file. + +------------------------------------------------------------------------------- + + Copyright (c) 1988-91 by Patrick J. Naughton. + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation. + + This file is provided AS IS with no warranties of any kind. The author + shall have no liability with respect to the infringement of copyrights, + trade secrets or any patents by this file or any part thereof. In no + event will the author be liable for any lost revenue or profits or + other special, indirect and consequential damages. + + ______________________________________________________________________ + Patrick J. Naughton email: naughton@sun.com + Sun Microsystems Laboratories, Inc. voice: (415) 336 - 1080 + +Maintainer: David A. Bagley diff --git a/XLock.ad b/XLock.ad new file mode 100644 index 00000000..bfa1974d --- /dev/null +++ b/XLock.ad @@ -0,0 +1,122 @@ +XLock.mode: blank +!XLock.mode: random +!XLock.mode: life +XLock.font: -b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*-iso8859-1 +!XLock.background: White +!XLock.foreground: Black +XLock.background: Black +XLock.foreground: AntiqueWhite +XLock.username: Name: +XLock.password: Password: +XLock.info: Enter password to unlock; select icon to lock. +XLock.validate: Validating login... +XLock.invalid: Invalid login. +XLock.nice: 10 +XLock.timeout: 30 +XLock.timeelapsed: off +XLock.mono: off +XLock.nolock: off +XLock.remote: off +XLock.allowroot: off +XLock.enablesaver: off +XLock.install: off +XLock.allowaccess: off +XLock.echokeys: off +XLock.usefirst: off +XLock.verbose: off +XLock.inwindow: off +XLock.inroot: off +XLock.grabmouse: on +XLock.forceLogout: 30 +XLock.logoutButtonLabel: Logout +XLock.logoutButtonHelp: \ +Click the "Logout" button to log out current\n\ +user and make workstation available. +XLock.logoutFailedString: \ +Logout attempt FAILED.\n\ +Current user could not be automatically logged out. + +XLock.hop.delay: 10000 +XLock.hop.batchcount: 1000 +XLock.hop.saturation: 1 +XLock.qix.delay: 30000 +XLock.qix.batchcount: 64 +XLock.qix.saturation: 1 +XLock.life.delay: 750000 +XLock.life.batchcount: 125 +XLock.life.saturation: 1 +XLock.swarm.delay: 10000 +XLock.swarm.batchcount: 100 +XLock.swarm.saturation: 1 +XLock.rotor.delay: 10000 +XLock.rotor.batchcount: 4 +XLock.rotor.saturation: 0.4 +XLock.pyro.delay: 15000 +XLock.pyro.batchcount: 100 +XLock.pyro.saturation: 1 +XLock.flame.delay: 10000 +XLock.flame.batchcount: 20 +XLock.flame.saturation: 1 +XLock.worm.delay: 10000 +XLock.worm.batchcount: 20 +XLock.worm.saturation: 1 +XLock.spline.delay: 30000 +XLock.spline.batchcount: 6 +XLock.spline.saturation: 0.4 +XLock.maze.delay: 10000 +XLock.maze.batchcount: 40 +XLock.maze.saturation: 1 +XLock.sphere.delay: 1000 +XLock.sphere.batchcount: 1 +XLock.sphere.saturation: 1 +XLock.hyper.delay: 10000 +XLock.hyper.batchcount: 1 +XLock.hyper.saturation: 1 +XLock.helix.delay: 10000 +XLock.helix.batchcount: 1 +XLock.helix.saturation: 1 +XLock.rock.delay: 20000 +XLock.rock.batchcount: 100 +XLock.rock.saturation: 1 +XLock.blot.delay: 10000 +XLock.blot.batchcount: 6 +XLock.blot.saturation: 0.4 +XLock.grav.delay: 10000 +XLock.grav.batchcount: 10 +XLock.grav.saturation: 1 +XLock.bounce.delay: 5000 +XLock.bounce.batchcount: 10 +XLock.bounce.saturation: 1 +XLock.world.delay: 100000 +XLock.world.batchcount: 8 +XLock.world.saturation: 0.3 +XLock.rect.delay: 10000 +XLock.rect.batchcount: 100 +XLock.rect.saturation: 1 +XLock.bat.delay: 100000 +XLock.bat.batchcount: 10 +XLock.bat.saturation: 1 +XLock.galaxy.delay: 100 +XLock.galaxy.batchcount: 4 +XLock.galaxy.saturation: 1 +XLock.kaleid.delay: 2000 +XLock.kaleid.batchcount: 16 +XLock.kaleid.saturation: 1 +XLock.wator.delay: 750000 +XLock.wator.batchcount: 4 +XLock.wator.saturation: 1 +XLock.life3d.delay: 1000000 +XLock.life3d.batchcount: 80 +XLock.life3d.saturation: 1 +XLock.swirl.delay: 1000 +XLock.swirl.batchcount: 5 +XLock.swirl.saturation: 1 +XLock.image.delay: 2000000 +XLock.image.batchcount: 8 +XLock.image.saturation: 0.3 +XLock.bomb.delay: 1000000 +XLock.bomb.batchcount: 1 +XLock.bomb.saturation: 1 +XLock.blank.delay: 4000000 +XLock.blank.batchcount: 1 +XLock.blank.saturation: 1 diff --git a/bat.c b/bat.c new file mode 100644 index 00000000..fa84410c --- /dev/null +++ b/bat.c @@ -0,0 +1,401 @@ +#ifndef lint +static char sccsid[] = "@(#)bat.c 2.7 95/02/21 xlockmore"; +#endif + +/*- + * bat.c - A bouncing bat for xlock, the X Window System lockscreen. + * + * Copyright (c) 1988 by Sun Microsystems + * + * See xlock.c for copying information. + * + * Revision History: + * 20-Sep-94: 8 bats instead of bouncing balls, based on bounce.c + (patol@info.isbiel.ch) + * 2-Sep-93: bounce version (David Bagley bagleyd@source.asset.com) + * 1986: Sun Microsystems + */ + +/* original copyright + ****************************************************************************** + Copyright 1988 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the names of Sun or MIT not be + used in advertising or publicity pertaining to distribution of the + software without specific prior written permission. Sun and M.I.T. + make no representations about the suitability of this software for + any purpose. It is provided "as is" without any express or implied warranty. + + SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT + OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE + OR PERFORMANCE OF THIS SOFTWARE. + *****************************************************************************/ + +#include "xlock.h" +#include +#include "bitmaps/bat-0.xbm" +#include "bitmaps/bat-1.xbm" +#include "bitmaps/bat-2.xbm" +#include "bitmaps/bat-3.xbm" +#include "bitmaps/bat-4.xbm" +#include "bitmaps/bat-5.xbm" +#include "bitmaps/bat-6.xbm" +#include "bitmaps/bat-7.xbm" + +#define MAX_STRENGTH 24 +#define FRICTION 15 +#define PENETRATION 0.4 +#define SLIPAGE 4 +#define TIME 32 + +#define ORIENTS 8 +#define ORIENTCYCLE 32 +#define CCW 1 +#define CW (ORIENTS-1) +#define DIR(x) (((x)>=0)?CCW:CW) +#define SIGN(x) (((x)>=0)?1:-1) +#define ABS(x) (((x)>=0)?x:-(x)) +#define TRUE 1 +#define FALSE 0 + +static XImage logo[ORIENTS] = { + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1} +}; + +typedef struct { + int x, y, xlast, ylast; + int spincount, spindelay, spindir, orient; + int vx, vy, vang; + int mass, size, sizex, sizey; + unsigned long color; +} batstruct; + +typedef struct { + int width, height; + int nbats; + batstruct *bats; + GC draw_GC, erase_GC; +} bouncestruct; + +static bouncestruct bounces[MAXSCREENS]; + +static void checkCollision(); +static void drawabat(); +static void movebat(); +static void flapbat(); +static int collide(); +static void XEraseImage(); + +void +initbat(win) + Window win; +{ + XWindowAttributes xgwa; + XGCValues gcv; + Screen *scr; + bouncestruct *bp = &bounces[screen]; + int i; + + logo[0].data = (char *) bat0_bits; + logo[0].width = bat0_width; + logo[0].height = bat0_height; + logo[0].bytes_per_line = (bat0_width + 7) / 8; + logo[1].data = (char *) bat1_bits; + logo[1].width = bat1_width; + logo[1].height = bat1_height; + logo[1].bytes_per_line = (bat1_width + 7) / 8; + logo[2].data = (char *) bat2_bits; + logo[2].width = bat2_width; + logo[2].height = bat2_height; + logo[2].bytes_per_line = (bat2_width + 7) / 8; + logo[3].data = (char *) bat3_bits; + logo[3].width = bat3_width; + logo[3].height = bat3_height; + logo[3].bytes_per_line = (bat3_width + 7) / 8; + logo[4].data = (char *) bat4_bits; + logo[4].width = bat4_width; + logo[4].height = bat4_height; + logo[4].bytes_per_line = (bat4_width + 7) / 8; + logo[5].data = (char *) bat5_bits; + logo[5].width = bat5_width; + logo[5].height = bat5_height; + logo[5].bytes_per_line = (bat5_width + 7) / 8; + logo[6].data = (char *) bat6_bits; + logo[6].width = bat6_width; + logo[6].height = bat6_height; + logo[6].bytes_per_line = (bat6_width + 7) / 8; + logo[7].data = (char *) bat7_bits; + logo[7].width = bat7_width; + logo[7].height = bat7_height; + logo[7].bytes_per_line = (bat7_width + 7) / 8; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + scr = ScreenOfDisplay(dsp, screen); + bp->width = xgwa.width; + bp->height = xgwa.height; + + gcv.background = BlackPixelOfScreen(scr); + bp->draw_GC = XCreateGC(dsp, win, GCForeground|GCBackground, &gcv); + bp->erase_GC = XCreateGC(dsp, win, GCForeground|GCBackground, &gcv); + if (batchcount < 1) + batchcount = 1; + bp->nbats =batchcount; + if (!bp->bats) + bp->bats = (batstruct *) malloc(batchcount * sizeof(batstruct)); + i = 0; + while (i < bp->nbats) { + if (logo[0].width > bp->width / 2 || logo[0].height > bp->height / 2) { + bp->bats[i].sizex = 7; + bp->bats[i].sizey = 3; + bp->bats[i].size = (bp->bats[i].sizex + bp->bats[i].sizey) / 2; + } else { + bp->bats[i].sizex = logo[0].width; + bp->bats[i].sizey = logo[0].height; + bp->bats[i].size = (bp->bats[i].sizex + bp->bats[i].sizey) / 2; + } + bp->bats[i].vx = ((RAND() % 2) ? -1 : 1) * + (RAND() % MAX_STRENGTH + 1); + bp->bats[i].x = (bp->bats[i].vx >= 0) ? + 0 : bp->width - bp->bats[i].sizex; + bp->bats[i].y = RAND() % (bp->height / 2); + if (i == collide(i)) { + if (!mono && Scr[screen].npixels > 2) + bp->bats[i].color = + Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + bp->bats[i].color = WhitePixel(dsp, screen); + bp->bats[i].xlast = -1; + bp->bats[i].ylast = 0; + bp->bats[i].spincount = 1; + bp->bats[i].spindelay = 1; + bp->bats[i].vy = ((RAND() % 2) ? -1 : 1) * (RAND() % MAX_STRENGTH); + bp->bats[i].spindir = 0; + bp->bats[i].vang = 0; + bp->bats[i].orient = RAND() % ORIENTS; + i++; + } else + bp->nbats--; + } + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, bp->width, bp->height); + XSetForeground(dsp, bp->erase_GC, BlackPixel(dsp, screen)); +} + +static void checkCollision(a_bat) + int a_bat; +{ + bouncestruct *bp = &bounces[screen]; + int i, amount, spin, d, size; + double x, y; + + for (i = 0; i < bp->nbats; i++) { + if (i != a_bat) { + x = (double) (bp->bats[i].x - bp->bats[a_bat].x); + y = (double) (bp->bats[i].y - bp->bats[a_bat].y); + d = (int) sqrt(x * x + y * y); + size = (bp->bats[i].size + bp->bats[a_bat].size) / 2; + if (d > 0 && d < size) { + amount = size - d; + if (amount > PENETRATION * size) + amount = PENETRATION * size; + bp->bats[i].vx += amount * x / d; + bp->bats[i].vy += amount * y / d; + bp->bats[i].vx -= bp->bats[i].vx / FRICTION; + bp->bats[i].vy -= bp->bats[i].vy / FRICTION; + bp->bats[a_bat].vx -= amount * x / d; + bp->bats[a_bat].vy -= amount * y / d; + bp->bats[a_bat].vx -= bp->bats[a_bat].vx / FRICTION; + bp->bats[a_bat].vy -= bp->bats[a_bat].vy / FRICTION; + spin = (bp->bats[i].vang - bp->bats[a_bat].vang) / + (2 * size * SLIPAGE); + bp->bats[i].vang -= spin; + bp->bats[a_bat].vang += spin; + bp->bats[i].spindir = DIR(bp->bats[i].vang); + bp->bats[a_bat].spindir = DIR(bp->bats[a_bat].vang); + if (!bp->bats[i].vang) { + bp->bats[i].spindelay = 1; + bp->bats[i].spindir = 0; + } else + bp->bats[i].spindelay = M_PI * bp->bats[i].size / + (ABS(bp->bats[i].vang)) + 1; + if (!bp->bats[a_bat].vang) { + bp->bats[a_bat].spindelay = 1; + bp->bats[a_bat].spindir = 0; + } else + bp->bats[a_bat].spindelay = M_PI * bp->bats[a_bat].size / + (ABS(bp->bats[a_bat].vang)) + 1; + return; + } + } + } +} + +void +drawbat(win) + Window win; +{ + bouncestruct *bp = &bounces[screen]; + int i; + static restartnum = TIME; + + for (i = 0; i < bp->nbats; i++) { + drawabat(win, &bp->bats[i]); + movebat(&bp->bats[i]); + } + for (i = 0; i < bp->nbats; i++) + checkCollision(i); + if (!(RAND() % TIME)) /* Put some randomness into the time */ + restartnum--; + if (!restartnum) { + initbat(win); + restartnum = TIME; + } + +} + +static void +drawabat(win, bat) + Window win; + batstruct *bat; +{ + bouncestruct *bp = &bounces[screen]; + + XSetForeground(dsp, bp->draw_GC, bat->color); + if (bat->sizex < logo[0].width) { + if (bat->xlast != -1) + XFillRectangle(dsp, win, bp->erase_GC, + bat->xlast, bat->ylast, bat->sizex, bat->sizey); + XFillRectangle(dsp, win, bp->draw_GC, + bat->x, bat->y, bat->sizex, bat->sizey); + } else { + XPutImage(dsp, win, bp->draw_GC, &logo[bat->orient], + 0, 0, bat->x, bat->y, bat->sizex, bat->sizey); + if (bat->xlast != -1) + XEraseImage(dsp, win, bp->erase_GC, + bat->x, bat->y, + bat->xlast, bat->ylast, bat->sizex, bat->sizey); + } +} + +static void +movebat(bat) + batstruct *bat; +{ + bouncestruct *bp = &bounces[screen]; + + bat->xlast = bat->x; + bat->ylast = bat->y; + bat->x += bat->vx; + if (bat->x > (bp->width - bat->sizex)) { + /* Bounce off the right edge */ + bat->x = 2 * (bp->width - bat->sizex) - bat->x; + bat->vx = -bat->vx + bat->vx / FRICTION; + flapbat(bat, 1, &bat->vy); + } else if (bat->x < 0) { + /* Bounce off the left edge */ + bat->x = -bat->x; + bat->vx = -bat->vx + bat->vx / FRICTION; + flapbat(bat, -1, &bat->vy); + } + bat->vy++; + bat->y += bat->vy; + if (bat->y >= (bp->height + bat->sizey)) { /* Don't see bat bounce */ + /* Bounce off the bottom edge */ + bat->y = (bp->height - bat->sizey); + bat->vy = -bat->vy + bat->vy / FRICTION; + flapbat(bat, -1, &bat->vx); + } else if (bat->y < 0) { + /* Bounce off the top edge */ + /*bat->y = -bat->y; + bat->vy = -bat->vy + bat->vy / FRICTION; + flapbat(bat, 1, &bat->vx);*/ + } + if (bat->spindir) { + bat->spincount--; + if (!bat->spincount) { + bat->orient = (bat->spindir + bat->orient) % ORIENTS; + bat->spincount = bat->spindelay; + } + } +} + +static void +flapbat(bat, dir, vel) + batstruct *bat; + int dir; + int *vel; +{ + *vel -= (*vel + SIGN(*vel * dir) * bat->spindelay * ORIENTCYCLE / + (M_PI * bat->size)) / SLIPAGE; + if (*vel) { + bat->spindir = DIR(*vel * dir); + bat->vang = *vel * ORIENTCYCLE; + bat->spindelay = M_PI * bat->size / (ABS(bat->vang)) + 1; + } else + bat->spindir = 0; +} + +static int collide(a_bat) + int a_bat; +{ + bouncestruct *bp = &bounces[screen]; + int i, d, x, y; + + for (i = 0; i < a_bat; i++) { + x = (bp->bats[i].x - bp->bats[a_bat].x); + y = (bp->bats[i].y - bp->bats[a_bat].y); + d = (int) sqrt((double) (x * x + y * y)); + if (d < (bp->bats[i].size + bp->bats[a_bat].size) / 2) + return i; + } + return i; +} + +/* This stops some flashing, could be more efficient */ +static void +XEraseImage(display, win, gc, x, y, xlast, ylast, xsize, ysize) +Display *display; +Window win; +GC gc; +int x, y, xlast, ylast, xsize, ysize; +{ + if (ylast < y) { + if (y < ylast + ysize) + XFillRectangle(display, win, gc, xlast, ylast, xsize, y - ylast); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } else if (ylast > y) { + if (y > ylast - ysize) + XFillRectangle(display, win, gc, xlast, y + ysize, xsize, ylast - y); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } + if (xlast < x) { + if (x < xlast + xsize) + XFillRectangle(display, win, gc, xlast, ylast, x - xlast, ysize); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } else if (xlast > x) { + if (x > xlast - xsize) + XFillRectangle(display, win, gc, x + xsize, ylast, xlast - x, ysize); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } +} diff --git a/bitmaps/bat-0.xbm b/bitmaps/bat-0.xbm new file mode 100644 index 00000000..2f6d2a91 --- /dev/null +++ b/bitmaps/bat-0.xbm @@ -0,0 +1,143 @@ +#define bat0_width 150 +#define bat0_height 110 +static char bat0_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x2c,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x28,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x70,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x38,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x39,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x7f,0xfb,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x0e,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xe0,0x01, + 0x00,0x06,0xfe,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x0f,0x00,0x00,0x62,0x3c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x40,0x26,0x1c,0x08,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x70,0x0c,0x7e, + 0x88,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xe0,0x00,0x00, + 0x00,0x18,0xf8,0x0f,0x0c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x16,0x00,0x00,0x00,0x0c,0x80,0xfe,0x07,0x80,0x01,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x02,0x40,0xf6,0x01,0x00,0x06, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x03,0x40, + 0x36,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x0c,0x00,0x00, + 0x00,0x80,0x01,0x20,0x16,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x80,0x03,0x00,0x00,0x00,0xc0,0x00,0x20,0x16,0x1e,0x00,0x80,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x3c,0x40,0x00,0x00,0x00,0x00,0x40,0x00,0x20,0x8b,0x71,0x00, + 0x00,0x03,0x00,0x00,0x00,0x00,0xc0,0x40,0x30,0x00,0x00,0x00,0x00,0x60,0x00, + 0x10,0x4a,0xc0,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc8,0x00,0x00, + 0x00,0x00,0x20,0x00,0x90,0x0e,0x00,0x03,0x00,0x30,0x00,0x00,0x00,0x00,0xc0, + 0x80,0xff,0x1f,0x00,0x00,0x00,0x30,0x00,0x90,0x07,0x00,0x06,0x00,0x40,0x00, + 0x00,0x00,0x00,0xc0,0x80,0x0f,0xf0,0x01,0x00,0x00,0x10,0x00,0x50,0x05,0x00, + 0x0c,0x00,0x80,0x01,0x00,0x00,0x00,0xc0,0x80,0x03,0x00,0x07,0x00,0x00,0x10, + 0x00,0x48,0x03,0x00,0x18,0x00,0x00,0x06,0x00,0x00,0x00,0xc0,0xc0,0x03,0x00, + 0x1c,0xc0,0x0f,0x18,0x00,0x68,0x03,0x00,0x30,0x00,0x00,0x0c,0x00,0x00,0x00, + 0xc0,0x60,0x03,0x00,0x70,0xf0,0xbe,0x08,0x00,0xa0,0x01,0x00,0x20,0x00,0x00, + 0x30,0x00,0x00,0x00,0xc0,0x30,0x02,0x00,0xc0,0x31,0x60,0x08,0x00,0xb4,0x01, + 0x00,0x20,0x00,0x00,0x40,0x00,0x00,0x00,0xc0,0x10,0x0c,0x00,0x00,0x1b,0x40, + 0x0c,0x00,0x94,0x01,0x00,0x20,0x00,0x00,0x80,0x01,0x00,0x00,0xc0,0x08,0x38, + 0x00,0x00,0x0e,0xc0,0x08,0x00,0xd4,0x00,0x00,0x30,0x00,0x00,0x00,0x02,0x00, + 0x00,0xc0,0x08,0xc0,0x00,0x00,0x0e,0x80,0x0c,0x00,0xca,0x00,0x00,0x10,0x00, + 0x00,0x00,0x0c,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x80,0x0c,0x00,0xea, + 0x00,0x00,0x10,0x00,0x00,0x00,0x18,0x00,0x00,0xc0,0x04,0x00,0x00,0x00,0x0c, + 0x80,0x05,0x00,0x6e,0x00,0x00,0x18,0x00,0x00,0x00,0x20,0x00,0x00,0xc0,0x04, + 0x00,0x00,0x00,0x0c,0x80,0x05,0x00,0x66,0x00,0x00,0x0c,0x00,0x00,0x00,0x40, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x66,0x00,0x00,0x0e, + 0x00,0x00,0x00,0xc0,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00, + 0x33,0x00,0xfc,0x03,0x00,0x00,0x00,0x80,0x01,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x07,0x00,0x33,0x00,0x7c,0x00,0x00,0x00,0xe0,0x0f,0x03,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x33,0x00,0xe8,0x00,0x00,0x00,0x7c, + 0x3c,0x02,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x13,0x00,0x80, + 0x03,0x00,0x80,0x03,0xc0,0x07,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x00,0x18,0x00,0x00,0x0e,0x00,0x60,0x00,0x00,0x0f,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x06,0x00,0x08,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x0c,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x30,0x00,0x0c, + 0x00,0x00,0xfc,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x20,0x00,0x03,0x00,0x00,0xfc,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x60,0x80,0x01,0x00,0xc0,0x9f,0x01,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x40,0x00,0x00,0x00,0x98, + 0x01,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x21, + 0x00,0x00,0x00,0x90,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0x31,0x00,0x00,0x00,0x98,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xcc,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00, + 0x04,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-1.xbm b/bitmaps/bat-1.xbm new file mode 100644 index 00000000..5ccfdce0 --- /dev/null +++ b/bitmaps/bat-1.xbm @@ -0,0 +1,143 @@ +#define bat1_width 150 +#define bat1_height 110 +static char bat1_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x1c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x06,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x84,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcc,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x47,0xf8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x0f,0xf4,0xff,0x1d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0xd8,0x3e,0x33,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xd8,0x9d,0x66, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x60, + 0x00,0x18,0xdf,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x30,0x80,0x77,0x1b,0x86,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xe0,0xff,0x31,0x16,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x70,0xc0,0xf9, + 0x1b,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x06,0x18,0xc0,0xfb,0x33,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x02,0x18,0x80,0x39,0x20,0x0c,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x18,0xc0,0x39,0x60,0x08,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x1a,0x80, + 0x19,0x40,0x1a,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x80,0x81,0x1f,0xc0,0x1d,0xc0,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x80,0x39,0xc0,0x14,0xc0,0x30,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc0,0x80,0x00,0xc0,0x14,0xc0,0x24, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x40,0xc0,0x00, + 0xc0,0x14,0xc0,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x60,0xc0,0x00,0xc0,0x14,0xc0,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x60,0xc0,0x00,0xc0,0x1c,0x40,0x40,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x20,0xc0,0x00,0xc0,0x0a,0x60, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x40, + 0x00,0xc0,0x0a,0x38,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x30,0x40,0x00,0xe0,0x0a,0x3c,0x80,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0x40,0x00,0x60,0x0a,0x1c,0x80,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0xc0,0x00,0x60,0x0e, + 0x18,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10, + 0xc0,0x00,0x60,0x0e,0x18,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x10,0xc0,0x00,0x60,0x06,0x10,0x00,0x01,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x80,0x00,0x60,0x06,0x30,0x00,0x01, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x80,0x00,0x60, + 0x06,0x30,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x18,0x80,0x01,0x20,0x07,0x30,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x08,0x80,0x01,0x00,0x03,0x30,0x40,0x03,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x01,0x00,0x00,0x10,0x00, + 0x02,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x7f,0x03, + 0x00,0x00,0x10,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x88,0xe3,0x03,0x00,0x00,0x18,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0xd8,0x81,0x07,0x00,0x00,0x18,0x80,0x02,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc8,0x00,0x07,0x00,0x00,0x08, + 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x58,0x00, + 0x0e,0x00,0x00,0x08,0x80,0x02,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x58,0x00,0x0c,0x00,0x00,0x0c,0x00,0x02,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x1c,0x00,0x00,0x0c,0x80,0x06,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x18,0x00,0x00, + 0x04,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x50, + 0x00,0x00,0x00,0x00,0x06,0x80,0x06,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x02,0x00,0x02, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x70,0x02,0x00,0x00, + 0x00,0x03,0x80,0x06,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x02,0x00,0x00,0x80,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0xb0,0x02,0x00,0x00,0x80,0x01,0x80,0x04,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xa0,0x02,0x00,0x00,0xc0,0x01,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xe0,0x02,0x00, + 0x00,0xe0,0xff,0x81,0x05,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0xe0,0x23,0x00,0x00,0xe0,0xa0,0x0f,0x05,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0xe0,0x23,0x00,0x00,0x00,0x00,0x9c,0x04,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xe0,0x23,0x00,0x00,0x00,0x00, + 0xb0,0x06,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc0,0x33, + 0x00,0x00,0x00,0x00,0xe0,0x04,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x80,0x13,0x00,0x00,0x00,0x00,0xc0,0x07,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0x00,0x00,0x00,0x00,0x80,0x07,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00, + 0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x06,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x82,0x07, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0x01,0x00, + 0x00,0x00,0xe6,0x07,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x78,0x00,0x00,0x00,0x00,0x3c,0x06,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x01,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xbc,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-2.xbm b/bitmaps/bat-2.xbm new file mode 100644 index 00000000..b777aadd --- /dev/null +++ b/bitmaps/bat-2.xbm @@ -0,0 +1,143 @@ +#define bat2_width 150 +#define bat2_height 110 +static char bat2_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x2c,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x28,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x70,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x38,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x39,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x7f,0xfb,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x0e,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xe0,0x01, + 0x00,0x06,0xfe,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x0f,0x00,0x00,0x62,0x3c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x40,0x26,0x1c,0x08,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x70,0x0c,0x7e, + 0x88,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xe0,0x00,0x00, + 0x00,0x18,0xf8,0x0f,0x0c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x16,0x00,0x00,0x00,0x0c,0x80,0xfe,0x07,0x80,0x01,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x02,0x40,0xf6,0x01,0x00,0x06, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x03,0x40, + 0x36,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x0c,0x00,0x00, + 0x00,0x80,0x01,0x20,0x16,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x80,0x03,0x00,0x00,0x00,0xc0,0x00,0x20,0x16,0x1e,0x00,0x80,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x3c,0x40,0x00,0x00,0x00,0x00,0x40,0x00,0x20,0x8b,0x71,0x00, + 0x00,0x03,0x00,0x00,0x00,0x00,0xc0,0x40,0x30,0x00,0x00,0x00,0x00,0x60,0x00, + 0x10,0x4a,0xc0,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc8,0x00,0x00, + 0x00,0x00,0x20,0x00,0x90,0x0e,0x00,0x03,0x00,0x30,0x00,0x00,0x00,0x00,0xc0, + 0x80,0xff,0x1f,0x00,0x00,0x00,0x30,0x00,0x90,0x07,0x00,0x06,0x00,0x40,0x00, + 0x00,0x00,0x00,0xc0,0x80,0x0f,0xf0,0x01,0x00,0x00,0x10,0x00,0x50,0x05,0x00, + 0x0c,0x00,0x80,0x01,0x00,0x00,0x00,0xc0,0x80,0x03,0x00,0x07,0x00,0x00,0x10, + 0x00,0x48,0x03,0x00,0x18,0x00,0x00,0x06,0x00,0x00,0x00,0xc0,0xc0,0x03,0x00, + 0x1c,0xc0,0x0f,0x18,0x00,0x68,0x03,0x00,0x30,0x00,0x00,0x0c,0x00,0x00,0x00, + 0xc0,0x60,0x03,0x00,0x70,0xf0,0xbe,0x08,0x00,0xa0,0x01,0x00,0x20,0x00,0x00, + 0x30,0x00,0x00,0x00,0xc0,0x30,0x02,0x00,0xc0,0x31,0x60,0x08,0x00,0xb4,0x01, + 0x00,0x20,0x00,0x00,0x40,0x00,0x00,0x00,0xc0,0x10,0x0c,0x00,0x00,0x1b,0x40, + 0x0c,0x00,0x94,0x01,0x00,0x20,0x00,0x00,0x80,0x01,0x00,0x00,0xc0,0x08,0x38, + 0x00,0x00,0x0e,0xc0,0x08,0x00,0xd4,0x00,0x00,0x30,0x00,0x00,0x00,0x02,0x00, + 0x00,0xc0,0x08,0xc0,0x00,0x00,0x0e,0x80,0x0c,0x00,0xca,0x00,0x00,0x10,0x00, + 0x00,0x00,0x0c,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x80,0x0c,0x00,0xea, + 0x00,0x00,0x10,0x00,0x00,0x00,0x18,0x00,0x00,0xc0,0x04,0x00,0x00,0x00,0x0c, + 0x80,0x05,0x00,0x6e,0x00,0x00,0x18,0x00,0x00,0x00,0x20,0x00,0x00,0xc0,0x04, + 0x00,0x00,0x00,0x0c,0x80,0x05,0x00,0x66,0x00,0x00,0x0c,0x00,0x00,0x00,0x40, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x66,0x00,0x00,0x0e, + 0x00,0x00,0x00,0xc0,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00, + 0x33,0x00,0xfc,0x03,0x00,0x00,0x00,0x80,0x01,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x07,0x00,0x33,0x00,0x7c,0x00,0x00,0x00,0xe0,0x0f,0x03,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x33,0x00,0xe8,0x00,0x00,0x00,0x7c, + 0x3c,0x02,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x13,0x00,0x80, + 0x03,0x00,0x80,0x03,0xc0,0x07,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x07, + 0x00,0x18,0x00,0x00,0x0e,0x00,0x60,0x00,0x00,0x0f,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x06,0x00,0x08,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x0c,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x30,0x00,0x0c, + 0x00,0x00,0xfc,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x20,0x00,0x03,0x00,0x00,0xfc,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x60,0x80,0x01,0x00,0xc0,0x9f,0x01,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x40,0x00,0x00,0x00,0x98, + 0x01,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x21, + 0x00,0x00,0x00,0x90,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0x31,0x00,0x00,0x00,0x98,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0xcc,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00, + 0x04,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-3.xbm b/bitmaps/bat-3.xbm new file mode 100644 index 00000000..bc56eadf --- /dev/null +++ b/bitmaps/bat-3.xbm @@ -0,0 +1,143 @@ +#define bat3_width 150 +#define bat3_height 110 +static char bat3_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x98,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0xe3,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xf1,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x80,0xd8, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x80,0x0c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x04,0x1a,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x04,0x36,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x04,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0xcc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x38,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x38,0x06, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x70,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0xf0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x60,0x61,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x60, + 0xc3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x40,0x02,0x03,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x40,0x04,0x06,0x00,0x80,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x40,0x00,0x0c,0x00, + 0x80,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xc0,0x00,0x00,0x00,0x00, + 0xc0,0x08,0x38,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0xc0, + 0x00,0x00,0x00,0x00,0x80,0x00,0xe0,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x88,0xc1,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x03,0x00,0x08,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc1,0x00,0x00,0x00,0x00,0x80,0x01,0x00, + 0x06,0x00,0x08,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0xc2,0x00,0x00,0x00, + 0x00,0x00,0x01,0x00,0x3c,0x80,0xc9,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xc3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xf0,0xf3,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0xfd,0x7f,0xc7,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x3f,0xfe, + 0x0f,0x00,0x00,0x00,0x00,0xfc,0xdf,0x3f,0xc4,0x00,0x00,0x00,0x00,0x00,0x03, + 0x00,0x00,0x8c,0x7c,0xfe,0xff,0xff,0xff,0xff,0xcf,0xe1,0x20,0xcc,0x00,0x00, + 0x00,0x00,0x00,0x03,0x00,0x00,0xcc,0x3e,0x18,0x40,0xbf,0x82,0x36,0x00,0x38, + 0x68,0xc8,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x0e,0xb7,0x18,0x00,0x00, + 0x00,0x00,0x00,0x0e,0x6c,0xc8,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0xfe, + 0xf3,0x3d,0x00,0x00,0x00,0x00,0x00,0x03,0x6c,0xc8,0x00,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0xf3,0xf1,0xff,0x00,0x00,0x00,0x00,0x80,0x01,0x20,0xd8,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0xc3,0xf1,0x83,0x03,0x00,0x00,0x00,0x60, + 0x00,0x20,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0xc3,0x70,0x00,0x07, + 0x00,0x00,0x00,0x30,0x00,0x20,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, + 0xc3,0x70,0x00,0x0c,0x00,0x00,0x00,0x1c,0x00,0x20,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x02,0x00,0xf0,0xc7,0x50,0x00,0x18,0x00,0x00,0x00,0x06,0x00,0x30,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0xf8,0xcf,0x70,0x00,0x70,0x00,0x00,0x00, + 0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0c,0xde,0x30,0x00, + 0x60,0x00,0x00,0x80,0x01,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x03,0x00, + 0x04,0xbe,0x30,0x00,0xc0,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x01,0x00,0x04,0xa8,0x38,0x00,0xc0,0x00,0x00,0xc0,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0xf9,0x01,0x06,0x80,0x30,0x00,0xc0,0x00,0x00, + 0x40,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xf9,0x0f,0x06,0xa0,0x30, + 0x00,0xc0,0x00,0x00,0x60,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x0f, + 0x3c,0x06,0xa0,0x38,0x00,0x40,0x00,0x00,0x20,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x80,0x07,0xe0,0x06,0xe0,0x38,0x00,0x60,0x00,0x00,0x20,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x03,0xc0,0x07,0x60,0x38,0x00,0x30,0x00, + 0x00,0x10,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x07,0xc0, + 0x18,0x00,0xf8,0x1f,0x00,0x10,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80, + 0x01,0x00,0x06,0x60,0x18,0x00,0xff,0xf8,0x03,0x18,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0xc0,0x01,0x00,0x06,0x60,0x18,0x00,0x07,0x00,0x0f,0x08,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x0c,0x60,0x38,0x00,0x02, + 0x00,0x38,0x0c,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x0c, + 0x60,0x18,0x00,0x00,0x00,0x20,0x04,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x08,0x60,0x18,0x00,0x00,0x00,0x60,0x04,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x18,0x00,0x00,0x00,0xc0,0x04, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x18,0x00, + 0x00,0x00,0x80,0x06,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x30,0x30,0x1c,0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x30,0x30,0x18,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-4.xbm b/bitmaps/bat-4.xbm new file mode 100644 index 00000000..6e96065c --- /dev/null +++ b/bitmaps/bat-4.xbm @@ -0,0 +1,143 @@ +#define bat4_width 150 +#define bat4_height 110 +static char bat4_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0xe0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x98,0xe1,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x33,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x1c,0x1e,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x38,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xe0,0x1c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x9f,0x18,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xd1,0x0c,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x70,0x07,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf0,0x01,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x03, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x48,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0xb0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xd2, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30, + 0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x81,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x70,0x06,0x00,0x00,0x00,0x00,0x00,0x80,0x90,0x01,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x50,0x0c,0x00,0x00,0x00,0x00,0x00,0x40, + 0x10,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x50,0x18,0x00,0x00, + 0x00,0x00,0x00,0x20,0x08,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x10,0x30,0x00,0x00,0x00,0x00,0x00,0x10,0x08,0x03,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x10,0x60,0x00,0x00,0x00,0x00,0x00,0x08,0x18,0x02,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0xc0,0x01,0x00,0x02,0x00,0x00, + 0x04,0x04,0x02,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x80,0x03, + 0x00,0x02,0x00,0x00,0x02,0x24,0x06,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x08,0x00,0x0e,0xc0,0x05,0x00,0x00,0x01,0x24,0x0c,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x1c,0x00,0x07,0x00,0x80,0x00,0x06,0x08, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x70,0x00,0x06,0x00, + 0x60,0x00,0x42,0x18,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x04,0x00, + 0xc0,0x01,0x04,0x08,0x30,0x00,0x84,0x30,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x04,0x00,0x80,0x03,0x0c,0x0c,0x08,0x00,0x01,0x60,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x0e,0x88,0x0f,0x04,0x00,0x00, + 0x41,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x18,0xcc, + 0x03,0x03,0x00,0x00,0x82,0x01,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x03, + 0x01,0x00,0xc0,0xff,0x83,0x01,0x80,0x02,0x80,0x01,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x01,0x00,0x00,0xe0,0xff,0x66,0x00,0x80,0x00,0x08,0x06,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xc0,0x31,0x3c,0x16,0x00,0x40, + 0x02,0x10,0x0c,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0xf0,0xbf, + 0x69,0x06,0x00,0x40,0x00,0x20,0x18,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x18,0xb0,0x4d,0x06,0x00,0x00,0x00,0xc0,0x70,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x40,0x00,0x00,0x18,0xe0,0x1f,0x03,0x00,0x20,0x00,0x00,0xe1, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0xe0,0xff,0x01,0x00, + 0x00,0x00,0x00,0x82,0x03,0x00,0xc0,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08, + 0xc0,0x7b,0x7e,0x00,0x10,0x01,0x00,0x08,0x06,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x10,0x00,0x80,0x1b,0x40,0x79,0xe0,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x18,0x00,0xe0,0x1f,0x40,0x29,0x80,0x01,0x08,0x00,0x00, + 0x00,0x38,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x00,0x30,0x1d,0x40,0x29,0x00, + 0x03,0x04,0x01,0x00,0xf0,0x3f,0x00,0xc0,0x00,0x00,0x00,0x00,0xe6,0x01,0x10, + 0x38,0x40,0x29,0x00,0x02,0x00,0x00,0x00,0x5e,0x70,0x00,0xc0,0x00,0x00,0x00, + 0x00,0xff,0x07,0x18,0x00,0x60,0x29,0x00,0x06,0x02,0x01,0x80,0x03,0xc0,0x00, + 0xc0,0x00,0x00,0x00,0x80,0x07,0x0c,0x18,0x00,0x40,0x29,0x00,0x04,0x02,0x00, + 0xe0,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x01,0x18,0x0c,0x00,0xc0,0x29, + 0x00,0x0c,0x01,0x00,0x38,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30, + 0x0c,0x00,0xa0,0x28,0x00,0x8c,0x80,0x00,0x0e,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x60,0x0c,0x00,0xe0,0x38,0x00,0x8c,0x80,0x00,0x03,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc0,0x04,0x00,0xa0,0x18,0x00,0x0c,0x00, + 0x80,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x00,0xe0, + 0x18,0x00,0x0c,0x80,0xc0,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x05,0x00,0xe0,0x18,0x00,0x0c,0x00,0x60,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xe0,0x18,0x00,0x04,0x00,0x10,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xe0,0x18,0x00,0x04, + 0x40,0x18,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00, + 0x60,0x1c,0x00,0xfe,0x03,0x0c,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0c,0x00,0x60,0x1c,0x00,0x0c,0x07,0x06,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x60,0x0c,0x00,0x00,0x44,0x03,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x60,0x0c,0x00, + 0x00,0x0c,0x01,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x18, + 0x00,0x60,0x0c,0x00,0x00,0x98,0x01,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x18,0x00,0x60,0x0c,0x00,0x00,0x98,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x60,0x0c,0x00,0x00,0xd0,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x0c, + 0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00, + 0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-5.xbm b/bitmaps/bat-5.xbm new file mode 100644 index 00000000..547197e5 --- /dev/null +++ b/bitmaps/bat-5.xbm @@ -0,0 +1,143 @@ +#define bat5_width 150 +#define bat5_height 110 +static char bat5_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x41,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x01,0x02,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc7, + 0x30,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x61,0x60,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x31,0x40,0x02,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x18,0x70,0x02,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40, + 0x18,0xf8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x20,0x0c,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x0c,0xf6,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x06,0x13,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x08,0x06,0x11,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x0c,0x02,0x1a,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x12,0xd8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x01,0x12, + 0xb0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x83,0x01,0x16,0x60,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x14,0x40,0x0e,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0x00,0x20,0x40,0x38,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x40,0x00, + 0x00,0xc0,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x60,0x40,0x00,0x00,0x80,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x20,0x60,0x00,0x00,0x80,0x01,0x0e,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x60,0x00,0x00,0x00,0x01, + 0x78,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x30, + 0x00,0x00,0x00,0x03,0xc0,0x1f,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0c,0x20,0x00,0x00,0x00,0x02,0x00,0xf8,0x03,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x00,0x00,0x02,0x00,0x00,0x7f, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x30,0x00,0x00,0x00, + 0x06,0x00,0x00,0xf0,0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x80,0x00, + 0x30,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x1f,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x40,0x00,0x30,0x00,0x00,0x00,0x04,0x00,0x00,0xc0,0xff,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00, + 0x7c,0xf5,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x10,0x00,0x00, + 0x00,0x04,0x00,0x00,0x0f,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x0c, + 0x00,0x30,0x00,0x00,0x00,0x04,0x00,0xc0,0x01,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x03,0x00,0x30,0x00,0x00,0x00,0x04,0x00,0x60,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x10,0x00,0x00,0x00,0x06,0x00, + 0x38,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x20,0x00, + 0x00,0x00,0x06,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x20,0x00,0x00,0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x18,0x00,0x00,0x20,0x00,0x00,0x00,0x02,0x00,0x06,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x20,0x00,0x00,0x00,0x02, + 0x00,0x03,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x60, + 0x00,0x00,0x00,0x03,0x00,0x01,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x80, + 0xff,0x1f,0x00,0x60,0x00,0x00,0x00,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0xe0,0x0f,0x78,0x00,0x40,0x00,0x00,0x80,0x01,0x80,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xe0,0x00,0xc0,0x01,0x40,0x00,0x00,0x80, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x03, + 0xc0,0x00,0x03,0xc0,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x02,0x80,0x80,0x06,0x40,0x08,0x40,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x80,0x00,0x04,0x64,0x00,0x40,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x01,0x04, + 0x2e,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x08,0x00,0x01,0x08,0x37,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x08,0x00,0x03,0xc8,0x1b,0x04,0x60,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x86,0xff,0x0d,0x00,0x40, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xcc, + 0xfe,0x07,0x80,0x43,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x10,0x00,0xf8,0xfc,0xe3,0xf4,0xdf,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x30,0x00,0xb0,0x1d,0xfe,0x3f,0xf8,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x5c,0x0e,0x1e, + 0xe0,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00, + 0x20,0xec,0x02,0x0e,0xc0,0x01,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x60,0x00,0x67,0x9e,0x03,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xc0,0xc3,0xff,0x01,0x00,0x00,0x03,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x80,0x73,0x00, + 0x00,0x00,0x07,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x30,0x80,0x72,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x30,0x80,0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x20,0x00,0x53,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7e,0x00,0x53, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0x7f,0x00,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xc1,0x00,0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc1,0x00,0x53,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc1,0x00, + 0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0x01,0x00,0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x53,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x53,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01, + 0x00,0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0x00,0x00,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x73,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x72,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x80, + 0x00,0x00,0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x01,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x62,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-6.xbm b/bitmaps/bat-6.xbm new file mode 100644 index 00000000..7d181a97 --- /dev/null +++ b/bitmaps/bat-6.xbm @@ -0,0 +1,143 @@ +#define bat6_width 150 +#define bat6_height 110 +static char bat6_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0xe0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x98,0xe1,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x33,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x1c,0x1e,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x38,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xe0,0x1c,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x9f,0x18,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xd1,0x0c,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x70,0x07,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf0,0x01,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x03, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x48,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xf0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0xb0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xd2, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x91,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30, + 0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x81,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x70,0x06,0x00,0x00,0x00,0x00,0x00,0x80,0x90,0x01,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x50,0x0c,0x00,0x00,0x00,0x00,0x00,0x40, + 0x10,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x50,0x18,0x00,0x00, + 0x00,0x00,0x00,0x20,0x08,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x10,0x30,0x00,0x00,0x00,0x00,0x00,0x10,0x08,0x03,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x10,0x60,0x00,0x00,0x00,0x00,0x00,0x08,0x18,0x02,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0xc0,0x01,0x00,0x02,0x00,0x00, + 0x04,0x04,0x02,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x18,0x80,0x03, + 0x00,0x02,0x00,0x00,0x02,0x24,0x06,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x08,0x00,0x0e,0xc0,0x05,0x00,0x00,0x01,0x24,0x0c,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x1c,0x00,0x07,0x00,0x80,0x00,0x06,0x08, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x70,0x00,0x06,0x00, + 0x60,0x00,0x42,0x18,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x04,0x00, + 0xc0,0x01,0x04,0x08,0x30,0x00,0x84,0x30,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x04,0x00,0x80,0x03,0x0c,0x0c,0x08,0x00,0x01,0x60,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x0e,0x88,0x0f,0x04,0x00,0x00, + 0x41,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x18,0xcc, + 0x03,0x03,0x00,0x00,0x82,0x01,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x03, + 0x01,0x00,0xc0,0xff,0x83,0x01,0x80,0x02,0x80,0x01,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x01,0x00,0x00,0xe0,0xff,0x66,0x00,0x80,0x00,0x08,0x06,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xc0,0x31,0x3c,0x16,0x00,0x40, + 0x02,0x10,0x0c,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0xf0,0xbf, + 0x69,0x06,0x00,0x40,0x00,0x20,0x18,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x18,0xb0,0x4d,0x06,0x00,0x00,0x00,0xc0,0x70,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x40,0x00,0x00,0x18,0xe0,0x1f,0x03,0x00,0x20,0x00,0x00,0xe1, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0xe0,0xff,0x01,0x00, + 0x00,0x00,0x00,0x82,0x03,0x00,0xc0,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08, + 0xc0,0x7b,0x7e,0x00,0x10,0x01,0x00,0x08,0x06,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x10,0x00,0x80,0x1b,0x40,0x79,0xe0,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x18,0x00,0xe0,0x1f,0x40,0x29,0x80,0x01,0x08,0x00,0x00, + 0x00,0x38,0x00,0xc0,0x00,0x00,0x00,0x00,0x0c,0x00,0x30,0x1d,0x40,0x29,0x00, + 0x03,0x04,0x01,0x00,0xf0,0x3f,0x00,0xc0,0x00,0x00,0x00,0x00,0xe6,0x01,0x10, + 0x38,0x40,0x29,0x00,0x02,0x00,0x00,0x00,0x5e,0x70,0x00,0xc0,0x00,0x00,0x00, + 0x00,0xff,0x07,0x18,0x00,0x60,0x29,0x00,0x06,0x02,0x01,0x80,0x03,0xc0,0x00, + 0xc0,0x00,0x00,0x00,0x80,0x07,0x0c,0x18,0x00,0x40,0x29,0x00,0x04,0x02,0x00, + 0xe0,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x01,0x18,0x0c,0x00,0xc0,0x29, + 0x00,0x0c,0x01,0x00,0x38,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30, + 0x0c,0x00,0xa0,0x28,0x00,0x8c,0x80,0x00,0x0e,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x60,0x0c,0x00,0xe0,0x38,0x00,0x8c,0x80,0x00,0x03,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xc0,0x04,0x00,0xa0,0x18,0x00,0x0c,0x00, + 0x80,0x01,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x80,0x05,0x00,0xe0, + 0x18,0x00,0x0c,0x80,0xc0,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x05,0x00,0xe0,0x18,0x00,0x0c,0x00,0x60,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xe0,0x18,0x00,0x04,0x00,0x10,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xe0,0x18,0x00,0x04, + 0x40,0x18,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00, + 0x60,0x1c,0x00,0xfe,0x03,0x0c,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0c,0x00,0x60,0x1c,0x00,0x0c,0x07,0x06,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x60,0x0c,0x00,0x00,0x44,0x03,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x60,0x0c,0x00, + 0x00,0x0c,0x01,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x18, + 0x00,0x60,0x0c,0x00,0x00,0x98,0x01,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x18,0x00,0x60,0x0c,0x00,0x00,0x98,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x60,0x0c,0x00,0x00,0xd0,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x20,0x0c, + 0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x20, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00, + 0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bat-7.xbm b/bitmaps/bat-7.xbm new file mode 100644 index 00000000..2a4ea7e7 --- /dev/null +++ b/bitmaps/bat-7.xbm @@ -0,0 +1,143 @@ +#define bat7_width 150 +#define bat7_height 110 +static char bat7_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x98,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0xe3,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xf1,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x80,0xd8, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x80,0x0c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x04,0x1a,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x04,0x36,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x04,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0xcc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x38,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x38,0x06, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x70,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0xf0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x60,0x61,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x60, + 0xc3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x40,0x02,0x03,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x40,0x04,0x06,0x00,0x80,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x40,0x00,0x0c,0x00, + 0x80,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xc0,0x00,0x00,0x00,0x00, + 0xc0,0x08,0x38,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0xc0, + 0x00,0x00,0x00,0x00,0x80,0x00,0xe0,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x88,0xc1,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x03,0x00,0x08,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xc1,0x00,0x00,0x00,0x00,0x80,0x01,0x00, + 0x06,0x00,0x08,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0xc2,0x00,0x00,0x00, + 0x00,0x00,0x01,0x00,0x3c,0x80,0xc9,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xc3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xf0,0xf3,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0xfd,0x7f,0xc7,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x3f,0xfe, + 0x0f,0x00,0x00,0x00,0x00,0xfc,0xdf,0x3f,0xc4,0x00,0x00,0x00,0x00,0x00,0x03, + 0x00,0x00,0x8c,0x7c,0xfe,0xff,0xff,0xff,0xff,0xcf,0xe1,0x20,0xcc,0x00,0x00, + 0x00,0x00,0x00,0x03,0x00,0x00,0xcc,0x3e,0x18,0x40,0xbf,0x82,0x36,0x00,0x38, + 0x68,0xc8,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x0e,0xb7,0x18,0x00,0x00, + 0x00,0x00,0x00,0x0e,0x6c,0xc8,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0xfe, + 0xf3,0x3d,0x00,0x00,0x00,0x00,0x00,0x03,0x6c,0xc8,0x00,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0xf3,0xf1,0xff,0x00,0x00,0x00,0x00,0x80,0x01,0x20,0xd8,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0xc3,0xf1,0x83,0x03,0x00,0x00,0x00,0x60, + 0x00,0x20,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0xc3,0x70,0x00,0x07, + 0x00,0x00,0x00,0x30,0x00,0x20,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, + 0xc3,0x70,0x00,0x0c,0x00,0x00,0x00,0x1c,0x00,0x20,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x02,0x00,0xf0,0xc7,0x50,0x00,0x18,0x00,0x00,0x00,0x06,0x00,0x30,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0xf8,0xcf,0x70,0x00,0x70,0x00,0x00,0x00, + 0x03,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x0c,0xde,0x30,0x00, + 0x60,0x00,0x00,0x80,0x01,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x03,0x00, + 0x04,0xbe,0x30,0x00,0xc0,0x00,0x00,0x80,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x01,0x00,0x04,0xa8,0x38,0x00,0xc0,0x00,0x00,0xc0,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0xf9,0x01,0x06,0x80,0x30,0x00,0xc0,0x00,0x00, + 0x40,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0xf9,0x0f,0x06,0xa0,0x30, + 0x00,0xc0,0x00,0x00,0x60,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x0f, + 0x3c,0x06,0xa0,0x38,0x00,0x40,0x00,0x00,0x20,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x80,0x07,0xe0,0x06,0xe0,0x38,0x00,0x60,0x00,0x00,0x20,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x03,0xc0,0x07,0x60,0x38,0x00,0x30,0x00, + 0x00,0x10,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x07,0xc0, + 0x18,0x00,0xf8,0x1f,0x00,0x10,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80, + 0x01,0x00,0x06,0x60,0x18,0x00,0xff,0xf8,0x03,0x18,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0xc0,0x01,0x00,0x06,0x60,0x18,0x00,0x07,0x00,0x0f,0x08,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x0c,0x60,0x38,0x00,0x02, + 0x00,0x38,0x0c,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x0c, + 0x60,0x18,0x00,0x00,0x00,0x20,0x04,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x08,0x60,0x18,0x00,0x00,0x00,0x60,0x04,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x18,0x00,0x00,0x00,0xc0,0x04, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x18,0x00, + 0x00,0x00,0x80,0x06,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x30,0x30,0x1c,0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x30,0x30,0x18,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x03,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0}; diff --git a/bitmaps/bounce-0.xbm b/bitmaps/bounce-0.xbm new file mode 100644 index 00000000..ad5cc471 --- /dev/null +++ b/bitmaps/bounce-0.xbm @@ -0,0 +1,46 @@ +#define bounce0_width 64 +#define bounce0_height 64 +static char bounce0_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 0x1e, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0x7f, 0xfe, 0x31, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x7f, + 0xfe, 0xcf, 0x00, 0x00, 0x00, 0x80, 0xfc, 0x7f, 0xfe, 0x3f, 0x01, 0x00, + 0x00, 0x60, 0xff, 0x3f, 0xfc, 0xff, 0x06, 0x00, 0x00, 0x90, 0xff, 0x1f, + 0xf8, 0xff, 0x09, 0x00, 0x00, 0xc8, 0xff, 0x07, 0xe0, 0xff, 0x13, 0x00, + 0x00, 0xe4, 0xff, 0x03, 0xc0, 0xff, 0x27, 0x00, 0x00, 0xf2, 0xff, 0x01, + 0x80, 0xff, 0x4f, 0x00, 0x00, 0xe1, 0x7f, 0x00, 0x00, 0xfe, 0x87, 0x00, + 0x80, 0xc0, 0x1f, 0x00, 0x00, 0xf8, 0x03, 0x01, 0x40, 0x80, 0x01, 0x00, + 0x00, 0x80, 0x01, 0x02, 0x40, 0x00, 0x78, 0x00, 0x00, 0x1e, 0x00, 0x02, + 0x20, 0x80, 0x7f, 0x00, 0x00, 0xfe, 0x01, 0x04, 0x10, 0xc0, 0xff, 0x00, + 0x00, 0xff, 0x03, 0x08, 0x10, 0xe0, 0xff, 0x00, 0x00, 0xff, 0x07, 0x08, + 0x08, 0xe0, 0xff, 0x00, 0x00, 0xff, 0x07, 0x10, 0x08, 0xf0, 0xff, 0x01, + 0x80, 0xff, 0x0f, 0x10, 0x04, 0xf0, 0xff, 0x01, 0x80, 0xff, 0x0f, 0x20, + 0x04, 0xf8, 0xff, 0x03, 0xc0, 0xff, 0x1f, 0x20, 0x04, 0xf8, 0xff, 0x03, + 0xc0, 0xff, 0x1f, 0x20, 0x02, 0xfc, 0xff, 0xf9, 0x9f, 0xff, 0x3f, 0x40, + 0x02, 0xfc, 0xff, 0xfc, 0x3f, 0xff, 0x3f, 0x40, 0xfa, 0xfc, 0xff, 0xfe, + 0x7f, 0xff, 0x3f, 0x5f, 0xfa, 0xfc, 0x7f, 0xfe, 0x7f, 0xfe, 0x3f, 0x5f, + 0xfd, 0xfd, 0x7f, 0xff, 0xff, 0xfe, 0xbf, 0xbf, 0xfd, 0xf9, 0x3f, 0xff, + 0xff, 0xfc, 0x9f, 0xbf, 0xfd, 0xf9, 0xbf, 0xff, 0xff, 0xfd, 0x9f, 0xbf, + 0xfd, 0xfb, 0x9f, 0xff, 0xff, 0xf9, 0xdf, 0xbf, 0xfd, 0xfb, 0x9f, 0xff, + 0xff, 0xf9, 0xdf, 0xbf, 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, + 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0x03, 0xc0, 0xff, + 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xbf, + 0xfd, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xbf, 0xfa, 0x03, 0x80, 0xff, + 0xff, 0x01, 0xc0, 0x5f, 0xfa, 0x03, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x5f, + 0xfa, 0x03, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x5f, 0xfa, 0x03, 0x00, 0xfe, + 0x7f, 0x00, 0xc0, 0x5f, 0xf4, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0x2f, + 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, 0xf4, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x2f, 0xe8, 0x01, 0x00, 0xfc, 0x3f, 0x00, 0x80, 0x17, + 0xe8, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0x17, 0xd0, 0x00, 0x00, 0xff, + 0xff, 0x00, 0x00, 0x0b, 0x10, 0x3e, 0x80, 0xff, 0xff, 0x01, 0x7c, 0x08, + 0x20, 0xff, 0x81, 0xff, 0xff, 0x81, 0xff, 0x04, 0x40, 0xff, 0xcf, 0xff, + 0xff, 0xf3, 0xff, 0x02, 0x40, 0xfe, 0xcf, 0xff, 0xff, 0xf3, 0x7f, 0x02, + 0x80, 0xfe, 0x9f, 0xff, 0xff, 0xf9, 0x7f, 0x01, 0x00, 0xfd, 0x3f, 0xff, + 0xff, 0xfc, 0xbf, 0x00, 0x00, 0xfa, 0x7f, 0xfe, 0x7f, 0xfe, 0x5f, 0x00, + 0x00, 0xf4, 0x7f, 0xfe, 0x7f, 0xfe, 0x2f, 0x00, 0x00, 0xc8, 0xff, 0xfc, + 0x3f, 0xff, 0x13, 0x00, 0x00, 0x90, 0xff, 0x01, 0x80, 0xff, 0x09, 0x00, + 0x00, 0x60, 0xff, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00, 0x80, 0xfc, 0x00, + 0x00, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0xce, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-1.xbm b/bitmaps/bounce-1.xbm new file mode 100644 index 00000000..c7f7e35a --- /dev/null +++ b/bitmaps/bounce-1.xbm @@ -0,0 +1,46 @@ +#define bounce1_width 64 +#define bounce1_height 64 +static char bounce1_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0x1f, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0xff, 0x7f, 0x30, 0x00, 0x00, 0x00, 0x00, 0xf3, 0xff, + 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xfc, 0xff, 0x7f, 0x00, 0x01, 0x00, + 0x00, 0x60, 0xfe, 0xff, 0x7f, 0x00, 0x06, 0x00, 0x00, 0x10, 0xfe, 0xff, + 0x7f, 0x00, 0x08, 0x00, 0x00, 0xc8, 0xfc, 0xff, 0x1f, 0x00, 0x10, 0x00, + 0x00, 0xf4, 0x81, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0xfa, 0x01, 0x00, + 0xf0, 0x01, 0x40, 0x00, 0x00, 0xfd, 0x01, 0x00, 0xff, 0x07, 0x80, 0x00, + 0x80, 0xfe, 0x01, 0x00, 0xff, 0x1f, 0x20, 0x01, 0x40, 0xfe, 0x01, 0x00, + 0xff, 0x7f, 0x70, 0x02, 0x40, 0xff, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x02, + 0xa0, 0xff, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x05, 0xd0, 0xff, 0x00, 0x00, + 0xff, 0xff, 0xfd, 0x0b, 0xd0, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x0b, + 0xe8, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x17, 0xe8, 0x7f, 0x00, 0x00, + 0xff, 0xff, 0xfb, 0x17, 0xf4, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x2f, + 0xf4, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0xf3, 0x2f, 0xf4, 0x67, 0x00, 0xe0, + 0xf0, 0xff, 0xf3, 0x2f, 0xe2, 0xf1, 0x01, 0xfc, 0xc7, 0xff, 0xe0, 0x5f, + 0x82, 0xf8, 0x03, 0xff, 0x1f, 0x1f, 0xe0, 0x5f, 0x02, 0xfe, 0xc7, 0xff, + 0x7f, 0x06, 0xc0, 0x5f, 0x02, 0xff, 0xcf, 0xff, 0xff, 0x00, 0x80, 0x5f, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbf, 0x01, 0xff, 0xcf, 0xff, + 0xff, 0x01, 0x00, 0xbf, 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbe, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbc, 0x01, 0xff, 0xcf, 0xff, + 0xff, 0x01, 0x00, 0x80, 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0x80, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbc, 0x01, 0xff, 0xcf, 0xff, + 0xff, 0x01, 0x00, 0xbe, 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbf, + 0x01, 0xff, 0xcf, 0xff, 0xff, 0x01, 0x00, 0xbf, 0x02, 0xff, 0xcf, 0xff, + 0xff, 0x00, 0x80, 0x5f, 0x02, 0xfe, 0xc7, 0xff, 0x7f, 0x06, 0xc0, 0x5f, + 0x82, 0xf8, 0x03, 0xff, 0x1f, 0x1f, 0xe0, 0x5f, 0xe2, 0xf1, 0x01, 0xfc, + 0xc7, 0xff, 0xe0, 0x5f, 0xf4, 0x67, 0x00, 0xe0, 0xf0, 0xff, 0xf3, 0x2f, + 0xf4, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0xf3, 0x2f, 0xf4, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0xfb, 0x2f, 0xe8, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x17, + 0xe8, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x17, 0xd0, 0x7f, 0x00, 0x00, + 0xff, 0xff, 0xf9, 0x0b, 0xd0, 0xff, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x0b, + 0xa0, 0xff, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x05, 0x40, 0xff, 0x00, 0x00, + 0xff, 0xff, 0xf8, 0x02, 0x40, 0xfe, 0x01, 0x00, 0xff, 0x7f, 0x70, 0x02, + 0x80, 0xfe, 0x01, 0x00, 0xff, 0x1f, 0x20, 0x01, 0x00, 0xfd, 0x01, 0x00, + 0xff, 0x07, 0x80, 0x00, 0x00, 0xfa, 0x01, 0x00, 0xf0, 0x01, 0x40, 0x00, + 0x00, 0xf4, 0x81, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0xc8, 0xfc, 0xff, + 0x1f, 0x00, 0x10, 0x00, 0x00, 0x10, 0xfe, 0xff, 0x7f, 0x00, 0x08, 0x00, + 0x00, 0x60, 0xfe, 0xff, 0x7f, 0x00, 0x06, 0x00, 0x00, 0x80, 0xfc, 0xff, + 0x7f, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf3, 0xff, 0x7f, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0xff, 0x7f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, + 0x1f, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-2.xbm b/bitmaps/bounce-2.xbm new file mode 100644 index 00000000..a6ddd820 --- /dev/null +++ b/bitmaps/bounce-2.xbm @@ -0,0 +1,46 @@ +#define bounce2_width 64 +#define bounce2_height 64 +static char bounce2_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, + 0x00, 0xce, 0x00, 0x00, 0x00, 0x80, 0xfc, 0x00, 0x00, 0x3f, 0x01, 0x00, + 0x00, 0x60, 0xff, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00, 0x90, 0xff, 0x01, + 0x80, 0xff, 0x09, 0x00, 0x00, 0xc8, 0xff, 0xfc, 0x3f, 0xff, 0x13, 0x00, + 0x00, 0xf4, 0x7f, 0xfe, 0x7f, 0xfe, 0x2f, 0x00, 0x00, 0xfa, 0x7f, 0xfe, + 0x7f, 0xfe, 0x5f, 0x00, 0x00, 0xfd, 0x3f, 0xff, 0xff, 0xfc, 0xbf, 0x00, + 0x80, 0xfe, 0x9f, 0xff, 0xff, 0xf9, 0x7f, 0x01, 0x40, 0xfe, 0xcf, 0xff, + 0xff, 0xf3, 0x7f, 0x02, 0x40, 0xff, 0xcf, 0xff, 0xff, 0xf3, 0xff, 0x02, + 0x20, 0xff, 0x81, 0xff, 0xff, 0x81, 0xff, 0x04, 0x10, 0x3e, 0x80, 0xff, + 0xff, 0x01, 0x7c, 0x08, 0xd0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x0b, + 0xe8, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0x17, 0xe8, 0x01, 0x00, 0xfc, + 0x3f, 0x00, 0x80, 0x17, 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, + 0xf4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2f, 0xf4, 0x01, 0x00, 0xfe, + 0x7f, 0x00, 0x80, 0x2f, 0xfa, 0x03, 0x00, 0xfe, 0x7f, 0x00, 0xc0, 0x5f, + 0xfa, 0x03, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x5f, 0xfa, 0x03, 0x00, 0xff, + 0xff, 0x00, 0xc0, 0x5f, 0xfa, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0x5f, + 0xfd, 0x03, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xbf, 0xfd, 0x03, 0x80, 0xff, + 0xff, 0x01, 0xc0, 0xbf, 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, + 0xfd, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0x03, 0xc0, 0xff, + 0xff, 0x03, 0xc0, 0xbf, 0xfd, 0xfb, 0x9f, 0xff, 0xff, 0xf9, 0xdf, 0xbf, + 0xfd, 0xfb, 0x9f, 0xff, 0xff, 0xf9, 0xdf, 0xbf, 0xfd, 0xf9, 0xbf, 0xff, + 0xff, 0xfd, 0x9f, 0xbf, 0xfd, 0xf9, 0x3f, 0xff, 0xff, 0xfc, 0x9f, 0xbf, + 0xfd, 0xfd, 0x7f, 0xff, 0xff, 0xfe, 0xbf, 0xbf, 0xfa, 0xfc, 0x7f, 0xfe, + 0x7f, 0xfe, 0x3f, 0x5f, 0xfa, 0xfc, 0xff, 0xfe, 0x7f, 0xff, 0x3f, 0x5f, + 0x02, 0xfc, 0xff, 0xfc, 0x3f, 0xff, 0x3f, 0x40, 0x02, 0xfc, 0xff, 0xf9, + 0x9f, 0xff, 0x3f, 0x40, 0x04, 0xf8, 0xff, 0x03, 0xc0, 0xff, 0x1f, 0x20, + 0x04, 0xf8, 0xff, 0x03, 0xc0, 0xff, 0x1f, 0x20, 0x04, 0xf0, 0xff, 0x01, + 0x80, 0xff, 0x0f, 0x20, 0x08, 0xf0, 0xff, 0x01, 0x80, 0xff, 0x0f, 0x10, + 0x08, 0xe0, 0xff, 0x00, 0x00, 0xff, 0x07, 0x10, 0x10, 0xe0, 0xff, 0x00, + 0x00, 0xff, 0x07, 0x08, 0x10, 0xc0, 0xff, 0x00, 0x00, 0xff, 0x03, 0x08, + 0x20, 0x80, 0x7f, 0x00, 0x00, 0xfe, 0x01, 0x04, 0x40, 0x00, 0x78, 0x00, + 0x00, 0x1e, 0x00, 0x02, 0x40, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x02, + 0x80, 0xc0, 0x1f, 0x00, 0x00, 0xf8, 0x03, 0x01, 0x00, 0xe1, 0x7f, 0x00, + 0x00, 0xfe, 0x87, 0x00, 0x00, 0xf2, 0xff, 0x01, 0x80, 0xff, 0x4f, 0x00, + 0x00, 0xe4, 0xff, 0x03, 0xc0, 0xff, 0x27, 0x00, 0x00, 0xc8, 0xff, 0x07, + 0xe0, 0xff, 0x13, 0x00, 0x00, 0x90, 0xff, 0x1f, 0xf8, 0xff, 0x09, 0x00, + 0x00, 0x60, 0xff, 0x3f, 0xfc, 0xff, 0x06, 0x00, 0x00, 0x80, 0xfc, 0x7f, + 0xfe, 0x3f, 0x01, 0x00, 0x00, 0x00, 0xf3, 0x7f, 0xfe, 0xcf, 0x00, 0x00, + 0x00, 0x00, 0x8c, 0x7f, 0xfe, 0x31, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, + 0x1e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/bounce-3.xbm b/bitmaps/bounce-3.xbm new file mode 100644 index 00000000..0fb84760 --- /dev/null +++ b/bitmaps/bounce-3.xbm @@ -0,0 +1,46 @@ +#define bounce3_width 64 +#define bounce3_height 64 +static char bounce3_bits[] = { + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0x1f, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0xfe, 0xff, 0x31, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, + 0xff, 0xcf, 0x00, 0x00, 0x00, 0x80, 0x00, 0xfe, 0xff, 0x3f, 0x01, 0x00, + 0x00, 0x60, 0x00, 0xfe, 0xff, 0x7f, 0x06, 0x00, 0x00, 0x10, 0x00, 0xfe, + 0xff, 0x7f, 0x08, 0x00, 0x00, 0x08, 0x00, 0xf8, 0xff, 0x3f, 0x13, 0x00, + 0x00, 0x04, 0x00, 0xc0, 0xff, 0x81, 0x2f, 0x00, 0x00, 0x02, 0x80, 0x0f, + 0x00, 0x80, 0x5f, 0x00, 0x00, 0x01, 0xe0, 0xff, 0x00, 0x80, 0xbf, 0x00, + 0x80, 0x04, 0xf8, 0xff, 0x00, 0x80, 0x7f, 0x01, 0x40, 0x0e, 0xfe, 0xff, + 0x00, 0x80, 0x7f, 0x02, 0x40, 0x1f, 0xff, 0xff, 0x00, 0x00, 0xff, 0x02, + 0xa0, 0xbf, 0xff, 0xff, 0x00, 0x00, 0xff, 0x05, 0xd0, 0xbf, 0xff, 0xff, + 0x00, 0x00, 0xff, 0x0b, 0xd0, 0x9f, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x0b, + 0xe8, 0x9f, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x17, 0xe8, 0xdf, 0xff, 0xff, + 0x00, 0x00, 0xfe, 0x17, 0xf4, 0xdf, 0xff, 0xff, 0x00, 0x00, 0xf8, 0x2f, + 0xf4, 0xcf, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0x2f, 0xf4, 0xcf, 0xff, 0x0f, + 0x07, 0x00, 0xe6, 0x2f, 0xfa, 0x07, 0xff, 0xe3, 0x3f, 0x80, 0x8f, 0x47, + 0xfa, 0x07, 0xf8, 0xf8, 0xff, 0xc0, 0x1f, 0x41, 0xfa, 0x03, 0x60, 0xfe, + 0xff, 0xe3, 0x7f, 0x40, 0xfa, 0x01, 0x00, 0xff, 0xff, 0xf3, 0xff, 0x40, + 0xfd, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0xfd, 0x00, 0x80, 0xff, + 0xff, 0xf3, 0xff, 0x80, 0x7d, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, + 0x3d, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0x01, 0x00, 0x80, 0xff, + 0xff, 0xf3, 0xff, 0x80, 0x01, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, + 0x3d, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0x7d, 0x00, 0x80, 0xff, + 0xff, 0xf3, 0xff, 0x80, 0xfd, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, + 0xfd, 0x00, 0x80, 0xff, 0xff, 0xf3, 0xff, 0x80, 0xfa, 0x01, 0x00, 0xff, + 0xff, 0xf3, 0xff, 0x40, 0xfa, 0x03, 0x60, 0xfe, 0xff, 0xe3, 0x7f, 0x40, + 0xfa, 0x07, 0xf8, 0xf8, 0xff, 0xc0, 0x1f, 0x41, 0xfa, 0x07, 0xff, 0xe3, + 0x3f, 0x80, 0x8f, 0x47, 0xf4, 0xcf, 0xff, 0x0f, 0x07, 0x00, 0xe6, 0x2f, + 0xf4, 0xcf, 0xff, 0x3f, 0x00, 0x00, 0xf0, 0x2f, 0xf4, 0xdf, 0xff, 0xff, + 0x00, 0x00, 0xf8, 0x2f, 0xe8, 0xdf, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x17, + 0xe8, 0x9f, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x17, 0xd0, 0x9f, 0xff, 0xff, + 0x00, 0x00, 0xfe, 0x0b, 0xd0, 0xbf, 0xff, 0xff, 0x00, 0x00, 0xff, 0x0b, + 0xa0, 0xbf, 0xff, 0xff, 0x00, 0x00, 0xff, 0x05, 0x40, 0x1f, 0xff, 0xff, + 0x00, 0x00, 0xff, 0x02, 0x40, 0x0e, 0xfe, 0xff, 0x00, 0x80, 0x7f, 0x02, + 0x80, 0x04, 0xf8, 0xff, 0x00, 0x80, 0x7f, 0x01, 0x00, 0x01, 0xe0, 0xff, + 0x00, 0x80, 0xbf, 0x00, 0x00, 0x02, 0x80, 0x0f, 0x00, 0x80, 0x5f, 0x00, + 0x00, 0x04, 0x00, 0xc0, 0xff, 0x81, 0x2f, 0x00, 0x00, 0x08, 0x00, 0xf8, + 0xff, 0x3f, 0x13, 0x00, 0x00, 0x10, 0x00, 0xfe, 0xff, 0x7f, 0x08, 0x00, + 0x00, 0x60, 0x00, 0xfe, 0xff, 0x7f, 0x06, 0x00, 0x00, 0x80, 0x00, 0xfe, + 0xff, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xcf, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0xfe, 0xff, 0x31, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, + 0x1f, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-0.xbm b/bitmaps/fish-0.xbm new file mode 100644 index 00000000..3530d64c --- /dev/null +++ b/bitmaps/fish-0.xbm @@ -0,0 +1,8 @@ +#define fish0_width 20 +#define fish0_height 20 +static char fish0_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0xc0, 0x3f, 0x00, 0x40, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x38, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-1.xbm b/bitmaps/fish-1.xbm new file mode 100644 index 00000000..9b01cbc1 --- /dev/null +++ b/bitmaps/fish-1.xbm @@ -0,0 +1,8 @@ +#define fish1_width 20 +#define fish1_height 20 +static char fish1_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, + 0x80, 0x1f, 0x00, 0xc0, 0x7f, 0x00, 0xe0, 0x7f, 0x00, 0xb8, 0x1f, 0x00, + 0x10, 0x06, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-2.xbm b/bitmaps/fish-2.xbm new file mode 100644 index 00000000..640e5df3 --- /dev/null +++ b/bitmaps/fish-2.xbm @@ -0,0 +1,8 @@ +#define fish2_width 20 +#define fish2_height 20 +static char fish2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0xc0, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x2f, 0x00, 0xc0, 0x3f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-3.xbm b/bitmaps/fish-3.xbm new file mode 100644 index 00000000..1d9c535a --- /dev/null +++ b/bitmaps/fish-3.xbm @@ -0,0 +1,8 @@ +#define fish3_width 20 +#define fish3_height 20 +static char fish3_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x86, 0x00, + 0x80, 0xdf, 0x01, 0xe0, 0x7f, 0x00, 0xe0, 0x3f, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-4.xbm b/bitmaps/fish-4.xbm new file mode 100644 index 00000000..a2fe6ec3 --- /dev/null +++ b/bitmaps/fish-4.xbm @@ -0,0 +1,8 @@ +#define fish4_width 20 +#define fish4_height 20 +static char fish4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x2f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x01, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-5.xbm b/bitmaps/fish-5.xbm new file mode 100644 index 00000000..c387e439 --- /dev/null +++ b/bitmaps/fish-5.xbm @@ -0,0 +1,8 @@ +#define fish5_width 20 +#define fish5_height 20 +static char fish5_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x10, 0x06, 0x00, + 0xb8, 0x1f, 0x00, 0xe0, 0x7f, 0x00, 0xc0, 0x7f, 0x00, 0x80, 0x1f, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-6.xbm b/bitmaps/fish-6.xbm new file mode 100644 index 00000000..b1388ee2 --- /dev/null +++ b/bitmaps/fish-6.xbm @@ -0,0 +1,8 @@ +#define fish6_width 20 +#define fish6_height 20 +static char fish6_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x38, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x40, 0x0f, 0x00, 0xc0, 0x3f, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/fish-7.xbm b/bitmaps/fish-7.xbm new file mode 100644 index 00000000..5f93d735 --- /dev/null +++ b/bitmaps/fish-7.xbm @@ -0,0 +1,8 @@ +#define fish7_width 20 +#define fish7_height 20 +static char fish7_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, + 0x80, 0x1f, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x7f, 0x00, 0x80, 0xdf, 0x01, + 0x00, 0x86, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/image-bsd.xbm b/bitmaps/image-bsd.xbm new file mode 100644 index 00000000..c17a483f --- /dev/null +++ b/bitmaps/image-bsd.xbm @@ -0,0 +1,39 @@ +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All Rights Reserved. Used by permission. + */ + +#define image_width 50 +#define image_height 50 +static char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe3, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x06, 0x14, 0x00, + 0x00, 0x00, 0x80, 0x06, 0x1c, 0x3c, 0x00, 0x00, 0x00, 0x80, 0x03, 0x38, + 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x70, 0x2c, 0x00, 0x00, 0x00, 0x00, + 0x19, 0xe0, 0x27, 0x00, 0x00, 0x00, 0x00, 0x25, 0x03, 0x30, 0x00, 0x00, + 0x00, 0x80, 0xa4, 0x04, 0x18, 0x00, 0x00, 0x00, 0x80, 0xbe, 0x04, 0x07, + 0x00, 0x00, 0x00, 0x40, 0x9a, 0x45, 0x01, 0x00, 0x00, 0x00, 0x20, 0x5e, + 0x85, 0x00, 0x00, 0x00, 0x00, 0x20, 0xcc, 0x87, 0x00, 0x00, 0x00, 0x80, + 0x20, 0xc4, 0xc3, 0x00, 0x00, 0x00, 0x80, 0x23, 0x84, 0x81, 0x00, 0x00, + 0x00, 0x00, 0x43, 0x3d, 0x60, 0x00, 0x00, 0x00, 0x20, 0x86, 0x02, 0x70, + 0x00, 0x00, 0x00, 0xe0, 0x06, 0x8d, 0x39, 0x00, 0x00, 0x00, 0xc0, 0x06, + 0x7a, 0x1c, 0x00, 0x00, 0x00, 0x88, 0x07, 0x06, 0x0e, 0x00, 0x00, 0x00, + 0x18, 0xcf, 0xfa, 0x06, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x03, 0x06, 0x00, + 0x00, 0x00, 0xc0, 0x38, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x03, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x50, 0x34, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x30, 0x7d, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0xa0, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc5, 0x05, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe8, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x10, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0e, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, + 0xc8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x74, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x53, 0x88, 0xdf, 0x01, 0x00, 0x00, 0x80, 0x25, 0x09, 0xf0, 0x07, + 0x00, 0x00, 0x70, 0x9d, 0x18, 0x00, 0x0e, 0x00, 0x00, 0x4c, 0x4f, 0x18, + 0x00, 0x0c, 0x00, 0x00, 0x82, 0x3c, 0x0c, 0x80, 0x0e, 0x00, 0x00, 0x41, + 0x48, 0x03, 0xc0, 0x07, 0x00, 0x00, 0x3e, 0xc0, 0x01, 0x60, 0x01, 0x00, + 0x00, 0xc0, 0x3f, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00}; diff --git a/bitmaps/image-hp.xbm b/bitmaps/image-hp.xbm new file mode 100644 index 00000000..601de76f --- /dev/null +++ b/bitmaps/image-hp.xbm @@ -0,0 +1,20 @@ +#define image_width 46 +#define image_height 34 +static char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xff, 0x79, 0xfe, 0xff, 0xc1, + 0xf8, 0xff, 0x39, 0xfe, 0xff, 0xc7, 0xfc, 0xff, 0x3d, 0xfc, 0xff, 0xcf, + 0xfc, 0xff, 0x3c, 0xe0, 0xff, 0xcf, 0xfe, 0x7f, 0x1c, 0x80, 0xff, 0xdf, + 0xfe, 0x3f, 0x1c, 0x00, 0xff, 0xdf, 0xfe, 0x1f, 0x1e, 0x00, 0xfe, 0xdf, + 0xfe, 0x0f, 0x1e, 0x00, 0xfc, 0xdf, 0xfe, 0x07, 0x0e, 0x00, 0xf8, 0xdf, + 0xfe, 0x07, 0x0f, 0x00, 0xf8, 0xdf, 0xfe, 0x03, 0x7f, 0xfc, 0xf1, 0xdf, + 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, + 0xfe, 0x81, 0xf7, 0xde, 0xe3, 0xdf, 0xfe, 0x81, 0x77, 0xde, 0xe1, 0xdf, + 0xfe, 0x81, 0x73, 0xce, 0xe1, 0xdf, 0xfe, 0xc1, 0x7b, 0xee, 0xe1, 0xdf, + 0xfe, 0xc1, 0x7b, 0xef, 0xe1, 0xdf, 0xfe, 0xc1, 0x3b, 0xe7, 0xe0, 0xdf, + 0xfe, 0xc3, 0x39, 0xff, 0xf0, 0xdf, 0xfe, 0xe3, 0xbd, 0xff, 0xf0, 0xdf, + 0xfe, 0xe3, 0xbd, 0x7f, 0xf0, 0xdf, 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, + 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, 0xfe, 0x0f, 0xc0, 0x03, 0xfc, 0xdf, + 0xfe, 0x1f, 0xc0, 0x03, 0xfe, 0xdf, 0xfe, 0x3f, 0xc0, 0x01, 0xff, 0xdf, + 0xfe, 0x7f, 0xc0, 0x81, 0xff, 0xdf, 0xfc, 0xff, 0xe1, 0xe1, 0xff, 0xcf, + 0xfc, 0xff, 0xe7, 0xfc, 0xff, 0xcf, 0xf8, 0xff, 0xe7, 0xfc, 0xff, 0xc7, + 0xe0, 0xff, 0xf3, 0xfc, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0}; diff --git a/bitmaps/image-linux.xbm b/bitmaps/image-linux.xbm new file mode 100644 index 00000000..fd817b28 --- /dev/null +++ b/bitmaps/image-linux.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static char image_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, + 0x20, 0x00, 0x00, 0xc2, 0x12, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, + 0x46, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x61, 0x04, 0x20, 0x80, 0x00, + 0x02, 0x08, 0x20, 0x20, 0x2c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x30, + 0x88, 0xf0, 0x7f, 0x08, 0x21, 0x84, 0x10, 0x12, 0x58, 0x22, 0x40, 0x21, + 0x84, 0x10, 0x42, 0x18, 0x10, 0x28, 0x40, 0x84, 0x10, 0x42, 0x08, 0x09, + 0x30, 0x61, 0xe0, 0x10, 0x42, 0x08, 0x21, 0x0c, 0x60, 0xc4, 0x30, 0x42, + 0x08, 0x21, 0x84, 0x04, 0xe0, 0xd2, 0x50, 0x29, 0xa5, 0x94, 0x52, 0x06, + 0x40, 0xa5, 0x90, 0x52, 0x4a, 0x29, 0xa5, 0x02, 0xc0, 0xca, 0x38, 0xa5, + 0x94, 0x52, 0x4a, 0x03, 0x80, 0xb5, 0xf8, 0xff, 0xfb, 0xef, 0xff, 0x3f, + 0x80, 0xdb, 0x28, 0x0c, 0x8d, 0x38, 0x0c, 0x21, 0x00, 0x77, 0x78, 0x1e, + 0xcb, 0x69, 0x9e, 0x31, 0x00, 0x6f, 0x78, 0x16, 0xce, 0x79, 0x9e, 0x19, + 0x00, 0x7a, 0x6c, 0x1e, 0xc6, 0x38, 0x9b, 0x0c, 0x00, 0x7e, 0x3c, 0x1e, + 0xe6, 0x3c, 0x1f, 0x04, 0x00, 0x7c, 0x3c, 0x8e, 0xe4, 0x3c, 0x1f, 0x06, + 0x00, 0x2c, 0x3c, 0x8f, 0xe4, 0x1c, 0x1f, 0x03, 0x00, 0x38, 0x3c, 0xcf, + 0x64, 0x9c, 0x0f, 0x01, 0x00, 0x38, 0x1e, 0xc7, 0x70, 0x9e, 0x07, 0x01, + 0x00, 0x30, 0x1e, 0xc7, 0x71, 0x9e, 0x27, 0x01, 0x00, 0x30, 0x9e, 0xe7, + 0x71, 0x8e, 0x33, 0x01, 0x00, 0x10, 0x9e, 0xe7, 0x79, 0xc0, 0x31, 0x03, + 0x00, 0x10, 0x0e, 0xc3, 0xf9, 0xe0, 0x10, 0x02, 0xff, 0x1f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1f, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x01, 0x13, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xf1, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x0c, 0xfe, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x06, 0x7e, 0xf8, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/image-sgi.xbm b/bitmaps/image-sgi.xbm new file mode 100644 index 00000000..9f03d613 --- /dev/null +++ b/bitmaps/image-sgi.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static char image_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, + 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, + 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x01, 0x00, + 0x00, 0x80, 0xff, 0x7c, 0x7c, 0xfe, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x7c, 0x7c, 0xf0, 0x3f, 0x00, + 0x00, 0xfc, 0x07, 0x7c, 0x7c, 0xc0, 0x7f, 0x00, 0x00, 0xff, 0x01, 0x7c, + 0x7c, 0x00, 0xff, 0x01, 0x00, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x01, + 0x80, 0x3f, 0x00, 0x7c, 0x7c, 0x00, 0xf8, 0x03, 0x00, 0xff, 0x00, 0x7c, + 0x7c, 0x00, 0xfe, 0x01, 0x00, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x01, + 0x00, 0xfc, 0x0f, 0x7c, 0x7c, 0xe0, 0x7f, 0x00, 0x40, 0xf0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x1f, 0x04, 0xf0, 0xe1, 0xff, 0x7c, 0x7c, 0xfe, 0x0f, 0x1f, + 0xf8, 0x87, 0xff, 0x73, 0x9c, 0xff, 0xc3, 0x3f, 0xf8, 0x0f, 0xfe, 0x4f, + 0xe4, 0xff, 0xe0, 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x7f, + 0xfc, 0xff, 0xe0, 0xff, 0xff, 0x0f, 0xfe, 0x7f, 0xfc, 0xff, 0x83, 0xff, + 0xff, 0x83, 0xff, 0x7f, 0xfc, 0xff, 0x07, 0xff, 0xff, 0xc1, 0xff, 0x7f, + 0x7c, 0xfe, 0x1f, 0xfc, 0x7f, 0xf0, 0xff, 0x7c, 0x7c, 0xf8, 0x7f, 0xf2, + 0x9f, 0xfc, 0x3f, 0x7c, 0x7c, 0xe0, 0xff, 0xcd, 0x67, 0xfe, 0x0f, 0x7c, + 0x7c, 0xc0, 0xff, 0x33, 0x99, 0xff, 0x07, 0x7c, 0x7c, 0x00, 0xff, 0x0f, + 0xe0, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xfc, 0x3f, 0xf8, 0x7f, 0x00, 0x7c, + 0x7c, 0x00, 0xf2, 0x7f, 0xfc, 0x9f, 0x00, 0x7c, 0x7c, 0x80, 0xcf, 0x7f, + 0xfd, 0xe7, 0x03, 0x7c, 0x7c, 0xe0, 0xbf, 0x7f, 0xfd, 0xf9, 0x0f, 0x7c, + 0x7c, 0xf8, 0x7f, 0x7e, 0xfd, 0xfc, 0x3f, 0x7c, 0x7c, 0xfe, 0x0f, 0x7c, + 0x7d, 0xe0, 0xff, 0x7c, 0xfc, 0xff, 0x83, 0x7d, 0x7d, 0x83, 0xff, 0x7f, + 0xfc, 0xff, 0xe0, 0x7d, 0x7d, 0x0f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x7d, + 0x7c, 0x3f, 0xf8, 0x7f, 0xfc, 0x0f, 0xfe, 0x7d, 0x7c, 0xff, 0xe0, 0x7f, + 0xfc, 0x03, 0xff, 0x7d, 0x7c, 0xff, 0x81, 0x7f, 0xf8, 0xc0, 0xff, 0x7d, + 0x7c, 0xff, 0x07, 0x3e, 0x30, 0xf0, 0xff, 0x7c, 0x7c, 0xfe, 0x1f, 0x18, + 0x00, 0xfc, 0x3f, 0x7c, 0x7c, 0xf8, 0x7f, 0x00, 0x00, 0xff, 0x0f, 0x7c, + 0x7c, 0xe0, 0xff, 0x01, 0x80, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x03, + 0x80, 0xff, 0x00, 0x7c, 0x7c, 0x00, 0xfe, 0x03, 0xc0, 0x3f, 0x00, 0x7c, + 0x7c, 0x00, 0xf8, 0x07, 0xc0, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x07, + 0x80, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xff, 0x03, 0x80, 0xff, 0x07, 0x7c, + 0x7c, 0xc0, 0xff, 0x03, 0x00, 0xfe, 0x1f, 0x7c, 0x7c, 0xf0, 0xff, 0x00, + 0x00, 0xf8, 0x7f, 0x7c, 0x7c, 0xfc, 0x3f, 0x00, 0x00, 0xe0, 0xff, 0x7d, + 0x7c, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x7f, 0xfc, 0xff, 0x03, 0x00, + 0x00, 0x00, 0xfe, 0x7f, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, + 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/image-sun.xbm b/bitmaps/image-sun.xbm new file mode 100644 index 00000000..661778e0 --- /dev/null +++ b/bitmaps/image-sun.xbm @@ -0,0 +1,46 @@ +#define image_width 64 +#define image_height 64 +static char image_bits[] = { + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfe, + 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0xfd, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xfd, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, + 0xf7, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf4, 0xf7, 0xef, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xee, 0xef, 0xdf, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xdf, + 0xbf, 0xff, 0x00, 0x00, 0x00, 0x80, 0xbf, 0xbf, 0x7f, 0xff, 0x00, 0x00, + 0x00, 0x80, 0x7f, 0x7f, 0xff, 0x7e, 0x03, 0x00, 0x00, 0x60, 0xff, 0xfe, + 0xfe, 0xbd, 0x07, 0x00, 0x00, 0xf0, 0xfe, 0xfd, 0xfd, 0xdb, 0x0f, 0x00, + 0x00, 0xf8, 0xfd, 0xfb, 0xfb, 0xe7, 0x1f, 0x00, 0x00, 0xfc, 0xfb, 0xf7, + 0xf7, 0xf7, 0x2f, 0x00, 0x00, 0xfe, 0xf5, 0xef, 0xef, 0xfb, 0x77, 0x00, + 0x00, 0xff, 0xee, 0xdf, 0xcf, 0xfd, 0xfb, 0x00, 0x80, 0x7f, 0xdf, 0xbf, + 0x9f, 0xfe, 0xfd, 0x01, 0xc0, 0xbf, 0xbf, 0xff, 0x1f, 0xff, 0xfe, 0x00, + 0xe0, 0xdf, 0x1f, 0xff, 0x9f, 0x7f, 0x7f, 0x00, 0xf0, 0xef, 0x0f, 0xfe, + 0xcf, 0xbf, 0x3f, 0x07, 0xf8, 0xf7, 0xe7, 0xfc, 0xef, 0xdf, 0xdf, 0x1f, + 0xfc, 0xfb, 0xfb, 0xfb, 0xf7, 0xef, 0xef, 0x3f, 0xfe, 0xfd, 0xfd, 0xe7, + 0xf9, 0xf7, 0xf7, 0x7f, 0xfe, 0xfe, 0xfe, 0x07, 0xf8, 0xfb, 0xfb, 0x7f, + 0x7f, 0x7f, 0xff, 0x0f, 0xfc, 0xfd, 0xfd, 0xff, 0xbf, 0xbf, 0xff, 0x0f, + 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xdf, 0xdf, 0x0f, 0xfc, 0x7f, 0xff, 0xfe, + 0xff, 0xef, 0xef, 0x0f, 0xfc, 0xbf, 0x7f, 0xff, 0xfe, 0xf7, 0xf7, 0x07, + 0xf8, 0xdf, 0xbf, 0x7f, 0xfe, 0xfb, 0xfb, 0xe7, 0xf9, 0xef, 0xdf, 0x7f, + 0xfc, 0xfd, 0xfd, 0xfb, 0xf7, 0xf7, 0xef, 0x3f, 0x70, 0xfe, 0xfe, 0xfd, + 0xcf, 0xf9, 0xf7, 0x1f, 0x00, 0x7f, 0xff, 0xfc, 0x1f, 0xfc, 0xfb, 0x0f, + 0x80, 0xbf, 0x7f, 0xfe, 0x3f, 0xfe, 0xfd, 0x07, 0xc0, 0xdf, 0x3f, 0xfe, + 0x7f, 0xff, 0xfe, 0x03, 0x80, 0xef, 0x5f, 0x7e, 0xff, 0x7e, 0xff, 0x01, + 0x00, 0xf7, 0xef, 0xfc, 0xfe, 0xbd, 0xff, 0x00, 0x00, 0xfa, 0xf7, 0xfd, + 0xfd, 0xdb, 0x7f, 0x00, 0x00, 0xfc, 0xfb, 0xfb, 0xfb, 0xe7, 0x3f, 0x00, + 0x00, 0xf8, 0xf9, 0xf7, 0xf7, 0xef, 0x1f, 0x00, 0x00, 0xf0, 0xee, 0xef, + 0xef, 0xdf, 0x0f, 0x00, 0x00, 0x60, 0xdf, 0xdf, 0xdf, 0xbf, 0x07, 0x00, + 0x00, 0x80, 0xbf, 0xbf, 0xbf, 0x7f, 0x03, 0x00, 0x00, 0x80, 0x7f, 0x7f, + 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0xfe, 0xfe, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0xfd, 0xfd, 0x7d, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfb, + 0xfb, 0x3b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf7, 0xf7, 0x17, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xef, 0xef, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xdf, + 0xdf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/image-x11.xbm b/bitmaps/image-x11.xbm new file mode 100644 index 00000000..d0c76534 --- /dev/null +++ b/bitmaps/image-x11.xbm @@ -0,0 +1,14 @@ +#define image_width 32 +#define image_height 32 +static char image_bits[] = { + 0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x00, 0xc0, 0xfc, 0x03, 0x00, 0x60, + 0xf8, 0x07, 0x00, 0x30, 0xf8, 0x07, 0x00, 0x18, 0xf0, 0x0f, 0x00, 0x0c, + 0xe0, 0x1f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x03, + 0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00, + 0x00, 0xfe, 0x31, 0x00, 0x00, 0xfc, 0x33, 0x00, 0x00, 0xf8, 0x1b, 0x00, + 0x00, 0xf0, 0x0d, 0x00, 0x00, 0xf0, 0x0e, 0x00, 0x00, 0x60, 0x1f, 0x00, + 0x00, 0xb0, 0x3f, 0x00, 0x00, 0x98, 0x7f, 0x00, 0x00, 0x98, 0x7f, 0x00, + 0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x03, 0xfc, 0x03, + 0x80, 0x01, 0xfc, 0x03, 0xc0, 0x00, 0xf8, 0x07, 0xc0, 0x00, 0xf0, 0x0f, + 0x60, 0x00, 0xe0, 0x1f, 0x30, 0x00, 0xe0, 0x1f, 0x18, 0x00, 0xc0, 0x3f, + 0x0c, 0x00, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff}; diff --git a/bitmaps/life-bsd.xbm b/bitmaps/life-bsd.xbm new file mode 100644 index 00000000..1ff4ceff --- /dev/null +++ b/bitmaps/life-bsd.xbm @@ -0,0 +1,21 @@ +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All rights reserved. Reproduced with permission. + */ + +#define life_width 29 +#define life_height 35 +static char life_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x07, 0x40, 0x00, 0x00, 0xfb, 0xc1, 0x00, 0x00, 0xfd, 0xc3, 0x00, + 0x00, 0xf6, 0xcf, 0x01, 0x00, 0x6a, 0xef, 0x01, 0x00, 0xb2, 0xfe, 0x00, + 0x00, 0x33, 0x7f, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x80, 0xf7, 0x0f, 0x00, + 0x98, 0xe7, 0x0f, 0x00, 0x90, 0xfd, 0x0f, 0x00, 0x36, 0xbb, 0x0f, 0x00, + 0x3c, 0xc7, 0x07, 0x00, 0x39, 0xfc, 0x03, 0x00, 0x3f, 0xfc, 0x00, 0x00, + 0xc0, 0x59, 0x01, 0x00, 0xc0, 0xfb, 0x01, 0x00, 0xc0, 0xf7, 0x01, 0x00, + 0x80, 0xcd, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, + 0x00, 0xfa, 0x01, 0x00, 0x00, 0x86, 0x01, 0x00, 0x00, 0xbe, 0x07, 0x00, + 0x00, 0x7c, 0x1f, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0xef, 0xc3, 0x0f, + 0xc0, 0xef, 0x03, 0x1c, 0xf0, 0xf7, 0x03, 0x18, 0xf0, 0xfd, 0x01, 0x0b, + 0xe0, 0xfe, 0x80, 0x07, 0x00, 0x38, 0x00, 0x00}; diff --git a/bitmaps/life-hp.xbm b/bitmaps/life-hp.xbm new file mode 100644 index 00000000..8f02b310 --- /dev/null +++ b/bitmaps/life-hp.xbm @@ -0,0 +1,9 @@ +#define life_width 17 +#define life_height 23 +static char life_bits[] = { + 0x00, 0x00, 0x00, 0xbe, 0xfe, 0x00, 0xbe, 0xfc, 0x00, 0xbf, 0xf8, 0x01, + 0x9f, 0xf0, 0x01, 0xcf, 0xe0, 0x01, 0x4f, 0xe0, 0x01, 0x4f, 0xe0, 0x01, + 0xcf, 0xec, 0x01, 0xe7, 0xce, 0x01, 0xe7, 0xca, 0x01, 0xa7, 0xca, 0x01, + 0xa7, 0xca, 0x01, 0xa7, 0xca, 0x01, 0xaf, 0xee, 0x01, 0x0f, 0xe6, 0x01, + 0x0f, 0xe2, 0x01, 0x0f, 0xe2, 0x01, 0x1f, 0xf3, 0x01, 0x3f, 0xf9, 0x01, + 0x7e, 0xfd, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/life-linux.xbm b/bitmaps/life-linux.xbm new file mode 100644 index 00000000..95394bfa --- /dev/null +++ b/bitmaps/life-linux.xbm @@ -0,0 +1,13 @@ +#define life_width 29 +#define life_height 29 +static char life_bits[] = { + 0xff, 0xff, 0xff, 0x1f, 0x03, 0x00, 0x00, 0x18, 0x12, 0x10, 0x10, 0x08, + 0xfe, 0x89, 0x88, 0x0c, 0x04, 0x11, 0x11, 0x05, 0x9c, 0xab, 0xaa, 0x06, + 0x98, 0xff, 0xff, 0x0f, 0x98, 0x68, 0xad, 0x0b, 0x90, 0x4d, 0x2d, 0x09, + 0x90, 0x4d, 0x6d, 0x0c, 0x90, 0x0d, 0x6d, 0x04, 0x90, 0x2d, 0x6d, 0x0c, + 0x90, 0x2d, 0x21, 0x09, 0x90, 0x68, 0xa1, 0x0b, 0x9f, 0xff, 0xff, 0x1f, + 0x9f, 0xef, 0xff, 0x1f, 0x98, 0xef, 0x3f, 0x00, 0x08, 0xe0, 0x1f, 0x00, + 0xf8, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, + 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, + 0x00, 0xe0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00}; diff --git a/bitmaps/life-sgi.xbm b/bitmaps/life-sgi.xbm new file mode 100644 index 00000000..57806358 --- /dev/null +++ b/bitmaps/life-sgi.xbm @@ -0,0 +1,14 @@ +#define life_width 32 +#define life_height 32 +static char life_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0xf0, 0x1e, 0x00, + 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xff, 0xfe, 0x01, 0x80, 0xe7, 0xce, 0x03, + 0xe0, 0xe3, 0x8e, 0x0f, 0xf0, 0xe0, 0x0e, 0x1e, 0xf0, 0xe0, 0x0e, 0x1e, + 0xe0, 0xe3, 0x8e, 0x0f, 0x9c, 0xef, 0xee, 0x73, 0x3c, 0x1e, 0xf0, 0x78, + 0xfe, 0xf8, 0x3f, 0xfe, 0xfe, 0xf3, 0x9f, 0xff, 0xce, 0xcf, 0xe7, 0xe7, + 0x8e, 0x1f, 0xf0, 0xe3, 0x0e, 0x7e, 0xfc, 0xe0, 0x8e, 0xf9, 0x3e, 0xe3, + 0xce, 0xe3, 0x8e, 0xe7, 0xfe, 0xe1, 0x0e, 0xff, 0x7e, 0xec, 0x6e, 0xfc, + 0x1e, 0xef, 0xee, 0xf1, 0xc4, 0xef, 0xee, 0x47, 0xf0, 0xe3, 0x8e, 0x1f, + 0xf0, 0xe0, 0x0e, 0x1e, 0xf8, 0xe0, 0x0e, 0x3e, 0xf0, 0xe3, 0x8e, 0x1f, + 0xc0, 0xef, 0xee, 0x07, 0x00, 0xff, 0xfe, 0x01, 0x00, 0xfc, 0x7e, 0x00, + 0x00, 0xf0, 0x1e, 0x00, 0x00, 0x40, 0x04, 0x00}; diff --git a/bitmaps/life-sun.xbm b/bitmaps/life-sun.xbm new file mode 100644 index 00000000..fc70813d --- /dev/null +++ b/bitmaps/life-sun.xbm @@ -0,0 +1,13 @@ +#define life_width 29 +#define life_height 29 +static char life_bits[] = { + 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x74, 0x07, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0xdd, 0x1d, 0x00, + 0x80, 0xbb, 0x3b, 0x00, 0x40, 0x77, 0x57, 0x00, 0xe0, 0xee, 0xee, 0x00, + 0x70, 0xdd, 0x75, 0x01, 0xb8, 0xbb, 0xb9, 0x03, 0xdc, 0xf1, 0xdd, 0x01, + 0xee, 0xee, 0xee, 0x0e, 0x77, 0x1f, 0x77, 0x1f, 0xbb, 0x1b, 0xbb, 0x1b, + 0xdf, 0x1d, 0xdf, 0x1d, 0xee, 0xee, 0xee, 0x0e, 0x70, 0xf7, 0x71, 0x07, + 0xb8, 0xb3, 0xbb, 0x03, 0xd0, 0x75, 0xd7, 0x01, 0xe0, 0xee, 0xee, 0x00, + 0x40, 0xdd, 0x5d, 0x00, 0x80, 0xbb, 0x3b, 0x00, 0x00, 0x77, 0x17, 0x00, + 0x00, 0xee, 0x0e, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x00, 0xb8, 0x01, 0x00, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00}; diff --git a/bitmaps/life-x11.xbm b/bitmaps/life-x11.xbm new file mode 100644 index 00000000..9bad630c --- /dev/null +++ b/bitmaps/life-x11.xbm @@ -0,0 +1,6 @@ +#define life_width 16 +#define life_height 16 +static char life_bits[] = { + 0x0f, 0x80, 0x1e, 0x80, 0x3c, 0x40, 0x78, 0x20, 0x78, 0x10, 0xf0, 0x08, + 0xe0, 0x09, 0xc0, 0x05, 0xc0, 0x02, 0x40, 0x07, 0x20, 0x0f, 0x20, 0x1e, + 0x10, 0x1e, 0x08, 0x3c, 0x04, 0x78, 0x02, 0xf0}; diff --git a/bitmaps/maze-bsd.xbm b/bitmaps/maze-bsd.xbm new file mode 100644 index 00000000..d90768f1 --- /dev/null +++ b/bitmaps/maze-bsd.xbm @@ -0,0 +1,52 @@ +/* + * BSD daemon + * The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. + * All Rights Reserved. Reproduced with permission. + */ + +#define maze_width 64 +#define maze_height 64 +static char maze_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x50, 0x3c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xee, + 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x81, 0x0f, 0x70, 0x00, 0x00, + 0x00, 0x00, 0xa8, 0x00, 0x0a, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x38, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x38, 0x90, 0x01, 0x00, + 0x00, 0x00, 0x30, 0x07, 0x50, 0xdc, 0x01, 0x00, 0x00, 0x00, 0x90, 0x08, + 0xc0, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x90, 0xc8, 0x01, 0xd0, 0x00, 0x00, + 0x00, 0x00, 0x48, 0x24, 0x02, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x25, + 0x02, 0x34, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x82, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xc4, 0x73, 0xc2, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x53, + 0xa2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x81, 0xf1, 0x82, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0xf3, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0xe0, + 0xa0, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x41, 0x00, 0x90, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x96, 0x08, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x24, 0x0f, + 0x70, 0x00, 0x00, 0x00, 0xc0, 0x18, 0xc8, 0x80, 0x58, 0x00, 0x00, 0x00, + 0xc0, 0x11, 0x90, 0x73, 0x34, 0x00, 0x00, 0x00, 0x80, 0x13, 0x60, 0x0f, + 0x1a, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x80, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x38, 0x3c, 0x00, 0xd1, 0x06, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0x0e, 0x01, + 0x05, 0x00, 0x00, 0x00, 0xf0, 0xf3, 0x13, 0x01, 0x07, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0xa9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x43, 0x80, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x2c, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa4, 0x3e, + 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd2, 0xa1, 0x0e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x59, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xff, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0xc0, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xc1, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7b, 0xdc, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x08, 0xf6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x30, 0x99, + 0x04, 0x57, 0x0f, 0x00, 0x00, 0x00, 0xd0, 0x28, 0x04, 0xfc, 0x17, 0x00, + 0x00, 0x00, 0xc8, 0x5e, 0x08, 0x00, 0xfc, 0x00, 0x00, 0xc0, 0xb7, 0x27, + 0x08, 0x00, 0xb0, 0x01, 0x00, 0x30, 0xf4, 0x19, 0x18, 0x00, 0xc0, 0x02, + 0x00, 0x08, 0x5c, 0x0a, 0x1c, 0x00, 0xb4, 0x03, 0x00, 0x04, 0x04, 0x03, + 0x0b, 0x80, 0xdb, 0x00, 0x00, 0x04, 0x06, 0xd1, 0x07, 0x80, 0x34, 0x00, + 0x00, 0xf8, 0x01, 0xe2, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x00, 0x06, 0x1f, + 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/maze-hp.xbm b/bitmaps/maze-hp.xbm new file mode 100644 index 00000000..a132b5ab --- /dev/null +++ b/bitmaps/maze-hp.xbm @@ -0,0 +1,20 @@ +#define maze_width 46 +#define maze_height 34 +static char maze_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xff, 0x79, 0xfe, 0xff, 0xc1, + 0xf8, 0xff, 0x39, 0xfe, 0xff, 0xc7, 0xfc, 0xff, 0x3d, 0xfc, 0xff, 0xcf, + 0xfc, 0xff, 0x3c, 0xe0, 0xff, 0xcf, 0xfe, 0x7f, 0x1c, 0x80, 0xff, 0xdf, + 0xfe, 0x3f, 0x1c, 0x00, 0xff, 0xdf, 0xfe, 0x1f, 0x1e, 0x00, 0xfe, 0xdf, + 0xfe, 0x0f, 0x1e, 0x00, 0xfc, 0xdf, 0xfe, 0x07, 0x0e, 0x00, 0xf8, 0xdf, + 0xfe, 0x07, 0x0f, 0x00, 0xf8, 0xdf, 0xfe, 0x03, 0x7f, 0xfc, 0xf1, 0xdf, + 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, 0xfe, 0x03, 0xff, 0xfc, 0xf3, 0xdf, + 0xfe, 0x81, 0xf7, 0xde, 0xe3, 0xdf, 0xfe, 0x81, 0x77, 0xde, 0xe1, 0xdf, + 0xfe, 0x81, 0x73, 0xce, 0xe1, 0xdf, 0xfe, 0xc1, 0x7b, 0xee, 0xe1, 0xdf, + 0xfe, 0xc1, 0x7b, 0xef, 0xe1, 0xdf, 0xfe, 0xc1, 0x3b, 0xe7, 0xe0, 0xdf, + 0xfe, 0xc3, 0x39, 0xff, 0xf0, 0xdf, 0xfe, 0xe3, 0xbd, 0xff, 0xf0, 0xdf, + 0xfe, 0xe3, 0xbd, 0x7f, 0xf0, 0xdf, 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, + 0xfe, 0x07, 0x80, 0x03, 0xf8, 0xdf, 0xfe, 0x0f, 0xc0, 0x03, 0xfc, 0xdf, + 0xfe, 0x1f, 0xc0, 0x03, 0xfe, 0xdf, 0xfe, 0x3f, 0xc0, 0x01, 0xff, 0xdf, + 0xfe, 0x7f, 0xc0, 0x81, 0xff, 0xdf, 0xfc, 0xff, 0xe1, 0xe1, 0xff, 0xcf, + 0xfc, 0xff, 0xe7, 0xfc, 0xff, 0xcf, 0xf8, 0xff, 0xe7, 0xfc, 0xff, 0xc7, + 0xe0, 0xff, 0xf3, 0xfc, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0}; diff --git a/bitmaps/maze-linux.xbm b/bitmaps/maze-linux.xbm new file mode 100644 index 00000000..480f6edf --- /dev/null +++ b/bitmaps/maze-linux.xbm @@ -0,0 +1,46 @@ +#define maze_width 64 +#define maze_height 64 +static char maze_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, + 0x20, 0x00, 0x00, 0xc2, 0x12, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, + 0x46, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x61, 0x04, 0x20, 0x80, 0x00, + 0x02, 0x08, 0x20, 0x20, 0x2c, 0x84, 0x10, 0x42, 0x08, 0x21, 0x84, 0x30, + 0x88, 0xf0, 0x7f, 0x08, 0x21, 0x84, 0x10, 0x12, 0x58, 0x22, 0x40, 0x21, + 0x84, 0x10, 0x42, 0x18, 0x10, 0x28, 0x40, 0x84, 0x10, 0x42, 0x08, 0x09, + 0x30, 0x61, 0xe0, 0x10, 0x42, 0x08, 0x21, 0x0c, 0x60, 0xc4, 0x30, 0x42, + 0x08, 0x21, 0x84, 0x04, 0xe0, 0xd2, 0x50, 0x29, 0xa5, 0x94, 0x52, 0x06, + 0x40, 0xa5, 0x90, 0x52, 0x4a, 0x29, 0xa5, 0x02, 0xc0, 0xca, 0x38, 0xa5, + 0x94, 0x52, 0x4a, 0x03, 0x80, 0xb5, 0xf8, 0xff, 0xfb, 0xef, 0xff, 0x3f, + 0x80, 0xdb, 0x28, 0x0c, 0x8d, 0x38, 0x0c, 0x21, 0x00, 0x77, 0x78, 0x1e, + 0xcb, 0x69, 0x9e, 0x31, 0x00, 0x6f, 0x78, 0x16, 0xce, 0x79, 0x9e, 0x19, + 0x00, 0x7a, 0x6c, 0x1e, 0xc6, 0x38, 0x9b, 0x0c, 0x00, 0x7e, 0x3c, 0x1e, + 0xe6, 0x3c, 0x1f, 0x04, 0x00, 0x7c, 0x3c, 0x8e, 0xe4, 0x3c, 0x1f, 0x06, + 0x00, 0x2c, 0x3c, 0x8f, 0xe4, 0x1c, 0x1f, 0x03, 0x00, 0x38, 0x3c, 0xcf, + 0x64, 0x9c, 0x0f, 0x01, 0x00, 0x38, 0x1e, 0xc7, 0x70, 0x9e, 0x07, 0x01, + 0x00, 0x30, 0x1e, 0xc7, 0x71, 0x9e, 0x27, 0x01, 0x00, 0x30, 0x9e, 0xe7, + 0x71, 0x8e, 0x33, 0x01, 0x00, 0x10, 0x9e, 0xe7, 0x79, 0xc0, 0x31, 0x03, + 0x00, 0x10, 0x0e, 0xc3, 0xf9, 0xe0, 0x10, 0x02, 0xff, 0x1f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1f, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x01, 0x13, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xf1, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x0c, 0xfe, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x06, 0x7e, 0xf8, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, + 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/maze-sgi.xbm b/bitmaps/maze-sgi.xbm new file mode 100644 index 00000000..9b0ec645 --- /dev/null +++ b/bitmaps/maze-sgi.xbm @@ -0,0 +1,46 @@ +#define maze_width 64 +#define maze_height 64 +static char maze_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, + 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0xf8, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, + 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x01, 0x00, + 0x00, 0x80, 0xff, 0x7c, 0x7c, 0xfe, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x7c, 0x7c, 0xf0, 0x3f, 0x00, + 0x00, 0xfc, 0x07, 0x7c, 0x7c, 0xc0, 0x7f, 0x00, 0x00, 0xff, 0x01, 0x7c, + 0x7c, 0x00, 0xff, 0x01, 0x00, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x01, + 0x80, 0x3f, 0x00, 0x7c, 0x7c, 0x00, 0xf8, 0x03, 0x00, 0xff, 0x00, 0x7c, + 0x7c, 0x00, 0xfe, 0x01, 0x00, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x01, + 0x00, 0xfc, 0x0f, 0x7c, 0x7c, 0xe0, 0x7f, 0x00, 0x40, 0xf0, 0x3f, 0x7c, + 0x7c, 0xf8, 0x1f, 0x04, 0xf0, 0xe1, 0xff, 0x7c, 0x7c, 0xfe, 0x0f, 0x1f, + 0xf8, 0x87, 0xff, 0x73, 0x9c, 0xff, 0xc3, 0x3f, 0xf8, 0x0f, 0xfe, 0x4f, + 0xe4, 0xff, 0xe0, 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x7f, + 0xfc, 0xff, 0xe0, 0xff, 0xff, 0x0f, 0xfe, 0x7f, 0xfc, 0xff, 0x83, 0xff, + 0xff, 0x83, 0xff, 0x7f, 0xfc, 0xff, 0x07, 0xff, 0xff, 0xc1, 0xff, 0x7f, + 0x7c, 0xfe, 0x1f, 0xfc, 0x7f, 0xf0, 0xff, 0x7c, 0x7c, 0xf8, 0x7f, 0xf2, + 0x9f, 0xfc, 0x3f, 0x7c, 0x7c, 0xe0, 0xff, 0xcd, 0x67, 0xfe, 0x0f, 0x7c, + 0x7c, 0xc0, 0xff, 0x33, 0x99, 0xff, 0x07, 0x7c, 0x7c, 0x00, 0xff, 0x0f, + 0xe0, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xfc, 0x3f, 0xf8, 0x7f, 0x00, 0x7c, + 0x7c, 0x00, 0xf2, 0x7f, 0xfc, 0x9f, 0x00, 0x7c, 0x7c, 0x80, 0xcf, 0x7f, + 0xfd, 0xe7, 0x03, 0x7c, 0x7c, 0xe0, 0xbf, 0x7f, 0xfd, 0xf9, 0x0f, 0x7c, + 0x7c, 0xf8, 0x7f, 0x7e, 0xfd, 0xfc, 0x3f, 0x7c, 0x7c, 0xfe, 0x0f, 0x7c, + 0x7d, 0xe0, 0xff, 0x7c, 0xfc, 0xff, 0x83, 0x7d, 0x7d, 0x83, 0xff, 0x7f, + 0xfc, 0xff, 0xe0, 0x7d, 0x7d, 0x0f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x7d, + 0x7c, 0x3f, 0xf8, 0x7f, 0xfc, 0x0f, 0xfe, 0x7d, 0x7c, 0xff, 0xe0, 0x7f, + 0xfc, 0x03, 0xff, 0x7d, 0x7c, 0xff, 0x81, 0x7f, 0xf8, 0xc0, 0xff, 0x7d, + 0x7c, 0xff, 0x07, 0x3e, 0x30, 0xf0, 0xff, 0x7c, 0x7c, 0xfe, 0x1f, 0x18, + 0x00, 0xfc, 0x3f, 0x7c, 0x7c, 0xf8, 0x7f, 0x00, 0x00, 0xff, 0x0f, 0x7c, + 0x7c, 0xe0, 0xff, 0x01, 0x80, 0xff, 0x03, 0x7c, 0x7c, 0x80, 0xff, 0x03, + 0x80, 0xff, 0x00, 0x7c, 0x7c, 0x00, 0xfe, 0x03, 0xc0, 0x3f, 0x00, 0x7c, + 0x7c, 0x00, 0xf8, 0x07, 0xc0, 0x7f, 0x00, 0x7c, 0x7c, 0x00, 0xfc, 0x07, + 0x80, 0xff, 0x01, 0x7c, 0x7c, 0x00, 0xff, 0x03, 0x80, 0xff, 0x07, 0x7c, + 0x7c, 0xc0, 0xff, 0x03, 0x00, 0xfe, 0x1f, 0x7c, 0x7c, 0xf0, 0xff, 0x00, + 0x00, 0xf8, 0x7f, 0x7c, 0x7c, 0xfc, 0x3f, 0x00, 0x00, 0xe0, 0xff, 0x7d, + 0x7c, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x7f, 0xfc, 0xff, 0x03, 0x00, + 0x00, 0x00, 0xfe, 0x7f, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, + 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xfc, 0x0f, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/maze-sun.xbm b/bitmaps/maze-sun.xbm new file mode 100644 index 00000000..2bed1770 --- /dev/null +++ b/bitmaps/maze-sun.xbm @@ -0,0 +1,46 @@ +#define maze_width 64 +#define maze_height 64 +static char maze_bits[] = { + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7e, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfe, + 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0xfd, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xfd, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, + 0xf7, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf4, 0xf7, 0xef, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xee, 0xef, 0xdf, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xdf, + 0xbf, 0xff, 0x00, 0x00, 0x00, 0x80, 0xbf, 0xbf, 0x7f, 0xff, 0x00, 0x00, + 0x00, 0x80, 0x7f, 0x7f, 0xff, 0x7e, 0x03, 0x00, 0x00, 0x60, 0xff, 0xfe, + 0xfe, 0xbd, 0x07, 0x00, 0x00, 0xf0, 0xfe, 0xfd, 0xfd, 0xdb, 0x0f, 0x00, + 0x00, 0xf8, 0xfd, 0xfb, 0xfb, 0xe7, 0x1f, 0x00, 0x00, 0xfc, 0xfb, 0xf7, + 0xf7, 0xf7, 0x2f, 0x00, 0x00, 0xfe, 0xf5, 0xef, 0xef, 0xfb, 0x77, 0x00, + 0x00, 0xff, 0xee, 0xdf, 0xcf, 0xfd, 0xfb, 0x00, 0x80, 0x7f, 0xdf, 0xbf, + 0x9f, 0xfe, 0xfd, 0x01, 0xc0, 0xbf, 0xbf, 0xff, 0x1f, 0xff, 0xfe, 0x00, + 0xe0, 0xdf, 0x1f, 0xff, 0x9f, 0x7f, 0x7f, 0x00, 0xf0, 0xef, 0x0f, 0xfe, + 0xcf, 0xbf, 0x3f, 0x07, 0xf8, 0xf7, 0xe7, 0xfc, 0xef, 0xdf, 0xdf, 0x1f, + 0xfc, 0xfb, 0xfb, 0xfb, 0xf7, 0xef, 0xef, 0x3f, 0xfe, 0xfd, 0xfd, 0xe7, + 0xf9, 0xf7, 0xf7, 0x7f, 0xfe, 0xfe, 0xfe, 0x07, 0xf8, 0xfb, 0xfb, 0x7f, + 0x7f, 0x7f, 0xff, 0x0f, 0xfc, 0xfd, 0xfd, 0xff, 0xbf, 0xbf, 0xff, 0x0f, + 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xdf, 0xdf, 0x0f, 0xfc, 0x7f, 0xff, 0xfe, + 0xff, 0xef, 0xef, 0x0f, 0xfc, 0xbf, 0x7f, 0xff, 0xfe, 0xf7, 0xf7, 0x07, + 0xf8, 0xdf, 0xbf, 0x7f, 0xfe, 0xfb, 0xfb, 0xe7, 0xf9, 0xef, 0xdf, 0x7f, + 0xfc, 0xfd, 0xfd, 0xfb, 0xf7, 0xf7, 0xef, 0x3f, 0x70, 0xfe, 0xfe, 0xfd, + 0xcf, 0xf9, 0xf7, 0x1f, 0x00, 0x7f, 0xff, 0xfc, 0x1f, 0xfc, 0xfb, 0x0f, + 0x80, 0xbf, 0x7f, 0xfe, 0x3f, 0xfe, 0xfd, 0x07, 0xc0, 0xdf, 0x3f, 0xfe, + 0x7f, 0xff, 0xfe, 0x03, 0x80, 0xef, 0x5f, 0x7e, 0xff, 0x7e, 0xff, 0x01, + 0x00, 0xf7, 0xef, 0xfc, 0xfe, 0xbd, 0xff, 0x00, 0x00, 0xfa, 0xf7, 0xfd, + 0xfd, 0xdb, 0x7f, 0x00, 0x00, 0xfc, 0xfb, 0xfb, 0xfb, 0xe7, 0x3f, 0x00, + 0x00, 0xf8, 0xf9, 0xf7, 0xf7, 0xef, 0x1f, 0x00, 0x00, 0xf0, 0xee, 0xef, + 0xef, 0xdf, 0x0f, 0x00, 0x00, 0x60, 0xdf, 0xdf, 0xdf, 0xbf, 0x07, 0x00, + 0x00, 0x80, 0xbf, 0xbf, 0xbf, 0x7f, 0x03, 0x00, 0x00, 0x80, 0x7f, 0x7f, + 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0xfe, 0xfe, 0x00, 0x00, + 0x00, 0x00, 0xfe, 0xfd, 0xfd, 0x7d, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfb, + 0xfb, 0x3b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf7, 0xf7, 0x17, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0xef, 0xef, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xdf, + 0xdf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/maze-x11.xbm b/bitmaps/maze-x11.xbm new file mode 100644 index 00000000..4f588b57 --- /dev/null +++ b/bitmaps/maze-x11.xbm @@ -0,0 +1,46 @@ +#define maze_width 64 +#define maze_height 64 +static char maze_bits[] = { + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7c, + 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xf8, 0xff, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x0f, + 0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xc0, 0xff, 0x3f, 0x00, + 0x00, 0x00, 0xc0, 0x07, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0x03, + 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xff, 0xff, 0x00, + 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x00, + 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xfc, 0xff, 0x03, + 0x00, 0x00, 0x3e, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, + 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0x0f, + 0x00, 0xc0, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xc0, 0x07, 0x00, + 0x00, 0xc0, 0xff, 0x3f, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x80, 0xff, 0x7f, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0xf8, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, + 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x3e, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xcf, 0x07, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xcf, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, + 0xe7, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xf3, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xff, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7e, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0xff, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xcf, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, + 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xc3, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc1, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x80, 0xff, 0x7f, 0x00, 0x00, + 0x00, 0x00, 0x7c, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, + 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xfe, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x1f, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x80, 0x0f, 0x00, + 0xf8, 0xff, 0x07, 0x00, 0x00, 0xc0, 0x07, 0x00, 0xf0, 0xff, 0x0f, 0x00, + 0x00, 0xe0, 0x03, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0xe0, 0x03, 0x00, + 0xe0, 0xff, 0x1f, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xc0, 0xff, 0x3f, 0x00, + 0x00, 0xf8, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x7c, 0x00, 0x00, + 0x80, 0xff, 0x7f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, + 0x00, 0x3e, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x1f, 0x00, 0x00, + 0x00, 0xfc, 0xff, 0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, + 0xc0, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0xe0, 0x03, 0x00, 0x00, + 0x00, 0xf0, 0xff, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, + 0xf0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0xff, 0x3f, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, + 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff}; diff --git a/bitmaps/shark-0.xbm b/bitmaps/shark-0.xbm new file mode 100644 index 00000000..9f2cd3dc --- /dev/null +++ b/bitmaps/shark-0.xbm @@ -0,0 +1,8 @@ +#define shark0_width 20 +#define shark0_height 20 +static char shark0_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, + 0xc0, 0x3f, 0x00, 0x40, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x26, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x38, 0x00}; diff --git a/bitmaps/shark-1.xbm b/bitmaps/shark-1.xbm new file mode 100644 index 00000000..e1aab7ca --- /dev/null +++ b/bitmaps/shark-1.xbm @@ -0,0 +1,8 @@ +#define shark1_width 20 +#define shark1_height 20 +static char shark1_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x18, 0x00, + 0xc0, 0xff, 0x01, 0xfc, 0xff, 0x07, 0xfe, 0xff, 0x07, 0xc3, 0xff, 0x01, + 0x01, 0x18, 0x00, 0x07, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-2.xbm b/bitmaps/shark-2.xbm new file mode 100644 index 00000000..0d608639 --- /dev/null +++ b/bitmaps/shark-2.xbm @@ -0,0 +1,8 @@ +#define shark2_width 20 +#define shark2_height 20 +static char shark2_bits[] = { + 0xc0, 0x01, 0x00, 0x60, 0x03, 0x00, 0x40, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x2f, 0x00, 0xc0, 0x3f, 0x00, + 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-3.xbm b/bitmaps/shark-3.xbm new file mode 100644 index 00000000..4a61ed5a --- /dev/null +++ b/bitmaps/shark-3.xbm @@ -0,0 +1,8 @@ +#define shark3_width 20 +#define shark3_height 20 +static char shark3_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x0e, 0x80, 0x01, 0x08, + 0xf8, 0x3f, 0x0c, 0xfe, 0xff, 0x07, 0xfe, 0xff, 0x03, 0xf8, 0x3f, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-4.xbm b/bitmaps/shark-4.xbm new file mode 100644 index 00000000..d983d7fd --- /dev/null +++ b/bitmaps/shark-4.xbm @@ -0,0 +1,8 @@ +#define shark4_width 20 +#define shark4_height 20 +static char shark4_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, + 0xc0, 0x3f, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x40, 0x06, 0x00, 0x60, 0x03, 0x00, 0xc0, 0x01, 0x00}; diff --git a/bitmaps/shark-5.xbm b/bitmaps/shark-5.xbm new file mode 100644 index 00000000..cdf14219 --- /dev/null +++ b/bitmaps/shark-5.xbm @@ -0,0 +1,8 @@ +#define shark5_width 20 +#define shark5_height 20 +static char shark5_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x08, 0x00, 0x01, 0x18, 0x00, + 0xc3, 0xff, 0x01, 0xfe, 0xff, 0x07, 0xfc, 0xff, 0x07, 0xc0, 0xff, 0x01, + 0x00, 0x18, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-6.xbm b/bitmaps/shark-6.xbm new file mode 100644 index 00000000..16eaac17 --- /dev/null +++ b/bitmaps/shark-6.xbm @@ -0,0 +1,8 @@ +#define shark6_width 20 +#define shark6_height 20 +static char shark6_bits[] = { + 0x00, 0x38, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x26, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x40, 0x0f, 0x00, 0xc0, 0x3f, 0x00, + 0x80, 0x1f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, + 0x00, 0x0f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/shark-7.xbm b/bitmaps/shark-7.xbm new file mode 100644 index 00000000..77cc4c4a --- /dev/null +++ b/bitmaps/shark-7.xbm @@ -0,0 +1,8 @@ +#define shark7_width 20 +#define shark7_height 20 +static char shark7_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x01, 0x00, + 0xf8, 0x3f, 0x00, 0xfe, 0xff, 0x03, 0xfe, 0xff, 0x07, 0xf8, 0x3f, 0x0c, + 0x80, 0x01, 0x08, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-00.xbm b/bitmaps/terra-00.xbm new file mode 100644 index 00000000..699c208f --- /dev/null +++ b/bitmaps/terra-00.xbm @@ -0,0 +1,48 @@ +#define terra00_width 64 +#define terra00_height 64 +#define terra00_x_hot 32 +#define terra00_y_hot 32 +static char terra00_bits[] = { +0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x01, 0xf8, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x20, 0x00, 0xdc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0xdc, 0xff, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0xd8, 0xff, 0x03, 0x00, +0x00, 0xe0, 0x00, 0xe0, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x78, 0x00, 0x00, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x1c, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x0e, 0x00, 0x80, 0xf7, 0xff, 0x7f, 0x00, 0x00, 0x03, 0x00, 0xf0, +0x21, 0xff, 0xff, 0x00, 0x80, 0x00, 0x00, 0xf0, 0x80, 0xfb, 0xff, 0x01, +0x00, 0x00, 0x00, 0x60, 0x00, 0xf2, 0xff, 0x01, 0x40, 0x00, 0x00, 0xa0, +0x1f, 0x80, 0xff, 0x03, 0x20, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0xff, 0x07, +0x00, 0x00, 0x00, 0xf0, 0xff, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0xf8, +0xff, 0xff, 0xdf, 0x0f, 0x08, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x3e, 0x1f, +0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7d, 0x18, 0x00, 0x00, 0x00, 0xff, +0xff, 0xff, 0xf9, 0x19, 0x04, 0x00, 0x80, 0xff, 0xff, 0xff, 0xfb, 0x31, +0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf7, 0x21, 0x00, 0x00, 0x00, 0xff, +0xff, 0xff, 0xe7, 0x21, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xef, 0x00, +0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x40, 0x04, 0x00, 0x80, 0xff, +0xff, 0xff, 0x1f, 0x40, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, +0x1e, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x1e, 0x00, 0x00, 0xfc, +0xf8, 0xff, 0xff, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x00, +0x7e, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x7f, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x3f, 0x00, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, +0xff, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0xff, 0x0f, 0x00, 0x00, +0xc0, 0xff, 0x0f, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, +0xfe, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0xfe, 0x1f, 0x00, 0x00, +0x80, 0xff, 0x0f, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, +0xfc, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x8f, 0x00, 0xfc, 0x0f, 0x00, 0x00, +0x80, 0xff, 0xcf, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x67, 0x00, +0xf0, 0x0f, 0x00, 0x00, 0x80, 0xff, 0x63, 0x00, 0xf0, 0x0f, 0x00, 0x00, +0x80, 0xff, 0x21, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x21, 0x00, +0xe0, 0x07, 0x00, 0x00, 0x00, 0xff, 0x11, 0x00, 0xe0, 0x03, 0x00, 0x00, +0x00, 0x7f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, +0xc0, 0x03, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, +0x00, 0x1e, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-01.xbm b/bitmaps/terra-01.xbm new file mode 100644 index 00000000..f6bb4196 --- /dev/null +++ b/bitmaps/terra-01.xbm @@ -0,0 +1,48 @@ +#define terra01_width 64 +#define terra01_height 64 +#define terra01_x_hot 32 +#define terra01_y_hot 32 +static char terra01_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3e, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x07, 0xe0, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x86, 0x01, 0x60, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, +0xe0, 0xfe, 0x00, 0x00, 0x00, 0x40, 0x03, 0x00, 0xc6, 0xfc, 0x03, 0x00, +0x00, 0xe0, 0x03, 0x00, 0xce, 0xff, 0x07, 0x00, 0x00, 0xf8, 0x02, 0x00, +0xf0, 0xff, 0x1f, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, +0x00, 0x3c, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x0f, 0x00, 0x00, +0x3e, 0xf4, 0xff, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1e, 0xa0, 0xff, 0x01, +0x80, 0x01, 0x00, 0x00, 0x1c, 0x48, 0xff, 0x01, 0xc0, 0x00, 0x00, 0x00, +0xf0, 0x03, 0xf0, 0x03, 0x60, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xf0, 0x07, +0x20, 0x00, 0x00, 0x00, 0xfe, 0x9f, 0xfd, 0x07, 0x30, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0x0f, 0x38, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x19, +0x38, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xdf, 0x13, 0x38, 0x00, 0x00, 0xc0, +0xff, 0xff, 0xbf, 0x0f, 0x24, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x0f, +0x40, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f, 0x0f, 0x02, 0x00, 0x00, 0xc0, +0xff, 0xff, 0xff, 0x0e, 0x02, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x0e, +0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x07, 0x20, 0x00, 0x00, 0xc0, +0xff, 0xff, 0xff, 0x03, 0xf0, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x0f, +0xfc, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0x01, 0x00, 0x00, +0x7e, 0xfe, 0xff, 0x0f, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, +0xf8, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 0xfc, 0x0f, 0x00, 0x00, +0x00, 0xf0, 0xff, 0x07, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, +0xfc, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x01, 0xfc, 0xff, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x01, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x01, +0xf8, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff, 0x01, 0xf8, 0xff, 0x07, 0x00, +0x00, 0xc0, 0xff, 0x01, 0xf0, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0x01, +0xf0, 0xff, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x01, 0xf0, 0xff, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x04, 0xe0, 0xff, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x04, +0xc0, 0xff, 0x03, 0x00, 0x00, 0xe0, 0x7f, 0x02, 0x80, 0xff, 0x01, 0x00, +0x00, 0xe0, 0x3f, 0x02, 0x80, 0xff, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x01, +0x80, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x01, 0x00, 0x7f, 0x00, 0x00, +0x00, 0xe0, 0x0f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, +0x00, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x3e, 0x00, 0x00, +0x00, 0xc0, 0x01, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xfe, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-02.xbm b/bitmaps/terra-02.xbm new file mode 100644 index 00000000..d8114943 --- /dev/null +++ b/bitmaps/terra-02.xbm @@ -0,0 +1,48 @@ +#define terra02_width 64 +#define terra02_height 64 +#define terra02_x_hot 32 +#define terra02_y_hot 32 +static char terra02_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3c, 0x80, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x08, 0x0c, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, +0x00, 0xf7, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x00, 0x60, 0xe4, 0x03, 0x00, +0x00, 0xe0, 0x3f, 0x00, 0xa0, 0xfe, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, +0x00, 0xff, 0x1f, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xff, 0x3f, 0x00, +0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x7f, 0x00, 0x00, +0xc0, 0x07, 0xff, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0x03, 0xff, 0x01, +0x80, 0x0f, 0x00, 0x00, 0x80, 0x03, 0xf4, 0x01, 0xc0, 0x07, 0x00, 0x00, +0x00, 0x7d, 0xc0, 0x03, 0xe0, 0x03, 0x00, 0x00, 0x80, 0xff, 0x80, 0x07, +0xe0, 0x01, 0x00, 0x00, 0x80, 0xff, 0xfb, 0x07, 0x30, 0x00, 0x00, 0x00, +0xc0, 0xff, 0xff, 0x0f, 0x18, 0x01, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1e, +0x08, 0x01, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x00, +0xf0, 0xff, 0xff, 0x1f, 0x04, 0x01, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, +0x14, 0x02, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x37, 0x0c, 0x00, 0x00, 0x00, +0xf0, 0xff, 0xff, 0x37, 0x18, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x2f, +0x18, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x1f, 0x10, 0x03, 0x00, 0x00, +0xf0, 0xff, 0xff, 0x1f, 0x90, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x3f, +0xc0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x3f, 0x80, 0x7f, 0x00, 0x00, +0x80, 0x9f, 0xff, 0x3f, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x3f, +0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0xc0, 0xff, 0x03, 0x00, +0x00, 0x00, 0xfc, 0x3f, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x1f, +0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xe0, 0xff, 0xff, 0x00, +0x00, 0x00, 0xf8, 0x1f, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x0f, +0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x0f, 0xc0, 0xff, 0xff, 0x01, +0x00, 0x00, 0xf8, 0x0f, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x0f, +0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0xff, 0xff, 0x00, +0x00, 0x00, 0xfc, 0x2f, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x07, +0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x13, 0x00, 0xfc, 0x7f, 0x00, +0x00, 0x00, 0xf8, 0x01, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0x09, +0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0xf8, 0x0f, 0x00, +0x00, 0x00, 0xfc, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x7c, 0x00, +0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xf0, 0x07, 0x00, +0x00, 0x00, 0x1c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x90, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-03.xbm b/bitmaps/terra-03.xbm new file mode 100644 index 00000000..4651b028 --- /dev/null +++ b/bitmaps/terra-03.xbm @@ -0,0 +1,48 @@ +#define terra03_width 64 +#define terra03_height 64 +#define terra03_x_hot 32 +#define terra03_y_hot 32 +static char terra03_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe3, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf3, 0x00, 0x0e, 0x00, 0x00, +0x00, 0x00, 0x2e, 0x70, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, +0x00, 0xd8, 0x00, 0x00, 0x00, 0xc0, 0xf3, 0x01, 0x00, 0xa2, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x01, 0x00, 0xec, 0x07, 0x00, 0x00, 0xf8, 0x3f, 0x01, +0x00, 0xf0, 0x1f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xf0, 0x3f, 0x00, +0x00, 0xfe, 0x0f, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xff, 0x03, 0x00, +0x00, 0x78, 0xf8, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x78, 0xe8, 0x01, +0xc0, 0xff, 0x00, 0x00, 0x00, 0x30, 0xe8, 0x01, 0xc0, 0x7f, 0x00, 0x00, +0x00, 0xe0, 0x07, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x06, +0xe0, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 0xe0, 0x08, 0x00, 0x00, +0x00, 0xf0, 0xff, 0x0f, 0x70, 0x08, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, +0x30, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x30, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x1f, 0x30, 0x11, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, +0xb0, 0x40, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0xf0, 0x00, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x3f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, +0x80, 0x01, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x61, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x7f, 0x00, 0xf1, 0x03, 0x00, 0x00, 0xf0, 0xff, 0x7f, +0x00, 0xfa, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0xf8, 0x0f, 0x00, +0x00, 0xc0, 0xe7, 0xff, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xff, +0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0xfc, 0xff, 0x00, +0x00, 0x00, 0x80, 0xff, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x80, 0x7f, +0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x80, 0x7f, 0x00, 0xfe, 0xff, 0x7f, +0x00, 0x00, 0x00, 0x7f, 0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, +0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x00, 0xf8, 0xff, 0xff, +0x00, 0x00, 0x00, 0x3f, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x3f, +0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0xf0, 0xff, 0x3f, +0x00, 0x00, 0x80, 0x3f, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x3f, +0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x80, 0xff, 0x3f, +0x00, 0x00, 0x80, 0x0f, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0x80, 0x0f, +0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xff, 0x03, +0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x80, 0x03, +0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xff, 0x00, +0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xe0, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x30, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-04.xbm b/bitmaps/terra-04.xbm new file mode 100644 index 00000000..d87219de --- /dev/null +++ b/bitmaps/terra-04.xbm @@ -0,0 +1,48 @@ +#define terra04_width 64 +#define terra04_height 64 +#define terra04_x_hot 32 +#define terra04_y_hot 32 +static char terra04_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x8f, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x9d, 0x07, 0x08, 0x00, 0x00, +0x00, 0x00, 0x3e, 0x81, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0b, +0x00, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x9f, 0x0f, 0x00, 0x90, 0x02, 0x00, +0x00, 0xe0, 0xdf, 0x1f, 0x00, 0x70, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x31, +0x00, 0x80, 0x1f, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x3f, 0x00, +0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0xfe, 0x7f, 0x00, +0x00, 0x80, 0xf3, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xc3, 0x01, +0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x02, 0x01, 0x80, 0xff, 0x07, 0x00, +0x00, 0x00, 0x38, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x7e, 0x00, +0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x07, 0xc0, 0x07, 0x01, 0x00, +0x00, 0x00, 0xfe, 0x0f, 0xc0, 0x03, 0x01, 0x00, 0x00, 0x00, 0xff, 0x1f, +0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x80, 0x01, 0x00, 0x00, +0x00, 0x00, 0xff, 0x1f, 0x80, 0x11, 0x02, 0x00, 0x00, 0x00, 0xff, 0x3f, +0x80, 0x1b, 0x18, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x80, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xff, 0x3f, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, +0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x10, 0x08, 0x00, +0x00, 0x00, 0xfe, 0x7f, 0x00, 0x20, 0xfe, 0x01, 0x00, 0x00, 0xfc, 0x7f, +0x00, 0x40, 0xff, 0x03, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xff, 0x07, +0x00, 0x00, 0xf8, 0xfe, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xfc, +0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x80, 0xff, 0x7f, +0x00, 0x00, 0x00, 0xf8, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, +0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x80, 0xff, 0xff, +0x3f, 0x00, 0x00, 0xf0, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, +0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x70, 0x00, 0x00, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x70, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x70, +0x00, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x78, 0x00, 0x00, 0xfc, 0xff, +0x1f, 0x00, 0x00, 0x78, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x38, +0x00, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xe0, 0xff, +0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x1c, +0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xe0, 0xff, +0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x0c, +0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xe0, 0x3f, +0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x80, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x70, 0x1e, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-05.xbm b/bitmaps/terra-05.xbm new file mode 100644 index 00000000..fddf0d2a --- /dev/null +++ b/bitmaps/terra-05.xbm @@ -0,0 +1,48 @@ +#define terra05_width 64 +#define terra05_height 64 +#define terra05_x_hot 32 +#define terra05_y_hot 32 +static char terra05_bits[] = { +0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, +0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x67, 0x3c, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x00, 0x0c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x78, +0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0xff, 0xf8, 0x00, 0x40, 0x02, 0x00, +0x00, 0xc0, 0xff, 0xfd, 0x01, 0x80, 0x06, 0x00, 0x00, 0xe0, 0xff, 0x7f, +0x02, 0x00, 0x1e, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x3c, 0x00, +0x00, 0xf8, 0xff, 0x2f, 0x00, 0x00, 0x70, 0x00, 0x00, 0xf8, 0xff, 0x07, +0x00, 0x00, 0xdc, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x38, 0x01, +0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x30, 0x01, 0x00, 0xfe, 0xff, 0x00, +0x00, 0x00, 0xc0, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x03, +0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x7c, 0x20, 0x00, +0x00, 0x00, 0xe0, 0x0f, 0x00, 0x3c, 0x20, 0x00, 0x00, 0x00, 0xe0, 0x1f, +0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x38, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x1f, 0x00, 0x38, 0xc2, 0x00, 0x00, 0x00, 0xe0, 0x3f, +0x00, 0x38, 0x03, 0x06, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0xf0, 0x01, 0x00, +0x00, 0x00, 0xe0, 0x3f, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0xe0, 0x7f, +0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x04, 0x02, +0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x88, 0x7f, 0x00, 0x00, 0x80, 0x7f, +0x00, 0x00, 0xd0, 0xff, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, +0x03, 0x00, 0x00, 0xef, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0xe0, +0x00, 0x00, 0xc0, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0xff, +0x1f, 0x00, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0xc0, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0xc0, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x0f, 0x00, 0x80, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x80, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, +0xff, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x40, +0x00, 0x00, 0x80, 0xff, 0xff, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, +0xff, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x20, +0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf8, +0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, +0x1f, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x08, +0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x19, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-06.xbm b/bitmaps/terra-06.xbm new file mode 100644 index 00000000..2ce1be12 --- /dev/null +++ b/bitmaps/terra-06.xbm @@ -0,0 +1,48 @@ +#define terra06_width 64 +#define terra06_height 64 +#define terra06_x_hot 32 +#define terra06_y_hot 32 +static char terra06_bits[] = { +0x00, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x9f, 0xf3, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x07, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc3, +0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc7, 0x0f, 0x00, 0x02, 0x00, +0x00, 0x80, 0xff, 0xdf, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x80, 0xff, 0xff, +0x07, 0x00, 0x18, 0x00, 0x00, 0x80, 0xff, 0xff, 0x07, 0x00, 0x30, 0x00, +0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x40, 0x00, 0x00, 0xe0, 0xff, 0xff, +0x00, 0x00, 0xe0, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0xc0, 0x00, +0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf0, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x03, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x07, +0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc0, 0x1f, 0x08, +0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x1e, +0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x07, 0x00, +0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x87, 0x20, 0x00, 0x00, 0x00, 0x3e, +0x00, 0x00, 0xcf, 0x00, 0x03, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7e, 0x00, +0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x7c, +0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x81, +0x01, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xc2, 0x3f, 0x00, 0x00, 0x78, +0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xe0, +0xff, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x80, +0x00, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, +0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-07.xbm b/bitmaps/terra-07.xbm new file mode 100644 index 00000000..9479aa5d --- /dev/null +++ b/bitmaps/terra-07.xbm @@ -0,0 +1,48 @@ +#define terra07_width 64 +#define terra07_height 64 +#define terra07_x_hot 32 +#define terra07_y_hot 32 +static char terra07_bits[] = { +0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, +0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xcc, 0x03, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x3f, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x1f, +0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x7c, 0x00, 0x02, 0x00, +0x00, 0x00, 0xfc, 0xff, 0xfd, 0x01, 0x08, 0x00, 0x00, 0x00, 0xfc, 0xff, +0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x7f, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, +0x1f, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x01, +0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x04, +0x00, 0x00, 0xfe, 0xbf, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, +0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0xf8, 0x01, 0x02, 0x00, 0x00, 0x18, +0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xe0, 0x01, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xe0, 0x21, 0x08, 0x00, 0x00, 0x30, +0x00, 0x00, 0xe0, 0x33, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x80, 0x3f, +0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x60, +0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, +0x40, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, 0xe1, 0x0f, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0xfa, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x3f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfc, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-08.xbm b/bitmaps/terra-08.xbm new file mode 100644 index 00000000..3e3f7454 --- /dev/null +++ b/bitmaps/terra-08.xbm @@ -0,0 +1,48 @@ +#define terra08_width 64 +#define terra08_height 64 +#define terra08_x_hot 32 +#define terra08_y_hot 32 +static char terra08_bits[] = { +0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, +0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x33, 0x06, 0x00, 0x00, +0x00, 0x00, 0xfc, 0xff, 0x61, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe2, 0xff, +0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xc7, 0x03, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x2f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7e, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-09.xbm b/bitmaps/terra-09.xbm new file mode 100644 index 00000000..37a2f891 --- /dev/null +++ b/bitmaps/terra-09.xbm @@ -0,0 +1,48 @@ +#define terra09_width 64 +#define terra09_height 64 +#define terra09_x_hot 32 +#define terra09_y_hot 32 +static char terra09_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x9f, 0x0c, 0x00, 0x00, +0x00, 0x00, 0xf8, 0xff, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x88, 0xff, +0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x1e, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +0xff, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x7f, 0x01, 0x00, +0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x40, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x86, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x7e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-10.xbm b/bitmaps/terra-10.xbm new file mode 100644 index 00000000..3be1f5d1 --- /dev/null +++ b/bitmaps/terra-10.xbm @@ -0,0 +1,48 @@ +#define terra10_width 64 +#define terra10_height 64 +#define terra10_x_hot 32 +#define terra10_y_hot 32 +static char terra10_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xbf, 0x01, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xff, 0xff, 0x04, 0x00, 0x00, +0x00, 0x00, 0xc6, 0xff, 0x7f, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x60, 0xf8, +0x7f, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x73, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x0f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x10, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-11.xbm b/bitmaps/terra-11.xbm new file mode 100644 index 00000000..d2fc13ad --- /dev/null +++ b/bitmaps/terra-11.xbm @@ -0,0 +1,48 @@ +#define terra11_width 64 +#define terra11_height 64 +#define terra11_x_hot 32 +#define terra11_y_hot 32 +static char terra11_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0xff, 0x0b, 0x00, 0x00, +0x00, 0x00, 0x0e, 0xff, 0xff, 0x33, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc3, +0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xdf, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfd, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x40, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x11, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x13, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, +0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x10, 0x00, 0x00, +0x00, 0x00, 0x60, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, +0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-12.xbm b/bitmaps/terra-12.xbm new file mode 100644 index 00000000..9d1fa469 --- /dev/null +++ b/bitmaps/terra-12.xbm @@ -0,0 +1,48 @@ +#define terra12_width 64 +#define terra12_height 64 +#define terra12_x_hot 32 +#define terra12_y_hot 32 +static char terra12_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfb, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x3e, 0xf8, 0xff, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x06, 0x38, +0xfc, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf8, 0x7f, 0x03, 0x00, +0x00, 0x20, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, +0xc0, 0xff, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, +0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x40, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0c, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, +0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x01, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, +0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-13.xbm b/bitmaps/terra-13.xbm new file mode 100644 index 00000000..b43b1f78 --- /dev/null +++ b/bitmaps/terra-13.xbm @@ -0,0 +1,48 @@ +#define terra13_width 64 +#define terra13_height 64 +#define terra13_x_hot 32 +#define terra13_y_hot 32 +static char terra13_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xc1, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, +0xe1, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x80, 0xff, 0x03, 0x00, +0x00, 0x60, 0x02, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, +0x00, 0xfc, 0x1f, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, +0x00, 0x06, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0xc0, 0x01, 0x00, 0x00, +0x00, 0x80, 0xff, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x11, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x23, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1c, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-14.xbm b/bitmaps/terra-14.xbm new file mode 100644 index 00000000..e2fab6f9 --- /dev/null +++ b/bitmaps/terra-14.xbm @@ -0,0 +1,48 @@ +#define terra14_width 64 +#define terra14_height 64 +#define terra14_x_hot 32 +#define terra14_y_hot 32 +static char terra14_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, +0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x0f, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, +0x1c, 0xfe, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x00, 0x00, 0xfc, 0x03, 0x00, +0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf8, 0x01, 0x00, +0x00, 0xc0, 0x1f, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, +0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x07, 0x00, 0x00, +0x00, 0x00, 0xff, 0x00, 0x80, 0x13, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x40, 0x05, 0x00, 0x00, +0x00, 0x00, 0xf8, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, +0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x30, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x07, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x70, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x10, 0x1e, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-15.xbm b/bitmaps/terra-15.xbm new file mode 100644 index 00000000..1c7bf6bd --- /dev/null +++ b/bitmaps/terra-15.xbm @@ -0,0 +1,48 @@ +#define terra15_width 64 +#define terra15_height 64 +#define terra15_x_hot 32 +#define terra15_y_hot 32 +static char terra15_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xf9, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0x7f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x04, +0xc0, 0xf8, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x06, 0x00, 0xe0, 0x03, 0x00, +0x00, 0xe0, 0x0f, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, +0x00, 0x00, 0x1e, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, +0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3f, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, +0x80, 0x8b, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xc0, 0x41, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x03, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0e, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x16, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x27, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-16.xbm b/bitmaps/terra-16.xbm new file mode 100644 index 00000000..9034d6c9 --- /dev/null +++ b/bitmaps/terra-16.xbm @@ -0,0 +1,48 @@ +#define terra16_width 64 +#define terra16_height 64 +#define terra16_x_hot 32 +#define terra16_y_hot 32 +static char terra16_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, +0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xef, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0x83, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x61, +0x00, 0xe6, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x30, 0x00, 0x00, 0x03, 0x00, +0x00, 0xe0, 0xff, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0xf8, 0x7f, 0x00, +0x00, 0x00, 0x18, 0x00, 0x00, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0x30, 0x00, +0x00, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xff, 0x01, 0x00, +0x00, 0x00, 0xc0, 0x00, 0x80, 0xbf, 0x10, 0x00, 0x00, 0x00, 0x80, 0x01, +0x80, 0x9f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x0f, 0x06, 0x00, +0x00, 0x00, 0x00, 0x02, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, +0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x08, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x68, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x8f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x04, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0c, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xfe, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x18, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-17.xbm b/bitmaps/terra-17.xbm new file mode 100644 index 00000000..647b51c5 --- /dev/null +++ b/bitmaps/terra-17.xbm @@ -0,0 +1,48 @@ +#define terra17_width 64 +#define terra17_height 64 +#define terra17_x_hot 32 +#define terra17_y_hot 32 +static char terra17_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x6f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0x1f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, +0x06, 0x90, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x03, 0x10, 0x02, 0x00, +0x00, 0xe0, 0xff, 0x07, 0x01, 0x00, 0x04, 0x00, 0x00, 0xf8, 0xff, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1b, 0x02, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x81, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x41, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x20, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x26, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0xe0, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x87, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0x3f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xc0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-18.xbm b/bitmaps/terra-18.xbm new file mode 100644 index 00000000..45c92914 --- /dev/null +++ b/bitmaps/terra-18.xbm @@ -0,0 +1,48 @@ +#define terra18_width 64 +#define terra18_height 64 +#define terra18_x_hot 32 +#define terra18_y_hot 32 +static char terra18_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0e, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, +0x30, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0x30, 0x00, 0x00, 0x00, +0x00, 0xe0, 0xff, 0xff, 0x10, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xbf, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, +0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x41, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0x1f, 0x61, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x1f, 0x11, +0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x70, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x38, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x3c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x38, 0x30, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x22, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x86, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, +0x00, 0xcc, 0x09, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xf0, +0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x40, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x8f, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xdf, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, +0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, +0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xf8, +0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc0, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-19.xbm b/bitmaps/terra-19.xbm new file mode 100644 index 00000000..fd4dea45 --- /dev/null +++ b/bitmaps/terra-19.xbm @@ -0,0 +1,48 @@ +#define terra19_width 64 +#define terra19_height 64 +#define terra19_x_hot 32 +#define terra19_y_hot 32 +static char terra19_bits[] = { +0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, +0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x67, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0x07, 0x81, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x83, 0x01, 0x00, 0x00, +0x00, 0xe0, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0x07, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, +0x08, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, +0x80, 0xff, 0xff, 0x63, 0x08, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, +0x06, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, +0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +0xe8, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc4, 0xe7, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc4, 0xe3, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xe1, 0x07, 0x04, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x40, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x0e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf1, 0x08, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf1, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x73, 0x02, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, +0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, +0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, +0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-20.xbm b/bitmaps/terra-20.xbm new file mode 100644 index 00000000..3b828fc8 --- /dev/null +++ b/bitmaps/terra-20.xbm @@ -0,0 +1,48 @@ +#define terra20_width 64 +#define terra20_height 64 +#define terra20_x_hot 32 +#define terra20_y_hot 32 +static char terra20_bits[] = { +0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0x3f, 0x08, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x1f, 0x08, 0x02, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +0x0f, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x0d, 0x00, 0x00, 0x00, +0x80, 0xff, 0xff, 0xff, 0x08, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, +0x88, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, +0xe0, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, +0x01, 0x00, 0x00, 0x00, 0xd8, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +0x38, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x38, 0xfe, 0xff, 0x1f, +0x01, 0x00, 0x00, 0x00, 0x3c, 0xfe, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, +0x1c, 0x7c, 0xf8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x3c, 0xf8, 0x01, +0x01, 0x00, 0x00, 0x00, 0x06, 0x0c, 0xe0, 0x03, 0x01, 0x00, 0x00, 0x00, +0x02, 0x0c, 0xe0, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x03, +0x04, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x03, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x20, 0x40, +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x7c, +0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x3c, 0xc0, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x38, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0x02, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xc0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1b, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xff, 0x3f, 0x00, 0x00, 0x08, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0x83, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-21.xbm b/bitmaps/terra-21.xbm new file mode 100644 index 00000000..1b969eeb --- /dev/null +++ b/bitmaps/terra-21.xbm @@ -0,0 +1,48 @@ +#define terra21_width 64 +#define terra21_height 64 +#define terra21_x_hot 32 +#define terra21_y_hot 32 +static char terra21_bits[] = { +0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, +0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0x21, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x61, 0x00, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +0xff, 0x21, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x9f, 0x21, 0x00, 0x00, +0xc0, 0xff, 0xff, 0xff, 0x1f, 0x21, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, +0x1f, 0x30, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, +0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, +0xf8, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xe8, 0xe3, 0xff, 0xff, +0x0f, 0x00, 0x00, 0x00, 0xfc, 0xc1, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, +0xf4, 0x81, 0x0f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x76, 0x80, 0x07, 0xfe, +0x00, 0x00, 0x00, 0x00, 0x36, 0x80, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, +0x1e, 0x80, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x01, 0xe0, +0x00, 0x00, 0x00, 0x00, 0x1e, 0x80, 0x01, 0x40, 0x00, 0x03, 0x00, 0x00, +0x1f, 0x00, 0x02, 0x08, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x10, +0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x16, 0x38, 0x00, 0x00, 0x00, +0x0f, 0x00, 0x00, 0x2c, 0x1c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, +0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x30, 0x1e, 0x20, 0x00, 0x00, +0x03, 0x00, 0x00, 0x70, 0xdc, 0xa0, 0x01, 0x00, 0x03, 0x00, 0x00, 0x60, +0x00, 0x80, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x06, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, +0x00, 0x7e, 0x06, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0xff, 0x06, 0x00, +0x24, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0x00, 0x24, 0x00, 0x00, 0x00, +0xe0, 0xff, 0x0f, 0x00, 0x28, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, +0x08, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x08, 0x00, 0x00, 0x00, +0xf8, 0xff, 0x0f, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, +0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf0, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x90, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-22.xbm b/bitmaps/terra-22.xbm new file mode 100644 index 00000000..49c663dd --- /dev/null +++ b/bitmaps/terra-22.xbm @@ -0,0 +1,48 @@ +#define terra22_width 64 +#define terra22_height 64 +#define terra22_x_hot 32 +#define terra22_y_hot 32 +static char terra22_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, +0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x8f, 0x01, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0x7f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, +0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xff, +0xff, 0x3f, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x13, 0x02, 0x00, +0x80, 0xff, 0xff, 0xff, 0xff, 0x23, 0x02, 0x00, 0x00, 0xfe, 0xff, 0xff, +0xff, 0x27, 0x03, 0x00, 0x20, 0xfe, 0xff, 0xff, 0xff, 0x87, 0x00, 0x00, +0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xf7, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x00, 0xf8, 0xe7, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, +0xb8, 0x0f, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0xb8, 0x3f, 0xfc, 0xff, +0xff, 0x03, 0x00, 0x00, 0xbc, 0x3f, 0xf0, 0xc7, 0xbf, 0x00, 0x00, 0x00, +0xbc, 0x1f, 0xf0, 0x83, 0x9f, 0x00, 0x00, 0x00, 0xbe, 0x0f, 0xf0, 0x81, +0x3f, 0x00, 0x00, 0x00, 0xbe, 0x03, 0xf0, 0x00, 0x7e, 0x00, 0x00, 0x00, +0xfe, 0x00, 0x60, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x7e, 0x00, 0x60, 0x00, +0x70, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x60, 0x00, 0x20, 0xc0, 0x00, 0x00, +0xff, 0x01, 0x80, 0x00, 0x02, 0xc0, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, +0x04, 0x88, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x09, 0x0c, 0x00, 0x00, +0xff, 0x00, 0x00, 0x00, 0x0a, 0x0e, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +0x8c, 0x0f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1c, 0x0f, 0x08, 0x00, +0x1f, 0x00, 0x00, 0x00, 0x38, 0x27, 0x78, 0x00, 0x1f, 0x00, 0x00, 0x00, +0x10, 0x20, 0xe0, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, +0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x3e, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x02, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x3e, 0x03, 0x00, 0x00, +0x00, 0x80, 0x4f, 0x00, 0x3e, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, +0x3c, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x3c, 0x02, 0x00, 0x00, +0x00, 0xf8, 0xff, 0x00, 0x38, 0x02, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, +0x38, 0x02, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x30, 0x00, 0x00, 0x00, +0x00, 0xfe, 0xff, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, +0x60, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x40, 0x00, 0x00, 0x00, +0x00, 0x1e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-23.xbm b/bitmaps/terra-23.xbm new file mode 100644 index 00000000..0f128c79 --- /dev/null +++ b/bitmaps/terra-23.xbm @@ -0,0 +1,48 @@ +#define terra23_width 64 +#define terra23_height 64 +#define terra23_x_hot 32 +#define terra23_y_hot 32 +static char terra23_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, +0xdf, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, +0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, +0xff, 0xff, 0x01, 0x00, 0x00, 0xfa, 0xff, 0xff, 0xff, 0xbf, 0x01, 0x00, +0x40, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x40, 0xe0, 0xff, 0xff, +0xff, 0x7f, 0x30, 0x00, 0x20, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00, +0xe0, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x7f, 0xfe, 0xff, +0xff, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, +0xf8, 0xfb, 0x84, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf8, 0xfb, 0x0f, 0xff, +0xff, 0x7f, 0x00, 0x00, 0xfc, 0xfb, 0x07, 0xfc, 0xf3, 0x2f, 0x00, 0x00, +0xfc, 0xf3, 0x03, 0xfc, 0xe1, 0x27, 0x00, 0x00, 0xfe, 0xf3, 0x01, 0x7c, +0xc0, 0x0f, 0x04, 0x00, 0xfe, 0x73, 0x00, 0x38, 0x00, 0x1f, 0x04, 0x00, +0xfe, 0x1f, 0x00, 0x38, 0x00, 0x1f, 0x08, 0x00, 0xfe, 0x07, 0x00, 0x38, +0x00, 0x1c, 0x10, 0x00, 0xfe, 0x7f, 0x00, 0x10, 0x00, 0x08, 0x10, 0x00, +0xff, 0x3f, 0x00, 0x40, 0x00, 0x01, 0x10, 0x00, 0xff, 0x3f, 0x00, 0x00, +0x00, 0x02, 0x02, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0x02, 0x03, 0x00, +0xfe, 0x0f, 0x00, 0x00, 0x00, 0x87, 0x03, 0x00, 0xfe, 0x07, 0x00, 0x00, +0x00, 0xc7, 0x13, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, +0xfe, 0x03, 0x00, 0x00, 0x00, 0xcc, 0x09, 0x07, 0xfc, 0x01, 0x00, 0x00, +0x00, 0x0c, 0x08, 0x0e, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0c, 0xfc, 0x03, 0x00, 0x00, +0x00, 0x00, 0x10, 0x10, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xf8, 0x63, 0x00, 0x00, +0x00, 0x00, 0xf0, 0x05, 0xf8, 0x33, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, +0xf8, 0x21, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xf0, 0x21, 0x00, 0x00, +0x00, 0x00, 0xff, 0x07, 0xf0, 0x23, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, +0xe0, 0x23, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0xe0, 0x03, 0x00, 0x00, +0x00, 0xc0, 0xff, 0x07, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, +0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0xff, 0x03, 0x80, 0x03, 0x00, 0x00, +0x00, 0xc0, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-24.xbm b/bitmaps/terra-24.xbm new file mode 100644 index 00000000..44bae9c7 --- /dev/null +++ b/bitmaps/terra-24.xbm @@ -0,0 +1,48 @@ +#define terra24_width 64 +#define terra24_height 64 +#define terra24_x_hot 32 +#define terra24_y_hot 32 +static char terra24_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, +0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, +0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xe8, 0xff, 0xff, +0xff, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, +0x00, 0xd4, 0xff, 0xff, 0xff, 0xff, 0x87, 0x00, 0xc0, 0x01, 0xff, 0xff, +0xff, 0xff, 0xa7, 0x00, 0xe0, 0x01, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x00, +0xe0, 0xdf, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0xdf, 0xff, +0xff, 0xff, 0x1f, 0x00, 0xf8, 0xbf, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x00, +0xf8, 0x3f, 0xbf, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0xf8, 0x7f, 0xff, 0xc1, +0xff, 0xff, 0x0f, 0x00, 0xfc, 0x7f, 0xff, 0x01, 0xff, 0xfc, 0x01, 0x00, +0xfc, 0x7f, 0xfe, 0x00, 0x7e, 0xf8, 0x05, 0x00, 0xfe, 0x7f, 0x7e, 0x00, +0x3e, 0xf0, 0x03, 0x00, 0xfe, 0xff, 0x1e, 0x00, 0x1e, 0xc0, 0x03, 0x00, +0xfe, 0xff, 0x03, 0x00, 0x0c, 0xc0, 0x07, 0x00, 0xfe, 0xff, 0x01, 0x00, +0x0c, 0x00, 0x07, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x0c, 0x00, 0x02, 0x00, +0xff, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x00, 0x02, 0xff, 0xff, 0x07, 0x00, +0x00, 0x80, 0x40, 0x02, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x20, 0x60, 0x00, +0xf0, 0xff, 0x03, 0x00, 0x00, 0x40, 0x61, 0x00, 0xf0, 0xff, 0x01, 0x00, +0x00, 0x80, 0x71, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x80, 0x71, 0x00, +0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x33, 0x30, 0xf0, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x02, 0x20, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x20, 0x62, 0xe0, 0x7f, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x7f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xff, 0x08, 0x00, +0x00, 0x00, 0x00, 0x0e, 0xc0, 0x7f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x1f, +0xc0, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x1f, 0xc0, 0x3f, 0x0c, 0x00, +0x00, 0x00, 0xe0, 0x1f, 0x80, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0xf0, 0x1f, +0x00, 0x3f, 0x0c, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x3f, 0x00, 0x00, +0x00, 0x00, 0xf8, 0x0f, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, +0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x1c, 0x00, 0x00, +0x00, 0x00, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-25.xbm b/bitmaps/terra-25.xbm new file mode 100644 index 00000000..6283965b --- /dev/null +++ b/bitmaps/terra-25.xbm @@ -0,0 +1,48 @@ +#define terra25_width 64 +#define terra25_height 64 +#define terra25_x_hot 32 +#define terra25_y_hot 32 +static char terra25_bits[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x80, 0xf4, 0xff, 0xff, 0xff, 0x03, 0x00, +0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x4c, 0xff, 0xff, +0xff, 0xff, 0x3f, 0x00, 0x00, 0x06, 0xfd, 0xff, 0xff, 0xff, 0x7f, 0x00, +0x00, 0x03, 0xfd, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x0f, 0xe0, 0xff, +0xff, 0xff, 0x7f, 0x02, 0x80, 0x0f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x02, +0xc0, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xf3, +0xff, 0xff, 0xff, 0x01, 0xe0, 0xff, 0xf7, 0xc7, 0xff, 0xff, 0xff, 0x01, +0xf0, 0xff, 0xef, 0x2f, 0xf8, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xef, 0xff, +0xf0, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xcf, 0x7f, 0xc0, 0x3f, 0x3f, 0x00, +0xf8, 0xff, 0xcf, 0x7f, 0x80, 0x1f, 0x3e, 0x00, 0xfc, 0xff, 0x9f, 0x1f, +0x80, 0x0f, 0x7c, 0x00, 0xfc, 0xff, 0x9f, 0x07, 0x80, 0x07, 0x78, 0x00, +0xfc, 0xff, 0xff, 0x01, 0x00, 0x07, 0x78, 0x08, 0xfc, 0xff, 0x7f, 0x00, +0x00, 0x07, 0xe0, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x02, 0x40, 0x10, +0xfc, 0xff, 0xff, 0x03, 0x00, 0x08, 0x10, 0x10, 0xdc, 0xff, 0xff, 0x03, +0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x28, 0x04, +0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x30, 0x06, 0x80, 0xff, 0x7f, 0x00, +0x00, 0x00, 0x30, 0x07, 0x80, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x20, 0x46, +0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xe0, 0xc6, 0x00, 0xff, 0x1f, 0x00, +0x00, 0x00, 0x40, 0x80, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, +0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xfe, 0x1f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xfe, 0x1f, 0x06, +0x00, 0x00, 0x00, 0x70, 0x00, 0xfe, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x38, +0x00, 0xfc, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0xfc, 0x07, 0x03, +0x00, 0x00, 0x00, 0x3e, 0x00, 0xf8, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1f, +0x00, 0xf8, 0x07, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x00, 0xf0, 0x07, 0x00, +0x00, 0x00, 0x80, 0x1f, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x80, 0x0f, +0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xc0, 0x03, 0x00, +0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-26.xbm b/bitmaps/terra-26.xbm new file mode 100644 index 00000000..7790d059 --- /dev/null +++ b/bitmaps/terra-26.xbm @@ -0,0 +1,48 @@ +#define terra26_width 64 +#define terra26_height 64 +#define terra26_x_hot 32 +#define terra26_y_hot 32 +static char terra26_bits[] = { +0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfe, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x32, 0xff, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x70, 0xf4, 0xff, +0xff, 0xff, 0xff, 0x00, 0x00, 0x38, 0xb1, 0xff, 0xff, 0xff, 0xff, 0x01, +0x00, 0x18, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf8, 0x00, 0xfc, +0xff, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x03, +0x00, 0xfe, 0xfb, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0xff, +0xfe, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0xfd, 0xf1, 0xff, 0xff, 0x07, +0xc0, 0xff, 0xff, 0xf9, 0x0b, 0xfe, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xfb, +0x3f, 0xfc, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xf3, 0x3f, 0xf0, 0xe7, 0x03, +0xe0, 0xff, 0xff, 0xf3, 0x1f, 0xe0, 0xc3, 0x03, 0xf0, 0xff, 0xff, 0xe7, +0x07, 0xe0, 0xc3, 0x03, 0xf0, 0xff, 0xff, 0xef, 0x01, 0xc0, 0x01, 0x07, +0xf0, 0xff, 0xff, 0x5f, 0x00, 0xc0, 0x00, 0x07, 0xf0, 0xff, 0xff, 0x1f, +0x00, 0x80, 0x00, 0x04, 0xf0, 0xff, 0xff, 0xff, 0x01, 0x80, 0x00, 0x04, +0xf0, 0xff, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0xe0, 0xfd, 0xff, 0xff, +0x00, 0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x21, +0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x22, 0x00, 0xf0, 0xff, 0x3f, +0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf4, +0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x6c, 0x00, 0xe0, 0xff, 0x07, +0x00, 0x00, 0x00, 0x04, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x08, +0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0xc0, 0xff, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x8f, +0x01, 0x00, 0x00, 0x40, 0x00, 0xc0, 0xff, 0xc7, 0x01, 0x00, 0x00, 0x00, +0x00, 0xc0, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x20, 0x00, 0x80, 0xff, 0xc1, +0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x18, +0x00, 0x00, 0xff, 0x41, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xff, 0x00, +0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x0c, +0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x78, 0x00, +0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-27.xbm b/bitmaps/terra-27.xbm new file mode 100644 index 00000000..57fcb793 --- /dev/null +++ b/bitmaps/terra-27.xbm @@ -0,0 +1,48 @@ +#define terra27_width 64 +#define terra27_height 64 +#define terra27_x_hot 32 +#define terra27_y_hot 32 +static char terra27_bits[] = { +0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf8, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xfb, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0xdc, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x80, 0xc7, 0xfe, +0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x83, 0xf6, 0xff, 0xff, 0xff, 0x01, +0x00, 0xc0, 0x41, 0xf0, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x1f, 0x00, +0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x1f, 0x00, 0xff, 0xff, 0xff, 0x07, +0x00, 0xf0, 0x7f, 0xef, 0xff, 0xff, 0xff, 0x07, 0x00, 0xf8, 0xff, 0xff, +0xbf, 0xff, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x7f, 0x7f, 0xfc, 0xff, 0x1f, +0x00, 0xfe, 0xff, 0xff, 0xfe, 0x82, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0xff, +0xfe, 0x0f, 0xff, 0x1f, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x0f, 0x7c, 0x1e, +0x00, 0xff, 0xff, 0xff, 0xf9, 0x07, 0x7c, 0x1c, 0x00, 0xff, 0xff, 0xff, +0xf9, 0x03, 0x38, 0x1c, 0x80, 0xff, 0xff, 0xff, 0xf3, 0x00, 0x38, 0x18, +0x80, 0xff, 0xff, 0xff, 0x37, 0x00, 0x30, 0x30, 0x80, 0xff, 0xff, 0xff, +0x0f, 0x00, 0x30, 0x20, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x20, +0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x40, 0x00, 0x00, 0xbe, 0xff, 0xff, +0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x90, +0x00, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0x00, 0x90, 0x00, 0x00, 0xfc, 0xff, +0x0f, 0x00, 0x00, 0xb0, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xa0, +0x01, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x01, 0x00, 0xf8, 0xff, +0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, +0x03, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, +0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, +0x02, 0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, +0x43, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0xff, 0x71, 0x00, 0x00, 0x00, +0x04, 0x00, 0xf0, 0xff, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe0, 0x7f, +0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x30, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x7f, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0xc0, 0x3f, +0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-28.xbm b/bitmaps/terra-28.xbm new file mode 100644 index 00000000..52807334 --- /dev/null +++ b/bitmaps/terra-28.xbm @@ -0,0 +1,48 @@ +#define terra28_width 64 +#define terra28_height 64 +#define terra28_x_hot 32 +#define terra28_y_hot 32 +static char terra28_bits[] = { +0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, +0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0xff, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x04, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0x98, 0xff, 0xff, 0x03, 0x00, +0x00, 0x00, 0xe0, 0xfc, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x78, 0xc8, +0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3c, 0xd0, 0xfe, 0xff, 0xff, 0x01, +0x00, 0x00, 0x1c, 0x88, 0xfe, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0x03, +0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0x03, 0xe0, 0xff, 0xff, 0x07, +0x00, 0x00, 0xfe, 0xcf, 0xfb, 0xff, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, +0xff, 0xef, 0xff, 0x0f, 0x00, 0xc0, 0xff, 0xff, 0xdf, 0x9f, 0xff, 0x1f, +0x00, 0xc0, 0xff, 0xff, 0xbf, 0xbf, 0xf0, 0x1f, 0x00, 0xe0, 0xff, 0xff, +0x3f, 0xff, 0xe1, 0x1f, 0x00, 0xe0, 0xff, 0xff, 0x7f, 0xff, 0xc1, 0x37, +0x00, 0xe0, 0xff, 0xff, 0x7f, 0xfe, 0x81, 0x33, 0x00, 0xf0, 0xff, 0xff, +0xff, 0xfc, 0x80, 0x23, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3d, 0x00, 0x63, +0x00, 0xf0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x43, 0x00, 0xf0, 0xff, 0xff, +0xff, 0x03, 0x00, 0x02, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x02, +0x00, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x01, 0xc0, 0xe7, 0xff, +0xff, 0x1f, 0x00, 0x00, 0x01, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, +0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x80, 0x01, 0x00, 0x00, 0xff, +0xff, 0x07, 0x00, 0x80, 0x03, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x80, +0x07, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfe, +0xff, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, +0x1f, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xfc, +0xff, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, +0x0e, 0x00, 0x00, 0xfc, 0xff, 0x21, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xfc, +0xff, 0x31, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xfc, 0x7f, 0x18, 0x00, 0x00, +0x1c, 0x00, 0x00, 0xfc, 0x3f, 0x18, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xf8, +0x3f, 0x0c, 0x00, 0x00, 0x18, 0x00, 0x00, 0xf8, 0x3f, 0x0c, 0x00, 0x00, +0x08, 0x00, 0x00, 0xf8, 0x1f, 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0xf0, +0x0f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xe0, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/bitmaps/terra-29.xbm b/bitmaps/terra-29.xbm new file mode 100644 index 00000000..6b6f8a2f --- /dev/null +++ b/bitmaps/terra-29.xbm @@ -0,0 +1,48 @@ +#define terra29_width 64 +#define terra29_height 64 +#define terra29_x_hot 32 +#define terra29_y_hot 32 +static char terra29_bits[] = { +0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, +0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xdf, 0x0f, 0x00, 0x00, +0x00, 0x00, 0x08, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +0xfb, 0xff, 0x00, 0x00, 0x00, 0x40, 0x00, 0x8c, 0xf9, 0xff, 0x03, 0x00, +0x00, 0x20, 0x00, 0xce, 0xff, 0xff, 0x07, 0x00, 0x00, 0x18, 0x00, 0xf8, +0xff, 0xff, 0x1f, 0x00, 0x00, 0x04, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x00, +0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x0f, +0xf9, 0xff, 0xff, 0x00, 0x00, 0x00, 0x80, 0x07, 0xda, 0xff, 0xff, 0x01, +0x00, 0x00, 0x80, 0x03, 0x90, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7d, +0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0x00, 0xf8, 0xff, 0x07, +0x00, 0x00, 0xc0, 0xff, 0xf3, 0xff, 0xff, 0x07, 0x00, 0x00, 0xe0, 0xff, +0xff, 0xff, 0xfd, 0x0f, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xf7, 0xf3, 0x1f, +0x00, 0x00, 0xf8, 0xff, 0xff, 0xef, 0x07, 0x1f, 0x00, 0x00, 0xfc, 0xff, +0xff, 0xef, 0x3f, 0x1e, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xdf, 0x3f, 0x1c, +0x00, 0x00, 0xfc, 0xff, 0xff, 0x9f, 0x3f, 0x18, 0x00, 0x00, 0xfc, 0xff, +0xff, 0xbf, 0x1f, 0x18, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x0f, 0x18, +0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x03, 0x10, 0x00, 0x00, 0xfe, 0xff, +0xff, 0xff, 0x00, 0x10, 0x02, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x0f, 0x00, +0x03, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x07, 0x00, 0x03, 0x00, 0xf0, 0xf3, +0xff, 0xff, 0x07, 0x00, 0x07, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, +0x07, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x07, 0x00, 0x00, 0x80, +0xff, 0xff, 0x01, 0x00, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, +0x3f, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, +0xff, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, +0xff, 0x01, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, +0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, +0xfe, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x04, 0x00, 0xfe, 0x00, 0x00, 0x00, +0xff, 0x7f, 0x06, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x07, 0x00, +0xfc, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x03, 0x00, 0xfc, 0x00, 0x00, 0x00, +0xfe, 0x0f, 0x03, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x01, 0x00, +0x78, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x01, 0x00, 0x70, 0x00, 0x00, 0x00, +0xfc, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, +0x60, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, +0x78, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00}; diff --git a/blank.c b/blank.c new file mode 100644 index 00000000..e6bff83b --- /dev/null +++ b/blank.c @@ -0,0 +1,29 @@ +#ifndef lint +static char sccsid[] = "@(#)blank.c 0.1.5 91/05/24 xlockmore"; +#endif +/*- + * blank.c - blank screen for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * 31-Aug-90: Written. + */ + +#include "xlock.h" + +/*ARGSUSED*/ +void +drawblank(win) + Window win; +{ +} + +void +initblank(win) + Window win; +{ + XClearWindow(dsp, win); +} diff --git a/blot.c b/blot.c new file mode 100644 index 00000000..f0f175c3 --- /dev/null +++ b/blot.c @@ -0,0 +1,134 @@ +#ifndef lint +static char sccsid[] = "@(#)blot.c 2.7 95/02/21 xlockmore"; +#endif +/* + * Rorschach's ink blot test + * + * Copyright (c) 1992 by Jamie Zawinski + * + * 05-Jan-95: patch for Dual-Headed machines from Greg Onufer + * + * 07-Dec-94: now randomly has xsym, ysym, or both. + * 02-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 1992: xscreensaver version (Jamie Zawinski jwz@lucid.com) + */ + +/* original copyright + * Copyright (c) 1992 by Jamie Zawinski + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include "xlock.h" + +typedef struct { + int width; + int height; + int xmid, ymid; + int offset; + int xsym, ysym; + int size; + int pix; + long startTime; +} blotstruct; + +static blotstruct blots[MAXSCREENS]; +static XPoint *pointBuffer = 0; /* pointer for XDrawPoints */ +static unsigned long pointBufferSize = 0; + +#define TIMEOUT 30 + +void +initblot(win) + Window win; +{ + XWindowAttributes xgwa; + blotstruct *bp = &blots[screen]; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + bp->width = xgwa.width; + bp->height = xgwa.height; + bp->xmid = bp->width / 2; + bp->ymid = bp->height / 2; + + bp->offset = 4; + bp->ysym = RAND() % 2; + bp->xsym = (bp->ysym) ? RAND() % 2 : 1; + bp->pix = 0; + if (bp->offset <= 0) bp->offset = 3; + if (batchcount >= 100 || batchcount < 1) + batchcount = 6; + /* Fudge the size so it takes up the whole screen */ + bp->size = batchcount * bp->width * bp->height / 1024; + + if (!pointBuffer || pointBufferSize < (bp->size * sizeof(XPoint))) { + if (pointBuffer != NULL) + free(pointBuffer); + pointBuffer = (XPoint *) malloc(bp->size * sizeof(XPoint)); + pointBufferSize = bp->size * sizeof(XPoint); + } + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, bp->width, bp->height); + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + bp->startTime = seconds(); +} + +void +drawblot(win) + Window win; +{ + int x, y; + int k; + XPoint *xp = pointBuffer; + blotstruct *bp = &blots[screen]; + + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[bp->pix]); + if (++bp->pix >= Scr[screen].npixels) + bp->pix = 0; + } + + x = bp->xmid; + y = bp->ymid; + k = bp->size; + while (k >= 4) { + x += ((RAND() % (1 + (bp->offset << 1))) - bp->offset); + y += ((RAND() % (1 + (bp->offset << 1))) - bp->offset); + k--; + xp->x = x; + xp->y = y; + xp++; + if (bp->xsym) + { + k--; + xp->x = bp->width - x; + xp->y = y; + xp++; + } + if (bp->ysym) + { + k--; + xp->x = x; + xp->y = bp->height - y; + xp++; + } + if (bp->xsym && bp->ysym) + { + k--; + xp->x = bp->width - x; + xp->y = bp->height - y; + xp++; + } + } + XDrawPoints (dsp, win, Scr[screen].gc, + pointBuffer, bp->size - k, CoordModeOrigin); + if (seconds() - bp->startTime > TIMEOUT) + initblot(win); +} diff --git a/bomb.c b/bomb.c new file mode 100644 index 00000000..9422f3ea --- /dev/null +++ b/bomb.c @@ -0,0 +1,322 @@ +#ifndef lint +static char sccsid[] = "@(#)bomb.c 2.7 95/02/21 xlockmore"; +#endif +/* + * bomb.c - temporary screen lock for public labs + * + * See xlock.c for copying information. + * + * Revision History: + * 09-Jan-95: Assorted defines to control various aspects of bomb mode. + * Uncomment, or otherwise define the appropriate line + * to obtain the relevant behaviour, thanks to Dave Shield + * . + * 20-Dec-94: Time patch for multiprocessor machines (ie. Sun10) thanks to + * Nicolas Pioch . + * 1994: Written. Copyright (c) 1994 Dave Shield + * Liverpool Computer Science + */ + +#include "xlock.h" + +#include +#ifdef SYSLOG +#include +#endif +#include + +/* #define SIMPLE_COUNTDOWN *//* Display a simple integer countdown, */ + /* rather than a "MIN:SEC" format. */ +#define COLOUR_CHANGE /* Display cycles through the colour wheel */ + /* rather than staying red throughout. */ + +#define FULL_COUNT_FONT "-*-*-*-*-*-*-34-*-*-*-*-*-*-*" +#define ICON_COUNT_FONT "-*-*-*-*-*-*-8-*-*-*-*-*-*-*" +#define COUNTDOWN 600 /* No. seconds to lock for */ +#define NDIGITS 4 /* Number of digits in count */ + +#define MAX_DELAY 1000000 /* Max delay between updates */ +#define DELTA 10 /* Border around the digits */ +#define RIVET_RADIUS 6 /* Size of detonator 'rivets' */ + +void rivet(); +void explode(); +extern long allocpixel(); + +typedef struct { + int width, height; + int x, y; + int delta; + int countdown; + int text_width; + int text_ascent; + int text_descent; +} bombstruct; + +static bombstruct bombs[MAXSCREENS]; + +void +initbomb(win) + Window win; +{ + XWindowAttributes xgwa; + bombstruct *bp = &bombs[screen]; + XFontStruct *c_font; + char number[NDIGITS+2]; + + int b_width, b_height; + int b_x, b_y; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + bp->width = xgwa.width; + bp->height = xgwa.height; + bp->x=(bp->width/2); + bp->y=(bp->height*3/5); /* Central-ish on the screen */ + if ( xgwa.depth == 1 ) + mono = 1; + + /* Set up text font */ + + if (bp->width > 100) { /* Full screen */ + c_font = XLoadQueryFont(dsp, FULL_COUNT_FONT); + bp->delta = DELTA; + } + else { /* icon window */ + c_font = XLoadQueryFont(dsp, ICON_COUNT_FONT); + bp->delta = 2; + } + XSetFont(dsp, Scr[screen].gc, c_font->fid); + +#ifdef SIMPLE_COUNTDOWN + (void) sprintf(number, "%0*d", NDIGITS, 0); +#else + (void) sprintf(number, "%.*s:**", NDIGITS-2, "*******"); +#endif + bp->text_width = XTextWidth(c_font, number, NDIGITS + 1); + bp->x -= (bp->text_width/2); + bp->text_ascent = c_font->max_bounds.ascent; + bp->text_descent = c_font->max_bounds.descent; + + if (delay > MAX_DELAY) + delay = MAX_DELAY; /* Time cannot move slowly */ + if ( bp->countdown == 0) /* <--Stricter if uncommented */ + bp->countdown = (time(NULL) + COUNTDOWN); /* Prime the detonator */ + + + /* + * Draw the graphics + * Very simple - detonator box with countdown + * + * ToDo: Improve the graphics + * (e.g. stick of dynamite, with burning fuse?) + */ + b_width = bp->width/2; + b_height = bp->height/3; + b_x = bp->width/4; + b_y = bp->height*2/5; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, bp->width, bp->height); + + XSetForeground(dsp, Scr[screen].gc, + allocpixel(XDefaultColormap(dsp, screen), "grey", "white")); + XFillRectangle(dsp, win, Scr[screen].gc, + b_x, b_y, b_width, b_height); + + /* + * If a full size screen (and colour), + * 'rivet' the box to it + */ + if (bp->width > 100 && !mono) { + rivet(win, b_x + RIVET_RADIUS, b_y + RIVET_RADIUS); + rivet(win, b_x + RIVET_RADIUS, b_y + b_height - 3*RIVET_RADIUS); + rivet(win, b_x + b_width - 3*RIVET_RADIUS, b_y + RIVET_RADIUS); + rivet(win, b_x + b_width - 3*RIVET_RADIUS, + b_y + b_height - 3*RIVET_RADIUS); + } +} + + + + +void +rivet( win, x, y ) + Window win; + int x, y; +{ + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XDrawArc(dsp, win, Scr[screen].gc, x, y, 2*RIVET_RADIUS, 2*RIVET_RADIUS, + 70*64, 130*64); + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + XDrawArc(dsp, win, Scr[screen].gc, x, y, 2*RIVET_RADIUS, 2*RIVET_RADIUS, + 270*64, 90*64); +} + + + + +void drawbomb(win) + Window win; +{ + bombstruct *bp = &bombs[screen]; + char number[NDIGITS+2]; + long crayon; + time_t countleft; + + countleft = (bp->countdown - time(NULL)); + if (countleft <= 0) + explode(win); /* Bye, bye.... */ + +#ifdef SIMPLE_COUNTDOWN + (void) sprintf(number, "%0*d", NDIGITS, (int) countleft); +#else + (void) sprintf(number, "%0*d:%02d", NDIGITS-2, + (int) countleft / 60, (int) countleft % 60); +#endif + + /* Blank out the previous number .... */ + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, + bp->x - bp->delta, + (bp->y - bp->text_ascent) - bp->delta, + bp->text_width + (2*bp->delta), + (bp->text_ascent + bp->text_descent) + (2*bp->delta)); + + /* ... and count down */ + if ( mono ) + crayon = WhitePixel(dsp, screen); + else +#ifdef COLOUR_CHANGE + crayon = Scr[screen].pixels[countleft*Scr[screen].npixels/COUNTDOWN]; +#else + crayon = Scr[screen].pixels[1]); +#endif + XSetForeground( dsp, Scr[screen].gc, crayon); + XDrawString(dsp, win, Scr[screen].gc, bp->x, bp->y, + number, strlen(number)); +} + + /* + * Game Over - player 1 + * + * This user has hogged the terminal for long enough + * Log them out, and let someone else use it. + */ +void +explode(win) + Window win; +{ + bombstruct *bp = &bombs[screen]; + char buff[NDIGITS+2]; + + /* + * ToDo: + * Improve the graphics - some sort of explosion? + * (Will need to involve the main X event loop) + */ +#ifdef SIMPLE_COUNTDOWN + (void) sprintf(buff, "%.*s", NDIGITS, "*********"); +#else + (void) sprintf(buff, "%.*s:**", NDIGITS-2, "*******"); +#endif + XSetForeground( dsp, Scr[screen].gc, Scr[screen].pixels[1]); + XDrawString(dsp, win, Scr[screen].gc, bp->x, bp->y, buff, NDIGITS); + +#ifndef DEBUG + if (!inwindow && !inroot && !nolock) { + logoutUser(); + exit(-1); + } + else +#endif + { + /* + * If debugging, not locked, or in a subwindow + * probably inappropriate to actually log out. + */ + (void) fprintf(stderr, "BOOM!!!!\n"); + (void) kill(getpid(), SIGTERM); + } +} + +/* this is now in logout.c */ +#if 0 + /* + * Determine whether to "fully" lock the terminal, or + * whether the time-limited version should be imposed. + * + * Policy: + * Members of staff can fully lock + * (hard-wired user/group names + file read at run time) + * Students (i.e. everyone else) + * are forced to use the time-limit version. + * + * An alternative policy could be based on display location + */ +#define FULL_LOCK 1 +#define TEMP_LOCK 0 + +#ifndef STAFF_FILE +#define STAFF_FILE "/usr/remote/etc/xlock.staff" +#endif + +char *staff_users[] = { /* List of users allowed to lock */ +"root", +0 +}; + +char *staff_groups[] = { /* List of groups allowed to lock */ +0 +}; + +#undef passwd +#undef pw_name +#undef getpwnam +#include +#include + +int full_lock() +{ + uid_t uid; + gid_t gid; + + struct passwd *pwp; + struct group *gp; + FILE *fp; + + char **cpp; + char buf[BUFSIZ]; + + if ((uid = getuid()) == 0) + return(FULL_LOCK); /* root */ + pwp=getpwuid(uid); + + gid=getgid(); + gp=getgrgid( gid ); + + if (inwindow || inroot || nolock) + return(FULL_LOCK); /* (mostly) harmless user */ + + for ( cpp = staff_users ; *cpp != NULL ; cpp++ ) + if (!strcmp(*cpp, pwp->pw_name)) + return(FULL_LOCK); /* Staff user */ + + for ( cpp = staff_groups ; *cpp != NULL ; cpp++ ) + if (!strcmp(*cpp, gp->gr_name)) + return(FULL_LOCK); /* Staff group */ + + if ((fp=fopen( STAFF_FILE, "r")) == NULL ) + return(TEMP_LOCK); + + while ((fgets( buf, BUFSIZ, fp )) != NULL ) { + char *cp; + + if ((cp = (char *) strchr(buf, '\n')) != NULL ) + *cp = '\0'; + if (!strcmp(buf, pwp->pw_name) || !strcmp(buf, gp->gr_name)) + return(FULL_LOCK); /* Staff user or group */ + } + + return(TEMP_LOCK); +} +#endif diff --git a/bounce.c b/bounce.c new file mode 100644 index 00000000..b560fea7 --- /dev/null +++ b/bounce.c @@ -0,0 +1,387 @@ +#ifndef lint +static char sccsid[] = "@(#)bounce.c 2.7 95/02/21 xlockmore"; +#endif + +/*- + * bounce.c - A bouncing ball for xlock, the X Window System lockscreen. + * + * Copyright (c) 1988 by Sun Microsystems + * + * See xlock.c for copying information. + * + * Revision History: + * 15-Jul-94: cleaned up in time for the final match. + * 4-Apr-94: spinning multiple ball version + * (I got a lot of help from with the physics of ball to ball + * collision looking at the source of xpool from Ismail ARIT + * iarit@tara.mines.colorado.edu). + * 22-Mar-94: got rid of flashing problem by only erasing parts of the image + * that will not be in the next image. + * 2-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 1986: Sun Microsystems + */ + +/* original copyright + ****************************************************************************** + Copyright 1988 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the names of Sun or MIT not be + used in advertising or publicity pertaining to distribution of the + software without specific prior written permission. Sun and M.I.T. + make no representations about the suitability of this software for + any purpose. It is provided "as is" without any express or implied warranty. + + SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT + OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE + OR PERFORMANCE OF THIS SOFTWARE. + *****************************************************************************/ + +/* + Open for improvement: + o include different balls (size and mass) (... how about be real crazy + and put in an American/Australian football?). + o mask out the corners of ball. + o should only have 1 bitmap for ball, the others should be generated + as 90 degree rotations. + o there should be a shearing spin created with ball to ball collisions +*/ + +#include "xlock.h" +#include +#include "bitmaps/bounce-0.xbm" +#include "bitmaps/bounce-1.xbm" +#include "bitmaps/bounce-2.xbm" +#include "bitmaps/bounce-3.xbm" + +#define MAX_STRENGTH 24 +#define FRICTION 24 +#define PENETRATION 0.3 +#define SLIPAGE 4 +#define TIME 32 + +#define ORIENTS 4 +#define ORIENTCYCLE 16 +#define CCW 1 +#define CW (ORIENTS-1) +#define DIR(x) (((x)>=0)?CCW:CW) +#define SIGN(x) (((x)>=0)?1:-1) +#define ABS(x) (((x)>=0)?x:-(x)) +#define TRUE 1 +#define FALSE 0 + +static XImage logo[ORIENTS] = { + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, 0, LSBFirst, 8, LSBFirst, 8, 1} +}; + +typedef struct { + int x, y, xlast, ylast; + int spincount, spindelay, spindir, orient; + int vx, vy, vang; + int mass, size; + unsigned long color; +} ballstruct; + +typedef struct { + int width, height; + int nballs; + ballstruct *balls; + GC draw_GC, erase_GC; +} bouncestruct; + +static bouncestruct bounces[MAXSCREENS]; + +static void checkCollision(); +static void drawball(); +static void moveball(); +static void spinball(); +static int collide(); +static void XEraseImage(); + +void +initbounce(win) + Window win; +{ + XWindowAttributes xgwa; + XGCValues gcv; + Screen *scr; + bouncestruct *bp = &bounces[screen]; + int i; + + logo[0].data = (char *) bounce0_bits; + logo[0].width = bounce0_width; + logo[0].height = bounce0_height; + logo[0].bytes_per_line = (bounce0_width + 7) / 8; + logo[1].data = (char *) bounce1_bits; + logo[1].width = bounce1_width; + logo[1].height = bounce1_height; + logo[1].bytes_per_line = (bounce1_width + 7) / 8; + logo[2].data = (char *) bounce2_bits; + logo[2].width = bounce2_width; + logo[2].height = bounce2_height; + logo[2].bytes_per_line = (bounce2_width + 7) / 8; + logo[3].data = (char *) bounce3_bits; + logo[3].width = bounce3_width; + logo[3].height = bounce3_height; + logo[3].bytes_per_line = (bounce3_width + 7) / 8; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + scr = ScreenOfDisplay(dsp, screen); + bp->width = xgwa.width; + bp->height = xgwa.height; + + gcv.background = BlackPixelOfScreen(scr); + bp->draw_GC = XCreateGC(dsp, win, GCForeground|GCBackground, &gcv); + bp->erase_GC = XCreateGC(dsp, win, GCForeground|GCBackground, &gcv); + if (batchcount < 1) + batchcount = 1; + bp->nballs = batchcount; + if (!bp->balls) + bp->balls = (ballstruct *) malloc(batchcount * sizeof(ballstruct)); + i = 0; + while (i < bp->nballs) { + if (logo[0].width > bp->width / 2 || logo[0].height > bp->height / 2) + bp->balls[i].size = 5; + else + bp->balls[i].size = (logo[0].width + logo[0].height) / 2; + bp->balls[i].vx = ((RAND() % 2) ? -1 : 1) * + (RAND() % MAX_STRENGTH + 1); + bp->balls[i].x = (bp->balls[i].vx >= 0) ? + 0 : bp->width - bp->balls[i].size; + bp->balls[i].y = RAND() % (bp->height / 2); + if (i == collide(i)) { + if (!mono && Scr[screen].npixels > 2) + bp->balls[i].color = + Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + bp->balls[i].color = WhitePixel(dsp, screen); + bp->balls[i].xlast = -1; + bp->balls[i].ylast = 0; + bp->balls[i].spincount = 1; + bp->balls[i].spindelay = 1; + bp->balls[i].vy = ((RAND() % 2) ? -1 : 1) * (RAND() % MAX_STRENGTH); + bp->balls[i].spindir = 0; + bp->balls[i].vang = 0; + bp->balls[i].orient = RAND() % ORIENTS; + i++; + } else + bp->nballs--; + } + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, bp->width, bp->height); + XSetForeground(dsp, bp->erase_GC, BlackPixel(dsp, screen)); +} + +static void checkCollision(aball) + int aball; +{ + bouncestruct *bp = &bounces[screen]; + int i, amount, spin, d, size; + double x, y; + + for (i = 0; i < bp->nballs; i++) { + if (i != aball) { + x = (double) (bp->balls[i].x - bp->balls[aball].x); + y = (double) (bp->balls[i].y - bp->balls[aball].y); + d = (int) sqrt(x * x + y * y); + size = (bp->balls[i].size + bp->balls[aball].size) / 2; + if (d > 0 && d < size) { + amount = size - d; + if (amount > PENETRATION * size) + amount = PENETRATION * size; + bp->balls[i].vx += amount * x / d; + bp->balls[i].vy += amount * y / d; + bp->balls[i].vx -= bp->balls[i].vx / FRICTION; + bp->balls[i].vy -= bp->balls[i].vy / FRICTION; + bp->balls[aball].vx -= amount * x / d; + bp->balls[aball].vy -= amount * y / d; + bp->balls[aball].vx -= bp->balls[aball].vx / FRICTION; + bp->balls[aball].vy -= bp->balls[aball].vy / FRICTION; + spin = (bp->balls[i].vang - bp->balls[aball].vang) / + (2 * size * SLIPAGE); + bp->balls[i].vang -= spin; + bp->balls[aball].vang += spin; + bp->balls[i].spindir = DIR(bp->balls[i].vang); + bp->balls[aball].spindir = DIR(bp->balls[aball].vang); + if (!bp->balls[i].vang) { + bp->balls[i].spindelay = 1; + bp->balls[i].spindir = 0; + } else + bp->balls[i].spindelay = M_PI * bp->balls[i].size / + (ABS(bp->balls[i].vang)) + 1; + if (!bp->balls[aball].vang) { + bp->balls[aball].spindelay = 1; + bp->balls[aball].spindir = 0; + } else + bp->balls[aball].spindelay = M_PI * bp->balls[aball].size / + (ABS(bp->balls[aball].vang)) + 1; + return; + } + } + } +} + +void +drawbounce(win) + Window win; +{ + bouncestruct *bp = &bounces[screen]; + int i; + static restartnum = TIME; + + for (i = 0; i < bp->nballs; i++) { + drawball(win, &bp->balls[i]); + moveball(&bp->balls[i]); + } + for (i = 0; i < bp->nballs; i++) + checkCollision(i); + if (!(RAND() % TIME)) /* Put some randomness into the time */ + restartnum--; + if (!restartnum) { + initbounce(win); + restartnum = TIME; + } + +} + +static void +drawball(win, ball) + Window win; + ballstruct *ball; +{ + bouncestruct *bp = &bounces[screen]; + + XSetForeground(dsp, bp->draw_GC, ball->color); + if (ball->size <= 5) { + if (ball->xlast != -1) + XFillRectangle(dsp, win, bp->erase_GC, + ball->xlast, ball->ylast, ball->size, ball->size); + XFillRectangle(dsp, win, bp->draw_GC, + ball->x, ball->y, ball->size, ball->size); + } else { + XPutImage(dsp, win, bp->draw_GC, &logo[ball->orient], + 0, 0, ball->x, ball->y, ball->size, ball->size); + if (ball->xlast != -1) + XEraseImage(dsp, win, bp->erase_GC, + ball->x, ball->y, + ball->xlast, ball->ylast, ball->size, ball->size); + } +} + +static void +moveball(ball) + ballstruct *ball; +{ + bouncestruct *bp = &bounces[screen]; + + ball->xlast = ball->x; + ball->ylast = ball->y; + ball->x += ball->vx; + if (ball->x > (bp->width - ball->size)) { + /* Bounce off the right edge */ + ball->x = 2 * (bp->width - ball->size) - ball->x; + ball->vx = -ball->vx + ball->vx / FRICTION; + spinball(ball, 1, &ball->vy); + } else if (ball->x < 0) { + /* Bounce off the left edge */ + ball->x = -ball->x; + ball->vx = -ball->vx + ball->vx / FRICTION; + spinball(ball, -1, &ball->vy); + } + ball->vy++; + ball->y += ball->vy; + if (ball->y >= (bp->height - ball->size)) { + /* Bounce off the bottom edge */ + ball->y = (bp->height - ball->size); + ball->vy = -ball->vy + ball->vy / FRICTION; + spinball(ball, -1, &ball->vx); + } else if (ball->y < 0) { + /* Bounce off the top edge */ + ball->y = -ball->y; + ball->vy = -ball->vy + ball->vy / FRICTION; + spinball(ball, 1, &ball->vx); + } + if (ball->spindir) { + ball->spincount--; + if (!ball->spincount) { + ball->orient = (ball->spindir + ball->orient) % ORIENTS; + ball->spincount = ball->spindelay; + } + } +} + +static void +spinball(ball, dir, vel) + ballstruct *ball; + int dir; + int *vel; +{ + *vel -= (*vel + SIGN(*vel * dir) * ball->spindelay * ORIENTCYCLE / + (M_PI * ball->size)) / SLIPAGE; + if (*vel) { + ball->spindir = DIR(*vel * dir); + ball->vang = *vel * ORIENTCYCLE; + ball->spindelay = M_PI * ball->size / (ABS(ball->vang)) + 1; + } else + ball->spindir = 0; +} + +static int collide(aball) + int aball; +{ + bouncestruct *bp = &bounces[screen]; + int i, d, x, y; + + for (i = 0; i < aball; i++) { + x = (bp->balls[i].x - bp->balls[aball].x); + y = (bp->balls[i].y - bp->balls[aball].y); + d = (int) sqrt((double) (x * x + y * y)); + if (d < (bp->balls[i].size + bp->balls[aball].size) / 2) + return i; + } + return i; +} + +/* This stops some flashing, could be more efficient */ +static void +XEraseImage(display, win, gc, x, y, xlast, ylast, xsize, ysize) +Display *display; +Window win; +GC gc; +int x, y, xlast, ylast, xsize, ysize; +{ + if (ylast < y) { + if (y < ylast + ysize) + XFillRectangle(display, win, gc, xlast, ylast, xsize, y - ylast); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } else if (ylast > y) { + if (y > ylast - ysize) + XFillRectangle(display, win, gc, xlast, y + ysize, xsize, ylast - y); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } + if (xlast < x) { + if (x < xlast + xsize) + XFillRectangle(display, win, gc, xlast, ylast, x - xlast, ysize); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } else if (xlast > x) { + if (x > xlast - xsize) + XFillRectangle(display, win, gc, x + xsize, ylast, xlast - x, ysize); + else + XFillRectangle(display, win, gc, xlast, ylast, xsize, ysize); + } +} diff --git a/flame.c b/flame.c new file mode 100644 index 00000000..2f2bd858 --- /dev/null +++ b/flame.c @@ -0,0 +1,432 @@ +#ifndef lint +static char sccsid[] = "@(#)flame.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * flame.c - recursive fractal cosmic flames. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * 19-Jun-95: edited by David Bagley. + * 13-Jun-95: updated. (received from Scott Graves, spot@cs.cmu.edu). + * 27-Jun-91: vary number of functions used. + * 24-Jun-91: fixed portability problem with integer mod (%). + * 06-Jun-91: Written. (received from Scott Graves, spot@cs.cmu.edu). + */ + +#include "xlock.h" +#include +#include + +#define MAXBATCH1 200 /* mono */ +#define MAXBATCH2 20 /* color */ +#define FUSE 10 /* discard this many initial iterations */ +#define NMAJORVARS 7 + +typedef struct { + /* shape of current flame */ + int nxforms; + double f[2][3][10]; /* a bunch of non-homogeneous xforms */ + int variation[10]; /* for each xform */ + + /* high-level control */ + int mode; /* 0->slow/single 1->fast/many */ + int nfractals; /* draw this many fractals */ + int major_variation; + int fractal_len; /* pts/fractal */ + int color; + int rainbow; /* more than one color per fractal + 1-> computed by adding dimension to fractal */ + + int width, height; /* of window */ + int timer; + + /* draw info about current flame */ + int fuse; /* iterate this many before drawing */ + int total_points; /* draw this many pts before fractal ends */ + int npoints; /* how many we've computed but not drawn */ + XPoint pts[MAXBATCH1]; /* here they are */ + long pixcol; + /* when drawing in color, we have a buffer per color */ + int ncpoints[NUMCOLORS]; + XPoint cpts[NUMCOLORS][MAXBATCH2]; + + double x, y, c; +} flamestruct; +static flamestruct flames[MAXSCREENS]; + + + +static short +halfrandom(mv) + int mv; +{ + static short lasthalf = 0; + unsigned long r; + + if (lasthalf) { + r = lasthalf; + lasthalf = 0; + } else { + r = RAND(); + lasthalf = r >> 16; + } + r = r % mv; + return r; +} + +static int +frandom(n) + int n; +{ + static long saved_random_bits = 0; + static int nbits = 0; + int result; + if (3 > nbits) { + saved_random_bits = RAND(); + nbits = 31; + } + switch(n) { + case 2: result = saved_random_bits&1; + saved_random_bits >>= 1; + nbits -= 1; + return result; + + case 3: result = saved_random_bits&3; + saved_random_bits >>= 2; + nbits -= 2; + if (3 == result) + return frandom(3); + return result; + + case 4: result = saved_random_bits&3; + saved_random_bits >>= 2; + nbits -= 2; + return result; + + case 5: result = saved_random_bits&7; + saved_random_bits >>= 3; + nbits -= 3; + if (4 < result) + return frandom(5); + return result; + default: + (void) fprintf(stderr, "bad arg to frandom\n"); + exit(1); + } + return 0; +} + +#define DISTRIB_A (halfrandom(7000) + 9000) +#define DISTRIB_B ((frandom(3) + 1) * (frandom(3) + 1) * 120000) +#define LEN(x) (sizeof(x)/sizeof((x)[0])) + +static void +initmode(win, mode) + Window win; + int mode; +{ + flamestruct *fs = &flames[screen]; + static variation_distrib[] = { + 0, 0, 1, 1, 2, 2, 3, + 4, 4, 5, 5, 6, 6, 6}; + + fs->mode = mode; + + fs->major_variation = + variation_distrib[halfrandom(LEN(variation_distrib))]; + + fs->rainbow = 0; + if (mode) { + if (!fs->color || halfrandom(8)) { + fs->nfractals = halfrandom(30) + 5; + fs->fractal_len = DISTRIB_A; + } else { + fs->nfractals = halfrandom(5) + 5; + fs->fractal_len = DISTRIB_B; + } + } else { + fs->rainbow = fs->color; + fs->nfractals = 1; + fs->fractal_len = DISTRIB_B; + } + + fs->fractal_len = (fs->fractal_len * batchcount) / 20; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, fs->width, fs->height); +} + +static void +initfractal() +{ + static int xform_distrib[] = {2, 2, 2, 3, 3, 3, 4, 4, 5}; + flamestruct *fs = &flames[screen]; + int i, j, k; + + fs->fuse = FUSE; + fs->total_points = 0; + if (fs->rainbow) + for (i = 0; i < Scr[screen].npixels; i++) + fs->ncpoints[i] = 0; + else + fs->npoints = 0; + fs->nxforms = xform_distrib[halfrandom(LEN(xform_distrib))]; + fs->c = fs->x = fs->y = 0.0; + for (i = 0; i < fs->nxforms; i++) { + if (NMAJORVARS == fs->major_variation) + fs->variation[i] = halfrandom(NMAJORVARS); + else + fs->variation[i] = fs->major_variation; + for (j = 0; j < 2; j++) + for (k = 0; k < 3; k++) { + fs->f[j][k][i] = ((double) halfrandom(1000) / 500.0 - 1.0); + } + } + if (fs->color) + fs->pixcol = Scr[screen].pixels[halfrandom(Scr[screen].npixels)]; + else + fs->pixcol = WhitePixel(dsp, screen); + +} + + +void +initflame(win) + Window win; +{ + static int first_time = 1; + flamestruct *fs = &flames[screen]; + XWindowAttributes xwa; + + (void) XGetWindowAttributes(dsp, win, &xwa); + fs->width = xwa.width; + fs->height = xwa.height; + fs->color = Scr[screen].npixels > 2; + + if (first_time) + initmode(win, 1); + else + initmode(win, frandom(2)); + initfractal(); + + first_time = 0; +} + +static void +iter(fs) + flamestruct *fs; +{ + int i = frandom(fs->nxforms); + double nx, ny, nc; + + if (i) + nc = (fs->c + 1.0) / 2.0; + else + nc = fs->c / 2.0; + + nx = fs->f[0][0][i] * fs->x + fs->f[0][1][i] * fs->y + fs->f[0][2][i]; + ny = fs->f[1][0][i] * fs->x + fs->f[1][1][i] * fs->y + fs->f[1][2][i]; + + + switch (fs->variation[i]) { + case 1: + /* sinusoidal */ + nx = sin(nx); + ny = sin(ny); + break; + case 2: { + /* complex */ + double r2 = nx * nx + ny * ny + 1e-6; + nx = nx / r2; + ny = ny / r2; + break; + } + case 3: + /* bent */ + if (nx < 0.0) nx = nx * 2.0; + if (ny < 0.0) ny = ny / 2.0; + break; + case 4: { + /* swirl */ + double r = (nx * nx + ny * ny); /* times k here is fun */ + double c1 = sin(r); + double c2 = cos(r); + double t = nx; + + nx = c1 * nx - c2 * ny; + ny = c2 * t + c1 * ny; + break; + } + case 5: { + /* horseshoe */ + double r = atan2(nx, ny); /* times k here is fun */ + double c1 = sin(r); + double c2 = cos(r); + double t = nx; + + nx = c1 * nx - c2 * ny; + ny = c2 * t + c1 * ny; + break; + } + case 6: { + /* drape */ + double t; + t = atan2(nx, ny)/M_PI; + ny = sqrt(nx * nx + ny * ny) - 1.0; + nx = t; + break; + } + } + +#if 0 + /* here are some others */ +{ + /* broken */ + if (nx > 1.0) nx = nx - 1.0; + if (nx < -1.0) nx = nx + 1.0; + if (ny > 1.0) ny = ny - 1.0; + if (ny < -1.0) ny = ny + 1.0; + break; +} +{ + /* complex sine */ + double u = nx, v = ny; + double ev = exp(v); + double emv = exp(-v); + + nx = (ev + emv) * sin(u) / 2.0; + ny = (ev - emv) * cos(u) / 2.0; +} +{ + + /* polynomial */ + if (nx < 0) nx = -nx * nx; + else nx = nx * nx; + + if (ny < 0) ny = -ny * ny; + else ny = ny * ny; +} +{ + /* spherical */ + double r = 0.5 + sqrt(nx * nx + ny * ny + 1e-6); + nx = nx / r; + ny = ny / r; +} +{ + nx = atan(nx)/M_PI_2 + ny = atan(ny)/M_PI_2 +} +#endif + + if (nx > 1e10 || nx < -1e10 || ny > 1e10 || ny < -1e10) { + nx = halfrandom(1000) / 500.0 - 1.0; + ny = halfrandom(1000) / 500.0 - 1.0; + fs->fuse = FUSE; + } + + fs->x = nx; + fs->y = ny; + fs->c = nc; + +} + +static void draw(fs, d) + flamestruct *fs; + Drawable d; + +{ + double x = fs->x; + double y = fs->y; + int fixed_x, fixed_y, npix, c, n; + + if (fs->fuse) { + fs->fuse--; + return; + } + + if (!(x > -1.0 && x < 1.0 && y > -1.0 && y < 1.0)) + return; + + fixed_x = (int) ((fs->width / 2) * (x + 1.0)); + fixed_y = (int) ((fs->height / 2) * (y + 1.0)); + + if (!fs->rainbow) { + + fs->pts[fs->npoints].x = fixed_x; + fs->pts[fs->npoints].y = fixed_y; + fs->npoints++; + if (fs->npoints == MAXBATCH1) { + XSetForeground(dsp, Scr[screen].gc, fs->pixcol); + XDrawPoints(dsp, d, Scr[screen].gc, fs->pts, + fs->npoints, CoordModeOrigin); + fs->npoints = 0; + } + } else { + + npix = Scr[screen].npixels; + c = fs->c * npix; + + if (c < 0) c = 0; + if (c >= npix) c = npix-1; + n = fs->ncpoints[c]; + fs->cpts[c][n].x = fixed_x; + fs->cpts[c][n].y = fixed_y; + if (++fs->ncpoints[c] == MAXBATCH2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[c]); + XDrawPoints(dsp, d, Scr[screen].gc, fs->cpts[c], + fs->ncpoints[c], CoordModeOrigin); + fs->ncpoints[c] = 0; + } + } +} + +static void draw_flush(fs, d) + flamestruct *fs; + Drawable d; + +{ + if (fs->rainbow) { + int npix = Scr[screen].npixels; + int i; + for (i = 0; i < npix; i++) { + if (fs->ncpoints[i]) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[i]); + XDrawPoints(dsp, d, Scr[screen].gc, fs->cpts[i], + fs->ncpoints[i], CoordModeOrigin); + fs->ncpoints[i] = 0; + } + } + } else { + if (fs->npoints) + XSetForeground(dsp, Scr[screen].gc, fs->pixcol); + XDrawPoints(dsp, d, Scr[screen].gc, fs->pts, + fs->npoints, CoordModeOrigin); + fs->npoints = 0; + } +} + + +void +drawflame(win) + Window win; +{ + flamestruct *fs = &flames[screen]; + + fs->timer = batchcount * 1000; + + while (fs->timer) { + iter(fs); + draw(fs, win); + if (fs->total_points++ > fs->fractal_len) { + draw_flush(fs, win); + if (0 == --fs->nfractals) + initmode(win, frandom(2)); + initfractal(); + } + + fs->timer--; + } +} diff --git a/galaxy.c b/galaxy.c new file mode 100644 index 00000000..2b6554b2 --- /dev/null +++ b/galaxy.c @@ -0,0 +1,339 @@ +#ifndef lint +static char sccsid[] = "@(#)galaxy.c 2.7 95/02/21 xlockmore"; +#endif +/* + * galaxy.c - Spinning galaxies for xlockmore + * + * Originally done by Uli Siegmund (uli@wombat.okapi.sub.org) on Amiga + * for EGS in Cluster + * Port from Cluster/EGS to C/Intuition by Harald Backert + * Port to X11 and incorporation into xlockmore by Hubert Feyrer + * (hubert.feyrer@rz.uni-regensburg.de) + * + * Revision History: + * 30-Sep-94: Initial port by Hubert Feyer + * 10-Oct-94: Add colors by Hubert Feyer + * 23-Oct-94: Modified by David Bagley + */ + +#include +#include "xlock.h" + +#define FLOATRAND ((double) RAND() / ((double) MAXRAND)) + +#ifndef STARSIZE +#define STARSIZE 1 /* Size of STARS */ +#endif +/*#define WRAP 1 *//* Warp around edges */ +/*#define BOUNCE 1 *//* Bounce from borders */ + +#define MAX_GALAXIES 5 +#define MAX_STARS 300 +#define MAX_HITITERATIONS 200 +#define MAX_IDELTAT 50 +/* These come originally from the Cluster-version */ +#define DEFAULT_GALAXIES 2 +#define DEFAULT_STARS 1000 +#define DEFAULT_HITITERATIONS 7500 +#define DEFAULT_IDELTAT 200 /* 0.02 */ + +#define GALAKSIZE 3.0 +#define QCONS 0.001 + +#define COLOROFFSET 0 /* I hate green galaxies */ +#define MAXCOLORS 64 +#define COLORBASE 8 + /* Colors for stars start here */ +#define COLORSTEP (MAXCOLORS/COLORBASE) /* 8 colors per galaxy */ + +#ifndef PI +# define PI M_PI +#endif /*PI*/ + +#if (STARSIZE > 1) +# define MyXDrawPoint(x,y) \ + XFillArc(dsp,win,Scr[screen].gc,x,y,gp->starsize,gp->starsize,0*64,360*64) +#else +# define MyXDrawPoint(x,y) \ + XDrawPoint(dsp,win,Scr[screen].gc,x,y) +#endif /*STARSIZE*/ + + +typedef double Vector[3]; +typedef double Matrix[3][3]; + +typedef struct { + Vector pos, vel; + int px, py; + int color; + } Star; +typedef struct { + int mass; + int starscnt; + Star *stars; + int basecolor; + Vector pos, vel; + } Galaxy; + +typedef struct { + struct { + int left; /* x minimum */ + int right; /* x maximum */ + int top; /* y minimum */ + int bottom; /* y maximum */ + } clip; + int galcol[MAX_GALAXIES]; /* colors */ + Matrix mat; /* Movement of stars(?) */ + double scale; /* Scale */ + int midx; /* Middle of screen, x */ + int midy; /* Middle of screen, y */ + double size; /* */ + Vector diff; /* */ + Galaxy galaxies[MAX_GALAXIES]; /* the Whole Universe */ + double f_deltat; /* quality of calculation, calc'd by d_ideltat */ + int f_galaxies; /* # galaxies */ + int f_stars; /* # stars per galaxy */ + int f_hititerations; /* # iterations before restart */ + int step; /* */ + int init; /* 1 -> re-initialize */ +#if (STARSIZE > 1) + int starsize; +#endif +} unistruct; + +static unistruct universes[MAXSCREENS]; + +void +initgalaxy(win) + Window win; +{ + XWindowAttributes xwa; /* attributes of display */ + unistruct *gp = &universes[screen]; + int i; + + if (batchcount < 1) + batchcount = 1; + else if (batchcount > MAX_GALAXIES) + batchcount = MAX_GALAXIES; + gp->f_galaxies = batchcount; + gp->f_stars = MAX_STARS; + gp->f_hititerations = MAX_HITITERATIONS; + gp->f_deltat = ((double) MAX_IDELTAT)/10000.0; + + (void) XGetWindowAttributes(dsp, win, &xwa); +#ifdef BORDER + gp->clip.left = xwa.border_width; + gp->clip.top = xwa.border_width; + gp->clip.right = xwa.width-2*xwa.border_width; + gp->clip.bottom = xwa.height-2*xwa.border_width; +#else + gp->clip.left = 0; + gp->clip.top = 0; + gp->clip.right = xwa.width; + gp->clip.bottom = xwa.height; +#endif + gp->scale = (double)(gp->clip.right)/4.0; + gp->midx = gp->clip.right/2; + gp->midy = gp->clip.bottom/2; + gp->init = 1; +#if (STARSIZE > 1) + gp->starsize = STARSIZE; +#endif + + if(!gp->galaxies[0].stars){ + + for (i=0; igalaxies[i].starscnt=0; /* 0 valid entries */ + gp->galaxies[i].stars=(Star *)malloc(gp->f_stars*sizeof(Star)); + } + + } +} + + +void +drawgalaxy(win) + Window win; +{ + unistruct *gp = &universes[screen]; + double d; /* tmp */ + int i, j, k; /* more tmp */ + + if(gp->init){ + double w1, w2, w3; /* more tmp */ + double v,w, h; /* yet more tmp */ + + gp->init=0; + gp->step=0; + + for (i=0; igalcol[i]=RAND() % COLORBASE; + } + + for (i=0; if_galaxies; ++i) { + gp->galaxies[i].basecolor=gp->galcol[i]; + + gp->galaxies[i].starscnt=(RAND() % (gp->f_stars/2))+gp->f_stars/2; + + w1=2.0*PI*FLOATRAND; + w2=2.0*PI*FLOATRAND; + + gp->mat[0][0]= cos(w2); + gp->mat[0][1]=-sin(w1)*sin(w2); + gp->mat[0][2]= cos(w1)*sin(w2); + gp->mat[1][0]= 0.0; + gp->mat[1][1]= cos(w1); + gp->mat[1][2]= sin(w1); + gp->mat[2][0]=- sin(w2); + gp->mat[2][1]=-sin(w1)*cos(w2); + gp->mat[2][2]= cos(w1)*cos(w2); + + gp->galaxies[i].vel[0]=FLOATRAND*2.0-1.0; + gp->galaxies[i].vel[1]=FLOATRAND*2.0-1.0; + gp->galaxies[i].vel[2]=FLOATRAND*2.0-1.0; + gp->galaxies[i].pos[0]=-gp->galaxies[i].vel[0]*gp->f_deltat* + gp->f_hititerations+FLOATRAND-0.5; + gp->galaxies[i].pos[1]=-gp->galaxies[i].vel[1]*gp->f_deltat* + gp->f_hititerations+FLOATRAND-0.5; + gp->galaxies[i].pos[2]=-gp->galaxies[i].vel[2]*gp->f_deltat* + gp->f_hititerations+FLOATRAND-0.5; + + gp->galaxies[i].mass=FLOATRAND*1000.0; + + /*w3=FLOATRAND;*/ + w3 = 0.0; + gp->size=w3*w3*GALAKSIZE+0.1; + + for (j=0; jgalaxies[i].starscnt; ++j) { + w=2.0*PI*FLOATRAND; + d=FLOATRAND*gp->size; + h=FLOATRAND*exp(-2.0*(d/gp->size))/5.0*gp->size; + if (FLOATRAND<0.5) h=-h; + gp->galaxies[i].stars[j].pos[0]=gp->mat[0][0]*d*cos(w)+ + gp->mat[1][0]*d*sin(w)+gp->mat[2][0]*h+gp->galaxies[i].pos[0]; + gp->galaxies[i].stars[j].pos[1]=gp->mat[0][1]*d*cos(w)+gp->mat[1][1]*d*sin(w)+gp->mat[2][1]*h+gp->galaxies[i].pos[1]; + gp->galaxies[i].stars[j].pos[2]=gp->mat[0][2]*d*cos(w)+gp->mat[1][2]*d*sin(w)+gp->mat[2][2]*h+gp->galaxies[i].pos[2]; + + v=sqrt(gp->galaxies[i].mass*QCONS/sqrt(d*d+h*h)); + gp->galaxies[i].stars[j].vel[0]=-gp->mat[0][0]*v*sin(w)+gp->mat[1][0]*v*cos(w)+gp->galaxies[i].vel[0]; + gp->galaxies[i].stars[j].vel[1]=-gp->mat[0][1]*v*sin(w)+gp->mat[1][1]*v*cos(w)+gp->galaxies[i].vel[1]; + gp->galaxies[i].stars[j].vel[2]=-gp->mat[0][2]*v*sin(w)+gp->mat[1][2]*v*cos(w)+gp->galaxies[i].vel[2]; + + gp->galaxies[i].stars[j].color=COLORSTEP*gp->galaxies[i].basecolor+j%COLORSTEP; + + gp->galaxies[i].stars[j].px=0; + gp->galaxies[i].stars[j].py=0; + } + } + + XSetForeground(dsp,Scr[screen].gc,BlackPixel(dsp, screen)); + XFillRectangle(dsp,win,Scr[screen].gc,gp->clip.left,gp->clip.top,gp->clip.right,gp->clip.bottom); + +#if 0 + (void) printf("f_galaxies=%d, f_stars=%d, f_hititerations=%d\n", gp->f_galaxies, gp->f_stars, gp->f_hititerations); + (void) printf("f_deltat=%g\n", gp->f_deltat); + (void) printf("Screen: "); + (void) printf("%dx%d pixel (%d-%d, %d-%d)\n", + (gp->clip.right-gp->clip.left),(gp->clip.bottom-gp->clip.top), + gp->clip.left, + gp->clip.right, + gp->clip.top, + gp->clip.bottom); +#endif /*0*/ + } + + for (i=0; if_galaxies; ++i){ + for (j=0; jgalaxies[i].starscnt; ++j) { + for (k=0; kf_galaxies; ++k) { + gp->diff[0]=gp->galaxies[k].pos[0]-gp->galaxies[i].stars[j].pos[0]; + gp->diff[1]=gp->galaxies[k].pos[1]-gp->galaxies[i].stars[j].pos[1]; + gp->diff[2]=gp->galaxies[k].pos[2]-gp->galaxies[i].stars[j].pos[2]; + d=gp->diff[0]*gp->diff[0]+gp->diff[1]*gp->diff[1]+gp->diff[2]*gp->diff[2]; + d=gp->galaxies[k].mass/(d*sqrt(d))*gp->f_deltat*QCONS; + gp->diff[0]*=d; + gp->diff[1]*=d; + gp->diff[2]*=d; + gp->galaxies[i].stars[j].vel[0]+=gp->diff[0]; + gp->galaxies[i].stars[j].vel[1]+=gp->diff[1]; + gp->galaxies[i].stars[j].vel[2]+=gp->diff[2]; + } + gp->galaxies[i].stars[j].pos[0]+=gp->galaxies[i].stars[j].vel[0]* + gp->f_deltat; + gp->galaxies[i].stars[j].pos[1]+=gp->galaxies[i].stars[j].vel[1]* + gp->f_deltat; + gp->galaxies[i].stars[j].pos[2]+=gp->galaxies[i].stars[j].vel[2]* + gp->f_deltat; + + if (gp->galaxies[i].stars[j].px>=gp->clip.left + && gp->galaxies[i].stars[j].px<=gp->clip.right-STARSIZE + && gp->galaxies[i].stars[j].py>=gp->clip.top + && gp->galaxies[i].stars[j].py<=gp->clip.bottom-STARSIZE){ + XSetForeground(dsp,Scr[screen].gc,BlackPixel(dsp, screen)); + MyXDrawPoint(gp->galaxies[i].stars[j].px, gp->galaxies[i].stars[j].py); + } + + gp->galaxies[i].stars[j].px=(int)(gp->galaxies[i].stars[j].pos[0]* + gp->scale)+gp->midx; + gp->galaxies[i].stars[j].py=(int)(gp->galaxies[i].stars[j].pos[1]* + gp->scale)+gp->midy; + + +#ifdef WRAP + if(gp->galaxies[i].stars[j].px < gp->clip.left){ + (void) printf("wrap l -> r\n"); + gp->galaxies[i].stars[j].px = gp->clip.right; + } + if(gp->galaxies[i].stars[j].px > gp->clip.right){ + (void) printf("wrap r -> l\n"); + gp->galaxies[i].stars[j].px = gp->clip.left; + } + if(gp->galaxies[i].stars[j].py > gp->clip.bottom){ + (void) printf("wrap b -> t\n"); + gp->galaxies[i].stars[j].py = gp->clip.top; + } + if(gp->galaxies[i].stars[j].py < gp->clip.top){ + (void) printf("wrap t -> b\n"); + gp->galaxies[i].stars[j].py = gp->clip.bottom; + } +#endif /*WRAP*/ + + + if (gp->galaxies[i].stars[j].px>=gp->clip.left + && gp->galaxies[i].stars[j].px<=gp->clip.right-STARSIZE + && gp->galaxies[i].stars[j].py>=gp->clip.top + && gp->galaxies[i].stars[j].py<=gp->clip.bottom-STARSIZE){ + if (!mono && Scr[screen].npixels > 2){ + XSetForeground(dsp,Scr[screen].gc, + Scr[screen].pixels[gp->galaxies[i].stars[j].color]); + } else { + XSetForeground(dsp,Scr[screen].gc,WhitePixel(dsp, screen)); + } + MyXDrawPoint(gp->galaxies[i].stars[j].px, + gp->galaxies[i].stars[j].py); + } + } + + for (k=i+1; kf_galaxies; ++k) { + gp->diff[0]=gp->galaxies[k].pos[0]-gp->galaxies[i].pos[0]; + gp->diff[1]=gp->galaxies[k].pos[1]-gp->galaxies[i].pos[1]; + gp->diff[2]=gp->galaxies[k].pos[2]-gp->galaxies[i].pos[2]; + d=gp->diff[0]*gp->diff[0]+gp->diff[1]*gp->diff[1]+gp->diff[2]*gp->diff[2]; + d=gp->galaxies[i].mass*gp->galaxies[k].mass/(d*sqrt(d))*gp->f_deltat*QCONS; + gp->diff[0]*=d; + gp->diff[1]*=d; + gp->diff[2]*=d; + gp->galaxies[i].vel[0]+=gp->diff[0]/gp->galaxies[i].mass; + gp->galaxies[i].vel[1]+=gp->diff[1]/gp->galaxies[i].mass; + gp->galaxies[i].vel[2]+=gp->diff[2]/gp->galaxies[i].mass; + gp->galaxies[k].vel[0]-=gp->diff[0]/gp->galaxies[k].mass; + gp->galaxies[k].vel[1]-=gp->diff[1]/gp->galaxies[k].mass; + gp->galaxies[k].vel[2]-=gp->diff[2]/gp->galaxies[k].mass; + } + gp->galaxies[i].pos[0]+=gp->galaxies[i].vel[0]*gp->f_deltat; + gp->galaxies[i].pos[1]+=gp->galaxies[i].vel[1]*gp->f_deltat; + gp->galaxies[i].pos[2]+=gp->galaxies[i].vel[2]*gp->f_deltat; + } + + gp->step++; + if(gp->step > gp->f_hititerations*4) gp->init=1; +} diff --git a/grav.c b/grav.c new file mode 100644 index 00000000..b59d5a0b --- /dev/null +++ b/grav.c @@ -0,0 +1,254 @@ +#ifndef lint +static char sccsid[] = "@(#)grav.c 1.7 95/02/21 xlockmore"; +#endif +/* + * grav.c - for xlock, the X Window System lockscreen. + * + * See xlock.c for copying information. + * + * Revision History: + * 11-Jul-94: color version + * 6-Oct-93: by Greg Bowering + */ + +#include "xlock.h" +#include + +#define GRAV -0.02 /* Gravitational constant */ +#define DIST 16.0 +#define COLLIDE 0.0001 +#define ALMOST 15.99 +#define HALF 0.5 +/*#define INTRINSIC_RADIUS 200.0*/ +#define INTRINSIC_RADIUS ((float) (gp->height/5)) +#define STARRADIUS (unsigned int)(gp->height/(2*DIST)) +#define AVG_RADIUS (INTRINSIC_RADIUS/DIST) +#define RADIUS (unsigned int)(INTRINSIC_RADIUS/(POS(Z)+DIST)) + +#define XR HALF*ALMOST +#define YR HALF*ALMOST +#define ZR HALF*ALMOST + +#define VR 0.04 + +#define DIMENSIONS 3 +#define X 0 +#define Y 1 +#define Z 2 + +/*#define TRAIL 1 For trails (works good in mono only) +#define DAMPING 1 For decaying orbits */ +#if DAMPING +#define DAMP 0.999999 +#define MaxA 0.1 /* Maximum acceleration */ +#endif + +#define POS(c) planet->P[c] +#define VEL(c) planet->V[c] +#define ACC(c) planet->A[c] + +#define Planet(x,y)\ + if ((x) >= 0 && (y) >= 0 && (x) <= gp->width && (y) <= gp->height) {\ + if (planet->ri < 2)\ + XDrawPoint(dsp, win, Scr[screen].gc, (x), (y));\ + else\ + XFillArc(dsp, win, Scr[screen].gc,\ + (x) - planet->ri / 2, (y) - planet->ri / 2, planet->ri, planet->ri,\ + 0, 360*64);\ + } + +#define FLOATRAND(min,max) ((min)+(RAND()/MAXRAND)*((max)-(min))) + +typedef struct { + double + P[DIMENSIONS], + V[DIMENSIONS], + A[DIMENSIONS]; + int + xi, + yi, + ri; + unsigned long colors; +} planetstruct; + +typedef struct { + int width, height; + int + x, + y, + sr, + nplanets; + unsigned long starcolor; + planetstruct *planets; +} gravstruct; + +static gravstruct gravs[MAXSCREENS]; + +static void init_planet(); +static void draw_planet(); + +void +initgrav(win) + Window win; +{ + XWindowAttributes xgwa; + gravstruct *gp = &gravs[screen]; + unsigned char ball; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + gp->width = xgwa.width; + gp->height = xgwa.height; + + gp->sr = STARRADIUS; + + if (batchcount < 0) + batchcount = 1; + else if (batchcount > 20) + batchcount = 10; + gp->nplanets = batchcount; + + if (!gp->planets) + gp->planets = (planetstruct *) calloc(gp->nplanets, sizeof(planetstruct)); + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, gp->width, gp->height); + if (!mono && Scr[screen].npixels > 2) + gp->starcolor = Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + gp->starcolor = WhitePixel(dsp, screen); + for (ball = 0; ball < gp->nplanets; ball++) + init_planet(win, &gp->planets[ball]); + + /* Draw centrepoint */ + XDrawArc(dsp, win, Scr[screen].gc, + gp->width/2 - gp->sr/2, gp->height/2 - gp->sr/2, gp->sr, gp->sr, + 0, 360*64); +} + +static void +init_planet(win, planet) + Window win; + planetstruct *planet; +{ + gravstruct *gp = &gravs[screen]; + + if (!mono && Scr[screen].npixels > 2) + planet->colors = Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + planet->colors = WhitePixel(dsp, screen); + /* Initialize positions */ + POS(X) = FLOATRAND(-XR,XR); + POS(Y) = FLOATRAND(-YR,YR); + POS(Z) = FLOATRAND(-ZR,ZR); + + if (POS(Z) > -ALMOST) { + planet->xi = (unsigned int) + ((double)gp->width * (HALF + POS(X) / (POS(Z) + DIST))); + planet->yi = (unsigned int) + ((double)gp->height * (HALF + POS(Y) / (POS(Z) + DIST))); + } + else + planet->xi = planet->yi = -1; + planet->ri = RADIUS; + + /* Initialize velocities */ + VEL(X) = FLOATRAND(-VR,VR); + VEL(Y) = FLOATRAND(-VR,VR); + VEL(Z) = FLOATRAND(-VR,VR); + + /* Draw planets */ + Planet(planet->xi, planet->yi); +} + +void +drawgrav(win) + Window win; +{ + gravstruct *gp = &gravs[screen]; + register unsigned char ball; + + /* Mask centrepoint */ + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XDrawArc(dsp, win, Scr[screen].gc, + gp->width / 2 - gp->sr / 2, gp->height / 2 - gp->sr / 2, gp->sr, gp->sr, + 0, 360*64); + + /* Resize centrepoint */ + switch (RAND() % 4) { + case 0: + if (gp->sr < STARRADIUS) + gp->sr++; + break; + case 1: + if (gp->sr > 2) + gp->sr--; + } + + /* Draw centrepoint */ + XSetForeground(dsp, Scr[screen].gc, gp->starcolor); + XDrawArc(dsp, win, Scr[screen].gc, + gp->width / 2 - gp->sr / 2, gp->height / 2 - gp->sr / 2, gp->sr, gp->sr, + 0, 360*64); + + for (ball = 0; ball < gp->nplanets; ball++) + draw_planet(win, &gp->planets[ball]); +} + +static void +draw_planet(win, planet) + Window win; + planetstruct *planet; +{ + gravstruct *gp = &gravs[screen]; + double D; /* A distance variable to work with */ + register unsigned char cmpt; + + D = POS(X) * POS(X) + POS(Y) * POS(Y) + POS(Z) * POS(Z); + if (D < COLLIDE) + D = COLLIDE; + D = sqrt(D); + D = D * D * D; + for (cmpt = X; cmpt < DIMENSIONS; cmpt++) + { + ACC(cmpt) = POS(cmpt) * GRAV / D; +#ifdef DAMPING + if (ACC(cmpt) > MaxA) + ACC(cmpt) = MaxA; + else if (ACC(cmpt) < -MaxA) + ACC(cmpt) = -MaxA; + VEL(cmpt) = VEL(cmpt) + ACC(cmpt); + VEL(cmpt) *= DAMP; +#else + /* update velocity */ + VEL(cmpt) = VEL(cmpt) + ACC(cmpt); +#endif + /* update position */ + POS(cmpt) = POS(cmpt) + VEL(cmpt); + } + + gp->x = planet->xi; + gp->y = planet->yi; + + if (POS(Z) > -ALMOST) { + planet->xi = (unsigned int) + ((double) gp->width * (HALF + POS(X) / (POS(Z) + DIST))); + planet->yi = (unsigned int) + ((double) gp->height * (HALF + POS(Y) / (POS(Z) + DIST))); + } else + planet->xi = planet->yi = -1; + + /* Mask */ + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + Planet(gp->x, gp->y); +#ifdef TRAIL + XSetForeground(dsp, Scr[screen].gc, planet->colors); + XDrawPoint(dsp, win, Scr[screen].gc, gp->x, gp->y); +#endif + /* Move */ + gp->x = planet->xi; + gp->y = planet->yi; + planet->ri = RADIUS; + + /* Redraw */ + XSetForeground(dsp, Scr[screen].gc, planet->colors); + Planet(gp->x, gp->y); +} diff --git a/helix.c b/helix.c new file mode 100644 index 00000000..2c4191bb --- /dev/null +++ b/helix.c @@ -0,0 +1,211 @@ +#ifndef lint +static char sccsid[] = "@(#)helix.c 2.7 95/02/21 xlockmore"; +#endif +/* + * String art + * + * Copyright (c) 1992 by Jamie Zawinski + * + * 2-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 1992: xscreensaver version (Jamie Zawinski jwz@lucid.com) + */ + +/* original copyright + * Copyright (c) 1992 by Jamie Zawinski + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include +#include "xlock.h" + +#define ANGLES 360 + +static double cos_array[ANGLES], sin_array[ANGLES]; +typedef struct { + int width; + int height; + int xmid, ymid; + int color; + int counter; +} helixstruct; + +static helixstruct helixes[MAXSCREENS]; + + +void +inithelix(win) + Window win; +{ + XWindowAttributes xgwa; + helixstruct *hp = &helixes[screen]; + int i; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + hp->width = xgwa.width; + hp->height = xgwa.height; + hp->xmid = hp->width / 2; + hp->ymid = hp->height / 2; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, hp->width, hp->height); + + for (i = 0; i < ANGLES; i++) { + cos_array[i] = cos((((double) i) / (double) (ANGLES / 2)) * M_PI); + sin_array[i] = sin((((double) i) / (double) (ANGLES / 2)) * M_PI);; + } + + hp->color = 0; + hp->counter = 0; +} + +static int +gcd (a, b) + int a, b; +{ + while (b > 0) { + int tmp; + + tmp = a % b; + a = b; + b = tmp; + } + return (a < 0 ? -a : a); +} + +static void +helix (win, + radius1, radius2, d_angle, + factor1, factor2, factor3, factor4) + Window win; + int radius1, radius2, d_angle; + int factor1, factor2, factor3, factor4; +{ + helixstruct *hp = &helixes[screen]; + int x1, y1, x2, y2, angle, limit; + int i; + + x1 = hp->xmid; + y1 = hp->ymid + radius2; + x2 = hp->xmid; + y2 = hp->ymid + radius1; + angle = 0; + limit = 1 + (ANGLES / gcd (ANGLES, d_angle)); + + for (i = 0; i < limit; i++) + { + int tmp; +#define pmod(x,y) (tmp=(x%y),(tmp>=0?tmp:tmp+y)) + x1 = hp->xmid + (((double) radius1) * + sin_array[pmod ((angle * factor1), ANGLES)]); + y1 = hp->ymid + (((double) radius2) * + cos_array[pmod ((angle * factor2), ANGLES)]); + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[hp->color]); + if (++hp->color >= Scr[screen].npixels) + hp->color = 0; + } + XDrawLine (dsp, win, Scr[screen].gc, x1, y1, x2, y2); + x2 = hp->xmid + (((double) radius2) * + sin_array[pmod ((angle * factor3), ANGLES)]); + y2 = hp->ymid + (((double) radius1) * + cos_array[pmod ((angle * factor4), ANGLES)]); + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[hp->color]); + if (++hp->color >= Scr[screen].npixels) + hp->color = 0; + } + XDrawLine (dsp, win, Scr[screen].gc, x1, y1, x2, y2); + angle += d_angle; + } +} + +void +random_helix (win) + Window win; +{ + helixstruct *hp = &helixes[screen]; + int radius, radius1, radius2, d_angle, factor1, factor2, factor3, factor4; + double divisor; + + radius = min (hp->xmid, hp->ymid); + + d_angle = 0; + factor1 = 2; + factor2 = 2; + factor3 = 2; + factor4 = 2; + + divisor = ((RAND() / MAXRAND * 3.0 + 1) * (((RAND() % 1) * 2) - 1)); + + if ((RAND() & 1) == 0) + { + radius1 = radius; + radius2 = radius / divisor; + } + else + { + radius2 = radius; + radius1 = radius / divisor; + } + + while (gcd (ANGLES, d_angle) >= 2) + d_angle = RAND() % ANGLES; + +#define random_factor() \ + (((RAND() % 7) ? ((RAND() % 1) + 1) : 3) \ + * (((RAND() % 1) * 2) - 1)) + + while (gcd (gcd (gcd (factor1, factor2), factor3), factor4) != 1) + { + factor1 = random_factor(); + factor2 = random_factor(); + factor3 = random_factor(); + factor4 = random_factor(); + } + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[hp->color]); + if (++hp->color >= Scr[screen].npixels) + hp->color = 0; + } else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + + helix(win, radius1, radius2, d_angle, + factor1, factor2, factor3, factor4); +} + +void +drawhelix(win) + Window win; +{ + helixstruct *hp = &helixes[screen]; + switch (hp->counter) + { + case 0: + random_helix(win); + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + case 8: + (void) sleep(1); + break; + case 6: + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, hp->width, hp->height); + break; + } + if (hp->counter == 8) + hp->counter = 0; + else + hp->counter++; +} diff --git a/hopalong.c b/hopalong.c new file mode 100644 index 00000000..2197ef9f --- /dev/null +++ b/hopalong.c @@ -0,0 +1,139 @@ +#ifndef lint +static char sccsid[] = "@(#)hopalong.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * hopalong.c - Real Plane Fractals for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * Changes of David Bagley + * 09-Dec-94: added sine hop + * + * Changes of Patrick J. Naughton + * 29-Oct-90: fix bad (int) cast. + * 29-Jul-90: support for multiple screens. + * 08-Jul-90: new timing and colors and new algorithm for fractals. + * 15-Dec-89: Fix for proper skipping of {White,Black}Pixel() in colors. + * 08-Oct-89: Fixed long standing typo bug in RandomInitHop(); + * Fixed bug in memory allocation in inithop(); + * Moved seconds() to an extern. + * Got rid of the % mod since .mod is slow on a sparc. + * 20-Sep-89: Lint. + * 31-Aug-88: Forked from xlock.c for modularity. + * 23-Mar-88: Coded HOPALONG routines from Scientific American Sept. 86 p. 14. + */ + +#include "xlock.h" +#include + +#define SQRT 0 +#define SIN 1 +#define LOG 2 +#define OPS 3 + +typedef struct { + int centerx; + int centery; /* center of the screen */ + double a; + double b; + double c; + double i; + double j; /* hopalong parameters */ + int inc; + int pix; + int op; + long startTime; +} hopstruct; + +static hopstruct hops[MAXSCREENS]; +static XPoint *pointBuffer = 0; /* pointer for XDrawPoints */ +#define TIMEOUT 30 + +void +inithop(win) + Window win; +{ + double range; + XWindowAttributes xgwa; + hopstruct *hp = &hops[screen]; + + (void)XGetWindowAttributes(dsp, win, &xgwa); + hp->centerx = xgwa.width / 2; + hp->centery = xgwa.height / 2; + /* Make the sine operation less common since it is less interesting */ + hp->op = (RAND() % 4) ? SQRT : SIN; + switch (hp->op) { + case SQRT: + range = sqrt((double) hp->centerx * hp->centerx + + (double) hp->centery * hp->centery) / + (10.0 + RAND() % 10); + + hp->a = (RAND() / MAXRAND) * range - range / 2.0; + hp->b = (RAND() / MAXRAND) * range - range / 2.0; + hp->c = (RAND() / MAXRAND) * range - range / 2.0; + if (!(RAND() % 2)) + hp->c = 0.0; + break; + case SIN: + range = sin((double) (hp->centerx + hp->centery)) / + (5.0 + RAND() % 5); + + hp->a = M_PI + ((RAND() / MAXRAND) * 2.0 - 1.0) * 0.7; + break; + } + hp->pix = 0; + hp->inc = (int) ((RAND() / MAXRAND) * 200) - 100; + hp->i = hp->j = 0.0; + + if (!pointBuffer) + pointBuffer = (XPoint *) malloc(batchcount * sizeof(XPoint)); + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, + hp->centerx * 2, hp->centery * 2); + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + hp->startTime = seconds(); +} + + +void +drawhop(win) + Window win; +{ + double oldj; + int k = batchcount; + XPoint *xp = pointBuffer; + hopstruct *hp = &hops[screen]; + + hp->inc++; + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[hp->pix]); + if (++hp->pix >= Scr[screen].npixels) + hp->pix = 0; + } + while (k--) { + oldj = hp->j; + switch (hp->op) { + case SQRT: + hp->j = hp->a - hp->i; + hp->i = oldj + (hp->i < 0 + ? sqrt(fabs(hp->b * (hp->i + hp->inc) - hp->c)) + : -sqrt(fabs(hp->b * (hp->i + hp->inc) - hp->c))); + break; + case SIN: + hp->j = hp->a - hp->i; + hp->i = oldj - sin(hp->i + hp->inc); + break; + } + xp->x = hp->centerx + (int) (hp->i + hp->j); + xp->y = hp->centery - (int) (hp->i - hp->j); + xp++; + } + XDrawPoints(dsp, win, Scr[screen].gc, + pointBuffer, batchcount, CoordModeOrigin); + if (seconds() - hp->startTime > TIMEOUT) + inithop(win); +} diff --git a/hsbramp.c b/hsbramp.c new file mode 100644 index 00000000..fcd1888e --- /dev/null +++ b/hsbramp.c @@ -0,0 +1,121 @@ +#ifndef lint +static char sccsid[] = "@(#)hsbramp.c 1.5 94/06/22 xlockmore"; +#endif +/*- + * hsbramp.c - Create an HSB ramp. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * Changes of David Bagley + * 22-Jun-94: Modified for VMS + * + * Changes of Patrick J. Naughton + * 29-Jul-90: renamed hsbramp.c from HSBmap.c + * minor optimizations. + * 01-Sep-88: Written. + */ + +#include +#ifdef VMS +typedef unsigned char u_char; +#endif +#include + +void +hsb2rgb(H, S, B, r, g, b) + double H, + S, + B; + u_char *r, + *g, + *b; +{ + int i; + double f; + double bb; + u_char p; + u_char q; + u_char t; + + H -= floor(H); /* remove anything over 1 */ + H *= 6.0; + i = floor(H); /* 0..5 */ + f = H - (float) i; /* f = fractional part of H */ + bb = 255.0 * B; + p = (u_char) (bb * (1.0 - S)); + q = (u_char) (bb * (1.0 - (S * f))); + t = (u_char) (bb * (1.0 - (S * (1.0 - f)))); + switch (i) { + case 0: + *r = (u_char) bb; + *g = t; + *b = p; + break; + case 1: + *r = q; + *g = (u_char) bb; + *b = p; + break; + case 2: + *r = p; + *g = (u_char) bb; + *b = t; + break; + case 3: + *r = p; + *g = q; + *b = (u_char) bb; + break; + case 4: + *r = t; + *g = p; + *b = (u_char) bb; + break; + case 5: + *r = (u_char) bb; + *g = p; + *b = q; + break; + } +} + + +/* + * Input is two points in HSB color space and a count + * of how many discreet rgb space values the caller wants. + * + * Output is that many rgb triples which describe a linear + * interpolate ramp between the two input colors. + */ + +void +hsbramp(h1, s1, b1, h2, s2, b2, count, red, green, blue) + double h1, + s1, + b1, + h2, + s2, + b2; + int count; + + u_char *red, + *green, + *blue; +{ + double dh; + double ds; + double db; + + dh = (h2 - h1) / count; + ds = (s2 - s1) / count; + db = (b2 - b1) / count; + while (count--) { + hsb2rgb(h1, s1, b1, red++, green++, blue++); + h1 += dh; + s1 += ds; + b1 += db; + } +} diff --git a/hyper.c b/hyper.c new file mode 100644 index 00000000..8a2a2f72 --- /dev/null +++ b/hyper.c @@ -0,0 +1,249 @@ +#ifndef lint +static char sccsid[] = "@(#)hyper.c 2.7 95/02/21 xlockmore"; +#endif +/* + * This code derived from TI Explorer Lisp code by Joe Keane, Fritz Mueller, + * and Jamie Zawinski. + * + * Copyright (c) 1992 by Jamie Zawinski + * + * 2-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 1992: xscreensaver version (Jamie Zawinski jwz@lucid.com) +*/ + +/* original copyright + * Copyright (c) 1992 by Jamie Zawinski + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include +#include "xlock.h" + +/* Note on port: + This is not as efficient as it was, but maybe its more readable. + I tried to replace the "##" stuff with: +#define IDENT(X) X +#if defined (__STDC__) || defined (AIXV3) +#define CAT(X,Y) X##Y +#else +#define CAT(X,Y) IDENT(X)Y +#endif + A X##Y##Z could then be replaced with CAT(CAT(X,Y),Z). + Becuase of this and the fact I am using hyperstruct to keep track of + global variables, the code got really ugly, so instead of using "CAT", + it just uses arrays.*/ + +#define COMBOS 6 +#define XY 0 +#define XZ 1 +#define YZ 2 +#define XW 3 +#define YW 4 +#define ZW 5 +#define DIMS 4 +#define POINTS (DIMS*DIMS) +#define COLORS 8 +#define TIMEOUT 300 + +typedef struct { + int old_x, old_y; + int new_x, new_y; + int same_p; +} state; + +typedef struct { + int width; + int height; + int observer_z; + int x_offset, y_offset; + int unit_pixels; + double cos_array[COMBOS], sin_array[COMBOS]; + double vars[DIMS][DIMS]; + state points[POINTS]; + int colors[COLORS]; + GC xor_GC; + long startTime; +} hyperstruct; + +static hyperstruct hypers[MAXSCREENS]; + +static void +move_line (win, state0, state1, color) + Window win; + state state0, state1; + int color; +{ + hyperstruct *hp = &hypers[screen]; + + if (state0.same_p && state1.same_p) + return; + if (mono || Scr[screen].npixels <= COLORS) + { + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XDrawLine (dsp, win, Scr[screen].gc, + state0.old_x, state0.old_y, state1.old_x, state1.old_y); + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + XDrawLine (dsp, win, Scr[screen].gc, + state0.new_x, state0.new_y, state1.new_x, state1.new_y); + } + else + { + XSegment segments[2]; + XSetForeground(dsp, hp->xor_GC, Scr[screen].pixels[hp->colors[color]]); + segments[0].x1 = state0.old_x; segments[0].y1 = state0.old_y; + segments[0].x2 = state1.old_x; segments[0].y2 = state1.old_y; + segments[1].x1 = state0.new_x; segments[1].y1 = state0.new_y; + segments[1].x2 = state1.new_x; segments[1].y2 = state1.new_y; + XDrawSegments (dsp, win, hp->xor_GC, segments, 2); + } +} + +void +inithyper(win) + Window win; +{ + XWindowAttributes xgwa; + XGCValues gcv; + hyperstruct *hp = &hypers[screen]; + int i, j; + Screen *scr; + double combos[COMBOS]; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + scr = ScreenOfDisplay(dsp, screen); + hp->width = xgwa.width; + hp->height = xgwa.height; + hp->unit_pixels = xgwa.width < xgwa.height ? xgwa.width : xgwa.height; + hp->x_offset = xgwa.width / 2; + hp->y_offset = xgwa.height / 2; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, hp->width, hp->height); + + combos[0] = 0.0; + combos[1] = 0.01; + combos[2] = 0.005; + combos[3] = 0.01; + combos[4] = 0.0; + combos[5] = 0.0; + for (i = 0; i < COMBOS; i++) + { + hp->cos_array[i] = cos(combos[i]); + hp->sin_array[i] = sin(combos[i]); + } + for (i = 0; i < DIMS; i++) + for (j = 0; j < DIMS; j++) + if (i == j) + hp->vars[i][j] = 1.0; + else + hp->vars[i][j] = 0.0; + (void) memset(hp->points, 0, sizeof(hp->points)); + hp->observer_z = 5; + + gcv.function = GXxor; + gcv.foreground = WhitePixelOfScreen(scr) ^ BlackPixelOfScreen(scr); + hp->xor_GC = XCreateGC (dsp, win, GCForeground|GCFunction, &gcv); + for (i = 0; i < COLORS; i++) + hp->colors[i] = RAND() % Scr[screen].npixels; + hp->startTime = seconds(); +} + + +static int left_part[COMBOS] = {0, 0, 1, 0, 1, 2}; +static int right_part[COMBOS] = {1, 2, 2, 3, 3, 3}; +#define NOTSIGN(i) (((i)==0)?(-1):(1)) + +void +drawhyper(win) + Window win; +{ + hyperstruct *hp = &hypers[screen]; + + double temp_mult, tmp0, tmp1; + int i, j; + int sign[DIMS]; + for (i = 0; i < POINTS; i++) { + for (j = 0; j < DIMS; j++) + sign[j] = NOTSIGN(i & (1<<(DIMS-1-j))); + temp_mult = (hp->unit_pixels / + (((sign[0]*hp->vars[0][2]) + (sign[1]*hp->vars[1][2]) + + (sign[2]*hp->vars[2][2]) + (sign[3]*hp->vars[3][2]) + + (sign[0]*hp->vars[0][3]) + (sign[1]*hp->vars[1][3]) + + (sign[2]*hp->vars[2][3]) + (sign[3]*hp->vars[3][3])) - + hp->observer_z)); + hp->points[i].old_x = hp->points[i].new_x; + hp->points[i].old_y = hp->points[i].new_y; + hp->points[i].new_x = + ((((sign[0]*hp->vars[0][0]) + (sign[1]*hp->vars[1][0]) + + (sign[2]*hp->vars[2][0]) + (sign[3]*hp->vars[3][0])) * + temp_mult) + hp->x_offset); + hp->points[i].new_y = + ((((sign[0]*hp->vars[0][1]) + (sign[1]*hp->vars[1][1]) + + (sign[2]*hp->vars[2][1]) + (sign[3]*hp->vars[3][1])) * + temp_mult) + hp->y_offset); + hp->points[i].same_p = + (hp->points[i].old_x == hp->points[i].new_x && + hp->points[i].old_y == hp->points[i].new_y); + } + + move_line (win, hp->points[0], hp->points[1], 0); + move_line (win, hp->points[0], hp->points[2], 0); + move_line (win, hp->points[2], hp->points[3], 0); + move_line (win, hp->points[1], hp->points[3], 0); + + move_line (win, hp->points[8], hp->points[9], 1); + move_line (win, hp->points[8], hp->points[10], 1); + move_line (win, hp->points[10], hp->points[11], 1); + move_line (win, hp->points[9], hp->points[11], 1); + + move_line (win, hp->points[4], hp->points[5], 2); + move_line (win, hp->points[4], hp->points[6], 2); + move_line (win, hp->points[6], hp->points[7], 2); + move_line (win, hp->points[5], hp->points[7], 2); + + move_line (win, hp->points[3], hp->points[7], 3); + move_line (win, hp->points[3], hp->points[11], 3); + move_line (win, hp->points[11], hp->points[15], 3); + move_line (win, hp->points[7], hp->points[15], 3); + + move_line (win, hp->points[0], hp->points[4], 4); + move_line (win, hp->points[0], hp->points[8], 4); + move_line (win, hp->points[4], hp->points[12], 4); + move_line (win, hp->points[8], hp->points[12], 4); + + move_line (win, hp->points[1], hp->points[5], 5); + move_line (win, hp->points[1], hp->points[9], 5); + move_line (win, hp->points[9], hp->points[13], 5); + move_line (win, hp->points[5], hp->points[13], 5); + + move_line (win, hp->points[2], hp->points[6], 6); + move_line (win, hp->points[2], hp->points[10], 6); + move_line (win, hp->points[10], hp->points[14], 6); + move_line (win, hp->points[6], hp->points[14], 6); + + move_line (win, hp->points[12], hp->points[13], 7); + move_line (win, hp->points[12], hp->points[14], 7); + move_line (win, hp->points[14], hp->points[15], 7); + move_line (win, hp->points[13], hp->points[15], 7); + + for (i = 0; i < COMBOS; i++) + if (hp->sin_array[i] != 0) + for (j = 0; j < DIMS; j++) + { + tmp0 = ((hp->vars[j][left_part[i]] * hp->cos_array[i]) + + (hp->vars[j][right_part[i]] * hp->sin_array[i])); + tmp1 = ((hp->vars[j][right_part[i]] * hp->cos_array[i]) - + (hp->vars[j][left_part[i]] * hp->sin_array[i])); + hp->vars[j][left_part[i]] = tmp0; + hp->vars[j][right_part[i]] = tmp1; + } + if (seconds() - hp->startTime > TIMEOUT) + inithyper(win); +} diff --git a/image.c b/image.c new file mode 100644 index 00000000..2fd7113e --- /dev/null +++ b/image.c @@ -0,0 +1,118 @@ +#ifndef lint +static char sccsid[] = "@(#)image.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * image.c - image bouncer for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * Changes of David Bagley + * 07-Dec-94: Icons are now better centered if do not exactly fill an area. + * + * Changes of Patrick J. Naughton + * 29-Jul-90: Written. + */ + +#include "xlock.h" +#include "image.xbm" + +static XImage logo = { + 0, 0, /* width, height */ + 0, XYBitmap, 0, /* xoffset, format, data */ + LSBFirst, 8, /* byte-order, bitmap-unit */ + LSBFirst, 8, 1 /* bitmap-bit-order, bitmap-pad, depth */ +}; + +#define MAXICONS 64 + +typedef struct { + int x; + int y; +} point; + +typedef struct { + int width; + int height; + int nrows; + int ncols; + int xb; + int yb; + int xoff; + int yoff; + int iconmode; + int iconcount; + point icons[MAXICONS]; +} imagestruct; + +static imagestruct ims[MAXSCREENS]; + +void +drawimage(win) + Window win; +{ + imagestruct *ip = &ims[screen]; + int i; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + for (i = 0; i < ip->iconcount; i++) { + if (!ip->iconmode) + XFillRectangle(dsp, win, Scr[screen].gc, + ip->xb + image_width * ip->icons[i].x + ip->xoff, + ip->yb + image_height * ip->icons[i].y + ip->yoff, + image_width, image_height); + + ip->icons[i].x = RAND() % ip->ncols; + ip->icons[i].y = RAND() % ip->nrows; + } + if (mono || Scr[screen].npixels <= 2) + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + for (i = 0; i < ip->iconcount; i++) { + if (!mono && Scr[screen].npixels > 2) + XSetForeground(dsp, Scr[screen].gc, + Scr[screen].pixels[RAND() % Scr[screen].npixels]); + + XPutImage(dsp, win, Scr[screen].gc, &logo, + 0, 0, + ip->xb + image_width * ip->icons[i].x + ip->xoff, + ip->yb + image_height * ip->icons[i].y + ip-> yoff, + image_width, image_height); + } +} + +void +initimage(win) + Window win; +{ + XWindowAttributes xgwa; + imagestruct *ip = &ims[screen]; + + logo.data = (char *) image_bits; + logo.width = image_width; + logo.height = image_height; + logo.bytes_per_line = (image_width + 7) / 8; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + ip->width = xgwa.width; + ip->height = xgwa.height; + ip->ncols = ip->width / image_width; + ip->nrows = ip->height / image_height; + ip->xoff = (ip->width - ip->ncols * image_width) / 2; + ip->yoff = (ip->height - ip->nrows * image_height) / 2; + ip->iconmode = (ip->ncols < 2 || ip->nrows < 2); + if (ip->iconmode) { + ip->xb = 0; + ip->yb = 0; + ip->iconcount = 1; /* icon mode */ + } else { + ip->xb = (ip->width - image_width * ip->ncols) / 2; + ip->yb = (ip->height - image_height * ip->nrows) / 2; + ip->iconcount = batchcount; + if (ip->iconcount > MAXICONS) + ip->iconcount = 16; + } + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, ip->width, ip->height); +} diff --git a/kaleid.c b/kaleid.c new file mode 100644 index 00000000..af8535d2 --- /dev/null +++ b/kaleid.c @@ -0,0 +1,163 @@ +#ifndef lint +static char sccsid[] = "@(#)kaleid.c 2.7 95/02/21 xlockmore"; +#endif +/* + * kaleid.c + * + * Based on a kaleidoscope algorithm from a PC-based program by: + * Judson D. McClendon (Compuserve: [74415,1003]) + * + * KALEIDOSCOPE (X11 Version) + * By Nathan Meyers, nathanm@hp-pcd.hp.com. + * + * Modified by Laurent JULLIARD, laurentj@hpgnse2.grenoble.hp.com + * for LINUX 0.96 and X11 v1.0 shared library + * + * Revision History: + * 23-Oct-94: Ported to xlock by David Bagley +*/ + +#include "xlock.h" + +#define INTRAND(min,max) (RAND()%((max+1)-(min))+(min)) + +typedef struct { + int x; + int y; +} point; + +typedef struct { + int pix; + int cx, cy, m; + int ox, oy; + int x1, y1, x2, y2, xv1, yv1, xv2, yv2; + int xa, ya, xb, yb, xc, yc, xd, yd; + int width; + int height; + int itercount; +} kaleidstruct; + +static kaleidstruct kaleids[MAXSCREENS]; + +void +initkaleid(win) + Window win; +{ + XWindowAttributes xgwa; + kaleidstruct *kp = &kaleids[screen]; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + kp->width = xgwa.width; + kp->height = xgwa.height; + + kp->pix = 0; + kp->cx = kp->width/2; + kp->cy = kp->height/2; + kp->m = (kp->cx>kp->cy) ? kp->cx : kp->cy; + kp->m = kp->m ? kp->m : 1; + kp->x1 = RAND() % kp->m + 1; + kp->x2 = RAND() % kp->m + 1; + kp->y1 = RAND() % kp->x1 + 1; + kp->y2 = RAND() % kp->x2 + 1; + kp->xv1 = RAND() % 7 - 3; + kp->xv2 = RAND() % 7 - 3; + kp->yv1 = RAND() % 7 - 3; + kp->yv2 = RAND() % 7 - 3; + kp->itercount = 0; + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, kp->width, kp->height); +} + +void +drawkaleid(win) + Window win; +{ + XSegment segs[8]; + kaleidstruct *kp = &kaleids[screen]; + + if (!(RAND() % 50)) { + kp->x1 = RAND() % kp->m + 1; + kp->x2 = RAND() % kp->m + 1; + kp->y1 = RAND() % kp->x1; + kp->y2 = RAND() % kp->x2; + } + if (!(RAND() % 10)) { + kp->xv1 = RAND() % 7 - 3; + kp->xv2 = RAND() % 7 - 3; + kp->yv1 = RAND() % 7 - 3; + kp->yv2 = RAND() % 7 - 3; + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[kp->pix]); + if (++kp->pix >= Scr[screen].npixels) + kp->pix = 0; + } + } + if (kp->cxcy) { + kp->xa = kp->x1 * kp->cx / kp->cy; + kp->ya = kp->y1 * kp->cx / kp->cy; + kp->xb = kp->x1; + kp->yb = kp->y1; + kp->xc = kp->x2 * kp->cx / kp->cy; + kp->yc = kp->y2 * kp->cx / kp->cy; + kp->xd = kp->x2; + kp->yd = kp->y2; + } else { + kp->xa = kp->x1; + kp->ya = kp->y1; + kp->xb = kp->x1 * kp->cy / kp->cx; + kp->yb = kp->y1 * kp->cy / kp->cx; + kp->xc = kp->x2; + kp->yc = kp->y2; + kp->xd = kp->x2 * kp->cy / kp->cx; + kp->yd = kp->y2 * kp->cy / kp->cx; + } + segs[0].x1 = kp->cx + kp->xa + kp->ox; + segs[0].y1 = kp->cy - kp->yb + kp->oy; + segs[0].x2 = kp->cx + kp->xc + kp->ox; + segs[0].y2 = kp->cy - kp->yd + kp->oy; + segs[1].x1 = kp->cx - kp->ya + kp->ox; + segs[1].y1 = kp->cy + kp->xb + kp->oy; + segs[1].x2 = kp->cx - kp->yc + kp->ox; + segs[1].y2 = kp->cy + kp->xd + kp->oy; + segs[2].x1 = kp->cx - kp->xa + kp->ox; + segs[2].y1 = kp->cy - kp->yb + kp->oy; + segs[2].x2 = kp->cx - kp->xc + kp->ox; + segs[2].y2 = kp->cy - kp->yd + kp->oy; + segs[3].x1 = kp->cx - kp->ya + kp->ox; + segs[3].y1 = kp->cy - kp->xb + kp->oy; + segs[3].x2 = kp->cx - kp->yc + kp->ox; + segs[3].y2 = kp->cy - kp->xd + kp->oy; + segs[4].x1 = kp->cx - kp->xa + kp->ox; + segs[4].y1 = kp->cy + kp->yb + kp->oy; + segs[4].x2 = kp->cx - kp->xc + kp->ox; + segs[4].y2 = kp->cy + kp->yd + kp->oy; + segs[5].x1 = kp->cx + kp->ya + kp->ox; + segs[5].y1 = kp->cy - kp->xb + kp->oy; + segs[5].x2 = kp->cx + kp->yc + kp->ox; + segs[5].y2 = kp->cy - kp->xd + kp->oy; + segs[6].x1 = kp->cx + kp->xa + kp->ox; + segs[6].y1 = kp->cy + kp->yb + kp->oy; + segs[6].x2 = kp->cx + kp->xc + kp->ox; + segs[6].y2 = kp->cy + kp->yd + kp->oy; + segs[7].x1 = kp->cx + kp->ya + kp->ox; + segs[7].y1 = kp->cy + kp->xb + kp->oy; + segs[7].x2 = kp->cx + kp->yc + kp->ox; + segs[7].y2 = kp->cy + kp->xd + kp->oy; + XDrawSegments(dsp, win, Scr[screen].gc, segs, 8); + kp->x1= (kp->x1 + kp->xv1) % kp->m; + kp->y1= (kp->y1 + kp->yv1) % kp->m; + kp->x2= (kp->x2 + kp->xv2) % kp->m; + kp->y2= (kp->y2 + kp->yv2) % kp->m; + kp->itercount++; + + if (kp->itercount > 500 && !(RAND() % 700)) { + XClearWindow(dsp, win); + kp->itercount = 0; + } + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[kp->pix]); + if (++kp->pix >= Scr[screen].npixels) + kp->pix = 0; + } else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); +} diff --git a/life.c b/life.c new file mode 100644 index 00000000..6866132c --- /dev/null +++ b/life.c @@ -0,0 +1,816 @@ +#ifndef lint +static char sccsid[] = "@(#)life.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * life.c - Conway's game of Life for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * Changes of David Bagley + * 07-Jan-95: life now has a random soup pattern. + * 07-Dec-94: life now has new organisms. They are now better centered. + * Some of the nonperiodic forms were removed. New life forms + * were taken from xlife (an AMAZING collection of life forms). + * life's gliders now come from the edge of the screen except + * when generated by a life form. + * 23-Nov-94: Bug fix for different iconified window sizes + * 21-Jul-94: Took out bzero & bcopy since memset & memcpy is more portable + * 10-Jun-94: Changed name of function 'kill', which is a libc function on + * many systems from Victor Langeveld + * + * Changes of Patrick J. Naughton + * 24-May-91: Added wraparound code from johnson@bugs.comm.mot.com. + * Made old cells stay blue. + * Made batchcount control the number of generations till restart. + * 29-Jul-90: support for multiple screens. + * 07-Feb-90: remove bogus semi-colon after #include line. + * 15-Dec-89: Fix for proper skipping of {White,Black}Pixel() in colors. + * 08-Oct-89: Moved seconds() to an extern. + * 20-Sep-89: Written (life algorithm courtesy of Jim Graham, flar@sun.com). + */ + +#include "xlock.h" +#include "life.xbm" + +static XImage logo = { + 0, 0, /* width, height */ + 0, XYBitmap, 0, /* xoffset, format, data */ + LSBFirst, 8, /* byte-order, bitmap-unit */ + LSBFirst, 8, 1 /* bitmap-bit-order, bitmap-pad, depth */ +}; +#define MAXROWS 155 +#define MAXCOLS 144 +#define TIMEOUT 30 + +typedef struct { + int pixelmode; + int xs; + int ys; + int xb; + int yb; + int generation; + long shooterTime; + int nrows; + int ncols; + int width; + int height; + unsigned char buffer[(MAXROWS + 2) * (MAXCOLS + 2) + 2]; + unsigned char tempbuf[MAXCOLS * 2]; + unsigned char lastbuf[MAXCOLS]; + unsigned char agebuf[(MAXROWS + 2) * (MAXCOLS + 2)]; +} lifestruct; + +static lifestruct lifes[MAXSCREENS]; +static int icon_width, icon_height; + +/* Buffer stores the data for each cell. Each cell is stored as + * 8 bits representing the presence of a critter in each of it's + * surrounding 8 cells. There is an empty row and column around + * the whole array to allow stores without bounds checking as well + * as an extra row at the end for the fetches into tempbuf. + * + * Tempbuf stores the data for the next two rows so that we know + * the state of those critter before he was modified by the fate + * of the critters that have already been processed. + * + * Agebuf stores the age of each critter. + */ + +#define UPLT 0x01 +#define UP 0x02 +#define UPRT 0x04 +#define LT 0x08 +#define RT 0x10 +#define DNLT 0x20 +#define DN 0x40 +#define DNRT 0x80 + +/* Fates is a lookup table for the fate of a critter. The 256 + * entries represent the 256 possible combinations of the 8 + * neighbor cells. Each entry is one of BIRTH (create a cell + * or leave one alive), SAME (leave the cell alive or dead), + * or DEATH (kill anything in the cell). + */ +#define BIRTH 0 +#define SAME 1 +#define DEATH 2 +#define NUMPTS 63 +static unsigned char fates[256]; +static int initialized = 0; + +/* Patterns have < NUMPTS pts (and should have a size of <= 32x32, + the Gun is an exception) */ +static int patterns[][2 * NUMPTS + 1] = { + { /* GLIDER GUN */ + 6, -4, + 5, -3, 6, -3, + -6, -2, -5, -2, 8, -2, 9, -2, 16, -2, + -7, -1, 8, -1, 9, -1, 10, -1, 16, -1, 17, -1, + -18, 0, -17, 0, -8, 0, 8, 0, 9, 1, + -17, 1, -8, 1, 5, 1, 6, 1, + -8, 2, 6, 2, + -7, 3, + -6, 4, -5, 4, + 127 + }, + { /* FIGURE EIGHT */ + -3, -3, -2, -3, -1, -3, + -3, -2, -2, -2, -1, -2, + -3, -1, -2, -1, -1, -1, + 0, 0, 1, 0, 2, 0, + 0, 1, 1, 1, 2, 1, + 0, 2, 1, 2, 2, 2, + 127 + }, + { /* PULSAR */ + -2, -1, -1, -1, 0, -1, 1, -1, 2, -1, + -2, 0, 2, 0, + 127 + }, + { /* BARBER POLE P2 */ + -6, -6, -5, -6, + -6, -5, -4, -5, + -4, -3, -2, -3, + -2, -1, 0, -1, + 0, 1, 2, 1, + 2, 3, 4, 3, + 5, 4, + 4, 5, 5, 5, + 127 + }, + { /* ACHIM P5 */ + -6, -6, -5, -6, + -6, -5, + -4, -4, + -4, -3, -2, -3, + -2, -1, 0, -1, + 0, 1, 2, 1, + 2, 3, 3, 3, + 5, 4, + 4, 5, 5, 5, + 127 + }, + { /* HERTZ P4 */ + -2, -5, -1, -5, + -2, -4, -1, -4, + -7, -2, -6, -2, -2, -2, -1, -2, 0, -2, 1, -2, 5, -2, 6, -2, + -7, -1, -5, -1, -3, -1, 2, -1, 4, -1, 6, -1, + -5, 0, -3, 0, -2, 0, 2, 0, 4, 0, + -7, 1, -5, 1, -3, 1, 2, 1, 4, 1, 6, 1, + -7, 2, -6, 2, -2, 2, -1, 2, 0, 2, 1, 2, 5, 2, 6, 2, + -2, 4, -1, 4, + -2, 5, -1, 5, + 127 + }, + { /* TUMBLER */ + -2, -3, -1, -3, 1, -3, 2, -3, + -2, -2, -1, -2, 1, -2, 2, -2, + -1, -1, 1, -1, + -3, 0, -1, 0, 1, 0, 3, 0, + -3, 1, -1, 1, 1, 1, 3, 1, + -3, 2, -2, 2, 2, 2, 3, 2, + 127 + }, + { /* PULSE1 P4*/ + 0, -3, 1, -3, + -2, -2, 0, -2, + -3, -1, 3, -1, + -2, 0, 2, 0, 3, 0, + 0, 2, 2, 2, + 1, 3, + 127 + }, + { /* SHINING FLOWER P5 */ + -1, -4, 0, -4, + -2, -3, 1, -3, + -3, -2, 2, -2, + -4, -1, 3, -1, + -4, 0, 3, 0, + -3, 1, 2, 1, + -2, 2, 1, 2, + -1, 3, 0, 3, + 127 + }, + { /* PULSE2 P6 */ + 0, -4, 1, -4, + -4, -3, -3, -3, -1, -3, + -4, -2, -3, -2, 0, -2, 3, -2, + 1, -1, 3, -1, + 2, 0, + 1, 2, 2, 2, + 1, 3, 2, 3, + 127 + }, + { /* PINWHEEL, CLOCK P4 */ + -2, -6, -1, -6, + -2, -5, -1, -5, + -2, -3, -1, -3, 0, -3, 1, -3, + -3, -2, -1, -2, 2, -2, 4, -2, 5, -2, + -3, -1, 1, -1, 2, -1, 4, -1, 5, -1, + -6, 0, -5, 0, -3, 0, 0, 0, 2, 0, + -6, 1, -5, 1, -3, 1, 2, 1, + -2, 2, -1, 2, 0, 2, 1, 2, + 0, 4, 1, 4, + 0, 5, 1, 5, + 127 + }, + { /* PENTADECATHOLON */ + -5, 0, -4, 0, -3, 0, -2, 0, -1, 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, + 127 + }, + { /* PISTON */ + 1, -3, 2, -3, + 0, -2, + -10, -1, -1, -1, + -11, 0, -10, 0, -1, 0, 9, 0, 10, 0, + -1, 1, 9, 1, + 0, 2, + 1, 3, 2, 3, + 127 + }, + { /* PISTON2 */ + -3, -5, + -14, -4, -13, -4, -4, -4, -3, -4, 13, -4, 14, -4, + -14, -3, -13, -3, -5, -3, -4, -3, 13, -3, 14, -3, + -4, -2, -3, -2, 0, -2, 1, -2, + -4, 2, -3, 2, 0, 2, 1, 2, + -14, 3, -13, 3, -5, 3, -4, 3, 13, 3, 14, 3, + -14, 4, -13, 4, -4, 4, -3, 4, 13, 4, 14, 4, + -3, 5, + 127 + }, + { /* SWITCH ENGINE */ + -12, -3, -10, -3, + -13, -2, + -12, -1, -9, -1, + -10, 0, -9, 0, -8, 0, + 13, 2, 14, 2, + 13, 3, + 127 + }, + { /* GEARS (gear, flywheel, blinker) */ + -1, -4, + -1, -3, 1, -3, + -3, -2, + 2, -1, 3, -1, + -4, 0, -3, 0, + 2, 1, + -2, 2, 0, 2, + 0, 3, + + 5, 3, + 3, 4, 4, 4, + 5, 5, 6, 5, + 4, 6, + + 8, 0, + 8, 1, + 8, 2, + 127 + }, + { /* TURBINE8 */ + -4, -4, -3, -4, -2, -4, -1, -4, 0, -4, 1, -4, 3, -4, 4, -4, + -4, -3, -3, -3, -2, -3, -1, -3, 0, -3, 1, -3, 3, -3, 4, -3, + 3, -2, 4, -2, + -4, -1, -3, -1, 3, -1, 4, -1, + -4, 0, -3, 0, 3, 0, 4, 0, + -4, 1, -3, 1, 3, 1, 4, 1, + -4, 2, -3, 2, + -4, 3, -3, 3, -1, 3, 0, 3, 1, 3, 2, 3, 3, 3, 4, 3, + -4, 4, -3, 4, -1, 4, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4, + 127 + }, + { /* P16 */ + -3, -6, 1, -6, 2, -6, + -3, -5, 0, -5, 3, -5, + 3, -4, + -5, -3, -4, -3, 1, -3, 2, -3, 5, -3, 6, -3, + -6, -2, -3, -2, + -6, -1, -3, -1, + -5, 0, 5, 0, + 3, 1, 6, 1, + 3, 2, 6, 2, + -6, 3, -5, 3, -2, 3, -1, 3, 4, 3, 5, 3, + -3, 4, + -3, 5, 0, 5, 3, 5, + -2, 6, -1, 6, 3, 6, + 127 + }, + { /* PUFFER */ + 1, -9, + 2, -8, + -2, -7, 2, -7, + -1, -6, 0, -6, 1, -6, 2, -6, + -2, -2, + -1, -1, 0, -1, + 0, 0, + 0, 1, + -1, 2, + 1, 5, + 2, 6, + -2, 7, 2, 7, + -1, 8, 0, 8, 1, 8, 2, 8, + 127 + }, + { /* ESCORT */ + 3, -8, + 4, -7, + -2, -6, 4, -6, + -1, -5, 0, -5, 1, -5, 2, -5, 3, -5, 4, -5, + -5, -1, -4, -1, -3, -1, -2, -1, -1, -1, 0, -1, + 1, -1, 2, -1, 3, -1, 4, -1, 5, -1, 6, -1, + -6, 0, 6, 0, + 6, 1, + 5, 2, + 3, 4, + 4, 5, + -2, 6, 4, 6, + -1, 7, 0, 7, 1, 7, 2, 7, 3, 7, 4, 7, + 127 + }, + { /* DART SPEED 1/3 */ + 3, -7, + 2, -6, 4, -6, + 1, -5, 2, -5, + 4, -4, + 0, -3, 4, -3, + -3, -2, 0, -2, + -4, -1, -2, -1, 1, -1, 2, -1, 3, -1, 4, -1, + -5, 0, -2, 0, + -4, 1, -2, 1, 1, 1, 2, 1, 3, 1, 4, 1, + -3, 2, 0, 2, + 0, 3, 4, 3, + 4, 4, + 1, 5, 2, 5, + 2, 6, 4, 6, + 3, 7, + 127 + }, + { /* PERIOD 4 SPEED 1/2 */ + -3, -5, + -4, -4, -3, -4, -2, -4, -1, -4, 0, -4, + -5, -3, -4, -3, 0, -3, 1, -3, 3, -3, + -4, -2, 4, -2, + -3, -1, -2, -1, 1, -1, 3, -1, + -3, 1, -2, 1, 1, 1, 3, 1, + -4, 2, 4, 2, + -5, 3, -4, 3, 0, 3, 1, 3, 3, 3, + -4, 4, -3, 4, -2, 4, -1, 4, 0, 4, + -3, 5, + 127 + }, + { /* ANOTHER PERIOD 4 SPEED 1/2 */ + -4, -7, -3, -7, -1, -7, 0, -7, 1, -7, 2, -7, 3, -7, 4, -7, + -5, -6, -4, -6, -3, -6, -2, -6, 5, -6, + -6, -5, -5, -5, + -5, -4, 5, -4, + -4, -3, -3, -3, -2, -3, 0, -3, + -2, -2, + -2, -1, + -1, 0, + -2, 1, + -2, 2, + -4, 3, -3, 3, -2, 3, 0, 3, + -5, 4, 5, 4, + -6, 5, -5, 5, + -5, 6, -4, 6, -3, 6, -2, 6, 5, 6, + -4, 7, -3, 7, -1, 7, 0, 7, 1, 7, 2, 7, 3, 7, 4, 7, + 127 + }, + { /* SMALLEST KNOWN PERIOD 3 SPACESHIP SPEED 1/3 */ + 0, -8, + -1, -7, 1, -7, + -1, -6, 1, -6, + -1, -5, + -2, -3, -1, -3, + -1, -2, 1, -2, + -2, -1, 0, -1, + -2, 0, -1, 0, 0, 0, + -1, 2, 1, 2, + -1, 3, 0, 3, + 0, 4, + 0, 5, 2, 5, + 0, 6, 2, 6, + 1, 7, + 127 + }, + { /* TURTLE SPEED 1/3 */ + -4, -5, -3, -5, -2, -5, 6, -5, + -4, -4, -3, -4, 0, -4, 2, -4, 3, -4, 5, -4, 6, -4, + -2, -3, -1, -3, 0, -3, 5, -3, + -4, -2, -1, -2, 1, -2, 5, -2, + -5, -1, 0, -1, 5, -1, + -5, 0, 0, 0, 5, 0, + -4, 1, -1, 1, 1, 1, 5, 1, + -2, 2, -1, 2, 0, 2, 5, 2, + -4, 3, -3, 3, 0, 3, 2, 3, 3, 3, 5, 3, 6, 3, + -4, 4, -3, 4, -2, 4, 6, 4, + 127 + }, + { /* SMALLEST KNOWN PERIOD 5 SPEED 2/5 */ + 1, -7, 3, -7, + -2, -6, 3, -6, + -3, -5, -2, -5, -1, -5, 4, -5, + -4, -4, -2, -4, + -5, -3, -4, -3, -1, -3, 0, -3, 5, -3, + -4, -2, -3, -2, 0, -2, 1, -2, 2, -2, 3, -2, 4, -2, + -4, 2, -3, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, + -5, 3, -4, 3, -1, 3, 0, 3, 5, 3, + -4, 4, -2, 4, + -3, 5, -2, 5, -1, 5, 4, 5, + -2, 6, 3, 6, + 1, 7, 3, 7, + 127 + }, + { /* SYM PUFFER */ + 1, -4, 2, -4, 3, -4, 4, -4, + 0, -3, 4, -3, + 4, -2, + -4, -1, -3, -1, 0, -1, 3, -1, + -4, 0, -3, 0, -2, 0, + -4, 1, -3, 1, 0, 1, 3, 1, + 4, 2, + 0, 3, 4, 3, + 1, 4, 2, 4, 3, 4, 4, 4, + 127 + }, + { /* ], NEAR SHIP, PI HEPTOMINO */ + -2, -1, -1, -1, 0, -1, + 1, 0, + -2, 1, -1, 1, 0, 1, + 127 + }, + { /* R PENTOMINO */ + 0, -1, 1, -1, + -1, 0, 0, 0, + 0, 1, + 127 + } +}; + +#define NPATS (sizeof patterns / sizeof patterns[0]) + + +static void +drawcell(win, row, col) + Window win; + int row, col; +{ + lifestruct *lp = &lifes[screen]; + + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + if (!mono && Scr[screen].npixels > 2) { + unsigned char *loc = lp->buffer + ((row + 1) * (lp->ncols + 2)) + col + 1; + unsigned char *ageptr = lp->agebuf + (loc - lp->buffer); + unsigned char age = *ageptr; + + /* if we aren't up to blue yet, then keep aging the cell. */ + if (age < Scr[screen].npixels * 0.7) + ++age; + + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[age]); + *ageptr = age; + } + if (lp->pixelmode) + XFillRectangle(dsp, win, Scr[screen].gc, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, lp->xs, lp->ys); + else + XPutImage(dsp, win, Scr[screen].gc, &logo, + 0, 0, lp->xb + lp->xs * col, lp->yb + lp->ys * row, + icon_width, icon_height); +} + + +static void +erasecell(win, row, col) + Window win; + int row, col; +{ + lifestruct *lp = &lifes[screen]; + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, + lp->xb + lp->xs * col, lp->yb + lp->ys * row, lp->xs, lp->ys); +} + + +static void +spawn(loc) + unsigned char *loc; +{ + lifestruct *lp = &lifes[screen]; + unsigned char *ulloc, *ucloc, *urloc, *clloc, *crloc, *llloc, *lcloc, *lrloc, + *arloc; + int off, row, col, lastrow; + + lastrow = (lp->nrows) * (lp->ncols + 2); + off = loc - lp->buffer; + col = off % (lp->ncols + 2); + row = (off - col) / (lp->ncols + 2); + ulloc = loc - lp->ncols - 3; + ucloc = loc - lp->ncols - 2; + urloc = loc - lp->ncols - 1; + clloc = loc - 1; + crloc = loc + 1; + arloc = loc + 1; + llloc = loc + lp->ncols + 1; + lcloc = loc + lp->ncols + 2; + lrloc = loc + lp->ncols + 3; + if (row == 1) { + ulloc += lastrow; + ucloc += lastrow; + urloc += lastrow; + } + if (row == lp->nrows) { + llloc -= lastrow; + lcloc -= lastrow; + lrloc -= lastrow; + } + if (col == 1) { + ulloc += lp->ncols; + clloc += lp->ncols; + llloc += lp->ncols; + } + if (col == lp->ncols) { + urloc -= lp->ncols; + crloc -= lp->ncols; + lrloc -= lp->ncols; + } + *ulloc |= UPLT; + *ucloc |= UP; + *urloc |= UPRT; + *clloc |= LT; + *crloc |= RT; + *arloc |= RT; + *llloc |= DNLT; + *lcloc |= DN; + *lrloc |= DNRT; + + *(lp->agebuf + (loc - lp->buffer)) = 0; +} + + +static void +ckill(loc) + unsigned char *loc; +{ + lifestruct *lp = &lifes[screen]; + + unsigned char *ulloc, *ucloc, *urloc, *clloc, *crloc, *llloc, *lcloc, + *lrloc, *arloc; + int off, row, col, lastrow; + + lastrow = (lp->nrows) * (lp->ncols + 2); + off = loc - lp->buffer; + row = off / (lp->ncols + 2); + col = off % (lp->ncols + 2); + row = (off - col) / (lp->ncols + 2); + ulloc = loc - lp->ncols - 3; + ucloc = loc - lp->ncols - 2; + urloc = loc - lp->ncols - 1; + clloc = loc - 1; + crloc = loc + 1; + arloc = loc + 1; + llloc = loc + lp->ncols + 1; + lcloc = loc + lp->ncols + 2; + lrloc = loc + lp->ncols + 3; + if (row == 1) { + ulloc += lastrow; + ucloc += lastrow; + urloc += lastrow; + } + if (row == lp->nrows) { + llloc -= lastrow; + lcloc -= lastrow; + lrloc -= lastrow; + } + if (col == 1) { + ulloc += lp->ncols; + clloc += lp->ncols; + llloc += lp->ncols; + } + if (col == lp->ncols) { + urloc -= lp->ncols; + crloc -= lp->ncols; + lrloc -= lp->ncols; + } + *ulloc &= ~UPLT; + *ucloc &= ~UP; + *urloc &= ~UPRT; + *clloc &= ~LT; + *crloc &= ~RT; + *arloc &= ~RT; + *llloc &= ~DNLT; + *lcloc &= ~DN; + *lrloc &= ~DNRT; +} + + +static void +setcell(win, row, col) + Window win; + int row; + int col; +{ + lifestruct *lp = &lifes[screen]; + unsigned char *loc; + + loc = lp->buffer + ((row + 1) * (lp->ncols + 2)) + col + 1; + spawn(loc); + drawcell(win, row, col); +} + + +static void +init_fates() +{ + int i, bits, neighbors; + + for (i = 0; i < 256; i++) { + neighbors = 0; + for (bits = i; bits; bits &= (bits - 1)) + neighbors++; + if (neighbors == 3) + fates[i] = BIRTH; + else if (neighbors == 2) + fates[i] = SAME; + else + fates[i] = DEATH; + } +} + +static void RandomSoup(win, n, v) +Window win; +int n, v; +{ + lifestruct *lp = &lifes[screen]; + int row, col; + + v /= 2; + if (v < 1) + v = 1; + for (row = lp->nrows / 2 - v; row < lp->nrows / 2 + v; ++row) + for (col = lp->ncols / 2 - v; col < lp->ncols / 2 + v; ++col) + if ((RAND() % 100) < n && col >= 0 && row >= 0 && + col < lp->ncols && row < lp->nrows) + setcell(win, row, col); +} + +static void GetPattern(win, i) +Window win; +int i; +{ + lifestruct *lp = &lifes[screen]; + int row, col; + int *patptr; + + patptr = &patterns[i][0]; + while ((col = *patptr++) != 127) { + row = *patptr++; + col += lp->ncols / 2; + row += lp->nrows / 2; + if (col >= 0 && row >= 0 && col < lp->ncols && row < lp->nrows) + setcell(win, row, col); + } +} + +void +initlife(win) + Window win; +{ + XWindowAttributes xgwa; + lifestruct *lp = &lifes[screen]; + int i; + + lp->generation = 0; + lp->shooterTime = seconds(); + icon_width = life_width; + icon_height = life_height; + + if (!initialized) { + initialized = 1; + init_fates(); + logo.data = (char *) life_bits; + logo.width = icon_width; + logo.height = icon_height; + logo.bytes_per_line = (icon_width + 7) / 8; + } + (void) XGetWindowAttributes(dsp, win, &xgwa); + lp->width = xgwa.width; + lp->height = xgwa.height; + lp->pixelmode = (lp->width + lp->height < 8 * (icon_width + icon_height)); + if (lp->pixelmode) { + lp->ncols = min(lp->width / 2, MAXCOLS); + lp->nrows = min(lp->height / 2, MAXROWS); + } else { + lp->ncols = min(lp->width / icon_width, MAXCOLS); + lp->nrows = min(lp->height / icon_height, MAXROWS); + } + lp->xs = lp->width / lp->ncols; + lp->ys = lp->height / lp->nrows; + lp->xb = (lp->width - lp->xs * lp->ncols) / 2; + lp->yb = (lp->height - lp->ys * lp->nrows) / 2; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, lp->width, lp->height); + + (void) memset(lp->buffer, 0, sizeof(lp->buffer)); + + i = RAND() % (NPATS + 2); + if (i >= NPATS) + RandomSoup(win, 30, 15); + else + GetPattern(win, i); +} + +static void shooter(win) +Window win; +{ + int hsp, vsp, hoff = 1, voff = 1; + lifestruct *lp = &lifes[screen]; + + /* Generate the glider at the edge of the screen */ + if (RAND() % 2) { + hsp = (RAND() % 2) ? 0 : lp->ncols - 1; + vsp = RAND() % lp->nrows; + } else { + vsp = (RAND() % 2) ? 0 : lp->nrows - 1; + hsp = RAND() % lp->ncols; + } + if (vsp > lp->nrows / 2) + voff = -1; + if (hsp > lp->ncols / 2) + hoff = -1; + setcell(win, vsp + 0 * voff, hsp + 2 * hoff); + setcell(win, vsp + 1 * voff, hsp + 2 * hoff); + setcell(win, vsp + 2 * voff, hsp + 2 * hoff); + setcell(win, vsp + 2 * voff, hsp + 1 * hoff); + setcell(win, vsp + 1 * voff, hsp + 0 * hoff); + lp->shooterTime = seconds(); +} + +void +drawlife(win) + Window win; +{ + unsigned char *loc, *temploc, *lastloc; + int row, col; + unsigned char fate; + lifestruct *lp = &lifes[screen]; + + loc = lp->buffer + lp->ncols + 2 + 1; + temploc = lp->tempbuf; + /* copy the first 2 rows to the tempbuf */ + (void) memcpy(temploc, loc, lp->ncols); + (void) memcpy(temploc + lp->ncols, loc + lp->ncols + 2, lp->ncols); + + lastloc = lp->lastbuf; + /* copy the last row to another buffer for wraparound */ + (void) memcpy(lastloc, loc + ((lp->nrows - 1) * (lp->ncols + 2)), + lp->ncols); + + for (row = 0; row < lp->nrows; ++row) { + for (col = 0; col < lp->ncols; ++col) { + fate = fates[*temploc]; + *temploc = (row == (lp->nrows - 3)) ? + *(lastloc + col) : + *(loc + (lp->ncols + 2) * 2); + switch (fate) { + case BIRTH: + if (!(*(loc + 1) & RT)) { + spawn(loc); + } + /* NO BREAK */ + case SAME: + if (*(loc + 1) & RT) { + drawcell(win, row, col); + } + break; + case DEATH: + if (*(loc + 1) & RT) { + ckill(loc); + erasecell(win, row, col); + } + break; + } + loc++; + temploc++; + } + loc += 2; + if (temploc >= lp->tempbuf + lp->ncols * 2) + temploc = lp->tempbuf; + } + + if (++lp->generation > batchcount) + initlife(win); + + /* + * generate a randomized shooter aimed roughly toward the center of the + * screen after timeout. + */ + + if (seconds() - lp->shooterTime > TIMEOUT) + shooter(win); +} diff --git a/life3d.c b/life3d.c new file mode 100644 index 00000000..25cab46b --- /dev/null +++ b/life3d.c @@ -0,0 +1,1032 @@ +#ifndef lint +static char sccsid[] = "@(#)life3d.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * life3d.c - Extension to Conway's game of Life, Carter Bays' 4555 3d life, + * for xlock, the X Window System lockscreen. + * + * Copyright (c) 1994 by David Bagley. + * + * See xlock.c for copying information. + * + * Revision History: + * 12-Feb-95: shooting gliders added + * 07-Dec-94: used life.c and a DOS version of 3dlife + * Copyright 1993 Anthony Wesley awesley@canb.auug.org.au found at + * life.anu.edu.au /pub/complex_systems/alife/3DLIFE.ZIP + * There is some flashing that was not in the original. This is because + * the direct video memory access garbage collection was not portable. + * + * + * References: + * Dewdney, A.K., "The Armchair Universe, Computer Recreations from the + * Pages of Scientific American Magazine", W.H. Freedman and Company, + * New York, 1988 + * Bays, Carter, "The Game of Three Dimensional Life", 86/11/20 + * with (latest?) update from 87/2/1 + */ + +#include +#include "xlock.h" + +#define ON 0x40 +#define OFF 0 + +/* Don't change these numbers without changing the offset() macro below! */ +#define MAXSTACKS 64 +#define MAXROWS 128 +#define MAXCOLUMNS 128 +#define BASESIZE ((MAXCOLUMNS*MAXROWS*MAXSTACKS)>>6) + +#define RT_ANGLE 90 +#define HALFRT_ANGLE 45 +/* Store state of cell in top bit. Reserve low bits for count of living nbrs */ +#define Set3D(x,y,z) SetMem(x,y,z,ON) +#define Reset3D(x,y,z) SetMem(x,y,z,OFF) + +#define SetList3D(x,y,z) SetMem(x,y,z,ON),AddToList(x,y,z) + +#define CellState3D(c) ((c)&ON) +#define CellNbrs3D(c) ((c)&0x1f) /* 26 <= 31 */ + +#define EyeToScreen 72.0 /* distance from eye to screen */ +#define HalfScreenD 14.0 /* 1/2 the diameter of screen */ +#define BUCKETSIZE 10 +#define NBUCKETS ((MAXCOLUMNS+MAXROWS+MAXSTACKS)*BUCKETSIZE) +#define Distance(x1,y1,z1,x2,y2,z2) sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2)) + +#define IP 0.0174533 + +#define MAXCOLORS 64 +#define COLORBASE 3 +#define COLORS (COLORBASE + 2) +#define COLORSTEP (MAXCOLORS/COLORBASE) /* 33 different colors per side */ + +#define BLACK 0 +#define RED 1 +#define GREEN 2 +#define BLUE 3 +#define WHITE 4 +#define TIMEOUT 25 +#define NUMPTS 42 + +typedef struct _CellList { + unsigned char x, y, z; /* Location in world coordinates */ + char visible; /* 1 if the cube is to be displayed */ + short dist; /* dist from cell to eye */ + struct _CellList *next; /* pointer to next entry on linked list */ + struct _CellList *prev; + struct _CellList *priority; +} CellList; + +typedef struct { + int initialized; + int wireframe; /* FALSE */ + int ox, oy, oz; /* origin */ + double vx, vy, vz; /* viewpoint */ + int generation; + long shooterTime; + int nstacks, nrows, ncolumns; + int memstart; + char visible; + unsigned char *base[BASESIZE]; + double A, B, C, F; + int width, height; + long int color[COLORS]; + int alt, azm; + double dist; + int living_min, living_max, newcell_min, newcell_max; + CellList *ptrhead, *ptrend, eraserhead, eraserend; + CellList *buckethead[NBUCKETS], *bucketend[NBUCKETS]; /* comfortable upper b*/ + } life3dstruct; + +static life3dstruct life3ds[MAXSCREENS]; + +static int DrawCube(); + +static int patterns[][3 * NUMPTS + 1] = { +#if 0 +/* Still life */ + { /* V */ + -1, -1, -1, 0, -1, -1, + -1, 0, -1, 0, 0, -1, + + -1, -1, 0, 0, -1, 0, + 127 + }, + { /* CROSS */ + 0, 0, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + 0, 0, 1, + 127 + }, + { /* PILLAR */ + 0, -1, -1, + -1, 0, -1, 1, 0, -1, + 0, 1, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + 127 + }, +#endif + { /* BLINKER */ + 0, 0, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, 0, 1, 1, 0, 1, + 127 + }, + { /* DOUBLEBLINKER */ + 0, -1, -1, + 0, 1, -1, + + 0, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, 0, 1, 1, 0, 1, + 127 + }, + { /* TRIPLEBLINKER */ + -1, -1, -2, + -1, 0, -2, + + -2, -1, -1, + 1, 0, -1, + -1, 1, -1, 0, 1, -1, + + -1, -2, 0, 0, -2, 0, + -2, -1, 0, 1, 0, 0, + + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* THREEHALFSBLINKER */ + 0, -1, -1, + -1, 0, -1, 1, 0, -1, + + -1, -1, 0, + 1, 0, 0, + -1, 1, 0, 0, 1, 0, + + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* PUFFER */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + 127 + }, + { /* PINWHEEL */ + -1, 1, -1, 0, 1, -1, + + -1, -1, 0, 0, -1, 0, + -2, 0, 0, 1, 0, 0, + + -1, 0, 1, 0, 0, 1, + -1, 1, 1, 0, 1, 1, + 127 + }, + { /* HEART */ + -1, -1, -1, + -1, 0, -1, 0, 0, -1, + + 0, -1, 0, + -2, 0, 0, 1, 0, 0, + + -1, -1, 1, + -1, 1, 1, 0, 1, 1, + 127 + }, + { /* ARROW */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + 1, -1, 0, + 1, 0, 0, + 0, 1, 0, + + -1, -1, 1, + -1, 0, 1, + 127 + }, + { /* ROTOR */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* BRONCO */ + 0, -1, -1, + 0, 0, -1, + + 0, -2, 0, + -1, -1, 0, 1, -1, 0, + -1, 0, 0, 1, 0, 0, + 0, 1, 0, + + -1, -1, 1, + -1, 0, 1, + 127 + }, + { /* TRIPUMP */ + 0, -2, -2, + -2, -1, -2, -1, -1, -2, 0, -1, -2, + + 0, -2, -1, + -2, 0, -1, + -2, 1, -1, -1, 1, -1, + + 1, -2, 0, + 1, -1, 0, + 1, 0, 0, + -1, 1, 0, + + 0, 0, 1, 1, 0, 1, + -1, 1, 1, + 127 + }, + { /* WINDSHIELDWIPER (HELICOPTER) */ + -2, -1, -2, -1, -1, -2, + 0, 0, -2, + + -1, -2, -1, + -2, -1, -1, + 1, 0, -1, + -1, 1, -1, 0, 1, -1, 1, 1, -1, + + 0, -2, 0, + -2, -1, 0, 1, -1, 0, + + 0, -2, 1, + 0, -1, 1, + 0, 0, 1, + 127 + }, + { /* WALTZER */ + -2, -1, -1, -1, -1, -1, 0, -1, -1, + -2, 0, -1, + -1, 1, -1, 0, 1, -1, + + -2, -1, 0, + -2, 0, 0, 1, 0, 0, + 1, 1, 0, + + -1, 0, 1, 0, 0, 1, + 0, 1, 1, + 127 + }, + { /* BIGWALTZER */ + 0, -1, -1, 1, -1, -1, + -1, 0, -1, 0, 0, -1, + -1, 1, -1, + + 0, -2, 0, 1, -2, 0, + -2, 0, 0, + -2, 1, 0, + + 0, -1, 1, 1, -1, 1, + -1, 0, 1, 0, 0, 1, + -1, 1, 1, + 127 + } +}; + +#define NPATS (sizeof patterns / sizeof patterns[0]) + +/*--- list ---*/ +/* initialise the state of all cells to OFF */ +static void Init3D() +{ + life3dstruct *lp = &life3ds[screen]; + + lp->ptrhead = lp->ptrend = NULL; + lp->eraserhead.next = &lp->eraserend; + lp->eraserend.prev = &lp->eraserhead; +} + +static CellList* NewCell() +{ + return ((CellList *)malloc(sizeof(CellList))); +} + +/* Function that adds the cell (assumed live) at (x,y,z) onto the search + * list so that it is scanned in future generations + */ +static void AddToList(x,y,z) +unsigned int x, y, z; +{ + life3dstruct *lp = &life3ds[screen]; + CellList *tmp; + + tmp = NewCell(); + tmp->x = x; tmp->y = y; tmp->z = z; + if (lp->ptrhead == NULL) { + lp->ptrhead = lp->ptrend = tmp; + tmp->prev = NULL; + } else { + lp->ptrend->next = tmp; + tmp->prev = lp->ptrend; + lp->ptrend = tmp; + } + lp->ptrend->next = NULL; +} + +static void AddToEraseList(cell) +CellList *cell; +{ + life3dstruct *lp = &life3ds[screen]; + + cell->next = &lp->eraserend; + cell->prev = lp->eraserend.prev; + lp->eraserend.prev->next = cell; + lp->eraserend.prev = cell; +} + +static void DelFromList(cell) +CellList *cell; +{ + life3dstruct *lp = &life3ds[screen]; + + if (cell != lp->ptrhead) + cell->prev->next = cell->next; + else { + lp->ptrhead = cell->next; + if (lp->ptrhead != NULL) + lp->ptrhead->prev=NULL; + } + + if (cell != lp->ptrend) + cell->next->prev = cell->prev; + else { + lp->ptrend = cell->prev; + if (lp->ptrend != NULL) + lp->ptrend->next = NULL; + } + + AddToEraseList(cell); +} + +static void DelFromEraseList(cell) +CellList *cell; +{ + cell->next->prev = cell->prev; + cell->prev->next = cell->next; + free(cell); +} + +/*--- memory ---*/ +/* Simulate a large array by dynamically allocating 4x4x4 size cells when + * needed. + */ + +static void MemInit() +{ + life3dstruct *lp = &life3ds[screen]; + int i; + + for (i = 0; i < BASESIZE; ++i) + lp->base[i] = NULL; + lp->memstart = 0; +} + +static void BaseOffset(x, y, z, b, o) +unsigned int x, y, z; +int *b, *o; +{ + life3dstruct *lp = &life3ds[screen]; + int i; + + *b = ((x & 0x7c) << 7) + ((y & 0x7c) << 2) + ((z & 0x7c) >> 2); + *o = (x & 3) + ((y & 3) << 2) + ((z & 3) << 4); + + if (lp->base[*b] == NULL) { + lp->base[*b] = (unsigned char *)malloc(sizeof(unsigned char) * 64); + for(i = 0; i < 64; ++i) + lp->base[*b][i] = 0; + } +} + +static int GetMem(x, y, z) +unsigned int x, y, z; +{ + life3dstruct *lp = &life3ds[screen]; + int b, o; + + if (lp->memstart) + MemInit(); + BaseOffset(x, y, z, &b, &o); + return lp->base[b][o]; +} + +static void SetMem(x, y, z, val) +unsigned int x, y, z, val; +{ + life3dstruct *lp = &life3ds[screen]; + int b, o; + + if (lp->memstart) + MemInit(); + + BaseOffset(x, y, z, &b, &o); + lp->base[b][o] = val; +} + +static void ChangeMem(x, y, z, val) +unsigned int x, y, z, val; +{ + life3dstruct *lp = &life3ds[screen]; + int b, o; + + if (lp->memstart) + MemInit(); + BaseOffset(x, y, z, &b, &o); + lp->base[b][o] += val; +} + +static void ClearMem() +{ + life3dstruct *lp = &life3ds[screen]; + int i, j, count; + + for (i = 0; i < BASESIZE; ++i) + if (lp->base[i] != NULL) { + for (count = j = 0; j < 64 && count == 0; ++j) + if (CellState3D(lp->base[i][j])) + ++count; + if (!count) { + free(lp->base[i]); + lp->base[i] = NULL; + } + } +} + + +/* This routine increments the values stored in the 27 cells centred on (x,y,z) + * Note that the offset() macro implements wrapping - the world is a torus. + */ +static void IncrementNbrs3D(cell) +CellList *cell; +{ + int xc, yc, zc, x, y, z; + + xc = cell->x; yc = cell->y; zc = cell->z; + for (z = zc - 1; z != zc + 2; ++z) + for (y = yc - 1; y != yc + 2; ++y) + for (x = xc - 1; x != xc + 2; ++x) + if (x != xc || y != yc || z != zc) + ChangeMem(x, y, z, 1); +} + +static void End3D() +{ + life3dstruct *lp = &life3ds[screen]; + CellList *ptr; + + while (lp->ptrhead != NULL) { + SetMem(lp->ptrhead->x, lp->ptrhead->y, lp->ptrhead->z, OFF); + DelFromList(lp->ptrhead); + } + ptr = lp->eraserhead.next; + while (ptr != &lp->eraserend) { + DelFromEraseList(ptr); + ptr = lp->eraserhead.next; + } +} + +static void RunLife3D() +{ + life3dstruct *lp = &life3ds[screen]; + unsigned int x, y, z, xc, yc, zc; + int c; + CellList *ptr, *ptrnextcell; + + /* Step 1 - Add 1 to all neighbours of living cells. */ + ptr = lp->ptrhead; + while (ptr != NULL) { + IncrementNbrs3D(ptr); + ptr=ptr->next; + } + + /* Step 2 - Scan world and implement Survival rules. We have a list of live + * cells, so do the following: + * Start at the END of the list and work backwards (so we don't have to worry + * about scanning newly created cells since they are appended to the end) and + * for every entry, scan its neighbours for new live cells. If found, add them + * to the end of the list. If the centre cell is dead, unlink it. + * Make sure we do not append multiple copies of cells. + */ + ptr=lp->ptrend; + while (ptr != NULL) { + ptrnextcell = ptr->prev; + xc = ptr->x; yc = ptr->y; zc = ptr->z; + for (z = zc - 1; z != zc + 2; ++z) + for (y = yc - 1; y != yc + 2; ++y) + for (x = xc - 1; x != xc + 2; ++x) + if (x != xc || y != yc || z != zc) + if ((c = GetMem(x, y, z))) { + if (CellState3D(c) == OFF) { + if (CellNbrs3D(c) >= lp->newcell_min && + CellNbrs3D(c) <= lp->newcell_max) + SetList3D(x, y, z); + else + Reset3D(x, y, z); + } + } + c = GetMem(xc, yc, zc); + if (CellNbrs3D(c) < lp->living_min || CellNbrs3D(c) > lp->living_max) { + SetMem(ptr->x, ptr->y, ptr->z, OFF); + DelFromList(ptr); + } else + Set3D(xc, yc, zc); + ptr = ptrnextcell; + } + ClearMem(); +} + +#ifdef DEBUG +static int CountCells3D() +{ + life3dstruct *lp = &life3ds[screen]; + CellList *ptr; + int count = 0; + + ptr = lp->ptrhead; + while(ptr != NULL) { + ++count; + ptr = ptr->next; + } + return count; +} + +void DisplayList() +{ + life3dstruct *lp = &life3ds[screen]; + CellList *ptr; + int count = 0; + + ptr=lp->ptrhead; + while (ptr != NULL) { + (void) printf("(%x)=[%d,%d,%d] ", (int)ptr, ptr->x, ptr->y, ptr->z); + ptr = ptr->next; + ++count; + } + (void) printf("Living cells = %d\n", count); +} +#endif + +static void RandomSoup(n, v) +int n, v; +{ + life3dstruct *lp = &life3ds[screen]; + unsigned int x, y, z; + + v /= 2; + if (v < 1) + v = 1; + for (z = lp->nstacks / 2 - v; z < lp->nstacks / 2 + v; ++z) + for (y = lp->nrows / 2 - v; y < lp->nrows / 2 + v; ++y) + for (x = lp->ncolumns / 2 - v; x < lp->ncolumns / 2 + v; ++x) + if ((RAND() % 100) < n) + SetList3D(x, y, z); +} + +static void GetPattern(i) +int i; +{ + life3dstruct *lp = &life3ds[screen]; + int x, y, z; + int *patptr; + + patptr = &patterns[i][0]; + while ((x = *patptr++) != 127) { + y = *patptr++; + z = *patptr++; + x += lp->ncolumns / 2; + y += lp->nrows / 2; + z += lp->nstacks / 2; + if (x >= 0 && y >= 0 && z >= 0 && + x < lp->ncolumns && y < lp->nrows && z < lp->nstacks) + SetList3D(x, y, z); + } +} + +static void NewViewpoint(x, y, z) +double x, y, z; +{ + life3dstruct *lp = &life3ds[screen]; + double k, l, d1, d2; + + k = x * x + y * y; + l = sqrt(k + z * z); + k = sqrt(k); + d1 = (EyeToScreen / HalfScreenD); + d2 = EyeToScreen / (HalfScreenD * lp->height / lp->width); + lp->A = d1 * l * (lp->width / 2) / k; + lp->B = l * l; + lp->C = d2 * (lp->height / 2) / k; + lp->F = k * k; +} + +static void NewPoint(x, y, z, cubepts) +double x, y, z; +register XPoint *cubepts; +{ + life3dstruct *lp = &life3ds[screen]; + double p1, E; + + p1 = x * lp->vx + y * lp->vy; + E = lp->B - p1 - z * lp->vz; + cubepts->x = (int)(lp->width / 2 - lp->A * (lp->vx * y - lp->vy * x) / E); + cubepts->y = (int)(lp->height / 2 - lp->C * (z * lp->F - lp->vz * p1) / E); +} + + +/* Chain together all cells that are at the same distance. These + * cannot mutually overlap. + */ +static void SortList() +{ + life3dstruct *lp = &life3ds[screen]; + short dist; + double d, x, y, z, rsize; + int i, r; + XPoint point; + CellList *ptr; + + for (i = 0; i < NBUCKETS; ++i) + lp->buckethead[i] = lp->bucketend[i] = NULL; + + /* Calculate distances and re-arrange pointers to chain off buckets */ + ptr = lp->ptrhead; + while (ptr != NULL) { + + x = (double) ptr->x - lp->ox; + y = (double) ptr->y - lp->oy; + z = (double) ptr->z - lp->oz; + d = Distance(lp->vx, lp->vy, lp->vz, x, y, z); + if (lp->vx * (lp->vx - x) + lp->vy * (lp->vy - y) + + lp->vz * (lp->vz - z) > 0 && d > 1.5) + ptr->visible = 1; + else + ptr->visible = 0; + + ptr->dist = (short)d; + dist = (short)(d * BUCKETSIZE); + if (dist > NBUCKETS - 1) + dist = NBUCKETS - 1; + + if (lp->buckethead[dist] == NULL) { + lp->buckethead[dist] = lp->bucketend[dist] = ptr; + ptr->priority = NULL; + } else { + lp->bucketend[dist]->priority = ptr; + lp->bucketend[dist] = ptr; + lp->bucketend[dist]->priority = NULL; + } + ptr = ptr->next; + } + + /* Check for invisibility */ + rsize = 0.47 * lp->width / ((double)HalfScreenD * 2); + i = lp->azm; + if (i < 0) + i = -i; + i = i % RT_ANGLE; + if (i > HALFRT_ANGLE) + i = RT_ANGLE - i; + rsize /= cos(i * IP); + + lp->visible = 0; + for(i = 0; i < NBUCKETS; ++i) + if (lp->buckethead[i] != NULL) { + ptr = lp->buckethead[i]; + while (ptr != NULL) { + if (ptr->visible) { + x = (double) ptr->x - lp->ox; + y = (double) ptr->y - lp->oy; + z = (double) ptr->z - lp->oz; + NewPoint(x, y, z, &point); + + r = (int)(rsize * (double)EyeToScreen / (double)ptr->dist); + if (point.x + r >= 0 && point.y + r >= 0 && + point.x - r < lp->width && point.y - r < lp->height) + lp->visible = 1; + } + ptr = ptr->priority; + } + } +} + +static void DrawFace(win, color, cubepts, p1, p2, p3, p4) +Window win; +int color; +XPoint cubepts[]; +int p1, p2, p3, p4; +{ + life3dstruct *lp = &life3ds[screen]; + XPoint facepts[5]; + + facepts[0] = cubepts[p1]; + facepts[1] = cubepts[p2]; + facepts[2] = cubepts[p3]; + facepts[3] = cubepts[p4]; + facepts[4] = cubepts[p1]; + + if (!lp->wireframe) { + XSetForeground(dsp, Scr[screen].gc, lp->color[color]); + XFillPolygon(dsp, win, Scr[screen].gc, facepts, 4, Convex, CoordModeOrigin); + } + if (color == BLACK || ((mono || Scr[screen].npixels <= 2) && !lp->wireframe)) + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + XDrawLines(dsp, win, Scr[screen].gc, facepts, 5, CoordModeOrigin); +} + +#define LEN 0.45 +#define LEN2 0.9 + +static int DrawCube(win, cell) +Window win; +CellList *cell; +{ + life3dstruct *lp = &life3ds[screen]; + XPoint cubepts[8]; /* screen coords for point */ + int i = 0, out; + unsigned int mask; + double x, y, z; + double dx, dy, dz; + + x = (double) cell->x - lp->ox; + y = (double) cell->y - lp->oy; + z = (double) cell->z - lp->oz; + out = 0; + for(dz = z - LEN; dz <= z + LEN2; dz += LEN2) + for(dy = y - LEN; dy <= y + LEN2; dy += LEN2) + for(dx = x - LEN; dx <= x + LEN2; dx += LEN2) { + NewPoint(dx, dy, dz, &cubepts[i]); + if (cubepts[i].x < 0 || cubepts[i].x >= lp->width || + cubepts[i].y < 0 || cubepts[i].y >= lp->height) + ++out; + ++i; + } + if (out == 8) + return(0); + + if (cell->visible) + mask = 0xFFFF; + else + mask = 0x0; + + /* Only draw those faces that are visible */ + dx = lp->vx - x; dy = lp->vy - y; dz = lp->vz - z; + if (dz > LEN) + DrawFace(win, BLUE & mask, cubepts, 4, 5, 7, 6); + else if (dz < -LEN) + DrawFace(win, BLUE & mask, cubepts, 0, 1, 3, 2); + if (dx > LEN) + DrawFace(win, GREEN & mask, cubepts, 1, 3, 7, 5); + else if (dx < -LEN) + DrawFace(win, GREEN & mask, cubepts, 0, 2, 6, 4); + if (dy > LEN) + DrawFace(win, RED & mask, cubepts, 2, 3, 7, 6); + else if (dy < -LEN) + DrawFace(win, RED & mask, cubepts, 0, 1, 5, 4); + return(1); +} + +static void DrawScreen(win) +Window win; +{ + life3dstruct *lp = &life3ds[screen]; + CellList *ptr; + CellList *eraserptr; + int i; +#ifdef DEBUG + int count = 0, v = 0; +#endif + + SortList(); + + /* Erase dead cubes */ + eraserptr = lp->eraserhead.next; + while (eraserptr != &lp->eraserend) { + eraserptr->visible = 0; + (void) DrawCube(win, eraserptr); + DelFromEraseList(eraserptr); + eraserptr = lp->eraserhead.next; + } + + /* draw furthest cubes first */ + for (i = NBUCKETS - 1; i >= 0; --i) { + ptr = lp->buckethead[i]; + while (ptr != NULL) { + /*if (ptr->visible)*/ + /* v += */(void) DrawCube(win, ptr); + ptr = ptr->priority; + /* ++count; */ + } + } +#ifdef DEBUG + (void) printf("Pop=%-4d Viewpoint (%3d,%3d,%3d) Origin (%3d,%3d,%3d) Mode %dx%d\ +(%d,%d) %d\n", + count, (int)(lp->vx + lp->ox), (int)(lp->vy + lp->oy), + (int)(lp->vz + lp->oz), (int)lp->ox,(int)lp->oy,(int)lp->oz, + lp->width, lp->height, lp->alt, lp->azm, v); +#endif +} + +void initlife3d(win) +Window win; +{ + XWindowAttributes xgwa; + life3dstruct *lp = &life3ds[screen]; + int i; + + lp->generation = 0; + lp->shooterTime = seconds(); + + if (!lp->initialized) { + /* 4555 life + (5766 life is good too (has lifeforms and a glider similar to life) + also 5655 and 6767 are interesting) */ + lp->living_min = 4; + lp->living_max = 5; + lp->newcell_min = 5; + lp->newcell_max = 5; + lp->dist = 50.0/*30.0*/; + lp->alt = 20 /*30*/; + lp->azm = 10 /*30*/; + lp->ncolumns = MAXCOLUMNS; + lp->nrows = MAXROWS; + lp->nstacks = MAXSTACKS; + lp->ox = lp->ncolumns / 2; + lp->oy = lp->nrows / 2; + lp->oz = lp->nstacks / 2; + lp->wireframe = 0; + lp->initialized = 1; + Init3D(); + } else + End3D(); + (void) XGetWindowAttributes(dsp, win, &xgwa); + lp->color[0] = BlackPixel(dsp, screen); + if (!mono && Scr[screen].npixels > 2) { + i = RAND() % 3; + + lp->color[i + 1] = Scr[screen].pixels[RAND() % + (Scr[screen].npixels / COLORBASE)]; + lp->color[(i + 1) % 3 + 1] = Scr[screen].pixels[RAND() % + (Scr[screen].npixels / COLORBASE) + Scr[screen].npixels / COLORBASE]; + lp->color[(i + 2) % 3 + 1] = Scr[screen].pixels[RAND() % + (Scr[screen].npixels / COLORBASE) + 2 * Scr[screen].npixels / COLORBASE]; + } else + lp->color[1] = lp->color[2] = lp->color[3] = WhitePixel(dsp, screen); + lp->color[4] = WhitePixel(dsp, screen); + lp->width = xgwa.width; + lp->height = xgwa.height; + lp->memstart = 1; + /*lp->tablesMade = 0;*/ + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, lp->width, lp->height); + + if (lp->alt > 89) + lp->alt = 89; + else if (lp->alt < -89) + lp->alt = -89; + /* Calculate viewpoint */ + lp->vx = (sin(lp->azm * IP) * cos(lp->alt * IP) * lp->dist); + lp->vy = (cos(lp->azm * IP) * cos(lp->alt * IP) * lp->dist); + lp->vz = (sin(lp->alt * IP) * lp->dist); + NewViewpoint(lp->vx, lp->vy, lp->vz); + + i = RAND() % (NPATS + 2); + if (i >= NPATS) + RandomSoup(30, 10); + else + GetPattern(i); + + DrawScreen(win); +} + +static void shooter() +{ + int hsp, vsp, asp, hoff = 1, voff = 1, aoff = 1, r, c2, r2, s2; + life3dstruct *lp = &life3ds[screen]; + + /* Generate the glider at the edge of the screen */ +#define V 10 +#define V2 (V/2) + c2 = lp->ncolumns / 2; + r2 = lp->nrows / 2; + s2 = lp->nstacks / 2; + r = RAND() % 3; + if (!r) { + hsp = RAND() % V2 + c2 - V2 / 2; + vsp = (RAND() % 2) ? r2 - V : r2 + V; + asp = (RAND() % 2) ? s2 - V : s2 + V; + if (asp > s2) + aoff = -1; + if (vsp > r2) + voff = -1; + if (hsp > c2) + hoff = -1; + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 3 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 3 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 1 * voff, asp + 1 * aoff); + } else if (r == 1) { + hsp = (RAND() % 2) ? c2 - V : c2 + V; + vsp = (RAND() % 2) ? r2 - V : r2 + V; + asp = RAND() % V2 + s2 - V2 / 2; + if (asp > s2) + aoff = -1; + if (vsp > r2) + voff = -1; + if (hsp > c2) + hoff = -1; + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 2 * hoff, vsp + 0 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 3 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 0 * voff, asp + 3 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 2 * aoff); + } else { + hsp = (RAND() % 2) ? c2 - V : c2 + V; + vsp = RAND() % V2 + r2 - V2 / 2; + asp = (RAND() % 2) ? s2 - V : s2 + V; + if (asp > s2) + aoff = -1; + if (vsp > r2) + voff = -1; + if (hsp > c2) + hoff = -1; + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 0 * voff, asp + 1 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 1 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 2 * voff, asp + 2 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 3 * voff, asp + 0 * aoff); + SetList3D(hsp + 0 * hoff, vsp + 3 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 1 * voff, asp + 1 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 0 * aoff); + SetList3D(hsp + 1 * hoff, vsp + 2 * voff, asp + 1 * aoff); + } + lp->shooterTime = seconds(); +} + +void drawlife3d(win) +Window win; +{ + life3dstruct *lp = &life3ds[screen]; + + RunLife3D(); + DrawScreen(win); + + if (++lp->generation > batchcount || !lp->visible) + /*CountCells3D() == 0)*/ + initlife3d(win); + + /* + * generate a randomized shooter aimed roughly toward the center of the + * screen after timeout. + */ + + if (seconds() - lp->shooterTime > TIMEOUT) + shooter(); +} diff --git a/logout.c b/logout.c new file mode 100644 index 00000000..e7747721 --- /dev/null +++ b/logout.c @@ -0,0 +1,201 @@ +#ifndef lint +static char sccsid[] = "@(#)logout.c 2.7 95/02/21 xlockmore"; +#endif +/* + * logout.c - handle logout from xlock + * + * See xlock.c for copying information. + * + * Revision History: + * 13-Feb-95: Heath A. Kehoe . + * Mostly taken from bomb.c + * 1994: bomb.c written. Copyright (c) 1994 Dave Shield + * Liverpool Computer Science + */ +#include +#include +#ifdef SYSLOG +#include +#endif +#include +#include "xlock.h" + +/* + * This file contains a function called logoutUser() that, when called, + * will (try) to log out the user. + * + * A portable way to do this is to simply kill all of the user's processes, + * but this is a really ugly way to do it (it kills background jobs that + * users may want to remain running after they log out). + * + * If your system provides for a cleaner/easier way to log out a user, + * you may implement it here. + * + * For example, on some systems, one may define for the users an environment + * variable named XSESSION that contains the pid of the X session leader + * process. So, to log the user out, we just need to kill that process, + * and the X session will end. Of course, a user can defeat that by + * changing the value of XSESSION; so we can fall back on the ugly_logout() + * method. + * + * If you can't log the user out (and you don't want to use the brute + * force method) simply return from logoutUser(), and xlock will continue + * on it's merry way (only applies if AUTO_LOGOUT or LOGOUT_BUTTON is + * defined.) + */ + +#define NAP_TIME 5 /* Sleep between shutdown attempts */ + +/* Seems to hang on Solaris, logs out but does not return login prompt */ +void ugly_logout() +{ + +#ifndef KILL_ALL_OTHERS +#define KILL_ALL_OTHERS -1 + (void) signal(SIGHUP, SIG_IGN); + (void) signal(SIGTERM, SIG_IGN); +#endif + + (void) kill( KILL_ALL_OTHERS, SIGHUP ); + (void) sleep(NAP_TIME); + (void) kill( KILL_ALL_OTHERS, SIGTERM ); + (void) sleep(NAP_TIME); + +#ifdef SYSLOG + syslog(LOG_NOTICE, "xlock failed to exit - sending kill (uid %d)\n", + getuid()); +#endif + + (void) kill( KILL_ALL_OTHERS, SIGKILL ); + (void) sleep(NAP_TIME); + +#ifdef SYSLOG + syslog(LOG_WARNING, "xlock still won't exit - suicide (uid %d)\n", + getuid()); +#endif + + (void) kill(getpid(), SIGKILL); + exit(-1); + +} + +/* Decide which routine you want with a 1 or 0 */ +#if 1 + +void logoutUser() +{ + +#ifdef SYSLOG + syslog(LOG_INFO, "xlock expired. closing down (uid %d) on %s\n", + getuid(), getenv("DISPLAY")); +#endif + + ugly_logout(); +} + +#else + +/* sample logoutUser (described above) */ + +void logoutUser() +{ + char *pidstr; + int pid; + +#ifdef SYSLOG + syslog(LOG_INFO, "xlock expired. closing down (uid %d) on %s\n", + getuid(), getenv("DISPLAY")); +#endif + + pidstr = getenv("XSESSION"); + if(pidstr) { + pid = atoi(pidstr); + kill(pid, SIGTERM); + sleep(5); + } +/* ugly_logout(); */ + (void) sleep(1); +} + +#endif + + + /* + * Determine whether to "fully" lock the terminal, or + * whether the time-limited version should be imposed. + * + * Policy: + * Members of staff can fully lock + * (hard-wired user/group names + file read at run time) + * Students (i.e. everyone else) + * are forced to use the time-limit version. + * + * An alternative policy could be based on display location + */ +#define FULL_LOCK 1 +#define TEMP_LOCK 0 + +#ifndef STAFF_FILE +#define STAFF_FILE "/usr/remote/etc/xlock.staff" +#endif + +char *staff_users[] = { /* List of users allowed to lock */ +"root", +0 +}; + +char *staff_groups[] = { /* List of groups allowed to lock */ +0 +}; + +#undef passwd +#undef pw_name +#undef getpwnam +#undef getpwuid +#include +#include + +int full_lock() +{ + uid_t uid; + gid_t gid; + + struct passwd *pwp; + struct group *gp; + FILE *fp; + + char **cpp; + char buf[BUFSIZ]; + + if ((uid = getuid()) == 0) + return(FULL_LOCK); /* root */ + pwp=getpwuid(uid); + + gid=getgid(); + gp=getgrgid( gid ); + + if (inwindow || inroot || nolock) + return(FULL_LOCK); /* (mostly) harmless user */ + + for ( cpp = staff_users ; *cpp != NULL ; cpp++ ) + if (!strcmp(*cpp, pwp->pw_name)) + return(FULL_LOCK); /* Staff user */ + + for ( cpp = staff_groups ; *cpp != NULL ; cpp++ ) + if (!strcmp(*cpp, gp->gr_name)) + return(FULL_LOCK); /* Staff group */ + + if ((fp=fopen( STAFF_FILE, "r")) == NULL ) + return(TEMP_LOCK); + + while ((fgets( buf, BUFSIZ, fp )) != NULL ) { + char *cp; + + if ((cp = (char *) strchr(buf, '\n')) != NULL ) + *cp = '\0'; + if (!strcmp(buf, pwp->pw_name) || !strcmp(buf, gp->gr_name)) + return(FULL_LOCK); /* Staff user or group */ + } + + return(TEMP_LOCK); +} diff --git a/make.com b/make.com new file mode 100644 index 00000000..a7287841 --- /dev/null +++ b/make.com @@ -0,0 +1,66 @@ +$ set verify +$ if p1.eqs."DEBUG" .or. p2.eqs."DEBUG" +$ then +$ cc=="CC/DEB/NOOPT" +$ link=="LINK/DEB" +$ endif +$ if p1.nes."LINK" +$ then +$ define sys sys$library +$! +$ set verify +$ copy [.bitmap]maze-x11.xbm maze.xbm +$ copy [.bitmap]life-x11.xbm life.xbm +$ copy [.bitmap]image-x11.xbm image.xbm +$ cc/noopt xlock.c +$ cc resource.c +$ cc usleep.c +$ cc hsbramp.c +$ cc logout.c +$ cc hopalong.c +$ cc qix.c +$ cc life.c +$ cc swarm.c +$ cc rotor.c +$ cc pyro.c +$ cc flame.c +$ cc worm.c +$ cc spline.c +$ cc maze.c +$ cc sphere.c +$ cc hyper.c +$ cc helix.c +$ cc rock.c +$ cc blot.c +$ cc grav.c +$ cc bounce.c +$ cc world.c +$ cc rect.c +$ cc bat.c +$ cc galaxy.c +$ cc kaleid.c +$ cc wator.c +$ cc life3d.c +$ cc swirl.c +$ cc image.c +$ cc bomb.c +$ cc blank.c +$ set noverify +$ endif +$! +$ set verify +$ link/map xlock,hsbramp,resource,usleep,- + hopalong,qix,life,- + swarm,rotor,pyro,flame,worm,- + spline,maze,sphere,hyper,- + helix,rock,blot,- + grav,bounce,world,rect,bat,- + galaxy,kaleid,wator,life3d,- + swirl,image,bomb,blank,- + sys$library:vaxcrtl/lib,- + sys$library:ucx$ipc/lib,- + sys$input/opt +sys$share:decw$dxmlibshr/share +sys$share:decw$xlibshr/share +$ set noverify +$ exit diff --git a/maze.c b/maze.c new file mode 100644 index 00000000..3372449f --- /dev/null +++ b/maze.c @@ -0,0 +1,673 @@ +#ifndef lint +static char sccsid[] = "@(#)maze.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * maze.c - A maze for xlock, the X Window System lockscreen. + * + * Copyright (c) 1988 by Sun Microsystems + * + * See xlock.c for copying information. + * + * Revision History: + * 17-Jun-94: HP ANSI C compiler needs a type cast for gray_bits + * Richard Lloyd (R.K.Lloyd@csc.liv.ac.uk) + * 2-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 7-Mar-93: Good ideas from xscreensaver (Jamie Zawinski jwz@lucid.com) + * 6-Jun-85: Martin Weiss Sun Microsystems + */ + +/* original copyright + ****************************************************************************** + Copyright 1988 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the names of Sun or MIT not be + used in advertising or publicity pertaining to distribution of the + software without specific prior written permission. Sun and M.I.T. + make no representations about the suitability of this software for + any purpose. It is provided "as is" without any express or implied warranty. + + SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT + OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE + OR PERFORMANCE OF THIS SOFTWARE. + *****************************************************************************/ + +#include +#include "xlock.h" +#include +#include "maze.xbm" + +#define MIN_MAZE_SIZE 3 +#define MAX_SIZE 40 +#define MIN_SIZE 7 + +/* The following limits are adequate for displays up to 2048x2048 */ +#define MAX_MAZE_SIZE_X 300 +#define MAX_MAZE_SIZE_Y 300 + +#define MOVE_LIST_SIZE (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y) + +#define WALL_TOP 0x8000 +#define WALL_RIGHT 0x4000 +#define WALL_BOTTOM 0x2000 +#define WALL_LEFT 0x1000 + +#define DOOR_IN_TOP 0x800 +#define DOOR_IN_RIGHT 0x400 +#define DOOR_IN_BOTTOM 0x200 +#define DOOR_IN_LEFT 0x100 +#define DOOR_IN_ANY 0xF00 + +#define DOOR_OUT_TOP 0x80 +#define DOOR_OUT_RIGHT 0x40 +#define DOOR_OUT_BOTTOM 0x20 +#define DOOR_OUT_LEFT 0x10 + +#define START_SQUARE 0x2 +#define END_SQUARE 0x1 + +#define get_random(x) (RAND() % (x)) + +static XImage logo = { + 0, 0, /* width, height */ + 0, XYBitmap, 0, /* xoffset, format, data */ + LSBFirst, 8, /* byte-order, bitmap-unit */ + LSBFirst, 8, 1 /* bitmap-bit-order, bitmap-pad, depth */ +}; + +typedef struct { + u_char x; + u_char y; + u_char dir; + } paths; + +typedef struct { + int maze_size_x, maze_size_y, border_x, border_y; + int sqnum, cur_sq_x, cur_sq_y, path_length; + int start_x, start_y, start_dir, end_x, end_y, end_dir; + int logo_x, logo_y; + int width, height, counter; + int sq_size_x, sq_size_y, logo_size_x, logo_size_y; + GC gray_GC; + u_short maze[MAX_MAZE_SIZE_X][MAX_MAZE_SIZE_Y]; + paths move_list[MOVE_LIST_SIZE]; + paths save_path[MOVE_LIST_SIZE], path[MOVE_LIST_SIZE]; + int solving; + } mazestruct; + +static mazestruct mazes[MAXSCREENS]; + +static int choose_door(); +static int backup(); +static void draw_wall(); +static void draw_solid_square(); +static void enter_square(); + +void +initmaze(win) + Window win; +{ + XWindowAttributes xgwa; + Pixmap gray; + mazestruct *mp = &mazes[screen]; + + logo.data = (char *) maze_bits; + logo.width = maze_width; + logo.height = maze_height; + logo.bytes_per_line = (maze_width + 7) / 8; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + mp->width = xgwa.width; + mp->height = xgwa.height; + mp->gray_GC = XCreateGC(dsp, win, 0, 0); + gray = XCreateBitmapFromData(dsp, win, + (char *) gray1_bits, gray1_width, gray1_height); + XSetBackground(dsp, mp->gray_GC, BlackPixel(dsp, screen)); + XSetStipple(dsp, mp->gray_GC, gray); + XSetFillStyle(dsp, mp->gray_GC, FillOpaqueStippled); + mp->counter = 0; + mp->solving = 0; +} + + +static void +clear_window(win) /* blank the window */ + Window win; +{ + mazestruct *mp = &mazes[screen]; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, mp->width, mp->height); +} /* end of clear_window() */ + + +static void +set_maze_sizes() +{ + mazestruct *mp = &mazes[screen]; + /* batchcount is the upper bound on the size */ + if (batchcount > MAX_SIZE || batchcount <= MIN_SIZE) + batchcount = MAX_SIZE; + mp->sq_size_x = get_random(batchcount - MIN_SIZE) + MIN_SIZE; + /*mp->sq_size_x = batchcount;*//* 10 is a good size */ + mp->sq_size_y = mp->sq_size_x; + mp->logo_size_x = logo.width / mp->sq_size_x + 1; + mp->logo_size_y = logo.height / mp->sq_size_y + 1; + + mp->border_x = mp->border_y = 1; + mp->maze_size_x = ( mp->width - mp->border_x) / mp->sq_size_x; + mp->maze_size_y = ( mp->height - mp->border_y ) / mp->sq_size_y; + + if ( mp->maze_size_x < MIN_MAZE_SIZE || + mp->maze_size_y < MIN_MAZE_SIZE) { + mp->sq_size_y = mp->sq_size_x = 10; + mp->maze_size_x = ( mp->width - mp->border_x) / mp->sq_size_x; + mp->maze_size_y = ( mp->height - mp->border_y ) / mp->sq_size_y; + if ( mp->maze_size_x < MIN_MAZE_SIZE || + mp->maze_size_y < MIN_MAZE_SIZE) { + (void) fprintf(stderr, "maze too small, exitting\n"); + exit(1); + } + } + mp->border_x = (mp->width - mp->maze_size_x * mp->sq_size_x) / 2; + mp->border_y = (mp->height - mp->maze_size_y * mp->sq_size_y) / 2; +} /* end of set_maze_sizes */ + + +static void +initialize_maze() /* draw the surrounding wall and start/end squares */ +{ + mazestruct *mp = &mazes[screen]; + register int i, j, wall; + + if (Scr[screen].npixels == 2) { + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + XSetForeground(dsp, mp->gray_GC, WhitePixel(dsp, screen)); + } + if (Scr[screen].npixels > 2) { + i = RAND() % Scr[screen].npixels; + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[i]); + XSetForeground(dsp, mp->gray_GC, Scr[screen].pixels[i]); + } + /* initialize all squares */ + for ( i=0; imaze_size_x; i++) { + for ( j=0; jmaze_size_y; j++) { + mp->maze[i][j] = 0; + } + } + + /* top wall */ + for ( i=0; imaze_size_x; i++ ) { + mp->maze[i][0] |= WALL_TOP; + } + + /* right wall */ + for ( j=0; jmaze_size_y; j++ ) { + mp->maze[mp->maze_size_x-1][j] |= WALL_RIGHT; + } + + /* bottom wall */ + for ( i=0; imaze_size_x; i++ ) { + mp->maze[i][mp->maze_size_y-1] |= WALL_BOTTOM; + } + + /* left wall */ + for ( j=0; jmaze_size_y; j++ ) { + mp->maze[0][j] |= WALL_LEFT; + } + + /* set start square */ + wall = get_random(4); + switch (wall) { + case 0: + i = get_random(mp->maze_size_x); + j = 0; + break; + case 1: + i = mp->maze_size_x - 1; + j = get_random(mp->maze_size_y); + break; + case 2: + i = get_random(mp->maze_size_x); + j = mp->maze_size_y - 1; + break; + case 3: + i = 0; + j = get_random(mp->maze_size_y); + break; + } + mp->maze[i][j] |= START_SQUARE; + mp->maze[i][j] |= ( DOOR_IN_TOP >> wall ); + mp->maze[i][j] &= ~( WALL_TOP >> wall ); + mp->cur_sq_x = i; + mp->cur_sq_y = j; + mp->start_x = i; + mp->start_y = j; + mp->start_dir = wall; + mp->sqnum = 0; + + /* set end square */ + wall = (wall + 2)%4; + switch (wall) { + case 0: + i = get_random(mp->maze_size_x); + j = 0; + break; + case 1: + i = mp->maze_size_x - 1; + j = get_random(mp->maze_size_y); + break; + case 2: + i = get_random(mp->maze_size_x); + j = mp->maze_size_y - 1; + break; + case 3: + i = 0; + j = get_random(mp->maze_size_y); + break; + } + mp->maze[i][j] |= END_SQUARE; + mp->maze[i][j] |= ( DOOR_OUT_TOP >> wall ); + mp->maze[i][j] &= ~( WALL_TOP >> wall ); + mp->end_x = i; + mp->end_y = j; + mp->end_dir = wall; + + /* set logo */ + if ( (mp->maze_size_x > mp->logo_size_x + 6) && + (mp->maze_size_y > mp->logo_size_y + 6) ) { + mp->logo_x = get_random(mp->maze_size_x - mp->logo_size_x - 6) + 3; + mp->logo_y = get_random(mp->maze_size_y - mp->logo_size_y - 6) + 3; + + for (i=0; ilogo_size_x; i++) + for (j=0; jlogo_size_y; j++) + mp->maze[mp->logo_x + i][mp->logo_y + j] |= DOOR_IN_TOP; + } + else + mp->logo_y = mp->logo_x = -1; +} + + +static void +create_maze(win) /* create a maze layout given the intiialized maze */ + Window win; +{ + mazestruct *mp = &mazes[screen]; + register int i, newdoor; + + while (1) { + mp->move_list[mp->sqnum].x = mp->cur_sq_x; + mp->move_list[mp->sqnum].y = mp->cur_sq_y; + mp->move_list[mp->sqnum].dir = -1; + while ( ( newdoor = choose_door(win) ) == -1 ) /* pick a door */ + if ( backup() == -1 ) /* no more doors ... backup */ + return; /* done ... return */ + + /* mark the out door */ + mp->maze[mp->cur_sq_x][mp->cur_sq_y] |= ( DOOR_OUT_TOP >> newdoor ); + + switch (newdoor) { + case 0: mp->cur_sq_y--; + break; + case 1: mp->cur_sq_x++; + break; + case 2: mp->cur_sq_y++; + break; + case 3: mp->cur_sq_x--; + break; + } + mp->sqnum++; + + /* mark the in door */ + mp->maze[mp->cur_sq_x][mp->cur_sq_y] |= + ( DOOR_IN_TOP >> ((newdoor+2)%4) ); + + /* if end square set path length and save path */ + if ( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & END_SQUARE ) { + mp->path_length = mp->sqnum; + for ( i=0; ipath_length; i++) { + mp->save_path[i].x = mp->move_list[i].x; + mp->save_path[i].y = mp->move_list[i].y; + mp->save_path[i].dir = mp->move_list[i].dir; + } + } + + } + +} /* end of create_maze() */ + + +static int +choose_door(win) /* pick a new path */ + Window win; +{ + mazestruct *mp = &mazes[screen]; + int candidates[3]; + register int num_candidates; + + num_candidates = 0; + + /* top wall */ + if ((!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_IN_TOP )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_OUT_TOP )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & WALL_TOP ))) { + if ( mp->maze[mp->cur_sq_x][mp->cur_sq_y - 1] & DOOR_IN_ANY ) { + mp->maze[mp->cur_sq_x][mp->cur_sq_y] |= WALL_TOP; + mp->maze[mp->cur_sq_x][mp->cur_sq_y - 1] |= WALL_BOTTOM; + draw_wall(win, mp->cur_sq_x, mp->cur_sq_y, 0); + } else + candidates[num_candidates++] = 0; + } + + /* right wall */ + if ((!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_IN_RIGHT )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_OUT_RIGHT )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & WALL_RIGHT ))) { + if ( mp->maze[mp->cur_sq_x + 1][mp->cur_sq_y] & DOOR_IN_ANY ) { + mp->maze[mp->cur_sq_x][mp->cur_sq_y] |= WALL_RIGHT; + mp->maze[mp->cur_sq_x + 1][mp->cur_sq_y] |= WALL_LEFT; + draw_wall(win, mp->cur_sq_x, mp->cur_sq_y, 1); + } else + candidates[num_candidates++] = 1; + } + + /* bottom wall */ + if ((!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_IN_BOTTOM )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_OUT_BOTTOM )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & WALL_BOTTOM ))) { + if ( mp->maze[mp->cur_sq_x][mp->cur_sq_y + 1] & DOOR_IN_ANY ) { + mp->maze[mp->cur_sq_x][mp->cur_sq_y] |= WALL_BOTTOM; + mp->maze[mp->cur_sq_x][mp->cur_sq_y + 1] |= WALL_TOP; + draw_wall(win, mp->cur_sq_x, mp->cur_sq_y, 2); + } else + candidates[num_candidates++] = 2; + } + + /* left wall */ + if ((!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_IN_LEFT )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & DOOR_OUT_LEFT )) && + (!( mp->maze[mp->cur_sq_x][mp->cur_sq_y] & WALL_LEFT ))) { + if ( mp->maze[mp->cur_sq_x - 1][mp->cur_sq_y] & DOOR_IN_ANY ) { + mp->maze[mp->cur_sq_x][mp->cur_sq_y] |= WALL_LEFT; + mp->maze[mp->cur_sq_x - 1][mp->cur_sq_y] |= WALL_RIGHT; + draw_wall(win, mp->cur_sq_x, mp->cur_sq_y, 3); + } else + candidates[num_candidates++] = 3; + } + + /* done wall */ + if (num_candidates == 0) + return ( -1 ); + if (num_candidates == 1) + return ( candidates[0] ); + return ( candidates[ get_random(num_candidates) ] ); + +} /* end of choose_door() */ + + +static int +backup() /* back up a move */ +{ + mazestruct *mp = &mazes[screen]; + mp->sqnum--; + mp->cur_sq_x = mp->move_list[mp->sqnum].x; + mp->cur_sq_y = mp->move_list[mp->sqnum].y; + return ( mp->sqnum ); +} /* end of backup() */ + + +static void +draw_maze_border(win) /* draw the maze outline */ + Window win; +{ + mazestruct *mp = &mazes[screen]; + register int i, j; + + for ( i=0; imaze_size_x; i++) { + if ( mp->maze[i][0] & WALL_TOP ) { + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * i, + mp->border_y, + mp->border_x + mp->sq_size_x * (i+1), + mp->border_y); + } + if ((mp->maze[i][mp->maze_size_y - 1] & WALL_BOTTOM)) { + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * i, + mp->border_y + mp->sq_size_y * (mp->maze_size_y), + mp->border_x + mp->sq_size_x * (i+1), + mp->border_y + mp->sq_size_y * (mp->maze_size_y)); + } + } + for ( j=0; jmaze_size_y; j++) { + if ( mp->maze[mp->maze_size_x - 1][j] & WALL_RIGHT ) { + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * mp->maze_size_x, + mp->border_y + mp->sq_size_y * j, + mp->border_x + mp->sq_size_x * mp->maze_size_x, + mp->border_y + mp->sq_size_y * (j+1)); + } + if ( mp->maze[0][j] & WALL_LEFT ) { + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x, + mp->border_y + mp->sq_size_y * j, + mp->border_x, + mp->border_y + mp->sq_size_y * (j+1)); + } + } + + if (mp->logo_x != -1) { + XPutImage(dsp, win, Scr[screen].gc, &logo, + 0, 0, + mp->border_x + mp->sq_size_x * mp->logo_x + + (mp->sq_size_x * mp->logo_size_x - logo.width + 1) / + 2, + mp->border_y + mp->sq_size_y * mp->logo_y + + (mp->sq_size_y * mp->logo_size_y - logo.height + 1) / + 2, + maze_width, maze_height); + } + + draw_solid_square( win, mp->start_x, mp->start_y, mp->start_dir, + Scr[screen].gc); + draw_solid_square( win, mp->end_x, mp->end_y, mp->end_dir, + Scr[screen].gc); +} /* end of draw_maze() */ + + +static void +draw_wall(win, i, j, dir) /* draw a single wall */ + Window win; + int i, j, dir; +{ + mazestruct *mp = &mazes[screen]; + switch (dir) { + case 0: + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * i, + mp->border_y + mp->sq_size_y * j, + mp->border_x + mp->sq_size_x * (i+1), + mp->border_y + mp->sq_size_y * j); + break; + case 1: + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * (i+1), + mp->border_y + mp->sq_size_y * j, + mp->border_x + mp->sq_size_x * (i+1), + mp->border_y + mp->sq_size_y * (j+1)); + break; + case 2: + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * i, + mp->border_y + mp->sq_size_y * (j+1), + mp->border_x + mp->sq_size_x * (i+1), + mp->border_y + mp->sq_size_y * (j+1)); + break; + case 3: + XDrawLine(dsp, win, Scr[screen].gc, + mp->border_x + mp->sq_size_x * i, + mp->border_y + mp->sq_size_y * j, + mp->border_x + mp->sq_size_x * i, + mp->border_y + mp->sq_size_y * (j+1)); + break; + } +} /* end of draw_wall */ + + +static void +draw_solid_square(win, i, j, dir, gc) /* draw a solid square in a square */ + Window win; + register int i, j, dir; + GC gc; +{ + mazestruct *mp = &mazes[screen]; + switch (dir) { + case 0: XFillRectangle(dsp, win, gc, + mp->border_x + 3 + mp->sq_size_x * i, + mp->border_y - 3 + mp->sq_size_y * j, + mp->sq_size_x - 6, mp->sq_size_y); + break; + case 1: XFillRectangle(dsp, win, gc, + mp->border_x + 3 + mp->sq_size_x * i, + mp->border_y + 3 + mp->sq_size_y * j, + mp->sq_size_x, mp->sq_size_y - 6); + break; + case 2: XFillRectangle(dsp, win, gc, + mp->border_x + 3 + mp->sq_size_x * i, + mp->border_y + 3 + mp->sq_size_y * j, + mp->sq_size_x - 6, mp->sq_size_y); + break; + case 3: XFillRectangle(dsp, win, gc, + mp->border_x - 3 + mp->sq_size_x * i, + mp->border_y + 3 + mp->sq_size_y * j, + mp->sq_size_x, mp->sq_size_y - 6); + break; + } + +} /* end of draw_solid_square() */ + + +static void +solve_maze(win) /* solve it with graphical feedback */ + Window win; +{ + mazestruct *mp = &mazes[screen]; + static int i; + int n; + + if (!mp->solving) { + /* plug up the surrounding wall */ + mp->maze[mp->start_x][mp->start_y] |= (WALL_TOP >> mp->start_dir); + mp->maze[mp->end_x][mp->end_y] |= (WALL_TOP >> mp->end_dir); + + /* initialize search path */ + i = 0; + mp->path[i].x = mp->end_x; + mp->path[i].y = mp->end_y; + mp->path[i].dir = -1; + + mp->solving = 1; + } + + /* do it (5 squares at a time) */ + for(n = 0; n < 5; n++) { + if ( ++mp->path[i].dir >= 4 ) { + i--; + draw_solid_square( win, + (int)(mp->path[i].x), (int)(mp->path[i].y), + (int)(mp->path[i].dir), mp->gray_GC); + } + else if ( ! (mp->maze[mp->path[i].x][mp->path[i].y] & + (WALL_TOP >> mp->path[i].dir)) && + ( (i == 0) || ( (mp->path[i].dir != + (mp->path[i-1].dir+2)%4) ) ) ) { + enter_square(win, i); + i++; + if ( mp->maze[mp->path[i].x][mp->path[i].y] & START_SQUARE ) { + mp->solving = 0; + return; + } + } + } +} /* end of solve_maze() */ + + +static void +enter_square(win, n) /* move into a neighboring square */ + Window win; + int n; +{ + mazestruct *mp = &mazes[screen]; + draw_solid_square( win, (int)mp->path[n].x, (int)mp->path[n].y, + (int)mp->path[n].dir, Scr[screen].gc); + + mp->path[n+1].dir = -1; + switch (mp->path[n].dir) { + case 0: mp->path[n+1].x = mp->path[n].x; + mp->path[n+1].y = mp->path[n].y - 1; + break; + case 1: mp->path[n+1].x = mp->path[n].x + 1; + mp->path[n+1].y = mp->path[n].y; + break; + case 2: mp->path[n+1].x = mp->path[n].x; + mp->path[n+1].y = mp->path[n].y + 1; + break; + case 3: mp->path[n+1].x = mp->path[n].x - 1; + mp->path[n+1].y = mp->path[n].y; + break; + } + + +} /* end of enter_square() */ + +void +drawmaze(win) + Window win; +{ + mazestruct *mp = &mazes[screen]; + + if(mp->solving) { + solve_maze(win); + return; + } + switch (mp->counter) + { + case 0: + clear_window(win); + set_maze_sizes(); + initialize_maze(); + break; + case 1: + draw_maze_border(win); + break; + case 2: + create_maze(win); + break; + case 3: + (void) sleep(1); + break; + case 4: + solve_maze(win); + break; + case 5: + case 6: + case 7: + case 8: + (void) sleep(1); + break; + } + if (mp->counter == 8) + mp->counter = 0; + else + mp->counter++; +} /* end of drawmaze() */ + diff --git a/pyro.c b/pyro.c new file mode 100644 index 00000000..d4688fea --- /dev/null +++ b/pyro.c @@ -0,0 +1,389 @@ +#ifndef lint +static char sccsid[] = "@(#)pyro.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * pyro.c - Fireworks for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * 16-Mar-91: Written. (received from David Brooks, brooks@osf.org). + */ + +/* The physics of the rockets is a little bogus, but it looks OK. Each is + * given an initial velocity impetus. They decelerate slightly (gravity + * overcomes the rocket's impulse) and explode as the rocket's main fuse + * gives out (we could add a ballistic stage, maybe). The individual + * stars fan out from the rocket, and they decelerate less quickly. + * That's called bouyancy, but really it's again a visual preference. + */ + +#include "xlock.h" +#include +#define TWOPI 6.2831853 + +/* Define this >1 to get small rectangles instead of points */ +#ifndef STARSIZE +#define STARSIZE 2 +#endif + +#define SILENT 0 +#define REDGLARE 1 +#define BURSTINGINAIR 2 + +#define CLOUD 0 +#define DOUBLECLOUD 1 +/* Clearly other types and other fascinating visual effects could be added...*/ + +/* P_xxx parameters represent the reciprocal of the probability... */ +#define P_IGNITE 5000 /* ...of ignition per cycle */ +#define P_DOUBLECLOUD 10 /* ...of an ignition being double */ +#define P_MULTI 75 /* ...of an ignition being several @ once */ +#define P_FUSILLADE 250 /* ...of an ignition starting a fusillade */ + +#define ROCKETW 2 /* Dimensions of rocket */ +#define ROCKETH 4 +#define XVELFACTOR 0.0025 /* Max horizontal velocity / screen width */ +#define MINYVELFACTOR 0.016 /* Min vertical velocity / screen height */ +#define MAXYVELFACTOR 0.018 +#define GRAVFACTOR 0.0002 /* delta v / screen height */ +#define MINFUSE 50 /* range of fuse lengths for rocket */ +#define MAXFUSE 100 + +#define FUSILFACTOR 10 /* Generate fusillade by reducing P_IGNITE */ +#define FUSILLEN 100 /* Length of fusillade, in ignitions */ + +#define SVELFACTOR 0.1 /* Max star velocity / yvel */ +#define BOUYANCY 0.2 /* Reduction in grav deceleration for stars */ +#define MAXSTARS 75 /* Number of stars issued from a shell */ +#define MINSTARS 50 +#define MINSFUSE 50 /* Range of fuse lengths for stars */ +#define MAXSFUSE 100 + +#define INTRAND(min,max) (RAND()%((max+1)-(min))+(min)) +#define FLOATRAND(min,max) ((min)+((double) RAND()/((double) MAXRAND))*((max)-(min))) + +static void ignite(); +static void animate(); +static void shootup(); +static void burst(); + +typedef struct { + int state; + int shelltype; + long color1, color2; + int fuse; + float xvel, yvel; + float x, y; + int nstars; +#if STARSIZE > 1 + XRectangle Xpoints[MAXSTARS]; + XRectangle Xpoints2[MAXSTARS]; +#else + XPoint Xpoints[MAXSTARS]; + XPoint Xpoints2[MAXSTARS]; +#endif + float sx[MAXSTARS], sy[MAXSTARS]; /* Distance from notional + * center */ + float sxvel[MAXSTARS], syvel[MAXSTARS]; /* Relative to notional + * center */ +} rocket; + +typedef struct { + Screen *scr; + Colormap cmap; + int p_ignite; + unsigned long bgpixel; + unsigned long fgpixel; + unsigned long rockpixel; + GC bgGC; + int nflying; + int fusilcount; + int width, lmargin, rmargin, height; + float minvelx, maxvelx; + float minvely, maxvely; + float maxsvel; + float rockdecel, stardecel; + rocket *rockq; +} pyrostruct; + +static pyrostruct pyros[MAXSCREENS]; +static int orig_p_ignite; +static int just_started = True;/* Greet the user right away */ + +void +initpyro(win) + Window win; +{ + pyrostruct *pp = &pyros[screen]; + rocket *rp; + XWindowAttributes xwa; + XGCValues xgcv; + int rockn, starn, bsize; + + (void) XGetWindowAttributes(dsp, win, &xwa); + + if (batchcount < 1) + batchcount = 1; + orig_p_ignite = P_IGNITE / batchcount; + if (orig_p_ignite <= 0) + orig_p_ignite = 1; + pp->p_ignite = orig_p_ignite; + + if (!pp->rockq) { + pp->rockq = (rocket *) malloc(batchcount * sizeof(rocket)); + } + pp->nflying = pp->fusilcount = 0; + + bsize = (xwa.height <= 64) ? 1 : STARSIZE; + for (rockn = 0, rp = pp->rockq; rockn < batchcount; rockn++, rp++) { + rp->state = SILENT; +#if STARSIZE > 1 + for (starn = 0; starn < MAXSTARS; starn++) { + rp->Xpoints[starn].width = rp->Xpoints[starn].height = + rp->Xpoints2[starn].width = rp->Xpoints2[starn].height = bsize; + } +#endif + } + + pp->width = xwa.width; + pp->lmargin = xwa.width / 16; + pp->rmargin = xwa.width - pp->lmargin; + pp->height = xwa.height; + pp->scr = ScreenOfDisplay(dsp, screen); + pp->cmap = DefaultColormapOfScreen(pp->scr); + + pp->fgpixel = WhitePixelOfScreen(pp->scr); + pp->bgpixel = BlackPixelOfScreen(pp->scr); + if (!mono && Scr[screen].npixels > 3) + pp->rockpixel = Scr[screen].pixels[3]; /* Just the right shade of + * orange */ + else + pp->rockpixel = pp->fgpixel; + + if (!pp->bgGC) { + xgcv.foreground = pp->bgpixel; + pp->bgGC = XCreateGC(dsp, win, GCForeground, &xgcv); + } +/* Geometry-dependent physical data: */ + pp->maxvelx = (float) (xwa.width) * XVELFACTOR; + pp->minvelx = -pp->maxvelx; + pp->minvely = -(float) (xwa.height) * MINYVELFACTOR; + pp->maxvely = -(float) (xwa.height) * MAXYVELFACTOR; + pp->maxsvel = pp->minvely * SVELFACTOR; + pp->rockdecel = (float) (pp->height) * GRAVFACTOR; + pp->stardecel = pp->rockdecel * BOUYANCY; + + XFillRectangle(dsp, win, pp->bgGC, 0, 0, xwa.width, xwa.height); +} + +/*ARGSUSED*/ +void +drawpyro(win) + Window win; +{ + pyrostruct *pp = &pyros[screen]; + rocket *rp; + int rockn; + + if (just_started || (RAND() % pp->p_ignite == 0)) { + just_started = False; + if (RAND() % P_FUSILLADE == 0) { + pp->p_ignite = orig_p_ignite / FUSILFACTOR; + pp->fusilcount = INTRAND(FUSILLEN * 9 / 10, FUSILLEN * 11 / 10); + } + ignite(pp); + if (pp->fusilcount > 0) { + if (--pp->fusilcount == 0) + pp->p_ignite = orig_p_ignite; + } + } + for (rockn = pp->nflying, rp = pp->rockq; rockn > 0; rp++) { + if (rp->state != SILENT) { + animate(win, pp, rp); + rockn--; + } + } +} + +static void +ignite(pp) + pyrostruct *pp; +{ + rocket *rp; + int multi, shelltype, nstars, fuse, npix, pix; + unsigned long color1, color2; + float xvel, yvel, x; + + x = RAND() % pp->width; + xvel = FLOATRAND(-pp->maxvelx, pp->maxvelx); +/* All this to stop too many rockets going offscreen: */ + if ((x < pp->lmargin && xvel < 0.0) || (x > pp->rmargin && xvel > 0.0)) + xvel = -xvel; + yvel = FLOATRAND(pp->minvely, pp->maxvely); + fuse = INTRAND(MINFUSE, MAXFUSE); + nstars = INTRAND(MINSTARS, MAXSTARS); + if (!mono && (npix = Scr[screen].npixels) > 2) { + color1 = Scr[screen].pixels[pix = RAND() % npix]; + color2 = Scr[screen].pixels[(pix + (npix / 2)) % npix]; + } else { + color1 = color2 = WhitePixel(dsp, screen); + } + + multi = 1; + if (RAND() % P_DOUBLECLOUD == 0) + shelltype = DOUBLECLOUD; + else { + shelltype = CLOUD; + if (RAND() % P_MULTI == 0) + multi = INTRAND(5, 15); + } + + rp = pp->rockq; + while (multi--) { + if (pp->nflying >= batchcount) + return; + while (rp->state != SILENT) + rp++; + pp->nflying++; + rp->shelltype = shelltype; + rp->state = REDGLARE; + rp->color1 = color1; + rp->color2 = color2; + rp->xvel = xvel; + rp->yvel = FLOATRAND(yvel * 0.97, yvel * 1.03); + rp->fuse = INTRAND((fuse * 90) / 100, (fuse * 110) / 100); + rp->x = x + FLOATRAND(multi * 7.6, multi * 8.4); + rp->y = pp->height - 1; + rp->nstars = nstars; + } +} + +static void +animate(win, pp, rp) + Window win; + pyrostruct *pp; + rocket *rp; +{ + int starn; + float r, theta; + + if (rp->state == REDGLARE) { + shootup(win, pp, rp); + +/* Handle setup for explosion */ + if (rp->state == BURSTINGINAIR) { + for (starn = 0; starn < rp->nstars; starn++) { + rp->sx[starn] = rp->sy[starn] = 0.0; + rp->Xpoints[starn].x = (int) rp->x; + rp->Xpoints[starn].y = (int) rp->y; + if (rp->shelltype == DOUBLECLOUD) { + rp->Xpoints2[starn].x = (int) rp->x; + rp->Xpoints2[starn].y = (int) rp->y; + } +/* This isn't accurate solid geometry, but it looks OK. */ + + r = FLOATRAND(0.0, pp->maxsvel); + theta = FLOATRAND(0.0, TWOPI); + rp->sxvel[starn] = r * cos(theta); + rp->syvel[starn] = r * sin(theta); + } + rp->fuse = INTRAND(MINSFUSE, MAXSFUSE); + } + } + if (rp->state == BURSTINGINAIR) { + burst(win, pp, rp); + } +} + +static void +shootup(win, pp, rp) + Window win; + pyrostruct *pp; + rocket *rp; +{ + XFillRectangle(dsp, win, pp->bgGC, (int) (rp->x), (int) (rp->y), + ROCKETW, ROCKETH + 3); + + if (rp->fuse-- <= 0) { + rp->state = BURSTINGINAIR; + return; + } + rp->x += rp->xvel; + rp->y += rp->yvel; + rp->yvel += pp->rockdecel; + XSetForeground(dsp, Scr[screen].gc, pp->rockpixel); + XFillRectangle(dsp, win, Scr[screen].gc, (int) (rp->x), (int) (rp->y), + ROCKETW, ROCKETH + RAND() % 4); +} + +static void +burst(win, pp, rp) + Window win; + pyrostruct *pp; + rocket *rp; +{ + register int starn; + register int nstars, stype; + register float rx, ry, sd; /* Help compiler optimize :-) */ + register float sx, sy; + + nstars = rp->nstars; + stype = rp->shelltype; + +#if STARSIZE > 1 + XFillRectangles(dsp, win, pp->bgGC, rp->Xpoints, nstars); + if (stype == DOUBLECLOUD) + XFillRectangles(dsp, win, pp->bgGC, rp->Xpoints2, nstars); +#else + XDrawPoints(dsp, win, pp->bgGC, rp->Xpoints, nstars, CoordModeOrigin); + if (stype == DOUBLECLOUD) + XDrawPoints(dsp, win, pp->bgGC, rp->Xpoints2, nstars, CoordModeOrigin); +#endif + + if (rp->fuse-- <= 0) { + rp->state = SILENT; + pp->nflying--; + return; + } +/* Stagger the stars' decay */ + if (rp->fuse <= 7) { + if ((rp->nstars = nstars = nstars * 90 / 100) == 0) + return; + } + rx = rp->x; + ry = rp->y; + sd = pp->stardecel; + for (starn = 0; starn < nstars; starn++) { + sx = rp->sx[starn] += rp->sxvel[starn]; + sy = rp->sy[starn] += rp->syvel[starn]; + rp->syvel[starn] += sd; + rp->Xpoints[starn].x = (int) (rx + sx); + rp->Xpoints[starn].y = (int) (ry + sy); + if (stype == DOUBLECLOUD) { + rp->Xpoints2[starn].x = (int) (rx + 1.7 * sx); + rp->Xpoints2[starn].y = (int) (ry + 1.7 * sy); + } + } + rp->x = rx + rp->xvel; + rp->y = ry + rp->yvel; + rp->yvel += sd; + + XSetForeground(dsp, Scr[screen].gc, rp->color1); +#if STARSIZE > 1 + XFillRectangles(dsp, win, Scr[screen].gc, rp->Xpoints, nstars); + if (stype == DOUBLECLOUD) { + XSetForeground(dsp, Scr[screen].gc, rp->color2); + XFillRectangles(dsp, win, Scr[screen].gc, rp->Xpoints2, nstars); + } +#else + XDrawPoints(dsp, win, Scr[screen].gc, rp->Xpoints, nstars, CoordModeOrigin); + if (stype == DOUBLECLOUD) { + XSetForeground(dsp, Scr[screen].gc, rp->color2); + XDrawPoints(dsp, win, Scr[screen].gc, rp->Xpoints2, nstars, + CoordModeOrigin); + } +#endif +} diff --git a/qix.c b/qix.c new file mode 100644 index 00000000..1283704d --- /dev/null +++ b/qix.c @@ -0,0 +1,138 @@ +#ifndef lint +static char sccsid[] = "@(#)qix.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * qix.c - Vector swirl for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * 29-Jul-90: support for multiple screens. + * made check_bounds_?() a macro. + * fixed initial parameter setup. + * 15-Dec-89: Fix for proper skipping of {White,Black}Pixel() in colors. + * 08-Oct-89: Fixed bug in memory allocation in initqix(). + * Moved seconds() to an extern. + * 23-Sep-89: Switch to random() and fixed bug w/ less than 4 lines. + * 20-Sep-89: Lint. + * 24-Mar-89: Written. + */ + +#include "xlock.h" + +typedef struct { + int x; + int y; +} point; + +typedef struct { + int pix; + int first; + int last; + int dx1; + int dy1; + int dx2; + int dy2; + int x1; + int y1; + int x2; + int y2; + int offset; + int delta; + int width; + int height; + int nlines; + point *lineq; +} qixstruct; + +static qixstruct qixs[MAXSCREENS]; + +void +initqix(win) + Window win; +{ + XWindowAttributes xgwa; + qixstruct *qp = &qixs[screen]; + + qp->nlines = (batchcount + 1) * 2; + if (!qp->lineq) { + qp->lineq = (point *) malloc(qp->nlines * sizeof(point)); + (void) memset(qp->lineq, 0, qp->nlines * sizeof(point)); + } + + (void) XGetWindowAttributes(dsp, win, &xgwa); + qp->width = xgwa.width; + qp->height = xgwa.height; + qp->delta = 16; + + if (qp->width < 100) { /* icon window */ + qp->nlines /= 4; + qp->delta /= 4; + } + qp->offset = qp->delta / 3; + qp->last = 0; + qp->pix = 0; + qp->dx1 = RAND() % qp->delta + qp->offset; + qp->dy1 = RAND() % qp->delta + qp->offset; + qp->dx2 = RAND() % qp->delta + qp->offset; + qp->dy2 = RAND() % qp->delta + qp->offset; + qp->x1 = RAND() % qp->width; + qp->y1 = RAND() % qp->height; + qp->x2 = RAND() % qp->width; + qp->y2 = RAND() % qp->height; + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, qp->width, qp->height); +} + +#define check_bounds(qp, val, del, max) \ +{ \ + if ((val) < 0) { \ + *(del) = (RAND() % (qp)->delta) + (qp)->offset; \ + } else if ((val) > (max)) { \ + *(del) = -(RAND() % (qp)->delta) - (qp)->offset; \ + } \ +} + +void +drawqix(win) + Window win; +{ + qixstruct *qp = &qixs[screen]; + + qp->first = (qp->last + 2) % qp->nlines; + + qp->x1 += qp->dx1; + qp->y1 += qp->dy1; + qp->x2 += qp->dx2; + qp->y2 += qp->dy2; + check_bounds(qp, qp->x1, &qp->dx1, qp->width); + check_bounds(qp, qp->y1, &qp->dy1, qp->height); + check_bounds(qp, qp->x2, &qp->dx2, qp->width); + check_bounds(qp, qp->y2, &qp->dy2, qp->height); + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XDrawLine(dsp, win, Scr[screen].gc, + qp->lineq[qp->first].x, qp->lineq[qp->first].y, + qp->lineq[qp->first + 1].x, qp->lineq[qp->first + 1].y); + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[qp->pix]); + if (++qp->pix >= Scr[screen].npixels) + qp->pix = 0; + } else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + + XDrawLine(dsp, win, Scr[screen].gc, qp->x1, qp->y1, qp->x2, qp->y2); + + qp->lineq[qp->last].x = qp->x1; + qp->lineq[qp->last].y = qp->y1; + qp->last++; + if (qp->last >= qp->nlines) + qp->last = 0; + + qp->lineq[qp->last].x = qp->x2; + qp->lineq[qp->last].y = qp->y2; + qp->last++; + if (qp->last >= qp->nlines) + qp->last = 0; +} diff --git a/rect.c b/rect.c new file mode 100644 index 00000000..02b5cc76 --- /dev/null +++ b/rect.c @@ -0,0 +1,128 @@ +#ifndef lint +static char sccsid[] = "@(#)rect.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * Copyright (c) 1992 by Jamie Zawinski + * + * See xlock.c for copying information. + * + * Revision History: + * 29-Sep-94: multidisplay bug fix (epstein_caleb@jpmorgan.com) + * 15-Jul-94: xlock version (David Bagley bagleyd@source.asset.com) + * 1992: xscreensaver version (Jamie Zawinski jwz@lucid.com) + */ + +/* original copyright + * xscreensaver, Copyright (c) 1992 Jamie Zawinski + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include "xlock.h" + +#define NBITS 12 +#define MAXTIME 256 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BITS(n,w,h)\ + rp->pixmaps[rp->init_bits++]=\ + XCreatePixmapFromBitmapData(dsp,win,(char *)n,w,h,1,0,1) + +typedef struct { + int width; + int height; + int time; + int init_bits; + int x, y, w, h; + GC stippled_GC; + Pixmap pixmaps[NBITS]; +} rectstruct; + +static rectstruct rects[MAXSCREENS]; + +void +initrect(win) + Window win; +{ + XGCValues gcv; + Screen *scr; + XWindowAttributes xgwa; + rectstruct *rp = &rects[screen]; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + scr = ScreenOfDisplay(dsp, screen); + rp->width = xgwa.width; + rp->height = xgwa.height; + rp->time = 0; + + gcv.foreground = WhitePixelOfScreen(scr); + gcv.background = BlackPixelOfScreen(scr); + gcv.fill_style = FillOpaqueStippled; + rp->stippled_GC = XCreateGC(dsp, win, + GCForeground|GCBackground|GCFillStyle, &gcv); + + if (!rp->init_bits) { + BITS(stipple_bits, stipple_width, stipple_height); + BITS(cross_weave_bits, cross_weave_width, cross_weave_height); + BITS(dimple1_bits, dimple1_width, dimple1_height); + BITS(dimple3_bits, dimple3_width, dimple3_height); + BITS(flipped_gray_bits, flipped_gray_width, flipped_gray_height); + BITS(gray1_bits, gray1_width, gray1_height); + BITS(gray3_bits, gray3_width, gray3_height); + BITS(hlines2_bits, hlines2_width, hlines2_height); + BITS(light_gray_bits, light_gray_width, light_gray_height); + BITS(root_weave_bits, root_weave_width, root_weave_height); + BITS(vlines2_bits, vlines2_width, vlines2_height); + BITS(vlines3_bits, vlines3_width, vlines3_height); + } + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, rp->width, rp->height); +} + +void +drawrect(win) + Window win; +{ + XGCValues gcv; + rectstruct *rp = &rects[screen]; + int i; + + for (i = 0; i < 10; i++) /* minimize area, but don't try too hard */ { + rp->w = 50 + RAND() % (rp->width - 50); + rp->h = 50 + RAND() % (rp->height - 50); + if (rp->w + rp->h < rp->width && rp->w + rp->h < rp->height) + break; + } + rp->x = RAND() % (rp->width - rp->w); + rp->y = RAND() % (rp->height - rp->h); + gcv.stipple = rp->pixmaps[RAND() % NBITS]; + gcv.foreground = (!mono && Scr[screen].npixels > 2) ? + Scr[screen].pixels[RAND() % Scr[screen].npixels] : + WhitePixel(dsp, screen); + gcv.background = (!mono && Scr[screen].npixels > 2) ? + Scr[screen].pixels[RAND() % Scr[screen].npixels] : + BlackPixel(dsp, screen); + XChangeGC (dsp, rp->stippled_GC, GCStipple|GCForeground|GCBackground, &gcv); + XFillRectangle (dsp, win, rp->stippled_GC, rp->x, rp->y, rp->w, rp->h); + + if (++rp->time > MAXTIME) + initrect(win); +} diff --git a/resource.c b/resource.c new file mode 100644 index 00000000..41805dfa --- /dev/null +++ b/resource.c @@ -0,0 +1,1012 @@ +#ifndef lint +static char sccsid[] = "@(#)resource.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * resource.c - resource management for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * + * Changes of David Bagley (bagleyd@source.asset.com) + * 21-Dec-94: patch for -delay, -batchcount and -saturation for X11R5+ + * from Patrick D Sullivan . + * 18-Dec-94: -inroot option added from Bill Woodward . + * 31-Oct-94: bomb mode was added from . + * 20-Sep-94: added bat mode from Lorenzo Patocchi . + * 11-Jul-94: added grav mode, and inwindow option from Greg Bowering + * + * 22-Jun-94: Modified for VMS + * + * 17-Jun-94: default changed from life to blank + * 21-Mar-94: patch fix for AIXV3 from + * 01-Dec-93: added patch for AIXV3 from Tom McConnell + * + * 29-Jun-93: added spline, maze, sphere, hyper, helix, rock, and blot mode. + * + * Changes of Patrick J. Naughton + * 25-Sep-91: added worm mode. + * 24-Jun-91: changed name to username. + * 06-Jun-91: Added flame mode. + * 24-May-91: Added -name and -usefirst and -resources. + * 16-May-91: Added random mode and pyro mode. + * 26-Mar-91: CheckResources: delay must be >= 0. + * 29-Oct-90: Added #include for missing isupper() on some OS revs. + * moved -mode option, reordered Xrm database evaluation. + * 28-Oct-90: Added text strings. + * 26-Oct-90: Fix bug in mode specific options. + * 31-Jul-90: Fix ':' handling in parsefilepath + * 07-Jul-90: Created from resource work in xlock.c + * + */ + +#include "xlock.h" +#include +#include +#include +#include +#include + +/* + * Declare external interface routines for supported screen savers. + */ + +extern void inithop(); +extern void drawhop(); + +extern void initlife(); +extern void drawlife(); + +extern void initqix(); +extern void drawqix(); + +extern void initswarm(); +extern void drawswarm(); + +extern void initrotor(); +extern void drawrotor(); + +extern void initpyro(); +extern void drawpyro(); + +extern void initflame(); +extern void drawflame(); + +extern void initworm(); +extern void drawworm(); + +extern void initspline(); +extern void drawspline(); + +extern void initmaze(); +extern void drawmaze(); + +extern void initsphere(); +extern void drawsphere(); + +extern void inithyper(); +extern void drawhyper(); + +extern void inithelix(); +extern void drawhelix(); + +extern void initrock(); +extern void drawrock(); + +extern void initblot(); +extern void drawblot(); + +extern void initgrav(); +extern void drawgrav(); + +extern void initbounce(); +extern void drawbounce(); + +extern void initworld(); +extern void drawworld(); + +extern void initrect(); +extern void drawrect(); + +extern void initbat(); +extern void drawbat(); + +extern void initgalaxy(); +extern void drawgalaxy(); + +extern void initkaleid(); +extern void drawkaleid(); + +extern void initwator(); +extern void drawwator(); + +extern void initlife3d(); +extern void drawlife3d(); + +extern void initswirl(); +extern void drawswirl(); + +extern void initimage(); +extern void drawimage(); + +extern void initbomb(); +extern void drawbomb(); + +extern void initblank(); +extern void drawblank(); + +extern int full_lock(); + +typedef struct { + char *cmdline_arg; + void (*lp_init) (); + void (*lp_callback) (); + int def_delay; + int def_batchcount; + float def_saturation; + char *desc; +} LockStruct; + +#define NUMSPECIAL 4 /* # of Special Screens */ +static char randomstring[] = "random"; +static char bombstring[] = "bomb"; + +static LockStruct LockProcs[] = { + {"hop", inithop, drawhop, 1000, 1000, 1.0, "Hopalong iterated fractals"}, + {"qix", initqix, drawqix, 30000, 64, 1.0, "Spinning lines a la Qix(tm)"}, + {"life", initlife, drawlife, 750000, 125, 1.0, "Conway's game of Life"}, + {"swarm", initswarm, drawswarm, 10000, 100, 1.0, "Swarm of bees"}, + {"rotor", initrotor, drawrotor, 10000, 4, 0.4, "Tom's Roto-Rooter"}, + {"pyro", initpyro, drawpyro, 15000, 40, 1.0, "Fireworks"}, + {"flame", initflame, drawflame, 10000, 20, 1.0, "Cosmic Flame Fractals"}, + {"worm", initworm, drawworm, 10000, 20, 1.0, "Wiggly Worms"}, + {"spline", initspline, drawspline, 30000, 6, 0.4, "Moving Splines"}, + {"maze", initmaze, drawmaze, 10000, 40, 1.0, "aMAZEing"}, + {"sphere", initsphere, drawsphere, 10000, 1, 1.0, "Shaded spheres"}, + {"hyper", inithyper, drawhyper, 10000, 1, 1.0, "Spinning Tesseract"}, + {"helix", inithelix, drawhelix, 10000, 1, 1.0, "Helix"}, + {"rock", initrock, drawrock, 20000, 100, 1.0, "Asteroid field"}, + {"blot", initblot, drawblot, 10000, 6, 0.4, "Rorschach's ink blot test"}, + {"grav", initgrav, drawgrav, 10000, 10, 1.0, "Orbiting planets"}, + {"bounce", initbounce, drawbounce, 10000, 10, 1.0, "Bouncing ball"}, + {"world", initworld, drawworld, 100000, 8, 0.3, "Random Spinning Earths"}, + {"rect", initrect, drawrect, 10000, 100, 1.0, "Greynetic rectangles"}, + {"bat", initbat, drawbat, 100000, 6, 1.0, "Flying Bats"}, + {"galaxy", initgalaxy, drawgalaxy, 100, 3, 1.0, "Spinning galaxies"}, + {"kaleid", initkaleid, drawkaleid, 2000, 4, 1.0, "Kaleidoscope"}, + {"wator", initwator, drawwator, 750000, 4, 1.0, "Dewdney's Planet Wa-Tor"}, + {"life3d", initlife3d, drawlife3d, 1000000, 80, 1.0, "Bays' 3D Life"}, + {"swirl", initswirl, drawswirl, 5000, 5, 1.0, "Animated swirling patterns"}, + {"image", initimage, drawimage, 2000000, 1, 1.0, "Random Bouncing Image"}, + {bombstring, initbomb, drawbomb, 1000000, 1, 1.0, "Temporary screen lock"}, + {"blank", initblank, drawblank, 4000000, 1, 1.0, "Blank screen"}, + {randomstring, NULL, NULL, 0, 0, 0.0, "Random mode"}, +}; + +#define NUMPROCS (sizeof LockProcs / sizeof LockProcs[0]) + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 /* SunOS 3.5 does not define this */ +#endif + +extern char *getenv(); + +#ifndef DEF_FILESEARCHPATH +#ifdef VMS +#define DEF_FILESEARCHPATH "DECW$SYSTEM_DEFAULTS:DECW$%N.DAT%S" +#else +#define DEF_FILESEARCHPATH "/usr/lib/X11/%T/%N%S" +#endif +#endif +#ifdef VMS +#define DEF_DISPLAY "DECW$DISPLAY:" +#else +#define DEF_DISPLAY "" +#endif +#define DEF_MODE "blank" +#ifndef AIXV3 +#define DEF_FONT "-b&h-lucida-medium-r-normal-sans-24-*-*-*-*-*-iso8859-1" +#else /* AIXV3 */ +#define DEF_FONT "fixed" +#endif /* AIXV3 */ +#define DEF_BG "White" +#define DEF_FG "Black" +#define DEF_NAME "Name: " +#define DEF_PASS "Password: " +#define DEF_INFO "Enter password to unlock; select icon to lock." +#define DEF_VALID "Validating login..." +#define DEF_INVALID "Invalid login." +#define DEF_TIMEOUT "30" /* secs till password entry times out */ +#define DEF_BC "100" /* vectors (or whatever) per batch */ +#define DEF_DELAY "200000"/* microseconds between batches */ +#define DEF_NICE "10" /* xlock process nicelevel */ +#define DEF_SAT "1.0" /* color ramp saturation 0->1 */ +#define DEF_CLASSNAME "XLock" +#define DEF_GEOMETRY "" + +#ifdef AUTO_LOGOUT +#define DEF_LOGOUT "30" /* minutes until auto-logout */ +#endif + +#ifdef LOGOUT_BUTTON + +#define DEF_BTN_LABEL "Logout" /* string that appears in logout button */ + +/* this string appears immediately below logout button */ +#define DEF_BTN_HELP "Click here to logout" + +/* this string appears in place of the logout button if user could not + be logged out */ +#define DEF_FAIL "Auto-logout failed" + +#endif + +static char *classname; +static char modename[1024]; +static char modeclass[1024]; + +static XrmOptionDescRec genTable[] = { + {"-mode", ".mode", XrmoptionSepArg, (caddr_t) NULL}, + {"-nolock", ".nolock", XrmoptionNoArg, (caddr_t) "on"}, + {"+nolock", ".nolock", XrmoptionNoArg, (caddr_t) "off"}, + {"-remote", ".remote", XrmoptionNoArg, (caddr_t) "on"}, + {"+remote", ".remote", XrmoptionNoArg, (caddr_t) "off"}, + {"-mono", ".mono", XrmoptionNoArg, (caddr_t) "on"}, + {"+mono", ".mono", XrmoptionNoArg, (caddr_t) "off"}, +#ifndef ALWAYS_ALLOW_ROOT + {"-allowroot", ".allowroot", XrmoptionNoArg, (caddr_t) "on"}, + {"+allowroot", ".allowroot", XrmoptionNoArg, (caddr_t) "off"}, +#endif + {"-enablesaver", ".enablesaver", XrmoptionNoArg, (caddr_t) "on"}, + {"+enablesaver", ".enablesaver", XrmoptionNoArg, (caddr_t) "off"}, + {"-allowaccess", ".allowaccess", XrmoptionNoArg, (caddr_t) "on"}, + {"+allowaccess", ".allowaccess", XrmoptionNoArg, (caddr_t) "off"}, + {"-grabmouse", ".grabmouse", XrmoptionNoArg, (caddr_t) "on"}, + {"+grabmouse", ".grabmouse", XrmoptionNoArg, (caddr_t) "off"}, + {"-echokeys", ".echokeys", XrmoptionNoArg, (caddr_t) "on"}, + {"+echokeys", ".echokeys", XrmoptionNoArg, (caddr_t) "off"}, + {"-usefirst", ".usefirst", XrmoptionNoArg, (caddr_t) "on"}, + {"+usefirst", ".usefirst", XrmoptionNoArg, (caddr_t) "off"}, + {"-v", ".verbose", XrmoptionNoArg, (caddr_t) "on"}, + {"+v", ".verbose", XrmoptionNoArg, (caddr_t) "off"}, + {"-inwindow",".inwindow", XrmoptionNoArg, (caddr_t) "on"}, + {"+inwindow",".inwindow", XrmoptionNoArg, (caddr_t) "off"}, + {"-inroot",".inroot", XrmoptionNoArg, (caddr_t) "on"}, + {"+inroot",".inroot", XrmoptionNoArg, (caddr_t) "off"}, + {"-timeelapsed", ".timeelapsed", XrmoptionNoArg, (caddr_t) "on"}, + {"+timeelapsed", ".timeelapsed", XrmoptionNoArg, (caddr_t) "off"}, + {"-install", ".install", XrmoptionNoArg, (caddr_t) "on"}, + {"+install", ".install", XrmoptionNoArg, (caddr_t) "off"}, + {"-nice", ".nice", XrmoptionSepArg, (caddr_t) NULL}, + {"-timeout", ".timeout", XrmoptionSepArg, (caddr_t) NULL}, + {"-font", ".font", XrmoptionSepArg, (caddr_t) NULL}, + {"-bg", ".background", XrmoptionSepArg, (caddr_t) NULL}, + {"-fg", ".foreground", XrmoptionSepArg, (caddr_t) NULL}, + {"-background", ".background", XrmoptionSepArg, (caddr_t) NULL}, + {"-foreground", ".foreground", XrmoptionSepArg, (caddr_t) NULL}, + {"-username", ".username", XrmoptionSepArg, (caddr_t) NULL}, + {"-password", ".password", XrmoptionSepArg, (caddr_t) NULL}, + {"-info", ".info", XrmoptionSepArg, (caddr_t) NULL}, + {"-validate", ".validate", XrmoptionSepArg, (caddr_t) NULL}, + {"-invalid", ".invalid", XrmoptionSepArg, (caddr_t) NULL}, + {"-geometry", ".geometry", XrmoptionSepArg, (caddr_t) NULL}, +#ifdef AUTO_LOGOUT + {"-forceLogout", ".forceLogout", XrmoptionSepArg, (caddr_t) NULL}, +#endif +#ifdef LOGOUT_BUTTON + {"-logoutButtonLabel", ".logoutButtonLabel", XrmoptionSepArg, (caddr_t) NULL}, + {"-logoutButtonHelp", ".logoutButtonHelp", XrmoptionSepArg, (caddr_t) NULL}, + {"-logoutFailedString", ".logoutFailedString", XrmoptionSepArg, (caddr_t) NULL}, +#endif + +}; +#define genEntries (sizeof genTable / sizeof genTable[0]) + +char Delay[64], BatchCount[64], Saturation[64]; +static XrmOptionDescRec modeTable[] = { + {"-delay", Delay, XrmoptionSepArg, (caddr_t) NULL}, + {"-batchcount", BatchCount, XrmoptionSepArg, (caddr_t) NULL}, + {"-saturation", Saturation, XrmoptionSepArg, (caddr_t) NULL}, +}; +#define modeEntries (sizeof modeTable / sizeof modeTable[0]) + +static XrmOptionDescRec cmdlineTable[] = { + {"-display", ".display", XrmoptionSepArg, (caddr_t) NULL}, + {"-nolock", ".nolock", XrmoptionNoArg, (caddr_t) "on"}, + {"+nolock", ".nolock", XrmoptionNoArg, (caddr_t) "off"}, + {"-remote", ".remote", XrmoptionNoArg, (caddr_t) "on"}, + {"+remote", ".remote", XrmoptionNoArg, (caddr_t) "off"}, + {"-inwindow", ".inwindow", XrmoptionNoArg, (caddr_t) "on"}, + {"+inwindow", ".inwindow", XrmoptionNoArg, (caddr_t) "off"}, + {"-inroot", ".inroot", XrmoptionNoArg, (caddr_t) "on"}, + {"+inroot", ".inroot", XrmoptionNoArg, (caddr_t) "off"}, +}; +#define cmdlineEntries (sizeof cmdlineTable / sizeof cmdlineTable[0]) + +static XrmOptionDescRec nameTable[] = { + {"-name", ".name", XrmoptionSepArg, (caddr_t) NULL}, +}; + + +typedef struct { + char *opt; + char *desc; +} OptionStruct; + +static OptionStruct opDesc[] = { + {"-help", "print out this message"}, + {"-resources", "print default resource file to standard output"}, + {"-display displayname", "X server to contact"}, + {"-name resourcename", "class name to use for resources (default is XLock)"}, + {"-/+mono", "turn on/off monochrome override"}, + {"-/+nolock", "turn on/off no password required mode"}, + {"-/+remote", "turn on/off remote host access"}, +#ifndef ALWAYS_ALLOW_ROOT + {"-/+allowroot", "turn on/off allow root password mode"}, +#endif + {"-/+enablesaver", "turn on/off enable X server screen saver"}, + {"-/+allowaccess", "turn on/off allow new clients to connect"}, + {"-/+grabmouse", "turn on/off grabbing of mouse and keyboard"}, + {"-/+echokeys", "turn on/off echo '?' for each password key"}, + {"-/+usefirst", "turn on/off using the first char typed in password"}, + {"-/+v", "turn on/off verbose mode"}, + {"-/+inwindow", "turn on/off making xlock run in a window"}, + {"-/+inroot", "turn on/off making xlock run in the root window"}, + {"-/+timeelapsed", "turn on/off clock"}, + {"-/+install", "whether to use private colormap if needed (yes/no)"}, + {"-delay usecs", "microsecond delay between screen updates"}, + {"-batchcount num", "number of things per batch"}, + {"-nice level", "nice level for xlock process"}, + {"-timeout seconds", "number of seconds before password times out"}, + {"-saturation value", "saturation of color ramp"}, + {"-font fontname", "font to use for password prompt"}, + {"-bg color", "background color to use for password prompt"}, + {"-fg color", "foreground color to use for password prompt"}, + {"-username string", "text string to use for Name prompt"}, + {"-password string", "text string to use for Password prompt"}, + {"-info string", "text string to use for instructions"}, + {"-validate string", "text string to use for validating password message"}, + {"-invalid string", "text string to use for invalid password message"}, + {"-geometry geom", "geometry for non-full screen lock"}, +}; +#define opDescEntries (sizeof opDesc / sizeof opDesc[0]) + +char *displayname; +char *mode; +char *fontname; +char *background; +char *foreground; +char *text_name; +char *text_pass; +char *text_info; +char *text_valid; +char *text_invalid; +char *geometry; +float saturation; +int nicelevel; +int delay; +int batchcount; +int timeout; +#ifdef AUTO_LOGOUT +int forceLogout; +#endif +#ifdef LOGOUT_BUTTON +int enable_button = 1; +char *logoutButtonLabel; +char *logoutButtonHelp; +char *logoutFailedString; +#endif +Bool mono; +Bool nolock; +Bool remote; +#ifdef ALWAYS_ALLOW_ROOT +Bool allowroot = 1; +#else +Bool allowroot; +#endif +Bool enablesaver; +Bool allowaccess; +Bool grabmouse; +Bool echokeys; +Bool usefirst; +Bool verbose; +Bool inwindow; +Bool inroot; +Bool timeelapsed; +Bool install; + +#define t_String 0 +#define t_Float 1 +#define t_Int 2 +#define t_Bool 3 + +typedef struct { + caddr_t *var; + char *name; + char *class; + char *def; + int type; +} argtype; + +static argtype genvars[] = { + {(caddr_t *) &fontname, "font", "Font", DEF_FONT, t_String}, + {(caddr_t *) &background, "background", "Background", DEF_BG, t_String}, + {(caddr_t *) &foreground, "foreground", "Foreground", DEF_FG, t_String}, + {(caddr_t *) &text_name, "username", "Username", DEF_NAME, t_String}, + {(caddr_t *) &text_pass, "password", "Password", DEF_PASS, t_String}, + {(caddr_t *) &text_info, "info", "Info", DEF_INFO, t_String}, + {(caddr_t *) &text_valid, "validate", "Validate", DEF_VALID, t_String}, + {(caddr_t *) &text_invalid, "invalid", "Invalid", DEF_INVALID, t_String}, + {(caddr_t *) &geometry, "geometry", "Geometry", DEF_GEOMETRY, t_String}, + {(caddr_t *) &nicelevel, "nice", "Nice", DEF_NICE, t_Int}, + {(caddr_t *) &timeout, "timeout", "Timeout", DEF_TIMEOUT, t_Int}, + {(caddr_t *) &mono, "mono", "Mono", "off", t_Bool}, + {(caddr_t *) &nolock, "nolock", "NoLock", "off", t_Bool}, + {(caddr_t *) &remote, "remote", "Remote", "off", t_Bool}, +#ifndef ALWAYS_ALLOW_ROOT + {(caddr_t *) &allowroot, "allowroot", "AllowRoot", "off", t_Bool}, +#endif + {(caddr_t *) &enablesaver, "enablesaver", "EnableSaver", "off", t_Bool}, + {(caddr_t *) &allowaccess, "allowaccess", "AllowAccess", "off", t_Bool}, + {(caddr_t *) &grabmouse, "grabmouse", "GrabMouse", "on", t_Bool}, + {(caddr_t *) &echokeys, "echokeys", "EchoKeys", "off", t_Bool}, + {(caddr_t *) &usefirst, "usefirst", "Usefirst", "off", t_Bool}, + {(caddr_t *) &verbose, "verbose", "Verbose", "off", t_Bool}, + {(caddr_t *) &inwindow, "inwindow", "InWindow", "off", t_Bool}, + {(caddr_t *) &inroot, "inroot", "InRoot", "off", t_Bool}, + {(caddr_t *) &timeelapsed, "timeelapsed", "TimeElapsed", "off", t_Bool}, + {(caddr_t *) &install, "install", "Install", "off", t_Bool}, +#ifdef AUTO_LOGOUT + {(caddr_t *) &forceLogout, "forceLogout", "ForceLogout", DEF_LOGOUT, t_Int +}, +#endif +#ifdef LOGOUT_BUTTON + {(caddr_t *) &logoutButtonLabel, "logoutButtonLabel", + "LogoutButtonLabel", DEF_BTN_LABEL, t_String}, + {(caddr_t *) &logoutButtonHelp, "logoutButtonHelp", + "LogoutButtonHelp", DEF_BTN_HELP, t_String}, + {(caddr_t *) &logoutFailedString, "logoutFailedString", + "LogoutFailedString", DEF_FAIL, t_String}, +#endif +}; +#define NGENARGS (sizeof genvars / sizeof genvars[0]) + +static argtype modevars[] = { + {(caddr_t *) &delay, "delay", "Delay", DEF_DELAY, t_Int}, + {(caddr_t *) &batchcount, "batchcount", "BatchCount", DEF_BC, t_Int}, + {(caddr_t *) &saturation, "saturation", "Saturation", DEF_SAT, t_Float}, +}; +#define NMODEARGS (sizeof modevars / sizeof modevars[0]) + +#ifdef VMS +static char *stripname(string) +char *string; +{ + char *characters; + + while (string && *string++ != ']'); + characters = string; + while (characters) + if (*characters == '.') { + *characters = '\0'; + return string; + } else + characters++; + return string; +} +#endif + +static void +Syntax(badOption) + char *badOption; +{ + int col, len, i; + + (void) fprintf(stderr, "%s: bad command line option \"%s\"\n\n", + ProgramName, badOption); + + (void) fprintf(stderr, "usage: %s", ProgramName); + col = 8 + strlen(ProgramName); + for (i = 0; i < opDescEntries; i++) { + len = 3 + strlen(opDesc[i].opt); /* space [ string ] */ + if (col + len > 79) { + (void) fprintf(stderr, "\n "); /* 3 spaces */ + col = 3; + } + (void) fprintf(stderr, " [%s]", opDesc[i].opt); + col += len; + } + + len = 8 + strlen(LockProcs[0].cmdline_arg); + if (col + len > 79) { + (void) fprintf(stderr, "\n "); /* 3 spaces */ + col = 3; + } + (void) fprintf(stderr, " [-mode %s", LockProcs[0].cmdline_arg); + col += len; + for (i = 1; i < NUMPROCS; i++) { + len = 3 + strlen(LockProcs[i].cmdline_arg); + if (col + len > 79) { + (void) fprintf(stderr, "\n "); /* 3 spaces */ + col = 3; + } + (void) fprintf(stderr, " | %s", LockProcs[i].cmdline_arg); + col += len; + } + (void) fprintf(stderr, "]\n"); + + (void) fprintf(stderr, "\nType %s -help for a full description.\n\n", + ProgramName); + exit(1); +} + +static void +Help() +{ + int i; + + (void) fprintf(stderr, "usage:\n %s [-options ...]\n\n", + ProgramName); + (void) fprintf(stderr, "where options include:\n"); + for (i = 0; i < opDescEntries; i++) { + (void) fprintf(stderr, " %-28s %s\n", + opDesc[i].opt, opDesc[i].desc); + } + + (void) fprintf(stderr, " %-28s %s\n", "-mode mode", "animation mode"); + (void) fprintf(stderr, " where mode is one of:\n"); + for (i = 0; i < NUMPROCS; i++) { + (void) fprintf(stderr, " %-23s %s\n", + LockProcs[i].cmdline_arg, LockProcs[i].desc); + } + (void) putc('\n', stderr); + + exit(0); +} + +static void +DumpResources() +{ + int i; + + (void) printf("%s.mode: %s\n", classname, DEF_MODE); + + for (i = 0; i < NGENARGS; i++) + (void) printf("%s.%s: %s\n", + classname, genvars[i].name, genvars[i].def); + + for (i = 0; i < NUMPROCS - 1; i++) { + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "delay", LockProcs[i].def_delay); + (void) printf("%s.%s.%s: %d\n", classname, LockProcs[i].cmdline_arg, + "batchcount", LockProcs[i].def_batchcount); + (void) printf("%s.%s.%s: %g\n", classname, LockProcs[i].cmdline_arg, + "saturation", LockProcs[i].def_saturation); + } + exit(0); +} + + +static void +LowerString(s) + char *s; +{ + + while (*s) { + if (isupper(*s)) + *s += ('a' - 'A'); + s++; + } +} + +static void +GetResource(database, parentname, parentclass, + name, class, valueType, def, valuep) + XrmDatabase database; + char *parentname; + char *parentclass; + char *name; + char *class; + int valueType; + char *def; + caddr_t *valuep; /* RETURN */ +{ + char *type; + XrmValue value; + char *string; + char buffer[1024]; + char fullname[1024]; + char fullclass[1024]; + int len; + + (void) sprintf(fullname, "%s.%s", parentname, name); + (void) sprintf(fullclass, "%s.%s", parentclass, class); + if (XrmGetResource(database, fullname, fullclass, &type, &value)) { + string = value.addr; + len = value.size; + } else { + string = def; + len = strlen(string); + } + (void) strncpy(buffer, string, sizeof(buffer)); + buffer[sizeof(buffer) - 1] = '\0'; + + switch (valueType) { + case t_String: + { + char *s = (char *) malloc(len + 1); + if (s == (char *) NULL) + error("%s: GetResource - couldn't allocate memory"); + (void) strncpy(s, string, len); + s[len] = '\0'; + *((char **) valuep) = s; + } + break; + case t_Bool: + LowerString(buffer); + *((int *) valuep) = (!strcmp(buffer, "true") || + !strcmp(buffer, "on") || + !strcmp(buffer, "enabled") || + !strcmp(buffer, "yes")) ? True : False; + break; + case t_Int: + *((int *) valuep) = atoi(buffer); + break; + case t_Float: + *((float *) valuep) = (float) atof(buffer); + break; + } +} + + +static XrmDatabase +parsefilepath(xfilesearchpath, TypeName, ClassName) + char *xfilesearchpath; + char *TypeName; + char *ClassName; +{ + XrmDatabase database = NULL; + char appdefaults[1024]; + char *src; + char *dst; + + src = xfilesearchpath; + appdefaults[0] = '\0'; + dst = appdefaults; + while (1) { + if (*src == '%') { + src++; + switch (*src) { + case '%': + case ':': + *dst++ = *src++; + *dst = '\0'; + break; + case 'T': + (void) strcat(dst, TypeName); + src++; + dst += strlen(TypeName); + break; + case 'N': + (void) strcat(dst, ClassName); + src++; + dst += strlen(ClassName); + break; + case 'S': + src++; + break; + default: + src++; + break; + } +#ifdef VMS + } else if (*src == '#') {/* Colons required in VMS use #*/ +#else + } else if (*src == ':') { +#endif + database = XrmGetFileDatabase(appdefaults); + if (database == NULL) { + dst = appdefaults; + src++; + } else + break; + } else if (*src == '\0') { + database = XrmGetFileDatabase(appdefaults); + break; + } else { + *dst++ = *src++; + *dst = '\0'; + } + } + return database; +} + + +static void +open_display() +{ + if (displayname != NULL) { + char *colon = (char *) strchr(displayname, ':'); + int n = colon - displayname; + + if (colon == NULL) + error("%s: Malformed -display argument, \"%s\"\n", displayname); + + /* + * only restrict access to other displays if we are locking and if the + * Remote resource is not set. + */ + if (nolock) + remote = True; + if (!remote && n + && strncmp(displayname, "unix", n) + && strncmp(displayname, "localhost", n)) { + char hostname[MAXHOSTNAMELEN]; + struct hostent *host; + char **hp; + int badhost = 1; + + if (gethostname(hostname, MAXHOSTNAMELEN)) + error("%s: Can't get local hostname.\n"); + + if (!(host = gethostbyname(hostname))) + error("%s: Can't get hostbyname.\n"); + + if (strncmp(displayname, host->h_name, n)) { + for (hp = host->h_aliases; *hp; hp++) { + if (!strncmp(displayname, *hp, n)) { + badhost = 0; + break; + } + } + if (badhost) { + *colon = (char) 0; + error("%s: can't lock %s's display\n", displayname); + } + } + } + } else + displayname = ":0.0"; + if (!(dsp = XOpenDisplay(displayname))) + error("%s: unable to open display %s.\n", displayname); +} + + +void +printvar(class, var) + char *class; + argtype var; +{ + switch (var.type) { + case t_String: + (void) fprintf(stderr, "%s.%s: %s\n", + class, var.name, *((char **) var.var)); + break; + case t_Bool: + (void) fprintf(stderr, "%s.%s: %s\n", + class, var.name, *((int *) var.var) + ? "True" : "False"); + break; + case t_Int: + (void) fprintf(stderr, "%s.%s: %d\n", + class, var.name, *((int *) var.var)); + break; + case t_Float: + (void) fprintf(stderr, "%s.%s: %g\n", + class, var.name, *((float *) var.var)); + break; + } +} + + +void +GetResources(argc, argv) + int argc; + char *argv[]; +{ + XrmDatabase RDB = NULL; + XrmDatabase nameDB = NULL; + XrmDatabase modeDB = NULL; + XrmDatabase cmdlineDB = NULL; + XrmDatabase generalDB = NULL; + XrmDatabase homeDB = NULL; + XrmDatabase applicationDB = NULL; + XrmDatabase serverDB = NULL; + XrmDatabase userDB = NULL; + char userfile[1024]; + char *homeenv; + char *userpath; + char *env; + char *serverString; + int i; + + XrmInitialize(); + + for (i = 0; i < argc; i++) { + if (!strncmp(argv[i], "-help", strlen(argv[i]))) + Help(); + /* NOTREACHED */ + } + + /* + * get -name arg from command line so you can have different resource + * files for different configurations/machines etc... + */ +#ifdef VMS + /*Strip off directory and .exe; parts*/ + ProgramName = stripname(ProgramName); +#endif + XrmParseCommand(&nameDB, nameTable, 1, ProgramName, + &argc, argv); + GetResource(nameDB, ProgramName, "*", "name", "Name", t_String, + DEF_CLASSNAME, &classname); + + + homeenv = getenv("HOME"); + if (!homeenv) + homeenv = ""; + + env = getenv("XFILESEARCHPATH"); + applicationDB = parsefilepath(env ? env : DEF_FILESEARCHPATH, + "app-defaults", classname); + + XrmParseCommand(&cmdlineDB, cmdlineTable, cmdlineEntries, ProgramName, + &argc, argv); + + userpath = getenv("XUSERFILESEARCHPATH"); + if (!userpath) { + env = getenv("XAPPLRESDIR"); + if (env) + (void) sprintf(userfile, "%s/%%N:%s/%%N", env, homeenv); + else +#ifdef VMS + (void) sprintf(userfile, "%sDECW$%%N.DAT#%sDECW$XDEFAULTS.DAT", + homeenv, homeenv); +#else + (void) sprintf(userfile, "%s/%%N", homeenv); +#endif + userpath = userfile; + } + userDB = parsefilepath(userpath, "app-defaults", classname); + + (void) XrmMergeDatabases(applicationDB, &RDB); + (void) XrmMergeDatabases(userDB, &RDB); + (void) XrmMergeDatabases(cmdlineDB, &RDB); + + env = getenv("DISPLAY"); + GetResource(RDB, ProgramName, classname, "display", "Display", t_String, + env ? env : DEF_DISPLAY, &displayname); + GetResource(RDB, ProgramName, classname, "nolock", "NoLock", t_Bool, + "off", (caddr_t *) &nolock); + GetResource(RDB, ProgramName, classname, "remote", "Remote", t_Bool, + "off", (caddr_t *) &remote); + GetResource(RDB, ProgramName, classname, "inwindow", "InWindow", t_Bool, + "off", (caddr_t *) &inwindow); + GetResource(RDB, ProgramName, classname, "inroot", "InRoot", t_Bool, + "off", (caddr_t *) &inroot); + GetResource(RDB, ProgramName, classname, "mono", "Mono", t_Bool, + "off", (caddr_t *) &mono); + + open_display(); + serverString = XResourceManagerString(dsp); + if (serverString) { + serverDB = XrmGetStringDatabase(serverString); + (void) XrmMergeDatabases(serverDB, &RDB); + } else { + char buf[1024]; + (void) sprintf(buf, "%s/.Xdefaults", homeenv); + homeDB = XrmGetFileDatabase(buf); + (void) XrmMergeDatabases(homeDB, &RDB); + } + + XrmParseCommand(&generalDB, genTable, genEntries, ProgramName, &argc, argv); + (void) XrmMergeDatabases(generalDB, &RDB); + + GetResource(RDB, ProgramName, classname, "mode", "Mode", t_String, + DEF_MODE, (caddr_t *) &mode); + + /* + * if RAND < mode, then just grab a random entry from the table + * or root is trying to run bomb ... sorry not a good idea + */ + + if (!strcmp(mode, randomstring)) + mode = LockProcs[RAND() % (NUMPROCS - NUMSPECIAL)].cmdline_arg; + if (!getuid() && !strcmp(mode, bombstring)) + error("%s: mode %s can not run as root.\n", bombstring); +#ifdef FORCE_BOMB + /* + * Force temporary locking mode + */ + if ( !full_lock() ) + mode = LockProcs[(NUMPROCS - NUMSPECIAL + 1)].cmdline_arg; +#endif + + (void) sprintf(modename, "%s.%s", ProgramName, mode); + (void) sprintf(modeclass, "%s.%s", classname, mode); + + /* X11R5 may need these changes to make the modeTable stuff work */ + for (i = 0; i < NMODEARGS; i++) + (void) sprintf(modeTable[i].specifier, ".%s.%s", mode, modevars[i].name); + + XrmParseCommand(&modeDB, modeTable, modeEntries, ProgramName, &argc, argv); + /*XrmParseCommand(&modeDB, modeTable, modeEntries, modeclass, &argc, argv);*/ + (void) XrmMergeDatabases(modeDB, &RDB); + + /* Parse the rest of the command line */ + for (argc--, argv++; argc > 0; argc--, argv++) { + if (**argv != '-') + Syntax(*argv); + switch (argv[0][1]) { + case 'r': + DumpResources(); + /* NOTREACHED */ + default: + Syntax(*argv); + /* NOTREACHED */ + } + } + + /* the RDB is set, now query load the variables from the database */ + + for (i = 0; i < NGENARGS; i++) + GetResource(RDB, ProgramName, classname, + genvars[i].name, genvars[i].class, + genvars[i].type, genvars[i].def, genvars[i].var); + + for (i = 0; i < NMODEARGS; i++) + GetResource(RDB, modename, modeclass, + modevars[i].name, modevars[i].class, + modevars[i].type, modevars[i].def, modevars[i].var); + + (void) XrmDestroyDatabase(RDB); + +#ifndef FORCE_BOMB + if ( full_lock() ) { +#ifdef AUTO_LOGOUT + forceLogout = 0; +#endif +#ifdef LOGOUT_BUTTON + enable_button = 0; +#endif + } +#endif + + if (verbose) { + for (i = 0; i < NGENARGS; i++) + printvar(classname, genvars[i]); + for (i = 0; i < NMODEARGS; i++) + printvar(modename, modevars[i]); + } +} + + +void CheckResources() +{ + int i; + + if (batchcount < 1) + Syntax("-batchcount argument must be positive."); + if (saturation < 0.0 || saturation > 1.0) + Syntax("-saturation argument must be between 0.0 and 1.0."); + if (delay < 0) + Syntax("-delay argument must be positive."); + + /* in case they have a 'xlock*mode: ' empty resource */ + if (!mode || *mode == '\0') + mode = DEF_MODE; + + for (i = 0; i < NUMPROCS; i++) { + if (!strncmp(LockProcs[i].cmdline_arg, mode, strlen(mode))) { + init = LockProcs[i].lp_init; + callback = LockProcs[i].lp_callback; + break; + } + } + if (i == NUMPROCS) { + (void) fprintf(stderr, "Unknown mode: "); + Syntax(mode); + } +} diff --git a/rock.c b/rock.c new file mode 100644 index 00000000..96d959da --- /dev/null +++ b/rock.c @@ -0,0 +1,275 @@ +#ifndef lint +static char sccsid[] = "@(#)rock.c 2.7 95/02/21 xlockmore"; +#endif +/* + * Flying through an asteroid field. Based on TI Explorer Lisp code by + * John Nguyen + * + * Copyright (c) 1992 by Jamie Zawinski + * + * 2-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 1992: xscreensaver version (Jamie Zawinski jwz@lucid.com) + */ + +/* original copyright + * Copyright (c) 1992 by Jamie Zawinski + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +#include +#include +#include "xlock.h" + +#define MIN_DEPTH 2 /* rocks disappear when they get this close */ +#define MAX_DEPTH 60 /* this is where rocks appear */ +#define MAX_WIDTH 100 /* how big (in pixels) rocks are at depth 1 */ +#define DEPTH_SCALE 100 /* how many ticks there are between depths */ +#define RESOLUTION 1000 + +/* there's not much point in the above being user-customizable, but those + numbers might want to be tweaked for displays with an order of magnitude + higher resolution or compute power. + */ +typedef struct { + int real_size; + int r; + unsigned long color; + int theta; + int depth; + int size, x, y; +} arock; + +typedef struct { + int width; + int height; + int midx, midy; + int rotate_p, speed, nrocks; + double cos_array[RESOLUTION], sin_array[RESOLUTION]; + double depths[(MAX_DEPTH + 1) * DEPTH_SCALE]; + arock *arocks; + Pixmap pixmaps[MAX_WIDTH]; +} rockstruct; + +static rockstruct rocks[MAXSCREENS]; + +static void rock_reset(), rock_tick(), rock_compute(), rock_draw(); +static void init_pixmaps(), tick_rocks(); + +static void +rock_reset(win, arocks) + Window win; + arock *arocks; +{ + arocks->real_size = MAX_WIDTH; + arocks->r = (RESOLUTION * 0.7) + (RAND() % (30 * RESOLUTION)); + arocks->theta = RAND() % RESOLUTION; + arocks->depth = MAX_DEPTH * DEPTH_SCALE; + if (!mono && Scr[screen].npixels > 2) + arocks->color = Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + arocks->color = WhitePixel(dsp, screen); + rock_compute(arocks); + rock_draw(win, arocks, True); +} + +static void +rock_tick (win, arocks, d) + Window win; + arock *arocks; + int d; +{ + rockstruct *rp = &rocks[screen]; + if (arocks->depth > 0) + { + rock_draw(win, arocks, False); + arocks->depth -= rp->speed; + if (rp->rotate_p) + arocks->theta = (arocks->theta + d) % RESOLUTION; + while (arocks->theta < 0) + arocks->theta += RESOLUTION; + if (arocks->depth < (MIN_DEPTH * DEPTH_SCALE)) + arocks->depth = 0; + else + { + rock_compute(arocks); + rock_draw(win, arocks, True); + } + } + else if ((RAND() % 40) == 0) + rock_reset(win, arocks); +} + +static void +rock_compute(arocks) + arock *arocks; +{ + rockstruct *rp = &rocks[screen]; + double factor = rp->depths [arocks->depth]; + arocks->size = (int) ((arocks->real_size * factor) + 0.5); + arocks->x = rp->midx + (rp->cos_array[arocks->theta] * arocks->r * factor); + arocks->y = rp->midy + (rp->sin_array[arocks->theta] * arocks->r * factor); +} + +static void +rock_draw(win, arocks, draw_p) + Window win; + arock *arocks; + int draw_p; +{ + rockstruct *rp = &rocks[screen]; + if (draw_p) + XSetForeground(dsp, Scr[screen].gc, arocks->color); + else + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + if (arocks->x <= 0 || arocks->y <= 0 || + arocks->x >= rp->width || arocks->y >= rp->height) + { + /* this means that if a rock were to go off the screen at 12:00, but + would have been visible at 3:00, it won't come back once the observer + rotates around so that the rock would have been visible again. + Oh well. + */ + arocks->depth = 0; + return; + } + if (arocks->size <= 1) + XDrawPoint (dsp, win, Scr[screen].gc, arocks->x, arocks->y); + else if (arocks->size <= 3 || !draw_p) + XFillRectangle(dsp, win, Scr[screen].gc, + arocks->x - arocks->size/2, arocks->y - arocks->size/2, + arocks->size, arocks->size); + else if (arocks->size < MAX_WIDTH) + XCopyPlane(dsp, rp->pixmaps[arocks->size], win, Scr[screen].gc, + 0, 0, arocks->size, arocks->size, + arocks->x - arocks->size/2, arocks->y - arocks->size/2, + 1); +} + +static void +init_pixmaps(win) + Window win; +{ + rockstruct *rp = &rocks[screen]; + int i; + XGCValues gcv; + GC fg_gc = 0, bg_gc = 0; + + rp->pixmaps[0] = rp->pixmaps[1] = 0; + for (i = MIN_DEPTH; i < MAX_WIDTH; i++) + { + int w = (1+(i/32))<<5; /* server might be faster if word-aligned */ + int h = i; + + Pixmap p = XCreatePixmap(dsp, win, w, h, 1); + XPoint points[7]; + rp->pixmaps[i] = p; + if (!p) + { + (void) fprintf (stderr, "%s: couldn't allocate pixmaps", "xlock"); + exit (1); + } + if (!fg_gc) + { /* must use drawable of pixmap, not window (fmh) */ + gcv.foreground = 1; + fg_gc = XCreateGC (dsp, p, GCForeground, &gcv); + gcv.foreground = 0; + bg_gc = XCreateGC (dsp, p, GCForeground, &gcv); + } + XFillRectangle(dsp, p, bg_gc, 0, 0, w, h); + points[0].x = i * 0.15; points[0].y = i * 0.85; + points[1].x = i * 0.00; points[1].y = i * 0.20; + points[2].x = i * 0.30; points[2].y = i * 0.00; + points[3].x = i * 0.40; points[3].y = i * 0.10; + points[4].x = i * 0.90; points[4].y = i * 0.10; + points[5].x = i * 1.00; points[5].y = i * 0.55; + points[6].x = i * 0.45; points[6].y = i * 1.00; + XFillPolygon(dsp, p, fg_gc, points, 7, Nonconvex, CoordModeOrigin); + } + XFreeGC(dsp, fg_gc); + XFreeGC(dsp, bg_gc); +} + +void +initrock(win) + Window win; +{ + rockstruct *rp = &rocks[screen]; + int i; + XWindowAttributes xgwa; + (void) XGetWindowAttributes(dsp, win, &xgwa); + + rp->width = xgwa.width; + rp->height = xgwa.height; + rp->midx = rp->width/2; + rp->midy = rp->height/2; + rp->speed = 100; + rp->rotate_p = True; + if (batchcount < 1) + batchcount = 1; + rp->nrocks = batchcount; + if (rp->speed < 1) rp->speed = 1; + if (rp->speed > 100) rp->speed = 100; + + for (i = 0; i < RESOLUTION; i++) + { + rp->sin_array[i] = sin((((double) i) / (RESOLUTION / 2)) * M_PI); + rp->cos_array[i] = cos((((double) i) / (RESOLUTION / 2)) * M_PI); + } + /* we actually only need i/speed of these, but wtf */ + for (i = 1; i < (sizeof(rp->depths) / sizeof(rp->depths[0])); i++) + rp->depths[i] = atan(((double) 0.5) / (((double) i) / DEPTH_SCALE)); + rp->depths[0] = M_PI/2; /* avoid division by 0 */ + + if (!rp->arocks) + rp->arocks = (arock *) calloc(rp->nrocks, sizeof(arock)); + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, rp->width, rp->height); + init_pixmaps(win); +} + +static void +tick_rocks(win, d) + Window win; + int d; +{ + rockstruct *rp = &rocks[screen]; + int i; + for (i = 0; i < rp->nrocks; i++) + rock_tick(win, &rp->arocks[i], d); +} + +void +drawrock(win) + Window win; +{ + static int current_delta = 0; /* observer Z rotation */ + static int window_tick = 50; + static int new_delta = 0; + static int dchange_tick = 0; + + if (window_tick++ == 50) + window_tick = 0; + if (current_delta != new_delta) { + if (dchange_tick++ == 5) { + dchange_tick = 0; + if (current_delta < new_delta) + current_delta++; + else + current_delta--; + } + } else { + if ((RAND() % 50) == 0) { + new_delta = ((RAND() % 11) - 5); + if ((RAND() % 10) == 0) + new_delta *= 5; + } + } + tick_rocks (win, current_delta); +} diff --git a/rotor.c b/rotor.c new file mode 100644 index 00000000..913a3e39 --- /dev/null +++ b/rotor.c @@ -0,0 +1,250 @@ +#ifndef lint +static char sccsid[] = "@(#)rotor.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * rotor.c - A swirly rotor for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * 01-Dec-93: added patch for AIXV3 from + * (Tom McConnell, tmcconne@sedona.intel.com) + * 11-Nov-90: put into xlock (by Steve Zellers, zellers@sun.com) + * 16-Oct-90: Received from Tom Lawrence (tcl@cs.brown.edu: 'flight' simulator) + */ + +/* + * A 'batchcount' of 3 or 4 works best! + */ + +#include +#include "xlock.h" + +#define SAVE 100 /* this is a good constant to tweak */ +#define REPS 50 + +#define MAXANGLE 10000.0 /* irrectangular */ +#define DEFAULTCOUNT 3 + +typedef unsigned char Boolean; + +#define IDENT(X) X +#if defined (__STDC__) || defined (AIXV3) || defined (sgi) +#define CAT(X,Y) X##Y +#else +#define CAT(X,Y) IDENT(X)Y +#endif + +struct elem { + float angle; + float radius; + float start_radius; + float end_radius; + float radius_drift_max; + float radius_drift_now; + + float ratio; + float start_ratio; + float end_ratio; + float ratio_drift_max; + float ratio_drift_now; +}; + +typedef struct flightstruct { + struct elem *elements; + int pix; + int lastx, + lasty; + int num, + rotor, + prev; + int savex[SAVE], + savey[SAVE]; + float angle; + int centerx, + centery; + Boolean firsttime; + Boolean smallscreen; /* for iconified view */ + Boolean forward; + Boolean unused; +} flightstruct; + + +static flightstruct flights[MAXSCREENS]; + +void +initrotor(win) + Window win; +{ + flightstruct *fs = &flights[screen]; + XWindowAttributes xgwa; + int x; + struct elem *pelem; + Boolean wassmall; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + fs->centerx = xgwa.width / 2; + fs->centery = xgwa.height / 2; + + /* + * sometimes, you go into small view, only to see a really whizzy pattern + * that you would like to look more closely at. Normally, clicking in the + * icon reinitializes everything - but I don't, cuz I'm that kind of guy. + * HENCE, the wassmall stuff you see here. + */ + + wassmall = fs->smallscreen; + fs->smallscreen = (xgwa.width < 100); + + if (wassmall && !fs->smallscreen) + fs->firsttime = True; + else { + if (batchcount > 12) + batchcount = DEFAULTCOUNT; + fs->num = batchcount; + + if (fs->elements == NULL) { + if ((fs->elements = (struct elem *) + malloc(sizeof(struct elem) * fs->num)) == 0) { + perror("malloc"); + exit(1); + } + } + (void) memset(fs->savex, 0, sizeof(fs->savex)); + + pelem = fs->elements; + + for (x = fs->num; --x >= 0; pelem++) { + pelem->radius_drift_max = 1.0; + pelem->radius_drift_now = 1.0; + + pelem->end_radius = 100.0; + + pelem->ratio_drift_max = 1.0; + pelem->ratio_drift_now = 1.0; + pelem->end_ratio = 10.0; + } + + fs->rotor = 0; + fs->prev = 1; + fs->lastx = fs->centerx; + fs->lasty = fs->centery; + fs->angle = (RAND() % (long) MAXANGLE) / 3; + fs->forward = fs->firsttime = True; + } + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, xgwa.width, xgwa.height); +} + +void +drawrotor(win) + Window win; +{ + register flightstruct *fs = &flights[screen]; + register struct elem *pelem; + int thisx, + thisy; + int i, + rp; + int x1, + y1, + x2, + y2; + + +#define SCALE(W,N) CAT(W,N)/=12; CAT(W,N)+=(CAT(fs->center,W)-2) +#define SCALEIFSMALL() if (fs->smallscreen) { \ + SCALE(x,1); SCALE(x,2); \ + SCALE(y,1); SCALE(y,2); \ + } + + for (rp = 0; rp < REPS; rp++) { + thisx = fs->centerx; + thisy = fs->centery; + + for (i = fs->num, pelem = fs->elements; --i >= 0; pelem++) { + if (pelem->radius_drift_max <= pelem->radius_drift_now) { + pelem->start_radius = pelem->end_radius; + pelem->end_radius = + (float) (RAND() % 40000) / 100.0 - 200.0; + pelem->radius_drift_max = + (float) (RAND() % 100000) + 10000.0; + pelem->radius_drift_now = 0.0; + } + if (pelem->ratio_drift_max <= pelem->ratio_drift_now) { + pelem->start_ratio = pelem->end_ratio; + pelem->end_ratio = + (float) (RAND() % 2000) / 100.0 - 10.0; + pelem->ratio_drift_max = + (float) (RAND() % 100000) + 10000.0; + pelem->ratio_drift_now = 0.0; + } + pelem->ratio = pelem->start_ratio + + (pelem->end_ratio - pelem->start_ratio) / + pelem->ratio_drift_max * pelem->ratio_drift_now; + pelem->angle = fs->angle * pelem->ratio; + pelem->radius = pelem->start_radius + + (pelem->end_radius - pelem->start_radius) / + pelem->radius_drift_max * pelem->radius_drift_now; + + thisx += (int) (cos(pelem->angle) * pelem->radius); + thisy += (int) (sin(pelem->angle) * pelem->radius); + + pelem->ratio_drift_now += 1.0; + pelem->radius_drift_now += 1.0; + } + if (fs->firsttime) + fs->firsttime = False; + else { + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + + x1 = (int) fs->savex[fs->rotor]; + y1 = (int) fs->savey[fs->rotor]; + x2 = (int) fs->savex[fs->prev]; + y2 = (int) fs->savey[fs->prev]; + + SCALEIFSMALL(); + + XDrawLine(dsp, win, Scr[screen].gc, x1, y1, x2, y2); + + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, + Scr[screen].pixels[fs->pix]); + if (++fs->pix >= Scr[screen].npixels) + fs->pix = 0; + } else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + + x1 = fs->lastx; + y1 = fs->lasty; + x2 = thisx; + y2 = thisy; + + SCALEIFSMALL(); + + XDrawLine(dsp, win, Scr[screen].gc, x1, y1, x2, y2); + } + fs->savex[fs->rotor] = fs->lastx = thisx; + fs->savey[fs->rotor] = fs->lasty = thisy; + + ++fs->rotor; + fs->rotor %= SAVE; + ++fs->prev; + fs->prev %= SAVE; + if (fs->forward) { + fs->angle += 0.01; + if (fs->angle >= MAXANGLE) { + fs->angle = MAXANGLE; + fs->forward = False; + } + } else { + fs->angle -= 0.1; + if (fs->angle <= 0) { + fs->angle = 0.0; + fs->forward = True; + } + } + } +} diff --git a/sphere.c b/sphere.c new file mode 100644 index 00000000..b6fb8fe9 --- /dev/null +++ b/sphere.c @@ -0,0 +1,119 @@ +#ifndef lint +static char sccsid[] = "@(#)sphere.c 2.7 95/02/21 xlockmore"; +#endif + +/*- + * sphere.c - Draw a bunch of shaded spheres for xlock, + * the X Window System lockscreen. + * + * Copyright (c) 1988 by Sun Microsystems + * + * See xlock.c for copying information. + * + * Revision History: + * 2-Sep-93: xlock version (David Bagley bagleyd@source.asset.com) + * 1988: Revised to use SunView canvas instead of gfxsw Sun Microsystems + * 1982: Orignal Algorithm Tom Duff Lucasfilm Ltd. + */ + +/* original copyright + ****************************************************************************** + Copyright 1988 by Sun Microsystems, Inc. Mountain View, CA. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the names of Sun or MIT not be + used in advertising or publicity pertaining to distribution of the + software without specific prior written permission. Sun and M.I.T. + make no representations about the suitability of this software for + any purpose. It is provided "as is" without any express or implied warranty. + + SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT + OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE + OR PERFORMANCE OF THIS SOFTWARE. + *****************************************************************************/ + +#include +#include "xlock.h" +/* + * (NX, NY, NZ) is the light source vector -- length should be + * 100 + */ +#define NX 48 +#define NY (-36) +#define NZ 80 +#define NR 100 +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define SQRT(a) ((int)sqrt((double)(a))) + +typedef struct { + int width, height; + int radius; + int x0; /* x center */ + int y0; /* y center */ + int color; + int x; + int maxy; +} spherestruct; + +static spherestruct spheres[MAXSCREENS]; + +void +initsphere(win) + Window win; +{ + spherestruct *ss = &spheres[screen]; + XWindowAttributes xwa; + + (void) XGetWindowAttributes(dsp, win, &xwa); + ss->width = xwa.width; + ss->height = xwa.height; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, ss->width, ss->height); + + ss->x = ss->radius = 0; +} + +void +drawsphere(win) + Window win; +{ + spherestruct *ss = &spheres[screen]; + register y; + + if (ss->x >= ss->radius) { + ss->radius = RAND() % (MIN(ss->width / 2, ss->height / 2) - 1) + 1; + ss->x0 = RAND() % ss->width; + ss->y0 = RAND() % ss->height; + ss->x = -ss->radius; + + if (Scr[screen].npixels > 2) + ss->color = RAND() % Scr[screen].npixels; + } + ss->maxy = SQRT(ss->radius * ss->radius - ss->x * ss->x); + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XDrawLine(dsp, win, Scr[screen].gc, + ss->x0 + ss->x, ss->y0 - ss->maxy, + ss->x0 + ss->x, ss->y0 + ss->maxy); + if (!mono && Scr[screen].npixels > 2) + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[ss->color]); + else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + for (y = -ss->maxy; y <= ss->maxy; y++) + if ((RAND() % (ss->radius * NR)) <= + (NX * ss->x + NY * y + NZ * + SQRT(ss->radius * ss->radius - ss->x * ss->x - y * y))) + XDrawPoint(dsp, win, Scr[screen].gc, + ss->x + ss->x0, y + ss->y0); + ss->x++; +} + diff --git a/spline.c b/spline.c new file mode 100644 index 00000000..c1202f05 --- /dev/null +++ b/spline.c @@ -0,0 +1,176 @@ +#ifndef lint +static char sccsid[] = "@(#)spline.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * spline.c - spline fun #3 + * + * Copyright (c) 1992 by Jef Poskanzer + * + * See xlock.c for copying information. + * + * Revision History: + * 2-Sep-93: xlock version: (David Bagley bagleyd@source.asset.com) + * 1992: X11 version (Jef Poskanzer jef@netcom.com || jef@well.sf.ca.us) + * + */ + +/* original copyright +** xsplinefun.c - X11 version of spline fun #3 +** +** Displays colorful moving splines in the X11 root window. +** +** Copyright (C) 1992 by Jef Poskanzer +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + +#include "xlock.h" + +#define MAXPOINTS 99 +#define MAX_DELTA 3 +#define MAX_SPLINES 2048 + +#define SPLINE_THRESH 5 + +typedef struct { + int width; + int height; + int color; + int points; + int generation; + int x[MAXPOINTS], y[MAXPOINTS], dx[MAXPOINTS], dy[MAXPOINTS]; +} splinestruct; + +static splinestruct splines[MAXSCREENS]; + +static void XDrawSpline(); + +void +initspline(win) + Window win; +{ + int i; + XWindowAttributes xgwa; + splinestruct *sp = &splines[screen]; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + sp->width = xgwa.width; + sp->height = xgwa.height; + /* batchcount is the upper bound on the number of points */ + if (batchcount > MAXPOINTS || batchcount <= 3) + batchcount = 5; + /*sp->points = batchcount;*/ + sp->points = RAND() % (batchcount - 3) + 3; + sp->generation = 0; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, sp->width, sp->height); + + /* Initialize points. */ + for ( i = 0; i < sp->points; ++i ) + { + sp->x[i] = RAND() % sp->width; + sp->y[i] = RAND() % sp->height; + sp->dx[i] = RAND() % ( MAX_DELTA * 2 ) - MAX_DELTA; + if ( sp->dx[i] <= 0 ) --sp->dx[i]; + sp->dy[i] = RAND() % ( MAX_DELTA * 2 ) - MAX_DELTA; + if ( sp->dy[i] <= 0 ) --sp->dy[i]; + } + + sp->color = 0; +} + + +void +drawspline(win) + Window win; +{ + int i, t, px, py, zx, zy, nx, ny; + splinestruct *sp = &splines[screen]; + + /* Move the points. */ + for ( i = 0; i < sp->points; i++ ) + { + for ( ; ; ) + { + t = sp->x[i] + sp->dx[i]; + if ( t >= 0 && t < sp->width ) break; + sp->dx[i] = RAND() % ( MAX_DELTA * 2 ) - MAX_DELTA; + if ( sp->dx[i] <= 0 ) --sp->dx[i]; + } + sp->x[i] = t; + for ( ; ; ) + { + t = sp->y[i] + sp->dy[i]; + if ( t >= 0 && t < sp->height ) break; + sp->dy[i] = RAND() % ( MAX_DELTA * 2 ) - MAX_DELTA; + if ( sp->dy[i] <= 0 ) --sp->dy[i]; + } + sp->y[i] = t; + } + + /* Draw the figure. */ + px = zx = ( sp->x[0] + sp->x[sp->points-1] ) / 2; + py = zy = ( sp->y[0] + sp->y[sp->points-1] ) / 2; + for ( i = 0; i < sp->points-1; ++i ) + { + nx = ( sp->x[i+1] + sp->x[i] ) / 2; + ny = ( sp->y[i+1] + sp->y[i] ) / 2; + XDrawSpline( dsp, win, Scr[screen].gc, + px, py, sp->x[i], sp->y[i], nx, ny ); + px = nx; + py = ny; + } + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[sp->color]); + if (++sp->color >= Scr[screen].npixels) + sp->color = 0; + } else + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + + XDrawSpline( dsp, win, Scr[screen].gc, + px, py, sp->x[sp->points-1], sp->y[sp->points-1], zx, zy ); + + if (++sp->generation > MAX_SPLINES) + initspline(win); +} + +/* X spline routine. */ + +#define ABS(x) ((x) < 0 ? -(x) : (x)) + +static void +XDrawSpline(display, d, gc, x0, y0, x1, y1, x2, y2) +Display* display; +Drawable d; +GC gc; +int x0, y0, x1, y1, x2, y2; + { + register int xa, ya, xb, yb, xc, yc, xp, yp; + + xa = (x0 + x1) / 2; + ya = (y0 + y1) / 2; + xc = (x1 + x2) / 2; + yc = (y1 + y2) / 2; + xb = (xa + xc) / 2; + yb = (ya + yc) / 2; + + xp = (x0 + xb) / 2; + yp = (y0 + yb) / 2; + if (ABS(xa - xp) + ABS(ya - yp) > SPLINE_THRESH) + XDrawSpline(display, d, gc, x0, y0, xa, ya, xb, yb); + else + XDrawLine(display, d, gc, x0, y0, xb, yb); + + xp = (x2 + xb) / 2; + yp = (y2 + yb) / 2; + if (ABS(xc - xp) + ABS(yc - yp) > SPLINE_THRESH) + XDrawSpline(display, d, gc, xb, yb, xc, yc, x2, y2); + else + XDrawLine(display, d, gc, xb, yb, x2, y2); + } diff --git a/swarm.c b/swarm.c new file mode 100644 index 00000000..cf706ad9 --- /dev/null +++ b/swarm.c @@ -0,0 +1,201 @@ +#ifndef lint +static char sccsid[] = "@(#)swarm.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * swarm.c - swarm of bees for xlock, the X Window System lockscreen. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Revision History: + * 31-Aug-90: Adapted from xswarm by Jeff Butterworth. (butterwo@ncsc.org) + */ + +#include "xlock.h" + +#define TIMES 4 /* number of time positions recorded */ +#define BEEACC 2 /* acceleration of bees */ +#define WASPACC 5 /* maximum acceleration of wasp */ +#define BEEVEL 12 /* maximum bee velocity */ +#define WASPVEL 10 /* maximum wasp velocity */ + +/* Macros */ +#define X(t,b) (sp->x[(t)*sp->beecount+(b)]) +#define Y(t,b) (sp->y[(t)*sp->beecount+(b)]) +#define balance_rand(v) ((RAND()%(v))-((v)/2)) /* random number around 0 */ + +typedef struct { + int pix; + int width; + int height; + int border; /* wasp won't go closer than this to the edge */ + int beecount; /* number of bees */ + XSegment *segs; /* bee lines */ + XSegment *old_segs; /* old bee lines */ + short *x; + short *y; /* bee positions x[time][bee#] */ + short *xv; + short *yv; /* bee velocities xv[bee#] */ + short wx[3]; + short wy[3]; + short wxv; + short wyv; +} swarmstruct; + +static swarmstruct swarms[MAXSCREENS]; + +void +initswarm(win) + Window win; +{ + XWindowAttributes xgwa; + swarmstruct *sp = &swarms[screen]; + int b; + + sp->beecount = batchcount; + + (void) XGetWindowAttributes(dsp, win, &xgwa); + sp->width = xgwa.width; + sp->height = xgwa.height; + sp->border = (sp->width + sp->height) / 50; + + /* Clear the background. */ + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, sp->width, sp->height); + + /* Allocate memory. */ + + if (!sp->segs) { + sp->segs = (XSegment *) malloc(sizeof(XSegment) * sp->beecount); + sp->old_segs = (XSegment *) malloc(sizeof(XSegment) * sp->beecount); + sp->x = (short *) malloc(sizeof(short) * sp->beecount * TIMES); + sp->y = (short *) malloc(sizeof(short) * sp->beecount * TIMES); + sp->xv = (short *) malloc(sizeof(short) * sp->beecount); + sp->yv = (short *) malloc(sizeof(short) * sp->beecount); + } + /* Initialize point positions, velocities, etc. */ + + /* wasp */ + sp->wx[0] = sp->border + RAND() % (sp->width - 2 * sp->border); + sp->wy[0] = sp->border + RAND() % (sp->height - 2 * sp->border); + sp->wx[1] = sp->wx[0]; + sp->wy[1] = sp->wy[0]; + sp->wxv = 0; + sp->wyv = 0; + + /* bees */ + for (b = 0; b < sp->beecount; b++) { + X(0, b) = RAND() % sp->width; + X(1, b) = X(0, b); + Y(0, b) = RAND() % sp->height; + Y(1, b) = Y(0, b); + sp->xv[b] = balance_rand(7); + sp->yv[b] = balance_rand(7); + } +} + + + +void +drawswarm(win) + Window win; +{ + swarmstruct *sp = &swarms[screen]; + int b; + + /* <=- Wasp -=> */ + /* Age the arrays. */ + sp->wx[2] = sp->wx[1]; + sp->wx[1] = sp->wx[0]; + sp->wy[2] = sp->wy[1]; + sp->wy[1] = sp->wy[0]; + /* Accelerate */ + sp->wxv += balance_rand(WASPACC); + sp->wyv += balance_rand(WASPACC); + + /* Speed Limit Checks */ + if (sp->wxv > WASPVEL) + sp->wxv = WASPVEL; + if (sp->wxv < -WASPVEL) + sp->wxv = -WASPVEL; + if (sp->wyv > WASPVEL) + sp->wyv = WASPVEL; + if (sp->wyv < -WASPVEL) + sp->wyv = -WASPVEL; + + /* Move */ + sp->wx[0] = sp->wx[1] + sp->wxv; + sp->wy[0] = sp->wy[1] + sp->wyv; + + /* Bounce Checks */ + if ((sp->wx[0] < sp->border) || (sp->wx[0] > sp->width - sp->border - 1)) { + sp->wxv = -sp->wxv; + sp->wx[0] += sp->wxv; + } + if ((sp->wy[0] < sp->border) || (sp->wy[0] > sp->height - sp->border - 1)) { + sp->wyv = -sp->wyv; + sp->wy[0] += sp->wyv; + } + /* Don't let things settle down. */ + sp->xv[RAND() % sp->beecount] += balance_rand(3); + sp->yv[RAND() % sp->beecount] += balance_rand(3); + + /* <=- Bees -=> */ + for (b = 0; b < sp->beecount; b++) { + int distance, + dx, + dy; + /* Age the arrays. */ + X(2, b) = X(1, b); + X(1, b) = X(0, b); + Y(2, b) = Y(1, b); + Y(1, b) = Y(0, b); + + /* Accelerate */ + dx = sp->wx[1] - X(1, b); + dy = sp->wy[1] - Y(1, b); + distance = abs(dx) + abs(dy); /* approximation */ + if (distance == 0) + distance = 1; + sp->xv[b] += (dx * BEEACC) / distance; + sp->yv[b] += (dy * BEEACC) / distance; + + /* Speed Limit Checks */ + if (sp->xv[b] > BEEVEL) + sp->xv[b] = BEEVEL; + if (sp->xv[b] < -BEEVEL) + sp->xv[b] = -BEEVEL; + if (sp->yv[b] > BEEVEL) + sp->yv[b] = BEEVEL; + if (sp->yv[b] < -BEEVEL) + sp->yv[b] = -BEEVEL; + + /* Move */ + X(0, b) = X(1, b) + sp->xv[b]; + Y(0, b) = Y(1, b) + sp->yv[b]; + + /* Fill the segment lists. */ + sp->segs[b].x1 = X(0, b); + sp->segs[b].y1 = Y(0, b); + sp->segs[b].x2 = X(1, b); + sp->segs[b].y2 = Y(1, b); + sp->old_segs[b].x1 = X(1, b); + sp->old_segs[b].y1 = Y(1, b); + sp->old_segs[b].x2 = X(2, b); + sp->old_segs[b].y2 = Y(2, b); + } + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XDrawLine(dsp, win, Scr[screen].gc, + sp->wx[1], sp->wy[1], sp->wx[2], sp->wy[2]); + XDrawSegments(dsp, win, Scr[screen].gc, sp->old_segs, sp->beecount); + + XSetForeground(dsp, Scr[screen].gc, WhitePixel(dsp, screen)); + XDrawLine(dsp, win, Scr[screen].gc, + sp->wx[0], sp->wy[0], sp->wx[1], sp->wy[1]); + if (!mono && Scr[screen].npixels > 2) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[sp->pix]); + if (++sp->pix >= Scr[screen].npixels) + sp->pix = 0; + } + XDrawSegments(dsp, win, Scr[screen].gc, sp->segs, sp->beecount); +} diff --git a/swirl.c b/swirl.c new file mode 100644 index 00000000..b4563fb5 --- /dev/null +++ b/swirl.c @@ -0,0 +1,1398 @@ +#ifndef lint +static char sccsid[] = "@(#)swirl.c 2.7 95/02/21 xlockmore"; +#endif +/* + * swirl.c - swirly patterns for xlock + * + * See xlock.c for copying information. + * + * Revision History: + * 09-Jan-95: fixed colour maps (more colourful) and the image now spirals + * outwards from the centre with a fixed number of points drawn + * every iteration. Thanks to M.Dobie . + * 1994: written. Copyright (c) 1994 M.Dobie + * based on original code by R.Taylor + */ + +#include +#include +#include + +#include "xlock.h" + +/****************************************************************/ + +#define MASS 4 /* maximum mass of a knot */ +#define MIN_RES 5 /* minimim resolution (>= MIN_RES) */ +#define MAX_RES 1 /* maximum resolution (>0) */ +#define TWO_PLANE_PCNT 30 /* probability for two plane mode (0-100) */ +#define RESTART 2000 /* number of cycles before restart */ +#define BATCH_DRAW 100 /* points to draw per iteration */ + +/* knot types */ +typedef enum +{ + NONE = 0, + ORBIT = (1 << 0), + WHEEL = (1 << 1), + PICASSO = (1 << 2), + RAY = (1 << 3), + HOOK = (1 << 4), + ALL = (1 << 5) +} KNOT_T ; + +/* a knot */ +typedef struct Knot +{ + int x,y ; /* position */ + int m ; /* mass */ + KNOT_T t ; /* type in the first (or only) plane */ + KNOT_T T ; /* type in second plane if there is one */ + int M ; /* mass in second plane if there is one */ +} KNOT, *KNOT_P ; + +/* a colour specification */ +typedef struct Colour +{ + unsigned short r, g, b ; +} +COLOUR, *COLOUR_P ; + +/* drawing direction */ +typedef enum +{ + DRAW_RIGHT, DRAW_DOWN, DRAW_LEFT, DRAW_UP +} DIR_T ; + +/****************************************************************/ + +/* data associated with a swirl window */ +typedef struct swirl_data +{ + /* window paramaters */ + Window win ; /* the window */ + int width, height ; /* window size */ + int depth ; /* depth */ + Visual *visual ; /* visual */ + + /* swirl drawing parameters */ + int n_knots ; /* number of knots */ + KNOT_P knots ; /* knot details */ + KNOT_T knot_type ; /* general type of knots */ + int resolution ; /* drawing resolution, 1..5 */ + int max_resolution ; /* maximum resolution, MAX_RES */ + int r ; /* pixel step */ + Bool two_plane ; /* two plane mode? */ + Bool first_plane ; /* doing first plane? */ + int start_again ; /* when to restart */ + + /* spiral drawing parameters */ + int x, y ; /* current point */ + DIR_T direction ; /* current direction */ + int dir_todo, dir_done ; /* how many points in current direction? */ + int batch_todo, batch_done ; /* how many points in this batch */ + Bool started, drawing ; /* are we drawing? */ + + /* image stuff */ + unsigned char *image ; /* image data */ + XImage *ximage ; + + /* colours stuff */ + int colours ; /* how many colours possible */ + int dcolours ; /* how many colours for shading */ + Bool fixed_colourmap;/* fixed colourmap? */ + Bool monochrome ; /* monochrome? */ + Colormap cmap ; /* colour map for the window */ + XColor *rgb_values ; /* colour definitions array */ + int current_map ; /* current colour map, 0..dcolours-1 */ + unsigned long fg, bg, black ; /* black and white pixel values */ + int shift ; /* colourmap shift */ + int dshift ; /* colourmap shift while drawing */ + XColor fgcol, bgcol ; /* foreground and background colour specs */ +} SWIRL, *SWIRL_P ; + +#define SWIRLCOLOURS 13 +/* basic colours */ +static COLOUR basic_colours[SWIRLCOLOURS] ; + +/* an array of swirls for each screen */ +static SWIRL_P swirls = NULL ; + +/* + random_no + + Return a random integer between 0 and n inclusive + + - n is the maximum number + + Returns a random integer +*/ + +static int random_no(n) +unsigned int n; +{ + return((int)((n+1) * (double)RAND() / MAXRAND)) ; +} + +/****************************************************************/ + +/* + init_swirl + + Initialise all the swirl data + + - swirl is the swirl data +*/ + +static void init_swirl(swirl) +SWIRL_P swirl; +{ + swirl->width = 0 ; /* width and height of window */ + swirl->height = 0 ; + swirl->depth = 0 ; + swirl->visual = NULL ; + swirl->resolution = MIN_RES+1 ; /* current resolution */ + swirl->max_resolution = MAX_RES ; /* maximum resolution */ + swirl->n_knots = 0 ; /* number of knots */ + swirl->knot_type = ALL ; /* general type of knots */ + swirl->two_plane = False ; /* two plane mode? */ + swirl->first_plane = False ; /* doing first plane? */ + swirl->start_again = -1 ; /* restart counter */ + + /* drawing parameters */ + swirl->x = 0 ; + swirl->y = 0 ; + swirl->started = False ; + swirl->drawing = False ; + + /* image stuff */ + swirl->image = NULL ; /* image data */ + swirl->ximage = NULL ; + + /* colours stuff */ + swirl->colours = 0 ; /* how many colours possible */ + swirl->dcolours = 0 ; /* how many colours for shading */ + swirl->cmap = (Colormap)NULL ; + swirl->rgb_values = NULL ;/* colour definitions array */ + swirl->current_map = 0 ; /* current colour map, 0..dcolours-1 */ + + /* set up fg fb colour specs */ + swirl->black = BlackPixel(dsp, screen) ; + swirl->fg = Scr[screen].fgcol ; + swirl->bg = Scr[screen].bgcol ; + swirl->fgcol.pixel = swirl->fg ; + swirl->bgcol.pixel = swirl->bg ; + XQueryColor(dsp, DefaultColormap(dsp, screen), &(swirl->fgcol)) ; + XQueryColor(dsp, DefaultColormap(dsp, screen), &(swirl->bgcol)) ; +} + +/****************************************************************/ + +/* + init_image + + Initialise the image for drawing to + + - swirl is the swirl data +*/ + +static void init_image(swirl) +SWIRL_P swirl; +{ + unsigned int pad ; + unsigned int bytes_per_line ; + + /* get the bitmap pad */ + pad = BitmapPad(dsp) ; + + /* destroy the old image (destroy XImage and data) */ + if (swirl->ximage != NULL) + XDestroyImage(swirl->ximage) ; + + /* how many bytes per line? (bits rounded up to pad) */ + bytes_per_line = ((swirl->width*swirl->depth + pad-1) / pad) * (pad/8) ; + + /* allocate space for the image */ + swirl->image = (unsigned char *)calloc(bytes_per_line*swirl->height, 1) ; + + /* create an ximage with this */ + swirl->ximage = XCreateImage(dsp, swirl->visual, swirl->depth, ZPixmap, + 0, (char *)swirl->image, swirl->width, + swirl->height, pad, bytes_per_line) ; +} + +/****************************************************************/ + +/* + init_colours + + Initialise the list of colours from which the colourmaps + are derived + + - colours is the array to initialise + - saturation is the saturation value to use + 0->grey, 1.0->full saturation +*/ + +static void init_colours(colours, saturate) +COLOUR *colours; +float saturate; +{ + int i ; + + /* start off fully saturated, medium and bright colours */ + colours[0].r = 0xA000 ; colours[0].g = 0x0000 ; colours[0].b = 0x0000 ; + colours[1].r = 0xD000 ; colours[1].g = 0x0000 ; colours[1].b = 0x0000 ; + colours[2].r = 0x0000 ; colours[2].g = 0x6000 ; colours[2].b = 0x0000 ; + colours[3].r = 0x0000 ; colours[3].g = 0x9000 ; colours[3].b = 0x0000 ; + colours[4].r = 0x0000 ; colours[4].g = 0x0000 ; colours[4].b = 0xC000 ; + colours[5].r = 0x0000 ; colours[5].g = 0x0000 ; colours[5].b = 0xF000 ; + colours[6].r = 0xA000 ; colours[6].g = 0x6000 ; colours[6].b = 0x0000 ; + colours[7].r = 0xD000 ; colours[7].g = 0x9000 ; colours[7].b = 0x0000 ; + colours[8].r = 0xA000 ; colours[8].g = 0x0000 ; colours[8].b = 0xC000 ; + colours[9].r = 0xD000 ; colours[9].g = 0x0000 ; colours[9].b = 0xF000 ; + colours[10].r= 0x0000 ; colours[10].g= 0x6000 ; colours[10].b= 0xC000 ; + colours[11].r= 0x0000 ; colours[11].g= 0x9000 ; colours[11].b= 0xF000 ; + colours[12].r= 0xA000 ; colours[12].g= 0xA000 ; colours[12].b= 0xA000 ; + + /* add white for low saturation */ + for (i=0 ; icolours[i].g)?colours[i].r:colours[i].g ; + max = (max_rg>colours[i].b)?max_rg:colours[i].b ; + + /* bring elements up to max as saturation approaches 0.0 */ + colours[i].r += ((1.0-saturate) * (max-colours[i].r)) ; + colours[i].g += ((1.0-saturate) * (max-colours[i].g)) ; + colours[i].b += ((1.0-saturate) * (max-colours[i].b)) ; + } +} + +/****************************************************************/ + +/* + set_black_and_white + + Set the entries for foreground and background pixels and BlackPixel + in an array of colour specifications. + + - swirl is the swirl data + - values is the array of specifications +*/ + +static void set_black_and_white(swirl, values) +SWIRL_P swirl; +XColor *values; +{ + unsigned long black ; + + /* where is black? */ + black = swirl->black ; + + /* set black up */ + values[black].flags = DoRed | DoGreen | DoBlue ; + values[black].pixel = black ; + values[black].red = 0 ; + values[black].green = 0 ; + values[black].blue = 0 ; + + /* copy the colour specs from the original entries */ + values[swirl->fg] = swirl->fgcol ; + values[swirl->bg] = swirl->bgcol ; +} + +/****************************************************************/ + +/* + set_colour + + Set an entry in an array of XColor specifications. The given entry + will be set to the given colour. If the entry corresponds to the + foreground, background, or BlackPixel it is ignored and + the given colour is is put in the next entry. + + Therefore, the given colour may be placed up to three places after the + specified entry in the array, if foreground, background, or black + intervene. + + - swirl is the swirl data + - value points to a pointer to the array entry. It gets updated to + point to the next free entry. + - pixel points to the current pixel number. It gets updated. + - c points to the colour to add +*/ + +static void set_colour(swirl, value, pixel, c) +SWIRL_P swirl; +XColor **value; +unsigned long *pixel; +COLOUR_P c; +{ + Bool done ; + unsigned long fg, bg, black ; + + /* where are foreground, background, and black? */ + fg = swirl->fg ; + bg = swirl->bg ; + black = swirl->black ; + + /* haven't set it yet */ + done = False ; + + /* try and set the colour */ + while(!done) + { + (**value).flags = DoRed | DoGreen | DoBlue ; + (**value).pixel = *pixel ; + + /* black, fg, bg, or a colour? */ + if ((*pixel != fg) && (*pixel != bg) && (*pixel != black)) + { + (**value).red = c->r ; + (**value).green = c->g ; + (**value).blue = c->b ; + + /* now we've done it */ + done = True ; + } + + /* next pixel */ + (*value)++ ; + (*pixel)++ ; + } +} + +/****************************************************************/ + +/* + get_colour + + Get an entry from an array of XColor specifications. The next colour + from the array will be returned. Foreground, background, or BlackPixel + will be ignored. + + - swirl is the swirl data + - value points the array entry. It is updated to point to the + entry following the one returned. + - c is set to the colour found +*/ + +static void get_colour(swirl, value, c) +SWIRL_P swirl; +XColor **value; +COLOUR_P c; +{ + Bool done ; + unsigned long fg, bg, black ; + + /* where is black? */ + fg = swirl->fg ; + bg = swirl->bg ; + black = swirl->black ; + + /* haven't set it yet */ + done = False ; + + /* try and set the colour */ + while(!done) + { + /* black, white or a colour? */ + if (((*value)->pixel != fg) && ((*value)->pixel != bg) && + ((*value)->pixel != black)) + { + c->r = (*value)->red ; + c->g = (*value)->green ; + c->b = (*value)->blue ; + + /* now we've done it */ + done = True ; + } + + /* next value */ + (*value)++ ; + } +} + +/****************************************************************/ + +/* + interpolate + + Generate n colours between c1 and c2. n XColors at *value are + set up with ascending pixel values. + + If the pixel range includes BlackPixel or WhitePixel they are + set to black and white respectively but otherwise ignored. + Therefore, up to n+2 colours may actually be set by this + function. + + - swirl is the swirl data + - values points a pointer to an array of XColors to update + - pixel points to the pixel number to start at + - n is the number of colours to generate + - c1, c2 are the colours to interpolate between +*/ + +static void interpolate(swirl, values, pixel, n, c1, c2) +SWIRL_P swirl; +XColor **values; +unsigned long *pixel; +int n; +COLOUR_P c1, c2; +{ + int i, r, g, b ; + COLOUR c ; + unsigned short maxv ; + + /* maximum value */ + maxv = (255 << 8) ; + + for (i=0; icolours; i++) + { + /* work out the colour */ + r = c1->r + 2*i*c2->r/n ; + c.r = (r > maxv) ? maxv : r ; + g = c1->g + 2*i*c2->g/n ; + c.g = (g > maxv) ? maxv : g ; + b = c1->b + 2*i*c2->b/n ; + c.b = (b > maxv) ? maxv : b ; + + /* set it up */ + set_colour(swirl, values, pixel, &c) ; + } + for (i=n/2; i>=0 && *pixel < swirl->colours; i--) + { + r = c2->r + 2*i*c1->r/n ; + c.r = (r > maxv) ? maxv : r ; + g = c2->g + 2*i*c1->g/n ; + c.g = (g > maxv) ? maxv : g ; + b = c2->b + 2*i*c1->b/n ; + c.b = (b > maxv) ? maxv : b ; + + /* set it up */ + set_colour(swirl, values, pixel, &c) ; + } +} + +/****************************************************************/ + +/* + basic_map + + Generate a `random' closed loop colourmap that occupies + the whole colour map. + + - swirl is the swirl data + - values is the array of colour definitions to set up +*/ + +static void basic_map(swirl, values) +SWIRL_P swirl; +XColor *values; +{ + COLOUR c[3] ; + int i ; + unsigned short r1,g1,b1, r2,g2,b2, r3,g3,b3 ; + int L1,L2,L3,L ; + unsigned long pixel ; + XColor *value ; + + /* start at the beginning of the colour map */ + pixel = 0 ; + value = values ; + + /* choose 3 different basic colours at random */ + for (i=0 ; i<3 ;) + { + int j ; + Bool same ; + + /* choose colour i */ + c[i] = basic_colours[random_no(SWIRLCOLOURS - 1)] ; + + /* assume different */ + same = False ; + + /* different from the rest? */ + for (j=0 ; jdcolours*L1)/L, c, c+1) ; + interpolate(swirl,&value,&pixel,(swirl->dcolours*L2)/L, c+1, c+2) ; + interpolate(swirl,&value,&pixel,(swirl->dcolours*L3)/L, c+2, c) ; + + /* fill up any remaining slots (due to rounding) */ + while (pixel < swirl->colours) + { + /* repeat the last colour */ + set_colour(swirl, &value, &pixel, c) ; + } + + /* ensure black and white are correct */ + set_black_and_white(swirl, values) ; +} + +/****************************************************************/ + +/* + pre_rotate + + Generate pre-rotated versions of the colour specifications + + - swirl is the swirl data + - values is an array of colour specifications +*/ + +static void pre_rotate(swirl, values) +SWIRL_P swirl; +XColor *values; +{ + int i,j ; + XColor *src, *dest ; + int dcolours ; + unsigned long pixel ; + + /* how many colours to display? */ + dcolours = swirl->dcolours ; + + /* start at the first map */ + src = values ; + dest = values + swirl->colours ; + + /* generate dcolours-1 rotated maps */ + for (i=0; i look up the default visual + - default_info is set to point to the member of the returned list + that corresponds to the default visual. + + Returns a list of XVisualInfo structures or NULL on failure. + Free the list with XFree. +*/ + + +static XVisualInfo *default_visual_info(dpy, visual, default_info) +Display *dpy; +Visual *visual; +XVisualInfo **default_info; +{ + XVisualInfo *info_list ; + int i, n ; + + /* get a complete list of visuals */ + info_list = XGetVisualInfo(dpy, VisualNoMask, NULL, &n) ; + if ((info_list == NULL) || (n == 0)) + return(NULL) ; + + /* do we need to get the default visual? */ + if (visual == NULL) + visual = DefaultVisual(dpy, DefaultScreen(dpy)) ; + + /* search through the list for the defailt visual */ + *default_info = info_list ; + for (i=0 ; ivisual == visual) + { + break ; + } + + /* return the list (and the default info) */ + return(info_list) ; +} + +/****************************************************************/ + +/* + create_colourmap + + Create a read/write colourmap to use + + - swirl is the swirl data +*/ + +void create_colourmap(swirl) +SWIRL_P swirl; +{ + XVisualInfo *list, *default_info ; + int preserve ; + int n_rotations ; + int i ; + + /* how many colours are there altogether? */ + swirl->colours = (mono) ? 2 : (1<depth) ; + + /* how many colours should we preserve (out of black, fg, bg)? */ + if ((swirl->bg == swirl->black) && (swirl->fg == swirl->black)) + preserve = 1 ; + else if ((swirl->bg == swirl->black) || (swirl->fg == swirl->black) || + (swirl->bg == swirl->fg)) + preserve = 2 ; + else + preserve = 3 ; + + /* how many colours should we animate? */ + swirl->dcolours = (swirl->colours > preserve+1) ? swirl->colours - preserve : + swirl->colours ; + + /* get information about the default visual */ + list = default_visual_info(dsp, swirl->visual, &default_info) ; + + /* are we in monochrome mode? */ + swirl->monochrome = mono || (swirl->colours == 2) ; + + /* is the colourmap fixed (we'll leave it alone in mono too) */ + swirl->fixed_colourmap = ((default_info->class == StaticGray) || + (default_info->class == StaticColor) || + (default_info->class == TrueColor) || + swirl->monochrome || inroot) ; + +#ifdef FORCEFIXEDCOLORS + /* pretending a fixed colourmap */ + swirl->fixed_colourmap = True ; +#endif + + /* free the list */ + XFree((char *)list) ; + + /* if monochrome, we've done all we can */ + if (swirl->monochrome) + return ; + + /* how fast to shift the colourmap? */ + swirl->shift = (swirl->colours > 64) ? swirl->colours / 64 : 1 ; + swirl->dshift = (swirl->shift > 1) ? swirl->shift * 2 : 1 ; + + /* how may colour map rotations are there? */ + n_rotations = (swirl->fixed_colourmap) ? 1 : swirl->dcolours ; + + /* allocate space for colour definitions (if not already there) */ + if (swirl->rgb_values == NULL) + { + swirl->rgb_values = (XColor *)calloc(swirl->colours*n_rotations, + sizeof(XColor)) ; + + /* create a colour map */ + if (!swirl->fixed_colourmap) + swirl->cmap = XCreateColormap(dsp, swirl->win, swirl->visual, AllocAll) ; + } + + /* select a set of colours for the colour map */ + basic_map(swirl, swirl->rgb_values) ; + + /* are we rotating them? */ + if (!swirl->fixed_colourmap) + { + /* generate rotations of the colour maps */ + pre_rotate(swirl, swirl->rgb_values) ; + + /* store the colours in the colour map */ + XStoreColors(dsp, swirl->cmap, swirl->rgb_values, swirl->colours) ; + } + else + /* lookup the colours in the fixed colour map */ + for (i=0 ; icolours ; i++) + (void) XAllocColor(dsp, DefaultColormap(dsp, screen), + &(swirl->rgb_values[i])) ; +} + +/****************************************************************/ + +/* + install_map + + Install a new set of colours into the colour map + + - swirl is the swirl data + - shift is the amount to rotate the colour map by +*/ + +static void install_map(swirl, shift) +SWIRL_P swirl; +int shift; +{ + if (!swirl->fixed_colourmap) + { + /* shift the colour map */ + swirl->current_map = (swirl->current_map + shift) % + swirl->dcolours ; + + /* store it */ + XStoreColors(dsp, swirl->cmap, + swirl->rgb_values + + swirl->current_map*swirl->colours, + swirl->colours) ; + } +} + +/****************************************************************/ + +/* + create_knots + + Initialise the array of knot + + swirl is the swirl data +*/ + +static void create_knots(swirl) +SWIRL_P swirl; +{ + int k ; + Bool orbit, wheel, picasso, ray, hook ; + KNOT_P knot ; + + /* create array for knots */ + swirl->knots = (KNOT_P)calloc(swirl->n_knots, sizeof(KNOT)) ; + + /* no knots yet */ + orbit = wheel = picasso = ray = hook = False; + + /* what types do we have? */ + if ((int) swirl->knot_type & (int) ALL) + { + orbit = wheel = ray = hook = True ; + } + else + { + if ((int) swirl->knot_type & (int) ORBIT) orbit = True ; + if ((int) swirl->knot_type & (int) WHEEL) wheel = True ; + if ((int) swirl->knot_type & (int) PICASSO) picasso = True ; + if ((int) swirl->knot_type & (int) RAY) ray = True ; + if ((int) swirl->knot_type & (int) HOOK) hook = True ; + } + + /* initialise each knot */ + knot = swirl->knots ; + for (k=0 ; kn_knots ; k++) + { + /* position */ + knot->x = random_no(swirl->width) ; + knot->y = random_no(swirl->height) ; + + /* mass */ + knot->m = random_no(MASS) + 1 ; + + /* can be negative */ + if (random_no(100) > 50) + knot->m *= -1 ; + + /* type */ + knot->t = NONE ; + while (knot->t == NONE) + { + /* choose a random one from the types available */ + switch (random_no(4)) + { + case 0: if (orbit) + knot->t = ORBIT ; + break ; + case 1: if (wheel) + knot->t = WHEEL ; + break ; + case 2: if (picasso) + knot->t = PICASSO ; + break ; + case 3: if (ray) + knot->t = RAY ; + break ; + case 4: if (hook) + knot->t = HOOK ; + break ; + } + } + + /* if two planes, do same for second plane */ + if (swirl->two_plane) + { + knot->T = NONE ; + while (knot->T == NONE || knot->T == knot->t) + { + /* choose a different type */ + switch (random_no(4)) + { + case 0: if (orbit) + knot->T = ORBIT ; + break ; + case 1: if (wheel) + knot->T = WHEEL ; + break ; + case 2: if (picasso) + knot->T = PICASSO ; + break ; + case 3: if (ray) + knot->T = RAY ; + break ; + case 4: if (hook) + knot->T = HOOK ; + break ; + } + } + } + + /* next knot */ + knot ++ ; + } +} + +/****************************************************************/ + +/* + initswirl + + Initialise things for swirling + + - win is the window to draw in +*/ + +void initswirl(win) +Window win; +{ + XWindowAttributes win_attr ; + SWIRL_P swirl ; + + /* does the swirls array exist? */ + if (swirls == NULL) + { + int i ; + + /* allocate an array, one entry for each screen */ + swirls = (SWIRL_P)calloc(ScreenCount(dsp), sizeof(SWIRL)) ; + + /* initialise them all */ + for (i=0 ; iwin = win ; + swirl->width = win_attr.width ; + swirl->height = win_attr.height ; + swirl->depth = win_attr.depth ; + swirl->visual = win_attr.visual ; + + /* initialise image for speeding up drawing */ + init_image(swirl) ; + + /* clear the window (before setting the colourmap) */ + XSetForeground(dsp, Scr[screen].gc, swirl->black) ; + XFillRectangle(dsp, win, Scr[screen].gc, + 0, 0, swirl->width, swirl->height) ; + + /* initialise the colours from which the colourmap is derived */ + init_colours(basic_colours, saturation) ; + + /* set up the colour map */ + create_colourmap(swirl) ; + + /* attach the colour map to the window (if we have one) */ + if (!swirl->fixed_colourmap) { +#if 1 + set_colormap(screen, swirl->cmap); +#else + XSetWindowColormap(dsp, win, swirl->cmap) ; + (void) XSetWMColormapWindows(dsp, win, &win, 1) ; + XInstallColormap(dsp, swirl->cmap) ; +#endif + } + + /* resolution starts off chunky */ + swirl->resolution = MIN_RES+1 ; + + /* calculate the pixel step for this resulution */ + swirl->r = (1 << (swirl->resolution-1)) ; + + /* how many knots? */ + swirl->n_knots = random_no(batchcount/2) + batchcount + 1 ; + + /* what type of knots? */ + swirl->knot_type = ALL ; /* for now */ + + /* use two_plane mode occaisionally */ + if (random_no(100) <= TWO_PLANE_PCNT) + { + swirl->two_plane = swirl->first_plane = True ; + swirl->max_resolution = 2 ; + } + else + swirl->two_plane = False ; + + /* fix the knot values */ + create_knots(swirl) ; + + /* we are off */ + swirl->started = True ; + swirl->drawing = False ; +} + +/****************************************************************/ + +/* + do_point + + Work out the pixel value at i, j. Ensure it does not clash + with BlackPixel or WhitePixel. + + - swirl is the swirl data + - i, j is the point to calculate + + Returns the value of the point +*/ + +static unsigned long do_point(swirl, i, j) +SWIRL_P swirl; +int i, j; +{ + int tT,k,value,add ; + double dx,dy,theta,dist ; + int dcolours, qcolours ; + double rads ; + KNOT_P knot ; + + /* how many colours? */ + dcolours = swirl->dcolours ; + qcolours = dcolours / 4 ; + + /* colour step round a circle */ + rads = (double)dcolours/(2.0 * M_PI) ; + + /* start at zero */ + value = 0 ; + + /* go through all the knots */ + knot = swirl->knots ; + for (k=0; kn_knots; k++) + { + dx = i - knot->x ; + dy = j - knot->y ; + + /* in two_plane mode get the appropriate knot type */ + if (swirl->two_plane) + tT = (int) ((swirl->first_plane) ? knot->t : knot->T) ; + else + tT = (int) knot->t ; + + /* distance from knot */ + dist = sqrt(dx*dx+dy*dy) ; + + /* nothing to add at first */ + add = 0 ; + + /* work out the contribution (if close enough) */ + if (dist > 0.1) switch (tT) + { + case ORBIT: + add = (int)(dcolours/(1.0+0.01*abs(knot->m)*dist)) ; + break; + case WHEEL: + theta = (atan2(dy,dx) + M_PI)/M_PI ; + if (theta < 1.0) + add = (int)(dcolours * theta + + sin(0.1*knot->m*dist)* + qcolours*exp(-0.01*dist)) ; + else + add = (int)(dcolours * (theta-1.0) + + sin(0.1*knot->m*dist)* + qcolours*exp(-0.01*dist)) ; + break; + case PICASSO: + add = (int)(dcolours * + fabs(cos(0.002 * knot->m * dist))) ; + break; + case RAY: + add = (int)(dcolours * fabs(sin(2.0 * atan2(dy,dx)))) ; + break; + case HOOK: + add = (int)(rads*atan2(dy,dx)+ + 0.05*(abs(knot->m)-1)*dist) ; + break; + } + + /* for a +ve mass add on the contribution else take it off */ + if (knot->m > 0) + value += add ; + else + value -= add ; + + /* next knot */ + knot ++ ; + } + + /* toggle plane */ + swirl->first_plane = (!swirl->first_plane) ; + + /* make sure we handle -ve values properly */ + if (value >= 0) + value = (value % dcolours) + 2 ; + else + value = dcolours - (abs(value) % (dcolours-1)) ; + + /* if fg and bg are 1 and 0 we should be OK, but just in case */ + while ((dcolours > 2) && + (((value % swirl->colours) == swirl->fg) || + ((value % swirl->colours) == swirl->bg) || + ((value % swirl->colours) == swirl->black))) + { + value++ ; + } + + /* definitely make sure it is in range */ + value = value % swirl->colours ; + + /* lookup the pixel value if necessary */ + if (swirl->fixed_colourmap && !swirl->monochrome) + value = swirl->rgb_values[value].pixel ; + + /* return it */ + return((unsigned long)value) ; +} + +/****************************************************************/ + +/* + draw_block + + Draw a square block of points with the same value. + + - ximage is the XImage to draw on. + - x, y is the top left corner + - s is the length of each side + - v is the value +*/ + +static void draw_block(ximage, x, y, s, v) +XImage *ximage; +int x, y, s; +unsigned long v; +{ + /* is it just a point? */ + if (s == 1) + XPutPixel(ximage, x, y, v) ; + else + { + int a, b ; + + for (a=0 ; ax ; + y = swirl->y ; + r = swirl->r ; + + /* check we are within the window */ + if ((x < 0) || (x > swirl->width-r) || (y < 0) || (y > swirl->height-r)) + return ; + + /* what style are we drawing? */ + if (swirl->two_plane) + { + int r2 ; + + /* halve the block size */ + r2 = r / 2 ; + + /* interleave blocks at half r */ + draw_block(swirl->ximage, x, y, r2, do_point(swirl,x,y)) ; + draw_block(swirl->ximage, x+r2, y, r2, do_point(swirl,x+r2,y)) ; + draw_block(swirl->ximage, x+r2, y+r2, r2, do_point(swirl,x+r2,y+r2)) ; + draw_block(swirl->ximage, x, y+r2, r2, do_point(swirl,x,y+r2)) ; + } + else + draw_block(swirl->ximage, x, y, r, do_point(swirl,x,y)) ; + + /* update the screen */ + XPutImage(dsp, win, Scr[screen].gc, swirl->ximage, x, y, x, y, r, r); +} + +/****************************************************************/ + +/* + next_point + + Move to the next point in the spiral pattern + + - swirl is the swirl + - win is the window to update +*/ + +static void next_point(swirl) +SWIRL_P swirl ; +{ + static Bool off_screen ; + + /* more to do in this direction? */ + if (swirl->dir_done < swirl->dir_todo) + { + /* move in the current direction */ + switch(swirl->direction) + { + case DRAW_RIGHT: swirl->x += swirl->r ; break ; + case DRAW_DOWN: swirl->y += swirl->r ; break ; + case DRAW_LEFT: swirl->x -= swirl->r ; break ; + case DRAW_UP: swirl->y -= swirl->r ; break ; + } + + /* done another point */ + swirl->dir_done ++ ; + } + else + { + /* none drawn yet */ + swirl->dir_done = 0 ; + + /* change direction - check and record if off screen */ + switch(swirl->direction) + { + case DRAW_RIGHT: swirl->direction = DRAW_DOWN ; + if (swirl->x > swirl->width-swirl->r) + { + /* skip these points */ + swirl->dir_done = swirl->dir_todo ; + swirl->y += (swirl->dir_todo * swirl->r) ; + + /* check for finish */ + if (off_screen) swirl->drawing = False ; + off_screen = True ; + } + else + off_screen = False ; + break ; + case DRAW_DOWN: swirl->direction = DRAW_LEFT ; swirl->dir_todo ++ ; + if (swirl->y > swirl->height-swirl->r) + { + /* skip these points */ + swirl->dir_done = swirl->dir_todo ; + swirl->x -= (swirl->dir_todo * swirl->r) ; + + /* check for finish */ + if (off_screen) swirl->drawing = False ; + off_screen = True ; + } + else + off_screen = False ; + break ; + case DRAW_LEFT: swirl->direction = DRAW_UP ; + if (swirl->x < 0) + { + /* skip these points */ + swirl->dir_done = swirl->dir_todo ; + swirl->y -= (swirl->dir_todo * swirl->r) ; + + /* check for finish */ + if (off_screen) swirl->drawing = False ; + off_screen = True ; + } + else + off_screen = False ; + break ; + case DRAW_UP: swirl->direction = DRAW_RIGHT ; swirl->dir_todo ++ ; + if (swirl->y < 0) + { + /* skip these points */ + swirl->dir_done = swirl->dir_todo ; + swirl->x += (swirl->dir_todo * swirl->r) ; + + /* check for finish */ + if (off_screen) swirl->drawing = False ; + off_screen = True ; + } + else + off_screen = False ; + break ; + } + } +} + +/****************************************************************/ + +/* + drawswirl + + Draw one iteration of swirling + + - win is the window to draw in +*/ + +void drawswirl(win) +Window win; +{ + SWIRL_P swirl ; + + /* get the current swirl */ + swirl = &(swirls[screen]) ; + + /* are we going? */ + if (swirl->started) + { + /* in the middle of drawing? */ + if (swirl->drawing) + { + /* rotate the colours */ + install_map(swirl, swirl->dshift) ; + + /* draw a batch of points */ + swirl->batch_todo = BATCH_DRAW ; + while ((swirl->batch_todo > 0) && swirl->drawing) + { + /* draw a point */ + draw_point(swirl, win) ; + + /* move to the next point */ + next_point(swirl) ; + + /* done a point */ + swirl->batch_todo -- ; + } + } + else + { + /* rotate the colours */ + install_map(swirl, swirl->shift) ; + + /* time for a higher resolution? */ + if (swirl->resolution > swirl->max_resolution) + { + /* move to higher resolution */ + swirl->resolution -- ; + + /* calculate the pixel step for this resulution */ + swirl->r = (1 << (swirl->resolution-1)) ; + + /* start drawing again */ + swirl->drawing = True ; + + /* start in the middle of the screen */ + swirl->x = (swirl->width - swirl->r) / 2 ; + swirl->y = (swirl->height - swirl->r) / 2 ; + + /* initialise spiral drawing parameters */ + swirl->direction = DRAW_RIGHT ; + swirl->dir_todo = 1 ; + swirl->dir_done = 0 ; + } + else + { + /* all done, decide when to restart */ + if (swirl->start_again == -1) + { + /* start the counter */ + swirl->start_again = RESTART ; + } + else if (swirl->start_again == 0) + { + /* reset the counter */ + swirl->start_again = -1 ; + + /* start again */ + initswirl(win) ; + } + else + /* decrement the counter */ + swirl->start_again -- ; + } + } + } +} + +/****************************************************************/ diff --git a/usleep.c b/usleep.c new file mode 100644 index 00000000..0da87f45 --- /dev/null +++ b/usleep.c @@ -0,0 +1,100 @@ +#ifndef lint +static char sccsid[] = "@(#)usleep.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * usleep.c - OS dependant implementation of usleep(). + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * Revision History: + * + * Changes of David Bagley + * 05-Jan-95: nanosleep for Solaris 2.3 and greater Greg Onufer + * + * 22-Jun-94: Fudged for VMS by Anthony Clarke + * + * 10-Jun-94: patch for BSD from Victor Langeveld + * 02-May-94: patch for Linux, got ideas from Darren Senn's xlock + * + * 21-Mar-94: patch fix for HP from + * 01-Dec-93: added patch for HP + * + * Changes of Patrick J. Naughton + * 30-Aug-90: written. + * + */ + +#include "xlock.h" + +#if !defined(HAS_USLEEP) + /* usleep should be defined */ +int +usleep(usec) + unsigned long usec; +{ +#if (defined (SYSV) || defined(SVR4)) && !defined(__hpux) +#if defined(HAS_NANOSLEEP) +{ + struct timespec rqt; + + rqt.tv_sec = 0; + rqt.tv_nsec = 1000 * usec; + return nanosleep(&rqt, NULL); +} +#else + (void) poll((void *) 0, (size_t) 0, usec / 1000); /* ms resolution */ +#endif +#else +#ifdef VMS + long timadr[2]; + + if (usec !=0) { + timadr[0] = -usec*10; + timadr[1] = -1; + + sys$setimr(4,&timadr,0,0,0); + sys$waitfr(4); + } +#else + struct timeval time_out; + time_out.tv_usec = usec % (unsigned long) 1000000; + time_out.tv_sec = usec / (unsigned long) 1000000; + (void) select(0, (void *) 0, (void *) 0, (void *) 0, &time_out); +#endif +#endif + return 0; +} +#endif + +/* + * returns the number of seconds since 01-Jan-70. + * This is used to control rate and timeout in many of the animations. + */ +long +seconds() +{ +#ifdef VMS + return 12088800; +#else + struct timeval now; + + (void) gettimeofday(&now, (struct timezone *) 0); + return now.tv_sec; +#endif +} + +#ifdef VMS +static long ran; +long random() +{ + mth$random(&ran); + + return labs(ran) % 2147483647; +} + +void srandom(seed) +int seed; +{ + ran = seed; +} +#endif diff --git a/vroot.h b/vroot.h new file mode 100644 index 00000000..276c9089 --- /dev/null +++ b/vroot.h @@ -0,0 +1,122 @@ +/*****************************************************************************/ +/** Copyright 1991 by Andreas Stolcke **/ +/** Copyright 1990 by Solbourne Computer Inc. **/ +/** Longmont, Colorado **/ +/** **/ +/** All Rights Reserved **/ +/** **/ +/** Permission to use, copy, modify, and distribute this software and **/ +/** its documentation for any purpose and without fee is hereby **/ +/** granted, provided that the above copyright notice appear in all **/ +/** copies and that both that copyright notice and this permis- **/ +/** sion notice appear in supporting documentation, and that the **/ +/** name of Solbourne not be used in advertising **/ +/** in publicity pertaining to distribution of the software without **/ +/** specific, written prior permission. **/ +/** **/ +/** ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/ +/** WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF **/ +/** MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDREAS STOLCKE **/ +/** OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL **/ +/** DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/ +/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/ +/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/ +/** OR PERFORMANCE OF THIS SOFTWARE. **/ +/*****************************************************************************/ +/* + * vroot.h -- Virtual Root Window handling header file + * + * This header file redefines the X11 macros RootWindow and DefaultRootWindow, + * making them look for a virtual root window as provided by certain `virtual' + * window managers like swm and tvtwm. If none is found, the ordinary root + * window is returned, thus retaining backward compatibility with standard + * window managers. + * The function implementing the virtual root lookup remembers the result of + * its last invocation to avoid overhead in the case of repeated calls + * on the same display and screen arguments. + * The lookup code itself is taken from Tom LaStrange's ssetroot program. + * + * Most simple root window changing X programs can be converted to using + * virtual roots by just including + * + * #include + * + * after all the X11 header files. It has been tested on such popular + * X clients as xphoon, xfroot, xloadimage, and xaqua. + * It also works with the core clients xprop, xwininfo, xwd, and editres + * (and is necessary to get those clients working under tvtwm). + * It does NOT work with xsetroot; get the xsetroot replacement included in + * the tvtwm distribution instead. + * + * Andreas Stolcke , 9/7/90 + * - replaced all NULL's with properly cast 0's, 5/6/91 + * - free children list (suggested by Mark Martin ), 5/16/91 + * - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91 + */ + +#ifndef _VROOT_H_ +#define _VROOT_H_ + +#if !defined(lint) && !defined(SABER) +static char vroot_rcsid[] = "$Id: vroot.h,v 1.1 1994/08/25 22:04:24 jwz Exp $"; +#endif + +#include +#include +#include + +static Window +VirtualRootWindowOfScreen(screen) + Screen *screen; +{ + static Screen *save_screen = (Screen *)0; + static Window root = (Window)0; + + if (screen != save_screen) { + Display *dpy = DisplayOfScreen(screen); + Atom __SWM_VROOT = None; + int i; + Window rootReturn, parentReturn, *children; + unsigned int numChildren; + + root = RootWindowOfScreen(screen); + + /* go look for a virtual root */ + __SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False); + if (XQueryTree(dpy, root, &rootReturn, &parentReturn, + &children, &numChildren)) { + for (i = 0; i < numChildren; i++) { + Atom actual_type; + int actual_format; + unsigned long nitems, bytesafter; + Window *newRoot = (Window *)0; + + if (XGetWindowProperty(dpy, children[i], + __SWM_VROOT, 0, 1, False, XA_WINDOW, + &actual_type, &actual_format, + &nitems, &bytesafter, + (unsigned char **) &newRoot) == Success && newRoot) { + root = *newRoot; + break; + } + } + if (children) + XFree((char *)children); + } + + save_screen = screen; + } + + return root; +} + +#undef RootWindowOfScreen +#define RootWindowOfScreen(s) VirtualRootWindowOfScreen(s) + +#undef RootWindow +#define RootWindow(dpy,screen) VirtualRootWindowOfScreen(ScreenOfDisplay(dpy,screen)) + +#undef DefaultRootWindow +#define DefaultRootWindow(dpy) VirtualRootWindowOfScreen(DefaultScreenOfDisplay(dpy)) + +#endif /* _VROOT_H_ */ diff --git a/wator.c b/wator.c new file mode 100644 index 00000000..dd61afd8 --- /dev/null +++ b/wator.c @@ -0,0 +1,474 @@ +#ifndef lint +static char sccsid[] = "@(#)wator.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * wator.c - Dewdney's Wa-Tor, water torus simulation for xlock, + * the X Window System lockscreen. + * + * Copyright (c) 1994 by David Bagley. + * + * See xlock.c for copying information. + * + * Revision History: + * 12-Dec-94: Coded from A.K. Dewdney's "The Armchair Universe, Computer + * Recreations from the Pages of Scientific American Magazine" + * W.H. Freedman and Company, New York, 1988 also used life.c + * as a guide. + */ + +#include "xlock.h" +#include "bitmaps/fish-0.xbm" +#include "bitmaps/fish-1.xbm" +#include "bitmaps/fish-2.xbm" +#include "bitmaps/fish-3.xbm" +#include "bitmaps/fish-4.xbm" +#include "bitmaps/fish-5.xbm" +#include "bitmaps/fish-6.xbm" +#include "bitmaps/fish-7.xbm" +#include "bitmaps/shark-0.xbm" +#include "bitmaps/shark-1.xbm" +#include "bitmaps/shark-2.xbm" +#include "bitmaps/shark-3.xbm" +#include "bitmaps/shark-4.xbm" +#include "bitmaps/shark-5.xbm" +#include "bitmaps/shark-6.xbm" +#include "bitmaps/shark-7.xbm" + +#define MAXROWS 155 +#define MAXCOLS 144 +#define FISH 0 +#define SHARK 1 +#define KINDS 2 +#define ORIENTS 4 +#define REFLECTS 2 +#define BITMAPS (ORIENTS*REFLECTS*KINDS) +#define KINDBITMAPS (ORIENTS*REFLECTS) + +static XImage logo[BITMAPS] = { + {0, 0, 0, XYBitmap, (char *) fish0_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish1_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish2_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish3_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish4_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish5_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish6_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) fish7_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark0_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark1_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark2_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark3_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark4_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark5_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark6_bits, LSBFirst, 8, LSBFirst, 8, 1}, + {0, 0, 0, XYBitmap, (char *) shark7_bits, LSBFirst, 8, LSBFirst, 8, 1}, +}; + +/* Fish and shark data */ +typedef struct { + char kind, age, food, direction; + unsigned long color; + int col, row; +} cellstruct; + +/* Doublely linked list */ +typedef struct _CellList +{ + cellstruct info; + struct _CellList *previous, *next; +} CellList; + +typedef struct { + int initialized; + int nkind[KINDS]; /* Number of fish and sharks */ + int breed[KINDS]; /* Breeding time of fish and sharks */ + int sstarve; /* Time the sharks starve if they dont find a fish */ + int kind; /* Currently working on fish or sharks? */ + int xs, ys; /* Size of fish and sharks */ + int xb, yb; /* Bitmap offset for fish and sharks */ + int pixelmode; + int generation; + int ncols, nrows; + int width, height; + CellList *currkind, *babykind, *lastkind[KINDS+1], *firstkind[KINDS+1]; + CellList *arr[MAXCOLS][MAXROWS]; /* 0=empty or pts to a fish or shark */ +} watorstruct; + +static watorstruct wators[MAXSCREENS]; +static int icon_width, icon_height; + +static void +drawcell(win, col, row, color, bitmap) + Window win; + int col, row; + long unsigned int color; + int bitmap; +{ + watorstruct *wp = &wators[screen]; + + XSetForeground(dsp, Scr[screen].gc, color); + if (wp->pixelmode) + XFillRectangle(dsp, win, Scr[screen].gc, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, wp->xs, wp->ys); + else + XPutImage(dsp, win, Scr[screen].gc, &logo[bitmap], 0, 0, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, icon_width, icon_height); +} + + +static void +erasecell(win, col, row) + Window win; + int col, row; +{ + watorstruct *wp = &wators[screen]; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, + wp->xb + wp->xs * col, wp->yb + wp->ys * row, wp->xs, wp->ys); +} + +static void init_kindlist(kind) +int kind; +{ + watorstruct *wp = &wators[screen]; + + /* Waste some space at the beginning and end of list + so we do not have to complicated checks against falling off the ends. */ + wp->lastkind[kind] = (CellList *) malloc (sizeof (CellList)); + wp->firstkind[kind] = (CellList *) malloc (sizeof (CellList)); + wp->firstkind[kind]->previous = wp->lastkind[kind]->next = NULL; + wp->firstkind[kind]->next = wp->lastkind[kind]->previous = NULL; + wp->firstkind[kind]->next = wp->lastkind[kind]; + wp->lastkind[kind]->previous = wp->firstkind[kind]; +} + +static void addto_kindlist(kind, info) +int kind; +cellstruct info; +{ + watorstruct *wp = &wators[screen]; + + wp->currkind = (CellList *) malloc (sizeof (CellList)); + wp->lastkind[kind]->previous->next = wp->currkind; + wp->currkind->previous = wp->lastkind[kind]->previous; + wp->currkind->next = wp->lastkind[kind]; + wp->lastkind[kind]->previous = wp->currkind; + wp->currkind->info = info; +} + +static void removefrom_kindlist(ptr) +CellList *ptr; +{ + watorstruct *wp = &wators[screen]; + + ptr->previous->next = ptr->next; + ptr->next->previous = ptr->previous; + wp->arr[ptr->info.col][ptr->info.row] = 0; + free(ptr); +} + +static void dupin_kindlist() +{ + watorstruct *wp = &wators[screen]; + CellList *temp; + + temp = (CellList *) malloc (sizeof (CellList)); + temp->previous = wp->babykind; + temp->next = wp->babykind->next; + wp->babykind->next = temp; + temp->next->previous = temp; + temp->info = wp->babykind->info; + wp->babykind = temp; +} + +/* new fish at end of list, this rotates who goes first, young fish go last * + * this most likely will not change the feel to any real degree */ +static void cutfrom_kindlist() +{ + watorstruct *wp = &wators[screen]; + + wp->babykind=wp->currkind; + wp->currkind=wp->currkind->previous; + wp->currkind->next = wp->babykind->next; + wp->babykind->next->previous = wp->currkind; + wp->babykind->next = wp->lastkind[KINDS]; + wp->babykind->previous = wp->lastkind[KINDS]->previous; + wp->babykind->previous->next = wp->babykind; + wp->babykind->next->previous = wp->babykind; +} + +static void reattach_kindlist(kind) +int kind; +{ + watorstruct *wp = &wators[screen]; + + wp->currkind = wp->lastkind[kind]->previous; + wp->currkind->next = wp->firstkind[KINDS]->next; + wp->currkind->next->previous = wp->currkind; + wp->lastkind[kind]->previous = wp->lastkind[KINDS]->previous; + wp->lastkind[KINDS]->previous->next = wp->lastkind[kind]; + wp->lastkind[KINDS]->previous = wp->firstkind[KINDS]; + wp->firstkind[KINDS]->next = wp->lastkind[KINDS]; +} + +static void flush_kindlist(kind) +int kind; +{ + watorstruct *wp = &wators[screen]; + + while (wp->lastkind[kind]->previous != wp->firstkind[kind]) { + wp->currkind = wp->lastkind[kind]->previous; + wp->currkind->previous->next = wp->lastkind[kind]; + wp->lastkind[kind]->previous = wp->currkind->previous; + wp->arr[wp->currkind->info.col][wp->currkind->info.row] = 0; + free(wp->currkind); + } +} + + +void +initwator(win) + Window win; +{ + int i, row, col, kind; + XWindowAttributes xgwa; + watorstruct *wp = &wators[screen]; + cellstruct info; + + wp->generation = 0; + if (!wp->initialized) { /* Genesis */ + icon_width = fish0_width; + icon_height = fish0_height; + wp->initialized = 1; + /* Set up what will be a 'triply' linked list. + doubly linked list, doubly linked to an array */ + (void) memset(wp->arr, 0, sizeof(wp->arr)); + for (kind = FISH; kind <= KINDS; kind++) + init_kindlist(kind); + for (i = 0; i < BITMAPS; i++) { + logo[i].width = icon_width; + logo[i].height = icon_height; + logo[i].bytes_per_line = (fish0_width + 7) / 8; + } + } else /* Exterminate all */ + for (i = FISH; i <= KINDS; i++) + flush_kindlist(i); + + (void) XGetWindowAttributes(dsp, win, &xgwa); + wp->width = xgwa.width; + wp->height = xgwa.height; + wp->pixelmode = (wp->width + wp->height < 3 * (icon_width + icon_height)); + if (wp->pixelmode) { + wp->ncols = min(wp->width / 2, MAXCOLS); + wp->nrows = min(wp->height / 2, MAXROWS); + } else { + wp->ncols = min(wp->width / icon_width, MAXCOLS); + wp->nrows = min(wp->height / icon_height, MAXROWS); + } + + /* Play G-d with these numbers */ + wp->nkind[FISH] = wp->ncols * wp->nrows / 3; + wp->nkind[SHARK] = wp->nkind[FISH] / 10; + wp->kind = FISH; + if (!wp->nkind[SHARK]) + wp->nkind[SHARK] = 1; + if (batchcount < 1) + batchcount = 1; + else if (batchcount > wp->breed[SHARK]) + batchcount = 4; + wp->breed[FISH] = batchcount; + wp->breed[SHARK] = 10; + wp->sstarve = 3; + + wp->xs = wp->width / wp->ncols; + wp->ys = wp->height / wp->nrows; + wp->xb = (wp->width - wp->xs * wp->ncols) / 2; + wp->yb = (wp->height - wp->ys * wp->nrows) / 2; + + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, wp->width, wp->height); + for (kind = FISH; kind <= SHARK; kind++) { + i = 0; + while (i < wp->nkind[kind]) { + col = RAND() % wp->ncols; + row = RAND() % wp->nrows; + if (!wp->arr[col][row]) { + i++; + info.kind = kind; + info.age = RAND() % wp->breed[kind]; + info.food = RAND() % wp->sstarve; + info.direction = RAND() % KINDBITMAPS + kind * KINDBITMAPS; + if (!mono && Scr[screen].npixels > 2) + info.color = Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + info.color = WhitePixel(dsp, screen); + info.col = col; + info.row = row; + addto_kindlist(kind, info); + wp->arr[col][row] = wp->currkind; + drawcell(win, col, row, + wp->currkind->info.color, + wp->currkind->info.direction); + } + } + } +} + +void +drawwator(win) + Window win; +{ + int col, row, colprevious, rowprevious, colnext, rownext; + int i, numok; + + struct { + int x, y, dir; + } acell[4]; + + watorstruct *wp = &wators[screen]; + + /* Alternate updates, fish and sharks live out of phase with each other */ + wp->kind = (wp->kind + 1) % KINDS; + { + wp->currkind = wp->firstkind[wp->kind]->next; + + while (wp->currkind != wp->lastkind[wp->kind]) { + col = wp->currkind->info.col; + row = wp->currkind->info.row; + colprevious = (!col) ? wp->ncols - 1 : col - 1; + rowprevious = (!row) ? wp->nrows - 1 : row - 1; + colnext = (col == wp->ncols - 1) ? 0 : col + 1; + rownext = (row == wp->nrows - 1) ? 0 : row + 1; + + numok = 0; + if (wp->kind == SHARK) { /* Scan for fish */ + if (wp->arr[col][rowprevious] && + wp->arr[col][rowprevious]->info.kind == FISH) { + acell[numok].x = col; + acell[numok].y = rowprevious; + acell[numok++].dir = 0; + } + if (wp->arr[colnext][row] && + wp->arr[colnext][row]->info.kind == FISH) { + acell[numok].x = colnext; + acell[numok].y = row; + acell[numok++].dir = 1; + } + if (wp->arr[col][rownext] && + wp->arr[col][rownext]->info.kind == FISH) { + acell[numok].x = col; + acell[numok].y = rownext; + acell[numok++].dir = 2; + } + if (wp->arr[colprevious][row] && + wp->arr[colprevious][row]->info.kind == FISH) { + acell[numok].x = colprevious; + acell[numok].y = row; + acell[numok++].dir = 3; + } + if (numok) { /* No thanks, I'm vegetarian */ + i = RAND() % numok; + wp->nkind[FISH]--; + removefrom_kindlist(wp->arr[acell[i].x][acell[i].y]); + wp->arr[acell[i].x][acell[i].y] = wp->currkind; + wp->currkind->info.direction = acell[i].dir + + ((RAND() % REFLECTS) ? 0 : ORIENTS) + wp->kind * KINDBITMAPS; + wp->currkind->info.col = acell[i].x; + wp->currkind->info.row = acell[i].y; + wp->currkind->info.food = wp->sstarve; + drawcell(win, wp->currkind->info.col, wp->currkind->info.row, + wp->currkind->info.color, wp->currkind->info.direction); + if (++(wp->currkind->info.age) >= wp->breed[wp->kind]) { /* breed */ + cutfrom_kindlist(); /* This rotates out who goes first */ + wp->babykind->info.age = 0; + dupin_kindlist(); + wp->arr[col][row] = wp->babykind; + wp->babykind->info.col = col; + wp->babykind->info.row = row; + wp->babykind->info.age = -1; /* Make one a little younger */ + if (!(RAND() % 60)) /* A color mutation */ + if (++(wp->babykind->info.color) >= Scr[screen].npixels) + wp->babykind->info.color = 0; + wp->nkind[wp->kind]++; + } else { + wp->arr[col][row] = 0; + erasecell(win, col, row); + } + } else { + if (wp->currkind->info.food-- < 0) { /* Time to die, Jaws */ + /* back up one or else in void */ + wp->currkind = wp->currkind->previous; + removefrom_kindlist(wp->arr[col][row]); + wp->arr[col][row] = 0; + erasecell(win, col, row); + wp->nkind[wp->kind]--; + numok = -1; /* Want to escape from next if */ + } + } + } + if (!numok) { /* Fish or shark search for a place to go */ + if (!wp->arr[col][rowprevious]) { + acell[numok].x = col; + acell[numok].y = rowprevious; + acell[numok++].dir = 0; + } + if (!wp->arr[colnext][row]) { + acell[numok].x = colnext; + acell[numok].y = row; + acell[numok++].dir = 1; + } + if (!wp->arr[col][rownext]) { + acell[numok].x = col; + acell[numok].y = rownext; + acell[numok++].dir = 2; + } + if (!wp->arr[colprevious][row]) { + acell[numok].x = colprevious; + acell[numok].y = row; + acell[numok++].dir = 3; + } + if (numok) { /* Found a place to go */ + i = RAND() % numok; + wp->arr[acell[i].x][acell[i].y] = wp->currkind; + wp->currkind->info.direction = acell[i].dir + + ((RAND() % REFLECTS) ? 0 : ORIENTS) + wp->kind * KINDBITMAPS; + wp->currkind->info.col = acell[i].x; + wp->currkind->info.row = acell[i].y; + drawcell(win, + wp->currkind->info.col, wp->currkind->info.row, + wp->currkind->info.color, wp->currkind->info.direction); + if (++(wp->currkind->info.age) >= wp->breed[wp->kind]) { /* breed */ + cutfrom_kindlist(); /* This rotates out who goes first */ + wp->babykind->info.age = 0; + dupin_kindlist(); + wp->arr[col][row] = wp->babykind; + wp->babykind->info.col = col; + wp->babykind->info.row = row; + wp->babykind->info.age = -1; /* Make one a little younger */ + wp->nkind[wp->kind]++; + } else { + wp->arr[col][row] = 0; + erasecell(win, col, row); + } + } else { + /* I'll just sit here and wave my tail so you know I am alive */ + wp->currkind->info.direction = + (wp->currkind->info.direction + ORIENTS) % KINDBITMAPS + + wp->kind * KINDBITMAPS; + drawcell(win, col, row, wp->currkind->info.color, + wp->currkind->info.direction); + } + } + wp->currkind = wp->currkind->next; + } + reattach_kindlist(wp->kind); + } + + if ((wp->nkind[FISH] >= wp->nrows * wp->ncols) || + (!wp->nkind[FISH] && !wp->nkind[SHARK]) || + wp->generation >= 32767) /* Maybe you want to change this? */ { + initwator(win); + } + if (wp->kind == SHARK) + wp->generation++; +} diff --git a/world.c b/world.c new file mode 100644 index 00000000..5a4fc721 --- /dev/null +++ b/world.c @@ -0,0 +1,211 @@ +#ifndef lint +static char sccsid[] = "@(#)world.c 2.7 95/02/21 xlockmore"; +#endif +/* + * world.c - World Spinner for Xlock + * + * Copyright (c) 1993 Matthew Moyle-Croft + * + * See xlock.c for copying information. + * + * Revision History: + * 17-Jul-94 Got batchcount to work. + * 09-Jan-94 Written [ Modified from image.c ] + * 29-Jul-90 image.c written. Copyright (c) 1991 by Patrick J. Naughton. + */ + +#include "xlock.h" +#define NUM_EARTHS 30 +#define SIZE_X 64 +#define SIZE_Y 64 +#define NUM_REV 4 + +#include "bitmaps/terra-00.xbm" +#include "bitmaps/terra-01.xbm" +#include "bitmaps/terra-02.xbm" +#include "bitmaps/terra-03.xbm" +#include "bitmaps/terra-04.xbm" +#include "bitmaps/terra-05.xbm" +#include "bitmaps/terra-06.xbm" +#include "bitmaps/terra-07.xbm" +#include "bitmaps/terra-08.xbm" +#include "bitmaps/terra-09.xbm" +#include "bitmaps/terra-10.xbm" +#include "bitmaps/terra-11.xbm" +#include "bitmaps/terra-12.xbm" +#include "bitmaps/terra-13.xbm" +#include "bitmaps/terra-14.xbm" +#include "bitmaps/terra-15.xbm" +#include "bitmaps/terra-16.xbm" +#include "bitmaps/terra-17.xbm" +#include "bitmaps/terra-18.xbm" +#include "bitmaps/terra-19.xbm" +#include "bitmaps/terra-20.xbm" +#include "bitmaps/terra-21.xbm" +#include "bitmaps/terra-22.xbm" +#include "bitmaps/terra-23.xbm" +#include "bitmaps/terra-24.xbm" +#include "bitmaps/terra-25.xbm" +#include "bitmaps/terra-26.xbm" +#include "bitmaps/terra-27.xbm" +#include "bitmaps/terra-28.xbm" +#include "bitmaps/terra-29.xbm" + +static XImage Earths[NUM_EARTHS] = +{ + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra00_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra01_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra02_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra03_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra04_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra05_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra06_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra07_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra08_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra09_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra10_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra11_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra12_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra13_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra14_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra15_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra16_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra17_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra18_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra19_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra20_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra21_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra22_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra23_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra24_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra25_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra26_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra27_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra28_bits,LSBFirst,8,LSBFirst,8,1}, + {SIZE_X,SIZE_Y,0, XYBitmap, (char *) terra29_bits,LSBFirst,8,LSBFirst,8,1}}; + +#define MAXICONS 64 + +typedef struct { + int x; + int y; + unsigned long color; + int frame; + int direction; +} point; + +typedef struct { + int width; + int height; + int nrows; + int ncols; + int xb; + int yb; + int iconmode; + int iconcount; + point icons[MAXICONS]; +} worldstruct; + +static worldstruct worlds[MAXSCREENS]; + +static int frame_num; + +void +drawworld(win) + Window win; +{ + worldstruct *wp = &worlds[screen]; + int i; +#ifndef NOFLASH + int col[MAXICONS], j; + + for (i = 0; i < wp->ncols; i++) + col[i] = 0; +#endif + if (frame_num == NUM_EARTHS * NUM_REV) { + frame_num = 0; + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + for (i = 0; i < wp->iconcount; i++) { + if (!wp->iconmode) + XFillRectangle(dsp, win, Scr[screen].gc, + wp->xb + SIZE_X * wp->icons[i].x, + wp->yb + SIZE_Y * wp->icons[i].y, + SIZE_X, SIZE_Y); +#ifdef NOFLASH + wp->icons[i].x = RAND() % wp->ncols; +#else + do { + j = RAND() % wp->ncols; + if (!col[j]) + wp->icons[i].x = j; + col[j]++; + } while (col[j] > 1); +#endif + wp->icons[i].y = RAND() % wp->nrows; + wp->icons[i].direction = RAND() % 2; + wp->icons[i].frame = RAND() % NUM_EARTHS; + if (!mono && Scr[screen].npixels > 2) + wp->icons[i].color = + Scr[screen].pixels[RAND() % Scr[screen].npixels]; + else + wp->icons[i].color = WhitePixel(dsp, screen); + } + } + for(i = 0; i< wp->iconcount;i++) { + XSetForeground(dsp, Scr[screen].gc, wp->icons[i].color); + if (wp->icons[i].frame == NUM_EARTHS) + wp->icons[i].frame = 0; + else { + if ((wp->icons[i].frame <= 0) && wp->icons[i].direction == 0) + wp->icons[i].frame = NUM_EARTHS - 1; + } + XPutImage(dsp, win, Scr[screen].gc, (Earths + wp->icons[i].frame), + 0, 0, + wp->xb + SIZE_X * wp->icons[i].x, + wp->yb + SIZE_Y * wp->icons[i].y, + SIZE_X, SIZE_Y); + + (wp->icons[i].direction) ? wp->icons[i].frame++ : wp->icons[i].frame--; + } + frame_num++; + } + +void +initworld(win) + Window win; +{ + int x; + XWindowAttributes xgwa; + worldstruct *wp = &worlds[screen]; + + frame_num = NUM_EARTHS * NUM_REV; + for (x = 0; x < NUM_EARTHS; x++) + Earths[x].bytes_per_line = 8; + (void) XGetWindowAttributes(dsp, win, &xgwa); + wp->width = xgwa.width; + wp->height = xgwa.height; + wp->ncols = wp->width / SIZE_X; + wp->nrows = wp->height / SIZE_Y; + wp->iconmode = (wp->ncols < 2 || wp->nrows < 2); + if (wp->iconmode) { + wp->xb = 0; + wp->yb = 0; + wp->iconcount = 1; /* icon mode */ + } else { + wp->xb = (wp->width - SIZE_X * wp->ncols) / 2; + wp->yb = (wp->height - SIZE_Y * wp->nrows) / 2; +#ifdef NOFLASH + wp->iconcount = batchcount; + if (wp->iconcount > MAXICONS) + wp->iconcount = 16; +#else + wp->iconcount = batchcount; + if (wp->iconcount > MAXICONS) + wp->iconcount = 8; + if (wp->iconcount > wp->ncols) + wp->iconcount = wp->ncols; +#endif + } + XSetForeground(dsp, Scr[screen].gc, BlackPixel(dsp, screen)); + XFillRectangle(dsp, win, Scr[screen].gc, 0, 0, wp->width, wp->height); +} diff --git a/worm.c b/worm.c new file mode 100644 index 00000000..62a5a699 --- /dev/null +++ b/worm.c @@ -0,0 +1,203 @@ +#ifndef lint +static char sccsid[] = "@(#)worm.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * worm.c - draw wiggly worms. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * 23-Sep-93: got rid of "rint". (David Bagley) + * 27-Sep-91: got rid of all malloc calls since there were no calls to free(). + * 25-Sep-91: Integrated into X11R5 contrib xlock. + * + * Adapted from a concept in the Dec 87 issue of Scientific American. + * + * SunView version: Brad Taylor (brad@sun.com) + * X11 version: Dave Lemke (lemke@ncd.com) + * xlock version: Boris Putanec (bp@cs.brown.edu) + * + * This code is a static memory pig... like almost 200K... but as contributed + * it leaked at a massive rate, so I made everything static up front... feel + * free to contribute the proper memory management code. + * + */ + +#include "xlock.h" +#include + +#define MAXCOLORS 64 +#define MAXWORMS 64 +#define CIRCSIZE 2 +#define MAXWORMLEN 50 + +#define SEGMENTS 36 +#define IRINT(x) ((int)(((x)>0.0)?(x)+0.5:(x)-0.5)) + +static int sintab[SEGMENTS]; +static int costab[SEGMENTS]; +static int init_table = 0; + +typedef struct { + int xcirc[MAXWORMLEN]; + int ycirc[MAXWORMLEN]; + int dir; + int tail; + int x; + int y; +} wormstuff; + +typedef struct { + int xsize; + int ysize; + int wormlength; + unsigned long monopix; + int nc; + int nw; + wormstuff worm[MAXWORMS]; + XRectangle rects[MAXCOLORS][MAXWORMS]; + int size[MAXCOLORS]; +} wormstruct; + +static wormstruct worms[MAXSCREENS]; + +int +round(x) + float x; +{ + /*return ((int) rint ((double) x));*/ + return IRINT((double) x); +} + + +void +worm_doit(win, wp, which, color) + Window win; + wormstruct *wp; + int which; + unsigned long color; +{ + wormstuff *ws = &wp->worm[which]; + int x, y; + + ws->tail++; + if (ws->tail == wp->wormlength) + ws->tail = 0; + + x = ws->xcirc[ws->tail]; + y = ws->ycirc[ws->tail]; + XClearArea(dsp, win, x, y, CIRCSIZE, CIRCSIZE, False); + + if (RAND() & 1) { + ws->dir = (ws->dir + 1) % SEGMENTS; + } else { + ws->dir = (ws->dir + SEGMENTS - 1) % SEGMENTS; + } + + x = (ws->x + costab[ws->dir] + wp->xsize) % wp->xsize; + y = (ws->y + sintab[ws->dir] + wp->ysize) % wp->ysize; + + ws->xcirc[ws->tail] = x; + ws->ycirc[ws->tail] = y; + ws->x = x; + ws->y = y; + + wp->rects[color][wp->size[color]].x = x; + wp->rects[color][wp->size[color]].y = y; + wp->size[color]++; +} + + +void +initworm(win) + Window win; +{ + int i, j; + wormstruct *wp = &worms[screen]; + XWindowAttributes xwa; + + wp->nc = Scr[screen].npixels; + if (wp->nc > MAXCOLORS) + wp->nc = MAXCOLORS; + + wp->nw = batchcount; + if (wp->nw > MAXWORMS) + wp->nw = MAXWORMS; + + if (!init_table) { + init_table = 1; + for (i = 0; i < SEGMENTS; i++) { + sintab[i] = round(CIRCSIZE * sin(i * 2 * M_PI / SEGMENTS)); + costab[i] = round(CIRCSIZE * cos(i * 2 * M_PI / SEGMENTS)); + } + } + (void) XGetWindowAttributes(dsp, win, &xwa); + wp->xsize = xwa.width; + wp->ysize = xwa.height; + + wp->monopix = WhitePixel(dsp, screen); + if (xwa.width < 100) + wp->wormlength = MAXWORMLEN / 10; + else + wp->wormlength = MAXWORMLEN; + + for (i = 0; i < wp->nc; i++) { + for (j = 0; j < wp->nw / wp->nc + 1; j++) { + wp->rects[i][j].width = CIRCSIZE; + wp->rects[i][j].height = CIRCSIZE; + } + } + (void) memset(wp->size, 0, wp->nc * sizeof(int)); + + for (i = 0; i < wp->nw; i++) { + for (j = 0; j < wp->wormlength; j++) { + wp->worm[i].xcirc[j] = wp->xsize / 2; + wp->worm[i].ycirc[j] = wp->ysize / 2; + } + wp->worm[i].dir = (unsigned) RAND() % SEGMENTS; + wp->worm[i].tail = 0; + wp->worm[i].x = wp->xsize / 2; + wp->worm[i].y = wp->ysize / 2; + } + + XClearWindow(dsp, win); +} + + +void +drawworm(win) + Window win; +{ + int i; + wormstruct *wp = &worms[screen]; + unsigned long wcolor; + static unsigned int chromo = 0; + + (void) memset(wp->size, 0, wp->nc * sizeof(int)); + + for (i = 0; i < wp->nw; i++) { + if (!mono && wp->nc > 2) { + wcolor = (i + chromo) % wp->nc; + + worm_doit(win, wp, i, wcolor); + } else + worm_doit(win, wp, i, (unsigned long) 0); + } + + if (!mono && wp->nc > 2) { + for (i = 0; i < wp->nc; i++) { + XSetForeground(dsp, Scr[screen].gc, Scr[screen].pixels[i]); + XFillRectangles(dsp, win, Scr[screen].gc, wp->rects[i], + wp->size[i]); + } + } else { + XSetForeground(dsp, Scr[screen].gc, wp->monopix); + XFillRectangles(dsp, win, Scr[screen].gc, wp->rects[0], + wp->size[0]); + } + + if (++chromo == wp->nc) + chromo = 0; +} diff --git a/xlock.c b/xlock.c new file mode 100644 index 00000000..0efb4f23 --- /dev/null +++ b/xlock.c @@ -0,0 +1,1455 @@ +#ifndef lint +static char sccsid[] = "@(#)xlock.c 2.7 95/02/21 xlockmore"; +#endif +/*- + * xlock.c - X11 client to lock a display and show a screen saver. + * + * Copyright (c) 1988-91 by Patrick J. Naughton. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation. + * + * This file is provided AS IS with no warranties of any kind. The author + * shall have no liability with respect to the infringement of copyrights, + * trade secrets or any patents by this file or any part thereof. In no + * event will the author be liable for any lost revenue or profits or + * other special, indirect and consequential damages. + * + * Revision History: + * + * Changes of David Bagley + * 21-Feb-95: MANY patches from Heath A. Kehoe . + * 24-Jan-95: time_displayed fixed from Chris Ross . + * 18-Jan-95: Ultrix systems (at least DECstations) running enhanced + * security from Chris Fuhrman and friend. + * 26-Oct-94: In order to use extra-long passwords with the Linux changed + * PASSLENGTH to 64 + * 11-Jul-94: added -inwindow option from Greg Bowering + * + * 22-Jun-94: Modified for VMS + * + * 10-Jun-94: patch for BSD from Victor Langeveld + * 02-May-94: patched to work on Linux from Darren Senn's + * (sinster@scintilla.capitola.ca.us) xlock for Linux. + * Took out "bounce" since it was too buggy (maybe I will put + * it back later). + * 21-Mar-94: patch to to trap Shift-Ctrl-Reset courtesy of Jamie Zawinski + * , patched the patch (my mistake) for AIXV3 and + * HP from . + * 01-Dec-93: added patch for AIXV3 from + * (Tom McConnell, tmcconne@sedona.intel.com) also added a patch + * for HP-UX 8.0. + * 29-Jul-93: "hyper", "helix", "rock", and "blot" (also tips on "maze") I + * got courtesy of Jamie Zawinski ; + * at the time I couldn't get his stuff to work for the hpux 8.0, + * so I scrapped it but threw his stuff in xlock. + * "maze" and "sphere" I got courtesy of Sun Microsystems. + * "spline" I got courtesy of Jef Poskanzer . + * + * Changes of Patrick J. Naughton + * 24-Jun-91: make foreground and background color get used on mono. + * 24-May-91: added -usefirst. + * 16-May-91: added pyro and random modes. + * ripped big comment block out of all other files. + * 08-Jan-91: fix some problems with password entry. + * removed renicing code. + * 29-Oct-90: added cast to XFree() arg. + * added volume arg to call to XBell(). + * 28-Oct-90: center prompt screen. + * make sure Xlib input buffer does not use up all of swap. + * make displayed text come from resource file for better I18N. + * add backward compatible signal handlers for pre 4.1 machines. + * 31-Aug-90: added blank mode. + * added swarm mode. + * moved usleep() and seconds() out to usleep.c. + * added SVR4 defines to xlock.h + * 29-Jul-90: added support for multiple screens to be locked by one xlock. + * moved global defines to xlock.h + * removed use of allowsig(). + * 07-Jul-90: reworked commandline args and resources to use Xrm. + * moved resource processing out to resource.c + * 02-Jul-90: reworked colors to not use dynamic colormap. + * 23-May-90: added autoraise when obscured. + * 15-Apr-90: added hostent alias searching for host authentication. + * 18-Feb-90: added SunOS3.5 fix. + * changed -mono -> -color, and -saver -> -lock. + * allow non-locking screensavers to display on remote machine. + * added -echokeys to disable echoing of '?'s on input. + * cleaned up all of the parameters and defaults. + * 20-Dec-89: added -xhost to allow access control list to be left alone. + * added -screensaver (don't disable screen saver) for the paranoid. + * Moved seconds() here from all of the display mode source files. + * Fixed bug with calling XUngrabHosts() in finish(). + * 19-Dec-89: Fixed bug in GrabPointer. + * Changed fontname to XLFD style. + * 23-Sep-89: Added fix to allow local hostname:0 as a display. + * Put empty case for Enter/Leave events. + * Moved colormap installation later in startup. + * 20-Sep-89: Linted and made -saver mode grab the keyboard and mouse. + * Replaced SunView code for life mode with Jim Graham's version, + * so I could contrib it without legal problems. + * Sent to expo for X11R4 contrib. + * 19-Sep-89: Added '?'s on input. + * 27-Mar-89: Added -qix mode. + * Fixed GContext->GC. + * 20-Mar-89: Added backup font (fixed) if XQueryLoadFont() fails. + * Changed default font to lucida-sans-24. + * 08-Mar-89: Added -nice, -mode and -display, built vector for life and hop. + * 24-Feb-89: Replaced hopalong display with life display from SunView1. + * 22-Feb-89: Added fix for color servers with n < 8 planes. + * 16-Feb-89: Updated calling conventions for XCreateHsbColormap(); + * Added -count for number of iterations per color. + * Fixed defaulting mechanism. + * Ripped out VMS hacks. + * Sent to expo for X11R3 contrib. + * 15-Feb-89: Changed default font to pellucida-sans-18. + * 20-Jan-89: Added -verbose and fixed usage message. + * 19-Jan-89: Fixed monochrome gc bug. + * 16-Dec-88: Added SunView style password prompting. + * 19-Sep-88: Changed -color to -mono. (default is color on color displays). + * Added -saver option. (just do display... don't lock.) + * 31-Aug-88: Added -time option. + * Removed code for fractals to separate file for modularity. + * Added signal handler to restore host access. + * Installs dynamic colormap with a Hue Ramp. + * If grabs fail then exit. + * Added VMS Hacks. (password 'iwiwuu'). + * Sent to expo for X11R2 contrib. + * 08-Jun-88: Fixed root password pointer problem and changed PASSLENGTH to 20. + * 20-May-88: Added -root to allow root to unlock. + * 12-Apr-88: Added root password override. + * Added screen saver override. + * Removed XGrabServer/XUngrabServer. + * Added access control handling instead. + * 01-Apr-88: Added XGrabServer/XUngrabServer for more security. + * 30-Mar-88: Removed startup password requirement. + * Removed cursor to avoid phosphor burn. + * 27-Mar-88: Rotate fractal by 45 degrees clockwise. + * 24-Mar-88: Added color support. [-color] + * wrote the man page. + * 23-Mar-88: Added HOPALONG routines from Scientific American Sept. 86 p. 14. + * added password requirement for invokation + * removed option for command line password + * added requirement for display to be "unix:0". + * 22-Mar-88: Recieved Walter Milliken's comp.windows.x posting. + * + */ + +#include +#include +#include +#ifdef __STDC__ +#include +#endif +#ifndef VMS +#include +#endif +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__hpux) +#include +#endif +#ifdef ultrix +#include +#endif + +#ifdef HP_PASSWDETC +#include +#endif + +#if defined(__NetBSD__) || defined(__QNX__) || defined(HPUX_SECURE_PASSWD) || defined(SOLARIS_SHADOW) +#define SECURE_PASSWD +#endif + +#include "xlock.h" +#include +#include +#ifdef USE_VROOT +#include "vroot.h" +#endif + +extern char *crypt(); +extern char *getenv(); +extern void CheckResources(); + +char *ProgramName; /* argv[0] */ +perscreen Scr[MAXSCREENS]; +Display *dsp = NULL; /* server display connection */ +int screen; /* current screen */ +void (*callback) () = NULL; +void (*init) () = NULL; +long start_time; + +static int screens; /* number of screens */ +static Window win[MAXSCREENS]; /* window used to cover screen */ +static Window icon[MAXSCREENS]; /* window used during password typein */ +#ifdef LOGOUT_BUTTON +static Window button[MAXSCREENS]; +#endif +static Window root[MAXSCREENS]; /* convenience pointer to the root window */ +static GC textgc[MAXSCREENS]; /* graphics context used for text rendering */ +static long fgcol[MAXSCREENS]; /* used for text rendering */ +static long bgcol[MAXSCREENS]; /* background of text screen */ +static int iconx[MAXSCREENS]; /* location of left edge of icon */ +static int icony[MAXSCREENS]; /* location of top edge of icon */ +static Cursor mycursor; /* blank cursor */ +static Pixmap lockc; +static Pixmap lockm; /* pixmaps for cursor and mask */ +static char no_bits[] = {0}; /* dummy array for the blank cursor */ +static int passx; /* position of the ?'s */ +static int passy; +static XFontStruct *font; +static int sstimeout; /* screen saver parameters */ +static int ssinterval; +static int ssblanking; +static int ssexposures; + +/* GEOMETRY STUFF */ +static int sizeconfiguremask; +static XWindowChanges fullsizeconfigure, minisizeconfigure; +static int fullscreen = False; +static int win_x, win_y, win_w, win_h; + +#define PASSLENGTH 64 +#define FALLBACK_FONTNAME "fixed" +#define ICONW 64 +#define ICONH 64 + +#ifdef HP_PASSWDETC +static char *userpass; +static char *rootpass; +static char *user; +#endif + +#if defined(LOGOUT_BUTTON) || defined(AUTO_LOGOUT) +static int tried_logout = 0; +#endif + +#define AllPointerEventMask \ + (ButtonPressMask | ButtonReleaseMask | \ + EnterWindowMask | LeaveWindowMask | \ + PointerMotionMask | PointerMotionHintMask | \ + Button1MotionMask | Button2MotionMask | \ + Button3MotionMask | Button4MotionMask | \ + Button5MotionMask | ButtonMotionMask | \ + KeymapStateMask) + + +/* VARARGS1 */ +#ifdef __STDC__ +void +error(char *s1, ...) +{ + char *s2; + va_list vl; + + va_start(vl, s1); + s2 = va_arg(vl, char *); + va_end(vl); +#else +void +error(s1, s2) + char *s1, *s2; +{ +#endif + (void) fprintf(stderr, s1, ProgramName, s2); + exit(1); +} + +/* + * Server access control support. + */ + +static XHostAddress *XHosts; /* the list of "friendly" client machines */ +static int HostAccessCount; /* the number of machines in XHosts */ +static Bool HostAccessState; /* whether or not we even look at the list */ + +static void +XGrabHosts(display) + Display *display; +{ + XHosts = XListHosts(display, &HostAccessCount, &HostAccessState); + if (XHosts) + XRemoveHosts(display, XHosts, HostAccessCount); + XEnableAccessControl(display); +} + +static void +XUngrabHosts(display) + Display *display; +{ + if (XHosts) { + XAddHosts(display, XHosts, HostAccessCount); + XFree((char *) XHosts); + } + if (HostAccessState == False) + XDisableAccessControl(display); +} + + +/* + * Simple wrapper to get an asynchronous grab on the keyboard and mouse. + * If either grab fails, we sleep for one second and try again since some + * window manager might have had the mouse grabbed to drive the menu choice + * that picked "Lock Screen..". If either one fails the second time we print + * an error message and exit. + */ +static void +GrabKeyboardAndMouse() +{ + Status status; + + status = XGrabKeyboard(dsp, win[0], True, + GrabModeAsync, GrabModeAsync, CurrentTime); + if (status != GrabSuccess) { + (void) sleep(1); + status = XGrabKeyboard(dsp, win[0], True, + GrabModeAsync, GrabModeAsync, CurrentTime); + + if (status != GrabSuccess) + error("%s: couldn't grab keyboard! (%d)\n", status); + } + status = XGrabPointer(dsp, win[0], True, AllPointerEventMask, + GrabModeAsync, GrabModeAsync, None, mycursor, + CurrentTime); + if (status != GrabSuccess) { + (void) sleep(1); + status = XGrabPointer(dsp, win[0], True, AllPointerEventMask, + GrabModeAsync, GrabModeAsync, None, mycursor, + CurrentTime); + + if (status != GrabSuccess) + error("%s: couldn't grab pointer! (%d)\n", status); + } +} + + +/* + * Assuming that we already have an asynch grab on the pointer, + * just grab it again with a new cursor shape and ignore the return code. + */ +static void +XChangeGrabbedCursor(cursor) + Cursor cursor; +{ +#ifndef DEBUG + if (grabmouse && !inwindow && !inroot) + (void) XGrabPointer(dsp, win[0], True, AllPointerEventMask, + GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime); +#endif +} + + +/* + * Restore all grabs, reset screensaver, restore colormap, close connection. + */ +static void +finish() +{ + XSync(dsp, False); +#ifdef USE_VROOT + if (inroot) + XClearWindow(dsp, win[0]); +#endif + if (!nolock && !allowaccess) + XUngrabHosts(dsp); + XUngrabPointer(dsp, CurrentTime); + XUngrabKeyboard(dsp, CurrentTime); + if (!enablesaver) + XSetScreenSaver(dsp, sstimeout, ssinterval, ssblanking, ssexposures); + XFlush(dsp); + XCloseDisplay(dsp); +} + +/* + * Convenience function for drawing text + */ +static void +putText(win, gc, string, bold, left, px, py) + Window win; /* which window */ + GC gc; /* gc */ + char *string; /* text to write */ + int bold; /* 1 = make it bold */ + int left; /* left edge of text */ + int *px, *py; /* current x and y, input & return */ +{ +#define PT_BUFSZ 2048 + char buf[PT_BUFSZ], *p, *s; + int x = *px, y = *py, last, len; + + (void) strncpy(buf, string, PT_BUFSZ); + buf[PT_BUFSZ - 1] = 0; + + p = buf; + last = 0; + while(1) { + s = p; + for(; *p; ++p) + if(*p == '\n') + break; + if(!*p) + last = 1; + *p = 0; + + if ((len = strlen(s))) { /* yes, that's supposed to be "=", not "==" */ + XDrawImageString(dsp, win, gc, x, y, s, len); + if(bold) + XDrawString(dsp, win, gc, x+1, y, s, len); + } + if(!last) { + y += font->ascent + font->descent + 2; + x = left; + } else { + if(len) + x += XTextWidth(font, s, len); + break; + } + p++; + } + *px = x; + *py = y; +} + + +#ifndef LO_BUTTON_TIME +#define LO_BUTTON_TIME 5 +#endif + +static void +statusUpdate(new, scr) + Bool new; + int scr; +{ + int left, x, y, now, len; + char buf[1024]; + XWindowAttributes xgwa; + static int last_time; +#ifdef LOGOUT_BUTTON + int ysave; + static made_button, last_tried_lo = 0; + static int loButton = LO_BUTTON_TIME; +#endif /* LOGOUT_BUTTON */ + + now = seconds(); + len = (now - start_time) / 60; + +#ifdef LOGOUT_BUTTON + if (tried_logout && !last_tried_lo) { + last_tried_lo = 1; + new = 1; +#ifdef AUTO_LOGOUT + forceLogout = 0; +#endif + } + + if (new) + made_button = 0; +#endif /* LOGOUT_BUTTON */ + + if (new || last_time != len) + last_time = len; + else + return; + + (void) XGetWindowAttributes(dsp, win[scr], &xgwa); + x = left = iconx[scr]; + y = xgwa.height - (font->descent + 2); +#ifdef AUTO_LOGOUT + if (forceLogout) + y -= (font->ascent + font->descent + 2); +#endif +#ifdef LOGOUT_BUTTON + if (enable_button && loButton) { + if (loButton > len) { + y -= (font->ascent + font->descent + 2); + (void) sprintf(buf, + "%d minute%s until public logout button appears. \n", + loButton - len, loButton - len == 1 ? "" : "s"); + putText(win[scr], textgc[scr], buf, False, left, &x, &y); + } else if (!made_button || (new && tried_logout)) { + made_button = 1; + ysave = y; + y = xgwa.height * 0.6; + + XUnmapWindow(dsp, button[scr]); + XSetForeground(dsp, Scr[scr].gc, bgcol[scr]); + XFillRectangle(dsp, win[scr], Scr[scr].gc, left, y, + xgwa.width - left, xgwa.height - y); + XSetForeground(dsp, Scr[scr].gc, fgcol[scr]); + + if (tried_logout) { + putText(win[scr], textgc[scr], logoutFailedString, + True, left, &x, &y); + } else { + XMoveWindow(dsp, button[scr], left, y); + XMapWindow(dsp, button[scr]); + XRaiseWindow(dsp, button[scr]); + (void) sprintf(buf, " %s ", logoutButtonLabel); + XSetForeground(dsp, Scr[scr].gc, WhitePixel(dsp, scr)); + XDrawString(dsp, button[scr], Scr[scr].gc, 0, font->ascent + 1, + buf, strlen(buf)); + XSetForeground(dsp, Scr[scr].gc, fgcol[scr]); + y += 5 + 2*font->ascent + font->descent; + putText(win[scr], textgc[scr], logoutButtonHelp, + False, left, &x, &y); + } + y = ysave; + x = left; + } + } +#endif /* LOGOUT_BUTTON */ +#ifdef AUTO_LOGOUT + if (forceLogout) { + (void) sprintf(buf, "%d minute%s until auto-logout. \n", + forceLogout - len, + forceLogout - len == 1 ? "" : "s"); + putText(win[scr], textgc[scr], buf, False, left, &x, &y); + } +#endif /* AUTO_LOGOUT */ + if (timeelapsed) { + (void) strcpy(buf, "Display has been locked for "); + putText(win[scr], textgc[scr], buf, False, left, &x, &y); + + if (len < 60) + (void) sprintf(buf, "%d minute%s. \n", len, len == 1 ? "" : "s"); + else + (void) sprintf(buf, "%d hour%s %d minute%s. \n", + len / 60, len / 60 == 1 ? "" : "s", + len % 60, len % 60 == 1 ? "" : "s"); + putText(win[scr], textgc[scr], buf, False, left, &x, &y); + } +} + +#ifdef AUTO_LOGOUT +static void +checkLogout() +{ + if (nolock || tried_logout || !forceLogout) + return; + + if (seconds() > forceLogout*60 + start_time) { + tried_logout = 1; + forceLogout = 0; + logoutUser(); + } +} +#endif /* AUTO_LOGOUT */ + + +static int +ReadXString(s, slen) + char *s; + int slen; +{ + XEvent event; + char keystr[20]; + char c; + int i; + int bp; + int len; + int thisscreen = screen; + char pwbuf[PASSLENGTH]; + int first_key = 1; + + for (screen = 0; screen < screens; screen++) + if (thisscreen == screen) + init(icon[screen]); + else + init(win[screen]); + statusUpdate(True, thisscreen); + bp = 0; + *s = 0; + while (True) { + unsigned long lasteventtime = seconds(); + while (!XPending(dsp)) { + for (screen = 0; screen < screens; screen++) + if (thisscreen == screen) + callback(icon[screen]); + else + callback(win[screen]); + statusUpdate(False, thisscreen); + XSync(dsp, False); + (void) usleep(delay); + if (seconds() - lasteventtime > timeout) { + screen = thisscreen; + return 1; + } + } + screen = thisscreen; + XNextEvent(dsp, &event); + switch (event.type) { + case KeyPress: + len = XLookupString((XKeyEvent *) & event, keystr, 20, NULL, NULL); + for (i = 0; i < len; i++) { + c = keystr[i]; + switch (c) { + case 8: /* ^H */ + case 127: /* DEL */ + if (bp > 0) + bp--; + break; + case 10: /* ^J */ + case 13: /* ^M */ + if (first_key && usefirst) + break; + s[bp] = '\0'; + return 0; + case 21: /* ^U */ + bp = 0; + break; + default: + s[bp] = c; + if (bp < slen - 1) + bp++; + else + XSync(dsp, True); /* flush input buffer */ + } + } + XSetForeground(dsp, Scr[screen].gc, bgcol[screen]); + if (echokeys) { + (void) memset(pwbuf, '?', slen); + XFillRectangle(dsp, win[screen], Scr[screen].gc, + passx, passy - font->ascent, + XTextWidth(font, pwbuf, slen), + font->ascent + font->descent); + XDrawString(dsp, win[screen], textgc[screen], + passx, passy, pwbuf, bp); + } + /* + * eat all events if there are more than enough pending... this + * keeps the Xlib event buffer from growing larger than all + * available memory and crashing xlock. + */ + if (XPending(dsp) > 100) { /* 100 is arbitrarily big enough */ + register Status status; + do { + status = XCheckMaskEvent(dsp, + KeyPressMask | KeyReleaseMask, &event); + } while (status); + XBell(dsp, 100); + } + break; + +#ifdef MOUSEMOTION + case MotionNotify: +#endif + case ButtonPress: + if (((XButtonEvent *) & event)->window == icon[screen]) { + return 1; + } +#ifdef LOGOUT_BUTTON + if (((XButtonEvent *) & event)->window == button[screen]) { + XSetFunction(dsp, Scr[screen].gc, GXxor); + XSetForeground(dsp, Scr[screen].gc, fgcol[screen]); + XFillRectangle(dsp, button[screen], Scr[screen].gc, + 0, 0, 500, 100); + XSync(dsp, False); + tried_logout = 1; + logoutUser(); + XSetFunction(dsp, Scr[screen].gc, GXcopy); + } +#endif + break; + + case VisibilityNotify: + if (event.xvisibility.state != VisibilityUnobscured) { +#ifndef DEBUG + if (!inwindow) + XRaiseWindow(dsp, win[screen]); +#endif + s[0] = '\0'; + return 1; + } + break; + + case KeymapNotify: + case KeyRelease: + case ButtonRelease: +#ifndef MOUSEMOTION + case MotionNotify: +#endif + case LeaveNotify: + case EnterNotify: + case NoExpose: + break; + + default: + (void) fprintf(stderr, "%s: unexpected event: %d\n", + ProgramName, event.type); + break; + } + first_key = 0; + } +} + + + +static int +getPassword() +{ +#ifdef VMS +#include +#endif + + char buffer[PASSLENGTH]; +#ifndef HP_PASSWDETC + char userpass[PASSLENGTH]; +#ifdef SOLARIS_SHADOW + char user[L_cuserid]; + struct spwd *sp; +#else + char rootpass[PASSLENGTH]; + char *user; +#endif +#endif /* HP_PASSWDETC */ + XWindowAttributes xgwa; + int x, y, left, done; +#ifdef VMS + char *root = "SYSTEM"; + + struct itmlst { + short buflen; + short code; + long addr; + long retadr; + }; + struct itmlst il[4]; + + short uai_salt,root_salt; + char hash_password[9], hash_system[9],root_password[9],root_system[9]; + char uai_encrypt,root_encrypt; + + struct ascid { + short len; + char dtype; + char class; + char *addr; + }; + + struct ascid username, password, rootuser; + + user = cuserid(NULL); + il[0].buflen = 2; + il[0].code = UAI$_SALT; + il[0].addr = &uai_salt; + il[0].retadr = 0; + il[1].buflen = 8; + il[1].code = UAI$_PWD; + il[1].addr = &hash_password; + il[1].retadr = 0; + il[2].buflen = 1; + il[2].code = UAI$_ENCRYPT; + il[2].addr = &uai_encrypt; + il[2].retadr = 0; + il[3].buflen = 0; + il[3].code = 0; + il[3].addr = 0; + il[3].retadr = 0; + + username.len = strlen(user); + username.dtype = 0; + username.class = 0; + username.addr = user; + + sys$getuai(0,0,&username,&il,0,0,0); + + il[0].buflen = 2; + il[0].code = UAI$_SALT; + il[0].addr = &root_salt; + il[0].retadr = 0; + il[1].buflen = 8; + il[1].code = UAI$_PWD; + il[1].addr = &root_password; + il[1].retadr = 0; + il[2].buflen = 1; + il[2].code = UAI$_ENCRYPT; + il[2].addr = &root_encrypt; + il[2].retadr = 0; + il[3].buflen = 0; + il[3].code = 0; + il[3].addr = 0; + il[3].retadr = 0; + + rootuser.len = strlen(root); + rootuser.dtype = 0; + rootuser.class = 0; + rootuser.addr = root; + + sys$getuai(0,0,&rootuser,&il,0,0,0); +#else /* !VMS */ +#ifdef OSF1_ENH_SEC + struct pr_passwd *pw; + + pw = getprpwnam("root"); + (void) strcpy(rootpass, pw->ufld.fd_encrypt); + + pw = getprpwuid (getuid()); + (void) strcpy(userpass, pw->ufld.fd_encrypt); + user = pw->ufld.fd_name; + +#else /* !OSF1_ENH_SEC */ +#ifndef HP_PASSWDETC + struct passwd *pw; + +#if defined(SECURE_PASSWD) + seteuid(0); /* Need to be root now */ +#endif + +#ifdef SOLARIS_SHADOW + /* pw = (struct passwd *)getpwnam("root"); + (void) strcpy(rootpass, pw->pw_passwd); + pw = (struct passwd *)getpwnam(cuserid(NULL));*/ + sp = getspnam(cuserid(user)); + (void) strcpy(userpass, sp->sp_pwdp); +#else + pw = (struct passwd *)getpwnam("root"); + (void) strcpy(rootpass, pw->pw_passwd); + + pw = (struct passwd *)getpwuid(getuid()); +#endif +#if defined(HAS_SHADOW) && defined(linux) + { + struct spwd *spw; + + if ((spw = getspnam(pw->pw_name)) == NULL) + pw->pw_passwd = ""; + else + pw->pw_passwd = spw->sp_pwdp; + } +#endif +#ifndef SOLARIS_SHADOW + (void) strcpy(userpass, pw->pw_passwd); + + user = pw->pw_name; +#endif +#endif /* !OFS_ENH_SEC */ +#if defined(SECURE_PASSWD) + seteuid(getuid()); /* Don't need to be root anymore */ +#endif +#endif /* !HP_PASSWDETC */ +#endif /* !VMS */ + + if ( !fullscreen ) + XConfigureWindow( dsp, win[screen], sizeconfiguremask, + &fullsizeconfigure); + + + (void) XGetWindowAttributes(dsp, win[screen], &xgwa); + + XChangeGrabbedCursor(XCreateFontCursor(dsp, XC_left_ptr)); + + XSetForeground(dsp, Scr[screen].gc, bgcol[screen]); + XFillRectangle(dsp, win[screen], Scr[screen].gc, + 0, 0, xgwa.width, xgwa.height); + + XMapWindow(dsp, icon[screen]); + XRaiseWindow(dsp, icon[screen]); + + x = left = iconx[screen] + ICONW + font->max_bounds.width; + y = icony[screen] + font->ascent; + + putText(win[screen], textgc[screen], text_name, True, left, &x, &y); + putText(win[screen], textgc[screen], user, False, left, &x, &y); + putText(win[screen], textgc[screen], "\n", False, left, &x, &y); + + putText(win[screen], textgc[screen], text_pass, True, left, &x, &y); + putText(win[screen], textgc[screen], " ", False, left, &x, &y); + + passx = x; + passy = y; + + y = icony[screen] + ICONH + font->ascent + 2; + x = left = iconx[screen]; + putText(win[screen], textgc[screen], text_info, False, left, &x, &y); + putText(win[screen], textgc[screen], "\n", False, left, &x, &y); + + XFlush(dsp); + + y += font->ascent + font->descent + 2; + + done = False; + while (!done) { + if (ReadXString(buffer, PASSLENGTH)) + break; + + /* + * we don't allow for root to have no password, but we handle the case + * where the user has no password correctly; they have to hit return + * only + */ +#ifdef VMS + password.len = strlen(&buffer); + password.dtype = 0; + password.class = 0; + password.addr = &buffer; + + str$upcase(&password,&password); + + sys$hash_password(&password,uai_encrypt,uai_salt, + &username,&hash_system); + sys$hash_password(&password,root_encrypt,root_salt, + &rootuser,&root_system); + hash_password[8]=0; + hash_system[8]=0; + root_password[8]=0; + root_system[8]=0; + done = !((strcmp(hash_password,hash_system)) && + (!allowroot || strcmp(root_password,root_system))); +#else /* !VMS */ +#ifdef ultrix + done = ((authenticate_user(pw, buffer, NULL) >= 0) || + (allowroot && (authenticate_user((struct passwd *) getpwnam("root"), + buffer, NULL) >= 0))); +#else +#if defined(HAS_SHADOW) && defined(linux) +#ifdef __QNX__ +#define pw_encrypt crypt +#endif + done = !((strcmp((char *)pw_encrypt(buffer, userpass), userpass)) && + (!allowroot || + strcmp((char *)pw_encrypt(buffer, rootpass), rootpass))); +#else +#ifdef SOLARIS_SHADOW + done = !((strcmp(crypt(buffer, userpass), userpass))); +#else + done = !((strcmp(crypt(buffer, userpass), userpass)) && + (!allowroot || strcmp(crypt(buffer, rootpass), rootpass))); +#endif +#endif +#endif +#endif /* !VMS */ + if (!done && !*buffer) { + /* just hit return, and it wasn't his password */ + break; + } +#ifndef ultrix + if (!*userpass && *buffer) { + /* + * the user has no password, but something was typed anyway. + * sounds fishy: don't let him in... + */ + done = False; + } +#endif + /* clear plaintext password so you can't grunge around /dev/kmem */ + (void) memset(buffer, 0, sizeof(buffer)); + + XSetForeground(dsp, Scr[screen].gc, bgcol[screen]); + + XFillRectangle(dsp, win[screen], Scr[screen].gc, + iconx[screen], y - font->ascent, + XTextWidth(font, text_invalid, strlen(text_invalid)), + font->ascent + font->descent + 2); + + XDrawString(dsp, win[screen], textgc[screen], + iconx[screen], y, text_valid, strlen(text_valid)); + + if (done) { + if ( !fullscreen ) + XConfigureWindow( dsp, win[screen], sizeconfiguremask, + &minisizeconfigure ); + return 0; + } else { + XSync(dsp, True); /* flush input buffer */ + (void) sleep(1); + XFillRectangle(dsp, win[screen], Scr[screen].gc, + iconx[screen], y - font->ascent, + XTextWidth(font, text_valid, strlen(text_valid)), + font->ascent + font->descent + 2); + XDrawString(dsp, win[screen], textgc[screen], + iconx[screen], y, text_invalid, strlen(text_invalid)); + if (echokeys) /* erase old echo */ + XFillRectangle(dsp, win[screen], Scr[screen].gc, + passx, passy - font->ascent, + xgwa.width - passx, + font->ascent + font->descent); + } + } + XChangeGrabbedCursor(mycursor); + XUnmapWindow(dsp, icon[screen]); +#ifdef LOGOUT_BUTTON + XUnmapWindow(dsp, button[screen]); +#endif + if ( !fullscreen ) + XConfigureWindow( dsp, win[screen], sizeconfiguremask, + &minisizeconfigure ); + return 1; +} + + +static void +justDisplay() +{ + XEvent event; + + for (screen = 0; screen < screens; screen++) + init(win[screen]); + do { + while (!XPending(dsp)) { + (void) usleep(delay); + for (screen = 0; screen < screens; screen++) + callback(win[screen]); +#ifdef AUTO_LOGOUT + checkLogout(); +#endif + XSync(dsp, False); + } + XNextEvent(dsp, &event); +#ifndef DEBUG + if (!inwindow && event.type == VisibilityNotify) + XRaiseWindow(dsp, event.xany.window); +#endif + } while (event.type != ButtonPress && +#ifdef MOUSEMOTION + event.type != MotionNotify && +#endif + event.type != KeyPress); + for (screen = 0; screen < screens; screen++) + if (event.xbutton.root == RootWindow(dsp, screen)) + break; + + /* KLUDGE SO TVTWM AND VROOT WON'T MAKE XLOCK DIE */ + if (screen >= screens) + screen = 0; + + if (usefirst) + XPutBackEvent(dsp, &event); +} + + +static void +sigcatch() +{ + finish(); + error("%s: caught terminate signal.\nAccess control list restored.\n"); +} + + +static void +lockDisplay() +{ + if (!allowaccess) { +#if defined(SYSV) || defined(SVR4) + sigset_t oldsigmask; + sigset_t newsigmask; + + (void) sigemptyset(&newsigmask); + (void) sigaddset(&newsigmask, SIGHUP); + (void) sigaddset(&newsigmask, SIGINT); + (void) sigaddset(&newsigmask, SIGQUIT); + (void) sigaddset(&newsigmask, SIGTERM); + (void) sigprocmask(SIG_BLOCK, &newsigmask, &oldsigmask); +#else + int oldsigmask; +#ifndef VMS + oldsigmask = sigblock(sigmask(SIGHUP) | + sigmask(SIGINT) | + sigmask(SIGQUIT) | + sigmask(SIGTERM)); +#endif +#endif + + (void) signal(SIGHUP, (void (*) ()) sigcatch); + (void) signal(SIGINT, (void (*) ()) sigcatch); + (void) signal(SIGQUIT, (void (*) ()) sigcatch); + (void) signal(SIGTERM, (void (*) ()) sigcatch); + + XGrabHosts(dsp); + +#if defined(SYSV) || defined(SVR4) + (void) sigprocmask(SIG_SETMASK, &oldsigmask, &oldsigmask); +#else + (void) sigsetmask(oldsigmask); +#endif + } +#if defined(__hpux) || defined(__apollo) + XHPDisableReset(dsp); +#endif + do { + justDisplay(); + } while (getPassword()); +#if defined(__hpux) || defined(__apollo) + XHPEnableReset(dsp); +#endif +} + + +long +allocpixel(cmap, name, def) + Colormap cmap; + char *name; + char *def; +{ + XColor col; + XColor tmp; + (void) XParseColor(dsp, cmap, name, &col); + if (!XAllocColor(dsp, cmap, &col)) { + (void) fprintf(stderr, "couldn't allocate: %s, using %s instead\n", + name, def); + (void) XAllocNamedColor(dsp, cmap, def, &col, &tmp); + } + return col.pixel; +} + + +#ifdef HP_PASSWDETC +/* + * The PasswdEtc libraries have replacement passwd functions that make + * queries to DomainOS registries. Unfortunately, these functions do + * wierd things to the process (at minimum, signal handlers get changed, + * there are probably other things as well) that cause xlock to become + * unstable. + * + * As a (really, really sick) workaround, we'll fork() and do the getpw*() + * calls in the child, and pass the information back through a pipe. + */ +void get_passwords() +{ + struct passwd *pw; + int pipefd[2], n, total = 0, stat_loc; + static char buf[1024]; /* should be big enough */ + pid_t pid; + + pipe(pipefd); + + if((pid = fork()) == 0) { + close(pipefd[0]); + pw = getpwuid(getuid()); + write(pipefd[1], pw->pw_name, strlen(pw->pw_name)); + write(pipefd[1], "\n", 1); + write(pipefd[1], pw->pw_passwd, strlen(pw->pw_passwd)); + write(pipefd[1], "\n", 1); + pw = getpwnam("root"); + write(pipefd[1], pw->pw_passwd, strlen(pw->pw_passwd)); + close(pipefd[1]); + _exit(0); + } + if(pid < 0) { + (void) fprintf(stderr, "Could not get passwords (fork failed)\n"); + exit(1); + } + close(pipefd[1]); + + while((n = read(pipefd[0], &(buf[total]), 50)) > 0) + total += n; + + wait(&stat_loc); + + if(n < 0) { + (void) fprintf(stderr, "Could not get passwords (read failed)\n"); + exit(1); + } + buf[total] = 0; + + if(total < 3) { + (void) fprintf(stderr, "Could not get passwords (lookups failed)\n"); + exit(1); + } + + user = strtok(buf, "\n"); + userpass = strtok(NULL, "\n"); + rootpass = strtok(NULL, "\n"); + + if(!user || !userpass || !rootpass) { + (void) fprintf(stderr, "Could not get passwords (lookups failed 2)\n"); + exit(1); + } +} +#endif /* HP_PASSWDETC */ + +void +set_colormap(screen, map) + int screen; + Colormap map; +{ + Screen *scr = ScreenOfDisplay(dsp, screen); + + if(inroot || mono || CellsOfScreen(scr) == 2) + return; + + XSetWindowColormap(dsp, win[screen], map); + /* + * Now, here we have a problem. When we're running full-screen, the + * window's override_redirect attribute is on. So, the window manager + * never gets the ColormapNotify event that gets generated on the above + * XSetWindowColormap() call, and doesn't install the new colormap. + * So, a quick solution is to install it ourselves. The problem with + * this is that it violates the ICCCM convention that only window + * managers should install colormaps. Indeed, Fvwm _enforces_ this + * by immediately un-doing any XInstallColormap() performed by a client + * (which is why this doesn't work right under Fvwm). + */ + if(!inroot && !inwindow) { + XInstallColormap(dsp, map); + } +} + + +int +main(argc, argv) + int argc; + char *argv[]; +{ + XSetWindowAttributes xswa; + XGCValues xgcv; + XColor nullcolor; + +#ifdef HP_PASSWDETC + get_passwords(); +#endif + + ProgramName = strrchr(argv[0], '/'); + if (ProgramName) + ProgramName++; + else + ProgramName = argv[0]; + +#ifdef OSF1_ENH_SEC + set_auth_parameters(); +#endif + +#if defined(SECURE_PASSWD) + seteuid(getuid()); +#endif + + start_time = time((long *) 0); + SRAND(start_time); /* random mode needs the seed set. */ + + GetResources(argc, argv); + + CheckResources(); + + font = XLoadQueryFont(dsp, fontname); + if (font == NULL) { + (void) fprintf(stderr, "%s: can't find font: %s, using %s...\n", + ProgramName, fontname, FALLBACK_FONTNAME); + font = XLoadQueryFont(dsp, FALLBACK_FONTNAME); + if (font == NULL) + error("%s: can't even find %s!!!\n", FALLBACK_FONTNAME); + } + { + int flags, x, y; + unsigned int w, h; + + if ( *geometry == '\0' ) { + fullscreen = True; + } + else { + flags = XParseGeometry( geometry, &x, &y, &w, &h ); + win_x = minisizeconfigure.x = flags&XValue ? x : 0; + win_y = minisizeconfigure.y = flags&YValue ? y : 0; + win_w = minisizeconfigure.width = flags&WidthValue ? w : ICONW; + win_h = minisizeconfigure.height = flags&HeightValue ? h : ICONH; + } + } + screens = ScreenCount(dsp); + if (screens > MAXSCREENS) + error("%s: can only support %d screens.\n", MAXSCREENS); + for (screen = 0; screen < screens; screen++) { + Screen *scr = ScreenOfDisplay(dsp, screen); + Colormap cmap = DefaultColormapOfScreen(scr); + Colormap dcmap = cmap; /* record default colormap */ + + root[screen] = RootWindowOfScreen(scr); + bgcol[screen] = allocpixel(cmap, background, "White"); + fgcol[screen] = allocpixel(cmap, foreground, "Black"); + Scr[screen].bgcol = bgcol[screen] ; + Scr[screen].fgcol = fgcol[screen] ; + + if (mono || CellsOfScreen(scr) == 2) { + Scr[screen].pixels[0] = fgcol[screen]; + Scr[screen].pixels[1] = bgcol[screen]; + Scr[screen].npixels = 2; + } else { + int colorcount = NUMCOLORS; + u_char red[NUMCOLORS]; + u_char green[NUMCOLORS]; + u_char blue[NUMCOLORS]; + int i; + XColor xcolor; + + if (install) { + /* "allocate" the black and white pixels, so that they'll be + included by XCopyColormapAndFree() if it gets called */ + xcolor.pixel = BlackPixelOfScreen(scr); + XQueryColor(dsp, cmap, &xcolor); + XAllocColor(dsp, cmap, &xcolor); + xcolor.pixel = WhitePixelOfScreen(scr); + XQueryColor(dsp, cmap, &xcolor); + XAllocColor(dsp, cmap, &xcolor); + } + hsbramp(0.0, saturation, 1.0, 1.0, saturation, 1.0, colorcount, + red, green, blue); + Scr[screen].npixels = 0; + for (i = 0; i < colorcount; i++) { + xcolor.red = red[i] << 8; + xcolor.green = green[i] << 8; + xcolor.blue = blue[i] << 8; + xcolor.flags = DoRed | DoGreen | DoBlue; + + if (!XAllocColor(dsp, cmap, &xcolor)) { + if(!install || cmap != dcmap) + break; + if((cmap = XCopyColormapAndFree(dsp, cmap)) == dcmap) + break; + if(verbose) + fprintf(stderr, "using private colormap\n"); + if(!XAllocColor(dsp, cmap, &xcolor)) + break; + } + Scr[screen].pixels[i] = xcolor.pixel; + Scr[screen].npixels++; + } + if (verbose) + (void) fprintf(stderr, + "%d pixels allocated\n", Scr[screen].npixels); + } + + xswa.override_redirect = True; + xswa.background_pixel = BlackPixel(dsp, screen); + xswa.event_mask = KeyPressMask | ButtonPressMask | +#ifdef MOUSEMOTION + MotionNotify | +#endif + VisibilityChangeMask; +#ifdef DEBUG +#define WIDTH WidthOfScreen(scr) - 100 +#define HEIGHT HeightOfScreen(scr) - 100 +#define CWMASK CWBackPixel | CWEventMask +#else +#define WIDTH (inwindow? WidthOfScreen(scr)/2 : WidthOfScreen(scr)) +#define HEIGHT (inwindow? HeightOfScreen(scr)/2 : HeightOfScreen(scr)) +#define CWMASK (((inwindow||inroot)? 0 : CWOverrideRedirect) | CWBackPixel | CWEventMask) +#endif +#ifdef USE_VROOT + if (inroot) { + win[screen] = root[screen]; + XChangeWindowAttributes(dsp, win[screen], CWBackPixel, &xswa); + } else +#endif + { + if ( fullscreen ) + win[screen] = XCreateWindow(dsp, root[screen], + 0, 0, WIDTH, HEIGHT, 0, + CopyFromParent, InputOutput, CopyFromParent, + CWMASK, &xswa); + else { + sizeconfiguremask = CWX | CWY | CWWidth | CWHeight; + fullsizeconfigure.x = 0; + fullsizeconfigure.y = 0; + fullsizeconfigure.width = WIDTH; + fullsizeconfigure.height = HEIGHT; + win[screen] = XCreateWindow(dsp, root[screen], + (int) minisizeconfigure.x, + (int) minisizeconfigure.y, + (unsigned int) minisizeconfigure.width, + (unsigned int) minisizeconfigure.height, + 0, CopyFromParent, InputOutput, CopyFromParent, + CWMASK, &xswa); + } + } + +#ifdef DEBUG + { + XWMHints xwmh; + + xwmh.flags = InputHint; + xwmh.input = True; + XChangeProperty(dsp, win[screen], + XA_WM_HINTS, XA_WM_HINTS, 32, PropModeReplace, + (unsigned char *) &xwmh, sizeof(xwmh) / sizeof(int)); + } +#else + if (inwindow) { + XWMHints xwmh; + + xwmh.flags = InputHint; + xwmh.input = True; + XChangeProperty(dsp, win[screen], + XA_WM_HINTS, XA_WM_HINTS, 32, PropModeReplace, + (unsigned char *) &xwmh, sizeof(xwmh) / sizeof(int)); + } +#endif + + iconx[screen] = (DisplayWidth(dsp, screen) - + XTextWidth(font, text_info, strlen(text_info))) / 2; + + icony[screen] = DisplayHeight(dsp, screen) / 6; + + xswa.border_pixel = WhitePixel(dsp, screen); + xswa.background_pixel = BlackPixel(dsp, screen); + xswa.event_mask = ButtonPressMask; +#define CIMASK CWBorderPixel | CWBackPixel | CWEventMask + icon[screen] = XCreateWindow(dsp, win[screen], + iconx[screen], icony[screen], + ICONW, ICONH, 1, CopyFromParent, + InputOutput, CopyFromParent, + CIMASK, &xswa); + +#ifdef LOGOUT_BUTTON + { + char buf[1024]; + int w, h; + + (void) sprintf(buf, " %s ", logoutButtonLabel); + w = XTextWidth(font, buf, strlen(buf)); + h = font->ascent + font->descent + 2; + button[screen] = XCreateWindow(dsp, win[screen], + 0, 0, w, h, 1, CopyFromParent, + InputOutput, CopyFromParent, + CIMASK, &xswa); + } +#endif + XMapWindow(dsp, win[screen]); + XRaiseWindow(dsp, win[screen]); + + if(install && cmap != dcmap) + set_colormap(screen, cmap); + + xgcv.font = font->fid; + xgcv.foreground = WhitePixel(dsp, screen); + xgcv.background = BlackPixel(dsp, screen); + Scr[screen].gc = XCreateGC(dsp, win[screen], + GCFont | GCForeground | GCBackground, &xgcv); + + xgcv.foreground = fgcol[screen]; + xgcv.background = bgcol[screen]; + textgc[screen] = XCreateGC(dsp, win[screen], + GCFont | GCForeground | GCBackground, &xgcv); + } + lockc = XCreateBitmapFromData(dsp, root[0], no_bits, 1, 1); + lockm = XCreateBitmapFromData(dsp, root[0], no_bits, 1, 1); + mycursor = XCreatePixmapCursor(dsp, lockc, lockm, + &nullcolor, &nullcolor, 0, 0); + XFreePixmap(dsp, lockc); + XFreePixmap(dsp, lockm); + + + if (!enablesaver) { + XGetScreenSaver(dsp, &sstimeout, &ssinterval, + &ssblanking, &ssexposures); + XSetScreenSaver(dsp, 0, 0, 0, 0); /* disable screen saver */ + } +#ifndef DEBUG + if (grabmouse && !inwindow && !inroot) + GrabKeyboardAndMouse(); + else + nolock = 1; +#endif + + (void) nice(nicelevel); + if (nolock) + justDisplay(); + else + lockDisplay(); + + finish(); + +#ifdef VMS + return 1; +#else + return 0; +#endif +} diff --git a/xlock.h b/xlock.h new file mode 100644 index 00000000..388af9bf --- /dev/null +++ b/xlock.h @@ -0,0 +1,205 @@ +/*- + * @(#)xlock.h 1.9 91/05/24 XLOCK + * + * xlock.h - external interfaces for new modes and SYSV OS defines. + * + * Copyright (c) 1991 by Patrick J. Naughton. + * + * See xlock.c for copying information. + * + * Revision History: + * + * Changes of David Bagley + * 18-Nov-94: Modified for QNX 4.2 w/ Metrolink X server from Brian Campbell + * . + * 11-Jul-94: added Bool flag: inwindow, which tells xlock to run in a + * window from Greg Bowering + * 11-Jul-94: patch for Solaris SYR4 from Chris P. Ross + * 28-Jun-94: Reorganized shadow stuff + * 24-Jun-94: Reorganized + * 22-Jun-94: Modified for VMS + * + * 17-Jun-94: patched shadow passwords and bcopy and bzero for SYSV from + * + * 21-Mar-94: patched the patch for AIXV3 and HP from + * . + * 01-Dec-93: added patch for AIXV3 from + * (Tom McConnell, tmcconne@sedona.intel.com) also added a patch + * for HP-UX 8.0. + * + */ + +#include +#include +#include + +#define MAXSCREENS 3 +#define NUMCOLORS 64 + +#ifndef min +#define min(a,b) ((a)<(b)?(a):(b)) +#endif + +#if defined VMS || defined __QNX__ +#ifdef VMS +typedef unsigned long u_long; +typedef unsigned short u_short; +typedef unsigned char u_char; +#endif +#define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.78539816339744830962 +#endif + +#ifdef OSF1_ENH_SEC +#include +#include +#include +#endif + +#if !defined (news1800) && !defined (sun386) +#include +#ifndef apollo +#include +#endif +#endif + + +typedef struct { + GC gc; /* graphics context for animation */ + int npixels; /* number of valid entries in pixels */ + u_long pixels[NUMCOLORS]; /* pixel values in the colormap */ + u_long bgcol, fgcol ; /* background and foreground pixel values */ +} perscreen; + +extern perscreen Scr[MAXSCREENS]; +extern Display *dsp; +extern int screen; + +extern char *ProgramName; +extern char *displayname; +extern char *mode; +extern char *fontname; +extern char *background; +extern char *foreground; +extern char *text_name; +extern char *text_pass; +extern char *text_info; +extern char *text_valid; +extern char *text_invalid; +extern char *geometry; +extern float saturation; +extern int nicelevel; +extern int delay; +extern int batchcount; +extern int reinittime; +extern int timeout; +#ifdef AUTO_LOGOUT +extern int forceLogout; +#endif +#ifdef LOGOUT_BUTTON +extern int enable_button; +extern char *logoutButtonLabel; +extern char *logoutButtonHelp; +extern char *logoutFailedString; +#endif +extern Bool usefirst; +extern Bool mono; +extern Bool nolock; +extern Bool allowroot; +extern Bool enablesaver; +extern Bool allowaccess; +extern Bool grabmouse; +extern Bool echokeys; +extern Bool verbose; +extern Bool inwindow; +extern Bool inroot; +extern Bool timeelapsed; +extern Bool install; +extern void (*callback) (); +extern void (*init) (); + +extern void GetResources(); +extern void hsbramp(); +extern void set_colormap(); +extern void logoutUser(); +#ifdef __STDC__ +extern void error(char *, ...); +#else +extern void error(); +#endif +extern long seconds(); +extern void usage(); + +/* System V Release 4 redefinitions of BSD functions and structures */ +#if defined(SYSV) || defined(SVR4) + +#if defined(HAS_SHADOW) || defined(SOLARIS_SHADOW) +#define passwd spwd +#define pw_passwd sp_pwdp +#ifndef __hpux +#include +#endif +#define getpwnam getspnam +#ifdef SOLARIS_SHADOW +#define pw_name sp_namp +#endif +#endif /* defined(HAS_SHADOW) || defined(SOLARIS_SHADOW) */ + +#include +#ifdef __hpux +#ifdef HPUX_SECURE_PASSWD +#define seteuid(_eu) setresuid(-1,_eu,-1) +#define passwd s_passwd +#define getpwnam(_s) getspwnam(_s) +#define getpwuid(_u) getspwuid(_u) +#endif +#else /* __hpux */ +#ifdef AIXV3 +#undef NULL +#define NULL 0 +#include +struct passwd { + char *pw_name; + char *pw_passwd; + uid_t pw_uid; + gid_t pw_gid; + char *pw_gecos; + char *pw_dir; + char *pw_shell; +}; +#else /* AIXV3 */ +#include +#endif /* AIXV3 */ +#endif /* __hpux */ + +#else /* defined(SYSV) || defined(SVR4) */ + +#if defined(HAS_SHADOW) +#include +#define passwd spwd +#define pw_passwd sp_pwdp +#define pw_name sp_namp +#endif + +#endif /* defined(SYSV) || defined(SVR4) */ + +#ifdef HAS_RAND48 +#define SRAND(X) srand48((long) (X)) +#define RAND() lrand48() +#define MAXRAND (2147483648.0) +#else +#if defined(HAS_RANDOM) || (!defined(HAS_RAND)) +#define SRAND(X) srandom((unsigned int) (X)) +#define RAND() random() +#define MAXRAND (2147483648.0) +#else +#define SRAND(X) srand((unsigned int) X) +#define RAND() ((long) rand()) +#ifdef RAND_MAX +#define MAXRAND ((double)RAND_MAX) +#else +#define MAXRAND (32767.0) +#endif +#endif /* defined(HAS_RANDOM) || (!defined(HAS_RAND)) */ +#endif /* HAS_RAND48 */ diff --git a/xlock.man b/xlock.man new file mode 100644 index 00000000..429ab590 --- /dev/null +++ b/xlock.man @@ -0,0 +1,571 @@ +.\" @(#)xlock.man 1.11 91/09/27; Copyright (c) 1991 - Patrick J. Naughton +.\" xlockmore updates from David A. Bagley +.TH XLOCK 1 "27 Jan 1995" "X11R6 Contrib" +.SH NAME +xlock \- Locks the local X display until a password is entered. + +.IX xlock#(1) "" "\fLxlock\fP(1)" +.SH SYNOPSIS +.B xlock +[ +.BI \-display " dsp" +] +[ +.BI \-help +] +[ +.BI \-name "resource-name" +] +[ +.BI \-resources +] +[ +.BI -/+remote +] +[ +.BI -/+mono +] +[ +.BI -/+nolock +] +[ +.BI -/+allowroot +] +[ +.BI -/+enablesaver +] +[ +.BI -/+allowaccess +] +[ +.BI -/+grabmouse +] +[ +.BI -/+echokeys +] +[ +.BI -/+usefirst +] +[ +.BI -/+v +] +[ +.BI -/+inwindow +] +[ +.BI -/+inroot +] +[ +.BI -/+timeleapsed +] +[ +.BI -/+install +] +[ +.BI \-delay " usecs" +] +[ +.BI \-batchcount " num" +] +[ +.BI \-nice " level" +] +[ +.BI \-timeout " seconds" +] +[ +.BI \-saturation " value" +] +[ +.BI \-font " fontname" +] +[ +.BI \-bg " color" +] +[ +.BI \-fg " color" +] +[ +.BI \-mode " mode" +] +[ +.BI \-username " textstring" +] +[ +.BI \-password " textstring" +] +[ +.BI \-info " textstring" +] +[ +.BI \-validate " textstring" +] +[ +.BI \-invalid " textstring" +] +[ +.BI \-geometry " geom" +] +[ +.BI \-forceLogout " minutes" +] +[ +.BI \-logoutButtonLabel " textstring" +] +[ +.BI \-logoutButtonHelp " textstring" +] +[ +.BI \-logoutFailedString " textstring" +] + +.SH DESCRIPTION +.B xlock +locks the X server till the user enters their password at the keyboard. +While +.B xlock +is running, +all new server connections are refused. +The screen saver is disabled. +The mouse cursor is turned off. +The screen is blanked and a changing pattern is put on the screen. +If a key or a mouse button is pressed then the user is prompted for the +password of the user who started +.B xlock. + +If the correct password is typed, then the screen is unlocked and the X +server is restored. When typing the password Control-U and Control-H are +active as kill and erase respectively. To return to the locked screen, +click in the small icon version of the changing pattern. + +.SH "NOTE ON ETIQUETTE" +.I Xlock +should not be used on public terminals when there is a high demand for them. + +If you find a public terminal that has been locked by another user and +there are no other terminals available, and the terminal appears to have +been left idle for a while (normally more than 15 minutes), it is fair to +try to reset the session in some manner. + +.SH OPTIONS +.TP 5 +.B \-display " dsp" +The +.I display +option sets the X11 display to lock. +.B xlock +locks all available screens on a given server, +and restricts you to locking only a local server such as +.BI unix:0, +.BI localhost:0, +or +.BI :0 +unless you set the +.B \-remote +option. +.TP 5 +.B \-name " resource-name" +.I resource-name +is used instead of +.B XLock +when looking for resources to configure xlock. +.TP 5 +.B \-mode " modename" +As of this writing there are 28 display modes supported +(plus one more for random selection of one of the 28). +.TP 8 +.B hop +Hop mode shows the "real plane fractals" from the September 1986 issue of +Scientific American. +.TP 8 +.B life +Life mode shows Conway's game of life. +.TP 8 +.B qix +Qix mode shows the spinning lines similar to the old video game +by the same name. +.TP 8 +.B swarm +Swarm mode shows a swarm of bees following a wasp. +.TP 8 +.B rotor +Rotor mode shows a swirling rotorlike thing. +.TP 8 +.B pyro +Pyro mode shows fireworks. +.TP 8 +.B flame +Flame mode shows weird but cool cosmic flame fractals. +.TP 8 +.B worm +Worm mode shows wiggly worms... +.TP 8 +.B spline +Spline mode shows colorful moving splines, from spline fun #3. +.TP 8 +.B maze +Maze mode shows a random maze and a depth first search solution. +.TP 8 +.B sphere +Sphere mode draws a bunch of shaded spheres. +.TP 8 +.B hyper +Hyper mode draws a spinning tesseract in 4D space. +.TP 8 +.B helix +Helix mode shows string art. +.TP 8 +.B rock +Rock mode shows asteroid field with a twist. +.TP 8 +.B blot +Blot mode shows Rorschach's ink blot test. (I always see a daemon, +what does that mean?) +.TP 8 +.B grav +Grav mode shows orbiting planets. +.TP 8 +.B bounce +Bounce mode shows bouncing footballs. +.TP 8 +.B world +World mode makes the Earth spin. +.TP 8 +.B rect +Rect mode makes the stippled rectangles. +.TP 8 +.B bat +Bat mode makes bouncing flying bats. +.TP 8 +.B galaxy +Galaxy mode makes crashing spinning galaxies. +.TP 8 +.B kaleid +Kaleid mode makes a kaleidoscope. +.TP 8 +.B wator +Wator mode makes a Water-Torus planet of fish and sharks. +.TP 8 +.B life3d +Life3d mode shows Bays' game of 3D life. +.TP 8 +.B swirl +Swirl mode makes animated swirling patterns. +.TP 8 +.B image +Image mode shows several logos randomly appearing on the screen. +.TP 8 +.B bomb +Bomb mode displays countdown to auto logout. +.TP 8 +.B blank +Blank mode shows nothing but a black screen. +.TP 8 +.B random +Random mode picks a random mode from all of the above except +image, bomb, and blank mode. + +.TP 5 +.B \-delay " usecs" +The +.I delay +option sets the speed at which a mode will operate. It simply sets the +number of microseconds to delay between batches of "hopalong pixels", +"qix lines", "life generations", "world blits", "swarm motions", etc. In +blank mode, it is important to set this to some small number of seconds, +because the keyboard and mouse are only checked after each delay, so you +cannot set the delay too high, but a delay of zero would needlessly +consume cpu checking for mouse and keyboard input in a tight loop, since +blank mode has no work to do. +.TP 5 +.B \-batchcount " num" +The +.I batchcount +option sets number of +.I things +to do per batch to +.I num . +In hop mode this refers to the number of pixels rendered in the same color. +In life mode it is the number of generations to let each species live. +In qix mode it is the number of lines rendered in the same color. +In swarm mode it is the number of bees. +In rotor mode it is the number of rotor thingys which whirr... +In pyro mode it is the maximum number flying rockets at one time. +In flame mode it is the number of levels to recurse (larger = more complex). +In worm mode it is the number of worms. +In spline mode it is the upper bound on the of points "splined". +In maze mode it is the upper bound on the of size of the maze. +In sphere mode it means nothing. +In hyper mode it means nothing. +In helix mode it means nothing. +In rock mode it is the number of asteroids on the screen at once. +In blot mode this refers to the number of pixels rendered in the same color. +In grav mode it is the number of planets. +In bounce mode it is the number of balls. +In world mode it is the number of worlds. +In rect mode it means nothing. +In bat mode it is the number of bats. +In galaxy mode it means the number of galaxies. +In kaleid mode it means nothing. +In wator mode it means the breed time for the fish. +In life3d mode it is the number of generations to let each species live. +In swirl mode it means the number of "knots". +In image mode it means it is the number of logos on screen at once. +In bomb mode it means nothing. +In blank mode it means nothing. +.TP 5 +.B \-nice " nicelevel" +The +.I nice +option sets system nicelevel of the xlock process to +.I nicelevel . +.TP 5 +.B \-timeout " seconds" +The +.I timeout +option sets the number of +.I seconds +before the password screen will time out. +.TP 5 +.B \-saturation " value" +The +.I saturation +option sets saturation of the color ramp used to +.I value . +0 is grayscale and 1 is very rich color. 0.4 is a nice pastel. +.TP 5 +.B \-font " fontname" +The +.I font +option sets the font to be used on the prompt screen. +.TP 5 +.B \-fg " color" +The +.I fg +option sets the color of the text on the password screen to +.I color . +.TP 5 +.B \-bg " color" +The +.I bg +option sets the color of the background on the password screen to +.I color . +.TP 5 +.B \-username " textstring" +.I textstring +is shown in front of user name, defaults to "Name: ". +.TP 5 +.B \-password " textstring" +.I textstring +is the password prompt string, defaults to "Password: ". +.TP 5 +.B \-info " textstring" +.I textstring +is an informational message to tell the user what to do, defaults to +"Enter password to unlock; select icon to lock.". +.TP 5 +.BI \-validate " textstring" +.I textstring +is a message shown while validating the password, defaults to +"Validating login..." +.TP 5 +.BI \-invalid " textstring" +.I textstring +is a message shown when password is invalid, defaults to +"Invalid login." +.TP 5 +.BI \-geometry " geom" +The +.I geometry +option sets +.I geom +the size and offset of the lock window (normally the entire screen). +The entire screen format is still used for entering the password. The +purpose is to see the screen even though it is locked. This should be +used with caution since many of the modes will fail if the windows +are far from square or are too small. This should also be used with +-enablesaver to protect screen from phosphor burn. +.TP 5 +.BI \-forceLogout " minutes" +The +.I forceLogout +option sets +.I minutes +to auto-logout. This might not be enforced depending how your system is +configured. +.TP 5 +.BI \-logoutButtonLabel " textstring" +.I textstring +is a message shown inside logout button when logout button is displayed. +May not be available, depending how your system is configured. Defaults to +"Logout". +.TP 5 +.BI \-logoutButtonHelp " textstring" +.I textstring +is a message shown outside logout button when logout button is displayed. +May not be available, depending how your system is configured. Defaults to +"Click the \\"Logout\\" button to log out current\\n +user and make workstation available." +.TP 5 +.BI \-logoutFailedString " textstring" +.I textstring +is a message shown when a logout is attempted and fails. +May not be available, depending how your system is configured. Defaults to +"Logout attempt FAILED.\\n +Current user could not be automatically logged out." +.TP 5 +.B \-resources +The +.I resources +option prints the default resource file for xlock to standard output. +.TP 5 +.B -/+remote +The +.I remote +option tells xlock to not stop you from locking remote X11 servers. This +option should be used with care and is intended mainly to lock X11 terminals +which cannot run +.I xlock +locally. If you lock someone else's workstation, they will have to know +.B your +password to unlock it. +.TP 5 +.B -/+mono +The +.I mono +option causes xlock to display monochrome, (black and white) pixels rather +than the default colored ones on color displays +.TP 5 +.B +/-nolock +The +.I nolock +option causes xlock to only draw the patterns and not lock the display. +A key press or a mouse click will terminate the screen saver. +.TP 5 +.B -/+allowroot +The +.I allowroot +option allows the root password to unlock the server as well as the user +who started xlock. May not be able to turn this on and off depending +on your system and how xlock was configured. +.TP 5 +.B -/+enablesaver +By default xlock will disable the normal X server's screen saver since +it is in effect a replacement for it. Since it is possible to set delay +parameters long enough to cause phosphor burn on some displays, this +option will turn back on the default screen saver which is very careful +to keep most of the screen black. +.TP 5 +.B -/+allowaccess +This option is required for servers which do not allow clients to modify +the host access control list. It is also useful if you need to run x +clients on a server which is locked for some reason... When +.I allowaccess +is true, the X11 server is left open for clients to attach and thus +lowers the inherent security of this lock screen. A side effect of using +this option is that if xlock is killed -KILL, the access control list is +not lost. +.TP 5 +.B -/+grabmouse +The +.I grabmouse +option causes xlock to grab the mouse and keyboard, this is the default. +xlock can not lock the screen without this. +.TP 5 +.B -/+echokeys +The +.I echokeys +option causes xlock to echo '?' characters for each key typed into the +password prompt. Some consider this a security risk, so the default is +to not echo anything. +.TP 5 +.B -/+usefirst +The +.I usefirst +option causes xlock to use the keystroke which got you to the password screen +as the first character in the password. The default is to ignore the first +key pressed. +.TP 5 +.B -/+v +Verbose mode, tells what options it is going to use. +.TP 5 +.B -/+inwindow +Runs xlock in a window, so that you can iconify, move, or resize it and +still use your screen for other stuff. When running in a window, xlock no +longer locks your screen, it just looks good. It means you can now run +multiple xlocks in different parts of your screen, but that would not be +particularly 'nice'. +.TP 5 +.B -/+inroot +Runs xlock in your root window. Like the +.I inwindow +option it no longer locks the screen, it just looks good. +.TP 5 +.B -/+timeelapsed +Allows you to find out how long a machine is locked so you can complain +to an administrator that someone is hogging a machine. +.TP 5 +.B -/+install +Allows xlock to install its own colormap if xlock runs out of colors. + +.SH BUGS +"kill -KILL +.B xlock +" causes the server that was locked to be unusable, since all hosts +(including localhost) were removed from the access control list +to lock out new X clients, and since xlock could not catch SIGKILL, +it terminated before restoring the access control list. This will +leave the X server in a state where +\fI"you can no longer connect to that server, +and this operation cannot be reversed unless you reset the server."\fP + -From the X11R4 Xlib Documentation, Chapter 7. + +NCD terminals do not allow xlock to remove all the hosts from the access +control list. Therefore you will need to use the "-remote" and +"-allowaccess" switches. If you happen to run without "-allowaccess" on an +NCD terminal, +.B xlock +will not work and you will need to reboot the terminal, or simply go into +the SETUP menus, under 'Network Parameters', and turn off TCP/IP access +control. + +.SH SEE ALSO +X(1), Xlib Documentation. +.SH AUTHOR +Maintained by: +.br + David A. Bagley (bagleyd@source.asset.com) +.br + The latest version is currently at: +.br + ftp.x.org in /contrib/applications/xlockmore-2.?.tar.gz + +Original Author: +.br + Patrick J. Naughton (naughton@eng.sun.com) +.br + Mailstop 21-14 +.br + Sun Microsystems Laboratories, Inc. +.br + Mountain View, CA 94043 +.br + 415/336-1080 + +with many additional contributors. + +.SH COPYRIGHT +Copyright (c) 1988-91 by Patrick J. Naughton +.br +Copyright (c) 1993-95 by David A. Bagley + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. + +The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick. +All Rights Reserved. +.br +Sun, HP, and SGI icons have their respective copyrights. diff --git a/xlock.staff b/xlock.staff new file mode 100644 index 00000000..a1af4a30 --- /dev/null +++ b/xlock.staff @@ -0,0 +1,3 @@ +root +bagleyd +david diff --git a/xlocklife.pl b/xlocklife.pl new file mode 100755 index 00000000..683a32a3 --- /dev/null +++ b/xlocklife.pl @@ -0,0 +1,81 @@ +#!/usr/bin/perl +# This is used to add life to life +# This is a QUICK hack to convert life files to xlock's life format. +# Patterns MUST have < 64 pts at start for life.c to use the data generated +# Below is an example of a life file without the initial #'s +# Call the file piston.life and run it like xlocklife.pl < piston.life +#piston.life +##P -10 -3 +#..........*........... +#..........****........ +#**.........****....... +#**.........*..*.....** +#...........****.....** +#..........****........ +#..........*........... + +print " +Drop these points in life.c, within the 'patterns' array. +Note if the number of points >= 64, one must increase points NUMPTS; +also to fit most screens and especially the iconified window, +one should have the size < 32x32.\n\n"; +&search; +print "\npoints = $PTS; size = ${X}x$Y\n"; + +sub search { + local ($row, $col, $firstrow, $firstcol); + local ($i, $j, $found, $c, $tempx, $tempy); + local (@array); + + + $row = $col = 0; + $firstrow = -1; + $firstcol = 80; + $PTS = $X = $Y = 0; + while (<>) { + if (!($_ =~ /^#/)) + { + @chars = split(//); + $col = 0; + foreach $c (@chars) { + $col++; + if ($c =~ /[\*0]/) { + if ($firstrow < 0) { + $row = $firstrow = 1; + } + if ($col < $firstcol) { + $firstcol = $col; + } + if ($row > $Y) { + $Y = $row; + } + if ($col > $X) { + $X = $col; + } + $array{$col, $row} = 1; + $PTS++; + } + } + $row++; + } + } + $col = $X - $firstcol + 1; + $row = $Y; + print " {\n "; + for ($j = 0; $j <= $Y; $j++) { + $found = 0; + for ($i = 0; $i <= $X; $i++) { + if ($array{$i, $j}) { + $found = 1; + $tempx = $i - int(($col + 2) / 2) - $firstcol + 1; + $tempy = $j - int(($row + 2) / 2); + printf "$tempx, $tempy, "; + } + } + if ($found) { + print "\n "; + } + } + print "127\n },\n"; + $X = $col; +}