[comp.sources.games] v01i057: sdi - missle command game for Suns, Part04/06

games-request@tekred.UUCP (06/17/87)

Submitted by: Mark Weiser <weiser.pa@xerox.com>
Comp.sources.games: Volume 1, Issue 57
Archive-name: sdi/Part04



#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 4 (of 6)."
# Contents:  city_icon1.h city_icon3.h city_icon4.h city_icon5.h
#   city_icon6.h city_icon7.h city_icon8.h default_city.h game_over.c
#   genmessage.c global.c laser.c laserkill.h menu.c missilekill.h
#   notify.c talkingmark.h walkmenu_impl.h
# Wrapped by billr@tekred on Wed Jun 17 11:20:48 1987
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f city_icon1.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon1.h\"
else
echo shar: Extracting \"city_icon1.h\" \(2274 characters\)
sed "s/^X//" >city_icon1.h <<'END_OF_city_icon1.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x007F,0xFF00,0x0000,0x0000,0x1F83,0xC0FC,0x0000,
X	0x0001,0xE003,0x6003,0xC000,0x000E,0x0003,0x3000,0x3800,
X	0x0070,0x0003,0x3000,0x0700,0x0180,0x0003,0x3000,0x00C0,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,0x0000,0x0FFC,0x0000,0x0E80,0x0000,0x0924,0x0000,
X	0x0F80,0x0000,0x0924,0x0006,0x0D80,0x0000,0x0FFC,0x0006,
X	0x0F80,0x0000,0x09E4,0x0006,0x0B80,0x0000,0x09E4,0x0006,
X	0x0F80,0x0F00,0x0FFD,0xFFC6,0x0E80,0x090F,0x8F3D,0x54C6,
X	0x0F80,0x0F0A,0x8F3D,0xFFC6,0x0F80,0x090A,0x8FFD,0x6C46,
X	0x0880,0x0F0F,0x89FD,0xFFC6,0x0F80,0x090B,0x89FD,0x294F,
X	0x0E80,0x0F0B,0x8F25,0xFFC9,0x0F80,0x0F0E,0x8F25,0x544F,
X	0x0D80,0x0F0E,0x8FFD,0xFFC9,0x0FFC,0x090F,0x8FFD,0x964F,
X	0x0F9C,0x0F0F,0x8FFD,0xFFCF,0x0FE4,0x0F0E,0x8FFD,0x944F,
X	0x0BFC,0x090E,0x89E5,0xFFC9,0x0F9C,0x3F8F,0x89E5,0x48CF,
X	0x0DFC,0x208E,0xFFFD,0xFFCB,0x0FE4,0x3F8E,0xFF25,0x594F,
X	0x0E9C,0xFF8F,0xDF25,0xFFCD,0x0FFC,0x808A,0xBFFD,0x5ACF,
X	0xCEE4,0xFF8A,0xF9FD,0xFFF9,0xCF9C,0xFF8F,0xD9FF,0xB95F,
X	0x8FE4,0xFFFF,0xBFFF,0xFFD9,0xCEFC,0x80FB,0xFF3F,0x3CDF,
X	0xCBFF,0xFFBB,0xFF3F,0xFFF9,0x4FE7,0x80FE,0xFFFF,0x5A7F,
X	0xCF9E,0xFFFE,0xDFE7,0xFFEB,0xF9FF,0xFFEF,0xBFE7,0xB96F,
X	0xDF9F,0xF1FF,0xFCFF,0xFFEB,0xFBE7,0x9FFB,0x7CFF,0xFFEF,
X	0x6FFF,0xFFFF,0x7FFF,0xBEF9,0xFB99,0x7FCF,0xFAF3,0xB7DF,
X	0xDFE2,0xB9F6,0xF973,0xAFD9,0x7CFA,0xBFC7,0xFBFF,0x9CDF,
X	0xEFFA,0xBFB7,0x7BFF,0xAFD9,0xFFFA,0xB3D7,0xFBFF,0xB7FF,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
END_OF_city_icon1.h
if test 2274 -ne `wc -c <city_icon1.h`; then
    echo shar: \"city_icon1.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f city_icon3.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon3.h\"
else
echo shar: Extracting \"city_icon3.h\" \(2171 characters\)
sed "s/^X//" >city_icon3.h <<'END_OF_city_icon3.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0800,0x007F,0xFF00,0x0000,0x0400,0x1F83,0xC0FC,0x0000,
X	0x0201,0xE003,0x6003,0xC000,0x010E,0x0003,0x3000,0x3800,
X	0x0070,0x0003,0x3000,0x0700,0x0180,0x0003,0x3000,0x00C0,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0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7DF,
X	0xDFE2,0xB9F6,0xF973,0xAFD9,0x7CFA,0xBFC7,0xFBFF,0x9CDF,
X	0xEFFA,0xBFB7,0x7BFF,0xAFD9,0xFFFA,0xB3D7,0xFBFF,0xB7FF,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_city_icon3.h
if test 2171 -ne `wc -c <city_icon3.h`; then
    echo shar: \"city_icon3.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f city_icon4.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon4.h\"
else
echo shar: Extracting \"city_icon4.h\" \(2171 characters\)
sed "s/^X//" >city_icon4.h <<'END_OF_city_icon4.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0800,0x007F,0xFF00,0x0000,0x0410,0x1F83,0xC0FC,0x0000,
X	0x0221,0xE003,0x6003,0xC000,0x01EE,0x0003,0x3000,0x3800,
X	0x0FF0,0x0003,0x3000,0x0700,0x0380,0x0003,0x3000,0x00C0,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,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X	0xEFFA,0xBFB7,0x7BFF,0xAFD9,0xFFFA,0xB3D7,0xFBFF,0xB7FF,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_city_icon4.h
if test 2171 -ne `wc -c <city_icon4.h`; then
    echo shar: \"city_icon4.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f city_icon5.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon5.h\"
else
echo shar: Extracting \"city_icon5.h\" \(2171 characters\)
sed "s/^X//" >city_icon5.h <<'END_OF_city_icon5.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x007F,0xFF00,0x0003,0x0000,0x1F83,0xC0FC,0x0004,
X	0x0001,0xE003,0x6003,0xC000,0x000E,0x0003,0x3000,0x3800,
X	0x0070,0x0003,0x3000,0x0700,0x0180,0x0003,0x3000,0x00C0,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,0x0000,0x0FFC,0x0000,0x0E80,0x0000,0x0924,0x0000,
X	0x0F80,0x0000,0x0924,0x0006,0x0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FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_city_icon5.h
if test 2171 -ne `wc -c <city_icon5.h`; then
    echo shar: \"city_icon5.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f city_icon6.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon6.h\"
else
echo shar: Extracting \"city_icon6.h\" \(2171 characters\)
sed "s/^X//" >city_icon6.h <<'END_OF_city_icon6.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x007F,0xFF00,0x0003,0x0000,0x1F83,0xC0FC,0x0004,
X	0x0001,0xE003,0x6003,0xC008,0x000E,0x0003,0x3000,0x3810,
X	0x0070,0x0003,0x3000,0x0700,0x0180,0x0003,0x3000,0x00C0,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,0x0000,0x0FFC,0x0000,0x0E80,0x0000,0x0924,0x0000,
X	0x0F80,0x0000,0x0924,0x0006,0x0D80,0x0000,0x0FFC,0x0006,
X	0x0F80,0x0000,0x09E4,0x0006,0x0B80,0x0000,0x09E4,0x0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 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_city_icon6.h
if test 2171 -ne `wc -c <city_icon6.h`; then
    echo shar: \"city_icon6.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f city_icon7.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon7.h\"
