home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Computing 66
/
ac066b.adf
/
AMOS.DMS
/
AMOS.adf
/
amos_3d_demos
/
Car_Race.AMOS
/
Car_Race.amosSourceCode
Wrap
AMOS Source Code
|
1991-07-30
|
5KB
|
193 lines
'
' Car Race demo
'
' By Nick Harper
'
' (c) Copyright Europress / VooDoo Software 1991
'
Screen Open 0,320,200,16,Lowres
Extension_4_04D6 ":AMOS_3d_demos/objects"
Extension_4_0024 : Hide On : Curs Off : Cls 0
Extension_4_0054 195
Extension_4_0024
Extension_4_0016 "car1"
Extension_4_0016 "car2"
Extension_4_0016 "grid"
Extension_4_0016 "racelights"
Extension_4_0016 "streetlight"
Curs Off : Flash Off
Palette 0,$FFF
Curs Off : Flash Off : Cls 0 : Pen 1 : Paper 0
Locate 1,5 : Centre "DO YOU WANT LIGHTS ON?" : Locate 1,6 : Centre "PRESS Y OR N"
Locate 1,8 : Centre "NOTE - ALTHOUGH LIGHTS LOOK NICE" : Locate 1,9 : Centre "THEY WILL SLOW THE FRAME RATE!"
LGHT:
A$=Inkey$
If A$="" Then Goto LGHT
Clear Key
If Upper$(A$)="N" Then LGT=0 : Goto LHT
If Upper$(A$)="Y" Then LGT=1 : Goto LHT
Goto LGHT
LHT:
Double Buffer : Autoback 0
Extension_4_0036 3,"grid",0,-220,32500,-16380,0,0
Extension_4_0036 4,"racelights",0,600,31500,32760,0,0
Fade 2 : Wait 50
Restore LIGHT
If LGT=0 Then Goto LIGHT
For Z=5 To 10 : Read A,C : Extension_4_0036 Z,"streetlight",A,200,C,0,0,0
Next Z
LIGHT:
Data -1500,0,-1500,-75000,-1500,-150000
Data 1500,32500,1500,-32500,1500,-107500
STRT:
Extension_4_00EC 0,-2000,500,1000
Extension_4_0036 1,"car1",-500,0,35000,0,16380,0
Extension_4_0036 2,"car2",500,0,35000,0,16380,0
Extension_4_053C : Extension_4_0318 : Screen Swap : Wait 100
Fade 1,0,$FFF,,,,,,,$FFF,$C0,$AAA,$70
PAN1
Wait 50
PAN2
Wait 25
PAN4
Wait 25
PAN3
Wait 25
PAN5
Wait 25
Goto NICKS
End
Procedure PAN1
For Z=1 To 33
Extension_4_00D4 0,2,0,900
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Extension_4_01F8 0,3
Next Z
SPD=900
For Z=1 To 30
Extension_4_00D4 0,10,45,SPD
Extension_4_01F8 0,3
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
SPD=SPD-30
Next Z
For Z=1 To 80
Extension_4_00D4 0,120,20,-220
Extension_4_01F8 0,3
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Next Z
End Proc
Procedure PAN2
Extension_4_00EC 0,-1500,5000,31000
Extension_4_01A6 0,0,0,0
Extension_4_01F8 0,3
For Z=1 To 50
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Extension_4_00D4 0,0,-100,0
Extension_4_01F8 0,3
Next Z
End Proc
Procedure PAN3
Extension_4_00EC 0,0,2000,50000
Extension_4_01A6 0,0,32760,0
For Z=1 To 20
Extension_4_00D4 0,0,-100,-750
Extension_4_01F8 0,4
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Next Z
End Proc
Procedure PAN4
Extension_4_00EC 0,2500,1500,34500
Extension_4_01A6 0,0,0,0
Extension_4_01F8 0,3
Extension_4_00C2 1,"(1,-80,25)"
Extension_4_00C2 2,"(1,-40,50)"
For Z=1 To 55
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Next Z
End Proc
Procedure PAN5
For Z=1 To 25
Extension_4_00D4 0,0,0,200
Extension_4_018C 0,-70,27,0
Extension_4_053C : Extension_4_0318 : Screen Swap : Wait Vbl
Next Z
For Z=1 To 25
Extension_4_00D4 0,0,0,-200
Extension_4_01F8 0,1 : Extension_4_053C : Extension_4_0318 : Screen Swap : Wait Vbl
Next Z
End Proc
NICKS:
SPD1=0 : SPD2=0
FRM=0
SPD0=0
PAN6:
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Extension_4_01F8 0,1
Extension_4_00D4 1,0,0,-SPD1
Extension_4_00D4 2,0,0,-SPD2
Add SPD1,20
Add SPD2,30
If SPD1>605 Then SPD1=605
If SPD2>590 Then SPD2=590
If FRM>60 Then Gosub POON
Inc FRM
If Extension_4_013C(1)<-120000 Then SPD0=0 : BRK=0 : Goto PAN7
Goto PAN6
POON:
Extension_4_00D4 0,0,5,-SPD0
If Extension_4_013C(0)<-95000 Then Goto POONS
Add SPD0,50
If SPD0>1500 Then SPD0=1500
Return
POONS:
If SPD0>0 Then SPD0=SPD0-100
If Extension_4_0114(0)<-1500 Then Return
Extension_4_00D4 0,-100,100,0
Return
PAN7:
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Extension_4_01F8 0,1
Extension_4_00D4 0,0,-10,-SPD0
Extension_4_00D4 2,0,0,-SPD2
Extension_4_00D4 1,0,0,-SPD1
If BRK=0 Then Add SPD0,58
If SPD0=0 Then Add SPD2,-5 : Add SPD1,-50 : Gosub TURN1
If Extension_4_013C(0)<-130000 Then Add SPD0,-30 : Inc BRK
If SPD0<0 Then SPD0=0
If SPD2<0 Then SPD2=0
If SPD1<0 Then SPD1=0
If BRK=120 Then Goto FIN
Goto PAN7
TURN1:
Extension_4_018C 2,4000,2000,3000
If SPD1>0 Then Extension_4_018C 1,0,-3600,0
Return
FIN:
Wait 50
Fade 2 : Wait 50
Extension_4_0090 1 : Extension_4_0090 2
Goto STRT