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

  1. /* the low-order bit indicates a hole */
  2. #define HOLE                    0x00000001L     /* a conducting hole */
  3.  
  4. /* traces radiating outward from a hole to a side or corner */
  5. #define HOLE_NORTH              0x00000002L     /* upward               */
  6. #define HOLE_NORTHEAST          0x00000004L     /* upward and right     */
  7. #define HOLE_EAST               0x00000008L     /* to the right         */
  8. #define HOLE_SOUTHEAST          0x00000010L     /* downward and right   */
  9. #define HOLE_SOUTH              0x00000020L     /* downward             */
  10. #define HOLE_SOUTHWEST          0x00000040L     /* downward and left    */
  11. #define HOLE_WEST               0x00000080L     /* to the left          */
  12. #define HOLE_NORTHWEST          0x00000100L     /* upward and left      */
  13.  
  14. /* straight lines through the center */
  15. #define LINE_HORIZONTAL         0x00000002L     /* left-to-right line   */
  16. #define LINE_VERTICAL           0x00000004L     /* top-to-bottom line   */
  17.  
  18. /* lines cutting across a corner, connecting adjacent sides */
  19. #define CORNER_NORTHEAST        0x00000008L     /* upper right corner   */
  20. #define CORNER_SOUTHEAST        0x00000010L     /* lower right corner   */
  21. #define CORNER_SOUTHWEST        0x00000020L     /* lower left corner    */
  22. #define CORNER_NORTHWEST        0x00000040L     /* upper left corner    */
  23.  
  24. /* diagonal lines through the center */
  25. #define DIAG_NEtoSW             0x00000080L     /* northeast to southwest */
  26. #define DIAG_SEtoNW             0x00000100L     /* southeast to northwest */
  27.  
  28. /* 135 degree angle side-to-far-corner lines */
  29. #define BENT_NtoSE              0x00000200L     /* north to southeast   */
  30. #define BENT_NtoSW              0x00000400L     /* north to southwest   */
  31. #define BENT_EtoSW              0x00000800L     /* east to southwest    */
  32. #define BENT_EtoNW              0x00001000L     /* east to northwest    */
  33. #define BENT_StoNW              0x00002000L     /* south to northwest   */
  34. #define BENT_StoNE              0x00004000L     /* south to northeast   */
  35. #define BENT_WtoNE              0x00008000L     /* west to northeast    */
  36. #define BENT_WtoSE              0x00010000L     /* west to southeast    */
  37.  
  38. /* 90 degree corner-to-adjacent-corner lines */
  39. #define ANGLE_NEtoSE            0x00020000L     /* northeast to southeast */
  40. #define ANGLE_SEtoSW            0x00040000L     /* southeast to southwest */
  41. #define ANGLE_SWtoNW            0x00080000L     /* southwest to northwest */
  42. #define ANGLE_NWtoNE            0x00100000L     /* northwest to northeast */
  43.  
  44. /* 45 degree angle side-to-near-corner lines */
  45. #define SHARP_NtoNE             0x00200000L     /* north to northeast   */
  46. #define SHARP_EtoNE             0x00400000L     /* east to northeast    */
  47. #define SHARP_EtoSE             0x00800000L     /* east to southeast    */
  48. #define SHARP_StoSE             0x01000000L     /* south to southeast   */
  49. #define SHARP_StoSW             0x02000000L     /* south to southwest   */
  50. #define SHARP_WtoSW             0x04000000L     /* west to southwest    */
  51. #define SHARP_WtoNW             0x08000000L     /* west to northwest    */
  52. #define SHARP_NtoNW             0x10000000L     /* north to northwest   */
  53.  
  54. /* directions the cell can be reached from (point to previous cell) */
  55. #define FROM_NORTH              1
  56. #define FROM_NORTHEAST          2
  57. #define FROM_EAST               3
  58. #define FROM_SOUTHEAST          4
  59. #define FROM_SOUTH              5
  60. #define FROM_SOUTHWEST          6
  61. #define FROM_WEST               7
  62. #define FROM_NORTHWEST          8
  63. #define FROM_OTHERSIDE          9
  64.  
  65. #define TOP     0
  66. #define BOTTOM  1
  67. #define EMPTY   0
  68. #define ILLEGAL -1
  69.