else
echo shar: Extracting \"city_icon7.h\" \(2171 characters\)
sed "s/^X//" >city_icon7.h <<'END_OF_city_icon7.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x007F,0xFF00,0x0003,0x0000,0x1F83,0xC0FC,0x0004,
X	0x0001,0xE003,0x6003,0xC008,0x000E,0x0003,0x3000,0x3810,
X	0x0070,0x0003,0x3000,0x0720,0x0180,0x0003,0x3000,0x00C0,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,0x0000,0x0FFC,0x0000,0x0E80,0x0000,0x0924,0x0000,
X	0x0F80,0x0000,0x0924,0x0006,0x0D80,0x0000,0x0FFC,0x0006,
X	0x0F80,0x0000,0x09E4,0x0006,0x0B80,0x0000,0x09E4,0x0006,
X	0x0F80,0x0F00,0x0FFD,0xFFC6,0x0E80,0x090F,0x8F3D,0x54C6,
X	0x0F80,0x0F0A,0x8F3D,0xFFC6,0x0F80,0x090A,0x8FFD,0x6C46,
X	0x0880,0x0F0F,0x89FD,0xFFC6,0x0F80,0x090B,0x89FD,0x294F,
X	0x0E80,0x0F0B,0x8F25,0xFFC9,0x0F80,0x0F0E,0x8F25,0x544F,
X	0x0D80,0x0F0E,0x8FFD,0xFFC9,0x0FFC,0x090F,0x8FFD,0x964F,
X	0x0F9C,0x0F0F,0x8FFD,0xFFCF,0x0FE4,0x0F0E,0x8FFD,0x944F,
X	0x0BFC,0x090E,0x89E5,0xFFC9,0x0F9C,0x3F8F,0x89E5,0x48CF,
X	0x0DFC,0x208E,0xFFFD,0xFFCB,0x0FE4,0x3F8E,0xFF25,0x594F,
X	0x0E9C,0xFF8F,0xDF25,0xFFCD,0x0FFC,0x808A,0xBFFD,0x5ACF,
X	0xCEE4,0xFF8A,0xF9FD,0xFFF9,0xCF9C,0xFF8F,0xD9FF,0xB95F,
X	0x8FE4,0xFFFF,0xBFFF,0xFFD9,0xCEFC,0x80FB,0xFF3F,0x3CDF,
X	0xCBFF,0xFFBB,0xFF3F,0xFFF9,0x4FE7,0x80FE,0xFFFF,0x5A7F,
X	0xCF9E,0xFFFE,0xDFE7,0xFFEB,0xF9FF,0xFFEF,0xBFE7,0xB96F,
X	0xDF9F,0xF1FF,0xFCFF,0xFFEB,0xFBE7,0x9FFB,0x7CFF,0xFFEF,
X	0x6FFF,0xFFFF,0x7FFF,0xBEF9,0xFB99,0x7FCF,0xFAF3,0xB7DF,
X	0xDFE2,0xB9F6,0xF973,0xAFD9,0x7CFA,0xBFC7,0xFBFF,0x9CDF,
X	0xEFFA,0xBFB7,0x7BFF,0xAFD9,0xFFFA,0xB3D7,0xFBFF,0xB7FF,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_city_icon7.h
if test 2171 -ne `wc -c <city_icon7.h`; then
    echo shar: \"city_icon7.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f city_icon8.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"city_icon8.h\"
else
echo shar: Extracting \"city_icon8.h\" \(2171 characters\)
sed "s/^X//" >city_icon8.h <<'END_OF_city_icon8.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x007F,0xFF00,0x0003,0x0000,0x1F83,0xC0FC,0x0204,
X	0x0001,0xE003,0x6003,0xC308,0x000E,0x0003,0x3000,0x3990,
X	0x0070,0x0003,0x3000,0x07E0,0x0180,0x0003,0x3000,0x00FE,
X	0x0600,0x0003,0x3000,0x0030,0x1BC0,0x0003,0x3000,0x000C,
X	0x6660,0x0003,0x6000,0x03F3,0x8600,0x0003,0xC000,0x00C0,
X	0x0300,0x0000,0x0000,0x00C0,0x00C0,0x0000,0x0000,0x00C0,
X	0x0060,0x0000,0x0000,0x00C0,0x0660,0x0000,0x0000,0x00C0,
X	0x0660,0x0000,0x0000,0x00C0,0x03C0,0x0000,0x0080,0x00C0,
X	0x0000,0x0000,0x0080,0x03F0,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,0x0000,0x0FFC,0x0000,0x0E80,0x0000,0x0924,0x0000,
X	0x0F80,0x0000,0x0924,0x0006,0x0D80,0x0000,0x0FFC,0x0006,
X	0x0F80,0x0000,0x09E4,0x0006,0x0B80,0x0000,0x09E4,0x0006,
X	0x0F80,0x0F00,0x0FFD,0xFFC6,0x0E80,0x090F,0x8F3D,0x54C6,
X	0x0F80,0x0F0A,0x8F3D,0xFFC6,0x0F80,0x090A,0x8FFD,0x6C46,
X	0x0880,0x0F0F,0x89FD,0xFFC6,0x0F80,0x090B,0x89FD,0x294F,
X	0x0E80,0x0F0B,0x8F25,0xFFC9,0x0F80,0x0F0E,0x8F25,0x544F,
X	0x0D80,0x0F0E,0x8FFD,0xFFC9,0x0FFC,0x090F,0x8FFD,0x964F,
X	0x0F9C,0x0F0F,0x8FFD,0xFFCF,0x0FE4,0x0F0E,0x8FFD,0x944F,
X	0x0BFC,0x090E,0x89E5,0xFFC9,0x0F9C,0x3F8F,0x89E5,0x48CF,
X	0x0DFC,0x208E,0xFFFD,0xFFCB,0x0FE4,0x3F8E,0xFF25,0x594F,
X	0x0E9C,0xFF8F,0xDF25,0xFFCD,0x0FFC,0x808A,0xBFFD,0x5ACF,
X	0xCEE4,0xFF8A,0xF9FD,0xFFF9,0xCF9C,0xFF8F,0xD9FF,0xB95F,
X	0x8FE4,0xFFFF,0xBFFF,0xFFD9,0xCEFC,0x80FB,0xFF3F,0x3CDF,
X	0xCBFF,0xFFBB,0xFF3F,0xFFF9,0x4FE7,0x80FE,0xFFFF,0x5A7F,
X	0xCF9E,0xFFFE,0xDFE7,0xFFEB,0xF9FF,0xFFEF,0xBFE7,0xB96F,
X	0xDF9F,0xF1FF,0xFCFF,0xFFEB,0xFBE7,0x9FFB,0x7CFF,0xFFEF,
X	0x6FFF,0xFFFF,0x7FFF,0xBEF9,0xFB99,0x7FCF,0xFAF3,0xB7DF,
X	0xDFE2,0xB9F6,0xF973,0xAFD9,0x7CFA,0xBFC7,0xFBFF,0x9CDF,
X	0xEFFA,0xBFB7,0x7BFF,0xAFD9,0xFFFA,0xB3D7,0xFBFF,0xB7FF,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_city_icon8.h
if test 2171 -ne `wc -c <city_icon8.h`; then
    echo shar: \"city_icon8.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f default_city.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"default_city.h\"
