home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Computing 66
/
ac066b.adf
/
AMOS.DMS
/
AMOS.adf
/
amos_3d_demos
/
Mad_Robot.AMOS
/
Mad_Robot.amosSourceCode
Wrap
AMOS Source Code
|
1991-07-30
|
3KB
|
115 lines
'
' The Mad Robot Demo
'
' By Nick Harper
'
' (c) Copyright Europress / VooDoo Software 1991
'
'
'
Curs Off : Flash Off
Screen Open 0,320,200,16,Lowres
Cls 0
Extension_4_0024
Extension_4_0054 200
Extension_4_04D6 ":AMOS_3d_demos/objects"
Extension_4_0016 "torso"
Extension_4_0016 "leg"
Extension_4_0016 "arm"
Extension_4_0016 "head"
Extension_4_0016 "stool"
Extension_4_0016 "animcube"
Fade 1 : Wait 20
Extension_4_0036 1,"torso",0,900,5000,0,0,0
Extension_4_0036 2,"leg",-200,700,5000,0,0,0
Extension_4_0036 3,"leg",200,700,5000,0,0,0
Extension_4_0036 4,"arm",-300,1200,5000,0,0,-5000
Extension_4_0036 5,"arm",330,1350,5000,0,0,0
Extension_4_0036 6,"head",0,1400,5000,0,0,0
Extension_4_0036 7,"stool",1000,-300,4500,0,0,0
Extension_4_0036 8,"stool",-700,-300,6500,0,0,0
Extension_4_00EC 0,1500,1000,500
Extension_4_01F8 0,1
Double Buffer : Autoback 0
Extension_4_053C
Extension_4_0318
Screen Swap
Hide On
Fade 1,$F38,$FFF,,,,,,,$FB9,$7F,$F,$BF,$A00,$500
HEAD=160
LLEG=200 : LLEGS=0
RLEG=-250 : RLEGS=1
USX=150 : USZ=150
BOUNCE=200
Set Rainbow 0,0,250,"(15,1,2)","(6,1,2)","(9,1,2)"
Rainbow 0,0,156,94
BODY=0 : BODYI=1
Do
Extension_4_01F8 0,1
Gosub SHIFTEM
Extension_4_053C
Extension_4_0318
Screen Swap
Wait Vbl
Gosub LEFT_ARM
Gosub RIGHT_ARM
Gosub LEFT_LEG
Gosub RIGHT_LEG
Gosub HEAD
Gosub BODY
If BNC=1 Then Gosub BOUNCES
Loop
HEAD:
Extension_4_00D4 6,0,HEAD,0
Extension_4_018C 6,0,0,1927
HEAD=HEAD-20
If HEAD>-161 Then Return
HEAD=160
ANG= Extension_4_01E4(6)
If Abs(ANG)<2000 Then Extension_4_01A6 6,0,0,0
Return
LEFT_ARM:
Extension_4_018C 5,0,2000,0
Extension_4_029C 5,4,0,HEAD,0,1
Extension_4_00D4 5,0,-HEAD,0
Return
RIGHT_ARM:
Extension_4_018C 4,3854,0,0
ANG= Extension_4_01E4(4)
If Abs(ANG)<2000 Then Extension_4_01A6 4,0,0,0
Return
LEFT_LEG:
If LLEGS=0 Then Extension_4_00D4 3,0,LLEG,0
If LLEGS=0 Then Extension_4_029C 3,4,0,-LLEG,0,1
If LLEGS=0 Then LLEG=LLEG-50
If LLEG=-250 and LLEGS=1 Then BNC=1 : Boom
If LLEG=-250 Then Inc LLEGS
If LLEGS=9 Then LLEGS=0 : LLEG=200
Return
RIGHT_LEG:
If RLEGS=0 Then Extension_4_00D4 2,0,RLEG,0
If RLEGS=0 Then Extension_4_029C 2,4,0,-RLEG,0,1
If RLEGS=0 Then RLEG=RLEG-50
If RLEG=-250 and RLEGS=1 Then BNC=1 : Boom
If RLEG=-250 Then Inc RLEGS
If RLEGS=9 Then RLEGS=0 : RLEG=200
Return
SHIFTEM:
Extension_4_00D4 0,USX,0,USZ
If Extension_4_0114(0)- Extension_4_0114(1)>4000 Then Add USX,-10
If Extension_4_0114(1)- Extension_4_0114(0)>4000 Then Add USX,10
If Extension_4_013C(0)- Extension_4_013C(1)>4000 Then Add USZ,-10
If Extension_4_013C(1)- Extension_4_013C(0)>4000 Then Add USZ,10
Return
BOUNCES:
Extension_4_00D4 7,0,BOUNCE,0
Extension_4_00D4 8,0,BOUNCE,0
Add BOUNCE,-100
If BOUNCE=-300 Then BOUNCE=200 : BNC=0
Return
BODY:
Extension_4_051E "animcube",0,BODY To 1,0,0,2
Add BODY,BODYI
If BODY=3 Then BODYI=-1
If BODY=0 Then BODYI=1
Return