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 2 & TGP is Copyright (c)1994,95 by Gunther Voet - aka Freaker / TuC│
- ├───────────────────────────────────────────────────────────────────────────┤
- │ Starfield:Sinecure/Optimization:Freaker/Music:TGR (phew) │
- └───────────────────────────────────────────────────────────────────────────┘
- ∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞}
-
-
- PROGRAM EXAMPLE_2;
-
- {This example shows you how to use the low level procedures to load a file }
- {by setting the port, irq, dma and device specified by yourself. If you }
- {define the wrong information the player will crash. If you want to load a }
- {new modfile, you must unload the modfile, and reload from memory. }
-
-
- {$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
- tgp.device:=6;
- tgp.musport:=tgp.detectgus; {Hardware detection can always give
- conflicts with other cards .. so
- the system can be unstable & crash!}
- tgp.Irq:=0;
- tgp.Dma:=0;
-
- TGP.INITPLAYER(tgp.Device,tgp.musport,tgp.Irq,tgp.Dma);
- {INITIALIZE PLAYER}
-
- TGP.LOADFILE('EXAMPLE2.MOD'); {LOAD FILE}
-
- TGP.INITCARD;
-
- 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; {Stop music (before unitialize)}
- TGP.UNLOADMUS; {ALWAYS uninitialize !!!!!!!}
-
- uninit_demounit {Go back to textmode & show copyright}
-
- end.
-