else
echo shar: Extracting \"default_city.h\" \(2171 characters\)
sed "s/^X//" >default_city.h <<'END_OF_default_city.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0080,0x0000,
X	0x0000,0x0000,0x0080,0x0000,0x0000,0x0000,0x0080,0x0000,
X	0x0F80,0x0000,0x01C0,0x0000,0x0B80,0x0000,0x01C0,0x0000,
X	0x0E80,0x0000,0x03E0,0x0000,0x0F80,0x0000,0x03E0,0x0000,
X	0x0B80,0x0000,0x0FFC,0x0000,0x0E80,0x0000,0x0924,0x0000,
X	0x0F80,0x0000,0x0924,0x0006,0x0D80,0x0000,0x0FFC,0x0006,
X	0x0F80,0x0000,0x09E4,0x0006,0x0B80,0x0000,0x09E4,0x0006,
X	0x0F80,0x0F00,0x0FFD,0xFFC6,0x0E80,0x090F,0x8F3D,0x54C6,
X	0x0F80,0x0F0A,0x8F3D,0xFFC6,0x0F80,0x090A,0x8FFD,0x6C46,
X	0x0880,0x0F0F,0x89FD,0xFFC6,0x0F80,0x090B,0x89FD,0x294F,
X	0x0E80,0x0F0B,0x8F25,0xFFC9,0x0F80,0x0F0E,0x8F25,0x544F,
X	0x0D80,0x0F0E,0x8FFD,0xFFC9,0x0FFC,0x090F,0x8FFD,0x964F,
X	0x0F9C,0x0F0F,0x8FFD,0xFFCF,0x0FE4,0x0F0E,0x8FFD,0x944F,
X	0x0BFC,0x090E,0x89E5,0xFFC9,0x0F9C,0x3F8F,0x89E5,0x48CF,
X	0x0DFC,0x208E,0xFFFD,0xFFCB,0x0FE4,0x3F8E,0xFF25,0x594F,
X	0x0E9C,0xFF8F,0xDF25,0xFFCD,0x0FFC,0x808A,0xBFFD,0x5ACF,
X	0xCEE4,0xFF8A,0xF9FD,0xFFF9,0xCF9C,0xFF8F,0xD9FF,0xB95F,
X	0x8FE4,0xFFFF,0xBFFF,0xFFD9,0xCEFC,0x80FB,0xFF3F,0x3CDF,
X	0xCBFF,0xFFBB,0xFF3F,0xFFF9,0x4FE7,0x80FE,0xFFFF,0x5A7F,
X	0xCF9E,0xFFFE,0xDFE7,0xFFEB,0xF9FF,0xFFEF,0xBFE7,0xB96F,
X	0xDF9F,0xFFFE,0xFFFF,0xFFEB,0xFBE7,0x80BE,0xDFE7,0x67EF,
X	0x6FFD,0xFFBB,0xBFE7,0xFEF9,0xFB9F,0x80FB,0xFFFF,0x1FDF,
X	0xDFE7,0xFFFF,0xD9FF,0xFFD9,0x7CFE,0xF0EF,0xB9FF,0x7CDF,
X	0xEFFF,0xFFBF,0xFFFF,0xFFD9,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_default_city.h
if test 2171 -ne `wc -c <default_city.h`; then
    echo shar: \"default_city.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f game_over.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"game_over.c\"
else
echo shar: Extracting \"game_over.c\" \(2819 characters\)
sed "s/^X//" >game_over.c <<'END_OF_game_over.c'
X/**********************************  game_over.c  **********************/
X#include <pixrect/pixrect_hs.h>
X#include "sdi.h"
X
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
X
X/*
X * This file is responsible for flashing my face on the screen if the game ends
X *  and 'non-stop' is not set.
X */
X
X/* ORIGSIZE comes in from a -D in the makefile */
X#define NUMBER 10
X#define BORDERSIZE 64
X#define SIZE (ORIGSIZE+BORDERSIZE)
X
X
Xstatic short message_data[] = {
X#include "bigmessage.h"
X};
Xmpr_static(origmessagepr, ORIGSIZE, ORIGSIZE, 1, message_data);
X
X/*
X * Routine to flash my face on the screen.
X * The pr_destroy order below is tricky, but there is no storage leak. 
X */
X
Xdo_game_over()
X{
X	int center_x = max_x/2, center_y = max_y/2, circlesize;
X	struct pixrect *circlepr;
X	struct pixrect *messagepr;
X	struct rect r;
X	int i;
X	struct pixwin *pw_a = citypw,
X		*pw_b = launchpw;
X
X	messagepr = make_circle(SIZE);
X	pr_rop(messagepr, BORDERSIZE/2, BORDERSIZE/2, ORIGSIZE, ORIGSIZE,
X		PIX_SRC, &origmessagepr, 0, 0);
X	
X	pw_batch_on(launchpw);
X	pw_batch_on(citypw);
X	for(i=0; i<NUMBER; i++) {
X		if (i > 0)
X			pr_destroy(circlepr);
X		circlesize = SIZE*(i+1)/(NUMBER);
X		circlepr = make_circle(circlesize);
X		do_picture(circlepr, circlesize, center_x, center_y, messagepr, pw_a, pw_b);
X		pw_show(launchpw);
X		pw_show(citypw);
X	}
X#ifdef ORIG
X	for(i=NUMBER-1; i > 0; i--) {
X		/* clear the old circle (uses old pr and circlesize) */
X		do_picture(circlepr, circlesize, center_x, center_y, NULL, pw_a, pw_b);
X		pr_destroy(circlepr);
X		/* make the new circle */
X		circlesize = SIZE*(i)/(NUMBER);
X		circlepr = make_circle(circlesize);
X		do_picture(circlepr, circlesize, center_x, center_y, messagepr, pw_a, pw_b);
X		pw_show(launchpw);
X		pw_show(citypw);
X	}
X	do_picture(circlepr, circlesize, center_x, center_y, NULL, pw_a, pw_b);
X#else
X	for (i=0; i < (max_y+SIZE/2); i += 10) {
X		do_picture(circlepr, circlesize, center_x, center_y+i, messagepr, pw_a, pw_b);
X		pw_show(launchpw);
X		pw_show(citypw);
X	}
X#endif
X	pr_destroy(circlepr);
X	pw_batch_off(citypw);
X	pw_batch_off(launchpw);
X	}
X
X/*
X * Put up one instance of the final picture.  My, stenciling is slow.
X */
Xdo_picture(pr, size, x, y, messagepr, pw_a, pw_b)
Xstruct pixrect *pr, *messagepr;
Xint size;
Xstruct pixwin *pw_a, *pw_b;
X{
X		pw_stencil(pw_a,
X			x - size/2, y - size/2,
X			size, size, PIX_SRC,
X			pr, 0, 0,
X			messagepr, SIZE/2 - size/2, SIZE/2 - size/2);
X		pw_stencil(pw_b,
X			x - size/2, y - size/2,
X			size, size, PIX_SRC,
X			pr, 0, 0,
X			messagepr, SIZE/2 - size/2, SIZE/2 - size/2);
X}
END_OF_game_over.c
if test 2819 -ne `wc -c <game_over.c`; then
    echo shar: \"game_over.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f genmessage.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"genmessage.c\"
