Leaked source code of windows server 2003
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.

53 lines
932 B

  1. #include "cdt.h"
  2. typedef INT CD;
  3. // CaRD struct, this is what a card be
  4. typedef struct _crd
  5. {
  6. unsigned cd : 15; // card # (1..52)
  7. unsigned fUp : 1; // is this card up/down
  8. PT pt; // upper-left corner of card
  9. } CRD;
  10. /* WARNING: Order of su's is assumed */
  11. #define suClub 0
  12. #define suDiamond 1
  13. #define suHeart 2
  14. #define suSpade 3
  15. #define suMax 4
  16. #define suFirst suClub
  17. #define raAce 0
  18. #define raDeuce 1
  19. #define raTres 2
  20. #define raFour 3
  21. #define raFive 4
  22. #define raSix 5
  23. #define raSeven 6
  24. #define raEight 7
  25. #define raNine 8
  26. #define raTen 9
  27. #define raJack 10
  28. #define raQueen 11
  29. #define raKing 12
  30. #define raMax 13
  31. #define raNil 15
  32. #define raFirst raAce
  33. typedef INT RA;
  34. typedef INT SU;
  35. #define cdNil 0x3c
  36. #define cIDFACEDOWN (IDFACEDOWNLAST-IDFACEDOWNFIRST+1)
  37. #define SuFromCd(cd) ((cd)&0x03)
  38. #define RaFromCd(cd) ((cd)>>2)
  39. #define Cd(ra, su) (((ra)<<2)|(su))