home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASHSC11.ZIP / TSTHSC.PAS < prev   
Pascal/Delphi Source File  |  1994-05-24  |  1KB  |  51 lines

  1. PROGRAM TestHscUnit;
  2.  
  3. (* Demo program for PLAYHSC unit by GLAMOROUS RAY^RADiCAL RHYTHMS *)
  4. (* The enclosed songs are copyrighted. CRYSTAL2  (c) Chris Korte, *)
  5. (* FANTASY (linked as object) (c) NEO Software                    *)
  6. (* Feel free to use this code as the base for your programs!      *)
  7.  
  8. USES PLAYHSC,CRT;
  9.  
  10. VAR
  11.   Music : HSC_obj;
  12.  
  13. {$F+}                            (* Declaration                  *)
  14. {$L MUSIC.OBJ}                   (*          for                 *)
  15. PROCEDURE MUSIC_DATA; EXTERNAL;  (*             external         *)
  16. {$F-}                            (*                   sound data *)
  17.  
  18. PROCEDURE WaitKey;
  19. VAR
  20.   Dummy : CHAR;
  21.   a     : INTEGER;
  22. BEGIN
  23.   REPEAT
  24.     Music.GetInfo;
  25.     GotoXY (1,2);
  26.     FOR a := 1 TO 39 DO Write (Music.Info[a]);
  27.     ClrEol;
  28.   UNTIL KeyPressed;
  29.   WHILE KeyPressed DO Dummy := ReadKey;
  30. END;
  31.  
  32. BEGIN
  33.   ClrScr;
  34.   WriteLN ('Small example for PLAYHSC V1.x - (w) 1994 by '+
  35.            'RAY^RADiCAL RHYTHMS');
  36.  
  37.   Music.Init(0);
  38.  
  39.   Music.LoadMem (@MUSIC_DATA); (* included file, using binobj.exe  *)
  40.   Music.Start;
  41.   WaitKey;
  42.  
  43.   IF Music.LoadFile ('CRYSTAL2.HSC') THEN BEGIN
  44.     Music.Start;
  45.     WaitKey;
  46.   END;
  47.  
  48.   Music.Fade;
  49.   Delay (4000);
  50.   Music.Done;
  51. END.