else
echo shar: Extracting \"genmessage.c\" \(2580 characters\)
sed "s/^X//" >genmessage.c <<'END_OF_genmessage.c'
X#include <pixrect/pixrect_hs.h>
X#define NULL 0
X
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
X
X/*
X * Real quick and dirty hack to enlarge an image.  Reads and outputs
X * in C-style pixrect form (human readable, #includable).  Takes
X * two arguments: the file to be enlarged, and the integer enlargement.
X *
X * This is not used during the game itself (too slow), but run at
X * 'make' time to constuct the popup face for the end of game.
X */
Xshort *in;
X/* size of input image */
X#define SIZE 64
X/* how much larger to make each dimension */
X#define MAXMULT 16
Xint MULT;
X
X/*
X * The theory is, by changing only 'pattern' and 'shift' to reflect the
X * bit numbering of the target machine, this code will work for big
X * and little endians.
X */
X
Xstatic short pattern[] = {
X	0x8000, 0x4000, 0x2000, 0x1000, 0x800, 0x400, 0x200, 0x100,
X	0x80,   0x40,   0x20,   0x10,   0x8,   0x4,   0x2,   0x1
X	};
X
Xstatic short shift[] = {
X	15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
X	};
X
Xstatic short out[SIZE*SIZE*MAXMULT*MAXMULT/16 + 1];
X
X
Xmain(argc, argv)
Xchar **argv;
X{
X	int row, col, val, i, j;
X	struct pixrect *pr, *icon_load_mpr();
X
X	char error_msg[256];
X	if (argc != 3) {
X		printf("Usage: genmessage file factor\n");
X		exit(1);
X	}
X	argc--; argv++;
X	if ((pr = icon_load_mpr(*argv, error_msg)) == NULL) {
X		printf("Could not get file '%s'.\n", *argv);
X		printf("%s",error_msg);
X	}
X	in = mpr_d(pr)->md_image;
X
X	argc--; argv++;
X	MULT = atol(*argv);
X	if (MULT > MAXMULT) {
X		printf("Factor too big.\n");
X		exit(1);
X	}
X
X	printf("/* Format_version=1, Width=%d, Height=%d, Depth=1, Valid_bits_per_item=16\n */\n", SIZE*MULT, SIZE*MULT);
X	for (row = 0; row < SIZE; row++) {
X		for (col = 0; col < SIZE; col++) {
X			val = bitval(in, row*SIZE + col);
X			for (i=0; i<MULT; i++)
X				for (j=0; j<MULT; j++)
X					bitset(out, row*MULT*MULT*SIZE+(MULT*SIZE*i) + col*MULT+j, val);
X			}
X	}
X	for (i = 0; i < SIZE*SIZE*MULT*MULT/128; i++) {
X		for ( j = 0;  j < 8; j++) {
X			printf(" 0x%04x, ", out[i*8 + j] & 0xffff);
X		}
X		printf("\n");
X	}
X	exit(0);
X}
X
X
X/* Machine-dependent: depends on what kind of endian. */
X
Xbitset(b, l, v)
Xshort *b;
X{
X	b[l/16] = b[l/16] & ~pattern[l%16] | (((v & 0x1) << shift[l%16]) & pattern[l%16]);
X}
X
Xbitval(b, l)
Xshort *b;
X{
X	return ((b[l/16] & pattern[l%16]) >> shift[l%16]) & 0x1;
X}
END_OF_genmessage.c
if test 2580 -ne `wc -c <genmessage.c`; then
    echo shar: \"genmessage.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f global.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"global.c\"
else
echo shar: Extracting \"global.c\" \(2614 characters\)
sed "s/^X//" >global.c <<'END_OF_global.c'
X/**********************************  global.c  ***********************/
X#include "sdi.h"
X
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
X
Xint		ballistic_delay = 4;
XPanel_item	ballistic_item;
Xstruct pixfont	*bigfont, *buttonfont; /* use 'struct pixfont' for 3.0 compatibility */
Xint			blast_count = 0;
Xlong		blast_delay = 150000;
Xint			burst_distance = 32;
Xfloat		carryover_divisor = 1.0;
Xint			city_fd;
Xint			cursor_type = 0;
Xint			launch_fd;
XCanvas		citycanvas;
XFrame		cityframe;
XPixwin		*citypw;
Xint			continuous;
XFrame		controlframe;
Xfloat		foe_divisor = 2.0;
Xint			foe_factor = 5;
XPanel_item	foe_ground_item;
XPanel_item	foe_item;
Xint			foe_value = 5;
Xstruct pixfont	*font;	/* struct used for 3.0 compatibility */
Xint			gamemaster = 0;
Xint			field_margin = 32;
XPanel_item	interceptor_item;
XPanel_item	laser_item;
Xint			launch_delay = 4;
XCanvas		launchcanvas;
XFrame		launchframe;
XPixwin		*launchpw;
XPanel_item	level_item;
Xint			max_x = 440;
Xint			max_y = 250;
Xint			max_missile_speed = 25;
Xint			min_missile_speed = 7;
Xint			missile_count = 0;
XPixwin		*need_a_bell = NULL;
XPanel_item	next_round_item;
Xint			num_cities = 0;
Xchar 		*panel_common[] = {
X	(char *)PANEL_VALUE,		(char *)1,
X	(char *)PANEL_MIN_VALUE,	(char *)0,
X	(char *)PANEL_MAX_VALUE,	(char *)0,
X	(char *)PANEL_VALUE,		(char *)0,
X	(char *)PANEL_SHOW_RANGE,	(char *)FALSE,
X	(char *)PANEL_SHOW_VALUE,	(char *)TRUE,
X	(char *)PANEL_EVENT_PROC,	(char *)no_events,
X	(char *)PANEL_SLIDER_WIDTH,	(char *)150,
X	(char *)0 };
Xint			restoring_game = 0;
XPanel_item	resume_item;
XPanel_item	rock_item;
Xint			running = 0;
XPanel_item	save_file_item;
Xchar 		save_file_name[128] = "sdi_saved_game";
Xstruct scores sc[NUM_SCORES+1], 
X			*sc_end = &sc[NUM_SCORES];
Xchar		*scorefile = NULL;
XPanel_item	score_item;
XPanel_item	skill_item;
Xint			starting_icon = 1;
Xint			starting_icon_time = 5;
Xint			starting_skill = 0;
XPanel_item	suspend_item;
Xint			suspended = 0;
Xint			time_to_play = 0;
XPanel_item	total_foe_item;
Xint			total_cities_lost;
Xchar 		user_name[128] = "(nobody)";
XPanel_item	user_name_item;
X
Xstruct circ *lasercircles;
Xstruct circ *laserkillcircles;
Xstruct circ *bigblastcircles;
Xstruct circ *littleblastcircles;
Xstruct circ *blastkillcircles;
Xstruct circ *citykillcircles;
Xstruct circ *littlerockcircles;
Xstruct circ *bigrockcircles;
X
Xstruct pixrect **blankcircles;
END_OF_global.c
if test 2614 -ne `wc -c <global.c`; then
    echo shar: \"global.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f laser.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"laser.c\"
