home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd453
/
3d_object_mover.amos
/
3d_object_mover.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
2KB
|
73 lines
' The essential 3D program:
'
' 3D Object Mover
'
' written by Brett George
'
'
' Press: 1 - Movement of place of object
' 2 - Movement of object
' Left Mouse - Zoom out
' Right Mouse - Zoom in
' Mouse - Movement of object
' Space - Reset Coordinates
' P - Print coordinates
'
'
' �
' Insert your own file here V
_DIRECTORY$="Df0:Objects/"
FILE$="Boat"
'
Extension_4_04D6 _DIRECTORY$
Extension_4_0016 FILE$
Global X,Y,Z,A,B,C
X=0 : Y=0 : Z=1000 : A=0 : B=5000 : C=-4000
Extension_4_0548
Screen Open 0,320,256,16,0
Double Buffer
Extension_4_0054 256
Extension_4_0036 1,FILE$,X,Y,Z,A,B,C
Palette 0,15,$AA0,,,,,,,$FFF,15,$777
Cls 0 : Autoback 0 : X Mouse=288 : Y Mouse=178
Hide On : �=1
Do
If �=1 Then MOVE�
If �=0 Then ROT�
A$=Inkey$
If A$<>""
If A$="1" : �=1 : End If
If A$="2" : �=0 : End If
If A$=" "
X=0 : Y=0 : Z=1000 : A=0 : B=5000 : C=-4000 : Extension_4_0090 1
Extension_4_0036 1,FILE$,X,Y,Z,A,B,C
End If
If A$="P"
Default
Print "Coordinates:"
Print X,Y,Z
Print A,B,C
Direct
End If
End If
Extension_4_00EC 1,X,Y,Z : Extension_4_01A6 1,A,B,C : Cls 0 : Extension_4_0318
Screen Swap : Cls 0 : Extension_4_0318 : Screen Swap : Wait Vbl
Loop
Procedure MOVE�
If X Mouse-288>0 Then Add X,100
If X Mouse-288<0 Then Add X,-100
If Y Mouse-178>0 Then Add Y,100
If Y Mouse-178<0 Then Add Y,-100
If Mouse Key=1 Then Add Z,100
If Mouse Key=2 Then Add Z,-100
X Mouse=288 : Y Mouse=178
End Proc
Procedure ROT�
If X Mouse-288>0 Then Add A,1000
If X Mouse-288<0 Then Add A,-1000
If Y Mouse-178>0 Then Add B,1000
If Y Mouse-178<0 Then Add B,-1000
If Mouse Key=1 Then Add C,1000
If Mouse Key=2 Then Add C,-1000
X Mouse=288 : Y Mouse=178
End Proc