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.

106 lines
1.6 KiB

  1. /****************/
  2. /* file: rtns.h */
  3. /****************/
  4. #define lvlLevel 20
  5. #define lvlGameOver 21
  6. #define lvlMax 20
  7. #define cLivesStart 3
  8. #define cLivesMax 9
  9. #define xMax 33
  10. #define yMax 34
  11. #define posMax (xMax*yMax)
  12. #define posNW 0
  13. #define posNE (xMax-1)
  14. #define posSW (posMax-xMax)
  15. #define posSE (posMax-1)
  16. #define posEnter (posMax - 17) /* Entrance: Bottom Center */
  17. #define posLeave 16 /* Exit: Top Center */
  18. /*** Bitmaps ***/
  19. /* Blocks */
  20. #define blkNull 0
  21. #define blkFood 1
  22. #define blkPlum 2
  23. #define blkXXXX 3
  24. #define blkHeadN 4
  25. #define blkHeadE 5
  26. #define blkHeadS 6
  27. #define blkHeadW 7
  28. #define blkTailN 8
  29. #define blkTailE 9
  30. #define blkTailS 10
  31. #define blkTailW 11
  32. #define blkBodyNE 12
  33. #define blkBodySE 13
  34. #define blkBodySW 14
  35. #define blkBodyNW 15
  36. #define blkBodyNS 16
  37. #define blkBodyEW 17
  38. #define blkMax 18
  39. #define blkWallEW 0x1111
  40. #define blkWallNS 0x1044
  41. #define blkWallNW 0x1050
  42. #define blkWallNE 0x1141
  43. #define blkWallSW 0x1014
  44. #define blkWallSE 0x1105
  45. /*** Keys ***/
  46. #define keyHelp '?'
  47. #define keyHelp2 '/'
  48. #define keyStart ' '
  49. #define keyPref 'P'
  50. #define keyPref2 'p'
  51. #define keyPanic 27 /* esc */
  52. #define dirN 0
  53. #define dirE 1
  54. #define dirS 2
  55. #define dirW 3
  56. #define dirLft -1
  57. #define dirRht +1
  58. #define skillBegin 0
  59. #define skillInter 1
  60. #define skillExpert 2
  61. #define tickNil -1
  62. typedef INT TICK; /* Ticks (1/10 of a second) */
  63. typedef INT BLK; /* Block */
  64. typedef INT DIR; /* Direction (N,E,S,W) */
  65. typedef INT POS; /* Facing | display style */
  66. /*** Routines ***/
  67. VOID StartLevel(VOID);
  68. VOID StartGame(INT);
  69. VOID DoTimer(VOID);
  70. VOID DoChangeDir(DIR);
  71. VOID DoChangeRelDir(DIR);