else
echo shar: Extracting \"laser.c\" \(4112 characters\)
sed "s/^X//" >laser.c <<'END_OF_laser.c'
X/******************************  laser.c *******************************/
X#include <pixrect/pixrect_hs.h>
X#include <sunwindow/notify.h>
X#include "sdi.h"
X
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
X
X/*
X * All laser-specific code is here.
X */
X
X/* Kill up to this many missiles with one laser blast */
X#define MAX_LASERS 6
X
X/* A missile must be lasered for this many time steps to kill it */
X#define LASER_KILL_TIME 3
X
X/* A laser kill is worth this many points in the launch window. */
Xstatic short laser_value = 50;
X
Xint find_lasers();
X
Xstatic struct laser {
X	Pixwin *pw;
X	short x, y;
X	short count, maxlasers;
X	short oldx[MAX_LASERS];
X	short oldy[MAX_LASERS];
X	struct missile *ptr[MAX_LASERS];
X	struct laser *next;
X	};	
X
Xstruct laser *l_head = NULL;
X
X/*
X * Initialize a linked list of lasers.  Free any already
X * on there.
X */
Xinit_laser()
X{
X	struct laser *tmp;
X	while (l_head != NULL) {
X		tmp = l_head;
X		l_head = l_head->next;
X		free(tmp);
X	}
X}		
X
X/* communication into 'find_lasers' */
Xstatic struct blast fake_bid;
Xstatic struct laser *current_l;
Xstatic int global_laser_count;
X
X/*
X * Start a laser blast at position x,y in pixwin pw.
X */
Xstart_laser(x, y, pw, laser_count, laser_range)
Xint x, y;
XPixwin *pw;
X{
X	struct blast *bid = &fake_bid;
X	struct laser *l = (struct laser *)calloc(sizeof(struct laser), 1);
X	struct missile *mptr;
X	int i;
X	/* Create a fake bid to use the intersection code. */
X	bid->x = x;
X	bid->y = y;
X	bid->width = laser_range;
X	update_blast_rect(bid);
X	/* initialize the laser structure */
X	l->pw = pw;
X	l->count = 0;
X	l->maxlasers = 0;
X	l->x = x;
X	l->y = y;
X	l->next = l_head;
X	l_head = l;
X	current_l = l;
X	global_laser_count = laser_count;
X	doto_missiles(find_lasers);
X	mptr = l->ptr[0];
X	for (i = 0; i < l->maxlasers; i += 1) {
X		l->oldx[i] = l->ptr[i]->x;
X		l->oldy[i] = l->ptr[i]->y;
X	}
X	start_blast(x, y, 0, 0, pw, lasercircles);
X}
X
X/*
X * Helper routine passed into 'doto_missiles'.  Uses the global variables
X * 'current_l' and 'fake_bid' to try to find MAX_LASERS missiles within the
X * range of this laser.
X */
Xfind_lasers(mid)
Xstruct missile *mid;
X{
X	register current_count = current_l->maxlasers;
X	if (current_count < global_laser_count &&
X			single_intersect(&fake_bid, mid) &&
X			mid->pw == current_l->pw) {
X		current_l->ptr[current_count] = mid;
X		mid->refs += 1;
X		current_l->maxlasers += 1;
X	}
X	return current_count >= global_laser_count;
X}
X
X/*
X * This routine is called once each game timestep to update the status
X * of all lasers.
X */
Xdoto_lasers()
X{
X	/* bump the count of each laser.
X	   for each whose count is >= LASER_KILL_TIME, kill its old arcs, start
X	   a small blast at each missiles current position, and free the laser.
X	*/
X	struct laser *lptr, *old_lptr = NULL;
X	int i;
X	lptr = l_head;
X	while (lptr != NULL) {
X		lptr->count += 1;
X		for (i=0; i < lptr->maxlasers; i += 1) {
X			if (lptr->count > 1) {
X				/* remove old laser path */
X				pw_vector(lptr->pw, lptr->x, lptr->y,
X					lptr->oldx[i], lptr->oldy[i],
X					PIX_NOT(PIX_SRC), 1);
X			}
X			if (lptr->count > LASER_KILL_TIME) {
X				/* this laser is all done */
X				destroy_missile(lptr->ptr[i]);
X				if (lptr->ptr[i]->y >= 0) {
X					/* blast only if the missile is within range */
X					start_blast(lptr->ptr[i]->x, lptr->ptr[i]->y,
X						0, 0, lptr->pw, laserkillcircles);
X				}
X				if (lptr->pw == citypw)
X					bump_score(laser_value/5);
X				else bump_score(laser_value);
X				if (old_lptr == NULL) {
X					/* at the head */
X					l_head = lptr->next;
X				} else {
X					old_lptr->next = lptr->next;
X				}
X			} else {
X				/* track the missile */
X				lptr->oldx[i] = lptr->ptr[i]->x;
X				lptr->oldy[i] = lptr->ptr[i]->y;
X				pw_vector(lptr->pw, lptr->x, lptr->y,
X					lptr->ptr[i]->x, lptr->ptr[i]->y, PIX_SRC, 1);
X
X				old_lptr = lptr;
X			}
X		} /* end of for */
X		lptr = lptr->next;
X	} /* end of while */
X}
X
END_OF_laser.c
if test 4112 -ne `wc -c <laser.c`; then
    echo shar: \"laser.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f laserkill.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"laserkill.h\"
else
echo shar: Extracting \"laserkill.h\" \(2171 characters\)
sed "s/^X//" >laserkill.h <<'END_OF_laserkill.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0007,0xF000,0x0000,0x0000,0x0038,0x0E00,0x0000,
X	0x0000,0x00C0,0x0580,0x0000,0x0000,0x0100,0x0440,0x0000,
X	0x0000,0x0200,0x0820,0x0000,0x0000,0x0400,0x1810,0x0000,
X	0x0000,0x0C00,0x5008,0x0000,0x0000,0x1700,0x500C,0x0000,
X	0x0000,0x11C0,0x7034,0x0000,0x0000,0x2030,0x4262,0x0000,
X	0x0000,0x2008,0xCEC2,0x0000,0x0000,0x2004,0x8B02,0x0000,
X	0x0000,0x407E,0xB001,0x0000,0x0000,0x4038,0xA001,0x0000,
X	0x0000,0x4007,0xC001,0x0000,0x0000,0x4001,0xFF01,0x0000,
X	0x0000,0x4007,0x8201,0x0000,0x0000,0x4018,0x87FF,0x0000,
X	0x0000,0x4061,0x0001,0x0000,0x0000,0x2081,0x0002,0x0000,
X	0x0000,0x20E1,0x2002,0x0000,0x0000,0x2019,0x6002,0x0000,
X	0x0000,0x1061,0xA004,0x0000,0x0000,0x10C0,0x2004,0x0000,
X	0x0000,0x0B00,0x2008,0x0000,0x0000,0x0600,0x2010,0x0000,
X	0x0000,0x0200,0x2020,0x0000,0x0000,0x0100,0x2040,0x0000,
X	0x0000,0x00C0,0x6180,0x0000,0x0000,0x0038,0x0E00,0x0000,
X	0x0000,0x0007,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_laserkill.h
if test 2171 -ne `wc -c <laserkill.h`; then
    echo shar: \"laserkill.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f menu.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"menu.c\"
