home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / cellsim / v2_5 / src / celldata.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-01  |  2.1 KB  |  98 lines

  1. /*****
  2.  *
  3.  * File: celldata.h
  4.  *
  5.  * Cellsim, cellular automata simulator
  6.  *
  7.  * Header-file for the celldata.c file
  8.  *
  9.  *****/
  10.  
  11. /*
  12.  *
  13.  * Cellsim copyright 1989, 1990 by Chris Langton and Dave Hiebeler
  14.  * (cgl@lanl.gov, hiebeler@heretic.lanl.gov)
  15.  *
  16.  * This package may be freely distributed, as long as you don't:
  17.  * - remove this notice
  18.  * - try to make money by doing so
  19.  * - prevent others from copying it freely
  20.  * - distribute modified versions without clearly documenting your changes
  21.  *   and notifying us
  22.  *
  23.  * Please contact either of the authors listed above if you have questions
  24.  * or feel an exception to any of the above restrictions is in order.
  25.  *
  26.  * If you make changes to the code, or have suggestions for changes,
  27.  * let us know!  If we use your suggestion, you will receive full credit
  28.  * of course.
  29.  */
  30.  
  31. /*****
  32.  * Cellsim history:
  33.  *
  34.  * Cellsim was originally written on Apollo workstations by Chris Langton.
  35.  *
  36.  * Sun versions:
  37.  *
  38.  * - version 1.0
  39.  *   by C. Ferenbaugh and C. Langton
  40.  *   released 09/02/88
  41.  *
  42.  * - version 1.5
  43.  *   by Dave Hiebeler and C. Langton  May - June 1989
  44.  *   released 07/03/89
  45.  *
  46.  * - version 2.0
  47.  *   by Dave Hiebeler and C. Langton  July - August 1989
  48.  *   never officially released (unofficially released 09/08/89)
  49.  *
  50.  * - version 2.5
  51.  *   by Dave Hiebeler and C. Langton  September '89 - February 1990
  52.  *   released 02/26/90
  53.  *****/
  54.  
  55.  
  56. /*****
  57.  *
  58.  * Includes and defines
  59.  *
  60.  *****/
  61. #include <pixrect/pixrect_hs.h>
  62. #include "cell.def"
  63.  
  64. #define pr_swap(p1, p1h, p2, p2h) \
  65.     temp = (p1);  (p1) = (p2);  (p2) = temp; \
  66.     temp_handle = (p1h);  (p1h) = (p2h);  (p2h) = temp_handle
  67.  
  68.  
  69.  
  70. /*****
  71.  *
  72.  * External vars
  73.  *
  74.  *****/
  75. extern short
  76.     S, B, ABASE, AMASK, DIM;
  77. extern int
  78.     ICBASE, ICSIZE, use_2D_always, BSQR;
  79.  
  80.  
  81. /*****
  82.  *
  83.  * Local vars
  84.  *
  85.  *****/
  86. State  *ca, *ia;        /* image arrays and pixrects - GLOBAL */
  87. struct pixrect *ca_handle, *ia_handle;
  88. struct mpr_data *a1data, *a2data;
  89.  
  90. State  *temp;                /* used for swapping */
  91. struct pixrect *temp_handle;
  92.  
  93. struct pixrect *buffer[NBUFFERS];
  94. State  *bufptr[NBUFFERS];        /* image buffers (local only) */
  95.  
  96. struct pixrect *sh_handle;        /* shift pixrect */
  97. State  *sh;
  98.