home *** CD-ROM | disk | FTP | other *** search
/ Dream 55 / Amiga_Dream_55.iso / RISCOS / APPS / SCI / ELECTRON / AUTOPC.ZIP / !AutoPCB / Source / c / BITMAP < prev    next >
Text File  |  1991-03-17  |  2KB  |  44 lines

  1. #include "cell.h"
  2.  
  3. #define ZOOM0   3       /* 3x3 pixels per cell          */
  4. #define ZOOM1   6       /* 6x6 pixels per cell          */
  5. #define ZOOM2   10      /* 10x10 pixels per cell        */
  6. #define ZOOM3   18      /* 18x18 pixels per cell        */
  7.  
  8. /*
  9. ** the templates assume the pixels on your screen have a 1:1 aspect ratio. for
  10. ** almost all screens, this is not true. therefore, the screen view will be
  11. ** slightly distorted (things will look like they are stretched top to bottom,
  12. ** or squashed side to side). if you really want things to look like reality,
  13. ** you could change the dimensions of the templates. for example, if your
  14. ** screen has a 2:1 aspect ratio (most are more like 1.4:1), use a [3][6]
  15. ** template instead of a [3][3] one. as long as you keep this in mind while
  16. ** viewing the results, it's probably not worth the effort.
  17. */
  18.  
  19. struct x { /* group the bit templates for an object */
  20.         long t;                 /* the object type      */
  21.         char t0[ZOOM0][ZOOM0];  /* tiny zoom template   */
  22.         char t1[ZOOM1][ZOOM1];  /* small zoom template  */
  23.         char t2[ZOOM2][ZOOM2];  /* medium zoom template */
  24.         char t3[ZOOM3][ZOOM3];  /* large zoom template  */
  25.         };
  26.  
  27. /* these got too big to keep in one file, so i moved them to include files */
  28.  
  29. struct x y1[] = {  /* hole templates */
  30. #include "bitmap1.h"
  31.         };
  32.  
  33. struct x y2[] = {  /* hole-related templates */
  34. #include "bitmap2.h"
  35.         };
  36.  
  37. struct x y3[] = {  /* non-hole-related templates */
  38. #include "bitmap3.h"
  39.         };
  40.  
  41. int z1 = sizeof(y1)/sizeof(y1[0]);  /* number of hole types             */
  42. int z2 = sizeof(y2)/sizeof(y2[0]);  /* number of hole-related types     */
  43. int z3 = sizeof(y3)/sizeof(y3[0]);  /* number of non-hole-related types */
  44.