else
echo shar: Extracting \"menu.c\" \(3990 characters\)
sed "s/^X//" >menu.c <<'END_OF_menu.c'
X#include <suntool/sunview.h>
X#include <stdio.h>
X#include "walkmenu_impl.h"
X#include "image_impl.h"
X
X#define MAX_ITEMS 32
X
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
X
X/*
X * Pie menu code -- patent applied for.
X */
X
X/*
X * The front-end routines to make pie-menus look like the normal
X * Sun window library (at least a little bit).
X */
X
X
Xvoid
Xpie_menu_set(m, arg)
Xstruct menu *m;
Xint arg;
X{
X	char **argptr = &(char *)arg;
X	pie_menu_set_internal(m, argptr);
X}
X
Xpie_menu_item_set(mi, arg)
Xstruct menu_item *mi;
Xint arg;
X{
X	char **argptr = &(char *)arg;
X	pie_menu_item_set_internal(mi, argptr);
X}
X
Xstruct menu *
Xpie_menu_create(arg)
Xint arg;
X{
X	char **argptr = &(char *)arg;
X	struct menu *m;
X	m = (struct menu *)calloc(sizeof(struct menu),1);
X	m->item_list = (struct menu_item **)calloc(sizeof(struct menu_item *), MAX_ITEMS);
X	m->max_nitems = MAX_ITEMS;
X	pie_menu_set_internal(m, argptr);
X	return m;
X}
X
Xstruct menu_item *
Xpie_menu_create_item(arg)
Xint arg;
X{
X	char **argptr = &(char *)arg;
X	struct menu_item *mi;
X	mi = (struct menu_item *)calloc(sizeof(struct menu_item),1);
X	mi->image = (struct image *)calloc(sizeof(struct image),1);
X	pie_menu_item_set_internal(mi, argptr);
X	return mi;
X}
X
Xpie_menu_set_internal(m, argptr)
Xstruct menu *m;
Xchar **argptr;
X{
X	while (*argptr != 0) {
X		switch(*argptr) {
X			case MENU_APPEND_ITEM: {
X				if (m->nitems >= (m->max_nitems-1))
X					{
X					fprintf("Too many items in a pie menu.\n");
X					abort();
X				}
X				m->item_list[m->nitems] = (struct menu_item *)(*(argptr+1));
X				((struct menu_item *)m->item_list[m->nitems])->parent = m;
X				m->nitems += 1;
X				argptr += 2; break;
X			}
X			case MENU_NOTIFY_PROC: {
X				(caddr_t)m->notify_proc = (caddr_t)(*(argptr+1));
X				argptr += 2; break;
X			}
X			default: {
X				fprintf(stderr, "Unexpected item in pie_menu_set_internal.\n");
X				abort();
X				break;
X			}
X		}
X	}
X}
X
Xpie_menu_item_set_internal(mi, argptr)
Xstruct menu_item *mi;
Xchar **argptr;
X{
X	while (*argptr != 0) {
X		switch(*argptr) {
X			case MENU_IMAGE:  {
X				mi->image->pr = (struct pixrect *)*(argptr+1);
X				argptr += 2; break;
X			}
X			case MENU_STRING: {
X				mi->image->string = (char *)*(argptr+1);
X				argptr += 2; break;
X			}
X			case MENU_PULLRIGHT: {
X				mi->pullright = TRUE;
X				mi->value = (caddr_t)*(argptr+1);
X				((struct menu *)mi->value)->parent = mi;
X				argptr += 2; break;
X			}
X			case MENU_RELEASE: {
X				mi->free_item = TRUE;
X				argptr += 1; break;
X			}
X			case MENU_RELEASE_IMAGE: {
X				mi->image->free_image = TRUE;
X				argptr += 1; break;
X			}
X			case MENU_CLIENT_DATA: {
X				mi->client_data = (caddr_t)*(argptr+1);
X				argptr += 2; break;
X			}
X			default: {
X				fprintf(stderr, "Unexpected item in pie_menu_item_set_internal.\n");
X				abort();
X				break;
X			}
X		}
X	}
X}
X
Xpie_menu_destroy(m)
Xstruct menu *m;
X{
X	int i;
X	if (m == NULL) return;
X	for (i=0; i<m->nitems; i++) {
X		if (m->item_list[i]->free_item) {
X			free(m->item_list[i]->image);
X			free(m->item_list[i]);
X		}
X	}
X	free(m->item_list);
X	free(m);
X}
X
Xcaddr_t
Xpie_menu_get(m, arg)
Xstruct menu *m;
XMenu_attribute arg;
X{
X	switch(arg) {
X		case MENU_CLIENT_DATA: {
X			return (caddr_t) m->client_data;
X			break;
X		}
X		default: {
X			fprintf(stderr, "Unexpected item in pie_menu_get.\n");
X			abort();
X			break;
X		}
X	}
X}
X
Xcaddr_t
Xpie_menu_item_get(mi, arg)
Xstruct menu_item *mi;
XMenu_attribute arg;
X{
X	switch(arg) {
X		case MENU_CLIENT_DATA: {
X			return (caddr_t) mi->client_data;
X			break;
X		}
X		default: {
X			fprintf(stderr, "Unexpected item in pie_menu_item_get.\n");
X			abort();
X			break;
X		}
X	}
X}
X
Xcaddr_t
Xpie_menu_show(m, w, e, f, s)
Xstruct menu *m;
XWindow w;
XEvent *e;
Xint (*f)();
Xchar *s;
X{
X	struct menu_item *rval;
X	rval = (struct menu_item *)menu_track(m, w, e, f, s);
X}
END_OF_menu.c
if test 3990 -ne `wc -c <menu.c`; then
    echo shar: \"menu.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f missilekill.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"missilekill.h\"
else
echo shar: Extracting \"missilekill.h\" \(2171 characters\)
sed "s/^X//" >missilekill.h <<'END_OF_missilekill.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0C00,0x0080,0x0000,0x0000,0x0000,0x0100,0x0000,
X	0x0000,0x1000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x1000,0x0000,0x0000,0x0000,0x0000,0x0800,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x2000,0x0000,
X	0x0000,0x1000,0x0000,0x0080,0x0000,0x0000,0x0000,0x0000,
X	0x2000,0x0000,0x0020,0x0200,0x0000,0x1000,0x0000,0x0000,
X	0x0000,0x0000,0x8080,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0400,0x0040,0x0080,0x0000,0x0000,0x0800,0x0200,0x4000,
X	0x0000,0x0021,0x0200,0x0000,0x0080,0x0000,0x0800,0x0000,
X	0x0000,0x0821,0x1004,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0820,0x2008,0x0000,0x0008,0x0402,0x2000,0x0000,
X	0x0000,0x0210,0x0010,0x0000,0x0001,0x0002,0x4040,0x0000,
X	0x0000,0x1090,0x0280,0x0000,0x0000,0x4842,0x8200,0x0200,
X	0x0000,0x00AA,0x0400,0x0800,0x0000,0x026F,0x0A00,0x4000,
X	0x0000,0x0122,0x48B2,0x0000,0x00A4,0x824E,0xE000,0x8000,
X	0x0000,0x08A5,0x0000,0x0000,0x0000,0x023E,0xD200,0x0000,
X	0x0000,0x54F3,0xA400,0x0000,0x0000,0x002D,0x0180,0x0020,
X	0x0020,0x014D,0x5429,0x2002,0x0000,0x0521,0x0802,0x4000,
X	0x0000,0x1826,0xA000,0x0000,0x0000,0x0000,0x1000,0x0000,
X	0x0001,0x4031,0x8800,0x0000,0x0000,0x0040,0x8200,0x0000,
X	0x0008,0x0009,0x0000,0x0000,0x0000,0x0200,0x2040,0x0000,
X	0x0040,0x0008,0x8020,0x0000,0x0000,0x0608,0x9010,0x0000,
X	0x0800,0x0008,0x0000,0x0000,0x0000,0x0000,0x0008,0x0000,
X	0x0000,0x0000,0x0001,0x0000,0x0000,0x1008,0x2100,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0040,0x0000,
X	0x0001,0x0000,0x1000,0x0800,0x0000,0x0008,0x0000,0x0000,
X	0x0000,0x0000,0x0800,0x0100,0x0000,0x0008,0x0000,0x0000,
X	0x0008,0x0000,0x0004,0x0000,0x0000,0x0000,0x0200,0x0000,
X	0x0000,0x0008,0x0200,0x0010,0x0020,0x0008,0x0000,0x0008,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1004,
X	0x0080,0x0000,0x0000,0x0800,0x0080,0x0000,0x0000,0x0400
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_missilekill.h
if test 2171 -ne `wc -c <missilekill.h`; then
    echo shar: \"missilekill.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f notify.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"notify.c\"
