home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / SOUNDUTL / MUSIQUE.ZIP / SOURCE.ZIP / MUSIQUE.H < prev    next >
Text File  |  1991-09-06  |  7KB  |  157 lines

  1. /* Warning! This C source contains extended characters! */
  2.  
  3. #define VERSION      "1.1" /* MUSIQUE version number */
  4. #define TRUE             1
  5. #define FALSE            0
  6. #define DISKNAMELENGTH   2 /* from 1 to 99 should be enough */
  7. #define SCORELENGTH      2 /* I guess - ± + and NP (no play) would cover it */
  8. #define DOSNAMELENGTH    8 /* don't put in the extension .MOD or .ZIP */
  9. #define SONGNAMELENGTH  19 /* according to module specs without EOS */
  10. #define LINELENGTH     128 /* maximum length of most strings */
  11. #define MAXSONGS       350 /* maximum number of songs */
  12. #define PATHLENGTH   25000 /* size of the pool of DOS paths */ 
  13. #define BUFFERSIZE    8192 /* big enough since PATHLENGTH is more important */
  14. #define PORT1        0x3BC /* parallel ports in the standard BIOS order */
  15. #define PORT2        0x378
  16. #define PORT3        0x278
  17. #define HIGHINT        0x8 /* high intensity mask */
  18. #define SCROLLDELAY      2 /* in 10msec */ 
  19. #define SHUTUPDELAY      2 /* in msec */
  20. #define NOTFOUNDDELAY  500 /* in msec */
  21. #define SNDFREQ        300 /* in Herz */
  22. #define SNDLENGTH       10 /* in msec */
  23. #define LANGUAGENUMBER   3 /* how many languages supported in current version */
  24. #define FRENCH           0
  25. #define ENGLISH          1
  26. #define GERMAN           2
  27. #define XRATIO           8 /* motion/pixel mouse ratios */
  28. #define YRATIO           8
  29. #define ODDDRIVE        -1 /* indicates drive not set yet */
  30. #define ODDPORTS      '\0' /* indicates ports not set yet */
  31. #define ODDMODE        -24 /* indicates video mode not set yet */
  32. #define ODDPATH        "." /* indicates no DOS path supplied */
  33. #define COMMENTFLAG    '%'
  34. #define FLAG1          '/' /* DOS style */
  35. #define FLAG2          '-' /* UNIX style */
  36. #define TEMPFLAG       'T' /* temporary drive letter follows */
  37. #define PAUSEFLAG      'P' /* pause before shelling for debugging */
  38. #define MODEFLAG       'I' /* for telling the video mode to be used */
  39. #define ENGLISHFLAG    'E' /* english */
  40. #define GERMANFLAG     'D' /* deutsch */
  41. #define FRENCHFLAG     'F' /* french*/
  42. #define COLORFLAG      'K' /* user defined color */
  43. #define QUESTIONFLAG   '?' /* syntax please */
  44. #define MOUSEFLAG      'M' /* use mouse as well */
  45. #define BIOSFLAG       'O' /* use BIOS calls only */
  46. #define NOPORTFLAG     '0' /* number of each parallel port present */
  47. #define PORT1FLAG      '1'
  48. #define PORT2FLAG      '2'
  49. #define PORT3FLAG      '3'
  50. #define HIGHFLAG       'H' /* high intensity for display */
  51. #define VERBOSEFLAG    'V' /* display all fields in menu */
  52. #define DOSFLAG        'N' /* display only DOS file name in menu */
  53. #define SONGFLAG       'S' /* display only song name in menu */
  54. #define SPEED1FLAG     'A' /* speed control for ModPlay */
  55. #define SPEED2FLAG     'B'
  56. #define SPEED3FLAG     'C'
  57. #define DEFAULTSPEED  "/b" /* must use small letter */
  58. #define KEYENTER    0x1C0D /* scan code & ASCII code */
  59. #define KEYSPACE    0x3920
  60. #define KEYESC      0x011B
  61. #define KEYPGUP     0x4900
  62. #define KEYPGDN     0x5100
  63. #define KEYLEFT     0x4B00
  64. #define KEYRIGHT    0x4D00
  65. #define KEYUP       0x4800
  66. #define KEYDOWN     0x5000
  67. #define KEYHOME     0x4700
  68. #define KEYEND      0x4F00
  69. #define SKEYPGUP    0x4939
  70. #define SKEYPGDN    0x5133
  71. #define SKEYLEFT    0x4B34
  72. #define SKEYRIGHT   0x4D36
  73. #define SKEYUP      0x4838
  74. #define SKEYDOWN    0x5032
  75. #define SKEYHOME    0x4737
  76. #define SKEYEND     0x4F31
  77. #define SKEYCENTER  0x4C35
  78. #define KEYATSLASH  0x0340
  79. #define KEYSTAR1    0x092A
  80. #define KEYSTAR2    0x372A
  81. #define DEFAULTMENU "musique"
  82. #define PGUP        " Pg Up "
  83. #define PGDN        " Pg Dn "
  84. #define MODPLAY0    "modplay"
  85. #define MODPLAY1    "modplay.com"
  86. #define MODPLAY2    "modplay.exe"
  87. #define MODPLAY3    "modplay.bat"
  88. #define PKUNZIP0    "pkunzip"
  89. #define PKUNZIP1    "pkunzip.exe"
  90. #define MPENDING    ".mod"
  91. #define PKENDING    ".zip"
  92. #define MENUENDING  ".men"
  93. #define STEREO      "/xs" /* uses in stereo the first two ports found */
  94. #define SINGLE      "/xm" /* uses in mono the first port found */
  95. #define SPEAKER     "/0"  /* uses the PC speaker if no port found */
  96. #define PORT1S      "3BC"
  97. #define PORT2S      "378"
  98. #define PORT3S      "278"
  99. #define FTITLE      "Menu pour ModPlay"
  100. #define ETITLE      "ModPlay Menu"
  101. #define GTITLE      "Menü für ModPlay"
  102. #define DEFAULTOUTLINE     4 /* red */
  103. #define DEFAULTTITLE       3 /* cyan */
  104. #define DEFAULTITEM        2 /* green */
  105. #define DEFAULTPICKED      3 /* cyan */
  106. #define DEFAULTCURRENT     1 /* blue */
  107. #define DEFAULTCURSOR      4 /* red */
  108. #define DEFAULTBORDER      0 /* black */
  109.  
  110. typedef struct {
  111.   char diskname[DISKNAMELENGTH+1]; /* diskette name for A: and B: users */
  112.   char score[SCORELENGTH+1];       /* score for the current module */
  113.   char *DOSpath;                   /* DOS path name searched first */
  114.   char DOSname[DOSNAMELENGTH+1];   /* DOS file name used */
  115.   char songname[SONGNAMELENGTH+1]; /* Official consistent song name */
  116.   int  picked;                     /* priority for playing (0=NP) */
  117. } SONGTYPE;
  118.  
  119. typedef struct {
  120.   int songnumber;  /* total number of songs */
  121.   int songcorner;  /* song to appear in upper left corner of menu */
  122.   int songcurrent; /* song currently selected */
  123.   int songpriority; /* priority for next song selected for playing */
  124.   SONGTYPE song[MAXSONGS+1]; /* song 0 is BLANK */
  125.   char songpath[PATHLENGTH+1]; /* big array of consecutive strings for paths */
  126.   int songpathoffset; /* next chunk free in path pool */
  127. } SONGSTYPE;
  128.  
  129. typedef struct {
  130.   int currentdrive; /* 0=A 1=B etc */
  131.   int tempdrive;
  132.   char speed[3]; /* "/a" or "/b" or "/c" */
  133.   int mouse; /* indicates if mouse is used */
  134.   int pause; /* must pause before system() calls */
  135.   int rawvideo; /* bypass BIOS or not */
  136.   int videosegment; /* video RAM segment (B000H or B800H) */
  137.   int verbose; /* display all fields in menu */
  138.   int DOS; /* display DOS file name only in menu */
  139.   int modplaycopied; /* temporary copy indicator */
  140.   int pkunzipcopied,pkunzipfound;
  141.   char ports[10]; /* typical "/xs3BC378" or "/0" for ModPlay */
  142.   int A,B,C; /* which parallel ports are used */
  143.   int videomode; /* startup video mode */
  144.   int itemlength; /* width of a menu item */
  145.   int maxcolumn,maxline; /* screen size */
  146.   int bigcolumn,bigline; /* number of menu items visible */
  147.   int hugeline; /* number of menu items visible and invisible */
  148.   int leftcolumn; /* columns left over used for nice item column spacing */
  149. } PARAMETERTYPE;
  150.  
  151. typedef struct {
  152.   int x,y; /* coordinates from 0 to MAXMOUSE */
  153.   int left,right; /* button status */
  154.   char c; /* character on which the mouse cursor sits */
  155.   int color; /* original color of this character */
  156. } MOUSETYPE;
  157.