home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / TUCPL13.ZIP / TGP_EXAM.ZIP / EXAMPLE6.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-07-06  |  2.5 KB  |  69 lines

  1. {∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞
  2. ┌───────────────────────────────────────────────────────────────────────────┐
  3. │EXAMPLE 6 & TGP is Copyright (c)1994,95 by Gunther Voet - aka Freaker / TuC│
  4. ├───────────────────────────────────────────────────────────────────────────┤
  5. │      Starfield:Sinecure/Optimization:Freaker/Music:MUSTAFA EROGLU (intro) │
  6. └───────────────────────────────────────────────────────────────────────────┘
  7. ∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞}
  8.  
  9.  
  10. PROGRAM EXAMPLE_6;
  11.  
  12.  
  13. {Example by Freaker / STARFIELD by Sinecure        Copyright (c)1995 by TuC }
  14.  
  15. {This example shows you how to use the fastload procedure to load a file,    }
  16. {and play the music. In this routine, the bestcard is used (again :)         }
  17.  
  18.  
  19.  
  20. {$M 4096,0,8192} {This directive is NECESSARY for the mod-load}
  21.                  {2000 bytes heap & stacksize is REQUIRED for the player}
  22.                  {4096 bytes heap / 9128 stack is RECOMMENDED}
  23.  
  24.  
  25.  
  26.    {MUSIC ROUTINES}
  27.    { V }
  28. USES TGP,TUC_DEMO;
  29.             { ^ }
  30.             {EXAMPLE GFX}
  31.  
  32.  
  33. begin
  34.   debugmode:=true;
  35.  
  36.   Writeln('The best card found in this system is: ',tgp.bestcard);
  37.   {By looking to the variable of tgp.bestcard, TGP will automatically search
  38.   the best-card irq, dma, port, etc...   You can use tgp.bestcard without
  39.   making output to the screen.                                               }
  40.  
  41.   tgp.device:=tgp.info.bestcard.device;
  42.   tgp.musport:=tgp.info.bestcard.port;
  43.   tgp.Irq:=tgp.info.bestcard.irq;
  44.   tgp.Dma:=tgp.info.bestcard.dma;
  45.  
  46.  
  47.   tgp.fastinit('EXAMPLE6.MOD',tgp.device,tgp.irq,tgp.dma,tgp.musport,freq(curfreq));
  48.                                                         {Fast initialize}
  49.  
  50.   TGP.STARTMUS;                                         {MUSIC! MAESTRO}
  51.  
  52.   initstars;                            {Initialize star routines}
  53.  
  54.  repeat                                 {Start of Repeat}
  55. {You can eventually call "TGP.POLLMUSIC" or "TGP.POLLBUFFER"
  56.  if you experience problems using TGP with interrupt dependent tasks.}
  57.  
  58.   plotstars;                            {plotstars by sinecure !}
  59.  
  60.  until port[$60]=1;                     {repeat until port $60 = 1 (faster }
  61.                                         {than keypressed}
  62.  
  63.    TGP.STOPMUS;
  64.    TGP.UNLOADMUS;                       {ALWAYS uninitialize !!!!!!!}
  65.  
  66.    uninit_demounit;                     {Go back to textmode & showing credits}
  67.    TGP.UNLOADMUS;
  68. end.
  69.