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.

214 lines
8.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) 1998-1998 Microsoft Corporation
  6. //
  7. // File: sjpers.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // SJPers.h #defines and structs from SuperJam! Used for loading personalities.
  11. #define CM_DEFAULT 2 // Prsonality.dwflags & CM_DEFAULT
  12. #define SP_A 1 // Use SP flags for templates
  13. #define SP_B 2
  14. #define SP_C 4
  15. #define SP_D 8
  16. #define SP_E 0x10
  17. #define SP_F 0x20
  18. #define SP_LETTER (SP_A | SP_B | SP_C | SP_D | SP_E | SP_F)
  19. #define SP_1 0x100
  20. #define SP_2 0x200
  21. #define SP_3 0x400
  22. #define SP_4 0x800
  23. #define SP_5 0x1000
  24. #define SP_6 0x2000
  25. #define SP_7 0x4000
  26. #define SP_ROOT (SP_1 | SP_2 | SP_3 | SP_4 | SP_5 | SP_6 | SP_7)
  27. #define SP_CADENCE 0x8000
  28. #define SPOST_CADENCE1 2 // Use the first cadence chord.
  29. #define SPOST_CADENCE2 4 // Use the second cadence chord.
  30. #define PF_FILL 0x0001 // Fill pattern
  31. #define PF_START 0x0002 // May be starting pattern
  32. #define PF_INTRO 0x0002
  33. #define PF_WHOLE 0x0004 // Handles chords on measures
  34. #define PF_HALF 0x0008 // Chords every two beats
  35. #define PF_QUARTER 0x0010 // Chords on beats
  36. #define PF_BREAK 0x0020
  37. #define PF_END 0x0040
  38. #define PF_A 0x0080
  39. #define PF_B 0x0100
  40. #define PF_C 0x0200
  41. #define PF_D 0x0400
  42. #define PF_E 0x0800
  43. #define PF_F 0x1000
  44. #define PF_G 0x2000
  45. #define PF_H 0x10000
  46. #define PF_STOPNOW 0x4000
  47. #define PF_INRIFF 0x8000
  48. #define PF_MOTIF 0x20000 // this pattern is a motif, not a regular pattern
  49. #define PF_BEATS ( PF_WHOLE | PF_HALF | PF_QUARTER )
  50. #define PF_RIFF ( PF_INTRO | PF_BREAK | PF_FILL | PF_END )
  51. #define PF_GROOVE ( PF_A | PF_B | PF_C | PF_D | PF_E | PF_F | PF_G | PF_H )
  52. /* SCTchord bBits flags ===============================================*/
  53. #define CHORD_INVERT 0x10 /* This chord may be inverted */
  54. #define CHORD_FOUR 0x20 /* This should be a 4 note chord */
  55. #define CHORD_UPPER 0x40 /* Shift upper octave down */
  56. #define CHORD_SIMPLE 0x80 /* This is a simple chord */
  57. #define CHORD_COUNT 0x0F /* Number of notes in chord (up to 15) */
  58. #pragma pack(1)
  59. typedef struct ChordExt FAR *LPCHORDEXT;
  60. struct ChordExt // Based on ChordSelection
  61. {
  62. LPCHORDEXT pNext;
  63. long time;
  64. long pattern; // Pattern that defines chord
  65. char name[12]; // Text for display
  66. char keydown; // Currently held down
  67. char root; // Root note of chord
  68. char inscale; // Member of scale
  69. char flat; // Display with flat
  70. short varflags; // Used to select appropriate variation
  71. short measure; // What measure
  72. char beat; // What beat this falls on
  73. unsigned char bits; // Invert and item count
  74. long scalepattern; // Scale Pattern for the chord
  75. long melodypattern;// Melody Pattern for the chord
  76. };
  77. typedef struct SinePost FAR *LPSINEPOST ;
  78. struct SinePost
  79. {
  80. LPSINEPOST pNext ; // The next personality in the list.
  81. ChordExt chord; // Chord for sign post.
  82. ChordExt cadence[2]; // Chords for cadence.
  83. DWORD chords; // Which kinds of signpost supported.
  84. DWORD flags;
  85. DWORD tempflags;
  86. };
  87. typedef struct ChrdEntry FAR *LPCHRDENTRY ;
  88. typedef struct NextChrd FAR *LPNEXTCHRD ;
  89. struct NextChrd
  90. {
  91. LPNEXTCHRD pNext; // List of chords to go to next.
  92. LPCHRDENTRY nextchord;
  93. unsigned long dwflags;
  94. short nweight; // Importance of destination chord.
  95. short nminbeats; // Min beats to wait till chord.
  96. short nmaxbeats; // Max beats to wait till chord.
  97. short nid; // ID of destination chord.
  98. };
  99. #define NEXTCHORD_SIZE (sizeof(NextChrd)-sizeof(LPNEXTCHRD)-sizeof(LPCHRDENTRY))
  100. #define CHORDENTRY_SIZE (sizeof(ChordExt)-sizeof(LPCHORDEXT)+sizeof(unsigned long)+sizeof(short))
  101. #define CE_SELECTED 1 // This is the active chord.
  102. #define CE_START 2
  103. #define CE_END 4
  104. #define CE_MEASURE 8
  105. #define CE_PATH 16
  106. #define CE_TREE 32
  107. struct ChrdEntry
  108. {
  109. LPCHRDENTRY pNext ; // The next personality in the list.
  110. LPNEXTCHRD nextchordlist; // List of chords to go to next.
  111. ChordExt chord; // Chord definition.
  112. unsigned long dwflags; // Various flags.
  113. short nid; // ID for pointer maintenance.
  114. };
  115. typedef struct SCTchord FAR *LPSCTCHORD ;
  116. struct SCTchord
  117. {
  118. LPSCTCHORD pNext; /* The next chord in the list. */
  119. long lDLL1; /* Reserved for use by score.dll */
  120. long lPattern; /* Pattern that defines chord. */
  121. char achName[12]; /* Chord name. */
  122. char chDLL2; /* Reserved for use by score.dll */
  123. char chRoot; /* Root note of chord. */
  124. char chDLL3; /* Reserved for use by score.dll */
  125. char chFlat; /* Indicates root is flat. */
  126. short nDLL4; /* Reserved for use by score.dll */
  127. short nMeasure; /* Measure this chord occurs. */
  128. char chBeat; /* Beat this chord falls on. */
  129. BYTE bBits; /* Flags used when playing chord */
  130. long lScalePattern; /* Scale Pattern for the chord. */
  131. long lMelodyPattern; /* Melody Pattern for the chord. */
  132. };
  133. typedef struct SCTpersonality FAR *LPSCTPERSONALITY ;
  134. struct SCTpersonality
  135. {
  136. LPSCTPERSONALITY pNext ; /* Next SCTpersonality in the list. */
  137. char achName[20] ; /* Name of composition personality. */
  138. char achDescription[80];/* Description of personality. */
  139. char achUserName[20];/* Description of personality. */
  140. LPVOID lpDLL1 ; /* Reserved for use by score.dll */
  141. long lScalePattern ; /* Scale pattern used by personality*/
  142. SCTchord chord[24] ; /* 24 note chord palette. */
  143. char chDefault ; /* 0=Not default. 1=Default. */
  144. char chDLL1 ; /* Reserved for use by score.dll */
  145. };
  146. typedef struct Prsonality FAR *LPPERSONALITY ;
  147. struct Prsonality
  148. {
  149. LPPERSONALITY pNext ; // The next personality in the list.
  150. LPCHRDENTRY chordlist; // All chords in the map.
  151. LPSINEPOST signpostlist; // All available sign posts.
  152. DWORD dwAA; // only valid for separately loaded personalities
  153. long scalepattern; // Scale for map.
  154. char name[20];
  155. char description[80];
  156. char username[20];
  157. SCTchord chord[24];
  158. unsigned long dwflags;
  159. long playlist; // Collection of NextChords for playback.
  160. LPCHRDENTRY firstchord;
  161. struct SCTpersonality* lpSCTpersonality;
  162. };
  163. typedef struct CommandExt FAR *LPCOMMAND;
  164. typedef struct CommandExt
  165. {
  166. LPCOMMAND pNext;
  167. long time; // Time, in clocks
  168. short measure; // Which measure
  169. DWORD command; // Command type
  170. DWORD chord; // Used by composition engine
  171. } CommandExt;
  172. typedef struct SCTcommand FAR *LPSCTCOMMAND ;
  173. typedef struct SCTcommand
  174. {
  175. LPSCTCOMMAND pNext ; // The next command in the list.
  176. long lDLL1 ; // Reserved for use by score.dll.
  177. short nMeasure ; // Measure this command occurs.
  178. DWORD dwCommand ; // Command type.
  179. DWORD dwChord ; // Signpost chord.
  180. } SCTcommand ;
  181. typedef struct SCTtemplate FAR *LPSCTTEMPLATE ;
  182. typedef struct SCTtemplate
  183. {
  184. LPSCTTEMPLATE pNext ; // The next template in the list.
  185. char achName[20] ; // Template name.
  186. char achType[20] ; // Template type.
  187. short nMeasures ;
  188. LPSCTCOMMAND lpSCTcommandList ; // Template commands.
  189. } SCTtemplate ;
  190. #pragma pack()