home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 486.lha / Hi-Low_v1.0 / src / hilow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  5.0 KB  |  175 lines

  1.  
  2.  
  3. /*
  4.  *
  5.  * Module    : hilow.h
  6.  *
  7.  * Description    : Header file for hilow game.
  8.  *
  9.  * Author    : Simon J Raybould.    (sie@fulcrum.bt.co.uk)
  10.  *
  11.  * Date        :  9th September 1990.
  12.  *
  13.  */
  14.  
  15. #include "gadgets.h"
  16.  
  17. struct IntuitionBase *IntuitionBase = NULL;
  18. struct GfxBase *GfxBase = NULL;
  19. struct Screen *Screen = NULL;
  20. struct Window *Window = NULL;
  21. struct RastPort *RPort = NULL;
  22.  
  23. struct NewScreen NewScreen = {
  24.     0, 0, 320, 256, 5, 1, 0, 0, CUSTOMSCREEN, NULL,
  25.     "Hi-Low By S.J.Raybould  1990", NULL, NULL
  26. };
  27.  
  28. struct NewWindow NewWindow = {
  29.     0, 0, 320, 256, 0, 1, GADGETUP,
  30.     ACTIVATE|BORDERLESS, &HiGadg, NULL, "",
  31.     NULL, NULL, 0, 0, 320, 200, CUSTOMSCREEN
  32. };
  33.  
  34. /*
  35.  *    Data for sig.
  36.  */
  37.  
  38. #define SIGPPICK    0x01
  39. #define SIGPONOFF    0x00
  40. #define SIGX        0
  41. #define SIGY        186
  42. #define DRAWSIG        DrawImage(RPort, &SigImage, SIGX, SIGY)
  43.  
  44. USHORT __chip SigDataPtr[] = {
  45.     0x01f8, 0x067f, 0xf000, 0x0204, 0x1f8c, 0x1800, 0x0c00, 0x2c18, 
  46.     0x3000, 0x0c00, 0x0c18, 0x6000, 0x1c00, 0x183f, 0x8000, 0x0e00, 
  47.     0x1836, 0x0000, 0x0700, 0x3066, 0x0000, 0x01c0, 0x3063, 0x0000, 
  48.     0x01c0, 0x60c3, 0x0000, 0x00c0, 0x6181, 0x8000, 0x0180, 0xc201, 
  49.     0x9000, 0x8301, 0x8000, 0xe000, 0xfc02, 0x0000, 0x0000, 0x007c, 
  50.     0x0000, 0x0000
  51. };
  52.  
  53. struct Image SigImage = {
  54.     0, 0, 37, 14, 1, SigDataPtr, SIGPPICK, SIGPONOFF, NULL
  55. };
  56.  
  57. /*
  58.  * Data for Title.
  59.  */
  60.  
  61. #define TitleWidth    50
  62. #define TitleHeight    20
  63. #define TitleDepth    2
  64. #define TitlePPick    0x0a    /* Planes 1 & 3 */
  65. #define TitlePOnOff    0x00    /* All other planes 0 */
  66.  
  67. #define TITLEX        270    /* Coords of top left of image */
  68. #define TITLEY        180
  69.  
  70. USHORT __chip TitleDataPtr[] = {
  71.     /* Plane 1 */
  72.     0xf3c6, 0x3c00, 0x0000, 0x0000, 0x6180, 0x1800, 0x0000, 0x0000, 
  73.     0x7f8e, 0x1807, 0xc73c, 0xc000, 0x6186, 0x184c, 0x6318, 0x8000, 
  74.     0x6186, 0x18cc, 0x61ef, 0x0000, 0xf3cf, 0x3fc7, 0xc0c6, 0x0000, 
  75.     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0c00, 0xfc00, 0x0000, 
  76.     0x0000, 0x1c01, 0x8e00, 0x0000, 0x01c3, 0x0c01, 0x9600, 0x0000, 
  77.     0x0064, 0x0c01, 0xa600, 0x0000, 0x0038, 0x0c01, 0xc600, 0x0000, 
  78.     0x0010, 0x3f30, 0xfc00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
  79.     0x0181, 0xf07c, 0x3f00, 0x0000, 0x0383, 0x18c6, 0x6380, 0x0000, 
  80.     0x0186, 0x1986, 0x6580, 0x0000, 0x0183, 0xf8fe, 0x6980, 0x0000, 
  81.     0x0180, 0x1806, 0x7180, 0x0000, 0x07e0, 0xe038, 0x3f00, 0x0000, 
  82.     /* Plane 3 */
  83.     0xf3c6, 0x3c00, 0x0000, 0x0000, 0x6180, 0x1800, 0x0000, 0x0000, 
  84.     0x7f8e, 0x1807, 0xc73c, 0xc000, 0x6186, 0x184c, 0x6318, 0x8000, 
  85.     0x6186, 0x18cc, 0x61ef, 0x0000, 0xf3cf, 0x3fc7, 0xc0c6, 0x0000, 
  86.     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0c00, 0xfc00, 0x0000, 
  87.     0x0000, 0x1c01, 0x8e00, 0x0000, 0x01c3, 0x0c01, 0x9600, 0x0000, 
  88.     0x0064, 0x0c01, 0xa600, 0x0000, 0x0038, 0x0c01, 0xc600, 0x0000, 
  89.     0x0010, 0x3f30, 0xfc00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
  90.     0x0181, 0xf07c, 0x3f00, 0x0000, 0x0383, 0x18c6, 0x6380, 0x0000, 
  91.     0x0186, 0x1986, 0x6580, 0x0000, 0x0183, 0xf8fe, 0x6980, 0x0000, 
  92.     0x0180, 0x1806, 0x7180, 0x0000, 0x07e0, 0xe038, 0x3f00, 0x0000
  93. };
  94.  
  95. struct Image TitleImage = {
  96.     0, 0, TitleWidth, TitleHeight, TitleDepth, TitleDataPtr,
  97.     TitlePPick, TitlePOnOff, NULL
  98. };
  99.  
  100. /*
  101.  *    Data for up and down arrows.
  102.  */
  103.  
  104. USHORT __chip DnADataPtr[] = {
  105.     0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0xff00, 0xff00, 
  106.     0x7e00, 0x3c00, 0x1800 
  107. };
  108.  
  109. USHORT __chip UpADataPtr[] = {
  110.     0x1800, 0x3c00, 0x7e00, 0xff00, 0xff00, 0x1800, 0x1800, 0x1800, 
  111.     0x1800, 0x1800, 0x1800 
  112. };
  113.  
  114. struct Image UpAImage = {
  115.     0, 0, 8, 11, 1, UpADataPtr, 0x04, 0x00, NULL
  116. };
  117.  
  118. struct Image DnAImage = {
  119.     0, 0, 8, 11, 1, DnADataPtr, 0x04, 0x00, NULL
  120. };
  121.  
  122. /*
  123.  *    Storage for card array.
  124.  */
  125. struct BitMap CardArray[53];
  126.  
  127. #define CWIDTH        57            /* Width of card */
  128. #define CHEIGHT        97            /* Height of card */
  129. #define CGAP        8            /* Gap between each card */
  130. #define CARDX        0            /* Start X coord of left-most card */
  131. #define CARDY        50            /* Start Y coord of all cards */
  132. #define NTURNS        5            /* Number of cards per game */
  133. #define MINTERM        0xc0        /* Minterm for blitter instructions */
  134. #define BANKX        135            /* X coord of bank information */
  135. #define BANKY        30            /* Y coord of bank information */
  136. #define STARTCASH    100            /* Starting money in pence/cents */
  137. #define PPERGAME    10            /* Pence/cents per game */
  138. #define C_SYMBOL    163            /* Currency symbol England */
  139. /* #define C_SYMBOL    '$'            /* Currency symbol America */
  140. #define CHOSE_HIGH    1            /* Chose to go higher */
  141. #define CHOSE_LOW    2            /* Chose to go lower */
  142. #define CHOSE_DEAL    3            /* Chose to deal cards */
  143. #define CHOSE_QUIT    4            /* Chose to quit */
  144.  
  145. #define BITMAPDIR    "bitmaps/"    /* Where the cards are kept */
  146.  
  147.  
  148. /*
  149.  *    defines for sound effects.
  150.  */
  151.  
  152. #define S_DEAL        0x00        /* Deal cards sound */
  153. #define S_TURN        0x01        /* Turn cards sound */
  154. #define S_WIN        0x02        /* Won  game sound  */
  155. #define S_LOSE        0x03        /* Lost Game sound  */
  156.  
  157.  
  158. /* START OF COLOUR TABLE GENERATED BY ILBM2C */
  159.  
  160. /*
  161.  * To set up the colours use :
  162.  *        LoadRGB4(&ViewPort, ColourTable, NCOLOURS);
  163.  */
  164.  
  165. #define NCOLOURS    32
  166.  
  167. static UWORD ColourTable[] = {
  168.     0x070, 0xfff, 0x002, 0xf80, 0x00f, 0xf0f, 0x0ff, 0xfff, 
  169.     0x620, 0xe50, 0x9f1, 0xeb0, 0x55f, 0x92f, 0x0f8, 0xccc, 
  170.     0x000, 0xd22, 0x000, 0xabc, 0x444, 0x555, 0x666, 0x777, 
  171.     0x888, 0x999, 0xaaa, 0xbbb, 0xccc, 0xddd, 0xeee, 0xfff
  172. };
  173. /* END OF COLOUR TABLE GENERATED BY ILBM2C */
  174.  
  175.