home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff256.lzh / BlitDemons / BDWin.c < prev    next >
C/C++ Source or Header  |  1989-10-19  |  20KB  |  472 lines

  1. #include <intuition/intuition.h>
  2.  
  3.  
  4. struct TextAttr TOPAZ80 = {
  5.     (STRPTR)"topaz.font",
  6.     TOPAZ_EIGHTY,0,0
  7. };
  8. struct NewScreen NewScreenStructure = {
  9.     0,0,    /* screen XY origin relative to View */
  10.     320,200,    /* screen width and height */
  11.     4,    /* screen depth (number of bitplanes) */
  12.     0,1,    /* detail and block pens */
  13.     NULL,    /* display modes for this screen */
  14.     CUSTOMSCREEN,    /* screen type */
  15.     &TOPAZ80,    /* pointer to default screen font */
  16.     NULL,    /* screen title */
  17.     NULL,    /* first in list of custom screen gadgets */
  18.     NULL    /* pointer to custom BitMap structure */
  19. };
  20.  
  21. #define NEWSCREENSTRUCTURE NewScreenStructure
  22.  
  23. struct IntuiText ABDWin2IText15 = {
  24.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  25.     223,178,    /* XY origin relative to container TopLeft */
  26.     NULL,    /* font pointer or NULL for default */
  27.     "Page 2 of 3",    /* pointer to text */
  28.     NULL    /* next IntuiText structure */
  29. };
  30.  
  31. struct IntuiText ABDWin2IText14 = {
  32.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  33.     9,162,    /* XY origin relative to container TopLeft */
  34.     NULL,    /* font pointer or NULL for default */
  35.     "which survive the fourth phase.",    /* pointer to text */
  36.     &ABDWin2IText15    /* next IntuiText structure */
  37. };
  38.  
  39. struct IntuiText ABDWin2IText13 = {
  40.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  41.     9,152,    /* XY origin relative to container TopLeft */
  42.     NULL,    /* font pointer or NULL for default */
  43.     "to Demons, which are the spirals",    /* pointer to text */
  44.     &ABDWin2IText14    /* next IntuiText structure */
  45. };
  46.  
  47. struct IntuiText ABDWin2IText12 = {
  48.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  49.     9,142,    /* XY origin relative to container TopLeft */
  50.     NULL,    /* font pointer or NULL for default */
  51.     "cannot be seen, but they give rise",    /* pointer to text */
  52.     &ABDWin2IText13    /* next IntuiText structure */
  53. };
  54.  
  55. struct IntuiText ABDWin2IText11 = {
  56.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  57.     9,132,    /* XY origin relative to container TopLeft */
  58.     NULL,    /* font pointer or NULL for default */
  59.     "droplets, defects, and demons. Defects",    /* pointer to text */
  60.     &ABDWin2IText12    /* next IntuiText structure */
  61. };
  62.  
  63. struct IntuiText ABDWin2IText10 = {
  64.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  65.     21,122,    /* XY origin relative to container TopLeft */
  66.     NULL,    /* font pointer or NULL for default */
  67.     "There are 4 distinct phases:  debris,",    /* pointer to text */
  68.     &ABDWin2IText11    /* next IntuiText structure */
  69. };
  70.  
  71. struct IntuiText ABDWin2IText9 = {
  72.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  73.     9,109,    /* XY origin relative to container TopLeft */
  74.     NULL,    /* font pointer or NULL for default */
  75.     "value.",    /* pointer to text */
  76.     &ABDWin2IText10    /* next IntuiText structure */
  77. };
  78.  
  79. struct IntuiText ABDWin2IText8 = {
  80.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  81.     8,99,    /* XY origin relative to container TopLeft */
  82.     NULL,    /* font pointer or NULL for default */
  83.     "the first cell is set to the higher",    /* pointer to text */
  84.     &ABDWin2IText9    /* next IntuiText structure */
  85. };
  86.  
  87. struct IntuiText ABDWin2IText7 = {
  88.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  89.     9,88,    /* XY origin relative to container TopLeft */
  90.     NULL,    /* font pointer or NULL for default */
  91.     "which is one greater than its value,",    /* pointer to text */
  92.     &ABDWin2IText8    /* next IntuiText structure */
  93. };
  94.  
  95. struct IntuiText ABDWin2IText6 = {
  96.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  97.     9,78,    /* XY origin relative to container TopLeft */
  98.     NULL,    /* font pointer or NULL for default */
  99.     "cell's nearest 4 neighbors has a value",    /* pointer to text */
  100.     &ABDWin2IText7    /* next IntuiText structure */
  101. };
  102.  
  103. struct IntuiText ABDWin2IText5 = {
  104.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  105.     9,67,    /* XY origin relative to container TopLeft */
  106.     NULL,    /* font pointer or NULL for default */
  107.     "each generation, if any one of a",    /* pointer to text */
  108.     &ABDWin2IText6    /* next IntuiText structure */
  109. };
  110.  
  111. struct IntuiText ABDWin2IText4 = {
  112.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  113.     8,56,    /* XY origin relative to container TopLeft */
  114.     NULL,    /* font pointer or NULL for default */
  115.     "a unique color on the screen.  During",    /* pointer to text */
  116.     &ABDWin2IText5    /* next IntuiText structure */
  117. };
  118.  
  119. struct IntuiText ABDWin2IText3 = {
  120.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  121.     8,46,    /* XY origin relative to container TopLeft */
  122.     NULL,    /* font pointer or NULL for default */
  123.     "16 values.  Each value is displayed as",    /* pointer to text */
  124.     &ABDWin2IText4    /* next IntuiText structure */
  125. };
  126.  
  127. struct IntuiText ABDWin2IText2 = {
  128.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  129.     23,36,    /* XY origin relative to container TopLeft */
  130.     NULL,    /* font pointer or NULL for default */
  131.     "Each cell is set randomly to one of",    /* pointer to text */
  132.     &ABDWin2IText3    /* next IntuiText structure */
  133. };
  134.  
  135. struct IntuiText ABDWin2IText1 = {
  136.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  137.     103,18,    /* XY origin relative to container TopLeft */
  138.     NULL,    /* font pointer or NULL for default */
  139.     "The Algorithm",    /* pointer to text */
  140.     &ABDWin2IText2    /* next IntuiText structure */
  141. };
  142.  
  143. #define ABDWin2IntuiTextList1 ABDWin2IText1
  144.  
  145. struct NewWindow ABDWin2NewWindowStructure1 = {
  146.     0,11,    /* window XY origin relative to TopLeft of screen */
  147.     320,189,    /* window width and height */
  148.     0,1,    /* detail and block pens */
  149.     CLOSEWINDOW,    /* IDCMP flags */
  150.     WINDOWDEPTH+WINDOWCLOSE+SIMPLE_REFRESH+ACTIVATE+NOCAREREFRESH,    /* other window flags */
  151.     NULL,    /* first gadget in gadget list */
  152.     NULL,    /* custom CHECKMARK imagery */
  153.     "About BlitDemons",    /* window title */
  154.     NULL,    /* custom screen pointer */
  155.     NULL,    /* custom bitmap */
  156.     5,5,    /* minimum width and height */
  157.     640,200,    /* maximum width and height */
  158.     CUSTOMSCREEN    /* destination screen type */
  159. };
  160.  
  161. struct IntuiText ABDWin3IText22 = {
  162.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  163.     216,179,    /* XY origin relative to container TopLeft */
  164.     NULL,    /* font pointer or NULL for default */
  165.     "Page 3 of 3",    /* pointer to text */
  166.     NULL    /* next IntuiText structure */
  167. };
  168.  
  169. struct IntuiText ABDWin3IText21 = {
  170.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  171.     54,111,    /* XY origin relative to container TopLeft */
  172.     NULL,    /* font pointer or NULL for default */
  173.     "Bix:      wstrick",    /* pointer to text */
  174.     &ABDWin3IText22    /* next IntuiText structure */
  175. };
  176.  
  177. struct IntuiText ABDWin3IText20 = {
  178.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  179.     53,97,    /* XY origin relative to container TopLeft */
  180.     NULL,    /* font pointer or NULL for default */
  181.     "Ma Bell:  (303) 443-0493",    /* pointer to text */
  182.     &ABDWin3IText21    /* next IntuiText structure */
  183. };
  184.  
  185. struct IntuiText ABDWin3IText19 = {
  186.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  187.     133,81,    /* XY origin relative to container TopLeft */
  188.     NULL,    /* font pointer or NULL for default */
  189.     "Boulder, CO 80302",    /* pointer to text */
  190.     &ABDWin3IText20    /* next IntuiText structure */
  191. };
  192.  
  193. struct IntuiText ABDWin3IText18 = {
  194.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  195.     132,72,    /* XY origin relative to container TopLeft */
  196.     NULL,    /* font pointer or NULL for default */
  197.     "1410 19th St. #6",    /* pointer to text */
  198.     &ABDWin3IText19    /* next IntuiText structure */
  199. };
  200.  
  201. struct IntuiText ABDWin3IText17 = {
  202.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  203.     52,62,    /* XY origin relative to container TopLeft */
  204.     NULL,    /* font pointer or NULL for default */
  205.     "USMail:   Walter Strickler",    /* pointer to text */
  206.     &ABDWin3IText18    /* next IntuiText structure */
  207. };
  208.  
  209. struct IntuiText ABDWin3IText16 = {
  210.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  211.     17,17,    /* XY origin relative to container TopLeft */
  212.     NULL,    /* font pointer or NULL for default */
  213.     "I may be reached by:",    /* pointer to text */
  214.     &ABDWin3IText17    /* next IntuiText structure */
  215. };
  216.  
  217. #define ABDWin3IntuiTextList2 ABDWin3IText16
  218.  
  219. struct NewWindow ABDWin3NewWindowStructure2 = {
  220.     0,11,    /* window XY origin relative to TopLeft of screen */
  221.     320,189,    /* window width and height */
  222.     0,1,    /* detail and block pens */
  223.     CLOSEWINDOW,    /* IDCMP flags */
  224.     WINDOWDEPTH+WINDOWCLOSE+SIMPLE_REFRESH+ACTIVATE+NOCAREREFRESH,    /* other window flags */
  225.     NULL,    /* first gadget in gadget list */
  226.     NULL,    /* custom CHECKMARK imagery */
  227.     "About BlitDemons",    /* window title */
  228.     NULL,    /* custom screen pointer */
  229.     NULL,    /* custom bitmap */
  230.     5,5,    /* minimum width and height */
  231.     640,200,    /* maximum width and height */
  232.     CUSTOMSCREEN    /* destination screen type */
  233. };
  234.  
  235. struct IntuiText BDWindowIText23 = {
  236.     0,1,JAM1,    /* front and back text pens, drawmode and fill byte */
  237.     0,0,    /* XY origin relative to container TopLeft */
  238.     &TOPAZ80,    /* font pointer or NULL for default */
  239.     "Quit",    /* pointer to text */
  240.     NULL    /* next IntuiText structure */
  241. };
  242.  
  243. struct MenuItem BDWindowMenuItem5 = {
  244.     NULL,    /* next MenuItem structure */
  245.     0,36,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  246.     80,8,    /* hit box width and height */
  247.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,    /* Item flags */
  248.     0,    /* each bit mutually-excludes a same-level Item */
  249.     (APTR)&BDWindowIText23,    /* Item render  (IntuiText or Image or NULL) */
  250.     NULL,    /* Select render */
  251.     'Q',    /* alternate command-key */
  252.     NULL,    /* SubItem list */
  253.     MENUNULL    /* filled in by Intuition for drag selections */
  254. };
  255.  
  256. struct IntuiText BDWindowIText24 = {
  257.     0,1,JAM1,    /* front and back text pens, drawmode and fill byte */
  258.     0,0,    /* XY origin relative to container TopLeft */
  259.     &TOPAZ80,    /* font pointer or NULL for default */
  260.     "Stop",    /* pointer to text */
  261.     NULL    /* next IntuiText structure */
  262. };
  263.  
  264. struct MenuItem BDWindowMenuItem4 = {
  265.     &BDWindowMenuItem5,    /* next MenuItem structure */
  266.     0,27,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  267.     80,8,    /* hit box width and height */
  268.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,    /* Item flags */
  269.     0,    /* each bit mutually-excludes a same-level Item */
  270.     (APTR)&BDWindowIText24,    /* Item render  (IntuiText or Image or NULL) */
  271.     NULL,    /* Select render */
  272.     'S',    /* alternate command-key */
  273.     NULL,    /* SubItem list */
  274.     MENUNULL    /* filled in by Intuition for drag selections */
  275. };
  276.  
  277. struct IntuiText BDWindowIText25 = {
  278.     0,1,JAM1,    /* front and back text pens, drawmode and fill byte */
  279.     0,0,    /* XY origin relative to container TopLeft */
  280.     &TOPAZ80,    /* font pointer or NULL for default */
  281.     "Start",    /* pointer to text */
  282.     NULL    /* next IntuiText structure */
  283. };
  284.  
  285. struct MenuItem BDWindowMenuItem3 = {
  286.     &BDWindowMenuItem4,    /* next MenuItem structure */
  287.     0,18,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  288.     80,8,    /* hit box width and height */
  289.     ITEMTEXT+COMMSEQ+HIGHCOMP,    /* Item flags */
  290.     0,    /* each bit mutually-excludes a same-level Item */
  291.     (APTR)&BDWindowIText25,    /* Item render  (IntuiText or Image or NULL) */
  292.     NULL,    /* Select render */
  293.     'G',    /* alternate command-key */
  294.     NULL,    /* SubItem list */
  295.     MENUNULL    /* filled in by Intuition for drag selections */
  296. };
  297.  
  298. struct IntuiText BDWindowIText26 = {
  299.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  300.     0,0,    /* XY origin relative to container TopLeft */
  301.     &TOPAZ80,    /* font pointer or NULL for default */
  302.     "New",    /* pointer to text */
  303.     NULL    /* next IntuiText structure */
  304. };
  305.  
  306. struct MenuItem BDWindowMenuItem2 = {
  307.     &BDWindowMenuItem3,    /* next MenuItem structure */
  308.     0,9,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  309.     80,8,    /* hit box width and height */
  310.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,    /* Item flags */
  311.     0,    /* each bit mutually-excludes a same-level Item */
  312.     (APTR)&BDWindowIText26,    /* Item render  (IntuiText or Image or NULL) */
  313.     NULL,    /* Select render */
  314.     'N',    /* alternate command-key */
  315.     NULL,    /* SubItem list */
  316.     MENUNULL    /* filled in by Intuition for drag selections */
  317. };
  318.  
  319. struct IntuiText BDWindowIText27 = {
  320.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  321.     0,0,    /* XY origin relative to container TopLeft */
  322.     &TOPAZ80,    /* font pointer or NULL for default */
  323.     "About",    /* pointer to text */
  324.     NULL    /* next IntuiText structure */
  325. };
  326.  
  327. struct MenuItem BDWindowMenuItem1 = {
  328.     &BDWindowMenuItem2,    /* next MenuItem structure */
  329.     0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  330.     80,8,    /* hit box width and height */
  331.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,    /* Item flags */
  332.     0,    /* each bit mutually-excludes a same-level Item */
  333.     (APTR)&BDWindowIText27,    /* Item render  (IntuiText or Image or NULL) */
  334.     NULL,    /* Select render */
  335.     'A',    /* alternate command-key */
  336.     NULL,    /* SubItem list */
  337.     MENUNULL    /* filled in by Intuition for drag selections */
  338. };
  339.  
  340. struct Menu BDWindowMenu1 = {
  341.     NULL,    /* next Menu structure */
  342.     0,0,    /* XY origin of Menu hit box relative to screen TopLeft */
  343.     75,0,    /* Menu hit box width and height */
  344.     MENUENABLED,    /* Menu flags */
  345.     "Project",    /* text of Menu name */
  346.     &BDWindowMenuItem1    /* MenuItem linked list pointer */
  347. };
  348.  
  349. #define BDWindowMenuList3 BDWindowMenu1
  350.  
  351. struct NewWindow BDWindowNewWindowStructure3 = {
  352.     0,1,    /* window XY origin relative to TopLeft of screen */
  353.     320,199,    /* window width and height */
  354.     0,1,    /* detail and block pens */
  355.     MENUPICK+CLOSEWINDOW+MENUVERIFY,    /* IDCMP flags */
  356.     WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH,    /* other window flags */
  357.     NULL,    /* first gadget in gadget list */
  358.     NULL,    /* custom CHECKMARK imagery */
  359.     "BlitDemons v1.0",    /* window title */
  360.     NULL,    /* custom screen pointer */
  361.     NULL,    /* custom bitmap */
  362.     5,5,    /* minimum width and height */
  363.     640,200,    /* maximum width and height */
  364.     CUSTOMSCREEN    /* destination screen type */
  365. };
  366.  
  367. struct IntuiText ABDWin1IText38 = {
  368.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  369.     223,178,    /* XY origin relative to container TopLeft */
  370.     NULL,    /* font pointer or NULL for default */
  371.     "Page 1 of 3",    /* pointer to text */
  372.     NULL    /* next IntuiText structure */
  373. };
  374.  
  375. struct IntuiText ABDWin1IText37 = {
  376.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  377.     9,124,    /* XY origin relative to container TopLeft */
  378.     NULL,    /* font pointer or NULL for default */
  379.     "system.",    /* pointer to text */
  380.     &ABDWin1IText38    /* next IntuiText structure */
  381. };
  382.  
  383. struct IntuiText ABDWin1IText36 = {
  384.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  385.     10,113,    /* XY origin relative to container TopLeft */
  386.     NULL,    /* font pointer or NULL for default */
  387.     "runs under Apex, the unknown operating",    /* pointer to text */
  388.     &ABDWin1IText37    /* next IntuiText structure */
  389. };
  390.  
  391. struct IntuiText ABDWin1IText35 = {
  392.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  393.     10,102,    /* XY origin relative to container TopLeft */
  394.     NULL,    /* font pointer or NULL for default */
  395.     "of a program by Loren Blaney which",    /* pointer to text */
  396.     &ABDWin1IText36    /* next IntuiText structure */
  397. };
  398.  
  399. struct IntuiText ABDWin1IText34 = {
  400.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  401.     10,91,    /* XY origin relative to container TopLeft */
  402.     NULL,    /* font pointer or NULL for default */
  403.     "acheive its high speed.  It is a port",    /* pointer to text */
  404.     &ABDWin1IText35    /* next IntuiText structure */
  405. };
  406.  
  407. struct IntuiText ABDWin1IText33 = {
  408.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  409.     26,81,    /* XY origin relative to container TopLeft */
  410.     NULL,    /* font pointer or NULL for default */
  411.     "It uses the Amiga's Blitter to",    /* pointer to text */
  412.     &ABDWin1IText34    /* next IntuiText structure */
  413. };
  414.  
  415. struct IntuiText ABDWin1IText32 = {
  416.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  417.     9,67,    /* XY origin relative to container TopLeft */
  418.     NULL,    /* font pointer or NULL for default */
  419.     "American.  ",    /* pointer to text */
  420.     &ABDWin1IText33    /* next IntuiText structure */
  421. };
  422.  
  423. struct IntuiText ABDWin1IText31 = {
  424.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  425.     7,56,    /* XY origin relative to container TopLeft */
  426.     NULL,    /* font pointer or NULL for default */
  427.     "the August, 1989, issue of Scientific",    /* pointer to text */
  428.     &ABDWin1IText32    /* next IntuiText structure */
  429. };
  430.  
  431. struct IntuiText ABDWin1IText30 = {
  432.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  433.     8,46,    /* XY origin relative to container TopLeft */
  434.     NULL,    /* font pointer or NULL for default */
  435.     "the cellular automaton described in",    /* pointer to text */
  436.     &ABDWin1IText31    /* next IntuiText structure */
  437. };
  438.  
  439. struct IntuiText ABDWin1IText29 = {
  440.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  441.     24,36,    /* XY origin relative to container TopLeft */
  442.     NULL,    /* font pointer or NULL for default */
  443.     "This program is an implementation of",    /* pointer to text */
  444.     &ABDWin1IText30    /* next IntuiText structure */
  445. };
  446.  
  447. struct IntuiText ABDWin1IText28 = {
  448.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  449.     41,17,    /* XY origin relative to container TopLeft */
  450.     NULL,    /* font pointer or NULL for default */
  451.     "BlitDemons By Walter Strickler",    /* pointer to text */
  452.     &ABDWin1IText29    /* next IntuiText structure */
  453. };
  454.  
  455. #define ABDWin1IntuiTextList4 ABDWin1IText28
  456.  
  457. struct NewWindow ABDWin1NewWindowStructure4 = {
  458.     0,11,    /* window XY origin relative to TopLeft of screen */
  459.     320,189,    /* window width and height */
  460.     0,1,    /* detail and block pens */
  461.     CLOSEWINDOW,    /* IDCMP flags */
  462.     WINDOWDEPTH+WINDOWCLOSE+SIMPLE_REFRESH+ACTIVATE+NOCAREREFRESH,    /* other window flags */
  463.     NULL,    /* first gadget in gadget list */
  464.     NULL,    /* custom CHECKMARK imagery */
  465.     "About BlitDemons",    /* window title */
  466.     NULL,    /* custom screen pointer */
  467.     NULL,    /* custom bitmap */
  468.     5,5,    /* minimum width and height */
  469.     640,200,    /* maximum width and height */
  470.     CUSTOMSCREEN    /* destination screen type */
  471. };
  472.