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 1 & TGP is Copyright (c)1994,95 by Gunther Voet - aka Freaker / TuC│
- ├───────────────────────────────────────────────────────────────────────────┤
- │ Starfield:Sinecure/Optimization:Freaker/Music:Jester (flowerpower) │
- └───────────────────────────────────────────────────────────────────────────┘
- ∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞TuC∞}
-
-
- PROGRAM EXAMPLE_4;
-
-
- {Example by Freaker / STARFIELD by Sinecure Copyright (c)1995 by TuC }
-
- {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
- 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.INITPLAYER(tgp.Device,tgp.musport,tgp.Irq,tgp.Dma); {INITIALIZE PLAYER}
-
- TGP.LOADFILE('EXAMPLE4.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;
- TGP.UNLOADMUS; {ALWAYS uninitialize !!!!!!!}
-
- uninit_demounit; {Go back to textmode & showing credits}
- TGP.UNLOADMUS;
- end.
-