home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d158 / yachtc3.lha / YachtC3 / src / bones.h next >
C/C++ Source or Header  |  1988-10-02  |  4KB  |  92 lines

  1. /***********************************************************************
  2. *
  3. *                           Yachtc
  4. *             Yes, Friends, it My First Amiga Program
  5. *             Copyright 1985 by Sheldon Leemon
  6. *             Feel free to copy and distribute the program and
  7. *             source code, but don't try to sell, license, or
  8. *             otherwise commercially exploit it.
  9. *
  10. *             If you have questions or comments, you may contact
  11. *             the author through Delphi (username = DRX)
  12. *             or Compuserve ID 72705,1355.  No late-night phone calls,
  13. *             please.
  14. *
  15. ************************************************************************/
  16.  
  17. /*    Version 2.0  modifications by Mark Schretlen of Calgary,Alberta
  18.                     86-03-16   ( fumigated & Steve Bennett's "scales"
  19.                      incorporated with calls to Happy,Bomb, and YahtzeeSound).
  20.  
  21.       Version 3.0  further modifications by M. Schretlen for
  22.                    multitasking "scales" 87-12-30.
  23. */
  24.  
  25. #include <exec/types.h>
  26. #include <intuition/intuitionbase.h>
  27. #include <exec/memory.h>
  28. #include <stdio.h>
  29.  
  30. /* Structures needed for libraries */
  31.  
  32. extern struct IntuitionBase *    IntuitionBase;
  33. extern struct GfxBase *          GfxBase;
  34.  
  35. /* Structures required for graphics */
  36.  
  37. struct Screen *BdScr;
  38. struct Window *BdWdw;
  39. struct Window *BackWdw;
  40. struct ViewPort *WVPort;
  41.  
  42. /***************** Program Constants ****************************/
  43.  
  44. #define BdRp   BdWdw->RPort
  45.  
  46. #define INTUITION_REV  0   /* Internal version number */
  47. #define GRAPHICS_REV   0
  48. #define BLANKW    56      /* Width of die blank */
  49. #define BLANKH    23      /* Height of die blank */
  50. #define BLANKL   530      /* Left edge of die blanks */
  51. #define BLANKT    20      /* Top edge of die blanks */
  52. #define BLANKS    31      /* Space between blanks */
  53. #define DIEW      48      /* Width of each Die image */
  54. #define DIEH      19      /* Height of each Die image */
  55. #define DIEHOFF    4      /* Horizontal offset of die image from BlankL */
  56. #define DIEVOFF    2      /* Vertical offset of die image from BlankT */
  57. #define TEXTL      5      /* Left pixel of first text column */
  58. #define TEXTT     20      /* Top pixel of first text row */
  59. #define TEXTS      8      /* Space between each text line */
  60. #define SPACEW     10      /* number of dots wide--space character */
  61. #define SPACEH      9      /* number of dots high--space character */
  62. #define DOTL     155      /* left position of first dot character */
  63. #define DOTS      90      /* pixels between columns of dots=9*SPACEW */
  64. #define DOTT      36      /* line of first dot text=TEXT+2*TEXTS */
  65. #define HLINT     18      /* pixel of top horizontal line */
  66. #define HLINL      1      /* Leftmost pixel of top horizontal line */
  67. #define HLINR    489      /* Rightmost pixel of top horizontal line */
  68. #define HLINS      8      /* Space between horizontal lines */
  69. #define VLINT     13      /* Vertical line top pixel */
  70. #define VLINB    199      /* Vertical line bottom pixel */
  71. #define VLINL    128      /* Leftmost vertical line position */
  72. #define VLINS     90      /* Space between vertical lines */
  73. #define MAXLINES  23       /* Maximum number of screen lines */
  74. #define DICE       5      /* number of dice on screen */
  75. #define TURNS      5      /* the bones array member holding turns variable */
  76. #define MAXPLAYERS   4      /* maximum number of players */
  77. #define SCORECATS   21      /* number of scoring categories */
  78. #define BONUS      62      /* number of points needed for upper bonus */
  79. #define WHITE   0xFFF
  80. #define RED      0xF00
  81. #define GREEN   0x0F0
  82. #define BLUE   0x00F
  83. #define AQUA   0x0FF
  84. #define PURPLE    0xF0F
  85. #define YELLOW   0xFF0
  86. #define BLACK   0x000
  87. #define YAHSOUND       1
  88. #define HAPPYSOUND     2
  89. #define BOMBSOUND      3
  90. #define DICEROLL       4
  91.  
  92.