else
echo shar: Extracting \"notify.c\" \(3982 characters\)
sed "s/^X//" >notify.c <<'END_OF_notify.c'
X/************************************  notify.c  *************************/
X#include <sunwindow/notify.h>
X#include <sys/ioctl.h>
X#include <fcntl.h>
X#include "sdi.h"
X
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever on Suns is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.  Use of this code
X * in other products is reserved to me--I'm working on Mac and IBM versions.
X */
X
X/*
X * notifier and timer specific code, including some input handling hacks.
X */
X
X/*
X * Begin a series of minor kludges to get good response time at
X * heavy screen loads without running into various SunView bugs
X * involving input notification and non-blocking I/O.  There is
X * probably a bit of overkill here, but the obvious solution
X * (turn on non-blocking once in 'main') does not work.
X */
X
X/*
X * See if any mouse clicks have occured.
X */
Xcheckinput()
X{
X	input_helper(city_fd, citycanvas);
X	input_helper(launch_fd, launchcanvas);
X}
X
X/*
X * Without blocking, exhaust all input on file descripter 'fd' and
X * send it to window 'w'.  
X */
Xinput_helper(fd, w)
XWindow w;
X{
X	Event event;
X	int old_flags = fcntl(fd, F_GETFL);
X/*
X * Have to turn FNDELAY on and off because SunView really doesn't
X * work well with it on under heavy input load.  The result is that
X * we do too much work under light load (when we can afford it), and
X * much less work under heavy load (when it makes sense).  A good balance.
X */
X	fcntl(fd, F_SETFL, old_flags | FNDELAY);
X	while(! input_readevent(fd, &event)) {
X		canvas_event(w, &event);
X		event_x(&event) = event_x(&event)-FIELD_MARGIN;
X		event_y(&event) = event_y(&event)-FIELD_MARGIN;
X		main_event_proc(w, &event, 0);
X	}
X	fcntl(fd, F_SETFL, old_flags);
X}
X
X/*
X * Receive notifications of pending input.
X */
XNotify_value 
Xinput_notify(me, fd)
X{
X	if (fd == city_fd) {
X		input_helper(city_fd, citycanvas);
X	} else if (fd == launch_fd) {
X		input_helper(launch_fd, launchcanvas);
X	} 
X}
X
X/*
X * Schedule things from input clients before timers.  The effect
X * is to get all the input before starting to update the screen.
X*/
XNotify_value
Xscheduler(n, clients)
XNotify_client *clients;
X{
X	int i;
X	for (i=0; i < n; i += 1) {
X		if (
X			clients[i] == (Notify_client)launchcanvas ||
X			clients[i] == (Notify_client)citycanvas ||
X			clients[i] == (Notify_client)launchframe ||
X			clients[i] == (Notify_client)cityframe
X			) {
X				notify_client(clients[i]);
X				clients[i] = NOTIFY_CLIENT_NULL;
X		}
X	}
X	for (i=0; i < n; i += 1) {
X		if (clients[i] != NOTIFY_CLIENT_NULL) {
X				notify_client(clients[i]);
X				clients[i] = NOTIFY_CLIENT_NULL;
X		}
X	}
X	return NOTIFY_DONE;
X}
X
X/*
X * Call procedure f in a little while.
X */
X
Xstruct call_wrapper {
X	/* Dynamically allocating a wrapper ensures unique notifier id's. */
X	void (*f)();
X}
X
Xdo_with_delay(f, secs, usecs)
Xvoid (*f)();
Xint secs, usecs;
X{
X	Notify_value do_the_call();
X	struct call_wrapper *w;
X	struct itimerval timer;
X
X	/* Sigh, so much work just to wait a bit before starting up. */
X	timer.it_interval.tv_usec = 0;
X	timer.it_interval.tv_sec = 0;
X	timer.it_value.tv_usec = usecs;
X	timer.it_value.tv_sec = secs;
X 	w = (struct call_wrapper *)calloc(sizeof(struct call_wrapper), 1);
X	w->f = f;
X	notify_set_itimer_func(w, do_the_call,
X		ITIMER_REAL, &timer, NULL);
X}
X
X/*
X * Wrapper to make sure procedures from do_with_delay return good values
X * to the notifier.
X */
XNotify_value
Xdo_the_call(w, which)
Xstruct call_wrapper *w;
X{
X	(*(w->f))();
X	free(w);
X	return NOTIFY_DONE;
X}
X
X/* Call this routine when we are suspended, and
X * we want to put off notification.  The parameters
X * are those to notify_set_itimer_func.
X */
Xsuspendor(func, me, which, when)
XNotify_value (*func)();
Xint *me, which;
X{
X	struct itimerval timer;
X	timer.it_interval.tv_usec = 0;
X	timer.it_interval.tv_sec = 0;
X	timer.it_value.tv_usec = 0;
X	timer.it_value.tv_sec = when;
X	notify_set_itimer_func(me, func, ITIMER_REAL, &timer, which);
X}
END_OF_notify.c
if test 3982 -ne `wc -c <notify.c`; then
    echo shar: \"notify.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f talkingmark.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"talkingmark.h\"
