Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
1.7 KiB

  1. /* Tables to generate Tables */
  2. /* Each row of rgChk contains the positions for a line (tictactoe)
  3. Each row of rgtbl contains a set of data to generate a sequence of lines.
  4. Normally a set of data contains cBlkRow lines, but -1 indicates only 1 line.
  5. */
  6. #define iposStart 0 /* Starting Position */
  7. #define iposOff 1 /* Offset between positions in a line */
  8. #define iposLine 2 /* Offset to first position in next line */
  9. #define i3x3 0
  10. #define i3x3x3 4
  11. #define i4x4x4 23
  12. #define c3x3 4
  13. #define c3x3x3 19
  14. #define c4x4x4 22
  15. #define k3x3 8
  16. #define k3x3x3 49
  17. #define k4x4x4 76
  18. BYTE rgtbl[c3x3 + c3x3x3 + c4x4x4][3] = {
  19. /*** 3 x 3 = 9 ***/
  20. {0, 1, 1},
  21. {0, 3, 4},
  22. {0, 4, -1},
  23. {2, 2, -1},
  24. /*** 3 x 3 x 3 = 27 ***/
  25. { 0, 1, 1}, /* X Plane */
  26. { 9, 1, 1},
  27. {18, 1, 1},
  28. { 0, 3, 22}, /* Y Plane */
  29. { 9, 3, 22},
  30. {18, 3, 22},
  31. { 0, 9, 12}, /* Z Plane */
  32. { 1, 9, 12},
  33. { 2, 9, 12},
  34. { 0, 4, 1}, /* X Diagonal */
  35. { 2, 2, 5},
  36. { 0, 10, 10}, /* Y Diagonal */
  37. { 2, 8, 14},
  38. { 0, 12, 4}, /* Z Diagonal */
  39. { 6, 6, 16},
  40. { 0, 13, -1}, /* Through Center */
  41. { 2, 11, -1},
  42. { 6, 7, -1},
  43. { 8, 5, -1},
  44. /*** 4 x 4 x 4 = 64 ***/
  45. { 0, 1, 1}, /* X Plane */
  46. {16, 1, 1},
  47. {32, 1, 1},
  48. {48, 1, 1},
  49. { 0, 4, 53}, /* Y Plane */
  50. {16, 4, 53},
  51. {32, 4, 53},
  52. {48, 4, 53},
  53. { 0, 16, 20}, /* Z Plane */
  54. { 1, 16, 20},
  55. { 2, 16, 20},
  56. { 3, 16, 20},
  57. { 0, 17, 17}, /* X Diagonal */
  58. { 3, 15, 23},
  59. { 0, 20, 5}, /* Y Diagonal */
  60. {12, 12, 29},
  61. { 0, 5, 1}, /* Z Diagonal */
  62. { 3, 3, 7},
  63. { 0, 21, -1}, /* Through center */
  64. { 3, 19, -1},
  65. {12, 13, -1},
  66. {15, 11, -1},
  67. };
  68. POS rgCorner[3][8] = {
  69. {0, 2, 6, 8, 0, 2, 6, 8},
  70. {0, 2, 6, 8, 18, 20, 24, 26},
  71. {0, 3, 12, 15, 48, 51, 60, 63}
  72. };