Commit 8f47e6b0 authored by Jari Aalto's avatar Jari Aalto

Imported Upstream version 1.4

parents
#
# Imakefile,v 1.13 1995/09/14 11:52:08 j Exp
#
#ifndef SharedLibXpm
#define SharedLibXpm HasSharedLibraries
#endif
XCOMM actually, not, but it doesn't matter
XPMSRC = $(LIBSRC)/Xpm
#if SharedLibXpm
#ifndef SharedXpmRev
#define SharedXpmRev 4.5 /* current SO revision (Xpm 3.4e) */
#endif
SharedLibReferences(XPM,Xpm,$(XPMSRC),SOXPMREV,SharedXpmRev)
#else
UnsharedLibReferences(XPM,Xpm,$(XPMSRC))
#endif
#define XpmDepLib $(XPMDEPLIB)
#define XpmLib $(XPMLIB)
PROG = xonix
XONIXDIR = $(LIBDIR)/xonix
CUTE = -DSEND_MAIL /* cute feature :-) */
DEPLIBS = XawClientDepLibs XpmDepLib
LOCAL_LIBRARIES = XawClientLibs XpmLib MathLibrary
EXTRA_DEFINES = -DUSE_X11 -DXONIXDIR=\"$(XONIXDIR)\" $(CUTE)
/* CDEBUGFLAGS = DebuggableCDebugFlags */
SRCS = xonix.c x11.c stack.c
OBJS = xonix.o x11.o stack.o
ComplexProgramTarget($(PROG))
InstallAppDefaults(Xonix)
/*
* MakeDirectories() cannot be used due to the umask 0 requirement.
*/
install::
@umask 0; \
if [ -d $(DESTDIR)$(XONIXDIR) ] ; then \
exit 0 ; \
else \
( set -x ; $(MKDIRHIER) $(DESTDIR)$(XONIXDIR) ) ; \
fi
#
# standard Makefile for xonix
#
# Makefile.std,v 1.2 1995/08/28 11:00:39 j Exp
#PROJECTROOT= /usr
PROJECTROOT= /usr/X11R6
LIBDIR= $(PROJECTROOT)/lib/X11
INCDIR= $(PROJECTROOT)/include
BINDIR= $(PROJECTROOT)/bin
MANDIR= $(PROJECTROOT)/man/man1/
INSTALL_EXE= install -c -s
#INSTALL_EXE= cp
INSTALL_DAT= install -c
#INSTALL_DAT= cp
RM= rm -f
MAKEDIRHIER= mkdirhier
#MAKEDIRHIER= mkdir -p
PROG= xonix
XONIXDIR= $(LIBDIR)/xonix
CUTE= -DSEND_MAIL # cute feature :-)
XAWLIBS= -lXaw -lXmu -lXt -lX11 -lXt -lSM -lICE -lXExExt -lXext -lX11
XPMLIB= -lXpm
SYSLIBS= -lm -lgnumalloc
#COPTS= -O2 -pipe -m486
COPTS= -O
EXTRA_DEFINES= -DUSE_X11 -DXONIXDIR=\"$(XONIXDIR)\" $(CUTE)
INCLUDES= -I$(INCDIR)
SRCS= xonix.c x11.c stack.c
OBJS= xonix.o x11.o stack.o
CFLAGS= $(COPTS) $(EXTRA_DEFINES) $(INCLUDES)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $(PROG) $(OBJS) -L$(LIBDIR) \
$(XAWLIBS) $(XPMLIB) $(SYSLIBS)
clean:
$(RM) $(PROG) $(OBJS)
install:
$(INSTALL_EXE) $(PROG) $(BINDIR)
$(INSTALL_DAT) Xonix.ad $(LIBDIR)/app-defaults/Xonix
if [ -d $(XONIXDIR) ] ; then \
exit 0; \
else \
( umask 0; $(MAKEDIRHIER) $(XONIXDIR) ) ; \
fi
install.man:
$(INSTALL_DAT) xonix.man $(MANDIR)/xonix.1
####################################################################
## dependencies
xonix.o: $(INCDIR)/X11/Xos.h $(INCDIR)/X11/Xosdefs.h
xonix.o: $(INCDIR)/X11/Intrinsic.h
xonix.o: $(INCDIR)/X11/Xlib.h $(INCDIR)/X11/X.h
xonix.o: $(INCDIR)/X11/Xfuncproto.h /usr/include/stddef.h
xonix.o: $(INCDIR)/X11/Xutil.h $(INCDIR)/X11/Xresource.h
xonix.o: $(INCDIR)/X11/Core.h $(INCDIR)/X11/Composite.h
xonix.o: $(INCDIR)/X11/Constraint.h $(INCDIR)/X11/Object.h
xonix.o: $(INCDIR)/X11/RectObj.h stack.h
x11.o: $(INCDIR)/X11/Xos.h $(INCDIR)/X11/Xosdefs.h
x11.o: $(INCDIR)/X11/Intrinsic.h $(INCDIR)/X11/Xlib.h
x11.o: $(INCDIR)/X11/X.h $(INCDIR)/X11/Xfuncproto.h
x11.o: $(INCDIR)/X11/Xutil.h
x11.o: $(INCDIR)/X11/Xresource.h $(INCDIR)/X11/Core.h
x11.o: $(INCDIR)/X11/Composite.h $(INCDIR)/X11/Constraint.h
x11.o: $(INCDIR)/X11/Object.h $(INCDIR)/X11/RectObj.h
x11.o: $(INCDIR)/X11/StringDefs.h $(INCDIR)/X11/keysym.h
x11.o: $(INCDIR)/X11/keysymdef.h $(INCDIR)/X11/Shell.h
x11.o: $(INCDIR)/X11/SM/SMlib.h $(INCDIR)/X11/SM/SM.h
x11.o: $(INCDIR)/X11/ICE/ICElib.h $(INCDIR)/X11/ICE/ICE.h
x11.o: $(INCDIR)/X11/xpm.h xonix.xbm xonix_mask.xbm d0.xbm d1.xbm
x11.o: d2.xbm d3.xbm d4.xbm d5.xbm d6.xbm d7.xbm d8.xbm d9.xbm colon.xbm
x11.o: flyer.xpm runner.xpm eater.xpm empty.xpm way.xpm filled.xpm
x11.o: $(INCDIR)/X11/Xaw/Form.h $(INCDIR)/X11/Xaw/Label.h
x11.o: $(INCDIR)/X11/Xaw/Simple.h
x11.o: $(INCDIR)/X11/Xmu/Converters.h
x11.o: $(INCDIR)/X11/Xaw/Box.h $(INCDIR)/X11/Xaw/Command.h
x11.o: $(INCDIR)/X11/Xaw/MenuButton.h
x11.o: $(INCDIR)/X11/Xaw/SimpleMenu.h
x11.o: $(INCDIR)/X11/Xaw/SmeLine.h $(INCDIR)/X11/Xaw/Sme.h
x11.o: $(INCDIR)/X11/Xaw/SmeBSB.h patchlevel.h xonix.h
stack.o: $(INCDIR)/X11/Xos.h
stack.o: $(INCDIR)/X11/Xosdefs.h $(INCDIR)/X11/Intrinsic.h
stack.o: $(INCDIR)/X11/Xlib.h $(INCDIR)/X11/X.h
stack.o: $(INCDIR)/X11/Xfuncproto.h
stack.o: $(INCDIR)/X11/Xutil.h $(INCDIR)/X11/Xresource.h
stack.o: $(INCDIR)/X11/Core.h $(INCDIR)/X11/Composite.h
stack.o: $(INCDIR)/X11/Constraint.h $(INCDIR)/X11/Object.h
stack.o: $(INCDIR)/X11/RectObj.h stack.h
! application resources
! the values shown are the defaults
!
! Xonix.ad,v 1.20 1995/08/28 11:00:40 j Exp
!
! step width between updates, in ms
Xonix.timeStep: 50
! default movement bindings
*container.translations: #override\n\
<Key>Left: Left()\n\
<Key>Right: Right()\n\
<Key>Up: Up()\n\
<Key>Down: Down()\n\
<Key>Q: Quit()\n\
<Key>Escape: Quit()\n\
<Unmap>: Pause()\n\
<Key>P: Pause()\n\
<Map>: Continue()
*container.background: lavender
!
! "game" menu
!
*game_button.label: Game
*game_button.background: dark green
*game_button.foreground: yellow
*game_menu*background: dark green
*game_menu*foreground: yellow
*game_menu.about.label: About...
*game_menu.quit.label: Quit...
!
! the about box
!
*about_shell.title: About xonix
*about_shell*background: pale goldenrod
*about_shell*foreground: black
*about_shell*about_done.label: I see
*about_shell*about_done.background: white
!
! the score box
!
*score_shell.title: High score
*score_shell*background: pale goldenrod
*score_shell*foreground: black
*score_shell*Label.borderWidth: 0
*score_shell*Box.borderWidth: 0
*score_shell*score_msg.label: Best Xonixers:
*score_shell*score_headl.label: Score Level Date User ID Full name
*score_shell*score_done.label: Great!
*score_shell*score_done.background: white
!
! resources for the status display
! likely not to be changed
*status*Label.borderWidth: 0
*status*Label.internalWidth: 0
*status*Label.internalHeight: 0
*status*Form.borderWidth: 0
*status.background: dim gray
*status*Form.background: dim gray
*status*Label.background: Yellow
*status.percentage.perc_d10.horizDistance: 20
*status.percentage.perc_label.label: % filled:
*status.percentage.perc_label.background: gray20
*status.percentage.perc_label.foreground: pale turquoise
*status.level.lev_d10.horizDistance: 20
*status.level.lev_label.label: Level:
*status.level.lev_label.background: gray20
*status.level.lev_label.foreground: pale turquoise
*status.runner.run_d10.horizDistance: 20
*status.runner.run_label.label: Players:
*status.runner.run_label.background: gray20
*status.runner.run_label.foreground: pale turquoise
*status.time.mins_d10.horizDistance: 20
*status.time.time_label.label: Score:
*status.time.time_label.background: gray20
*status.time.time_label.foreground: pale turquoise
!
! the game over dialog
!
*gameover_shell.title: Pity!
*gameover_box.background: khaki
*gameover_box.orientation: vertical
*gameover_buttonbox.orientation: horizontal
*gameover_buttonbox.background: khaki
*gameover_buttonbox.borderWidth: 0
*gameover_msg.label: Game over, dude!
*gameover_msg.font: -*-new century schoolbook-bold-i-*-*-*-180-*-*-*-*-*-*
*gameover_msg.borderWidth: 0
*gameover_msg.foreground: sienna
*gameover_msg.background: khaki
*gameover_iknow.label: I know :-(
*gameover_iknow.foreground: light yellow
*gameover_iknow.background: dark orchid
*gameover_iknow.accelerators: #augment \
<Key>Q: set() notify() unset() \n\
<Key>Escape: set() notify() unset()
*gameover_goon.label: Once more! :)
*gameover_goon.foreground: light yellow
*gameover_goon.background: dark orchid
*gameover_goon.accelerators: #augment \
<Key>Return: set() notify() unset()
#define colon_width 10
#define colon_height 36
static unsigned char colon_bits[] = {
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xc7, 0x03, 0x83, 0x03,
0xc7, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
0xc7, 0x03, 0x83, 0x03, 0xc7, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03};
#define d0_width 24
#define d0_height 36
static unsigned char d0_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xd0, 0x09, 0x00, 0xc8,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf9, 0xff, 0xcf,
0xfd, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xdf, 0xf9, 0xff, 0xcf,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0x09, 0x00, 0xc8,
0x05, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d1_width 24
#define d1_height 36
static unsigned char d1_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d2_width 24
#define d2_height 36
static unsigned char d2_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0x0f, 0x00, 0xc8,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0x07, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xf0, 0xf9, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x09, 0x00, 0xf8,
0x05, 0x00, 0xf0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d3_width 24
#define d3_height 36
static unsigned char d3_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0x0f, 0x00, 0xc8,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0x07, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0x0f, 0x00, 0xc8,
0x07, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d4_width 24
#define d4_height 36
static unsigned char d4_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xdf, 0xf9, 0xff, 0xcf,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf9, 0xff, 0xcf,
0x05, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d5_width 24
#define d5_height 36
static unsigned char d5_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xf0, 0x09, 0x00, 0xf8,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf9, 0xff, 0xff,
0x05, 0x00, 0xf0, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0x0f, 0x00, 0xc8,
0x07, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d6_width 24
#define d6_height 36
static unsigned char d6_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xf0, 0x09, 0x00, 0xf8,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff,
0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xf9, 0xff, 0xff,
0x05, 0x00, 0xf0, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xd0, 0xf9, 0xff, 0xcf,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0x09, 0x00, 0xc8,
0x05, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d7_width 24
#define d7_height 36
static unsigned char d7_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0x0f, 0x00, 0xc8,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d8_width 24
#define d8_height 36
static unsigned char d8_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xd0, 0x09, 0x00, 0xc8,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf9, 0xff, 0xcf,
0x05, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xd0, 0xf9, 0xff, 0xcf,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0x09, 0x00, 0xc8,
0x05, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define d9_width 24
#define d9_height 36
static unsigned char d9_bits[] = {
0xff, 0xff, 0xff, 0x03, 0x00, 0xe0, 0x05, 0x00, 0xd0, 0x09, 0x00, 0xc8,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7,
0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf1, 0xff, 0xc7, 0xf9, 0xff, 0xcf,
0x05, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xd0, 0xff, 0xff, 0xcf,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xc7, 0x0f, 0x00, 0xc8,
0x07, 0x00, 0xd0, 0x03, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
/* XPM */
static char * eater_xpm[] = {
"4 4 2 1",
" c goldenrod",
". c yellow",
" .. ",
"....",
"....",
" .. "};
/* XPM */
static char * empty_xpm[] = {
"32 32 3 1",
" c green yellow",
". c forest green",
"X c lime green",
" ...............................",
"........... ....................",
"......................X.........",
"................................",
".....X............ .............",
"....X...........................",
"................................",
".........X......................",
"............................... ",
"................................",
"................................",
".................X......X.......",
"........................X.......",
"........................X.......",
"..........X.....................",
"... ............................",
"................................",
"................................",
"................................",
"............ ......X............",
"...............................X",
"...X............................",
"................................",
"................................",
"........................... ....",
".............X..................",
"................................",
". ..........X...................",
"...........X....................",
"................................",
"...X..................X.....X...",
"...X............................"};
/* XPM */
static char * filled_xpm[] = {
"32 32 3 1",
" c green yellow",
". c brown",
"X c lime green",
" ...............................",
"........... ....................",
"......................X.........",
"................................",
".....X............ .............",
"....X...........................",
"................................",
".........X......................",
"............................... ",
"................................",
"................................",
".................X......X.......",
"........................X.......",
"........................X.......",
"..........X.....................",
"... ............................",
"................................",
"................................",
"................................",
"............ ......X............",
"...............................X",
"...X............................",
"................................",
"................................",
"........................... ....",
".............X..................",
"................................",
". ..........X...................",
"...........X....................",
"................................",
"...X..................X.....X...",
"...X............................"};
/* XPM */
static char * flyer_xpm[] = {
"8 8 3 1",
" c forest green",
". g4 yellow c tomato",
"X c black",
" .. ",
" .XX. ",
" ...... ",
" .X..X. ",
" ...... ",
" ..XX.. ",
" .... ",
" .XX. "};
This diff is collapsed.
#define VERSION "1995/09/14 11:52:08 1.4"
/* XPM */
static char * runner_xpm[] = {
"8 8 5 1",
" c gold",
". c sienna",
"X c yellow",
"o c orange",
"O c dark violet",
" .... ",
" XX ",
".ooXoo..",
".oo ooX.",
".XXX XX.",
".XOOOO .",
" XXX ",
" .... "};
/* Hey emacs, this is -*- Mode: C++; tab-width: 4 -*- */
/*
* simple Point stack
*
* stack.c,v 1.6 1995/09/08 09:51:28 j Exp
*/
/*
* Copyright (c) 1995
* Alfredo Herrera Hernandez <alf@narcisa.sax.de>
* Torsten Schoenitz <torsten_schoenitz@bonnie.heep.sax.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include "xonix.h"
#include "stack.h"
#define INIT_SIZE (1024)
/* ------------------------------------------------------------------------ */
/* InitMyPoints legt einen Speicherbereich mit der gewuenschten Groesse an */
/* ------------------------------------------------------------------------ */
myPoint *InitMyPoints (int size)
{
return ((myPoint *) malloc (size * sizeof (myPoint)));
}
/* ------------------------------------------------------------------------ */
/* InitMySegments legt einen Speicherbereich mit der gewuenschten Groesse */
/* an */
/* ------------------------------------------------------------------------ */
mySegment *InitMySegments (int size)
{
return ((mySegment *) malloc (size * sizeof (mySegment)));
}
/* ------------------------------------------------------------------------ */
/* InitStack initialisiert die Stackverwaltung fuer myPoints */
/* ------------------------------------------------------------------------ */
stack *InitStack (void)
{
stack *s;
if ((s = (stack *) malloc (sizeof (stack))) == NULL) return NULL;
if ((s -> bottom = InitMyPoints (INIT_SIZE)) == NULL) return NULL;
s -> size = INIT_SIZE;
s -> counter = 0;
return s;
}
/* ------------------------------------------------------------------------ */
/* InitSegmentStack initialisiert die Stackverwaltung fuer mySegments */
/* ------------------------------------------------------------------------ */
segStack *InitSegmentStack (void)
{
segStack *s;
if ((s = (segStack *) malloc (sizeof (segStack))) == NULL) return NULL;
if ((s -> bottom = InitMySegments (INIT_SIZE)) == NULL) return NULL;
s -> size = INIT_SIZE;
s -> counter = 0;
return s;
}
/* ------------------------------------------------------------------------ */
/* DeinitMyPoints gibt die Stackelemente wieder frei */
/* ------------------------------------------------------------------------ */
int DeinitMyPoints (myPoint *p)
{
free (p);
return 1;
}
/* ------------------------------------------------------------------------ */
/* DeinitMySegments gibt die Stackelemente wieder frei */
/* ------------------------------------------------------------------------ */
int DeinitMySegments (mySegment *p)
{
free (p);
return 1;
}
/* ------------------------------------------------------------------------ */
/* DeinitStack gibt den Stack wieder frei */
/* ------------------------------------------------------------------------ */
int DeinitStack (stack *s)
{
if (s == NULL) return 0;
DeinitMyPoints (s -> bottom);
free (s);
return 1;
}
/* ------------------------------------------------------------------------ */
/* DeinitSegmentStack gibt den Stack wieder frei */
/* ------------------------------------------------------------------------ */
int DeinitSegmentStack (segStack *s)
{
if (s == NULL) return 0;
DeinitMySegments (s -> bottom);
free (s);
return 1;
}
/* ------------------------------------------------------------------------ */
/* ReallocMyPoints fordert Speicher fuer size Stackelemente an */
/* ------------------------------------------------------------------------ */
myPoint *ReallocMyPoints (myPoint *p, int size)
{
return ((myPoint *) realloc (p, size * sizeof (myPoint)));
}
/* ------------------------------------------------------------------------ */
/* ReallocMySegments fordert Speicher fuer size Stackelemente an */
/* ------------------------------------------------------------------------ */
mySegment *ReallocMySegments (mySegment *p, int size)
{
return ((mySegment *) realloc (p, size * sizeof (mySegment)));
}
/* ------------------------------------------------------------------------ */
/* Push packt ein Element auf den Stack */
/* ------------------------------------------------------------------------ */
int Push (stack *s, int x, int y)
{
if (s -> size == s -> counter)
{
if ((s -> bottom = ReallocMyPoints (s -> bottom,
s -> size + 0x1000)) == NULL)
return 0;
s -> size += 0x1000;
}
(s -> bottom + s -> counter) -> h = x;
(s -> bottom + s -> counter) -> v = y;
s -> counter ++;
return 1;
}
/* ------------------------------------------------------------------------ */
/* PushSeg packt ein Segment auf den Stack */
/* ------------------------------------------------------------------------ */
int PushSeg (segStack *s, int y, int xl, int xr, int dy)
{
if (s -> size == s -> counter)
{
if ((s -> bottom = ReallocMySegments (s -> bottom,
s -> size + 0x1000)) == NULL)
return 0;
s -> size += 0x1000;
}
if ((y + dy >= RATIO) && (y + dy <= V_STEPS - RATIO))
{
(s -> bottom + s -> counter) -> y = y;
(s -> bottom + s -> counter) -> xl = xl;
(s -> bottom + s -> counter) -> xr = xr;
(s -> bottom + s -> counter) -> dy = dy;
s -> counter ++;
}
return 1;
}
/* ------------------------------------------------------------------------ */
/* Pop liefert das oberste Element aus dem Stack */
/* ------------------------------------------------------------------------ */
int Pop (stack *s, myPoint *p)
{
if (s -> counter) s -> counter --;
else return 0;
if (s -> size > (s -> counter + 0x1000))
{
if ((s -> bottom = ReallocMyPoints (s -> bottom,
s -> size - 0x1000)) == NULL)
return 0;
s -> size -= 0x1000;
}
*p = *(s -> bottom + s -> counter);
return 1;
}
/* ------------------------------------------------------------------------ */
/* PopSeg liefert das oberste Segment aus dem Stack */