home *** CD-ROM | disk | FTP | other *** search
/ Aztec Shareware Collection / ARCADE_1.ISO / snarf / snarf.h < prev    next >
C/C++ Source or Header  |  1988-01-17  |  34KB  |  1,184 lines

  1.  
  2. #define    XORG        8
  3. #define    YORG        23
  4. #define    XMAX        639
  5. #define    YMAX        318
  6.  
  7. #define    MAXCOLOR    5
  8. #define    MAXPATTCOLOR    10
  9. #define    MAXPATTERN    3    
  10. #define    MAXWALLS    10
  11. #define    MAXBUGS        10
  12. #define    MAXPITS        10
  13. #define    MAXTELEPORTS    6
  14. #define    MAXGOODIES    20
  15. #define    MAXOBJECTS    MAXPITS+MAXTELEPORTS+MAXGOODIES
  16.  
  17. #define    MAXDIS        9
  18. #define    BUGJMP        4
  19. #define    MANJMP        4
  20. #define    SHOTJMP        8
  21.  
  22. #define    MICROBEEP    2
  23. #define    SHORTBEEP    4
  24. #define    MEDIUMBEEP    6
  25.  
  26.  
  27. /****************************************************************
  28.  * IF IF IF IF IF IF IF IF IF IF IF IF IF IF IF IF IF IF IF IF     *
  29.  ****************************************************************/
  30.  
  31. #ifdef    INMAIN
  32.  
  33. /****************************************************************
  34.  * GLOBAL static variables                    *
  35.  ****************************************************************/
  36.  
  37. struct    hightype {
  38.     long    score;
  39.     char    name[12];
  40.     } highlist[64];
  41.  
  42. int    tagcount;
  43. int    tagflg;
  44.  
  45. int    curscreen;
  46. int    dead;
  47.  
  48. int    beep_dead[] = {
  49.         10000, 18,
  50.         0,0
  51.     };
  52.  
  53. int    beep_ill_key[] = {
  54.         10000, 1,
  55.          8000, 1,
  56.          6000, 1,
  57.             0,0
  58.     };
  59.  
  60. int    beep_lock[] = {
  61.         15000,1,
  62.         12000,1,
  63.          9000,1,
  64.          7000,1,
  65.          3000,1,
  66.          1000,1,
  67.           300,1,
  68.           100,1,
  69.           0,0
  70.     };
  71.  
  72. int    beep_tag[] = {
  73.         500,1,
  74.         8000,1,
  75.         750,1,
  76.         8000,1,
  77.         1000,1,
  78.         0,0
  79.     };
  80.  
  81. int    beep_click[] = {
  82.         1000,1,
  83.         8000,1,
  84.         0,0
  85.     };
  86.  
  87. int    beep_goodies[] = {
  88.         5000,1,
  89.         10000,1,
  90.         4000,1,
  91.         1000,1,
  92.         500,1,
  93.         0,0
  94.     };
  95.  
  96. int    beep_kill[] = {
  97.         500,1,
  98.         0,0
  99.     };
  100.  
  101. int    beep_teleport[] = {
  102.         2000,4,
  103.         200,1,
  104.         0,0
  105.     };
  106.  
  107. struct    pltype {
  108.     int    x;
  109.     int    y;
  110.     } pitlist[MAXPITS];
  111.  
  112. int    okbugmake = 0;
  113. int    bugmaketime = 256;
  114.  
  115. long    score = 0;
  116. int    score_color = 3;
  117. int    scorex;
  118. int    scorey = YMAX+19;
  119. int    scoreflg = 1;
  120. char    scorebuf[32] = "";
  121. int    scoreptr = 0;
  122. long    highscore = 0L;
  123. long    sscore = 0L;
  124.  
  125. long    points = 0;
  126. int    point_color = 3;
  127. int    pointx;
  128. int    pointflg = 1;
  129. char    pointbuf[32] = "";
  130. int    pointptr = 0;
  131.  
  132. unsigned char    keys[128] = {
  133.         0,0,0,192,0,48,0,48,1,224,0,192,0,128,0,128,
  134.         0,224,0,128,0,192,0,128,0,0,0,240,0,128,0,0,
  135.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  136.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  137.         0,0,3,192,12,48,12,48,7,224,3,192,1,128,1,128,
  138.         1,224,1,128,1,192,1,128,1,240,1,240,1,128,0,0,
  139.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  140.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  141.     };
  142.  
  143. unsigned char    keylock[128] = {
  144.         120,30,243,207,231,231,207,243,207,243,207,243,199,227,195,195,
  145.         231,231,231,231,207,243,207,243,223,251,223,251,192,3,127,254,
  146.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  147.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  148.         119,238,239,247,220,59,184,29,184,29,184,29,188,61,190,125,
  149.         220,59,220,59,184,29,184,29,176,13,191,253,191,253,127,254,
  150.         0,0,0,0,3,192,7,224,7,224,7,224,3,192,1,128,
  151.         3,192,3,192,7,224,7,224,15,240,0,0,0,0,0,0
  152.     };
  153.  
  154. unsigned char    teleport[128] = {
  155.         128,1,128,1,192,3,132,33,160,5,129,129,145,137,129,129,
  156.         137,145,132,33,135,225,64,2,32,4,16,8,8,16,7,224,
  157.         128,1,0,0,64,2,68,34,100,38,69,162,85,170,85,170,
  158.         93,186,83,202,80,10,40,20,23,232,8,16,7,224,0,0,
  159.         128,1,0,0,64,2,4,32,36,36,37,164,53,172,37,164,
  160.         45,180,47,244,47,244,23,232,8,16,7,224,0,0,0,0,
  161.         128,1,128,1,192,3,196,35,228,39,229,167,245,175,229,167,
  162.         237,183,224,7,224,7,112,14,56,28,31,248,15,240,7,224
  163.  
  164. /*    {
  165.         0,0,0,96,0,111,0,8,0,224,1,128,3,0,6,0,
  166.         12,0,24,0,48,0,48,0,32,0,96,0,96,0,96,0,
  167.         0,0,5,0,42,128,21,0,42,0,84,0,40,0,80,0,
  168.         32,0,64,0,0,0,64,0,0,0,0,0,0,0,0,0,
  169.         0,0,0,4,0,15,0,8,0,226,1,132,3,5,6,6,
  170.         12,9,24,16,48,33,48,66,32,130,97,197,102,56,120,0,
  171.         31,255,122,255,85,112,234,240,213,0,170,0,212,0,168,0,
  172.         208,0,160,0,192,0,128,0,192,0,128,0,128,0,128,0
  173.     },{
  174.         0,0,6,0,246,0,16,0,7,0,1,128,0,192,0,96,
  175.         0,48,0,24,0,12,0,12,0,4,0,6,0,6,0,6,
  176.         0,0,0,160,1,84,0,168,0,84,0,42,0,20,0,10,
  177.         0,4,0,2,0,0,0,2,0,0,0,0,0,0,0,0,
  178.         0,0,32,0,240,0,16,0,71,0,33,128,160,192,96,96,
  179.         144,48,8,24,132,12,66,12,65,4,163,134,28,102,0,30,
  180.         255,248,255,94,14,170,15,87,0,171,0,85,0,43,0,21,
  181.         0,11,0,5,0,3,0,1,0,3,0,1,0,1,0,1
  182.     },{
  183.         96,0,96,0,96,0,32,0,48,0,48,0,24,0,12,0,
  184.         6,0,3,0,1,128,0,224,0,8,0,111,0,96,0,0,
  185.         0,0,0,0,0,0,0,0,64,0,0,0,64,0,32,0,
  186.         80,0,40,0,84,0,42,0,21,0,42,128,5,0,0,0,
  187.         120,0,102,56,97,197,32,130,48,66,48,33,24,16,12,9,
  188.         6,6,3,5,1,132,0,226,0,8,0,15,0,4,0,0,
  189.         128,0,128,0,128,0,192,0,128,0,192,0,160,0,208,0,
  190.         168,0,212,0,170,0,213,0,234,240,85,112,122,255,31,255
  191.     },{
  192.         0,6,0,6,0,6,0,4,0,12,0,12,0,24,0,48,
  193.         0,96,0,192,1,128,7,0,16,0,246,0,6,0,0,0,
  194.         0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,4,
  195.         0,10,0,20,0,42,0,84,0,168,1,84,0,160,0,0,
  196.         0,30,28,102,163,134,65,4,66,12,132,12,8,24,144,48,
  197.         96,96,160,192,33,128,71,0,16,0,240,0,32,0,0,0,
  198.         0,1,0,1,0,1,0,3,0,1,0,3,0,5,0,11,
  199.         0,21,0,43,0,85,0,171,15,87,14,170,255,94,255,248
  200.     }
  201. */
  202.    };
  203.  
  204. unsigned char    bang[4][128] = {
  205.     {
  206.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  207.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  208.         0,0,0,0,0,0,0,0,0,0,0,0,7,128,7,128,
  209.         7,128,7,128,0,0,0,0,0,0,0,0,0,0,0,0,
  210.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,
  211.         3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  212.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  213.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  214.     },{
  215.         0,0,0,0,0,0,0,0,16,64,0,0,0,4,0,0,
  216.         0,0,34,0,0,0,0,0,0,128,0,0,0,0,0,0,
  217.         0,0,0,0,0,0,0,0,0,0,5,0,4,128,11,32,
  218.         5,0,4,64,1,0,0,0,0,0,0,0,0,0,0,0,
  219.         0,0,0,0,0,0,0,0,16,64,4,0,0,132,10,0,
  220.         1,0,38,64,0,0,0,0,0,128,0,0,0,0,0,0,
  221.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  222.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  223.     },{
  224.         0,0,0,0,1,0,36,0,0,16,64,0,0,8,32,0,
  225.         0,0,32,64,2,0,16,64,0,0,0,0,0,0,0,0,
  226.         0,0,0,0,0,0,0,0,15,64,24,192,8,96,20,64,
  227.         8,80,15,32,0,0,0,0,0,0,0,0,0,0,0,0,
  228.         0,0,0,0,1,0,36,0,6,16,72,128,8,72,36,64,
  229.         0,64,37,64,2,0,16,64,0,0,0,0,0,0,0,0,
  230.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  231.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  232.     },{
  233.         0,0,0,0,32,8,1,0,4,32,0,4,64,128,0,0,
  234.         0,4,18,16,0,128,32,0,0,128,0,0,0,0,0,0,
  235.         8,0,0,128,0,64,0,0,0,0,32,0,9,80,0,0,
  236.         8,64,0,0,8,0,0,16,0,0,0,4,16,0,0,0,
  237.         8,0,0,128,32,8,1,0,4,32,0,4,73,144,0,0,
  238.         0,68,18,16,8,128,32,16,0,128,0,4,16,0,0,0,
  239.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  240.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  241.     }
  242.     };
  243.  
  244. unsigned char    digits[11][28] = {
  245.         {
  246.             0x03, 0x00, 0x00, 0xc0, 0x1e, 0x20, 0x31, 0x30,
  247.             0x60, 0x30, 0x40, 0x30, 0xc0, 0x30, 0xc0, 0x30,
  248.             0xc0, 0x20, 0xc0, 0x60, 0xc0, 0xc0, 0x41, 0x80,
  249.             0x3f, 0x00, 0x00, 0x00
  250.         },{
  251.             0x00, 0xe0, 0x01, 0xc0, 0x03, 0xc0, 0x04, 0x80,
  252.             0x0b, 0x80, 0x03, 0x80, 0x03, 0x00, 0x03, 0x00,
  253.             0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0e, 0x20,
  254.             0x3f, 0xc0, 0x40, 0x00
  255.         },{
  256.             0x00, 0x00, 0x03, 0xe0, 0x0c, 0x30, 0x10, 0x30,
  257.             0x20, 0x30, 0x00, 0x60, 0x00, 0xc0, 0x01, 0x80,
  258.             0x03, 0x00, 0x06, 0x00, 0x0c, 0x10, 0x3f, 0xe0,
  259.             0x7f, 0xc0, 0x80, 0x00
  260.         },{
  261.             0x07, 0xc0, 0x18, 0x60, 0x20, 0x20, 0x00, 0x60,
  262.             0x01, 0xc0, 0x07, 0x80, 0x08, 0xc0, 0x00, 0x60,
  263.             0x00, 0x60, 0x00, 0xc0, 0x03, 0x80, 0x0e, 0x00,
  264.             0x38, 0x00, 0x40, 0x00
  265.         },{
  266.             0x00, 0x10, 0x00, 0x20, 0x00, 0x20, 0x00, 0x60,
  267.             0x04, 0x40, 0x04, 0xc0, 0x08, 0xc0, 0x18, 0x80,
  268.             0x31, 0x80, 0x61, 0x80, 0xff, 0xe0, 0x01, 0x10,
  269.             0x01, 0x00, 0x01, 0x00
  270.         },{
  271.             0x00, 0x20, 0x0f, 0xc0, 0x10, 0x00, 0x10, 0x00,
  272.             0x23, 0xc0, 0x3c, 0x60, 0x60, 0x20, 0x00, 0x60,
  273.             0x00, 0xc0, 0x03, 0x80, 0x0e, 0x00, 0x30, 0x00,
  274.             0x40, 0x00, 0x80, 0x00
  275.         },{
  276.             0x00, 0x20, 0x00, 0x80, 0x03, 0x00, 0x04, 0x00,
  277.             0x18, 0x00, 0x70, 0x00, 0xe0, 0x00, 0xc3, 0xc0,
  278.             0xcc, 0x60, 0xd0, 0x20, 0xc0, 0x20, 0xc0, 0x40,
  279.             0x60, 0x80, 0x3f, 0x00
  280.         },{
  281.             0x03, 0xe0, 0x3c, 0x60, 0x40, 0x60, 0x00, 0x60,
  282.             0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00,
  283.             0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x10, 0x00,
  284.             0x10, 0x00, 0x10, 0x00
  285.         },{
  286.             0x0e, 0x00, 0x1b, 0x20, 0x11, 0x20, 0x10, 0x40,
  287.             0x11, 0x80, 0x0b, 0x00, 0x0e, 0x00, 0x1a, 0x00,
  288.             0x31, 0x00, 0x61, 0x00, 0x61, 0x00, 0x63, 0x00,
  289.             0x36, 0x00, 0x1c, 0x00
  290.         },{
  291.             0x0f, 0xc0, 0x10, 0x60, 0x20, 0x30, 0x40, 0x30,
  292.             0x40, 0xb0, 0x63, 0x30, 0x3c, 0x30, 0x00, 0x60,
  293.             0x00, 0xc0, 0x01, 0x80, 0x02, 0x00, 0x0c, 0x00,
  294.             0x10, 0x00, 0x40, 0x00
  295.         },{
  296.             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  297.             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  298.             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  299.             0x00, 0x00, 0x00, 0x00
  300.         }
  301.     };
  302.  
  303. unsigned char    digbits[11][128];
  304.  
  305. unsigned int    palette[16] = {    0,20,36,52,38,54,18,10,27,9,13,47,37,39,7,63 };
  306.  
  307. unsigned char    field[820];
  308.  
  309. unsigned char    hold1[256];
  310. unsigned char    hold2[256];
  311.  
  312. unsigned char    shot[4][32] = {
  313.     {
  314.         0,6,9,177,9,6,0,0,
  315.         0,0,6,174,6,0,0,0,
  316.         0,0,6,174,6,0,0,0,
  317.         0,6,9,177,9,6,0,0
  318.     },{
  319.         56,68,68,40,16,16,0,16,
  320.         0,56,56,16,0,16,0,16,
  321.         0,56,56,16,0,16,0,16,
  322.         56,68,68,40,16,16,0,16
  323.     },{
  324.         0,96,144,141,144,96,0,0,
  325.         0,0,96,117,96,0,0,0,
  326.         0,0,96,117,96,0,0,0,
  327.         0,96,144,141,144,96,0,0
  328.     },{
  329.         16,0,16,16,40,68,68,56,
  330.         16,0,16,0,16,56,56,0,
  331.         16,0,16,0,16,56,56,0,
  332.         16,0,16,16,40,68,68,56
  333.     }
  334. };
  335.  
  336. unsigned char    man[8][128] = {
  337.         {
  338.         7,128,15,192,31,192,23,192,63,192,15,0,0,0,0,0,
  339.         0,0,224,0,0,0,0,0,0,0,0,0,113,128,243,128,
  340.         0,0,0,0,0,0,0,0,0,0,0,128,15,0,9,0,
  341.         17,0,147,0,31,0,10,0,27,0,49,0,0,0,0,0,
  342.         0,0,8,0,30,0,23,0,63,128,15,0,0,0,0,0,
  343.         0,0,224,0,0,0,10,0,27,0,49,0,0,0,0,0,
  344.         0,0,8,0,30,0,23,0,63,128,15,0,0,0,0,0,
  345.         0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0
  346.     },{
  347.         7,128,15,192,31,192,23,192,63,192,15,0,0,0,0,0,
  348.         0,0,224,0,0,0,0,0,0,0,0,0,28,96,60,224,
  349.         0,0,0,0,0,0,0,0,0,0,0,128,15,0,9,0,
  350.         17,0,147,0,31,0,11,0,9,128,12,192,0,0,0,0,
  351.         0,0,8,0,30,0,23,0,63,128,15,0,0,0,0,0,
  352.         0,0,224,0,0,0,11,0,9,128,12,192,0,0,0,0,
  353.         0,0,8,0,30,0,23,0,63,128,15,0,0,0,0,0,
  354.         0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0
  355.     },{
  356.         7,128,15,192,31,192,23,192,15,192,119,0,80,0,120,64,
  357.         12,128,231,32,1,224,1,128,0,192,0,0,113,128,243,128,
  358.         0,0,0,0,0,0,0,0,0,0,0,128,7,0,1,0,
  359.         1,0,144,0,30,0,8,0,26,0,49,0,0,0,0,0,
  360.         0,0,8,0,30,0,23,0,15,128,119,0,80,0,120,64,
  361.         12,128,231,32,1,224,9,128,26,192,49,0,0,0,0,0,
  362.         0,0,8,0,30,0,23,0,15,128,7,0,0,0,0,0,
  363.         0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0
  364.     },{
  365.         7,128,15,192,31,192,23,192,15,192,119,0,80,0,120,64,
  366.         12,128,231,32,1,224,1,128,0,192,0,0,28,96,60,224,
  367.         0,0,0,0,0,0,0,0,0,0,0,128,7,0,1,0,
  368.         1,0,144,0,30,0,8,0,26,0,12,0,0,0,0,0,
  369.         0,0,8,0,30,0,23,0,15,128,119,0,80,0,120,64,
  370.         12,128,231,32,1,224,9,128,26,192,12,0,0,0,0,0,
  371.         0,0,8,0,30,0,23,0,15,128,7,0,0,0,0,0,
  372.         0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0
  373.     },{
  374.         60,0,126,0,127,0,125,0,127,128,30,0,0,0,0,0,
  375.         0,0,0,224,0,0,0,0,0,0,0,0,49,192,57,224,
  376.         0,0,0,0,0,0,0,0,0,0,32,0,30,0,18,0,
  377.         17,0,25,32,31,0,10,0,27,0,17,128,0,0,0,0,
  378.         0,0,2,0,15,0,29,0,63,128,30,0,0,0,0,0,
  379.         0,0,0,224,0,0,10,0,27,0,17,128,0,0,0,0,
  380.         0,0,2,0,15,0,29,0,63,128,30,0,0,0,0,0,
  381.         0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0
  382.     },{
  383.         60,0,126,0,127,0,125,0,127,128,30,0,0,0,0,0,
  384.         0,0,0,224,0,0,0,0,0,0,0,0,199,0,231,128,
  385.         0,0,0,0,0,0,0,0,0,0,32,0,30,0,18,0,
  386.         17,0,25,32,31,0,26,0,50,0,102,0,0,0,0,0,
  387.         0,0,2,0,15,0,29,0,63,128,30,0,0,0,0,0,
  388.         0,0,0,224,0,0,26,0,50,0,102,0,0,0,0,0,
  389.         0,0,2,0,15,0,29,0,63,128,30,0,0,0,0,0,
  390.         0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0
  391.     },{
  392.         60,0,126,0,127,0,125,0,126,0,29,192,1,64,67,192,
  393.         38,0,156,224,240,0,48,0,96,0,0,0,49,192,57,224,
  394.         0,0,0,0,0,0,0,0,0,0,32,0,28,0,16,0,
  395.         16,0,1,32,15,0,2,0,11,0,17,128,0,0,0,0,
  396.         0,0,2,0,15,0,29,0,62,0,29,192,1,64,67,192,
  397.         38,0,156,224,240,0,50,0,107,0,17,128,0,0,0,0,
  398.         0,0,2,0,15,0,29,0,62,0,28,0,0,0,0,0,
  399.         0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0
  400.     },{
  401.         60,0,126,0,127,0,125,0,126,0,29,192,1,64,67,192,
  402.         38,0,156,224,240,0,48,0,96,0,0,0,199,0,231,128,
  403.         0,0,0,0,0,0,0,0,0,0,32,0,28,0,16,0,
  404.         16,0,1,32,15,0,2,0,11,0,6,0,0,0,0,0,
  405.         0,0,2,0,15,0,29,0,62,0,29,192,1,64,67,192,
  406.         38,0,156,224,240,0,50,0,107,0,6,0,0,0,0,0,
  407.         0,0,2,0,15,0,29,0,62,0,28,0,0,0,0,0,
  408.         0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0
  409.         }
  410.        };
  411.  
  412. unsigned char    bug1[8][256] = {
  413.         {
  414.         0,0,0,0,32,192,96,192,14,0,15,8,3,188,0,92,
  415.         3,188,15,8,14,0,96,192,32,192,0,0,0,0,0,0,
  416.         0,0,0,0,0,0,14,0,49,0,62,128,127,72,255,162,
  417.         127,72,62,128,49,0,14,0,0,0,0,0,0,0,0,0,
  418.         0,0,0,0,0,0,14,0,49,0,62,128,99,72,193,160,
  419.         99,72,62,128,49,0,14,0,0,0,0,0,0,0,0,0,
  420.         0,0,0,0,0,0,0,0,14,0,15,0,3,136,0,64,
  421.         3,136,15,0,14,0,0,0,0,0,0,0,0,0,0,0
  422.     },{
  423.         0,0,3,128,7,192,3,128,2,128,49,24,50,152,6,192,
  424.         14,224,12,96,12,96,0,0,48,24,16,16,0,0,0,0,
  425.         1,0,0,0,2,128,0,0,1,0,2,128,5,64,11,160,
  426.         23,208,23,208,23,208,15,224,15,224,3,128,1,0,0,0,
  427.         0,0,0,0,2,128,0,0,1,0,2,128,5,64,11,160,
  428.         22,208,20,80,20,80,12,96,14,224,3,128,1,0,0,0,
  429.         0,0,0,0,2,128,0,0,0,0,1,0,2,128,6,192,
  430.         14,224,12,96,12,96,0,0,0,0,0,0,0,0,0,0
  431.     },{
  432.         0,0,0,0,6,8,6,12,0,224,33,224,123,128,116,0,
  433.         123,128,33,224,0,224,6,12,6,8,0,0,0,0,0,0,
  434.         0,0,0,0,0,0,0,224,1,24,2,248,37,252,139,254,
  435.         37,252,2,248,1,24,0,224,0,0,0,0,0,0,0,0,
  436.         0,0,0,0,0,0,0,224,1,24,2,248,37,140,11,6,
  437.         37,140,2,248,1,24,0,224,0,0,0,0,0,0,0,0,
  438.         0,0,0,0,0,0,0,0,0,224,1,224,35,128,4,0,
  439.         35,128,1,224,0,224,0,0,0,0,0,0,0,0,0,0
  440.     },{
  441.         0,0,16,16,48,24,0,0,12,96,12,96,14,224,6,192,
  442.         50,152,49,24,2,128,3,128,7,192,3,128,0,0,0,0,
  443.         1,0,3,128,15,224,15,224,23,208,23,208,23,208,11,160,
  444.         5,64,2,128,1,0,0,0,2,128,0,0,1,0,0,0,
  445.         1,0,3,128,14,224,12,96,20,80,20,80,22,208,11,160,
  446.         5,64,2,128,1,0,0,0,2,128,0,0,0,0,0,0,
  447.         0,0,0,0,0,0,0,0,12,96,12,96,14,224,6,192,
  448.         2,128,1,0,0,0,0,0,2,128,0,0,0,0,0,0
  449.     },{
  450.         0,0,0,128,7,0,8,0,16,0,19,224,20,16,37,128,
  451.         35,136,16,136,30,8,0,16,0,32,15,192,0,0,0,0,
  452.         0,0,0,128,7,0,8,0,16,0,19,224,20,16,37,128,
  453.         35,136,16,136,30,8,0,16,0,32,15,192,0,0,0,0,
  454.         0,0,0,128,7,0,8,0,16,0,19,224,20,16,37,128,
  455.         35,136,16,136,30,8,0,16,0,32,15,192,0,0,0,0,
  456.         0,0,0,128,7,0,8,0,16,0,19,224,20,16,37,128,
  457.         35,136,16,136,30,8,0,16,0,32,15,192,0,0,0,0
  458.     },{
  459.         0,0,0,0,0,0,0,0,7,192,8,32,19,128,16,64,
  460.         19,64,9,32,7,16,0,8,0,240,0,0,0,0,0,0,
  461.         0,0,0,0,0,0,0,0,7,192,8,32,19,128,16,64,
  462.         19,64,9,32,7,16,0,8,0,240,0,0,0,0,0,0,
  463.         0,0,0,0,0,0,0,0,7,192,8,32,19,128,16,64,
  464.         19,64,9,32,7,16,0,8,0,240,0,0,0,0,0,0,
  465.         0,0,0,0,0,0,0,0,7,192,8,32,19,128,16,64,
  466.         19,64,9,32,7,16,0,8,0,240,0,0,0,0,0,0
  467.     },{
  468.         0,0,0,0,0,0,0,0,0,64,2,160,2,144,2,80,
  469.         1,80,0,128,0,0,0,0,0,0,0,0,0,0,0,0,
  470.         0,0,0,0,0,0,0,0,0,64,2,160,2,144,2,80,
  471.         1,80,0,128,0,0,0,0,0,0,0,0,0,0,0,0,
  472.         0,0,0,0,0,0,0,0,0,64,2,160,2,144,2,80,
  473.         1,80,0,128,0,0,0,0,0,0,0,0,0,0,0,0,
  474.         0,0,0,0,0,0,0,0,0,64,2,160,2,144,2,80,
  475.         1,80,0,128,0,0,0,0,0,0,0,0,0,0,0,0
  476.     },{
  477.         0,0,0,0,0,0,0,0,0,0,0,0,2,0,5,0,
  478.         2,128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
  479.         0,0,0,0,0,0,0,0,0,0,0,0,2,0,5,0,
  480.         2,128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
  481.         0,0,0,0,0,0,0,0,0,0,0,0,2,0,5,0,
  482.         2,128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
  483.         0,0,0,0,0,0,0,0,0,0,0,0,2,0,5,0,
  484.         2,128,1,0,0,0,0,0,0,0,0,0,0,0,0,0
  485.     }
  486.     };
  487.  
  488. unsigned char    goodies[4][256] = {
  489.         {
  490.         0,0,0,0,1,128,2,64,2,64,1,128,32,4,80,10,
  491.         81,138,34,68,26,88,37,164,3,164,4,88,3,128,0,0,
  492.         0,0,0,0,1,128,2,64,2,64,1,128,32,4,112,14,
  493.         113,142,35,196,27,216,61,188,27,188,7,216,3,128,0,0,
  494.         0,0,1,128,1,128,14,112,6,96,25,152,35,196,83,202,
  495.         95,250,122,94,126,126,127,254,63,252,31,248,7,192,0,0,
  496.         0,0,0,0,1,128,3,192,3,192,1,128,32,4,80,10,
  497.         81,138,34,68,26,88,37,164,3,164,4,88,3,128,0,0
  498.     },{
  499.         0,0,1,128,0,64,0,32,0,64,0,128,0,0,4,32,
  500.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0,
  501.         0,0,1,128,3,192,4,224,2,192,1,128,0,0,4,32,
  502.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0,
  503.         0,0,1,128,3,192,4,224,2,192,1,128,6,96,15,176,
  504.         24,56,16,24,16,24,16,24,24,24,12,32,7,224,0,0,
  505.         0,0,1,128,0,64,0,32,0,64,0,128,0,0,4,32,
  506.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0
  507.     },{
  508.         0,0,1,128,0,64,0,32,0,64,0,128,0,0,4,32,
  509.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0,
  510.         0,0,1,128,3,192,4,224,2,192,1,128,0,0,4,32,
  511.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0,
  512.         0,0,1,128,0,64,0,32,0,64,0,128,6,96,15,176,
  513.         24,56,16,24,16,24,16,24,24,24,12,32,7,224,0,0,
  514.         0,0,1,128,0,64,0,32,0,64,0,128,0,0,4,32,
  515.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0
  516.     },{
  517.         0,0,1,128,0,64,0,32,0,64,0,128,0,0,4,32,
  518.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0,
  519.         0,0,1,128,0,64,0,32,0,64,0,128,0,0,4,32,
  520.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0,
  521.         0,0,1,128,0,64,0,32,0,64,0,128,6,96,15,176,
  522.         24,56,16,24,16,24,16,24,24,24,12,32,7,224,0,0,
  523.         0,0,1,128,3,192,4,224,2,192,1,128,0,0,4,32,
  524.         0,16,0,8,0,8,0,8,0,8,0,0,0,0,0,0
  525.         }
  526.     };
  527.  
  528. unsigned char    pits[256] = {
  529.         0,0,0,0,0,0,0,0,0,0,0,0,64,2,0,0,
  530.         64,2,0,0,96,6,0,0,112,14,0,0,124,62,0,0,
  531.         0,0,0,0,0,0,0,0,128,1,192,3,192,3,192,3,
  532.         192,3,224,7,224,7,248,31,240,15,254,127,252,63,255,255,
  533.         0,0,0,0,0,0,0,0,0,0,0,0,64,2,0,0,
  534.         64,2,0,0,96,6,0,0,112,14,0,0,124,62,0,0,
  535.         0,0,0,0,0,0,0,0,0,0,0,0,64,2,0,0,
  536.         64,2,0,0,96,6,0,0,112,14,0,0,124,62,0,0,
  537.  
  538. /*        {
  539.         248,0,248,0,248,0,254,0,255,128,255,224,255,248,243,254,
  540.         242,127,255,255,242,79,242,79,255,255,255,255,255,255,255,255,
  541.         168,0,168,0,168,0,174,0,179,128,188,224,191,56,191,206,
  542.         191,243,191,253,191,253,191,253,191,253,191,253,128,1,255,255,
  543.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  544.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  545.         80,0,80,0,80,0,80,0,76,0,67,0,80,192,64,48,
  546.         64,12,82,66,64,2,64,2,82,74,64,2,127,254,0,0
  547.     },{
  548.         248,0,248,0,248,0,248,0,248,0,248,0,248,0,248,0,
  549.         248,0,248,0,248,0,248,0,248,0,248,0,248,0,248,0,
  550.         168,0,168,0,168,0,168,0,168,0,168,0,168,0,168,0,
  551.         168,0,168,0,168,0,168,0,168,0,168,0,168,0,168,0,
  552.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  553.         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  554.         80,0,80,0,80,0,80,0,80,0,80,0,80,0,80,0,
  555.         80,0,80,0,80,0,80,0,80,0,80,0,80,0,80,0
  556.     }
  557. */
  558.     };
  559.  
  560. int    pattcolors[MAXWALLS][2] = {
  561.         4, 6,
  562.         2, 8,
  563.         3, 7,
  564.         4, 9,
  565.         6, 1,
  566.         12, 15,
  567.         15, 5,
  568.         10, 2,
  569.         5, 12,
  570.         13, 7
  571.     };
  572.  
  573. int    colors[MAXCOLOR] = {
  574.         10,6,10,4,6
  575.     };
  576.  
  577. struct    bugtype    {
  578.         int    x;
  579.         int    y;
  580.         int    dir;
  581.         int    kind;
  582.         int    lost;
  583.     } bugs[MAXBUGS];
  584.  
  585. struct    mantype {
  586.         int    x;
  587.         int    y;
  588.         int    dir;
  589.         int    key;
  590.     } mans;
  591.  
  592. struct    shottype {
  593.         int    x;
  594.         int    y;
  595.         int    dir;
  596.     } shots;
  597.  
  598. int    newmandir = -1;
  599.  
  600. char    newwall[128];
  601.  
  602. char    wallpatt[64] = {
  603.         0x04, 0x04, 0x19, 0xf4, 0xf6, 0x0b, 0x08, 0x08,
  604.         0xc8, 0x0b, 0x24, 0x14, 0x13, 0xe8, 0x10, 0x08,
  605.         0x13, 0xc8, 0x2c, 0x24, 0xd0, 0x13, 0x10, 0x18,
  606.         0x90, 0x17, 0x6c, 0x28, 0x12, 0x28, 0x09, 0xc4,
  607.  
  608.         0xf8, 0x03, 0xe0, 0x03, 0x01, 0xf0, 0x07, 0xf0,
  609.         0x07, 0xf0, 0xc3, 0xe3, 0xe0, 0x07, 0xe0, 0x07,
  610.         0xe0, 0x07, 0xc3, 0xc3, 0x0f, 0xe0, 0x0f, 0xe0,
  611.         0x0f, 0xe0, 0x83, 0xc7, 0xe1, 0xc7, 0xf0, 0x03
  612. /*
  613.         1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  614.         1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
  615.         1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,
  616.         1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,
  617.         1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,
  618.         1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,
  619.         1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,
  620.         1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
  621.         1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  622.         0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,
  623.         1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,
  624.         0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
  625.         1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,
  626.         0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
  627.         1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,
  628.         0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0
  629. */
  630.     };
  631.  
  632. int    curwall = 0;
  633. unsigned char    walls[MAXWALLS][90] = {        /* 0 */
  634.       {
  635.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  636.         0x80, 0x40, 0x08, 0x00, 0x02, 
  637.         0xaa, 0x0f, 0xe8, 0x38, 0x42, 
  638.         0xaf, 0x48, 0x2b, 0x0b, 0xca, 
  639.         0xa1, 0x6c, 0x21, 0x08, 0x0a, 
  640.         0xa4, 0x06, 0x2f, 0x28, 0xfa, 
  641.         0xa5, 0xf3, 0x68, 0x20, 0x02, 
  642.         0x84, 0x51, 0xc3, 0x2f, 0x82, 
  643.         0xbf, 0x10, 0x02, 0x20, 0x12, 
  644.         0x82, 0x3b, 0x4a, 0xf8, 0x90, 
  645.         0xfa, 0x8e, 0x4a, 0x18, 0x92, 
  646.         0x80, 0xeb, 0xc8, 0x08, 0x82, 
  647.         0xbf, 0x8b, 0x0f, 0xd8, 0x02, 
  648.         0x91, 0x28, 0x20, 0x1b, 0xe2, 
  649.         0x94, 0x03, 0xee, 0x00, 0x02, 
  650.         0xbd, 0x6f, 0x63, 0x9e, 0x22, 
  651.         0x81, 0x00, 0x08, 0x00, 0x02, 
  652.         0xff, 0xff, 0xff, 0xff, 0xfe
  653.        },{                    /* 1 */
  654.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  655.         0x8e, 0xf0, 0x00, 0x1e, 0xe2, 
  656.         0xe8, 0x35, 0x55, 0x50, 0x02, 
  657.         0x8e, 0xf5, 0x45, 0x57, 0xe2, 
  658.         0x80, 0x15, 0x01, 0x57, 0x22, 
  659.         0x80, 0x04, 0x00, 0x56, 0x22, 
  660.         0x8f, 0xf5, 0xff, 0x54, 0x22, 
  661.         0x81, 0x10, 0x00, 0x16, 0x26, 
  662.         0x88, 0x10, 0xdf, 0x9f, 0x20, 
  663.         0x89, 0xf0, 0xfd, 0x90, 0x26, 
  664.         0xc8, 0xd0, 0x00, 0x11, 0x02, 
  665.         0x08, 0x55, 0xff, 0x5f, 0xe2, 
  666.         0xc8, 0xd4, 0x00, 0x40, 0x02, 
  667.         0x89, 0xd5, 0x01, 0x50, 0x02, 
  668.         0x8f, 0xd5, 0x45, 0x5e, 0xe2, 
  669.         0x80, 0x15, 0x55, 0x58, 0x2e, 
  670.         0x8e, 0xf0, 0x00, 0x1e, 0xe2, 
  671.         0xff, 0xff, 0xff, 0xff, 0xfe
  672.        },{                    /* 2 */
  673.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  674.         0xf7, 0xff, 0xff, 0x03, 0x02, 
  675.         0xc0, 0x00, 0x01, 0x7a, 0x02, 
  676.         0xc0, 0x00, 0x01, 0x0b, 0x02, 
  677.         0xc0, 0x00, 0x01, 0xe8, 0x02, 
  678.         0xc0, 0x00, 0x01, 0x0b, 0x82, 
  679.         0xc0, 0x00, 0x01, 0x48, 0xba, 
  680.         0xc0, 0x03, 0x79, 0x7e, 0xa2, 
  681.         0x17, 0xff, 0xfb, 0x02, 0xbe, 
  682.         0xd7, 0xff, 0xf8, 0x3a, 0x20, 
  683.         0xc0, 0x03, 0x7b, 0x0a, 0xae, 
  684.         0xc0, 0x00, 0x01, 0xe8, 0xaa, 
  685.         0xc0, 0x00, 0x01, 0x0f, 0xaa, 
  686.         0xc0, 0x00, 0x01, 0x78, 0xa2, 
  687.         0xc0, 0x00, 0x01, 0x2a, 0x8a, 
  688.         0xc0, 0x00, 0x01, 0x8a, 0xaa, 
  689.         0xf7, 0xff, 0xff, 0x22, 0x2a, 
  690.         0xff, 0xff, 0xff, 0xff, 0xfe
  691.        },{                    /* 3 */
  692.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  693.         0x80, 0x38, 0x88, 0x8f, 0xbe, 
  694.         0x80, 0x0a, 0x22, 0x24, 0x00, 
  695.         0x8e, 0x28, 0x88, 0x8c, 0x42, 
  696.         0x8c, 0x3a, 0x22, 0x24, 0x02, 
  697.         0x88, 0x20, 0x88, 0x0c, 0x42, 
  698.         0x8c, 0x3e, 0xff, 0x7d, 0x12, 
  699.         0x8e, 0x20, 0x02, 0x44, 0x46, 
  700.         0x8a, 0x20, 0x03, 0x11, 0x12, 
  701.         0x08, 0x27, 0xfa, 0x44, 0x46, 
  702.         0xfe, 0x20, 0x03, 0x11, 0x12, 
  703.         0x80, 0x20, 0x02, 0x44, 0x46, 
  704.         0x80, 0x37, 0xbf, 0x11, 0x12, 
  705.         0x8f, 0xe1, 0x82, 0x44, 0x46, 
  706.         0x8f, 0xe1, 0x8b, 0x11, 0x12, 
  707.         0x80, 0x00, 0xa6, 0x44, 0x46, 
  708.         0x80, 0x01, 0x93, 0x11, 0x12, 
  709.         0xff, 0xff, 0xff, 0xff, 0xfe
  710.        },{                    /* 4 */
  711.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  712.         0xe0, 0x10, 0x04, 0x00, 0x42, 
  713.         0x39, 0xff, 0x15, 0x01, 0x12, 
  714.         0x89, 0x6d, 0xb5, 0xff, 0xf2, 
  715.         0x89, 0x01, 0xf5, 0x00, 0x02, 
  716.         0x89, 0x01, 0xf5, 0xb2, 0x4a, 
  717.         0x8b, 0xef, 0xb5, 0xf0, 0x02, 
  718.         0x89, 0x01, 0x11, 0xf0, 0x6e, 
  719.         0x89, 0x39, 0x1f, 0xff, 0xfe, 
  720.         0x89, 0x01, 0x1b, 0xfd, 0xc0, 
  721.         0x89, 0x6d, 0x01, 0xb0, 0x4e, 
  722.         0x8d, 0xff, 0x09, 0x00, 0x42, 
  723.         0x81, 0x80, 0x09, 0x00, 0x7a, 
  724.         0xf8, 0x80, 0x09, 0x00, 0x4a, 
  725.         0x89, 0xec, 0x09, 0x08, 0x4a, 
  726.         0xb9, 0xff, 0xff, 0x08, 0x0a, 
  727.         0x80, 0x00, 0x00, 0x08, 0x02, 
  728.         0xff, 0xff, 0xff, 0xff, 0xfe
  729.        },{                    /* 5 */
  730.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  731.         0x80, 0x00, 0x00, 0x0d, 0x82, 
  732.         0x80, 0x00, 0x01, 0x08, 0x92, 
  733.         0xbf, 0xfb, 0xe1, 0x00, 0x12, 
  734.         0xb6, 0x0a, 0x3f, 0x00, 0x12, 
  735.         0xa2, 0x8a, 0x00, 0x20, 0x12, 
  736.         0xa2, 0x80, 0x00, 0x3f, 0xf2, 
  737.         0x80, 0xbf, 0xff, 0xe6, 0xc2, 
  738.         0x88, 0x97, 0xfd, 0xa0, 0x02, 
  739.         0x08, 0x82, 0x08, 0x20, 0x02, 
  740.         0x88, 0xb2, 0x09, 0xa3, 0xce, 
  741.         0x88, 0x92, 0x09, 0x22, 0x00, 
  742.         0x9c, 0x93, 0xb9, 0x20, 0x8e, 
  743.         0x80, 0x93, 0xf9, 0x2f, 0x82, 
  744.         0x9c, 0x87, 0xbc, 0x28, 0x92, 
  745.         0x94, 0x80, 0x00, 0x20, 0x82, 
  746.         0x80, 0x80, 0x00, 0x2d, 0x82, 
  747.         0xff, 0xff, 0xff, 0xff, 0xfe
  748.        },{                    /* 6 */
  749.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  750.         0x88, 0x01, 0xc0, 0x00, 0x0a, 
  751.         0x88, 0x00, 0x00, 0x03, 0x1a, 
  752.         0x80, 0x01, 0xf0, 0x00, 0x32, 
  753.         0x83, 0x71, 0xff, 0x18, 0x66, 
  754.         0xbb, 0xf1, 0xff, 0xf8, 0xc6, 
  755.         0xa2, 0x11, 0xbf, 0x09, 0x92, 
  756.         0xba, 0x10, 0x01, 0x08, 0x36, 
  757.         0x82, 0x10, 0x01, 0x09, 0xf6, 
  758.         0x03, 0xd0, 0xe1, 0x78, 0x00, 
  759.         0x82, 0x00, 0xe0, 0x08, 0x36, 
  760.         0x82, 0x00, 0xc0, 0x09, 0xa2, 
  761.         0x93, 0xf0, 0xe1, 0xf9, 0x32, 
  762.         0x9e, 0x18, 0xff, 0x0f, 0x12, 
  763.         0x84, 0x0c, 0x06, 0x04, 0x1a, 
  764.         0x86, 0x07, 0x1c, 0x0c, 0xca, 
  765.         0x80, 0xe1, 0xb0, 0xe0, 0x02, 
  766.         0xff, 0xff, 0xff, 0xff, 0xfe
  767.        },{                    /* 7 */
  768.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  769.         0x82, 0x00, 0x20, 0x00, 0x06, 
  770.         0xa2, 0x9b, 0x60, 0x00, 0x06, 
  771.         0xa2, 0x9f, 0x24, 0x46, 0xc6, 
  772.         0xa2, 0x00, 0x20, 0x04, 0x42, 
  773.         0xa2, 0xf5, 0x21, 0x16, 0xc6, 
  774.         0xa6, 0xbd, 0x20, 0x00, 0x06, 
  775.         0xb2, 0x84, 0x34, 0x4f, 0xfe, 
  776.         0xb2, 0xf5, 0x30, 0x08, 0x00, 
  777.         0x20, 0xc5, 0x11, 0x18, 0x00, 
  778.         0xb2, 0xf1, 0x30, 0x0b, 0xfe, 
  779.         0xb2, 0x01, 0x34, 0x40, 0x06, 
  780.         0xa6, 0xff, 0x00, 0x06, 0xc6, 
  781.         0xa2, 0x00, 0x21, 0x14, 0x42, 
  782.         0xa2, 0xdf, 0x20, 0x06, 0xc6, 
  783.         0xa2, 0x5b, 0x64, 0x40, 0x06, 
  784.         0x82, 0x00, 0x20, 0x00, 0x06, 
  785.         0xff, 0xff, 0xff, 0xff, 0xfe
  786.        },{                    /* 8 */
  787.         0xff, 0xff, 0xff, 0xff, 0xfe, 
  788.         0xc4, 0x50, 0x40, 0x28, 0x02, 
  789.         0x91, 0x17, 0x40, 0x00, 0x02, 
  790.         0xbf, 0xb1, 0x40, 0x00, 0x02, 
  791.         0x91, 0x15, 0x40, 0x00, 0x02, 
  792.         0xd0, 0x55, 0x40, 0x00, 0x02, 
  793.         0x91, 0xd0, 0x00, 0x00, 0x02, 
  794.         0xb1, 0x15, 0x40, 0x02, 0x82, 
  795.         0x9b, 0xf5, 0x7f, 0xff, 0xfe, 
  796.         0x00, 0x11, 0x40, 0x01, 0x48, 
  797.         0xbb, 0xd7, 0x44, 0x04, 0x02, 
  798.         0x91, 0x10, 0x44, 0x05, 0x56, 
  799.         0xd1, 0x07, 0xc4, 0x05, 0xf2, 
  800.         0x90, 0x10, 0x0e, 0xac, 0x1a, 
  801.         0xb1, 0x17, 0xff, 0xfd, 0xd2, 
  802.         0x9f, 0x15, 0x55, 0x55, 0x56, 
  803.         0xc0, 0x10, 0x00, 0x00, 0x02, 
  804.         0xff, 0xff, 0xff, 0xff, 0xfe
  805.        },{                    /* 9 */
  806.         0xff,0xff,0xff,0xff,0xfe,
  807.         0x80,0x00,0x00,0x00,0x02,
  808.         0x80,0x00,0x00,0x00,0x02,
  809.         0x80,0x00,0x00,0x00,0x02,
  810.         0x80,0x00,0x00,0x00,0x02,
  811.         0x80,0x00,0x00,0x00,0x02,
  812.         0x80,0x00,0x00,0x00,0x02,
  813.         0x80,0x00,0x00,0x00,0x02,
  814.         0x80,0x00,0x00,0x00,0x02,
  815.         0x00,0x00,0x00,0x00,0x00,
  816.         0x80,0x00,0x00,0x00,0x02,
  817.         0x80,0x00,0x00,0x00,0x02,
  818.         0x80,0x00,0x00,0x00,0x02,
  819.         0x80,0x00,0x00,0x00,0x02,
  820.         0x80,0x00,0x00,0x00,0x02,
  821.         0x80,0x00,0x00,0x00,0x02,
  822.         0x80,0x00,0x00,0x00,0x02,
  823.         0xff,0xff,0xff,0xff,0xfe
  824.        }
  825.     };
  826.  
  827. int    values[4] = { 100, 10, 5, 1 };
  828.  
  829. struct    goodtype {
  830.     int    x;
  831.     int    y;
  832.     int    item;
  833.     } treasure[MAXWALLS][MAXOBJECTS] = {
  834.         {
  835.         0x06, 0x03, 0x60,
  836.         0x0a, 0x03, 0x21,
  837.         0x11, 0x05, 0x30,
  838.         0x15, 0x05, 0x41,
  839.         0x16, 0x05, 0x43,
  840.         0x17, 0x05, 0x42,
  841.         0x11, 0x07, 0x15,
  842.         0x0b, 0x08, 0x40,
  843.         0x0e, 0x0a, 0x43,
  844.         0x27, 0x0a, 0x70,
  845.         0x10, 0x0b, 0x40,
  846.         0x0e, 0x0c, 0x41,
  847.         0x1c, 0x0c, 0x25,
  848.         0x05, 0x0f, 0x40,
  849.         0x09, 0x10, 0x27,
  850.         0x11, 0x10, 0x14
  851.     },{
  852.         0x02, 0x02, 0x41,
  853.         0x08, 0x02, 0x14,
  854.         0x20, 0x02, 0x14,
  855.         0x26, 0x02, 0x41,
  856.         0x14, 0x05, 0x40,
  857.         0x0c, 0x06, 0x70,
  858.         0x1f, 0x07, 0x21,
  859.         0x0b, 0x08, 0x40,    /* 1 */
  860.         0x1d, 0x08, 0x60,
  861.         0x13, 0x09, 0x23,
  862.         0x26, 0x09, 0x70,
  863.         0x17, 0x0a, 0x27,
  864.         0x0b, 0x0b, 0x60,
  865.         0x13, 0x0b, 0x60,
  866.         0x01, 0x0c, 0x30,
  867.         0x09, 0x0c, 0x25,
  868.         0x1c, 0x0d, 0x70,
  869.         0x14, 0x0e, 0x40,
  870.         0x02, 0x11, 0x41,
  871.         0x08, 0x11, 0x15,
  872.         0x20, 0x11, 0x15
  873.     },{
  874.         0x05, 0x02, 0x14,
  875.         0x20, 0x03, 0x21,
  876.         0x0c, 0x04, 0x60,
  877.         0x1f, 0x05, 0x70,
  878.         0x1b, 0x07, 0x60,
  879.         0x20, 0x07, 0x60,    /* 2 */
  880.         0x22, 0x07, 0x70,
  881.         0x11, 0x08, 0x15,
  882.         0x24, 0x08, 0x80,
  883.         0x01, 0x09, 0x30,
  884.         0x05, 0x09, 0x23,
  885.         0x05, 0x0a, 0x27,
  886.         0x17, 0x0a, 0x70,
  887.         0x18, 0x0a, 0x70,
  888.         0x21, 0x0a, 0x25,
  889.         0x27, 0x0a, 0x70,
  890.         0x11, 0x0b, 0x14,
  891.         0x20, 0x0c, 0x40,
  892.         0x0c, 0x0f, 0x60,
  893.         0x1c, 0x0f, 0x60,
  894.         0x23, 0x0f, 0x70,
  895.         0x05, 0x11, 0x15,
  896.         0x19, 0x11, 0x60
  897.     },{
  898.         0x14, 0x02, 0x42,
  899.         0x22, 0x02, 0x27,
  900.         0x27, 0x03, 0x70,
  901.         0x0c, 0x04, 0x60,
  902.         0x06, 0x06, 0x21,
  903.         0x0c, 0x06, 0x41,
  904.         0x19, 0x07, 0x70,    /* 3 */
  905.         0x06, 0x09, 0x60,
  906.         0x26, 0x09, 0x40,
  907.         0x01, 0x0a, 0x30,
  908.         0x18, 0x0a, 0x40,
  909.         0x26, 0x0b, 0x40,
  910.         0x18, 0x0c, 0x40,
  911.         0x0d, 0x0d, 0x70,
  912.         0x26, 0x0d, 0x40,
  913.         0x18, 0x0e, 0x40,
  914.         0x26, 0x0f, 0x40,
  915.         0x10, 0x10, 0x25,
  916.         0x18, 0x10, 0x40,
  917.         0x16, 0x11, 0x60
  918.     },{                /* 4 */
  919.         0x04, 0x02, 0x41,
  920.         0x0b, 0x02, 0x60,
  921.         0x01, 0x03, 0x30,
  922.         0x17, 0x03, 0x70,
  923.         0x09, 0x04, 0x42,
  924.         0x0c, 0x04, 0x14,
  925.         0x0f, 0x04, 0x40,
  926.         0x12, 0x04, 0x15,
  927.         0x1a, 0x06, 0x15,
  928.         0x12, 0x07, 0x14,
  929.         0x1f, 0x08, 0x40,
  930.         0x24, 0x08, 0x23,
  931.         0x16, 0x0a, 0x27,
  932.         0x1f, 0x0a, 0x27,
  933.         0x27, 0x0a, 0x70,
  934.         0x09, 0x0b, 0x60,
  935.         0x0c, 0x0b, 0x23,
  936.         0x0f, 0x0b, 0x80,
  937.         0x1a, 0x0b, 0x14,
  938.         0x08, 0x0e, 0x25,
  939.         0x16, 0x0e, 0x40,
  940.         0x17, 0x0e, 0x40,
  941.         0x23, 0x0e, 0x41,
  942.         0x04, 0x0f, 0x60,
  943.         0x0c, 0x0f, 0x15,
  944.         0x14, 0x0f, 0x60,
  945.         0x16, 0x0f, 0x40,
  946.         0x17, 0x0f, 0x40,
  947.         0x08, 0x11, 0x70,
  948.         0x25, 0x11, 0x70,
  949.         0x08, 0x11, 0x70,
  950.         0x25, 0x11, 0x70
  951.     },{                /* 5 */
  952.         0x1f, 0x02, 0x14,
  953.         0x14, 0x04, 0x43,
  954.         0x05, 0x05, 0x27,
  955.         0x0a, 0x08, 0x70,
  956.         0x1c, 0x08, 0x42,
  957.         0x20, 0x08, 0x27,
  958.         0x0d, 0x09, 0x27,
  959.         0x17, 0x09, 0x27,
  960.         0x1a, 0x09, 0x60,
  961.         0x01, 0x0a, 0x30,
  962.         0x10, 0x0a, 0x40,
  963.         0x11, 0x0a, 0x40,
  964.         0x12, 0x0a, 0x40,
  965.         0x13, 0x0a, 0x40,
  966.         0x14, 0x0a, 0x40,
  967.         0x10, 0x0b, 0x40,
  968.         0x11, 0x0b, 0x40,
  969.         0x12, 0x0b, 0x40,
  970.         0x13, 0x0b, 0x40,
  971.         0x14, 0x0b, 0x40,
  972.         0x10, 0x0c, 0x40,
  973.         0x11, 0x0c, 0x40,
  974.         0x12, 0x0c, 0x40,
  975.         0x13, 0x0c, 0x40,
  976.         0x14, 0x0c, 0x40,
  977.         0x26, 0x0c, 0x70,
  978.         0x12, 0x0d, 0x15,
  979.         0x04, 0x0e, 0x41,
  980.         0x05, 0x0e, 0x42,
  981.         0x06, 0x0e, 0x43,
  982.         0x0e, 0x0e, 0x41,
  983.         0x12, 0x0f, 0x14,
  984.         0x05, 0x10, 0x60,
  985.         0x24, 0x10, 0x41,
  986.         0x1f, 0x11, 0x15
  987.     },{                /* 6 */
  988.         0x26, 0x02, 0x42,
  989.         0x11, 0x03, 0x70,
  990.         0x09, 0x05, 0x23,
  991.         0x1a, 0x05, 0x23,
  992.         0x04, 0x07, 0x41,
  993.         0x12, 0x07, 0x14,
  994.         0x26, 0x07, 0x25,
  995.         0x09, 0x08, 0x40,
  996.         0x1b, 0x08, 0x60,
  997.         0x01, 0x0a, 0x30,
  998.         0x26, 0x0a, 0x70,
  999.         0x27, 0x0a, 0x70,
  1000.         0x08, 0x0c, 0x41,
  1001.         0x13, 0x0c, 0x21,
  1002.         0x05, 0x0d, 0x42,
  1003.         0x17, 0x0d, 0x41,
  1004.         0x15, 0x0f, 0x41,
  1005.         0x1d, 0x0f, 0x41,
  1006.         0x0f, 0x11, 0x60,
  1007.         0x12, 0x11, 0x15,
  1008.         0x15, 0x11, 0x60
  1009.     },{                /* 7 */
  1010.         0x0e, 0x03, 0x15,
  1011.         0x18, 0x04, 0x40,
  1012.         0x1f, 0x05, 0x60,
  1013.         0x21, 0x05, 0x43,
  1014.         0x26, 0x05, 0x25,
  1015.         0x0d, 0x06, 0x40,
  1016.         0x1a, 0x06, 0x40,
  1017.         0x0a, 0x07, 0x60,
  1018.         0x18, 0x08, 0x40,
  1019.         0x01, 0x0a, 0x30,
  1020.         0x04, 0x0a, 0x21,
  1021.         0x0b, 0x0a, 0x40,
  1022.         0x13, 0x0a, 0x25,
  1023.         0x1a, 0x0a, 0x40,
  1024.         0x1e, 0x0b, 0x70,
  1025.         0x0f, 0x0c, 0x42,
  1026.         0x18, 0x0c, 0x40,
  1027.         0x13, 0x0d, 0x70,
  1028.         0x1a, 0x0e, 0x40,
  1029.         0x1f, 0x0e, 0x43,
  1030.         0x21, 0x0e, 0x43,
  1031.         0x26, 0x0e, 0x25,
  1032.         0x0e, 0x10, 0x14,
  1033.         0x18, 0x10, 0x40,
  1034.         0x18, 0x10, 0x40
  1035.     },{                /* 8 */
  1036.         0x1c, 0x02, 0x27,
  1037.         0x1e, 0x05, 0x80,
  1038.         0x08, 0x06, 0x25,
  1039.         0x09, 0x06, 0x41,
  1040.         0x12, 0x07, 0x70,
  1041.         0x09, 0x08, 0x60,
  1042.         0x20, 0x08, 0x23,
  1043.         0x01, 0x0a, 0x30,
  1044.         0x27, 0x0a, 0x70,
  1045.         0x1a, 0x0b, 0x60,
  1046.         0x0c, 0x0d, 0x70,
  1047.         0x08, 0x0e, 0x21,
  1048.         0x18, 0x0e, 0x23,
  1049.         0x1a, 0x0e, 0x23,
  1050.         0x1c, 0x0e, 0x23,
  1051.         0x06, 0x0f, 0x60,
  1052.         0x19, 0x10, 0x27,
  1053.         0x1b, 0x10, 0x27,
  1054.         0x1d, 0x10, 0x27,
  1055.         0x08, 0x11, 0x40,
  1056.     },{
  1057.         0x01, 0x0a, 0x30,
  1058.         0x20, 0x0a, 0x25
  1059.     }
  1060.     };
  1061.  
  1062. unsigned char    tagboost[128] = {
  1063.         255,255,248,31,248,31,248,31,248,31,128,1,128,1,128,1,
  1064.         128,1,128,1,128,1,248,31,248,31,248,31,248,31,255,255,
  1065.         255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  1066.         255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  1067.         255,255,248,31,248,31,248,31,248,31,128,1,128,1,128,1,
  1068.         128,1,128,1,128,1,248,31,248,31,248,31,248,31,255,255,
  1069.         255,255,255,255,252,63,252,63,252,63,252,63,192,3,192,3,
  1070.         192,3,192,3,252,63,252,63,252,63,252,63,255,255,255,255
  1071.     };
  1072.  
  1073. extern    int    timepass;
  1074.  
  1075. /****************************************************************
  1076.  * ELSE ELSE ELSE ELSE ELSE ELSE ELSE ELSE ELSE ELSE        *
  1077.  ****************************************************************/
  1078.  
  1079. #else
  1080.  
  1081. extern    struct    hightype {
  1082.     long    score;
  1083.     char    name[12];
  1084.     } highlist[64];
  1085.  
  1086. extern    int    beep_dead[];
  1087. extern    int    tagcount;
  1088. extern    int    tagflg;
  1089. extern    int    curscreen;
  1090. extern    int    dead;
  1091. extern    int    beep_lock[];
  1092. extern    int    beep_tag[];
  1093. extern    int    beep_click[];
  1094. extern    int    beep_goodies[];
  1095. extern    int    beep_kill[];
  1096. extern    int    beep_teleport[];
  1097. extern    struct    pltype {
  1098.         int    x;
  1099.         int    y;
  1100.         } pitlist[MAXPITS];
  1101. extern    int    okbugmake;
  1102. extern    int    bugmaketime;
  1103. extern    long    score;
  1104. extern    int    score_color;
  1105. extern    int    scorex;
  1106. extern    int    scorey;
  1107. extern    int    scoreflg;
  1108. extern    char    scorebuf[];
  1109. extern    int    scoreptr;
  1110. extern    long    highscore;
  1111. extern    long    sscore;
  1112. extern    long    points;
  1113. extern    int    point_color;
  1114. extern    int    pointx;
  1115. extern    int    pointflg;
  1116. extern    char    pointbuf[];
  1117. extern    int    pointptr;
  1118. extern    unsigned char    keys[128];
  1119. extern    unsigned char    keylock[128];
  1120. extern    unsigned char    teleport[128];
  1121. extern    unsigned char    bang[4][128];
  1122. extern    unsigned char    digits[11][28];
  1123. extern    unsigned char    digbits[11][128];
  1124. extern    unsigned int    palette[16];
  1125. extern    unsigned char    field[820];
  1126. extern    unsigned char    hold1[256];
  1127. extern    unsigned char    hold2[256];
  1128. extern    unsigned char    shot[4][32];
  1129. extern    unsigned char    man[8][128];
  1130. extern    unsigned char    bug1[8][256];
  1131. extern    unsigned char    goodies[4][256];
  1132. extern    unsigned char    pits[128];
  1133. extern    int    pattcolors[MAXWALLS][2];
  1134. extern    int    colors[MAXCOLOR];
  1135. extern    struct    bugtype    {
  1136.             int    x;
  1137.             int    y;
  1138.             int    dir;
  1139.             int    kind;
  1140.             int    lost;
  1141.         } bugs[MAXBUGS];
  1142. extern    struct    mantype {
  1143.             int    x;
  1144.             int    y;
  1145.             int    dir;
  1146.             int    key;
  1147.         } mans;
  1148. extern    struct    shottype {
  1149.             int    x;
  1150.             int    y;
  1151.             int    dir;
  1152.         } shots;
  1153. extern    int    newmandir;
  1154. extern    char    newwall[128];
  1155. extern    char    wallpatt[];
  1156. extern    int    curwall;
  1157. extern    unsigned char    walls[MAXWALLS][90];
  1158. extern    int    values[4];
  1159. extern    struct    goodtype {
  1160.         int    x;
  1161.         int    y;
  1162.         int    item;
  1163.         } treasure[MAXWALLS][MAXOBJECTS];
  1164. extern    int    timepass;
  1165. extern    unsigned char    tagboost[];
  1166.  
  1167. /************************************************************************
  1168.  * ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF     *
  1169.  ************************************************************************/
  1170.  
  1171. #endif
  1172.  
  1173. /************************************************************************
  1174.  * Function type declarations                        *
  1175.  ************************************************************************/
  1176.  
  1177. void    init(), uninit(), init_screen(), box(), setpalette(), choose_palette();
  1178. void    choose_colors(), show_bug(), move_bug(), move_man(), convert();
  1179. void    show_man(), build_wall(), show_shot(), move_shot(), fire();
  1180. void    show_score(), disp_field(), flip(), reverse(), rotate(), make_bug();
  1181. void    bang_bug(), edit_walls(), next_screen(), clear_bottom(), pause();
  1182. void    check_new_high(), welcome();
  1183.  
  1184.