home *** CD-ROM | disk | FTP | other *** search
- {∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞
- ┌───────────────────────────────────────────────────────────────────────────┐
- │EXAMPLE 6 & TGP is Copyright (c)1994,95 by Gunther Voet - aka Freaker / TuC│
- ├───────────────────────────────────────────────────────────────────────────┤
- │ Starfield:Sinecure/Optimization:Freaker/Music:MUSTAFA EROGLU (intro) │
- └───────────────────────────────────────────────────────────────────────────┘
- ∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞}
-
-
- PROGRAM EXAMPLE_6;
-
-
- {Example by Freaker / STARFIELD by Sinecure Copyright (c)1995 by TuC }
-
- {This example shows you how to use the fastload procedure to load a file, }
- {and play the music. In this routine, the bestcard is used (again :) }
-
-
-
- {$M 4096,0,8192} {This directive is NECESSARY for the mod-load}
- {2000 bytes heap & stacksize is REQUIRED for the player}
- {4096 bytes heap / 9128 stack is RECOMMENDED}
-
-
-
- {MUSIC ROUTINES}
- { V }
- USES TGP,TUC_DEMO;
- { ^ }
- {EXAMPLE GFX}
-
-
- begin
- debugmode:=true;
-
- Writeln('The best card found in this system is: ',tgp.bestcard);
- {By looking to the variable of tgp.bestcard, TGP will automatically search
- the best-card irq, dma, port, etc... You can use tgp.bestcard without
- making output to the screen. }
-
- tgp.device:=tgp.info.bestcard.device;
- tgp.musport:=tgp.info.bestcard.port;
- tgp.Irq:=tgp.info.bestcard.irq;
- tgp.Dma:=tgp.info.bestcard.dma;
-
-
- tgp.fastinit('EXAMPLE6.MOD',tgp.device,tgp.irq,tgp.dma,tgp.musport,freq(curfreq));
- {Fast initialize}
-
- TGP.STARTMUS; {MUSIC! MAESTRO}
-
- initstars; {Initialize star routines}
-
- repeat {Start of Repeat}
- {You can eventually call "TGP.POLLMUSIC" or "TGP.POLLBUFFER"
- if you experience problems using TGP with interrupt dependent tasks.}
-
- plotstars; {plotstars by sinecure !}
-
- until port[$60]=1; {repeat until port $60 = 1 (faster }
- {than keypressed}
-
- TGP.STOPMUS;
- TGP.UNLOADMUS; {ALWAYS uninitialize !!!!!!!}
-
- uninit_demounit; {Go back to textmode & showing credits}
- TGP.UNLOADMUS;
- end.
-