home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d536 / chemesthetics.lha / Chemesthetics / Source / Source.LZH / globalstructs.c < prev    next >
C/C++ Source or Header  |  1991-04-12  |  4KB  |  135 lines

  1. /***************************************************************************
  2. * globalstructs.c: contains all structures that are used from various       *
  3. *           modules (e.g. all the OK-gadgets)                       *
  4. *           may be used by declaring them as external objects in    *
  5. *           the modules                           *
  6. *                                       *
  7. * created: ??? unknown - somewhere in early 1991               *
  8. * updated: 13-Apr-91 Mtwx                           *
  9. ***************************************************************************/
  10.  
  11. #include <intuition/intuition.h>
  12.  
  13. SHORT OKBorderVectors[] = {
  14.     0,0,
  15.     91,0,
  16.     91,17,
  17.     0,17,
  18.     0,0
  19. };
  20. struct Border OKBorder = {
  21.     -1,-1,    /* XY origin relative to container TopLeft */
  22.     3,0,JAM1,    /* front pen, back pen and drawmode */
  23.     5,    /* number of XY vectors */
  24.     OKBorderVectors, /* pointer to XY vectors */
  25.     NULL    /* next border in list */
  26. };
  27.  
  28. struct IntuiText OKText = {
  29.     1,0,JAM1,    /* front and back text pens, drawmode and fill byte */
  30.     33,4,    /* XY origin relative to container TopLeft */
  31.     NULL,    /* font pointer or NULL for default */
  32.     (UBYTE *)"OK!", /* pointer to text */
  33.     NULL    /* next IntuiText structure */
  34. };
  35.  
  36. /* Now the borders for ALL string gadgets: */
  37. /*            (not for all in the current version (2.03), but I'm
  38.              working on it!) */
  39.  
  40. /* Border vectors assigned to NULL! The borders are used from different
  41.    modules and must be declared as extern there. Then local borders are
  42.    made by assiging local border structures to the globals in here (see
  43.    below):
  44.  
  45.      extern struct Border StringGBorder1;
  46.      .
  47.      .
  48.      .
  49.      static struct Border LocalBorder;
  50.      static SHORT LocalVectors[]={ three pairs of coordinates };
  51.      .
  52.      LocalBorder = StringGBorder1;
  53.      LocalBorder.XY=LocalVectors;
  54.  
  55.    The border vectors must be defined in the modules. This allows several
  56.    string gadgets to use the same two border definitions. Saving a lot of
  57.    memory I guess! In addition you must set the NextBorder field in your
  58.    first border to the second one! */
  59.  
  60. struct Border StringGBorder2 = { -2,-2,2,0,JAM1,3,NULL,NULL };
  61. struct Border StringGBorder1 = { -2,-2,1,0,JAM1,3,NULL,NULL };
  62.  
  63. /* Now some Images */
  64.  
  65. /* Images for a toggle gadget (without - with checkmark) */
  66.  
  67. #define toggle1_iff_width 26
  68. #define toggle1_iff_height 11
  69. #define toggle1_iff_num_planes 4
  70. #define toggle1_iff_words_per_plane 22
  71.  
  72. UWORD __chip toggle1_iff_data[4][11][2] = {    /* without checkmark */
  73.     {
  74.     0x0000,0x0040,0x0000,0x00c0,0x0000,0x00c0,0x0000,0x00c0,
  75.     0x0000,0x00c0,0x0000,0x00c0,0x0000,0x00c0,0x0000,0x00c0,
  76.     0x0000,0x00c0,0x0000,0x00c0,0x7fff,0xffc0
  77.     },
  78.     {
  79.     0xffff,0xff80,0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,
  80.     0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,
  81.     0xc000,0x0000,0xc000,0x0000,0x8000,0x0000
  82.     },
  83.     {
  84.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  85.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  86.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  87.     },
  88.     {
  89.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  90.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  91.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  92.     },
  93. };
  94.  
  95. #define toggle2_iff_width 26
  96. #define toggle2_iff_height 11
  97. #define toggle2_iff_num_planes 4
  98. #define toggle2_iff_words_per_plane 22
  99.  
  100. UWORD __chip toggle2_iff_data[4][11][2] = {  /* with checkmark */
  101.     {
  102.     0x0000,0x0040,0x0000,0x00c0,0x0000,0x70c0,0x0000,0xc0c0,
  103.     0x0001,0x80c0,0x01c3,0x00c0,0x00e6,0x00c0,0x007c,0x00c0,
  104.     0x0038,0x00c0,0x0000,0x00c0,0x7fff,0xffc0
  105.     },
  106.     {
  107.     0xffff,0xff80,0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,
  108.     0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,0xc000,0x0000,
  109.     0xc000,0x0000,0xc000,0x0000,0x8000,0x0000
  110.     },
  111.     {
  112.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  113.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  114.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  115.     },
  116.     {
  117.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  118.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  119.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  120.     },
  121. };
  122.  
  123. struct Image ToggleImg1 =
  124. {
  125.   0, 0, toggle1_iff_width, toggle1_iff_height, toggle1_iff_num_planes,
  126.   (USHORT *)toggle1_iff_data, 0xF, 0, NULL
  127. };
  128.  
  129. struct Image ToggleImg2 =
  130. {
  131.   0, 0, toggle2_iff_width, toggle2_iff_height, toggle2_iff_num_planes,
  132.   (USHORT *)toggle2_iff_data, 0xF, 0, NULL
  133. };
  134.  
  135.