home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume6 / tetrix / tet.h < prev   
C/C++ Source or Header  |  1989-02-28  |  1KB  |  48 lines

  1. #define NO_TYPE    0
  2. #define NO_CHAR    ' '
  3. #define BRITE_CHAR '$'
  4.  
  5. /* type numbers 1-3, 4-7, 9-11 etc represent the white, red, blue etc */
  6. /* pieces at different rotations */
  7. #define G_TYPE    4        /* Green pieces */
  8. #define G_CHAR    'G'
  9. #define R_TYPE    8        /* Red pieces */
  10. #define R_CHAR    'R'
  11. #define T_TYPE  12        /* Tan pieces */
  12. #define T_CHAR    'O'
  13. #define W_TYPE    16        /* White pieces */
  14. #define W_CHAR    'W'
  15. #define V_TYPE    20        /* Violet pieces */
  16. #define V_CHAR    'V'
  17. #define B_TYPE    24        /* Blue pieces */
  18. #define B_CHAR    'B'
  19. #define Y_TYPE    28        /* Yellow pieces */
  20. #define Y_CHAR    'Y'
  21.  
  22. #define MINX 15        /* defines corner screen position */
  23. #define MINY 1
  24.  
  25. #define BOARD_WIDE 10
  26. #define BOARD_HIGH 20
  27.  
  28. #define MAXX BOARD_WIDE+MINX
  29. #define MAXY BOARD_HIGH+MINY
  30.  
  31. #define STARTROW 1        /* defines starting position of pieces */
  32. #define STARTCOL 5
  33.  
  34. extern int Type, Row, Column, Pause, CurrentSpeed, FallingDown, Beep;
  35. extern char Board[BOARD_WIDE][BOARD_HIGH];
  36.  
  37. /* Macros */
  38. /* offset the character on screen by MINX and MINY */
  39. #define PUTCH(x,y,z) {  mvaddch(y+MINY,x+MINX,z); Board[x][y]=z; }
  40.  
  41. /* test whether a square is empty and legal */
  42. /*
  43. #define IS_FREE(x,y)  (((y >= 0) && (y < BOARD_HIGH) && \
  44.             (x >= 0) && (x < BOARD_WIDE)) && \
  45.             (Board[x][y] == NO_CHAR))
  46. */
  47. IS_FREE();
  48.