home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
476-500
/
apd483
/
colourravedemo.amos
/
colourravedemo.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1993-05-28
|
7KB
|
193 lines
' VU Colour Rave Demo - By D.Piper 1993
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Screen Open 0,640,200,2,Hires : Palette $0,$0 : Curs Off : Hide On : Break Off : Amos Lock : Led Off
Dim X(3),Y(3),A(3),SCIM(17),SCB(17),T$(9),MS$(17)
Global RCNT,STC,M$,T$(),MS$(),SCB(),A$
SETMESSAGE : CHECKTUNES
Screen Open 0,320,140,2,Lowres : Curs Off : Flash Off : Paper 0 : Pen 1 : Ink 1 : Cls
Screen Display 0,118,100,320,130 : Palette $0,$FFF
Screen Open 1,320,256,2,Lowres : Paper 0 : Pen 1 : Curs Off : Unpack 5 To 1
Shift Down 2,4,31,1 : Double Buffer : Screen To Front 0 : Screen 0
Autoback 0 : Bob Update Off : Auto View Off : Track Loop On
Track Play 10 : Set Rainbow 1,1,151,"","",""
For S=0 To 4
LEV=S : For C=0 To 29 : Read CC : Rain(1,LEV)=CC : LEV=LEV+5 : Next C
Restore DAT : Next S
Rainbow 1,1,100,135 : POWER=7 : SY#=100 : GRAV#=0.5 : MSPD=2
YB=129 : Y(0)=YB : Y(1)=YB : Y(2)=YB : Y(3)=YB : Auto View On : View
For E=0 To 16
S=E*20
SCB(E+1)=12+S
Next E
Do
Screen 1 : Inc SPD : If SPD<MSPD Then Goto SKIP2
If Key State(95)=True Then Goto SKIP2
For E=0 To 16
SCIM(E)=SCIM(E+1)
Next E
SKIP:
Inc RCNT : B$=Mid$(M$,RCNT,1)
A$=Lower$(B$) : STRINGPARSER : SCIM(17)=STC : If STC=50 Then RCNT=0 : Goto SKIP
If STC=60 and MSPD=2 Then MSPD=5 : Goto SKIP
If STC=60 and MSPD=5 Then MSPD=2 : Goto SKIP
SPD=0
For E=1 To 17
Bob E,SCB(E),219,SCIM(E)
Next E
SKIP2:
For D=0 To 3
Led Off
A(D)=Vumeter(D)
If Not A(D)=0 Then Y(D)=YB-A(D)*2 Else Y(D)=Y(D)+8
If Y(D)>YB Then Y(D)=YB
Next D
SY#=SY#-POWER+G#
G#=G#+GRAV#
Screen Display 0,118,SY#,320,130 : Rainbow 1,1,SY#,135
If SY#>108 Then G#=0 : POWER=Rnd(2)+6
Screen 0 : Ink 1 : Cls
For S=0 To 1
Polyline 0,YB+S To 60,YB+S To 85,Y(0)+S To 110,YB+S To 135,Y(1)+S To 160,YB+S To 185,Y(2)+S To 210,YB+S To 235,Y(3)+S To 260,YB+S To 320,YB+S
Next S
Screen 1 : Bob Update
If Mouse Key=1 Then _DO_F : End
If Mouse Key=2 Then _LOAD_TRACK
Loop
DAT:
Data $F00,$F10,$F20,$F40,$F50,$F60,$F70,$F80,$FA0,$FB0,$FC0,$FD0,$FF0,$BF0,$6F0,$1F0,$F4,$F8,$FD,$CF,$8F,$3F,$20F,$40F,$60F,$80F,$A0F,$C0F,$E0F,$F0E
Procedure _DO_F
Screen 0 : Cls : Set Rainbow 1,32,16,"","","" : Rainbow 1,32,300,16 : Colour 1,$0
Fade 3 : Screen 1 : Shift Off
Fade 3 : Wait 50 : Track Stop
End Proc
Procedure _LOAD_TRACK
On Error Proc SAFE
Resume Label SKIP3
If Key State(80)=True Then F$=T$(1) : Goto SKIP1
If Key State(81)=True Then F$=T$(2) : Goto SKIP1
If Key State(82)=True Then F$=T$(3) : Goto SKIP1
If Key State(83)=True Then F$=T$(4) : Goto SKIP1
If Key State(84)=True Then F$=T$(5) : Goto SKIP1
If Key State(85)=True Then F$=T$(6) : Goto SKIP1
If Key State(86)=True Then F$=T$(7) : Goto SKIP1
If Key State(87)=True Then F$=T$(8) : Goto SKIP1
If Key State(88)=True Then F$=T$(9) : Goto SKIP1
If Key State(89)=True Then F$=T$(0) : Goto SKIP1
Pop Proc
SKIP1:
If Exist(F$)=0 Then S$=" No tune found " : Goto SKIP2
If F$=T$(0) Then S$="Loading module 00"
If F$=T$(1) Then S$="Loading module 01"
If F$=T$(2) Then S$="Loading module 02"
If F$=T$(3) Then S$="Loading module 03"
If F$=T$(4) Then S$="Loading module 04"
If F$=T$(5) Then S$="Loading module 05"
If F$=T$(6) Then S$="Loading module 06"
If F$=T$(7) Then S$="Loading module 07"
If F$=T$(8) Then S$="Loading module 08"
If F$=T$(9) Then S$="Loading module 09"
SKIP2:
MESSAGEDISPLAY[S$]
If Exist(F$)=0 Then Pop Proc
Erase 10 : Track Load F$,10 : Track Play 10
SKIP3:
End Proc
Procedure STRINGPARSER
If A$="a" Then STC=1
If A$="b" Then STC=2
If A$="c" Then STC=3
If A$="d" Then STC=4
If A$="e" Then STC=5
If A$="f" Then STC=6
If A$="g" Then STC=7
If A$="h" Then STC=8
If A$="i" Then STC=9
If A$="j" Then STC=10
If A$="k" Then STC=11
If A$="l" Then STC=12
If A$="m" Then STC=13
If A$="n" Then STC=14
If A$="o" Then STC=15
If A$="p" Then STC=16
If A$="q" Then STC=17
If A$="r" Then STC=18
If A$="s" Then STC=19
If A$="t" Then STC=20
If A$="u" Then STC=21
If A$="v" Then STC=22
If A$="w" Then STC=23
If A$="x" Then STC=24
If A$="y" Then STC=25
If A$="z" Then STC=26
If A$="0" Then STC=27
If A$="1" Then STC=28
If A$="2" Then STC=29
If A$="3" Then STC=30
If A$="4" Then STC=31
If A$="5" Then STC=32
If A$="6" Then STC=33
If A$="7" Then STC=34
If A$="8" Then STC=35
If A$="9" Then STC=36
If A$="," Then STC=37
If A$="." Then STC=38
If A$="(" Then STC=39
If A$=")" Then STC=40
If A$="-" Then STC=41
If A$=" " Then STC=42
If A$="*" Then STC=50
If A$="^" Then STC=60
End Proc
Procedure SETMESSAGE
M$=" Welcome to Dels Colour Rave Demo "
M$=M$+"probably one of the most colourful and most eye-destroying demos ever "
M$=M$+"produced with amos. (hold help key to pause scrolltext.) "
M$=M$+"I was originally intending to have a number of tunes "
M$=M$+"built in but due to lack of chip ram (only 512K on my old A500) I have had to "
M$=M$+"assign them names on the disk and fix up a loader system. This means that you can select "
M$=M$+"the music by holding the right mouse button down and pressing F1 - F10 "
M$=M$+"to select modules saved in the current directory under ^DelDemo00.mod etc. ^, where 00 is the "
M$=M$+"tune number from 00 to 09. Where module 00 is F10 and module 01 is F1 etc. "
M$=M$+"N.B. only soundtracker or noisetracker modules should be used or the demo "
M$=M$+"may crash. If the tunes are not available in the current dirctory or an error occurs then the music will not change. "
M$=M$+"This demo was created on 26-1-93 on an a500 with 2.5 megs and 2 drives. "
M$=M$+"contact me for any graphics for games or anything else (I have written 2 games and am writing a third.) "
M$=M$+"Address.....^ Derek Piper 63, Hadley Road New Barnet Herts EN5 5QU."
M$=M$+" ^ Enjoy... del."
M$=M$+" Press Left mouse button to quit. *"
T$(0)=Dir$+"DelDemo00.Mod"
T$(1)=Dir$+"DelDemo01.Mod"
T$(2)=Dir$+"DelDemo02.Mod"
T$(3)=Dir$+"DelDemo03.Mod"
T$(4)=Dir$+"DelDemo04.Mod"
T$(5)=Dir$+"DelDemo05.Mod"
T$(6)=Dir$+"DelDemo06.Mod"
T$(7)=Dir$+"DelDemo07.Mod"
T$(8)=Dir$+"DelDemo08.Mod"
T$(9)=Dir$+"DelDemo09.Mod"
End Proc
Procedure CHECKTUNES
For E=0 To 9
If Exist(T$(E))=True Then Inc TP
Next E
Fade 1,$0,$FFF : Cls : Locate 0,7 : Centre "ColourRave Demo V1.0 - By Del 1993"
If Ntsc=True Then Locate 0,12 : Centre "Sorry this demo is PAL only !!" : Wait 150 : Fade 1 : Wait 20 : End
Locate 0,12 : Centre "Number of tunes found :"+Str$(TP)
Locate 0,17 : Centre "Chip Memory :"+Str$(Chip Free)+" Fast Memory :"+Str$(Fast Free)
Wait 120 : Fade 1 : Wait 20
End Proc
Procedure SAFE
MESSAGEDISPLAY[" Error no."+Str$(Errn)+" "]
Wait 100
Resume Label
End Proc
Procedure MESSAGEDISPLAY[MES$]
Screen 1
For E=1 To 17
B$=Mid$(MES$,E,1)
A$=Lower$(B$) : STRINGPARSER
Bob E,SCB(E),219,STC
Next E
Bob Update : Wait 65
End Proc