home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 551-575 / apd560 / amoner5 / editor / amos_3d.asc < prev    next >
Text File  |  1993-11-29  |  24KB  |  855 lines

  1. WARNING:  NO BANKS ARE INCLUDED.  YOU'LL NEED TO MODIFY THE CALLS TO THE
  2. SPRITES, PAC.PICs AND SAMPLES.  THIS IS JUST THE SOURCE
  3.  
  4. Rem      AMOS 3D Demo by Nick Harper  (c) 1991 Europress Software Ltd
  5. Dir$="AMONER004 Extras:AMOS_3D_Demo" : Auto View Off
  6. Global ANG
  7. SETUP
  8. SHAPES
  9. PICCIES : Auto View On
  10. While True
  11.    MESSAGE
  12.    OBJECTS
  13.    PAN1
  14.    PAN2
  15.    MONITOR
  16.    PANEL
  17.    AMOS
  18.    STARS
  19.    TDSHIP
  20.    PLUG
  21.    CAR_RACE
  22.    PLUG
  23.    TV
  24.    TV_BOOM
  25.    SMALL_BLOCK
  26.    OM
  27.    CREDITS
  28. Wend
  29. Procedure PAN1
  30.    Td Move 0,0,5000,0 : Td Cls : Td Redraw
  31.    Fade 1,0,$FFF,,,,,,,,$FFF,$F,$AAA,$BB9,0,$996
  32.    For Z=1 To 50
  33.       Td Cls
  34.       Td Face 0,1
  35.       Td Redraw
  36.       Screen Swap
  37.       Wait Vbl
  38.       Td Move Rel 0,55,-55,260
  39.    Next Z
  40.    Td Object 2,"disc",-4775,875,12100,-16380,-16380,0
  41.    For Z=1 To 27
  42.       Td Move Rel 2,209,-5,84
  43.       Td Face 0,1
  44.       Td Cls
  45.       Td Redraw
  46.       Screen Swap
  47.       Wait Vbl
  48.    Next Z
  49.    Restore DTA
  50.    For Z=1 To 53
  51.       Read A,B,C,D,E,F
  52.       Td Move Rel 2,A,B,C : Td Angle Rel 2,D,E,F
  53.       Td Face 0,2
  54.       Td Cls
  55.       Td Redraw
  56.       Screen Swap
  57.       Td Move Rel 0,-20,-20,0
  58.       Wait Vbl
  59.    Next Z
  60.    Td Kill 2 : Sam Play 1,2,8000
  61.    Td Cls
  62.    Td Redraw
  63.    Screen Swap
  64.    DTA:
  65.    Data 180,0,50,-2000,0,0
  66.    Data 130,10,30,-2000,0,0
  67.    Data 70,30,10,-2000,0,0
  68.    Data 20,60,0,-2000,0,0
  69.    Data 0,90,0,-2000,0,0
  70.    Data 0,130,0,-3000,0,0
  71.    Data 0,170,0,-3000,0,0
  72.    Data 0,160,0,0,0,0
  73.    Data 0,140,0,0,0,0
  74.    Data 0,110,0,0,0,0
  75.    Data 0,70,0,0,0,0
  76.    Data 0,20,0,0,0,0
  77.    Data 0,-20,0,0,0,2000
  78.    Data 0,-30,0,0,0,3000
  79.    Data 0,-40,0,0,0,3000
  80.    Data 0,-50,0,0,0,3000
  81.    Data 0,-60,0,0,0,3000
  82.    Data 0,-70,0,0,0,3000
  83.    Data 0,-80,0,0,0,3000
  84.    Data 0,-90,0,0,0,3000
  85.    Data 0,-100,0,0,0,3000
  86.    Data 0,-100,0,0,0,3000
  87.    Data 0,-100,0,0,0,3000
  88.    Data 10,-90,10,0,0,2000
  89.    Data 30,-80,20,0,0,2000
  90.    Data 50,-70,30,0,1500,2000
  91.    Data 70,-60,40,-1000,2000,2000
  92.    Data 80,-50,50,-1000,2000,2000
  93.    Data 90,-40,60,-1000,2000,1000
  94.    Data 80,-30,70,-1000,2000,1000
  95.    Data 70,-30,80,-1000,2000,500
  96.    Data 60,-30,90,-1000,2000,0
  97.    Data 50,-30,100,-1000,2000,-500
  98.    Data 40,-30,90,-1000,2000,-1000
  99.    Data 30,-30,90,-1000,1500,-1000
  100.    Data 20,-40,90,-2000,1000,-1000
  101.    Data 10,-50,90,-1000,100,-1000
  102.    Data 0,-60,80,-1000,1000,-1000
  103.    Data 0,-70,70,-1000,1000,-1000
  104.    Data 0,-50,60,-1000,1000,-1000
  105.    Data -20,-40,50,-1000,100,1000
  106.    Data -40,-30,40,-1000,1000,500
  107.    Data -50,-20,30,-750,750,0
  108.    Data -70,0,20,-750,500,-500
  109.    Data -40,0,10,-750,500,-500
  110.    Data -50,0,0,-500,500,-500
  111.    Data -60,0,0,0,750,-500
  112.    Data -70,0,0,0,1000,-500
  113.    Data -80,0,0,0,1000,-500
  114.    Data -90,0,0,0,1000,-250
  115.    Data -100,0,0,0,1000,0
  116.    Data -140,0,0,0,1000,0
  117.    Data -180,0,0,0,0,0
  118. End Proc
  119. Procedure PAN2
  120.    For Z=1 To 10
  121.       Td Angle Rel 0,294,-68,0
  122.       Td Cls
  123.       Td Redraw
  124.       Screen Swap
  125.       Wait Vbl
  126.    Next Z
  127.    For Z=1 To 40
  128.       Td Move Rel 0,-43,-10,60
  129.       Td Face 0,3
  130.       Td Cls
  131.       Td Redraw
  132.       Screen Swap
  133.       Wait Vbl
  134.    Next Z
  135.    For Z=1 To 20
  136.       Td Move Rel 0,0,0,60
  137.       Td Face 0,3
  138.       Td Cls
  139.       Td Redraw
  140.       Screen Swap
  141.       Wait Vbl
  142.    Next Z
  143.    Flash Off
  144. End Proc
  145. Procedure SHAPES
  146.    Td Clear All
  147.    Td Screen Height 200
  148.    Td Dir "AMONER004 Extras:AMOS_3D_Demo/objects"
  149.    Td Load "amiga"
  150.    Td Load "disc"
  151.    Td Load "monitor1"
  152.    Td Load "lettera"
  153.    Td Load "letterm"
  154.    Td Load "lettero"
  155.    Td Load "letters"
  156.    Td Load "ship1"
  157.    Td Load "car2"
  158.    Td Load "grid"
  159.    Td Load "racelights"
  160.    Td Load "car1"
  161.    Td Load "small_cube"
  162.    Td Load "tv"
  163.    Td Load "tv_anim"
  164.    Td Load "light_anim"
  165.    Td Load "cursor"
  166.    Td Load "umb"
  167.    Td Load "satellite"
  168.    Td Load "missile1"
  169.    Td Load "cursor2"
  170.    Td Load "voodoo"
  171. End Proc
  172. Procedure MESSAGE
  173.    Screen Hide 2 : Screen To Back 2
  174.    Screen Open 1,320,200,2,Lowres : Curs Off : Cls 0 : Palette 0,$FFF
  175.    Screen Open 0,320,200,16,Lowres : Screen To Front 0
  176.    Cls 0
  177.    Autoback 0 : Double Buffer
  178.    Ink 1,0
  179.    Dim A$(9)
  180.    A$(1)="All the hype on 3D can now be"
  181.    A$(2)="turned into reality with AMOS 3D."
  182.    A$(3)="Two years of development have"
  183.    A$(4)="resulted in this easy-to-use and"
  184.    A$(5)="comprehensive 3D extension to the"
  185.    A$(6)="already powerful AMOS - The Creator."
  186.    A$(7)="         "
  187.    A$(8)="This demo was written after only 3"
  188.    A$(9)="weeks of experience with AMOS 3D."
  189.    LINE=1 : LET=1 : RT=0 : YP=1400
  190.    Td Move 0,0,0,0 : Td Angle 0,0,0,0
  191.    Td Object 1,"cursor",-2800,1400,5000,0,0,0
  192.    Td Cls
  193.    Td Redraw
  194.    Screen Swap
  195.    Fade 1,0,$FFF,,,,,,,,$9F9,$F0,$80,$5F5,$C0,$A0 : Wait 20
  196.    Screen 1
  197.    Set Font 1
  198.    Repeat
  199.       XS=Td Position X(1) : YS=Td Position Y(1)
  200.       If RT=0 Then Goto MV
  201.       If YS>YP Then Td Move Rel 1,0,(YP-YS)/3,0
  202.       If XS>-2700 Then Td Move Rel 1,-300,0,0
  203.       If XS<-2699 Then RT=0
  204.       Goto MV2
  205.       MV:
  206.       Screen 1
  207.       XL=Td Screen X(XS,YS,5000) : YT=Td Screen Y(XS,YS,5000)
  208.       XT=Text Length(Mid$(A$(LINE),1,LET))
  209.       Ink 1,0
  210.       If XL>XT Then Text 8,YT+4,Mid$(A$(LINE),1,LET) : Inc LET
  211.       If LET>Len(A$(LINE)) Then RT=1 : Add YP,-300 : Inc LINE : LET=1
  212.       Screen 0
  213.       Td Move Rel 1,120,0,0
  214.       MV2:
  215.       Td Angle Rel 1,1600,-1800,1500
  216.       Td Cls
  217.       Td Redraw
  218.       Td Background 1,0,0,320,200 To 0,0
  219.       Screen Swap
  220.       Wait Vbl
  221.    Until LINE=10
  222.    For Z=1 To 50
  223.       Td Move Rel 1,-95,35,-Z*10 : Td Angle Rel 1,2000,-2700,2500
  224.       Td Cls
  225.       Td Redraw
  226.       Td Background 1,0,0,320,200 To 0,0
  227.       Screen Swap
  228.       Wait Vbl
  229.       If Z=20 Then Sam Play 1,1,6000
  230.    Next Z
  231.    Fade 2 : Wait 40 : Cls 0 : Screen Swap : Wait 20 : Td Kill 1
  232.    Screen 1 : Cls 0 : Screen 0
  233. End Proc
  234. Procedure MONITOR
  235.    Unpack 5 To 0 : Screen Swap
  236.    Fade 2,0,$FFF,$DDE,$CCD,$BBC,$99C,$88B,$77A,$669,$225,$124,$113,$DDF,$88E,$34D,$11D
  237.    Wait 160
  238.    Fade 2 : Wait 40 : Cls 0 : Screen Swap : Wait 20
  239.    Td Kill 1 : Td Kill 3
  240. End Proc
  241. Procedure PICCIES
  242.    Screen Open 2,320,38,8,Lowres : Set Font 1
  243.    Load Iff "text_panel.iff",2
  244.    Screen Display 2,128,50,320,38
  245.    Screen Hide 2
  246.    Load "modeller.abk",6
  247.    Load "perspective.abk",4
  248.    Load "intropac.abk",5
  249.    Load "plug.abk",7
  250.    Sam Bank 15 : Load "samples.abk",15
  251. End Proc
  252. Procedure SETUP
  253.    Hide On : Get Disc Fonts
  254.    Degree
  255.    Load "3dmusic.abk"
  256.    Load "pop.abk"
  257. End Proc
  258. Procedure OBJECTS
  259.    Td Object 1,"amiga",0,50,15000,0,32760,0
  260.    Td Object 3,"monitor1",0,650,18000,0,0,0
  261. End Proc
  262. Procedure PANEL
  263.    Screen 2 : Fade 1 : Wait 15
  264.    Screen To Front 2
  265.    Screen Show 2
  266. End Proc
  267. Procedure AMOS
  268.    Ink 4 : Bar 5,5 To 314,32 : Ink 1,4
  269.    Set Font 1
  270.    Text 10,15,"30 new AMOS commands and an amazing"
  271.    Text 6,28,"Object Modeller bring 3D to your Amiga"
  272.    Fade 2,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF
  273.    Music 1 : Tempo 28 : Wait 30
  274.    Screen Open 1,320,200,8,Lowres : Screen Hide 1 : Screen 1 : Cls 0
  275.    Unpack 4 To 1 : Screen Hide 1 : Screen 0
  276.    Autoback 0 : Double Buffer
  277.    Td Move 0,0,0,0 : Td Angle 0,0,0,0
  278.    Td Object 1,"lettera",-1670,535,3000,0,0,0 : Td Object 2,"letterm",1670,535,3000,0,0,0
  279.    Td Object 3,"lettero",-1670,-700,3000,0,0,0 : Td Object 4,"letters",1670,-700,3000,0,0,
  280.    Flash Off
  281.    Td Cls
  282.    Td Redraw
  283.    Td Background 1,0,0,320,200 To 0,0
  284.    Screen Swap
  285.    Fade 2,0,$FFF,$DDD,$BBB,$888,$FF,$BF,$8F,,$7F,$F,$FFF
  286.    Wait 65
  287.    Dim X(4),Y(4),Z(4),XI(4),YI(4),ZI(4),XP(4),CI(4) : DN=0
  288.    Restore DTA1
  289.    For QZ=1 To 4 : Read X(QZ),Y(QZ),XP(QZ)
  290.       TT=Rnd(4)-2 : If TT=0 Then TT=2 : TT=TT*2
  291.       CI(QZ)=2500*TT : Z(QZ)=3000 : XI(QZ)=0 : YI(QZ)=0 : ZI(QZ)=0
  292.    Next QZ
  293.    DTA1:
  294.    Data -1670,535,-620,1670,535,-200,-1670,-700,200,1670,-700,640
  295.    Repeat
  296.       Td Cls
  297.       Td Redraw
  298.       Td Background 1,0,0,320,200 To 0,0
  299.       Screen Swap
  300.       Wait Vbl
  301.       For PQ=1 To 4
  302.          Td Angle Rel PQ,0,0,CI(PQ)
  303.          Add X(PQ),XI(PQ) : Add Y(PQ),YI(PQ) : Add Z(PQ),ZI(PQ)
  304.          Td Move PQ,X(PQ),Y(PQ),Z(PQ)
  305.          If Y(PQ)<-90 and YI(PQ)<1 Then Add YI(PQ),40
  306.          If Y(PQ)<-90 and YI(PQ)>0 Then Add YI(PQ),20
  307.          If Y(PQ)>-90 and YI(PQ)>0 Then Add YI(PQ),-40
  308.          If Y(PQ)>-90 and YI(PQ)<1 Then Add YI(PQ),-20
  309.          If X(PQ)<XP(PQ) and XI(PQ)<1 Then Add XI(PQ),40
  310.          If X(PQ)<XP(PQ) and XI(PQ)>0 Then Add XI(PQ),20
  311.          If X(PQ)>XP(PQ) and XI(PQ)>0 Then Add XI(PQ),-40
  312.          If X(PQ)>XP(PQ) and XI(PQ)<1 Then Add XI(PQ),-20
  313.          If Z(PQ)<3000 and ZI(PQ)<1 Then Add ZI(PQ),70
  314.          If Z(PQ)<3000 and ZI(PQ)>0 Then Add ZI(PQ),30
  315.          If Z(PQ)>3000 and ZI(PQ)>0 Then Add ZI(PQ),-70
  316.          If Z(PQ)>3000 and ZI(PQ)<1 Then Add ZI(PQ),-30
  317.          If Abs(Y(PQ)+90)<20 Then Y(PQ)=-90 : YI(PQ)=0
  318.          If Abs(X(PQ)-XP(PQ))<20 Then X(PQ)=XP(PQ) : XI(PQ)=0
  319.          If Abs(Z(PQ)-3000)<40 Then Z(PQ)=3000 : ZI(PQ)=0
  320.          If Y(PQ)=-90 and X(PQ)=XP(PQ) and Z(PQ)=3000 and Td Attitude C(PQ)<Abs(CI(PQ)) and CI(PQ)<>0 Then CI(PQ)=0 : Inc DN : Td Angle PQ,0,0,0
  321.       Next PQ
  322.       Tempo 28
  323.    Until DN=4
  324.    For Z=1 To 5
  325.       Td Angle Rel 0,-62,-132,0
  326.       Td Cls
  327.       Td Redraw
  328.       Td Background 1,0,0,320,200 To 0,0
  329.       Screen Swap
  330.       Wait Vbl
  331.       Tempo 28
  332.    Next Z
  333.    For Z=1 To 20
  334.       Td Move Rel 0,-90,20,180
  335.       For PQ=1 To 4
  336.          Td Angle Rel PQ,600,0,0
  337.       Next PQ
  338.       Td Face 0,2
  339.       Td Cls
  340.       Td Redraw
  341.       Td Background 1,0,0,320,200 To 0,0
  342.       Screen Swap
  343.       Wait Vbl
  344.       Tempo 28
  345.    Next Z
  346.    Wait 25
  347.    For Z=1 To 30
  348.       For PQ=1 To 4
  349.          Td Move Rel PQ,Z*150,0,0
  350.       Next PQ
  351.       Td Cls
  352.       Td Redraw
  353.       Td Background 1,0,0,320,200 To 0,0
  354.       Screen Swap
  355.       Wait Vbl
  356.       Tempo 28
  357.    Next Z
  358.    For Z=1 To 4 : Td Kill Z : Next Z
  359.    Fade 1 : Wait 15
  360. End Proc
  361. Procedure STARS
  362.    Fade 1 : Wait 15
  363.    Screen 2 : Fade 1 : Wait 15
  364.    Ink 4 : Bar 5,5 To 314,32
  365.    Ink 1,4 : Text 7,21,"Manipulate background scenes with ease"
  366.    Fade 2,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF
  367.    Screen Open 1,640,400,2,Lowres : Screen Hide 1
  368.    Screen 1 : Cls 0
  369.    Ink 1 : For Z=1 To 500 : Plot Rnd(319),Rnd(199) : Next Z
  370.    Screen Copy 1,0,0,320,200 To 1,320,0 : Screen Copy 1,0,0,640,200 To 1,0,200
  371.    Screen Display 1,128,50,320,200
  372.    Screen 0 : Cls 0
  373.    Screen Copy 1,0,0,320,200 To 0,0,0
  374.    Screen Swap
  375.    Wait 30
  376.    Td Move 0,0,0,0 : Td Angle 0,0,0,0
  377. End Proc
  378. Procedure TDSHIP
  379.    Curs Off
  380.    Td Move 0,0,0,0 : Td Angle 0,0,0,0
  381.    SX=0 : SY=0
  382.    Td Object 1,"ship1",0,0,60000,0,0,32760
  383.    Td Object 2,"satellite",-1400,400,5000,0,0,0
  384.    Td Move 0,0,0,0
  385.    Td Cls
  386.    Td Redraw
  387.    Screen Swap
  388.    Hide On
  389.    Fade 3,0,$FFF,,,,,,,$3F,$8F,$F,$FFA,$AF,$AA5,$CC6
  390.    For Z=1 To 48
  391.       Td Forward 1,-1160
  392.       Td Angle Rel 1,0,0,2074
  393.       Td Angle Rel 2,100,100,600
  394.       Gosub FACE
  395.    Next Z
  396.    For Z=1 To 77
  397.       Gosub MOVEIT
  398.       Gosub FACE
  399.    Next Z
  400.    Td Object 3,"missile1",8000,9000,-8000,0,0,0
  401.    For Z=1 To 70
  402.       Gosub MOVEIT
  403.       Td Face 3,1 : Td Forward 3,500 : Td Angle Rel 3,0,400,0
  404.       Gosub FACE
  405.    Next Z
  406.    For Z=1 To 290
  407.       Gosub MOVEIT
  408.       Td Forward 3,500 : Td Angle Rel 3,0,400,0
  409.       Gosub FACE
  410.    Next Z
  411.    Goto GOAWAY
  412.    MOVEIT:
  413.    Td Forward 1,-300
  414.    Td Angle Rel 1,0,400,200
  415.    Td Angle Rel 2,100,100,600
  416.    Return
  417.    FACE:
  418.    Td Face 0,1
  419.    XF=Td Attitude B(0) : YF=65520-Td Attitude A(0)
  420.    XF=(XF*320)/65520 : YF=(YF*200)/65520
  421.    Td Cls
  422.    Td Redraw
  423.    Td Background 1,XF,YF,XF+320,YF+200 To 0,0
  424.    Screen Swap
  425.    Wait Vbl
  426.    Return
  427.    GOAWAY:
  428.    Screen 2 : Fade 1 : Wait 15
  429.    Screen 0 : Fade 1 : Wait 15 : Td Kill 1 : Td Kill 2 : Td Kill 3
  430. End Proc
  431. Procedure CAR_RACE
  432.    Screen 2 : Ink 4 : Bar 5,5 To 314,32
  433.    Ink 1,4 : Text 10,22,"Moving and viewing is simplicity itself"
  434.    Fade 2,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF : Wait 30
  435.    Screen Open 1,320,200,2,Lowres : Screen Hide 1 : Screen Display 1,128,0,320,200
  436.    Cls 1
  437.    Set Rainbow 0,1,136,"","",""
  438.    Restore RDATA
  439.    For C=0 To 135 : Read CVA : Rain(0,C)=CVA
  440.    Next C
  441.    RDATA:
  442.    Data $0,$0,$0,$0,$0,$0,$0,$112
  443.    Data $112,$112,$0,$112,$112,$112,$112,$112
  444.    Data $112,$0,$112,$112,$112,$112,$112,$112
  445.    Data $113,$113,$114,$114,$115,$115,$116,$116
  446.    Data $117,$117,$118,$119,$119,$11A,$11B,$11B
  447.    Data $11C,$11D,$11D,$11E,$11E,$11E,$11E,$11F
  448.    Data $11F,$11F,$11F,$11F,$11F,$11F,$11F,$11F
  449.    Data $11F,$11F,$11F,$11F,$11F,$11F,$11F,$11F
  450.    Data $11F,$11F,$11F,$11F,$11F,$11F,$11F,$11F
  451.    Data $11F,$11F,$11F,$11F,$11F,$11F,$11F,$11F
  452.    Data $11F,$11F,$11F,$11F,$11F,$11F,$11F,$11F
  453.    Data $11F,$11F,$11F,$11F,$11F,$11F,$21F,$21F
  454.    Data $31F,$41F,$51F,$61F,$71F,$81F,$91F,$91F
  455.    Data $A1F,$B1E,$B1D,$C1C,$C1B,$C1A,$C19,$C18
  456.    Data $C17,$C16,$C15,$C14,$C13,$C12,$C11,$C11
  457.    Data $C21,$C31,$C41,$C51,$C61,$C71,$C81,$C81
  458.    Data $C91,$CA1,$CB1,$CC1,$CD1,$CE1,$CF1,$CF1
  459.    Data $CF2,$CF3,$CF4,$CF5,$CF6,$CF7,$CF8,$CF9
  460.    Screen 0
  461.    Td Object 3,"grid",0,-220,32500,-16380,0,0
  462.    Td Object 4,"racelights",0,600,31500,32760,0,0
  463.    Td Move 0,-2000,500,1000 : Td Face 0,3
  464.    Td Object 1,"car1",-500,0,35000,0,16380,0
  465.    Td Object 2,"car2",500,0,35000,0,16380,0
  466.    Fade 1,0,$500,$FFF,,,,,,$FFF,$C0,$AAA,$70
  467.    Td Surface "light_anim",0,3 To 4,0,3,0 : Gosub SKY
  468.    For Z=1 To 33
  469.       Td Move Rel 0,2,0,900
  470.       Td Face 0,3
  471.       Gosub SKY
  472.    Next Z
  473.    SPD=900
  474.    For Z=1 To 30
  475.       Td Move Rel 0,10,45,SPD
  476.       Td Face 0,3
  477.       Gosub SKY
  478.       SPD=SPD-30
  479.    Next Z
  480.    For Z=1 To 80
  481.       Td Move Rel 0,120,20,-220
  482.       Td Face 0,3
  483.       Gosub SKY
  484.    Next Z
  485.    Wait 50
  486.    Td Move 0,-1500,5000,31000
  487.    Td Angle 0,0,0,0
  488.    Td Face 0,3
  489.    For Z=1 To 50
  490.       Gosub SKY
  491.       Td Move Rel 0,0,-100,0
  492.       Td Face 0,3
  493.    Next Z
  494.    Wait 25
  495.    Td Move 0,2500,1500,34500
  496.    Td Angle 0,0,0,0
  497.    Td Face 0,3
  498.    Td Move Z 1,"(1,-80,25)"
  499.    Td Move Z 2,"(1,-40,50)"
  500.    For Z=1 To 55
  501.       Gosub SKY
  502.    Next Z
  503.    Wait 25
  504.    Td Move 0,0,2000,50000
  505.    Td Angle 0,0,32760,0
  506.    For Z=1 To 20
  507.       Td Move Rel 0,0,-100,-750
  508.       Td Face 0,4
  509.       Gosub SKY
  510.    Next Z
  511.    Screen 2 : Fade 1 : Wait 15 : Ink 4 : Bar 5,5 To 314,32
  512.    Ink 1,4 : Text 11,15,"3D car racing, dog fights or business" : Text 21,28,"graphics are all at your fingertips"
  513.    Fade 1,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF : Wait 15 : Screen 0
  514.    For Z=1 To 25
  515.       Td Move Rel 0,0,0,200
  516.       Td Angle Rel 0,-70,27,0
  517.       Gosub SKY
  518.    Next Z
  519.    For Z=1 To 25
  520.       Td Move Rel 0,0,0,-200
  521.       Td Face 0,1 : Gosub SKY
  522.    Next Z
  523.    Wait 5
  524.    Td Surface "light_anim",0,1 To 4,0,3,0 : Gosub SKY : Wait 50
  525.    Td Surface "light_anim",0,0 To 4,0,3,0 : Gosub SKY : Wait 50
  526.    Td Surface "light_anim",0,2 To 4,0,3,0 : Gosub SKY
  527.    NICKS:
  528.    SPD1=0 : SPD2=0
  529.    FRM=0
  530.    SPD0=0
  531.    PAN6:
  532.    Gosub SKY
  533.    Td Face 0,1
  534.    Td Move Rel 1,0,0,-SPD1
  535.    Td Move Rel 2,0,0,-SPD2
  536.    Add SPD1,20
  537.    Add SPD2,30
  538.    If SPD1>605 Then SPD1=605
  539.    If SPD2>590 Then SPD2=590
  540.    If FRM>60 Then Gosub POON
  541.    Inc FRM
  542.    If Td Position Z(1)<-120000 Then SPD0=0 : BRK=0 : Goto PAN7
  543.    Goto PAN6
  544.    POON:
  545.    Td Move Rel 0,0,5,-SPD0
  546.    If Td Position Z(0)<-95000 Then Goto POONS
  547.    Add SPD0,50
  548.    If SPD0>1500 Then SPD0=1500
  549.    Return
  550.    POONS:
  551.    If SPD0>0 Then SPD0=SPD0-100
  552.    If Td Position X(0)<-1500 Then Return
  553.    Td Move Rel 0,-100,100,0
  554.    Return
  555.    PAN7:
  556.    Gosub SKY
  557.    Td Face 0,1
  558.    Td Move Rel 0,0,-10,-SPD0
  559.    Td Move Rel 2,0,0,-SPD2
  560.    Td Move Rel 1,0,0,-SPD1
  561.    If BRK=0 Then Add SPD0,58
  562.    If SPD0=0 Then Add SPD2,-5 : Add SPD1,-50 : Gosub TURN1
  563.    If Td Position Z(0)<-130000 Then Add SPD0,-30 : Inc BRK
  564.    If SPD0<0 Then SPD0=0
  565.    If SPD2<0 Then SPD2=0
  566.    If SPD1<0 Then SPD1=0
  567.    If BRK=58 Then Music Off : Sam Play 1,3,5000
  568.    If BRK=120 Then Goto FIN
  569.    Goto PAN7
  570.    TURN1:
  571.    Td Angle Rel 2,4000,2000,3000
  572.    If SPD1>0 Then Td Angle Rel 1,0,-3600,0
  573.    Return
  574.    FIN:
  575.    Wait 50
  576.    Fade 2 : Wait 50
  577.    Td Kill 1 : Td Kill 2 : Td Kill 3 : Td Kill 4
  578.    Goto FINI
  579.    SKY:
  580.    YS1=Td Screen Y(0,0,500000) : YS2=Td Screen Y(0,0,-500000)
  581.    If YS1>0 Then SKY=YS1 Else SKY=YS2
  582.    Add SKY,65
  583.    SKP=SKY-155 : SKH=150 : SKB=0
  584.    SKL=89
  585.    If SKP<SKL Then SKH=SKH+SKP-SKL : SKB=SKL-SKP : SKP=SKL
  586.    If SKY<65 Then SKH=15
  587.    Rainbow 0,SKB,SKP,SKH-15
  588.    Td Cls : Td Redraw
  589.    Td Background 1,0,0,320,200 To 0,0
  590.    Screen Swap : Wait Vbl
  591.    Return
  592.    FINI:
  593.    Screen 2
  594.    Fade 1 : Wait 15
  595.    Screen 1 : Rainbow Del
  596. End Proc
  597. Procedure TV
  598.    Screen 2 : Ink 4 : Bar 5,5 To 314,32
  599.    Ink 1,4 : Text 12,15,"Surface detail adds that professional" : Text 61,28,"touch to your 3D objects"
  600.    Fade 2,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF : Wait 30
  601.    Screen 0 : Flash Off
  602.    Td Move 0,0,0,0
  603.    Td Object 1,"tv",0,500,2500,0,0,0
  604.    Fade 2,0,$FFF,$BBB,$888,$F80,,$F00,,,$EFE,$A0,$60
  605.    Restore TVDTA
  606.    FRM=0
  607.    ANG=0
  608.    For Z=1 To 126
  609.       If FRM=0 Then Read FC : Td Surface "tv_anim",0,FC To 1,0,0,2
  610.       Td Move 0,1000*Cos(ANG),0,0
  611.       Td Face 0,1
  612.       Td Cls
  613.       Td Redraw
  614.       Screen Swap
  615.       Wait Vbl
  616.       Inc FRM : FRM=FRM mod 3
  617.       Add ANG,5 : ANG=ANG mod 360
  618.    Next Z
  619.    TVDTA:
  620.    Data 3,3,3,3,3,3,3,2,2,2,3,0,0,0,3,2,2,2,3,0,0,0,3,3,3,1,4,4,4,1,3,3,0,0,0,3,2,2,2,3,3,3
  621.    Screen 2 : Fade 1 : Wait 15
  622. End Proc
  623. Procedure TV_BOOM
  624.    Screen 2 : Ink 4 : Bar 5,5 To 314,32
  625.    Ink 1,4 : Text 33,15," Flexible animation routines allow" : Text 18,28,"you to bring your character to life."
  626.    Fade 2,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF : Wait 30
  627.    Screen 0
  628.    Td Surface "tv_anim",0,4 To 1,0,0,2
  629.    A=-40 : B=20 : C=-20
  630.    For Z=1 To 41
  631.       If Z=2 Then Sam Play 1,5,3000
  632.       Td Anim Rel 1,1,A,B,C,1
  633.       Add A,2 : Dec B : Inc C
  634.       Gosub SHIFTEM
  635.    Next Z
  636.    A=40 : B=20 : C=-60
  637.    For Z=1 To 21
  638.       If Z=2 Then Sam Play 1,4,3000
  639.       Td Anim Rel 1,2,A,B,C,1
  640.       Add A,-4 : Add B,-2 : Add C,6
  641.       Gosub SHIFTEM
  642.    Next Z
  643.    Dim A(7),B(7),C(7),AI(7),BI(7),CI(7)
  644.    For Z=0 To 7 : AI(Z)=0 : BI(Z)=0 : CI(Z)=0 : Next Z
  645.    Restore ADTA : For Z=0 To 3 : Read A(Z),B(Z),C(Z) : A(Z+4)=A(Z) : B(Z+4)=B(Z) : C(Z+4)=C(Z) : Next Z
  646.    ADTA: Data -32,-21,7,-22,43,-31,24,22,23,37,-31,-18
  647.    For Z=1 To 150
  648.       For Q=0 To 7
  649.          Td Anim Rel 1,Q,A(Q),B(Q),C(Q),0
  650.          Add AI(Q),A(Q) : Add BI(Q),B(Q) : Add CI(Q),C(Q)
  651.          If AI(Q)<0 Then Add A(Q),(Z+20)/3
  652.          If AI(Q)>0 Then Add A(Q),-(Z+20)/3
  653.          If BI(Q)<0 Then Add B(Q),(Z+20)/3
  654.          If BI(Q)>0 Then Add B(Q),-(Z+20)/3
  655.          If CI(Q)<0 Then Add C(Q),(Z+20)/3
  656.          If CI(Q)>0 Then Add C(Q),-(Z+20)/3
  657.       Next Q
  658.       Td Anim Rel 1,0,0,0,0,1
  659.       Gosub SHIFTEM
  660.    Next Z
  661.    For Z=0 To 7 : Td Anim Rel 1,Z,-AI(Z),-BI(Z),-CI(Z),0 : Next Z
  662.    Td Anim Rel 1,1,0,0,0,1
  663.    Restore ADTA1
  664.    For Z=1 To 57
  665.       Read A
  666.       Td Anim Rel 1,0,A,0,0,0
  667.       Td Anim Rel 1,1,A,0,0,0
  668.       Td Anim Rel 1,2,-A,0,0,0
  669.       Td Anim Rel 1,3,-A,0,0,1
  670.       Gosub SHIFTEM
  671.       If Z=2 Then Sam Play 1,4,3000
  672.    Next Z
  673.    Restore ADTA1
  674.    For Z=1 To 57
  675.       Read A
  676.       Td Anim Rel 1,1,0,-A,0,0
  677.       Td Anim Rel 1,2,0,-A,0,0
  678.       Td Anim Rel 1,0,0,A,0,0
  679.       Td Anim Rel 1,3,0,A,0,1
  680.       Gosub SHIFTEM
  681.       If Z=2 Then Sam Play 1,5,5000
  682.    Next Z
  683.    A=-240
  684.    For Z=1 To 26
  685.       Td Anim Rel 1,0,A,A,0,0
  686.       Td Anim Rel 1,4,A,A,0,0
  687.       Td Anim Rel 1,1,A,-A,0,0
  688.       Td Anim Rel 1,5,A,-A,0,0
  689.       Td Anim Rel 1,2,-A,-A,0,0
  690.       Td Anim Rel 1,6,-A,-A,0,0
  691.       Td Anim Rel 1,3,-A,A,0,0
  692.       Td Anim Rel 1,7,-A,A,0,1
  693.       Add A,20
  694.       Gosub SHIFTEM
  695.       If Z=2 Then Sam Play 1,4,5000
  696.    Next Z
  697.    ADTA1:
  698.    Data -200,-200,-200,-180,-180,-160,-160,-140,-120,-100,-80,-60,-40,-20,0,20,40,60,80,100,120,130,160,160
  699.    Data 180,180,200,200,200
  700.    Data -150,-130,-110,-90,-70,-50,-30,30,50,70,90,110,130,150
  701.    Data -70,-50,-30,30,50,70,-50,-30,30,50
  702.    Data -50,-30,30,50
  703.    Goto FINITO
  704.    SHIFTEM:
  705.    Td Move 0,1000*Cos(ANG),0,0
  706.    Td Face 0,1
  707.    Add ANG,5 : ANG=ANG mod 360
  708.    Td Cls : Td Redraw
  709.    Screen Swap
  710.    Wait Vbl
  711.    Return
  712.    FINITO:
  713.    Td Kill 1 : Td Cls : Td Redraw : Paste Bob 70,60,1 : Screen Swap : Wait Vbl
  714. End Proc
  715. Procedure SMALL_BLOCK
  716.    Td Cls : Td Redraw : Paste Bob 70,60,1 : Screen Swap : Wait Vbl
  717.    Dim X(4),Y(4),Z(4),XI(4),YI(4),ZI(4),D(4)
  718.    For Z=1 To 4 : Td Object Z,"small_cube",Rnd(600)-300,100+(Rnd(8)*20),2500,0,0,0 : X(Z)=Td Position X(Z) : Y(Z)=Td Position Y(Z) : Z(Z)=2500
  719.       XI(Z)=Rnd(120) : YI(Z)=(Rnd(4)+2)*20 : ZI(Z)=Rnd(80)-40
  720.       If Z<4 Then XI(Z)=-XI(Z)
  721.    Next Z
  722.    LAND=0
  723.    Repeat
  724.       For Q=1 To 4
  725.          Td Move Q,X(Q),Y(Q),Z(Q)
  726.          If XI(Q)<>0 and YI(Q)<>0 and ZI(Q)<>0 Then Td Angle Rel Q,0,(Q-3)*300,0
  727.          Add X(Q),XI(Q) : Add Y(Q),YI(Q) : Add Z(Q),ZI(Q)
  728.          If Y(Q)<-100 Then Y(Q)=-100 : YI(Q)=Abs(YI(Q))-20
  729.          If Y(Q)=-100 and YI(Q)=0 and D(Q)=0 Then Inc LAND : XI(Q)=0 : ZI(Q)=0 : YI(Q)=0 : D(Q)=1
  730.          If YI(Q)<>0 or Y(Q)<>-100 Then Add YI(Q),-20
  731.       Next Q
  732.       Td Cls : Td Redraw : Screen Swap : Wait Vbl
  733.    Until LAND=4
  734.    Wait 50
  735.    Fade 2 : Wait 30
  736.    For Z=1 To 4 : Td Kill Z : Next Z
  737.    Screen 2 : Fade 2 : Wait 30
  738. End Proc
  739. Procedure OM
  740.    Unpack 6 To 1 : Screen Hide 1
  741.    Screen 0 : Flash Off
  742.    Screen 2 : Ink 4 : Bar 5,5 To 314,32
  743.    Ink 1,4 : Text 29,15,"Create and edit objects with the" : Text 51,28,"easy-to-use object modeller"
  744.    Fade 2,0,$FFF,$CCC,$888,$5F,$F,$AF,$CF : Wait 30
  745.    Td Move 0,0,0,0 : Td Angle 0,0,0,0
  746.    Td Object 1,"umb",-600,200,2800,0,0,0
  747.    Screen 0 : Td Cls : Td Redraw : Td Background 1,0,0,320,64 To 0,136 : Screen Swap
  748.    Fade 2,0,$FFF,$CCC,$AAA,$888,$666,$CF,$8D,$6D,$4B,$F00,$90,$E40,$A10,$F0,$3A
  749.    Wait 30
  750.    For Z=1 To 300
  751.       Td Cls : Td Redraw : Td Background 1,0,0,320,64 To 0,136 : Screen Swap : Wait Vbl
  752.       Td Angle Rel 1,-1000,-850,700
  753.    Next Z
  754.    Fade 2 : Wait 30
  755.    Screen 2 : Fade 2 : Wait 30 : Td Kill 1
  756.    Screen 1 : Cls 0
  757. End Proc
  758. Procedure CREDITS
  759.    Screen Hide 2 : Screen To Back 2 : Screen 2
  760.    Screen Open 1,320,200,4,Lowres : Screen Hide 1 : Screen To Back 1
  761.    Screen 1 : Cls 0
  762.    Ink 1,0
  763.    Dim A$(10)
  764.    A$(1)="CREDITS"
  765.    A$(2)="  "
  766.    A$(3)="Programming and graphics"
  767.    A$(4)="Nick Harper"
  768.    A$(5)="  "
  769.    A$(6)="Music"
  770.    A$(7)="Allistair Brimble"
  771.    A$(8)="  "
  772.    A$(9)="Sound effects"
  773.    A$(10)="Len Tucker"
  774.    Screen 0
  775.    LINE=1
  776.    SET=0 : YD=0
  777.    Td Move 0,0,0,0 : Td Angle 0,0,0,0
  778.    Td Object 1,"cursor2",-2800,1400,5000,0,0,0
  779.    Td Object 2,"cursor2",2800,1400,5000,0,0,0
  780.    Td Cls
  781.    Td Redraw
  782.    Screen Swap
  783.    Fade 1,0,$FFF,,,,,,,$3F8,$9F9,$F0,$80,$5F5,$C0,$A0 : Wait 20
  784.    Gosub NEWLINE
  785.    Repeat
  786.       Td Angle Rel 1,1300,1500,-2000 : Td Angle Rel 2,1300,1500,2000
  787.       On SET+1 Gosub ROLL,ROLL1,ROLL2
  788.       Td Cls : Td Redraw : Td Background 1,0,0,320,200 To 0,0 : Screen Swap : Wait Vbl
  789.       If XS1>XS2 and SET=0 Then Gosub TXT
  790.    Until LINE=11
  791.    For Z=1 To 50
  792.       Td Angle Rel 1,1300,1500,-2000 : Td Angle Rel 2,1300,1500,2000
  793.       Td Move Rel 1,210,155,-300 : Td Move Rel 2,-210,155,-300
  794.       Td Cls : Td Redraw : Td Background 1,0,0,320,200 To 0,0 : Screen Swap : Wait Vbl
  795.    Next Z
  796.    Wait 100
  797.    Fade 2 : Wait 40 : Cls 0 : Td Kill 1 : Td Kill 2 : Screen 1 : Cls 0 : Set Font 1
  798.    Ink 1,0 : Text 64,20,"AMOS 3D was written by"
  799.    Text 115,35,"Tony Wilkes" : Text 148,50,"and" : Text 108,65,"Richard Lewis"
  800.    Text 151,80,"of" : Text 125,160,"software"
  801.    Screen 0
  802.    Td Move 0,0,0,0 : Td Angle 0,0,0,0 : Td Object 1,"voodoo",0,-200,10000,0,16000,0
  803.    Fade 1,0,$FFF,,,,,,,$3F8,$9F9,$F0,$80,$5F5,$C0,$A0
  804.    For Z=1 To 150
  805.       Td Cls : Td Redraw : Td Background 1,0,0,320,200 To 0,0 : Screen Swap : Wait Vbl
  806.       Td Move Rel 1,0,2,-58 : Td Angle Rel 1,0,-106,436
  807.    Next Z
  808.    Wait 100
  809.    Goto TADA
  810.    TXT:
  811.    Screen Copy 2,XS2,6,XS1,28 To 1,XS2,Y-12,224
  812.    Return
  813.    ROLL:
  814.    Td Move Rel 1,150,0,0 : Td Move Rel 2,-150,0,0
  815.    Gosub POS
  816.    If XS1>270 Then SET=1
  817.    Return
  818.    ROLL1:
  819.    Td Move Rel 1,100,YD,0 : Td Move Rel 2,-100,YD,0
  820.    Add YD,-30
  821.    Gosub POS
  822.    If YD=-150 Then YD=0 : SET=2
  823.    Return
  824.    ROLL2:
  825.    Gosub POS
  826.    Td Move 1,X2,Y1,5000 : Td Move 2,X1,Y1,5000
  827.    Gosub POS
  828.    SET=0
  829.    Inc LINE
  830.    If LINE<11 Then Gosub NEWLINE
  831.    Return
  832.    POS:
  833.    X1=Td Position X(1) : X2=Td Position X(2) : Y1=Td Position Y(1)
  834.    XS1=Td Screen X(X1,Y1,5000) : XS2=Td Screen X(X2,Y1,5000) : Y=Td Screen Y(0,Y1,5000)
  835.    Return
  836.    NEWLINE:
  837.    Screen 2
  838.    Ink 0 : Bar 5,5 To 314,32 : Ink 1,0
  839.    L=Text Length(A$(LINE)) : L=L/2
  840.    Text 160-L,22,A$(LINE) : Screen 0
  841.    Return
  842.    TADA:
  843.    Fade 2 : Wait 40 : Cls 0 : Screen Swap : Wait 20 : Td Kill 1
  844.    Screen 1 : Cls 0 : Screen 0
  845. End Proc
  846. Procedure PLUG
  847.    Unpack 7 To 0
  848.    Screen Swap
  849.    Fade 2,0,$FFF,$DDD,$BBB,$888,$FF,$BF,$8F,$FF9,$FF0,$FC0,$FA0,$F80,$F60,$F30,$F00
  850.    Wait 450
  851.    Fade 1 : Wait 15 : Cls 0
  852.    Autoback 0 : Double Buffer
  853.    Screen To Front 2
  854. End Proc
  855.