home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 451-475 / apd453 / 3d_object_mover.amos / 3d_object_mover.amosSourceCode
AMOS Source Code  |  1993-01-08  |  2KB  |  73 lines

  1. ' The essential 3D program:
  2. '
  3. '    3D Object Mover 
  4. '
  5. ' written by Brett George
  6. '
  7. '
  8. ' Press:  1           -   Movement of place of object      
  9. '         2           -   Movement of object     
  10. '         Left Mouse  -   Zoom out       
  11. '         Right Mouse -   Zoom in    
  12. '         Mouse       -   Movement of object     
  13. '         Space       -   Reset Coordinates    
  14. '         P           -   Print coordinates  
  15. '
  16. '
  17. '                           ï¿½  
  18. ' Insert your own file here V  
  19. _DIRECTORY$="Df0:Objects/"
  20. FILE$="Boat"
  21. '
  22.  Extension_4_04D6 _DIRECTORY$
  23.  Extension_4_0016 FILE$
  24. Global X,Y,Z,A,B,C
  25. X=0 : Y=0 : Z=1000 : A=0 : B=5000 : C=-4000
  26.  Extension_4_0548 
  27. Screen Open 0,320,256,16,0
  28. Double Buffer 
  29.  Extension_4_0054 256
  30.  Extension_4_0036 1,FILE$,X,Y,Z,A,B,C
  31. Palette 0,15,$AA0,,,,,,,$FFF,15,$777
  32. Cls 0 : Autoback 0 : X Mouse=288 : Y Mouse=178
  33. Hide On : ï¿½=1
  34. Do 
  35.    If ï¿½=1 Then MOVE�
  36.    If ï¿½=0 Then ROT�
  37.    A$=Inkey$
  38.    If A$<>""
  39.       If A$="1" : ï¿½=1 : End If 
  40.       If A$="2" : ï¿½=0 : End If 
  41.       If A$=" "
  42.          X=0 : Y=0 : Z=1000 : A=0 : B=5000 : C=-4000 : Extension_4_0090 1
  43.           Extension_4_0036 1,FILE$,X,Y,Z,A,B,C
  44.       End If 
  45.       If A$="P"
  46.          Default 
  47.          Print "Coordinates:"
  48.          Print X,Y,Z
  49.          Print A,B,C
  50.          Direct 
  51.       End If 
  52.    End If 
  53.     Extension_4_00EC 1,X,Y,Z : Extension_4_01A6 1,A,B,C : Cls 0 : Extension_4_0318 
  54.    Screen Swap : Cls 0 : Extension_4_0318 : Screen Swap : Wait Vbl 
  55. Loop 
  56. Procedure MOVE�
  57.    If X Mouse-288>0 Then Add X,100
  58.    If X Mouse-288<0 Then Add X,-100
  59.    If Y Mouse-178>0 Then Add Y,100
  60.    If Y Mouse-178<0 Then Add Y,-100
  61.    If Mouse Key=1 Then Add Z,100
  62.    If Mouse Key=2 Then Add Z,-100
  63.    X Mouse=288 : Y Mouse=178
  64. End Proc
  65. Procedure ROT�
  66.    If X Mouse-288>0 Then Add A,1000
  67.    If X Mouse-288<0 Then Add A,-1000
  68.    If Y Mouse-178>0 Then Add B,1000
  69.    If Y Mouse-178<0 Then Add B,-1000
  70.    If Mouse Key=1 Then Add C,1000
  71.    If Mouse Key=2 Then Add C,-1000
  72.    X Mouse=288 : Y Mouse=178
  73. End Proc