else
echo shar: Extracting \"talkingmark.h\" \(2171 characters\)
sed "s/^X//" >talkingmark.h <<'END_OF_talkingmark.h'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0xFFFF,0xFD40,0x00FF,0xFFFF,0xFFFF,0xFFFF,0xFE3F,0xFFFF,
X	0xFFFF,0x4000,0x0101,0xFFFF,0xFFFD,0x8C00,0x0080,0x1FFF,
X	0xFFFA,0x9231,0xA340,0x0FFF,0xFFF5,0x1009,0x54A0,0x03FF,
X	0xFFEC,0x1639,0x5720,0x07FF,0xFFF8,0x1249,0x5410,0x027F,
X	0xFFE8,0x0C29,0x5390,0x00BF,0xFFA8,0x0000,0x0010,0x00DF,
X	0xFFA8,0x1800,0x0010,0x007F,0xFFD8,0x2489,0x8A10,0x001F,
X	0xFF58,0x248A,0x4D20,0x002F,0xFF70,0x2453,0x8840,0x002F,
X	0xFFB0,0x2452,0x0880,0x001F,0xFED0,0x1821,0xC900,0x001F,
X	0xFD70,0x0000,0x0200,0x000F,0xFDE0,0x7FFF,0xFC00,0x0017,
X	0xFF70,0x8000,0x0000,0x000F,0xFDE1,0xA980,0x0001,0x2217,
X	0xFB61,0xFFF0,0x0017,0xFF19,0xFD61,0xF2BC,0x000D,0xFDCF,
X	0xF7B1,0x801E,0x0030,0x00DB,0xFD70,0x8FC3,0x0070,0x7073,
X	0xF570,0x95B1,0x00A1,0xAC3F,0xFAA8,0xA698,0x0062,0xF21C,
X	0xF678,0xBAF0,0x0044,0xB615,0xFD58,0xCF10,0x80C3,0xAC1D,
X	0xFAF8,0x4040,0x0082,0x781B,0xFFB8,0x4500,0x0080,0x8008,
X	0xFDAC,0x4000,0x8080,0x501E,0xFDB4,0x4000,0x0080,0x000A,
X	0xFF6C,0x4000,0x0080,0x0005,0xFF5C,0x2001,0x0080,0x0007,
X	0xFFEE,0x2001,0x0040,0x0009,0xFEBA,0x2002,0x0048,0x0005,
X	0xFFE1,0x100A,0x4022,0x000B,0xFFD5,0x1844,0x0020,0x000A,
X	0xFF44,0x8804,0x8010,0x0007,0xFF68,0x8D07,0x5D50,0x8005,
X	0xFFD0,0x4412,0xB7EC,0x0017,0xFFFE,0x2237,0xFDEA,0x0005,
X	0xFFB0,0x116F,0x5F56,0x801D,0xFFFA,0x18D7,0xEFFD,0x801F,
X	0xFFF5,0x047E,0x4AD5,0x805B,0xFFDD,0x0235,0xF6AB,0x20DB,
X	0xFFD7,0x818E,0xB7BB,0xB1DB,0xFFDB,0xB1FB,0x005E,0xCD6F,
X	0xFFE6,0xCF4E,0x0036,0xB6FF,0xFFEB,0xB6F7,0x557A,0x593F,
X	0xFFFB,0x3CA0,0xAA81,0xF7AF,0xFFF3,0x46C0,0x0001,0x79DF,
X	0xFFFA,0x7920,0x1A01,0xDB7F,0xFFFD,0x7B50,0x2506,0xF77F,
X	0xFFFA,0x9750,0x6F08,0x7EFF,0xFFFB,0x5BD4,0x92D5,0xB2FF,
X	0xFFFC,0xBF87,0xAD69,0x457F,0xFFFF,0x4ADE,0xFAAD,0x55FF,
X	0xFFFF,0x9649,0xC2DF,0xD7FF,0xFFFF,0xEBF7,0x5BD9,0x6BFF,
X	0xFFFF,0xFC68,0x9776,0xD7FF,0xFFFF,0xFDDD,0x789B,0xBFFF,
X	0xFFFF,0xFF5F,0xD576,0xFFFF,0xFFFF,0xFFE2,0x2AAB,0xFFFF
X/*
X * Copyright 1987 by Mark Weiser.
X * Permission to reproduce and use in any manner whatsoever is granted
X * so long as this copyright and other identifying marks of authorship
X * in the code and the game remain intact and visible.
X */
END_OF_talkingmark.h
if test 2171 -ne `wc -c <talkingmark.h`; then
    echo shar: \"talkingmark.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f walkmenu_impl.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"walkmenu_impl.h\"
else
echo shar: Extracting \"walkmenu_impl.h\" \(4150 characters\)
sed "s/^X//" >walkmenu_impl.h <<'END_OF_walkmenu_impl.h'
X/*	@(#)walkmenu_impl.h 1.1 86/02/04 SMI	*/
X
X/***********************************************************************/
X/*	                      walkmenu_impl.h			       */
X/*          Copyright (c) 1985 by Sun Microsystems, Inc.               */
X/***********************************************************************/
X
X#ifndef walkmenu_impl_DEFINED
X#define walkmenu_impl_DEFINED
X
X#include <suntool/walkmenu.h>
X#include "image_impl.h"
X
X#define TRUE	1
X#define FALSE	0
X#define NULL	0
X
X#define Pkg_private
X#define Pkg_extern extern
X#define Private static
X
X#define imax(a, b) ((int)(b) > (int)(a) ? (int)(b) : (int)(a))
X#define range(v, min, max) ((v) >= (min) && (v) <= (max))
X
X#define menu_attr_next(attr) (Menu_attribute *)attr_next((caddr_t *)attr)
X#define MENU_FILLER 5
X
X/***********************************************************************/
X/*	        	Structures 				       */
X/***********************************************************************/
X
X/* 
X * Fields: default_position, selected_position and image are not validated
X * and must be checked before each usage.
X */
X
X/***********			Menu			     **********/
X
Xstruct menu {
X    struct menu_ops_vector *ops;
X    int			 default_position;	  /* Default item */
X    int			 selected_position;	  /* Last selected item */
X    /* Values are: default, selected, nth item				 */
X    Menu_attribute	 initial_selection;  /* Initial presentation */
X    Menu_attribute	 default_selection;  /* Default presentation */
X    int			 height;	  /* in pixels, zero implies best fit */
X    int			 width;		  /* in pixels */
X    struct pixrect	*shadow_pr;	  /* Draw shadow with this pattern */
X    int			 (*feedback_proc)(); /* NYI */
X    caddr_t		 (*notify_proc)();
X    struct menu		*(*gen_proc)();   /* Dynamically generate menu */
X    /* Handler for item select,  calls menu item proc */
X    struct image	 default_image;	  /* Font, max size, etc. */
X    struct menu		*stack_menu;	  /* NYI - Stacking menu (sibling) */
X    int			 pullright_delta; /* Distance(pixels) to bring up menu*/
X    caddr_t		 client_data;	  /* Client''s use */
X
X/* Flags */
X    unsigned		 allow_accelerated_selection:1; /* NYI */
X    unsigned		 display_one_level:1; /* Limit initial selection */
X    unsigned		 stand_off:1;	      /* Don''t selected item */
X    unsigned		 valid_result:1;      /* True if m->value is valid */
X    unsigned		 jump_after_selection:1; /* If true then jump */
X    unsigned		 jump_after_no_selection:1; /* If true then jump */
X    unsigned		 free_everything:1;   /* Not used */
X    unsigned		 free_menu:1;         /* Not used */
X    unsigned		 free_shadow_pr:1;    /* Not used */
X    unsigned		 free_client_data:1;  /* Not used */
X
X/* Auxiliary fields */
X    int			 nitems;	  /* Number of items */
X    int			 max_nitems;	  /* Size of item list */
X    int			 ncols;
X    int			 nrows;
X    struct menu_item	**item_list;
X    struct menu_info	*dynamic_info;	  /* Holds dynamic info for show() */
X    struct menu_item	*parent;	  /* Last pullright item */
X
X
X
X};
X
X
X/***********			Menu item			**********/
X
Xstruct menu_item {
X    struct menu_ops_vector *ops;
X    struct image	*image;
X    struct menu_item	*(*gen_proc)();	    /* Called before displaying item */
X    struct menu		*(*gen_pullright)();/* Called before displaying menu */
X    caddr_t		 (*notify_proc)();  /* Called only when selected */
X    caddr_t		 value;		    /* union: value, menu_ptr */
X    caddr_t		 client_data;
X    struct menu		*parent;	    /* Current enclosing menu */
X
X/* Flags  */
X    unsigned		 inactive:1;
X    unsigned		 no_feedback:1;
X    unsigned		 pullright:1;
X    unsigned		 selected:1;
X    unsigned		 free_everything:1;   /* Not used */
X    unsigned		 free_item:1;
X    unsigned		 free_value:1;        /* Not used */
X    unsigned		 free_client_data:1;  /* Not used */
X
X};
X
X
X/***********			Menu ops			**********/
X
Xstruct menu_ops_vector {
X    caddr_t (*menu_get_op)();
X    int (*menu_set_op)();
X    void (*menu_destroy_op)();
X};
X
X
X/***********			Menu info			**********/
X
Xstruct menu_info {
X    struct inputevent	*first_iep;
X    struct inputevent	*last_iep;
X    int			 depth;
X    caddr_t		 (*notify_proc)();
X};
X
X#endif ~walkmenu_impl_DEFINED
END_OF_walkmenu_impl.h
if test 4150 -ne `wc -c <walkmenu_impl.h`; then
    echo shar: \"walkmenu_impl.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 4 \(of 6\).
cp /dev/null ark4isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 6 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0